blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
332
content_id
stringlengths
40
40
detected_licenses
listlengths
0
50
license_type
stringclasses
2 values
repo_name
stringlengths
7
115
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
557 values
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
77.7k
fork_events_count
int64
0
48k
gha_license_id
stringclasses
17 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
82 values
src_encoding
stringclasses
28 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
7
5.41M
extension
stringclasses
11 values
content
stringlengths
7
5.41M
authors
listlengths
1
1
author
stringlengths
0
161
e51465ee4edc6998b7c8f63d7599f16261e430b0
78e15dfabb09ccb3e00e7b3d1c1b1d457d1931ea
/app/src/main/java/com/whu/myh2o/MapFragment.java
220e905ab0b3221d1995aa1a17c3cd720d590c2a
[]
no_license
whu-luojian/MyH2O
acc154f33b9bb4c683a33a246091b532cbb1a321
c6f8dbc0904dabd450879815416be981aa464945
refs/heads/master
2020-04-18T05:56:20.468420
2017-03-04T09:42:06
2017-03-04T09:42:06
67,322,572
0
0
null
null
null
null
UTF-8
Java
false
false
2,252
java
package com.whu.myh2o; import android.graphics.Color; import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.esri.arcgisruntime.ArcGISRuntimeEnvironment; import com.esri.arcgisruntime.datasource.arcgis.ArcGISFeature; import com.esri.arcgisruntime.datasource.arcgis.ServiceFeatureTable; import com.esri.arcgisruntime.geometry.Point; import com.esri.arcgisruntime.geometry.SpatialReferences; import com.esri.arcgisruntime.layers.FeatureLayer; import com.esri.arcgisruntime.mapping.ArcGISMap; import com.esri.arcgisruntime.mapping.Basemap; import com.esri.arcgisruntime.mapping.Viewpoint; import com.esri.arcgisruntime.mapping.view.MapView; /** * A simple {@link Fragment} subclass. */ public class MapFragment extends Fragment { MapView mapView; FeatureLayer mFeatureLayer; public static ServiceFeatureTable serviceFeatureTable; private boolean mFeatureSelected = false; private ArcGISFeature mIdentifiedFeature; public MapFragment() { // Required empty public constructor } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment ArcGISRuntimeEnvironment.setClientId("N7JPBdBkT209Rw80"); View v = inflater.inflate(R.layout.fragment_map, container, false); return v; } @Override public void onViewCreated(View view, Bundle savedInstanceState){ mapView = (MapView)view.findViewById(R.id.map); ArcGISMap map = new ArcGISMap(Basemap.createStreets()); map.setInitialViewpoint(new Viewpoint(new Point(112.343, 28.585, SpatialReferences.getWgs84()), 1E7)); //final ServiceFeatureTable serviceFeatureTable = new ServiceFeatureTable(getResources().getString(R.string.featurelyrUrl)); mFeatureLayer = new FeatureLayer(serviceFeatureTable); mFeatureLayer.setSelectionColor(Color.CYAN); mFeatureLayer.setSelectionWidth(3); mFeatureLayer.setPopupEnabled(true); map.getOperationalLayers().add(mFeatureLayer); mapView.setMap(map); } }
[ "18702741160@163.com" ]
18702741160@163.com
36269956529230ddbbf81f6bc3b2fac159289638
7d28d457ababf1b982f32a66a8896b764efba1e8
/platform-pojo-bl/src/test/java/ua/com/fielden/platform/cypher/SymmetricCypherTest.java
7ec9c29501cc2a923a4cbcfc2f936510a3da9b85
[ "MIT" ]
permissive
fieldenms/tg
f742f332343f29387e0cb7a667f6cf163d06d101
f145a85a05582b7f26cc52d531de9835f12a5e2d
refs/heads/develop
2023-08-31T16:10:16.475974
2023-08-30T08:23:18
2023-08-30T08:23:18
20,488,386
17
9
MIT
2023-09-14T17:07:35
2014-06-04T15:09:44
JavaScript
UTF-8
Java
false
false
1,269
java
package ua.com.fielden.platform.cypher; import static org.junit.Assert.assertEquals; import org.apache.commons.lang3.StringUtils; import org.junit.Test; /** * A test case for {@link SymmetricCypher}. * * @author TG Team * */ public class SymmetricCypherTest { private static final String password = "ljxGGmmiwD5KZSbMYOfSRaNmyTDfhL1cThbd8RUGlA"; private static final String salt = "QnNCUWu19"; private final byte[] nonce; private final SymmetricCypher cypher; public SymmetricCypherTest() throws Exception { cypher = new SymmetricCypher(password, salt); nonce = cypher.genNonceForGcm(); } @Test public void short_text_is_encoded_and_decoded_correctely() throws Exception { final String textToEncode = "short text"; final String encryptedText = cypher.encrypt(textToEncode, nonce); assertEquals(textToEncode, cypher.decrypt(encryptedText, nonce)); } @Test public void long_text_is_encoded_and_decoded_correctely() throws Exception { final String textToEncode = StringUtils.repeat("very long text ", 500); final String encryptedText = cypher.encrypt(textToEncode, nonce); assertEquals(textToEncode, cypher.decrypt(encryptedText, nonce)); } }
[ "oles.hodych@gmail.com" ]
oles.hodych@gmail.com
a6355a1be9d1be56aa5806e6bf8454e05096341b
363c936f4a89b7d3f5f4fb588e8ca20c527f6022
/AL-Game/src/com/aionemu/gameserver/utils/collections/cachemap/SoftCacheMap.java
0d3029fb4378c506124f937da4b0d43cf713d9e7
[]
no_license
G-Robson26/AionServer-4.9F
d628ccb4307aa0589a70b293b311422019088858
3376c78b8d90bd4d859a7cfc25c5edc775e51cbf
refs/heads/master
2023-09-04T00:46:47.954822
2017-08-09T13:23:03
2017-08-09T13:23:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,600
java
/** * This file is part of Aion-Lightning <aion-lightning.org>. * * Aion-Lightning is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Aion-Lightning is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Aion-Lightning. * If not, see <http://www.gnu.org/licenses/>. */ package com.aionemu.gameserver.utils.collections.cachemap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.lang.ref.Reference; import java.lang.ref.ReferenceQueue; import java.lang.ref.SoftReference; /** * This class is a simple map implementation for cache usage.<br> * <br> * Value may be stored in map really long, but it for sure will be removed if * there is low memory (and of course there isn't any strong reference to value * object) * * @author Luno */ class SoftCacheMap<K, V> extends AbstractCacheMap<K, V> implements CacheMap<K, V> { private static final Logger log = LoggerFactory.getLogger(SoftCacheMap.class); /** * This class is a {@link SoftReference} with additional responsibility of * holding key object * * @author Luno */ private class SoftEntry extends SoftReference<V> { private K key; SoftEntry(K key, V referent, ReferenceQueue<? super V> q) { super(referent, q); this.key = key; } K getKey() { return key; } } SoftCacheMap(String cacheName, String valueName) { super(cacheName, valueName, log); } @Override @SuppressWarnings("unchecked") protected synchronized void cleanQueue() { SoftEntry en = null; while ((en = (SoftEntry) refQueue.poll()) != null) { K key = en.getKey(); if (log.isDebugEnabled()) { log.debug(cacheName + " : cleaned up " + valueName + " for key: " + key); } cacheMap.remove(key); } } @Override protected Reference<V> newReference(K key, V value, ReferenceQueue<V> vReferenceQueue) { return new SoftEntry(key, value, vReferenceQueue); } }
[ "falke34@a70f7278-c47d-401d-a0e4-c9401b7f63ed" ]
falke34@a70f7278-c47d-401d-a0e4-c9401b7f63ed
b37b9b53a23fcc895bf0da1e7f6f389e731c0f01
667902db1fc03c609ca7a6f07029005353e7364d
/admin-portal/ana-client/src/main/java/com/tng/portal/ana/service/impl/PermissionServiceImpl.java
66cc78e8ce296ff88803b84a0632099969832273
[]
no_license
jianfengEric/testcase2
431a32ab61cdaf13482268671658f7d29aba9983
7cda6e1e0d0f403edd6a478fd2672789837dde26
refs/heads/master
2020-04-27T06:03:40.512227
2019-03-25T02:12:23
2019-03-25T02:12:23
174,097,386
0
0
null
null
null
null
UTF-8
Java
false
false
6,044
java
package com.tng.portal.ana.service.impl; import com.tng.portal.ana.constant.SystemMsg; import com.tng.portal.ana.entity.AnaFunction; import com.tng.portal.ana.entity.AnaPermission; import com.tng.portal.ana.repository.AnaFunctionRepository; import com.tng.portal.ana.repository.AnaPermissionRepository; import com.tng.portal.ana.service.PermissionService; import com.tng.portal.ana.service.UserService; import com.tng.portal.ana.vo.PermissionDto; import com.tng.portal.ana.vo.PermissionPostDto; import com.tng.portal.common.exception.BusinessException; import com.tng.portal.common.vo.PageDatas; import com.tng.portal.common.vo.rest.RestfulResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; 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 java.util.List; import java.util.stream.Collectors; /** * Created by Zero on 2016/11/10. */ @Service @Transactional public class PermissionServiceImpl implements PermissionService { private static final Logger logger = LoggerFactory.getLogger(PermissionServiceImpl.class); @Autowired private AnaPermissionRepository anaPermissionRepository; @Autowired private AnaFunctionRepository functionRepository; @Qualifier("anaUserService") @Autowired private UserService userService; /** * Create new ANA permission info * * @param postDto * new permission info * * @return * @ */ @Override public RestfulResponse<Integer> createPermission(PermissionPostDto postDto) { RestfulResponse<Integer> restResponse = new RestfulResponse<>(); String name = postDto.getName(); List<AnaPermission> list = anaPermissionRepository.findByName(name); if (!list.isEmpty()){ throw new BusinessException(SystemMsg.ServerErrorMsg.exist_permission.getErrorCode()); } AnaPermission maxIdAnaPermission = anaPermissionRepository.findMaxIdAnaPermission(); int newMaxId = 1; if (maxIdAnaPermission != null){ newMaxId = maxIdAnaPermission.getId()*2; } AnaPermission anaPermission = new AnaPermission(); anaPermission.setId(newMaxId); anaPermission.setName(name); anaPermission.setDescription(postDto.getDescription()); anaPermissionRepository.save(anaPermission); restResponse.setSuccessStatus(); restResponse.setData(anaPermission.getId()); restResponse.setSuccessStatus(); return restResponse; } /** * Update ANA permission info * * @param postDto * updated permission info * * @return * @ */ @Override public RestfulResponse<Integer> updatePermission(PermissionPostDto postDto) { RestfulResponse<Integer> restResponse = new RestfulResponse<>(); AnaPermission anaPermission = anaPermissionRepository.findOne(postDto.getId()); if (anaPermission == null){ throw new BusinessException(SystemMsg.ServerErrorMsg.not_exist_permission.getErrorCode()); } if (!anaPermission.getName().equals(postDto.getName())){ List<AnaPermission> list = anaPermissionRepository.findByName(postDto.getName()); if (!list.isEmpty()){ throw new BusinessException(SystemMsg.ServerErrorMsg.exist_permission.getErrorCode()); } anaPermission.setName(postDto.getName()); } anaPermission.setDescription(postDto.getDescription()); restResponse.setData(anaPermission.getId()); restResponse.setSuccessStatus(); return restResponse; } /** * Delete ANA permission by permission id * * @param id * ANA_PERMISSION.ID * * @return * @ */ @Override public RestfulResponse<Integer> deletePermission(Integer id) { RestfulResponse<Integer> restResponse = new RestfulResponse<>(); AnaPermission anaPermission = anaPermissionRepository.findOne(id); if (anaPermission == null){ throw new BusinessException(SystemMsg.ServerErrorMsg.not_exist_permission.getErrorCode()); } List<AnaFunction> list = functionRepository.findAll(); int total = 0; for (AnaFunction function : list){ total = total | function.getPermissionSum(); } int m = id & total; // Occupied? if (m==id){ throw new BusinessException(SystemMsg.ServerErrorMsg.delete_permission_error.getErrorCode()); } anaPermissionRepository.delete(anaPermission); restResponse.setData(id); restResponse.setSuccessStatus(); return restResponse; } /** * Query ANA permission list * * @param pageNo * current page number * * @param pageSize * page size * * @param sortBy * sort by * * @param isAscending * true--ascend or false--descend * * @return */ @Override public RestfulResponse<PageDatas> listPermissions(Integer pageNo, Integer pageSize,String sortBy,Boolean isAscending) { RestfulResponse<PageDatas> restResponse = new RestfulResponse<>(); PageDatas<PermissionDto> pageDatas = new PageDatas<>(pageNo,pageSize); List<AnaPermission> list = pageDatas.findAll(anaPermissionRepository,sortBy,isAscending,"name"); List<PermissionDto> permissionDtos = list.stream().map(item -> { PermissionDto dto = new PermissionDto(); dto.setId(item.getId()); dto.setName(item.getName()); dto.setDescription(item.getDescription()); return dto; }).collect(Collectors.toList()); pageDatas.setList(permissionDtos); restResponse.setData(pageDatas); restResponse.setSuccessStatus(); return restResponse; } }
[ "eric.lu@sinodynamic.com" ]
eric.lu@sinodynamic.com
e72730265850a80c476cd254f798d84c1f0868fc
06e5d41b6dee5fa6623cea111abf0bae8be07e11
/src/main/java/com/liuwjg/enums/ProductStatusEnum.java
13eb39d25d7720d1242c9b988c5df3f79cdd5568
[]
no_license
liuwja/sell
8f769bd0dec39d85a463204bdbe2eb6233af50f6
b6713cfa59765de7c779be44498f3c8b5c324240
refs/heads/master
2020-04-30T09:59:02.777789
2019-03-26T14:29:13
2019-03-26T14:29:13
176,763,656
0
0
null
null
null
null
UTF-8
Java
false
false
306
java
package com.liuwjg.enums; import lombok.Getter; @Getter public enum ProductStatusEnum { UP(0,"在架"), DOWN(1,"下架"); private Integer code; private String message; ProductStatusEnum(Integer code,String message) { this.code = code; this.message = message; } }
[ "liuwjga@outlook.com" ]
liuwjga@outlook.com
d180153436f81ac007aa895215a4cf37ed912238
26011296a5c863e0cdf2e8710855591c9094084f
/src/main/java/cn/com/taiji/collection/service/CollectionCaseService.java
0de43538a7905703f91d995c7bfa7bd92aa502fb
[]
no_license
RedFriend/case-collection
51c13bb2cc6b83e09d998787a6acb2af1d3fb5db
103c76be12ba343cdf678d84f7d55434b814db0f
refs/heads/master
2023-08-02T17:39:47.752259
2019-07-17T07:08:31
2019-07-17T07:08:31
166,913,488
0
0
null
2023-07-21T00:21:36
2019-01-22T02:30:38
Java
UTF-8
Java
false
false
233
java
package cn.com.taiji.collection.service; import cn.com.taiji.collection.entity.vo.CaseDsrVo; import java.util.Map; /** * @author penghongyou */ public interface CollectionCaseService { Map pushCase(CaseDsrVo caseDsrVo); }
[ "penghongyou@outlook.com" ]
penghongyou@outlook.com
0f9def28a76019872eba93c15ddc3d7d01467204
f76dd376b68117463e0a7c4b187ecbe3bd298fe3
/Hackerrank/ImplementDeQueue.java
85c3d067e327fc5d0dadc23d48458e69f202e2ee
[]
no_license
nikhilsupertramp/competetive-programming
2427b1f2ed316977726420d67eb0dcc1ab5e6308
45f501ff22e39ed8e3f97baa20d3e105c06bf3cb
refs/heads/master
2021-05-17T19:35:04.792702
2020-11-14T05:40:03
2020-11-14T05:40:03
250,939,841
4
0
null
null
null
null
UTF-8
Java
false
false
8,624
java
/* @nikhil_supertramp */ import java.awt.*; import java.io.*; import java.math.*; import java.util.*; import java.util.ArrayList; public class ImplementDeQueue { public static void main(String[] args)throws Exception { new Solver().solve(); } } // cd competetive-programming/src/Hackerrank // javac -d ../../classes ImplementDeQueue.java // java ImplementDeQueue // https://www.hackerrank.com/contests/smart-interviews/challenges/si-implement-deque class Solver { final Helper hp; final int MAXN = 1000_006; final long MOD = (long) 1e9 + 7; void solve() throws Exception { //for(int tc = hp.nextInt(); tc > 0; tc--) { int n = hp.nextInt(); int[] arr = new int[2 * n + 1]; int front = n, rear = n; for(int i = 0 ; i < n; i++) { String s = hp.next(); if(s.equals("push_back")){ arr[rear++] = hp.nextInt(); //hp.println(Arrays.toString(arr) + " " + front + " " + rear); } else if(s.equals("push_front")){ arr[front - 1] = hp.nextInt(); front -= 1; //hp.println(Arrays.toString(arr) + " " + front + " " + rear); } else if(s.equals("pop_front")){ if(front >= rear) hp.println("Empty"); else{ //hp.println(arr[front + 1]); hp.println(arr[front]); front++; } } else if(s.equals("pop_back")){ if(front >= rear) hp.println("Empty"); else{ hp.println(arr[--rear]); } } } } hp.flush(); } Solver() { hp = new Helper(MOD, MAXN); hp.initIO(System.in, System.out); } } class Pair implements Comparable<Pair>{ int x; int y;//long z; public Pair(int x, int y) { this.x = x; this.y = y; //this.z = z; } @Override public int compareTo(Pair p) { if(p.y == y) return x - p.x; return y - p.y; } } class Helper { final long MOD; final int MAXN; final Random rnd; public Helper(long mod, int maxn) { MOD = mod; MAXN = maxn; rnd = new Random(); } public static int[] sieve; public static ArrayList<Integer> primes; public void setSieve() { primes = new ArrayList<>(); sieve = new int[MAXN]; int i, j; for (i = 2; i < MAXN; ++i) if (sieve[i] == 0) { primes.add(i); for (j = i; j < MAXN; j += i) { sieve[j] = i; } } } public static long[] factorial; public void setFactorial() { factorial = new long[MAXN]; factorial[0] = 1; for (int i = 1; i < MAXN; ++i) factorial[i] = factorial[i - 1] * i % MOD; } public long getFactorial(int n) { if (factorial == null) setFactorial(); return factorial[n]; } public long ncr(int n, int r) { if (r > n) return 0; if (factorial == null) setFactorial(); long numerator = factorial[n]; long denominator = factorial[r] * factorial[n - r] % MOD; return numerator * pow(denominator, MOD - 2, MOD) % MOD; } public long[] getLongArray(int size) throws Exception { long[] ar = new long[size]; for (int i = 0; i < size; ++i) ar[i] = nextLong(); return ar; } public int[] getIntArray(int size) throws Exception { int[] ar = new int[size]; for (int i = 0; i < size; ++i) ar[i] = nextInt(); return ar; } public int[] getIntArray(String s)throws Exception { s = s.trim().replaceAll("\\s+", " "); String[] strs = s.split(" "); int[] arr = new int[strs.length]; for(int i = 0; i < strs.length; i++) { arr[i] = Integer.parseInt(strs[i]); } return arr; } public long gcd(long a, long b) { return b == 0 ? a : gcd(b, a % b); } public int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); } public long max(long[] ar) { long ret = ar[0]; for (long itr : ar) ret = Math.max(ret, itr); return ret; } public int max(int[] ar) { int ret = ar[0]; for (int itr : ar) ret = Math.max(ret, itr); return ret; } public long min(long[] ar) { long ret = ar[0]; for (long itr : ar) ret = Math.min(ret, itr); return ret; } public int min(int[] ar) { int ret = ar[0]; for (int itr : ar) ret = Math.min(ret, itr); return ret; } public long sum(long[] ar) { long sum = 0; for (long itr : ar) sum += itr; return sum; } public long sum(int[] ar) { long sum = 0; for (int itr : ar) sum += itr; return sum; } public void shuffle(int[] ar) { int r; for (int i = 0; i < ar.length; ++i) { r = rnd.nextInt(ar.length); if (r != i) { ar[i] ^= ar[r]; ar[r] ^= ar[i]; ar[i] ^= ar[r]; } } } public void shuffle(long[] ar) { int r; for (int i = 0; i < ar.length; ++i) { r = rnd.nextInt(ar.length); if (r != i) { ar[i] ^= ar[r]; ar[r] ^= ar[i]; ar[i] ^= ar[r]; } } } public long pow(long base, long exp, long MOD) { base %= MOD; long ret = 1; while (exp > 0) { if ((exp & 1) == 1) ret = ret * base % MOD; base = base * base % MOD; exp >>= 1; } return ret; } static byte[] buf = new byte[1000_006]; static int index, total; static InputStream in; static BufferedWriter bw; public void initIO(InputStream is, OutputStream os) { try { in = is; bw = new BufferedWriter(new OutputStreamWriter(os)); } catch (Exception e) { } } public void initIO(String inputFile, String outputFile) { try { in = new FileInputStream(inputFile); bw = new BufferedWriter(new OutputStreamWriter( new FileOutputStream(outputFile))); } catch (Exception e) { } } private int scan() throws Exception { if (index >= total) { index = 0; total = in.read(buf); if (total <= 0) return -1; } return buf[index++]; } public String nextLine() throws Exception { int c; for (c = scan(); c <= 32; c = scan()) ; StringBuilder sb = new StringBuilder(); for (; c >= 32; c = scan()) sb.append((char) c); return sb.toString(); } public String next() throws Exception { int c; for (c = scan(); c <= 32; c = scan()) ; StringBuilder sb = new StringBuilder(); for (; c > 32; c = scan()) sb.append((char) c); return sb.toString(); } public int nextInt() throws Exception { int c, val = 0; for (c = scan(); c <= 32; c = scan()) ; boolean neg = c == '-'; if (c == '-' || c == '+') c = scan(); for (; c >= '0' && c <= '9'; c = scan()) val = (val << 3) + (val << 1) + (c & 15); return neg ? -val : val; } public long nextLong() throws Exception { int c; long val = 0; for (c = scan(); c <= 32; c = scan()) ; boolean neg = c == '-'; if (c == '-' || c == '+') c = scan(); for (; c >= '0' && c <= '9'; c = scan()) val = (val << 3) + (val << 1) + (c & 15); return neg ? -val : val; } public void print(Object a) throws Exception { bw.write(a.toString()); } public void printsp(Object a) throws Exception { print(a); print(" "); } public void println() throws Exception { bw.write("\n"); } public void println(Object a) throws Exception { print(a); println(); } public void flush() throws Exception { bw.flush(); } }
[ "sainikhil027@gmail.com" ]
sainikhil027@gmail.com
9c0f76e08cbcfb5bc98e254d14f557b1d0f967ab
a795a45cfd912b01e028f33475b9398b909009c9
/release-atomikos/src/test/java/net/tongark/springboot/releaseatomikos/ReleaseAtomikosApplicationTests.java
42b45e67790b7c555ee9c139aba8f82ed68e9cea
[]
no_license
qibin1991/springboot
fe6812b4e439c9d0043fbd769ffba9d5e0a5d598
675096cf490ac5460cb409c730367de37fe4be62
refs/heads/master
2022-11-23T11:36:01.664775
2020-08-03T06:52:51
2020-08-03T06:52:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
248
java
package net.tongark.springboot.releaseatomikos; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest class ReleaseAtomikosApplicationTests { @Test void contextLoads() { } }
[ "jz_1106@163.com" ]
jz_1106@163.com
c24612578558e996f8cb6b60d346ab2a152dec1c
022b9077d112dfbb33d8d7574556377d0c81d088
/library-events-producer/src/main/java/com/learn/kafka/domain/LibraryEvent.java
ca9b4b43cbaead74eb74568d2d6dc8195f6f2041
[]
no_license
markuvinicius/kafka-spring-boot-course
12475f39280204d589c4a898e2bed69c027e46da
a072c92c98f20021cef474815b88c9cbb407937f
refs/heads/master
2023-08-27T07:15:49.186315
2021-09-28T18:12:22
2021-09-28T18:12:22
409,009,115
0
0
null
null
null
null
UTF-8
Java
false
false
436
java
package com.learn.kafka.domain; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import javax.validation.Valid; import javax.validation.constraints.NotNull; @AllArgsConstructor @NoArgsConstructor @Data @Builder public class LibraryEvent { private Integer libraryEventId; private LibraryEventType libraryEventType; @NotNull @Valid private Book book; }
[ "markuvinicius@gmail.com" ]
markuvinicius@gmail.com
8573dedb0147d713a48d2b2f1eb173053cb50451
39d662c07fe9c2d00c83bff47afd1ab95c500182
/app/src/main/java/com/wts/wts/app/TrackApplication.java
f67504def6b38de257a42af7790f3c0739fcbc5c
[]
no_license
webdevwdc/Tmdb
91244ef3b8cf1186af972189d49478064af05f88
d37ddc669845ec77bc8098fcd1db296149a33c66
refs/heads/master
2021-06-28T13:29:51.965504
2017-09-14T10:29:39
2017-09-14T10:29:39
103,410,995
0
0
null
null
null
null
UTF-8
Java
false
false
700
java
package com.wts.wts.app; import android.app.Application; import com.wts.wts.di.component.ApplicationComponent; import com.wts.wts.di.component.DaggerApplicationComponent; import com.wts.wts.di.modules.ApplicationModule; /** * Created by android on 12/9/17. */ public class TrackApplication extends Application { private ApplicationComponent mApplicationComponent; @Override public void onCreate() { super.onCreate(); mApplicationComponent= DaggerApplicationComponent.builder().applicationModule( new ApplicationModule(this)).build(); } public ApplicationComponent getApplicationComponent() { return mApplicationComponent; } }
[ "hello@webskitters.com" ]
hello@webskitters.com
4e6cf320b6355b07bacd7761395a3cbe9576e268
0a1632fe878f2c650cfbfcf7fa52455a1a6e3ef7
/src/main/java/com/rnd/graphql/graphql/entrypoint/UserEntry.java
aa51313c8fdf127aef301d9d0e96140c66cafc12
[]
no_license
pratik01/graphqlspqrdemo
93aae24df9b61c4a00aa52a547b835dca76343aa
7bb72a53efbcb911ee3490a0b0f59a47850e9435
refs/heads/master
2020-12-08T17:02:47.418747
2020-01-13T02:29:11
2020-01-13T02:29:11
233,041,828
0
0
null
2020-10-13T18:48:17
2020-01-10T12:24:32
Java
UTF-8
Java
false
false
508
java
package com.rnd.graphql.graphql.entrypoint; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import com.rnd.graphql.graphql.models.User; import com.rnd.graphql.graphql.service.UserService; //@GraphQLApi @Component public class UserEntry { @Autowired private UserService uService; // @GraphQLQuery(name = "üsers") public List<User> users() throws ReflectiveOperationException { return uService.findAll(); } }
[ "pikspanchal@gmail.com" ]
pikspanchal@gmail.com
613bb65737a7136ef94065c69153f1266f77b0d8
fab0e56da4c791838d5aa023400dbdf1097edc48
/musicmaineeBackend/src/test/java/com/niit/musicmainee/ProductTest.java
750a8d700f3df99e23484d81da2c32205c7c3e5e
[]
no_license
Sunayanams/Tutorial
50fd5952931d3551cf7824864f4b1a986d7aef69
9db86753deac9b56b6f6336300f012d644329bde
refs/heads/master
2020-06-10T17:41:41.901698
2016-12-08T09:04:06
2016-12-08T09:04:06
75,918,867
0
0
null
null
null
null
UTF-8
Java
false
false
2,302
java
package com.niit.musicmainee; import java.util.List; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import com.niit.musicmainee.Dao.ProductDao; import com.niit.musicmainee.entity.CategoryDetails; import com.niit.musicmainee.entity.Product; import com.niit.musicmainee.entity.SupplierDetails; public class ProductTest { public static void main(String a[]) { AnnotationConfigApplicationContext context=new AnnotationConfigApplicationContext(); context.scan("com.niit.*"); context.refresh(); ProductDao productDao=(ProductDao)context.getBean("productDao"); Product product=(Product)context.getBean("product"); System.out.println(1); CategoryDetails obj= new CategoryDetails(); obj.setCategory_id("hu5685"); SupplierDetails obj1= new SupplierDetails(); obj1.setSupplier_id("hdmk568"); product.setProduct_id("hjy54"); product.setProduct_name("jack"); product.setProduct_price(35871); product.setProduct_quantity(3); product.setProduct_description("welcome"); product.setCategory(obj); product.setSupplier(obj1); System.out.println(2); if(productDao.saveorupdate(product)==true) { System.out.println(3); System.out.println("saved"); } else { System.out.println(4); System.out.println("sorry"); } // if(productDao.delete("hdhhh1022")==true) // { // System.out.println("done"); // } // else // { // System.out.println("sorry"); // } // // Product l1 = (Product)productDao.get("hdhhh1022"); // if(l1==null) // { // System.out.println("there is no record found"); // } // else // { // System.out.println(l1.getCategory_id()+l1.getProduct_id()+l1.getSupplier_id()+l1.getProduct_name()); // } // List<Product> lproduct=(List<Product>) productDao.list(); if(lproduct==null || lproduct.isEmpty()) { System.out.println("no data found"); } else { for(Product p:lproduct) { System.out.println(p.getProduct_id()); System.out.println(p.getProduct_name()); System.out.println(p.getProduct_price()); System.out.println(p.getProduct_description()); System.out.println(p.getProduct_quantity()); // System.out.println(p.getSupplier_id()); // System.out.println(p.getCategory_id()); } } } }
[ "sunayana.putti@gmail.com" ]
sunayana.putti@gmail.com
00bbec50a1228d62e75c93d522e4fcd2cb9a62d1
dae6450976f8e49e5841fe267f448a3dea714adb
/lesson-01-basics/src/main/java/ru/oshokin/Client.java
4f1425b14cbf049946a55f3b689d8da0b3c09951
[]
no_license
oshokin/spring-one
b566a1f114d5494e1fadb59ece573914e5b9cb7f
f216ca10a0c36a95b67ba2727d561bc79b2da8f3
refs/heads/main
2023-02-19T10:41:57.781474
2021-01-24T19:59:44
2021-01-24T19:59:44
323,406,225
0
0
null
2021-01-24T19:59:45
2020-12-21T17:37:57
Java
UTF-8
Java
false
false
527
java
package ru.oshokin; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; public class Client { public static void main(String[] args) { ApplicationContext context = new ClassPathXmlApplicationContext("spring-context.xml"); //ApplicationContext context = new AnnotationConfigApplicationContext(JavaConfig.class); Camera camera = context.getBean("camera", Camera.class); camera.doPhoto(); } }
[ "shokinoleg@gmail.com" ]
shokinoleg@gmail.com
f44f44df15d68abf0907b894825de3073f47e728
eaa2e2dd8b9b001b24a16bff12668f6559a528cc
/src/test/java/framework/webPages/ExpediaTest.java
677ca6a3e89e1f1552a062cd495387c6e08fa2e0
[]
no_license
ahmedmizan/CucumberFramework
79be00934c1979d92fb177bc010517d60d06305f
3eb934981158a73013838989a40541962f1ee0c5
refs/heads/master
2022-11-26T14:21:08.843870
2020-08-06T18:37:39
2020-08-06T18:37:39
282,080,788
0
0
null
null
null
null
UTF-8
Java
false
false
1,570
java
package framework.webPages; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import stepdefinition.SharedSD; import java.util.ArrayList; import java.util.List; public class ExpediaTest extends BasePage{ private By destinationField = By.id("hotel-destination-hp-hotel"); private By listOfSuggestions = By.xpath("//div[@class='multiLineDisplay details']//strong"); private By calanderDates = By.xpath("//button[@class='datepicker-cal-date']"); private By flightOption = By.id("tab-flight-tab-hp"); private By tripType = By.id("flight-type-one-way-label-hp-flight"); public void writeDestination(String text){ setValue(destinationField, text); } public void seletFromSuggestionList(String value){ List<WebElement> cities = new ArrayList<>(); cities = SharedSD.getDriver().findElements(listOfSuggestions); for (WebElement city: cities ){ if(city.getText().toLowerCase().contains(value.toLowerCase())){ city.click(); break; } } } public void selectDate(String expextedDate){ List<WebElement> dates = new ArrayList<>(); dates = SharedSD.getDriver().findElements(calanderDates); for (WebElement date : dates){ if(date.getText().contains(expextedDate)){ date.click(); break; } } } public void clickOnFlight(){ clickOn(flightOption); } public void selectTrip(){ clickOn(tripType); } }
[ "ahmedmmizan@gmail.com" ]
ahmedmmizan@gmail.com
cc63b384ebc7b872b970d4c485a95283ae7544a5
944372b4468a8ba094c71fad911bd6192d26fd1b
/LoadBitmap/src/main/java/com/example/loadbitmap/LoadImage.java
6149a9b6eae876367bd29f034085715565751146
[]
no_license
2452862704/MVVM
6a0ab1a862ea9e0163b2071d32285d2a917b5dd6
69ae3c8677dfd618724c8f92affd08ac84caea06
refs/heads/master
2023-07-13T09:52:47.817664
2021-08-04T01:39:45
2021-08-04T01:39:45
392,507,856
0
0
null
null
null
null
UTF-8
Java
false
false
1,285
java
package com.example.loadbitmap; import android.widget.ImageView; import com.bumptech.glide.Glide; import com.bumptech.glide.load.resource.bitmap.CircleCrop; import com.bumptech.glide.request.RequestOptions; public class LoadImage { public static void loadMatchImg(String url, ImageView img){ Glide.with(img.getContext()).load(url) .placeholder(R.drawable.cutdown_dialog_bg) .error(R.drawable.tt_default_image_error) .centerCrop() .into(img); } public static void loadImg(String url, ImageView img){ Glide.with(img.getContext()).load(url) .into(img); } public static void loadCircleImg(String url, ImageView img){ Glide.with(img.getContext()) .load(url) .error(R.drawable.tt_default_image_error) .apply(RequestOptions.bitmapTransform(new CircleCrop())) .into(img); } // public static void loadRoundImg(String url, ImageView img,int radius){ // Glide.with(img.getContext()) // .load(url) // // 圆角效果 // .transform(new MultiTransformation(new RoundedCornersTransformation(radius, 0))) // .into(img); // } }
[ "2452862704@qq" ]
2452862704@qq
9086c3d6ff9993ed390fb78f2e9e101e645f2d9b
9d593bf893f1b96496fef3255d5b1c225393a80f
/src/main/java/edu/mvc/exception/InvalidRangeException.java
f4d41369e79928acecddfc5c045617fcf1168f53
[]
no_license
mskalbania/SpringMVCRecap
598a059b0c032c76060d0d46b5b1b35911311b92
a3da95dd5e15af9b3ebdf35a9c7e0114b7eefe38
refs/heads/master
2020-03-25T05:15:52.586358
2018-08-18T22:19:19
2018-08-18T22:19:19
143,437,648
0
0
null
null
null
null
UTF-8
Java
false
false
173
java
package edu.mvc.exception; public class InvalidRangeException extends RuntimeException { public InvalidRangeException(String message) { super(message); } }
[ "cod634.steam@gmail.com" ]
cod634.steam@gmail.com
45209c71fa109a2de656247c3673bb2defa2b477
967208058f403157616911427af2f16218e845e2
/UserService/src/com/timesheet/test/validateToken.java
deef0ba778bac787c2ff1089bbf0b2c930382620
[]
no_license
jayuchonu/TimeSheet
ffbf927bed8d1829e931638fb9f68dcaae350f2c
9a71decde33d6da939bf4cf788b79a038abd2d90
refs/heads/master
2022-11-16T03:14:34.970288
2020-07-07T04:10:55
2020-07-07T04:10:55
277,713,931
0
0
null
2020-07-07T04:11:35
2020-07-07T04:11:34
null
UTF-8
Java
false
false
449
java
package com.timesheet.test; import org.json.JSONObject; import org.junit.jupiter.api.Test; import com.timesheet.dao.UserDaoImpl; class validateToken { @Test void test() { UserDaoImpl dao = new UserDaoImpl(); JSONObject json = new JSONObject(); json.put("username", "supervisor"); json.put("password", "123456"); System.out.println(dao.login(json)); dao.validateToken("supervisor"); System.out.println(dao.CheckRole(json)); } }
[ "67779282+jayuchonu@users.noreply.github.com" ]
67779282+jayuchonu@users.noreply.github.com
709aa37dd7a34fab4a710ba7c1c266eeb5ce82f7
e717a89cbdf8e993dc0a088a2cf137b64cb2dd0c
/impl.sparql/src/main/java/org/apache/clerezza/commons/rdf/impl/sparql/SparqlClient.java
63b00862af27ce1d9871488fec07b8a6b0782dbb
[ "Apache-2.0" ]
permissive
apache/clerezza
5cf8b02ef0a59c057597c8397c295333afbe9a6a
a14071609b751843277e8d0dcc0fb52230a98712
refs/heads/master
2023-08-10T03:59:00.580998
2022-05-19T22:51:02
2022-05-19T22:51:02
1,358,036
23
36
Apache-2.0
2022-05-19T05:34:33
2011-02-12T08:00:07
Java
UTF-8
Java
false
false
2,826
java
/* * Copyright 2015 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.clerezza.commons.rdf.impl.sparql; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.List; import java.util.Map; import org.apache.http.HttpEntity; import org.apache.http.NameValuePair; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpPost; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.message.BasicNameValuePair; import org.apache.http.util.EntityUtils; import org.apache.clerezza.commons.rdf.RDFTerm; import org.apache.clerezza.rdf.core.serializedform.Parser; /** * * @author developer */ public class SparqlClient { final String endpoint; public SparqlClient(final String endpoint) { this.endpoint = endpoint; } public List<Map<String, RDFTerm>> queryResultSet(final String query) throws IOException { return (List<Map<String, RDFTerm>>) queryResult(query); } public Object queryResult(final String query) throws IOException { CloseableHttpClient httpclient = HttpClients.createDefault(); HttpPost httpPost = new HttpPost(endpoint); List<NameValuePair> nvps = new ArrayList<NameValuePair>(); nvps.add(new BasicNameValuePair("query", query)); httpPost.setEntity(new UrlEncodedFormEntity(nvps)); CloseableHttpResponse response2 = httpclient.execute(httpPost); HttpEntity entity2 = response2.getEntity(); try { InputStream in = entity2.getContent(); final String mediaType = entity2.getContentType().getValue(); if (mediaType.startsWith("application/sparql-results+xml")) { return SparqlResultParser.parse(in); } else { //assuming RDF response //FIXME clerezza-core-rdf to clerezza dependency Parser parser = Parser.getInstance(); return parser.parse(in, mediaType); } } finally { EntityUtils.consume(entity2); response2.close(); } } }
[ "hasan@apache.org" ]
hasan@apache.org
884e0e1e2673d360ef4c4aff60a31641a0840cc3
289ae262ecaba900baed93b437f170d79adcb7ca
/Amaysim/src/com/amaysim/shoppingcart/Init.java
a8684199cc91d1183248a257cb1868417c3e58e8
[]
no_license
loidedano/amaysim
f60a83c9f12e5a89a7d2004f91158878bd7ba73e
46ceecb07a25a7ee5f0534aab5a2265800818cbf
refs/heads/master
2021-01-25T07:01:26.917922
2017-02-02T01:54:15
2017-02-02T01:54:15
80,683,718
0
0
null
null
null
null
UTF-8
Java
false
false
4,639
java
package com.amaysim.shoppingcart; import com.amaysim.shoppingcart.impl.*; import com.amaysim.shoppingcart.interfaces.*; import java.util.*; public class Init { public static void drawBorder(){ System.out.println("****************************************************"); } public static void goBackOption(){ System.out.println("Press 0 to go back to main menu..."); } public static void showSpecialOfferConfig(){ drawBorder(); System.out.println("showing settings for special offers..."); for(Map.Entry<Object,Object> prop: SpecialOffersFactory.prop.entrySet()) { String key= prop.getKey().toString(); String value= prop.getValue().toString(); System.out.println("key=" + key + ", value=" + value); } goBackOption(); drawBorder(); } public static void showInventory(){ drawBorder(); System.out.println("showing inventory of products..."); for(Item item: ProductFactory.getAllProducts()) { System.out.println(item); } goBackOption(); drawBorder(); } public static void addProductsMenu(Scanner in, ShoppingCart cart){ drawBorder(); System.out.println("Press corresponding number to add the product..."); int i=0; for(Item item: ProductFactory.getAllProducts()) { System.out.println("Press " + (++i) + " to add " + item.getName()); } goBackOption(); drawBorder(); int option=0; do { option= in.nextInt(); switch ( option ) { case 0: showMainMenu(); break; case 1: System.out.println("Adding 1 GB Data-pack"); cart.add( ProductFactory.getProduct("1gb") ); break; case 2: System.out.println("Adding Unlimited 1GB"); cart.add( ProductFactory.getProduct("ult_small") ); break; case 3: System.out.println("Adding Unlimited 2GB"); cart.add( ProductFactory.getProduct("ult_medium") ); break; case 4: System.out.println("Adding Unlimited 5GB"); cart.add( ProductFactory.getProduct("ult_large") ); break; default: System.err.println( "Unrecognized option" ); break; } }while(option != 0); } public static void showCartContents(ShoppingCart cart){ if(cart.items().isEmpty()) System.out.println("Cart is empty!"); for(Item item: cart.items()){ System.out.println(item); } } public static void getTotalPriceOfCart(ShoppingCart cart){ System.out.println("total price: $" + cart.total()); } public static void inputPromoCode( Scanner in, ShoppingCart cart) { System.out.println("Promo code: "); String inputPromoCode= in.next(); PromoCode promoCode= SpecialOffersFactory.getDefaultPromoCode(); if(promoCode.getCode().equals(inputPromoCode)){ cart.addSpecialOffer(promoCode); System.out.println("Promo code " + inputPromoCode + " accepted"); }else{ System.out.println("Promo code " + inputPromoCode + " rejected"); } } public static void showMainMenu(){ drawBorder(); System.out.println("Welcome to Amaysim Shopping"); System.out.println("Press 1 to show inventory"); System.out.println("Press 2 to start adding products to cart"); System.out.println("Press 3 to show all products in the cart"); System.out.println("Press 4 to calculate total price of the cart"); System.out.println("Press 5 to input promo code"); System.out.println("Press 6 to quit"); drawBorder(); } public static void main(String[] args) { Scanner in = new Scanner ( System.in ); ShoppingCart cart= new DefaultShoppingCart(); cart.addSpecialOffer(SpecialOffersFactory.getDefaultFreeAWithEveryBSold()); cart.addSpecialOffer(SpecialOffersFactory.getDefaultBuyMPayForNDeal()); cart.addSpecialOffer(SpecialOffersFactory.getDefaultBulkDiscountDeal()); showMainMenu(); int option= 0; do { option= in.nextInt(); switch ( option ) { case 0: showMainMenu(); break; case 1: showInventory(); break; case 2: addProductsMenu(in, cart); break; case 3: showCartContents(cart); break; case 4: getTotalPriceOfCart(cart); break; case 5: inputPromoCode(in, cart); break; case 6: System.out.println( "Good Bye" ); break; default: System.err.println( "Unrecognized option" ); break; } }while(option != 6); System.exit(0); } }
[ "noreply@github.com" ]
noreply@github.com
b336ac5199f4f2e8a08eed5c04443fe588e12d64
c3dd4ed8963ac8e138030d3537ba0479c43cba40
/app/src/main/java/com/tanishqmittal/guesscelebrityapplication/MainActivity.java
04dd71c90fd115350514349627ec201576ac62fe
[]
no_license
tanishq007/GuessCelebrityApplication
c9ce9d5c0d6c4314a88c18ed8cf1ae71828e1980
de4cc22347209a4a0d8a058c901dc6eeed264af7
refs/heads/master
2020-03-23T08:38:02.090464
2018-07-17T20:03:33
2018-07-17T20:03:33
141,337,815
0
0
null
null
null
null
UTF-8
Java
false
false
6,028
java
package com.tanishqmittal.guesscelebrityapplication; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.AsyncTask; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.ImageView; import android.widget.Toast; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; import java.util.Random; import java.util.concurrent.ExecutionException; import java.util.regex.Matcher; import java.util.regex.Pattern; public class MainActivity extends AppCompatActivity { ImageView imageView; String[] imagesArray = new String[100]; String[] namesArray = new String[100]; Button btn1; Button btn2; Button btn3; Button btn4; Button all[] = new Button[4]; int correctButton = -1; int totalNames = -1; public class DownloadImage extends AsyncTask<String, Void, Bitmap> { @Override protected Bitmap doInBackground(String... urls) { try { URL url = new URL(urls[0]); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.connect(); InputStream inputStream = connection.getInputStream(); Bitmap myBitmap = BitmapFactory.decodeStream(inputStream); return myBitmap; } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return null; } } public class DownloadTask extends AsyncTask<String, Void, String> { @Override protected String doInBackground(String... urls) { try { String result = ""; URL url = new URL(urls[0]); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); //connection.connect(); InputStream inputStream = connection.getInputStream(); InputStreamReader reader = new InputStreamReader(inputStream); int data = reader.read(); while(data != -1) { char current = (char) data; result += current; data = reader.read(); } return result; } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return null; } } public int getRandomNumber(int a, int b) { Random rand = new Random(); int n = rand.nextInt(a); if(n == b) { if(n == totalNames) { return n - 1; } else { return n + 1; } } return n; } public void getName(int i) { // setting right option int n = getRandomNumber(4, -1); all[n].setText(namesArray[i]); correctButton = n; // setting wrong options int a = 4; while(a != 0) { if( a == n + 1) { a--; continue; } int b = getRandomNumber(totalNames, i); all[a - 1].setText(namesArray[b]); a--; } } public void getImage() { int i = getRandomNumber(totalNames, -1); DownloadImage image = new DownloadImage(); Bitmap myBitmap; try { myBitmap = image.execute(imagesArray[i]).get(); imageView.setImageBitmap(myBitmap); } catch (InterruptedException e) { e.printStackTrace(); } catch (ExecutionException e) { e.printStackTrace(); } getName(i); } public void buttonPressed(View view) { Button btn = (Button) findViewById(view.getId()); //String text = btn.getText().toString(); if(btn == all[correctButton]) { Toast.makeText(this, "Correct Answer !", Toast.LENGTH_SHORT).show(); getImage(); } else { Toast.makeText(this, "Wrong ! Correct ans is " + all[correctButton].getText(), Toast.LENGTH_SHORT).show(); getImage(); } //Log.i("Button Pressed", text); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); btn1 = (Button) findViewById(R.id.button1); btn2 = (Button) findViewById(R.id.button2); btn3 = (Button) findViewById(R.id.button3); btn4 = (Button) findViewById(R.id.button4); all[0] = btn1; all[1] = btn2; all[2] = btn3; all[3] = btn4; imageView = (ImageView) findViewById(R.id.imageView); DownloadTask task = new DownloadTask(); try { String result = task.execute("http://www.posh24.se/kandisar").get(); Pattern p = Pattern.compile("<img src=\"(.*?)\" alt="); Matcher m = p.matcher(result); int i = 0; while(m.find()) { imagesArray[i++] = m.group(1); Log.i("ImagesURL", m.group(1)); } totalNames = i; p = Pattern.compile("alt=\"(.*?)\"/>"); m = p.matcher(result); i = 0; while(m.find()) { namesArray[i++] = m.group(1); Log.i("Names", m.group(1)); } //Log.i("WEB CONTENT", result); } catch (InterruptedException e) { e.printStackTrace(); } catch (ExecutionException e) { e.printStackTrace(); } getImage(); } }
[ "tanishqmittal@Tanishqs-MacBook-Air.local" ]
tanishqmittal@Tanishqs-MacBook-Air.local
aa7af487dec2ea8787d936b9998cc4c34fdf0538
356f0fe1f185cfd63fed4a396b6eafcb105864a4
/server-container/src/main/java/com/hazelcast/remotecontroller/Member.java
aa09a98b7d688b0164228b763ab4dc7d1e67d5d6
[ "Apache-2.0" ]
permissive
cangencer/hazelcast-remote-controller
a53e510c5529afbdb55e561f03a11fcf19d4b8a1
4c4aacb2033340023a35e2dbf72d9aee7bc9200c
refs/heads/master
2020-12-28T21:27:58.496518
2016-05-06T08:21:16
2016-05-06T08:21:16
58,191,907
0
0
null
2016-05-06T08:15:07
2016-05-06T08:15:07
null
UTF-8
Java
false
true
17,711
java
/** * Autogenerated by Thrift Compiler (0.9.3) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package com.hazelcast.remotecontroller; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; import org.apache.thrift.scheme.TupleScheme; import org.apache.thrift.protocol.TTupleProtocol; import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; import org.apache.thrift.async.AsyncMethodCallback; import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.EnumMap; import java.util.Set; import java.util.HashSet; import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) @Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-03-29") public class Member implements org.apache.thrift.TBase<Member, Member._Fields>, java.io.Serializable, Cloneable, Comparable<Member> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Member"); private static final org.apache.thrift.protocol.TField UUID_FIELD_DESC = new org.apache.thrift.protocol.TField("uuid", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField HOST_FIELD_DESC = new org.apache.thrift.protocol.TField("host", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("port", org.apache.thrift.protocol.TType.I32, (short)3); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new MemberStandardSchemeFactory()); schemes.put(TupleScheme.class, new MemberTupleSchemeFactory()); } public String uuid; // required public String host; // required public int port; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { UUID((short)1, "uuid"), HOST((short)2, "host"), PORT((short)3, "port"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // UUID return UUID; case 2: // HOST return HOST; case 3: // PORT return PORT; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __PORT_ISSET_ID = 0; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.UUID, new org.apache.thrift.meta_data.FieldMetaData("uuid", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.HOST, new org.apache.thrift.meta_data.FieldMetaData("host", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PORT, new org.apache.thrift.meta_data.FieldMetaData("port", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Member.class, metaDataMap); } public Member() { } public Member( String uuid, String host, int port) { this(); this.uuid = uuid; this.host = host; this.port = port; setPortIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public Member(Member other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetUuid()) { this.uuid = other.uuid; } if (other.isSetHost()) { this.host = other.host; } this.port = other.port; } public Member deepCopy() { return new Member(this); } @Override public void clear() { this.uuid = null; this.host = null; setPortIsSet(false); this.port = 0; } public String getUuid() { return this.uuid; } public Member setUuid(String uuid) { this.uuid = uuid; return this; } public void unsetUuid() { this.uuid = null; } /** Returns true if field uuid is set (has been assigned a value) and false otherwise */ public boolean isSetUuid() { return this.uuid != null; } public void setUuidIsSet(boolean value) { if (!value) { this.uuid = null; } } public String getHost() { return this.host; } public Member setHost(String host) { this.host = host; return this; } public void unsetHost() { this.host = null; } /** Returns true if field host is set (has been assigned a value) and false otherwise */ public boolean isSetHost() { return this.host != null; } public void setHostIsSet(boolean value) { if (!value) { this.host = null; } } public int getPort() { return this.port; } public Member setPort(int port) { this.port = port; setPortIsSet(true); return this; } public void unsetPort() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID); } /** Returns true if field port is set (has been assigned a value) and false otherwise */ public boolean isSetPort() { return EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID); } public void setPortIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case UUID: if (value == null) { unsetUuid(); } else { setUuid((String)value); } break; case HOST: if (value == null) { unsetHost(); } else { setHost((String)value); } break; case PORT: if (value == null) { unsetPort(); } else { setPort((Integer)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case UUID: return getUuid(); case HOST: return getHost(); case PORT: return getPort(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case UUID: return isSetUuid(); case HOST: return isSetHost(); case PORT: return isSetPort(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof Member) return this.equals((Member)that); return false; } public boolean equals(Member that) { if (that == null) return false; boolean this_present_uuid = true && this.isSetUuid(); boolean that_present_uuid = true && that.isSetUuid(); if (this_present_uuid || that_present_uuid) { if (!(this_present_uuid && that_present_uuid)) return false; if (!this.uuid.equals(that.uuid)) return false; } boolean this_present_host = true && this.isSetHost(); boolean that_present_host = true && that.isSetHost(); if (this_present_host || that_present_host) { if (!(this_present_host && that_present_host)) return false; if (!this.host.equals(that.host)) return false; } boolean this_present_port = true; boolean that_present_port = true; if (this_present_port || that_present_port) { if (!(this_present_port && that_present_port)) return false; if (this.port != that.port) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_uuid = true && (isSetUuid()); list.add(present_uuid); if (present_uuid) list.add(uuid); boolean present_host = true && (isSetHost()); list.add(present_host); if (present_host) list.add(host); boolean present_port = true; list.add(present_port); if (present_port) list.add(port); return list.hashCode(); } @Override public int compareTo(Member other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetUuid()).compareTo(other.isSetUuid()); if (lastComparison != 0) { return lastComparison; } if (isSetUuid()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uuid, other.uuid); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetHost()).compareTo(other.isSetHost()); if (lastComparison != 0) { return lastComparison; } if (isSetHost()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.host, other.host); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPort()).compareTo(other.isSetPort()); if (lastComparison != 0) { return lastComparison; } if (isSetPort()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.port, other.port); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("Member("); boolean first = true; sb.append("uuid:"); if (this.uuid == null) { sb.append("null"); } else { sb.append(this.uuid); } first = false; if (!first) sb.append(", "); sb.append("host:"); if (this.host == null) { sb.append("null"); } else { sb.append(this.host); } first = false; if (!first) sb.append(", "); sb.append("port:"); sb.append(this.port); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class MemberStandardSchemeFactory implements SchemeFactory { public MemberStandardScheme getScheme() { return new MemberStandardScheme(); } } private static class MemberStandardScheme extends StandardScheme<Member> { public void read(org.apache.thrift.protocol.TProtocol iprot, Member struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // UUID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.uuid = iprot.readString(); struct.setUuidIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // HOST if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.host = iprot.readString(); struct.setHostIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // PORT if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.port = iprot.readI32(); struct.setPortIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, Member struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.uuid != null) { oprot.writeFieldBegin(UUID_FIELD_DESC); oprot.writeString(struct.uuid); oprot.writeFieldEnd(); } if (struct.host != null) { oprot.writeFieldBegin(HOST_FIELD_DESC); oprot.writeString(struct.host); oprot.writeFieldEnd(); } oprot.writeFieldBegin(PORT_FIELD_DESC); oprot.writeI32(struct.port); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class MemberTupleSchemeFactory implements SchemeFactory { public MemberTupleScheme getScheme() { return new MemberTupleScheme(); } } private static class MemberTupleScheme extends TupleScheme<Member> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, Member struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetUuid()) { optionals.set(0); } if (struct.isSetHost()) { optionals.set(1); } if (struct.isSetPort()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetUuid()) { oprot.writeString(struct.uuid); } if (struct.isSetHost()) { oprot.writeString(struct.host); } if (struct.isSetPort()) { oprot.writeI32(struct.port); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, Member struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.uuid = iprot.readString(); struct.setUuidIsSet(true); } if (incoming.get(1)) { struct.host = iprot.readString(); struct.setHostIsSet(true); } if (incoming.get(2)) { struct.port = iprot.readI32(); struct.setPortIsSet(true); } } } }
[ "arslanasim@gmail.com" ]
arslanasim@gmail.com
bf3ab8b321e8ef59b8a4efc42fb4f8cd46e43426
ead6759b7a90219653f23ee1b32228f584f38868
/AcademyTestWeb/src/com/softserve/academy/test/DAO/Main.java
1a1bc1a777252f9e93d4fe2b8ed427c65c0ee3ba
[]
no_license
Entro-yuhim/com.softserve.academy
aaa345b80a10d4e459e065f8673cdb30e52c732a
4711541c5b2944e7bf62e5a32130e4175d012b4d
refs/heads/master
2021-01-01T06:54:17.489316
2015-04-10T14:01:54
2015-04-10T14:01:54
32,314,214
1
0
null
null
null
null
UTF-8
Java
false
false
419
java
//package com.softserve.academy.test.DAO; // //import com.softserve.academy.test.model.entity.Competition; //import com.softserve.academy.test.model.entity.Problem; //import com.softserve.academy.test.service.CompetitionService; //import com.softserve.academy.test.service.CompetitionServiceImpl; // //public class Main { // // public static void main(String[] args) { // HibernateUtil.shutdown(); // } //}
[ "did.yuhim@gmail.com" ]
did.yuhim@gmail.com
143636a08e362cdb1aaad4d6c93e822e7f2dad1d
1a781e8ee8d411655dfd9e292450a4896de53563
/sdk/src/main/java/io/dapr/client/DaprApiProtocol.java
84eb1d77e63440ff0e12820d2a9f3e5053ca2423
[ "MIT" ]
permissive
96RadhikaJadhav/java-sdk
421c726199962f190ec6d0664125858f916d1b27
3918db1758a995e65d4b39b3f3dd342a828fb058
refs/heads/master
2023-02-28T17:36:21.174638
2021-01-31T03:27:26
2021-01-31T03:27:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
219
java
/* * Copyright (c) Microsoft Corporation. * Licensed under the MIT License. */ package io.dapr.client; /** * Transport protocol for Dapr's API. */ public enum DaprApiProtocol { GRPC, HTTP }
[ "noreply@github.com" ]
noreply@github.com
8f57fc870392f0e40441368637d1a2a0b1abbc4a
08798b2882b5876a6630076477f5718d2ecc6116
/kronos-core-cloud/src/main/java/com/arrow/kronos/data/LastTelemetryCreated.java
a9a7762c234ddb3e1480f2bb7d14891230f80871
[ "Apache-2.0" ]
permissive
konexios/moonstone
8c5d4dc035c586204bc996582f0f176b50e64919
47f7b874e68833e19314dd9bc5fdf1755a82a42f
refs/heads/master
2023-01-20T18:41:36.646922
2019-11-12T20:44:59
2019-11-12T20:44:59
195,619,626
4
1
Apache-2.0
2023-01-12T11:50:07
2019-07-07T06:50:12
Java
UTF-8
Java
false
false
790
java
package com.arrow.kronos.data; import java.io.Serializable; import java.time.Instant; import org.springframework.data.annotation.Id; import org.springframework.data.mongodb.core.mapping.Field; public class LastTelemetryCreated implements Serializable { private static final long serialVersionUID = -4474798997944591222L; @Id private String name; @Field private Instant value; public LastTelemetryCreated withName(String name) { setName(name); return this; } public LastTelemetryCreated withValue(Instant value) { setValue(value); return this; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Instant getValue() { return value; } public void setValue(Instant value) { this.value = value; } }
[ "tam.nguyen1@arrow.com" ]
tam.nguyen1@arrow.com
a790682eedfa1012fc6ff8243599edb54891cc6e
6dd692d65d65202702fe7b89dc3f07a3a704b893
/src/main/java/org/corporateforce/server/model/Answers.java
dd324c45195d5ac22d0e8e12cb06a5acd259abdf
[]
no_license
Whorehouse/CorporateForce_Trainings
fcbcda14988587bfe43e4789557446639e789979
d02bc0fce7ef77f23026a655f1ca51e58b10ce14
refs/heads/master
2021-01-23T21:38:05.235330
2015-05-27T14:27:15
2015-05-27T14:27:15
28,057,719
0
0
null
null
null
null
UTF-8
Java
false
false
1,922
java
package org.corporateforce.server.model; // Generated 25.12.2014 2:00:33 by Hibernate Tools 4.3.1 import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import static javax.persistence.GenerationType.IDENTITY; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; import org.codehaus.jackson.annotate.JsonIgnoreProperties; /** * Tutorials generated by hbm2java */ @Entity @Table(name = "answers", catalog = "corporateforce") @JsonIgnoreProperties({"hibernateLazyInitializer", "handler"}) public class Answers implements java.io.Serializable { /** * */ private static final long serialVersionUID = 1L; private Integer id; private Questions questions; private String body; private boolean correct; public Answers() { } public Answers(Questions questions, String body, boolean correct) { this.questions = questions; this.body = body; this.correct = correct; } @Id @GeneratedValue(strategy = IDENTITY) @Column(name = "ID", unique = true, nullable = false) public Integer getId() { return this.id; } public void setId(Integer id) { this.id = id; } @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "QUESTION", nullable = false) public Questions getQuestions() { return this.questions; } public void setQuestions(Questions questions) { this.questions = questions; } @Column(name = "BODY", nullable = false, length = 16777215) public String getBody() { return this.body; } public void setBody(String body) { this.body = body; } @Column(name = "CORRECT", nullable = false) public boolean isCorrect() { return correct; } public void setCorrect(boolean correct) { this.correct = correct; } }
[ "veress.honaht@gmail.com" ]
veress.honaht@gmail.com
8b7b1093e93adceeabf4a2a92565a33d2217f281
6b13903a0d2c77b6721891a6edc0d754c5f76ec3
/playercore/src/main/java/com/scaine/playercore/HeartCore.java
2b95fb5320e6f40af50acb0dd81c44f79149ea55
[]
no_license
jeffchao98/empty-test-repo
5bcf4c7a80bb5bdd6cb754339a479a73071c999b
0bb5da467212347b79b34b976ad39b82436c14e2
refs/heads/master
2020-12-30T01:53:37.621497
2020-02-07T05:53:22
2020-02-07T05:53:22
238,820,531
0
0
null
null
null
null
UTF-8
Java
false
false
951
java
package com.scaine.playercore; import com.bumptech.glide.request.RequestOptions; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; public class HeartCore { String defaultJson = "{\"user-name\":\"default-name\", \"player-state\":\"inactive\", " + "\"player-type\":\"unknown\", \"player-level\":-1}"; public HeartCore() { } CoreData getData() { RequestOptions requestOptions = new RequestOptions().override(30); return new Gson().fromJson(defaultJson, new TypeToken<CoreData>() { }.getType()); } public HeartCore(String setupContent) { defaultJson = setupContent; } public String getName() { return getData().name; } public String getState() { return getData().state; } public int getLevel() { return getData().level; } public String getType() { return getData().type; } }
[ "leo@ekohe.com" ]
leo@ekohe.com
da32002b49db20f9f9f4e33b0a038db65ec76b20
2b05eaad6f4d333b50be5c08cecdd32342c3c74b
/hrms/src/main/java/kodlamaio/hrms/core/verification/VerificationManager.java
416a74844bfbe0407eec6476dfa291e0a53e4fc6
[]
no_license
MAkifUNLU/HumanResourceManagementSystem
53823e8235a284018261e67b90e09e229961c9e4
396d6006e17b57ec3aaf0272d366d9f66111d9fc
refs/heads/main
2023-05-10T15:08:00.463093
2021-06-17T14:24:01
2021-06-17T14:24:01
372,625,891
3
0
null
null
null
null
UTF-8
Java
false
false
740
java
package kodlamaio.hrms.core.verification; import java.util.UUID; import org.springframework.stereotype.Service; @Service public class VerificationManager implements VerificationService{ @Override public void sendLink(String email) { UUID uuid = UUID.randomUUID(); String verificationLink = "https://hrmsverificationmail/" + uuid.toString(); System.out.println("Verification link has been sent to " + email ); System.out.println("Please click on the link to verify your account: " + verificationLink ); } @Override public String sendCode() { UUID uuid = UUID.randomUUID(); String verificationCode = uuid.toString(); System.out.println("Your activation code: " + verificationCode ); return verificationCode; } }
[ "77721632+MAkifUNLU@users.noreply.github.com" ]
77721632+MAkifUNLU@users.noreply.github.com
3d5668004759e96fbf7b1b1fe4c229e1a894edf5
9058ed37f8681fdfa2e8dc80c7b0a52ac7bdc4dc
/java/src/jp/digitalmuseum/kinect/Joint.java
33de36c0c5a2141d7643e072183bf200f3263796
[ "Apache-2.0" ]
permissive
arcatdmz/kinect-thrift-server
eebf9509cf897849e8cadec384ab8fbf17534c6e
7c307795bf40a35c7a836842cce0a22d0609eee7
refs/heads/master
2021-01-13T02:15:15.335718
2013-04-07T14:35:20
2013-04-07T14:35:20
8,335,173
1
0
null
null
null
null
UTF-8
Java
false
true
18,157
java
/** * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package jp.digitalmuseum.kinect; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; import org.apache.thrift.scheme.TupleScheme; import org.apache.thrift.protocol.TTupleProtocol; import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.EnumMap; import java.util.Set; import java.util.HashSet; import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class Joint implements org.apache.thrift.TBase<Joint, Joint._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Joint"); private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)1); private static final org.apache.thrift.protocol.TField POSITION_FIELD_DESC = new org.apache.thrift.protocol.TField("position", org.apache.thrift.protocol.TType.STRUCT, (short)2); private static final org.apache.thrift.protocol.TField SCREEN_POSITION_FIELD_DESC = new org.apache.thrift.protocol.TField("screenPosition", org.apache.thrift.protocol.TType.STRUCT, (short)3); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new JointStandardSchemeFactory()); schemes.put(TupleScheme.class, new JointTupleSchemeFactory()); } /** * * @see JointType */ public JointType type; // required public Position3D position; // required public Position2D screenPosition; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * * @see JointType */ TYPE((short)1, "type"), POSITION((short)2, "position"), SCREEN_POSITION((short)3, "screenPosition"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // TYPE return TYPE; case 2: // POSITION return POSITION; case 3: // SCREEN_POSITION return SCREEN_POSITION; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, JointType.class))); tmpMap.put(_Fields.POSITION, new org.apache.thrift.meta_data.FieldMetaData("position", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Position3D.class))); tmpMap.put(_Fields.SCREEN_POSITION, new org.apache.thrift.meta_data.FieldMetaData("screenPosition", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Position2D.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Joint.class, metaDataMap); } public Joint() { } public Joint( JointType type, Position3D position, Position2D screenPosition) { this(); this.type = type; this.position = position; this.screenPosition = screenPosition; } /** * Performs a deep copy on <i>other</i>. */ public Joint(Joint other) { if (other.isSetType()) { this.type = other.type; } if (other.isSetPosition()) { this.position = new Position3D(other.position); } if (other.isSetScreenPosition()) { this.screenPosition = new Position2D(other.screenPosition); } } public Joint deepCopy() { return new Joint(this); } @Override public void clear() { this.type = null; this.position = null; this.screenPosition = null; } /** * * @see JointType */ public JointType getType() { return this.type; } /** * * @see JointType */ public Joint setType(JointType type) { this.type = type; return this; } public void unsetType() { this.type = null; } /** Returns true if field type is set (has been assigned a value) and false otherwise */ public boolean isSetType() { return this.type != null; } public void setTypeIsSet(boolean value) { if (!value) { this.type = null; } } public Position3D getPosition() { return this.position; } public Joint setPosition(Position3D position) { this.position = position; return this; } public void unsetPosition() { this.position = null; } /** Returns true if field position is set (has been assigned a value) and false otherwise */ public boolean isSetPosition() { return this.position != null; } public void setPositionIsSet(boolean value) { if (!value) { this.position = null; } } public Position2D getScreenPosition() { return this.screenPosition; } public Joint setScreenPosition(Position2D screenPosition) { this.screenPosition = screenPosition; return this; } public void unsetScreenPosition() { this.screenPosition = null; } /** Returns true if field screenPosition is set (has been assigned a value) and false otherwise */ public boolean isSetScreenPosition() { return this.screenPosition != null; } public void setScreenPositionIsSet(boolean value) { if (!value) { this.screenPosition = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case TYPE: if (value == null) { unsetType(); } else { setType((JointType)value); } break; case POSITION: if (value == null) { unsetPosition(); } else { setPosition((Position3D)value); } break; case SCREEN_POSITION: if (value == null) { unsetScreenPosition(); } else { setScreenPosition((Position2D)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case TYPE: return getType(); case POSITION: return getPosition(); case SCREEN_POSITION: return getScreenPosition(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case TYPE: return isSetType(); case POSITION: return isSetPosition(); case SCREEN_POSITION: return isSetScreenPosition(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof Joint) return this.equals((Joint)that); return false; } public boolean equals(Joint that) { if (that == null) return false; boolean this_present_type = true && this.isSetType(); boolean that_present_type = true && that.isSetType(); if (this_present_type || that_present_type) { if (!(this_present_type && that_present_type)) return false; if (!this.type.equals(that.type)) return false; } boolean this_present_position = true && this.isSetPosition(); boolean that_present_position = true && that.isSetPosition(); if (this_present_position || that_present_position) { if (!(this_present_position && that_present_position)) return false; if (!this.position.equals(that.position)) return false; } boolean this_present_screenPosition = true && this.isSetScreenPosition(); boolean that_present_screenPosition = true && that.isSetScreenPosition(); if (this_present_screenPosition || that_present_screenPosition) { if (!(this_present_screenPosition && that_present_screenPosition)) return false; if (!this.screenPosition.equals(that.screenPosition)) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(Joint other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; Joint typedOther = (Joint)other; lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType()); if (lastComparison != 0) { return lastComparison; } if (isSetType()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPosition()).compareTo(typedOther.isSetPosition()); if (lastComparison != 0) { return lastComparison; } if (isSetPosition()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.position, typedOther.position); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetScreenPosition()).compareTo(typedOther.isSetScreenPosition()); if (lastComparison != 0) { return lastComparison; } if (isSetScreenPosition()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.screenPosition, typedOther.screenPosition); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("Joint("); boolean first = true; sb.append("type:"); if (this.type == null) { sb.append("null"); } else { sb.append(this.type); } first = false; if (!first) sb.append(", "); sb.append("position:"); if (this.position == null) { sb.append("null"); } else { sb.append(this.position); } first = false; if (!first) sb.append(", "); sb.append("screenPosition:"); if (this.screenPosition == null) { sb.append("null"); } else { sb.append(this.screenPosition); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields if (type == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' was not present! Struct: " + toString()); } if (position == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'position' was not present! Struct: " + toString()); } if (screenPosition == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'screenPosition' was not present! Struct: " + toString()); } // check for sub-struct validity if (position != null) { position.validate(); } if (screenPosition != null) { screenPosition.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class JointStandardSchemeFactory implements SchemeFactory { public JointStandardScheme getScheme() { return new JointStandardScheme(); } } private static class JointStandardScheme extends StandardScheme<Joint> { public void read(org.apache.thrift.protocol.TProtocol iprot, Joint struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.type = JointType.findByValue(iprot.readI32()); struct.setTypeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // POSITION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.position = new Position3D(); struct.position.read(iprot); struct.setPositionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // SCREEN_POSITION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.screenPosition = new Position2D(); struct.screenPosition.read(iprot); struct.setScreenPositionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, Joint struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.type != null) { oprot.writeFieldBegin(TYPE_FIELD_DESC); oprot.writeI32(struct.type.getValue()); oprot.writeFieldEnd(); } if (struct.position != null) { oprot.writeFieldBegin(POSITION_FIELD_DESC); struct.position.write(oprot); oprot.writeFieldEnd(); } if (struct.screenPosition != null) { oprot.writeFieldBegin(SCREEN_POSITION_FIELD_DESC); struct.screenPosition.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class JointTupleSchemeFactory implements SchemeFactory { public JointTupleScheme getScheme() { return new JointTupleScheme(); } } private static class JointTupleScheme extends TupleScheme<Joint> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, Joint struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeI32(struct.type.getValue()); struct.position.write(oprot); struct.screenPosition.write(oprot); } @Override public void read(org.apache.thrift.protocol.TProtocol prot, Joint struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.type = JointType.findByValue(iprot.readI32()); struct.setTypeIsSet(true); struct.position = new Position3D(); struct.position.read(iprot); struct.setPositionIsSet(true); struct.screenPosition = new Position2D(); struct.screenPosition.read(iprot); struct.setScreenPositionIsSet(true); } } }
[ "i@junkato.jp" ]
i@junkato.jp
34fc78a5656a94d9e82b8bf9720c4a692af5817c
c7e9ca8464818f0d3301dbb75e7dde3377993860
/Practice48/src/p47/LectureManager.java
1c02f8aaf5c3b004aec9c3bcf46d272ac511dc6d
[]
no_license
seo-hyeon/WebProgramming
8074bebca06c4f6c228d7431fc667d313e37e5dd
28e76a9c43e55c926d4d52635971481dbae68bec
refs/heads/master
2020-08-07T10:06:40.125120
2020-01-10T15:54:12
2020-01-10T15:54:12
213,405,450
0
0
null
null
null
null
UTF-8
Java
false
false
1,081
java
package p47; import java.util.ArrayList; import java.util.List; import p47.LectureBean; public class LectureManager { List<LectureBean>lectureList = new ArrayList<LectureBean>(); private static final int times = 6; private static final int days = 5; public int[][] typeMatrix = new int[times][days]; public int[][] titleMatrix = new int[times][days]; public int[][] spanMatrix = new int[times][days]; public void add(LectureBean lbean) { lectureList.add(lbean); } public List<LectureBean> getLectureList() { return lectureList; } public void buildMatrix() { int d, t, s; for (int i = 0; i < times; i++) { for (int j = 0; j < days; j++) { titleMatrix[i][j] = -1; spanMatrix[i][j] = 1; } } for (LectureBean lb : getLectureList()) { d = lb.getDay(); t = lb.getTime() - 1; typeMatrix[t][d] = lb.getType() + 1; titleMatrix[t][d] = lb.getTitle(); spanMatrix[t][d] = lb.getConsecutive(); if ((s = spanMatrix[t][d]) != 1) { for (int i = 1; i < s; i++) { spanMatrix[t + i][d] = 0; } } } } }
[ "nabibaby@naver.com" ]
nabibaby@naver.com
bfebd376dea7cc9c1dad3aec656d36308022dd22
f78dfc24a598373691921644cd4f6a4935934cdc
/app/src/main/java/dev/jibovico/apps/sharem/misc/PermissionUtil.java
1bd0efaf178111c3a971c91021b8c53c53524633
[ "MIT", "Apache-2.0" ]
permissive
poolooloo/simple-share-android
b833ca06797d4c2ae54e3fb2b190f371de17c0eb
dcb054c86d075d9e3784518abed9184036b4541d
refs/heads/master
2021-06-20T18:41:51.411346
2017-07-25T01:58:00
2017-07-25T01:58:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,434
java
/* * Copyright 2015 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package dev.jibovico.apps.sharem.misc; import android.Manifest; import android.app.Activity; import android.content.pm.PackageManager; import android.support.v4.app.ActivityCompat; import android.support.v4.content.ContextCompat; import android.support.v7.app.AppCompatActivity; /** * Utility class that wraps access to the runtime permissions API in M and provides basic helper * methods. */ public class PermissionUtil { /** * Check that all given permissions have been granted by verifying that each entry in the * given array is of the value {@link PackageManager#PERMISSION_GRANTED}. * * @see Activity#onRequestPermissionsResult(int, String[], int[]) */ public static boolean verifyPermissions(int[] grantResults) { // At least one result must be checked. if(grantResults.length < 1){ return false; } // Verify that each required permission has been granted, otherwise return false. for (int result : grantResults) { if (result != PackageManager.PERMISSION_GRANTED) { return false; } } return true; } /** * Returns true if the Activity has access to a all given permission. */ public static boolean hasPermission(AppCompatActivity activity, String... permissions) { for (String permission : permissions) { if (ContextCompat.checkSelfPermission(activity, permission) != PackageManager.PERMISSION_GRANTED) { return false; } } return true; } public static boolean hasStoragePermission(Activity activity){ return ActivityCompat.checkSelfPermission(activity, Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED; } }
[ "abdullahbilal88@gmail.com" ]
abdullahbilal88@gmail.com
e7eae1324a9b3505090e5e258c7cb1d7abf4f257
bded20287e2acf2ed4dfbe0ba945d985d564edb4
/FunctionalInterfaces/FunctionalInterfacesBook/CH12/Sect9a_Ex5.java
878bfdde797ca642b9b62ce44993dc7ee9129eb3
[]
no_license
akudrin/Java-Code-Samples
a80549cc8708aedfa49fed02f270f81c8a9a3a22
f82003e54c46a2ce047fd9a7b02d786f943b35f6
refs/heads/master
2021-06-03T10:02:53.119756
2020-09-28T15:45:55
2020-09-28T15:45:55
145,375,940
0
0
null
null
null
null
UTF-8
Java
false
false
349
java
package chapter12; import java.util.stream.*; public class Sect9a_Ex5 { public static void main(String[] args) { String s = Stream.of("RED", "GREEN", "BLUE") // Stream<String> .collect(Collectors.joining(",")); // String System.out.println(s); // Prints RED,GREEN,BLUE } }
[ "andreikudrin@gmail.com" ]
andreikudrin@gmail.com
d2a7c905de50aa40bce8e7a7e9f28cb8e8c2e435
94cdc4f0352a7048d3379a6d50e701a7f76998d2
/app/src/androidTest/java/com/l900/master/ExampleInstrumentedTest.java
a523293a48ee2dbeb468865dc1eb1288fe00afb4
[]
no_license
fidx/l900Master
94537704bed92442e01ce48dc21e63cdcafa7696
ec582e01497ad7d2c9c439d7e8c707807d6ac436
refs/heads/master
2020-08-30T18:06:52.851089
2020-08-04T03:40:21
2020-08-04T03:40:21
218,453,250
1
0
null
null
null
null
UTF-8
Java
false
false
701
java
package com.l900.master; import android.content.Context; import androidx.test.InstrumentationRegistry; import androidx.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("com.l900.master", appContext.getPackageName()); } }
[ "1357114293@qq.com" ]
1357114293@qq.com
3773cb9e811dc63408572a4de81d8ce6c551f02a
43f89c7ea961f24d7255aa967c149353a32b8e18
/jode/output/com/strobel/assembler/metadata/ConversionType.java
6394c3e4beda6696b87fab0698bfbda4c35322b0
[]
no_license
Neumann789/springboot-learn
43ae3550c3b8237b261c72225dafed76dcf4cf2c
2e1fb8fb60bb07d5a3dff765d9d82a4d7e0e6d17
refs/heads/master
2022-12-21T09:06:07.587918
2018-04-05T00:45:22
2018-04-05T00:45:22
97,288,751
1
0
null
2022-12-16T07:56:00
2017-07-15T03:08:50
Java
UTF-8
Java
false
false
1,104
java
/* ConversionType - Decompiled by JODE * Visit http://jode.sourceforge.net/ */ package com.strobel.assembler.metadata; public final class ConversionType extends Enum { public static final ConversionType IDENTITY = new ConversionType("IDENTITY", 0); public static final ConversionType IMPLICIT = new ConversionType("IMPLICIT", 1); public static final ConversionType EXPLICIT = new ConversionType("EXPLICIT", 2); public static final ConversionType EXPLICIT_TO_UNBOXED = new ConversionType("EXPLICIT_TO_UNBOXED", 3); public static final ConversionType NONE = new ConversionType("NONE", 4); /*synthetic*/ private static final ConversionType[] $VALUES = { IDENTITY, IMPLICIT, EXPLICIT, EXPLICIT_TO_UNBOXED, NONE }; public static ConversionType[] values() { return (ConversionType[]) $VALUES.clone(); } public static ConversionType valueOf(String name) { return (ConversionType) Enum.valueOf(ConversionType.class, name); } private ConversionType(String string, int i) { super(string, i); } }
[ "test@test.com" ]
test@test.com
ccaf007f73880946056bfea4ba1636013fb75e9d
f4bac06fcad6ca5014363bdf2262d324a4ee1722
/ksml/src/main/java/io/axual/ksml/parser/OuterJoinOperationParser.java
b36aca68809498da9187e72caf5f87281c83e72e
[ "Apache-2.0", "EPL-2.0", "CDDL-1.0", "MIT", "LicenseRef-scancode-unicode-icu-58", "BSD-3-Clause", "LicenseRef-scancode-unicode", "LGPL-2.0-or-later", "EPL-1.0", "LGPL-2.1-only", "Classpath-exception-2.0", "GPL-2.0-only", "LicenseRef-scancode-public-domain", "BSD-2-Clause" ]
permissive
netgio/ksml
a1c2d6c254013c8bfbe23c8c898cfc69f2f37ffa
fcf2b2ad5a6265978fb6358f41b45baf8d31f310
refs/heads/main
2023-04-20T22:06:24.195342
2021-05-17T12:03:30
2021-05-17T12:03:30
368,169,564
0
0
Apache-2.0
2021-05-17T12:01:22
2021-05-17T12:01:22
null
UTF-8
Java
false
false
1,860
java
package io.axual.ksml.parser; /*- * ========================LICENSE_START================================= * KSML * %% * Copyright (C) 2021 Axual B.V. * %% * 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. * =========================LICENSE_END================================== */ import io.axual.ksml.exception.KSMLParseException; import io.axual.ksml.operation.OuterJoinOperation; import io.axual.ksml.stream.KStreamWrapper; import io.axual.ksml.stream.StreamWrapper; import static io.axual.ksml.dsl.KSMLDSL.JOIN_VALUEJOINER_ATTRIBUTE; import static io.axual.ksml.dsl.KSMLDSL.JOIN_WINDOW_ATTRIBUTE; public class OuterJoinOperationParser extends ContextAwareParser<OuterJoinOperation> { public OuterJoinOperationParser(ParseContext context) { super(context); } @Override public OuterJoinOperation parse(YamlNode node) { if (node == null) return null; StreamWrapper joinStream = parseStream(node); if (joinStream instanceof KStreamWrapper) { return new OuterJoinOperation( (KStreamWrapper) joinStream, parseFunction(node, JOIN_VALUEJOINER_ATTRIBUTE, new ValueJoinerDefinitionParser()), parseDuration(node, JOIN_WINDOW_ATTRIBUTE)); } throw new KSMLParseException(node, "Stream not specified"); } }
[ "jeroen@axual.com" ]
jeroen@axual.com
1a7cad72446d632d184c753724f272688ab3e29f
a4c95cf18672b9b726d2d80043352c20404c4d25
/src/com/electro/model/ElectroModel.java
d14ab66e82bf0718ad0e933a58d1def46b259f26
[]
no_license
miketascon/electrodomesticosSwing
254892470ca6ecfa455b4db60eaa532473f4ecb3
d41d69bfcff68b071096cad3933d85399d3203de
refs/heads/master
2021-01-10T06:35:45.106513
2015-11-29T16:51:22
2015-11-29T16:51:22
47,070,925
0
0
null
null
null
null
UTF-8
Java
false
false
1,967
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.electro.model; import java.util.Date; public class ElectroModel { private int idProducto; private String tipo; private String marca; private Date fechaVenta; private float precio; private int estado; public ElectroModel() { } public ElectroModel(int idProducto, String tipo, String marca, Date fechaVenta, float precio, boolean estado) { this.idProducto = idProducto; this.tipo = tipo; this.marca = marca; this.fechaVenta = fechaVenta; this.precio = precio; setEstado(estado); } public int getIdProducto() { return idProducto; } public void setIdProducto(int idProducto) { this.idProducto = idProducto; } public String getTipo() { return tipo; } public void setTipo(String tipo) { this.tipo = tipo; } public String getMarca() { return marca; } public void setMarca(String marca) { this.marca = marca; } public Date getFechaVenta() { return fechaVenta; } public void setFechaVenta(Date fecha) { this.fechaVenta = fecha; } public float getPrecio() { return precio; } public void setPrecio(float precio) { this.precio = precio; } public boolean getEstado(){ if (estado == 1){ return true; }else{ return false; } } public int getEstado2(){ if (getEstado() == true){ return 1; }else{ return 0; } } public void setEstado(boolean estado){ if (estado){ this.estado = 1; }else{ this.estado = 0; } } }
[ "andres@CASA" ]
andres@CASA
d50bf85718f405fd8855bd192b6f5e062ebd1703
0366006126863ba6bf727c0798fa61aa1c45260d
/src/zxs/ssm/po/Users.java
4010f661295ebd57f50db8a0dd726a3d5f2e61c1
[]
no_license
zxs123/DADS
5ab58bf2dabc4f83991bd389c0286d413687edf3
7af81aacf7a6f7fda37f180a7d455b383e4960cb
refs/heads/master
2021-01-18T14:58:04.098660
2016-03-14T10:06:52
2016-03-14T10:06:52
48,788,759
0
0
null
null
null
null
UTF-8
Java
false
false
3,024
java
package zxs.ssm.po; public class Users { private String userId; private String userName; private String userPassword; private String userRname; private String userSex; private String userDep; private Integer userPosition; private String userIdcard; private String userCellphone; private String userTel; private String userEmail; public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId == null ? null : userId.trim(); } public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName == null ? null : userName.trim(); } public String getUserPassword() { return userPassword; } public void setUserPassword(String userPassword) { this.userPassword = userPassword == null ? null : userPassword.trim(); } public String getUserRname() { return userRname; } public void setUserRname(String userRname) { this.userRname = userRname == null ? null : userRname.trim(); } public String getUserSex() { return userSex; } public void setUserSex(String userSex) { this.userSex = userSex == null ? null : userSex.trim(); } public String getUserDep() { return userDep; } public void setUserDep(String userDep) { this.userDep = userDep == null ? null : userDep.trim(); } public Integer getUserPosition() { return userPosition; } public void setUserPosition(Integer userPosition) { this.userPosition = userPosition; } public String getUserIdcard() { return userIdcard; } public void setUserIdcard(String userIdcard) { this.userIdcard = userIdcard == null ? null : userIdcard.trim(); } public String getUserCellphone() { return userCellphone; } public void setUserCellphone(String userCellphone) { this.userCellphone = userCellphone == null ? null : userCellphone.trim(); } public String getUserTel() { return userTel; } public void setUserTel(String userTel) { this.userTel = userTel == null ? null : userTel.trim(); } public String getUserEmail() { return userEmail; } public void setUserEmail(String userEmail) { this.userEmail = userEmail == null ? null : userEmail.trim(); } @Override public String toString() { return "Users [userId=" + userId + ", userName=" + userName + ", userPassword=" + userPassword + ", userRname=" + userRname + ", userSex=" + userSex + ", userDep=" + userDep + ", userPosition=" + userPosition + ", userIdcard=" + userIdcard + ", userCellphone=" + userCellphone + ", userTel=" + userTel + ", userEmail=" + userEmail + "]"; } }
[ "1250216412@qq.com" ]
1250216412@qq.com
6b6e345b966d73edf9649cbe06c7aecc416c1fe4
f0b8ee5c4764577c59d216bfa4fcfda03e181573
/src/main/java/com/jkoss/pojo/loan/PaysExample.java
dbc77031d3fa7b41ffb33d271e42156bc19747f5
[]
no_license
java1107/ossjk
9bd4f21e5734ad10cd5384ef785e48e67d4ee72b
1e3d3ab87388edfcbd9668592edeca715f3b5c52
refs/heads/master
2021-01-19T23:21:37.772322
2017-07-04T09:20:31
2017-07-04T09:20:31
88,970,171
0
0
null
null
null
null
UTF-8
Java
false
false
22,697
java
package com.jkoss.pojo.loan; import java.util.ArrayList; import java.util.Date; import java.util.List; public class PaysExample { protected String orderByClause; protected boolean distinct; protected List<Criteria> oredCriteria; public PaysExample() { oredCriteria = new ArrayList<Criteria>(); } public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; } public String getOrderByClause() { return orderByClause; } public void setDistinct(boolean distinct) { this.distinct = distinct; } public boolean isDistinct() { return distinct; } public List<Criteria> getOredCriteria() { return oredCriteria; } public void or(Criteria criteria) { oredCriteria.add(criteria); } public Criteria or() { Criteria criteria = createCriteriaInternal(); oredCriteria.add(criteria); return criteria; } public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); if (oredCriteria.size() == 0) { oredCriteria.add(criteria); } return criteria; } protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); return criteria; } public void clear() { oredCriteria.clear(); orderByClause = null; distinct = false; } protected abstract static class GeneratedCriteria { protected List<Criterion> criteria; protected GeneratedCriteria() { super(); criteria = new ArrayList<Criterion>(); } public boolean isValid() { return criteria.size() > 0; } public List<Criterion> getAllCriteria() { return criteria; } public List<Criterion> getCriteria() { return criteria; } protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); } protected void addCriterion(String condition, Object value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); } protected void addCriterion(String condition, Object value1, Object value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); } public Criteria andPayIDIsNull() { addCriterion("payID is null"); return (Criteria) this; } public Criteria andPayIDIsNotNull() { addCriterion("payID is not null"); return (Criteria) this; } public Criteria andPayIDEqualTo(Integer value) { addCriterion("payID =", value, "payID"); return (Criteria) this; } public Criteria andPayIDNotEqualTo(Integer value) { addCriterion("payID <>", value, "payID"); return (Criteria) this; } public Criteria andPayIDGreaterThan(Integer value) { addCriterion("payID >", value, "payID"); return (Criteria) this; } public Criteria andPayIDGreaterThanOrEqualTo(Integer value) { addCriterion("payID >=", value, "payID"); return (Criteria) this; } public Criteria andPayIDLessThan(Integer value) { addCriterion("payID <", value, "payID"); return (Criteria) this; } public Criteria andPayIDLessThanOrEqualTo(Integer value) { addCriterion("payID <=", value, "payID"); return (Criteria) this; } public Criteria andPayIDIn(List<Integer> values) { addCriterion("payID in", values, "payID"); return (Criteria) this; } public Criteria andPayIDNotIn(List<Integer> values) { addCriterion("payID not in", values, "payID"); return (Criteria) this; } public Criteria andPayIDBetween(Integer value1, Integer value2) { addCriterion("payID between", value1, value2, "payID"); return (Criteria) this; } public Criteria andPayIDNotBetween(Integer value1, Integer value2) { addCriterion("payID not between", value1, value2, "payID"); return (Criteria) this; } public Criteria andFanIDIsNull() { addCriterion("fanID is null"); return (Criteria) this; } public Criteria andFanIDIsNotNull() { addCriterion("fanID is not null"); return (Criteria) this; } public Criteria andFanIDEqualTo(Integer value) { addCriterion("fanID =", value, "fanID"); return (Criteria) this; } public Criteria andFanIDNotEqualTo(Integer value) { addCriterion("fanID <>", value, "fanID"); return (Criteria) this; } public Criteria andFanIDGreaterThan(Integer value) { addCriterion("fanID >", value, "fanID"); return (Criteria) this; } public Criteria andFanIDGreaterThanOrEqualTo(Integer value) { addCriterion("fanID >=", value, "fanID"); return (Criteria) this; } public Criteria andFanIDLessThan(Integer value) { addCriterion("fanID <", value, "fanID"); return (Criteria) this; } public Criteria andFanIDLessThanOrEqualTo(Integer value) { addCriterion("fanID <=", value, "fanID"); return (Criteria) this; } public Criteria andFanIDIn(List<Integer> values) { addCriterion("fanID in", values, "fanID"); return (Criteria) this; } public Criteria andFanIDNotIn(List<Integer> values) { addCriterion("fanID not in", values, "fanID"); return (Criteria) this; } public Criteria andFanIDBetween(Integer value1, Integer value2) { addCriterion("fanID between", value1, value2, "fanID"); return (Criteria) this; } public Criteria andFanIDNotBetween(Integer value1, Integer value2) { addCriterion("fanID not between", value1, value2, "fanID"); return (Criteria) this; } public Criteria andOssstuidIsNull() { addCriterion("ossstuid is null"); return (Criteria) this; } public Criteria andOssstuidIsNotNull() { addCriterion("ossstuid is not null"); return (Criteria) this; } public Criteria andOssstuidEqualTo(Integer value) { addCriterion("ossstuid =", value, "ossstuid"); return (Criteria) this; } public Criteria andOssstuidNotEqualTo(Integer value) { addCriterion("ossstuid <>", value, "ossstuid"); return (Criteria) this; } public Criteria andOssstuidGreaterThan(Integer value) { addCriterion("ossstuid >", value, "ossstuid"); return (Criteria) this; } public Criteria andOssstuidGreaterThanOrEqualTo(Integer value) { addCriterion("ossstuid >=", value, "ossstuid"); return (Criteria) this; } public Criteria andOssstuidLessThan(Integer value) { addCriterion("ossstuid <", value, "ossstuid"); return (Criteria) this; } public Criteria andOssstuidLessThanOrEqualTo(Integer value) { addCriterion("ossstuid <=", value, "ossstuid"); return (Criteria) this; } public Criteria andOssstuidIn(List<Integer> values) { addCriterion("ossstuid in", values, "ossstuid"); return (Criteria) this; } public Criteria andOssstuidNotIn(List<Integer> values) { addCriterion("ossstuid not in", values, "ossstuid"); return (Criteria) this; } public Criteria andOssstuidBetween(Integer value1, Integer value2) { addCriterion("ossstuid between", value1, value2, "ossstuid"); return (Criteria) this; } public Criteria andOssstuidNotBetween(Integer value1, Integer value2) { addCriterion("ossstuid not between", value1, value2, "ossstuid"); return (Criteria) this; } public Criteria andPayDateIsNull() { addCriterion("payDate is null"); return (Criteria) this; } public Criteria andPayDateIsNotNull() { addCriterion("payDate is not null"); return (Criteria) this; } public Criteria andPayDateEqualTo(Date value) { addCriterion("payDate =", value, "payDate"); return (Criteria) this; } public Criteria andPayDateNotEqualTo(Date value) { addCriterion("payDate <>", value, "payDate"); return (Criteria) this; } public Criteria andPayDateGreaterThan(Date value) { addCriterion("payDate >", value, "payDate"); return (Criteria) this; } public Criteria andPayDateGreaterThanOrEqualTo(Date value) { addCriterion("payDate >=", value, "payDate"); return (Criteria) this; } public Criteria andPayDateLessThan(Date value) { addCriterion("payDate <", value, "payDate"); return (Criteria) this; } public Criteria andPayDateLessThanOrEqualTo(Date value) { addCriterion("payDate <=", value, "payDate"); return (Criteria) this; } public Criteria andPayDateIn(List<Date> values) { addCriterion("payDate in", values, "payDate"); return (Criteria) this; } public Criteria andPayDateNotIn(List<Date> values) { addCriterion("payDate not in", values, "payDate"); return (Criteria) this; } public Criteria andPayDateBetween(Date value1, Date value2) { addCriterion("payDate between", value1, value2, "payDate"); return (Criteria) this; } public Criteria andPayDateNotBetween(Date value1, Date value2) { addCriterion("payDate not between", value1, value2, "payDate"); return (Criteria) this; } public Criteria andAllneedpayIsNull() { addCriterion("allneedpay is null"); return (Criteria) this; } public Criteria andAllneedpayIsNotNull() { addCriterion("allneedpay is not null"); return (Criteria) this; } public Criteria andAllneedpayEqualTo(Integer value) { addCriterion("allneedpay =", value, "allneedpay"); return (Criteria) this; } public Criteria andAllneedpayNotEqualTo(Integer value) { addCriterion("allneedpay <>", value, "allneedpay"); return (Criteria) this; } public Criteria andAllneedpayGreaterThan(Integer value) { addCriterion("allneedpay >", value, "allneedpay"); return (Criteria) this; } public Criteria andAllneedpayGreaterThanOrEqualTo(Integer value) { addCriterion("allneedpay >=", value, "allneedpay"); return (Criteria) this; } public Criteria andAllneedpayLessThan(Integer value) { addCriterion("allneedpay <", value, "allneedpay"); return (Criteria) this; } public Criteria andAllneedpayLessThanOrEqualTo(Integer value) { addCriterion("allneedpay <=", value, "allneedpay"); return (Criteria) this; } public Criteria andAllneedpayIn(List<Integer> values) { addCriterion("allneedpay in", values, "allneedpay"); return (Criteria) this; } public Criteria andAllneedpayNotIn(List<Integer> values) { addCriterion("allneedpay not in", values, "allneedpay"); return (Criteria) this; } public Criteria andAllneedpayBetween(Integer value1, Integer value2) { addCriterion("allneedpay between", value1, value2, "allneedpay"); return (Criteria) this; } public Criteria andAllneedpayNotBetween(Integer value1, Integer value2) { addCriterion("allneedpay not between", value1, value2, "allneedpay"); return (Criteria) this; } public Criteria andPayTypeIsNull() { addCriterion("payType is null"); return (Criteria) this; } public Criteria andPayTypeIsNotNull() { addCriterion("payType is not null"); return (Criteria) this; } public Criteria andPayTypeEqualTo(Integer value) { addCriterion("payType =", value, "payType"); return (Criteria) this; } public Criteria andPayTypeNotEqualTo(Integer value) { addCriterion("payType <>", value, "payType"); return (Criteria) this; } public Criteria andPayTypeGreaterThan(Integer value) { addCriterion("payType >", value, "payType"); return (Criteria) this; } public Criteria andPayTypeGreaterThanOrEqualTo(Integer value) { addCriterion("payType >=", value, "payType"); return (Criteria) this; } public Criteria andPayTypeLessThan(Integer value) { addCriterion("payType <", value, "payType"); return (Criteria) this; } public Criteria andPayTypeLessThanOrEqualTo(Integer value) { addCriterion("payType <=", value, "payType"); return (Criteria) this; } public Criteria andPayTypeIn(List<Integer> values) { addCriterion("payType in", values, "payType"); return (Criteria) this; } public Criteria andPayTypeNotIn(List<Integer> values) { addCriterion("payType not in", values, "payType"); return (Criteria) this; } public Criteria andPayTypeBetween(Integer value1, Integer value2) { addCriterion("payType between", value1, value2, "payType"); return (Criteria) this; } public Criteria andPayTypeNotBetween(Integer value1, Integer value2) { addCriterion("payType not between", value1, value2, "payType"); return (Criteria) this; } public Criteria andPayDescIsNull() { addCriterion("payDesc is null"); return (Criteria) this; } public Criteria andPayDescIsNotNull() { addCriterion("payDesc is not null"); return (Criteria) this; } public Criteria andPayDescEqualTo(String value) { addCriterion("payDesc =", value, "payDesc"); return (Criteria) this; } public Criteria andPayDescNotEqualTo(String value) { addCriterion("payDesc <>", value, "payDesc"); return (Criteria) this; } public Criteria andPayDescGreaterThan(String value) { addCriterion("payDesc >", value, "payDesc"); return (Criteria) this; } public Criteria andPayDescGreaterThanOrEqualTo(String value) { addCriterion("payDesc >=", value, "payDesc"); return (Criteria) this; } public Criteria andPayDescLessThan(String value) { addCriterion("payDesc <", value, "payDesc"); return (Criteria) this; } public Criteria andPayDescLessThanOrEqualTo(String value) { addCriterion("payDesc <=", value, "payDesc"); return (Criteria) this; } public Criteria andPayDescLike(String value) { addCriterion("payDesc like", value, "payDesc"); return (Criteria) this; } public Criteria andPayDescNotLike(String value) { addCriterion("payDesc not like", value, "payDesc"); return (Criteria) this; } public Criteria andPayDescIn(List<String> values) { addCriterion("payDesc in", values, "payDesc"); return (Criteria) this; } public Criteria andPayDescNotIn(List<String> values) { addCriterion("payDesc not in", values, "payDesc"); return (Criteria) this; } public Criteria andPayDescBetween(String value1, String value2) { addCriterion("payDesc between", value1, value2, "payDesc"); return (Criteria) this; } public Criteria andPayDescNotBetween(String value1, String value2) { addCriterion("payDesc not between", value1, value2, "payDesc"); return (Criteria) this; } public Criteria andPayotherIsNull() { addCriterion("payother is null"); return (Criteria) this; } public Criteria andPayotherIsNotNull() { addCriterion("payother is not null"); return (Criteria) this; } public Criteria andPayotherEqualTo(String value) { addCriterion("payother =", value, "payother"); return (Criteria) this; } public Criteria andPayotherNotEqualTo(String value) { addCriterion("payother <>", value, "payother"); return (Criteria) this; } public Criteria andPayotherGreaterThan(String value) { addCriterion("payother >", value, "payother"); return (Criteria) this; } public Criteria andPayotherGreaterThanOrEqualTo(String value) { addCriterion("payother >=", value, "payother"); return (Criteria) this; } public Criteria andPayotherLessThan(String value) { addCriterion("payother <", value, "payother"); return (Criteria) this; } public Criteria andPayotherLessThanOrEqualTo(String value) { addCriterion("payother <=", value, "payother"); return (Criteria) this; } public Criteria andPayotherLike(String value) { addCriterion("payother like", value, "payother"); return (Criteria) this; } public Criteria andPayotherNotLike(String value) { addCriterion("payother not like", value, "payother"); return (Criteria) this; } public Criteria andPayotherIn(List<String> values) { addCriterion("payother in", values, "payother"); return (Criteria) this; } public Criteria andPayotherNotIn(List<String> values) { addCriterion("payother not in", values, "payother"); return (Criteria) this; } public Criteria andPayotherBetween(String value1, String value2) { addCriterion("payother between", value1, value2, "payother"); return (Criteria) this; } public Criteria andPayotherNotBetween(String value1, String value2) { addCriterion("payother not between", value1, value2, "payother"); return (Criteria) this; } } public static class Criteria extends GeneratedCriteria { protected Criteria() { super(); } } public static class Criterion { private String condition; private Object value; private Object secondValue; private boolean noValue; private boolean singleValue; private boolean betweenValue; private boolean listValue; private String typeHandler; public String getCondition() { return condition; } public Object getValue() { return value; } public Object getSecondValue() { return secondValue; } public boolean isNoValue() { return noValue; } public boolean isSingleValue() { return singleValue; } public boolean isBetweenValue() { return betweenValue; } public boolean isListValue() { return listValue; } public String getTypeHandler() { return typeHandler; } protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; this.value = value; this.typeHandler = typeHandler; if (value instanceof List<?>) { this.listValue = true; } else { this.singleValue = true; } } protected Criterion(String condition, Object value) { this(condition, value, null); } protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; this.value = value; this.secondValue = secondValue; this.typeHandler = typeHandler; this.betweenValue = true; } protected Criterion(String condition, Object value, Object secondValue) { this(condition, value, secondValue, null); } } }
[ "952063095@qq.com" ]
952063095@qq.com
87eb23047378b9866603e22cffa01e2b28dcfe65
ab6586fa7c7b7ee743ae331f6d9263b0e21beb4d
/src/main/java/common/msg/MsgConstants.java
664f26be85be8b7060090f12708002634543b8c0
[]
no_license
liuyaoduan/GJWebService
14be125add13ab2dc6a7f534280b9f0b12d9f688
f5b799d96ffe9a40076f29bf5f7609b7cc192d19
refs/heads/master
2020-03-20T19:15:25.790811
2018-08-01T11:09:33
2018-08-01T11:09:33
137,629,017
0
0
null
null
null
null
UTF-8
Java
false
false
370
java
package common.msg; public interface MsgConstants { String ACTIVATION = "activation"; String HEARTBEAT = "heartbeat"; String CLIENTID = "clientid"; String TYPE = "type"; String LOGIN_LOGOUT = "login_logout"; String LOGIN= "login"; String LOGOUT = "logout"; String RESULT = "result"; String DATA = "data"; String OK = "ok"; }
[ "liuyaoduan@gmail.com" ]
liuyaoduan@gmail.com
7bd4767aafeeff673064478eab7341daf0b5cc67
2e0edd227ef5a4366cc788b3410b6a12ad39409d
/21-State/src/main/java/example2/State/ConcreteState/OnState.java
0b65b7112ea7dcee72546ef04fcd05d1e97aee19
[]
no_license
wuzhaozhen/DesignPatterns
a1f83a1a97685ed0bb52493c777565723df53181
77a60a86f0311e0a519147ecd769e45288fcd483
refs/heads/master
2021-06-28T02:16:15.079817
2019-07-25T09:58:08
2019-07-25T09:58:08
102,952,195
0
0
null
null
null
null
UTF-8
Java
false
false
398
java
package example2.State.ConcreteState; import example2.Context.Switch; import example2.State.State; public class OnState extends State { @Override public void on(Switch s) { System.out.println("已经打开!"); } @Override public void off(Switch s) { System.out.println("关闭!"); // 灯的状态由打开切换为关闭 s.setState(Switch.getState("off")); } }
[ "2535379543@qq.com" ]
2535379543@qq.com
bd502621190bba6d56856e3496d44ee27dcf2d17
9d2af1fd67de4e704543b7f40c3ac5bded3d021d
/ServletsHW/src/java/web/HolaMundo.java
381196c2b7f60b9a1048dd73d8b7e30f1fe1bbb6
[]
no_license
EMENDEZ93/Servlets
e2393be2fe30bb64569324fe4cbe61a14c3d0e26
3ae865c8638c4f75953de85ad97ceecfe955a126
refs/heads/master
2020-03-14T01:21:11.399624
2018-06-14T22:11:15
2018-06-14T22:11:15
131,375,481
0
0
null
null
null
null
UTF-8
Java
false
false
1,080
java
package web; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @WebServlet(name = "HolaMundo", urlPatterns = {"/HolaMundo"}) public class HolaMundo extends HttpServlet { @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); try (PrintWriter out = response.getWriter()) { out.println("<!DOCTYPE html>"); out.println("<html>"); out.println("<head>"); out.println("<title>Servlet</title>"); out.println("</head>"); out.println("<body>"); out.println("<h1>Servlet url :" + request.getContextPath() + "</h1>"); out.println("</body>"); out.println("</html>"); } } }
[ "emendez@unac.edu.co" ]
emendez@unac.edu.co
ff8dd78bfad9e2de235756566e529f8fd7d04bbc
2869fc39e2e63d994d5dd8876476e473cb8d3986
/Super_back/src/java/com/lvmama/back/job/ComTaskExecuteJob.java
7b2bca7cbba2f893e51ad265dc439aca10f87063
[]
no_license
kavt/feiniu_pet
bec739de7c4e2ee896de50962dbd5fb6f1e28fe9
82963e2e87611442d9b338d96e0343f67262f437
refs/heads/master
2020-12-25T17:45:16.166052
2016-06-13T10:02:42
2016-06-13T10:02:42
61,026,061
0
0
null
2016-06-13T10:02:01
2016-06-13T10:02:01
null
UTF-8
Java
false
false
1,929
java
package com.lvmama.back.job; import com.lvmama.comm.bee.service.com.ComTaskService; import com.lvmama.comm.pet.po.pub.ComTask; import com.lvmama.comm.vo.Constant; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; /** * Created by IntelliJ IDEA.<p/> * User: troy-kou<p/> * Date: 14-1-6<p/> * Time: 下午4:00<p/> * Email:kouhongyu@163.com<p/> */ public class ComTaskExecuteJob implements Runnable { Log log = LogFactory.getLog(this.getClass()); private ComTaskService comTaskService; public void run() { if (Constant.getInstance().isJobRunnable()) { Map<String, Object> paramMap = new HashMap<String, Object>(); paramMap.put("available", Constant.COM_TASK_AVAILABLE.ENABLE.getCode());//任务为“启用” paramMap.put("status", Constant.COM_TASK_STATUS.WAIT.getCode());//运行状态为“等待” paramMap.put("currentTime", new Date(System.currentTimeMillis())); paramMap.put("_startRow", 1); paramMap.put("_endRow", 1000); List<ComTask> comTaskList = comTaskService.getComTaskList(paramMap); for (ComTask comTask : comTaskList) { try { ComTaskThread comTaskThread = new ComTaskThread(); comTaskThread.setComTask(comTask); comTaskThread.setComTaskService(comTaskService); ComTaskThreadPoolFactory.getInstance().addThread(comTaskThread); } catch (Exception e) { log.error(e); } } } } public ComTaskService getComTaskService() { return comTaskService; } public void setComTaskService(ComTaskService comTaskService) { this.comTaskService = comTaskService; } }
[ "feiniu7903@163.com" ]
feiniu7903@163.com
26644f22468566a4a415e68244a3e59d2da780dc
f16ecd916121ee81b720d2377575786f73de8030
/java/median/quicksort.java
64ba2d703c80e2dd2a4e2153a964af589cd63dd0
[]
no_license
tekknolagi/apcompsci
553dec54cc318970468f3ba94c23115228b108c5
5efc627df2ca42b38eedf9b9e6e7a342c9821ac6
refs/heads/master
2016-09-09T20:13:18.415660
2013-04-24T07:39:18
2013-04-24T07:39:18
5,454,908
0
2
null
2013-01-22T17:36:07
2012-08-17T16:52:45
Java
UTF-8
Java
false
false
958
java
import java.util.Random; import java.util.ArrayList; class quicksort { public static void main(String[] args) { ArrayList<Integer> randl = new ArrayList<Integer>(); Random rand = new Random(); for (int i = 0; i < 15; i++) randl.add(rand.nextInt(100)); System.out.println(quicksort(randl, randl.size()/2)); } public static int quicksort(ArrayList<Integer> a, int med) { if (a.size() == 1) return a.get(0); Random rand = new Random(); int r = rand.nextInt(a.size()); int p = a.get(r); a.remove(r); ArrayList<Integer> less = new ArrayList<Integer>(), greater = new ArrayList<Integer>(); for (int i = 0; i < a.size(); i++) { int el = a.get(i); if (el <= p) less.add(el); else greater.add(el); } if (med <= less.size()) return quicksort(less, med); else if (med > less.size()-greater.size()) return quicksort(greater, med-(a.size()-greater.size())); else return p; } }
[ "tekknolagi@gmail.com" ]
tekknolagi@gmail.com
fd3bf2835ead5ea837b2821c0d52e81edda57793
4d6a57657d1134df2c8feb3b11e5f4d92dd1241a
/blogames/blogames-backend/src/main/java/com/blogames/com/model/User.java
6a421ca0f3d6e5c6521b724223c27e68680be738
[]
no_license
CaioNunes/EstudosAngular
0119fe826d6fe091705623f58637d44adac024f7
7b0d892e3e951dae95c2c8a5b610de31da52e0c8
refs/heads/master
2020-03-17T11:59:17.747126
2018-05-28T02:16:36
2018-05-28T02:16:36
133,570,556
0
0
null
null
null
null
UTF-8
Java
false
false
1,220
java
package com.blogames.com.model; 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 Integer id; private String login; private String password; private String name; private String age; private String favoriteGames; public Integer getId() { return id; } public String getLogin() { return login; } public void setLogin(String login) { this.login = login; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getAge() { return age; } public void setAge(String age) { this.age = age; } public String getFavoriteGames() { return favoriteGames; } public void setFavoriteGames(String favoriteGames) { this.favoriteGames = favoriteGames; } }
[ "caiofelipe147@gmail.com" ]
caiofelipe147@gmail.com
d67bbd912733b5a191ef1d25417e1db2ca169ec2
81b3984cce8eab7e04a5b0b6bcef593bc0181e5a
/android/CarLife/app/src/main/java/com/baidu/che/codriver/ui/p124d/C2709k.java
d225b5954e503d77920532e1b0532bd873bc28dc
[]
no_license
ausdruck/Demo
20ee124734d3a56b99b8a8e38466f2adc28024d6
e11f8844f4852cec901ba784ce93fcbb4200edc6
refs/heads/master
2020-04-10T03:49:24.198527
2018-07-27T10:14:56
2018-07-27T10:14:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
487
java
package com.baidu.che.codriver.ui.p124d; import com.baidu.che.codriver.protocol.data.nlp.StockData; import com.baidu.che.codriver.ui.p124d.C2549b.C2695a; /* compiled from: StockConversationModel */ /* renamed from: com.baidu.che.codriver.ui.d.k */ public class C2709k extends C2549b { /* renamed from: a */ public StockData f8881a; public C2709k(StockData mStockData) { this.f8881a = mStockData; this.f = C2695a.TYPE_NLP_STOCK; this.j = 1; } }
[ "objectyan@gmail.com" ]
objectyan@gmail.com
7687b2469b0f52543dacc1ef06ceb5401883a3b7
7d39ee4b55d0a6628ad4a3cbda67b4ae85466475
/Module_Java123/src/ch6/InputStringDemo.java
27eddadbb7036089189b34d5a1b8367065d32e7f
[]
no_license
njsoho2008/repository_one
e64fbf1d00e8132f2376c64cc777aeb87058e3fe
f2f44e4efe5ef84a397fd629c3b9a2c19b6e22c7
refs/heads/master
2020-04-24T22:42:06.471820
2019-07-31T01:52:34
2019-07-31T01:52:34
172,320,592
0
0
null
null
null
null
UTF-8
Java
false
false
516
java
package ch6; import java.util.Scanner; public class InputStringDemo { public static void main(String[] args) { Scanner input = new Scanner(System.in); //从控制台读取字符串 String str = input.nextLine();//回车结束 String str2 = input.next();//' ' '\t' '\f' '\r' '\n' 这些符号结束输入 String str3 = input.next(); String str4 = input.next(); System.out.println(str); System.out.print(str2 + " " + str3 + " " + str4); } }
[ "zzf_exw01@126.com" ]
zzf_exw01@126.com
91756d09b086c90e16ffa7ca828459e5e6828b9c
2ed7508ef37cda0f3758942eb3cbba094ef80aac
/src/com/speldipn/example/java_ysw/ch17/LocalParamClassTest.java
a10acb08f7bb4ed174ccf4b2a402cd5ea385561b
[]
no_license
speldipn/JavaBasic
411c45b0f0866153b9312d6a7b9b93d0cc3f7bb7
26149ed4ae86d06b8a8f80dca2aaf259ce48d45f
refs/heads/master
2020-03-19T12:47:19.194276
2018-10-15T13:40:50
2018-10-15T13:40:50
136,540,419
0
0
null
null
null
null
UTF-8
Java
false
false
957
java
package com.speldipn.example.java_ysw.ch17; /** * @Author: Oh, Joon young (speldipn) * @Since: 2018-10-11 */ class _OuterClass { private String myName; public _OuterClass(String name) { this.myName = name; } public Readable createLocalClassInst(final int instId) { // 매개변수 final을 붙이지 않아도 되지만 컴파일러가 만든 복사본과의 일치를 위해서.. class LocalClass implements Readable { @Override public void read() { System.out.println("Outer inst name : " + myName); System.out.println("Local Inst ID: " + instId); } } return new LocalClass(); } } public class LocalParamClassTest { public static void main(String[] args) { _OuterClass out = new _OuterClass("My Outer Class"); Readable localInst1 = out.createLocalClassInst(111); localInst1.read(); Readable localInst2 = out.createLocalClassInst(222); localInst2.read(); } }
[ "speldipn@gmail.com" ]
speldipn@gmail.com
3538dc8376144b7ea862f3f7bbae1bde2aaf3fc2
f909ec612f17254be491c3ef9cdc1f0b186e8daf
/spring_plugin/spring_demo/spring_threads/src/main/chapter1/SingleThreadedExecution/A7_1/Main.java
9ec9040325467f0054cd95acb47adde9b0b597dc
[]
no_license
kingking888/jun_java_plugin
8853f845f242ce51aaf01dc996ed88784395fd83
f57e31fa496d488fc96b7e9bab3c245f90db5f21
refs/heads/master
2023-06-04T19:30:29.554726
2021-06-24T17:19:55
2021-06-24T17:19:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
380
java
package SingleThreadedExecution.A7_1; public class Main { public static void main(String[] args) { System.out.println("Testing Gate, hit CTRL+C to exit."); Gate gate = new Gate(); new UserThread(gate, "Alice", "Alaska").start(); new UserThread(gate, "Bobby", "Brazil").start(); new UserThread(gate, "Chris", "Canada").start(); } }
[ "wujun728@hotmail.com" ]
wujun728@hotmail.com
00af6f73f90e31b081ff4ae9ef392b5e89ee0522
6bb6af23234b1fb391dc71eb55b62e02c0564ac0
/src/main/java/com/cugb/service/GoodsService.java
8f94156aacfdf12817428a2a5665637ccaeba45b
[]
no_license
qq1925093728/blackshop
b126fdf56ef42c18758add0ce67c0cd744869114
bb9b0b39a2a381cd66a7851ee2fd03244fb30ee1
refs/heads/master
2022-03-15T15:36:57.256651
2019-09-04T02:43:01
2019-09-04T02:43:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,558
java
package com.cugb.service; import java.util.List; import com.cugb.pojo.CommentExtend; import com.cugb.pojo.Comments; import com.cugb.pojo.Goods; public interface GoodsService { /** * 发布商品 * @param goods * @param duration 允许上架时长 */ public int addGood(Goods goods , Integer duration); /** * 通过主键获取商品 * @param goodsId * @return */ public Goods getGoodsByPrimaryKey(Integer goodsId); public Goods getGoodsById(Integer goodsId); /** * 更新商品信息 * @param goods */ public void updateGoodsByPrimaryKeyWithBLOBs(int goodsId ,Goods goods); /** * 通过主键删除商品 * @param id */ public void deleteGoodsByPrimaryKey(Integer id);//更新 public void deleteGoodsByPrimaryKeys(Integer id);//删除 /** * 获取所有商品信息 */ public List<Goods> getAllGoods(); List<Goods> searchGoods(String name, String describle); /** * 通过最新发布分类获取商品信息 */ public List<Goods> getGoodsByStr(Integer limit,String name,String describle); /** * 通过商品分类获取商品信息 */ public List<Goods> getGoodsByCatelog(Integer id,String name,String describle); /** * 获取 最新发布 物品,根据时间排序,获取前limit个结果 * @param limit * @return */ public List<Goods> getGoodsOrderByDate(Integer limit); /** * 根据分类id,并进行时间排序,获取前limit个结果 * @param catelogId * @param limit * @return */ public List<Goods> getGoodsByCatelogOrderByDate(Integer catelogId,Integer limit); /** * 根据用户的id,查询出该用户的所有闲置 * @param user_id * @return */ public List<Goods> getGoodsByUserId(Integer user_id); /** * 提交订单时,根据goodsId修改商品状态 * @param goods */ public void updateGoodsByGoodsId(Goods goods); /** * 获取商品数 * @return */ public int getGoodsNum(); public List<Goods> getPageGoods(int pageNum, int pageSize); /** * 模糊查询 * @param id * @param name * @param form * @param pageNum * @param pageSize * @return */ public List<Goods> getPageGoodsByGoods(Integer id, String name, Integer form, int pageNum, int pageSize); public CommentExtend selectCommentsByGoodsId(Integer id); /** * 新增评论 * @param id */ public void addComments(Comments comments); }
[ "sadj9876@qq.com" ]
sadj9876@qq.com
d7ccff7c72101ce3c0139a41395b0d1396572543
f9f64c3e97e1c2995127eece8263b61e281b3d47
/src/forms/sent/SentForm.java
0969c7296f92220fc5871176c1450dffcb308b00
[]
no_license
fkenk/MyDB
38e785bf30dc8d7b626a2630b8122f6799982611
8068e085d4e2bea643e2138fa338094877076dba
refs/heads/master
2021-01-17T06:38:30.504972
2014-12-10T20:26:46
2014-12-10T20:26:46
27,302,619
0
0
null
2014-11-29T20:03:58
2014-11-29T13:17:09
Java
UTF-8
Java
false
false
23,398
java
/* * Created by JFormDesigner on Sat Nov 15 17:12:06 EET 2014 */ package forms.sent; import java.awt.*; import java.awt.event.*; import java.sql.ResultSet; import java.sql.SQLException; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import javax.swing.*; import MAIN.Main; import com.toedter.calendar.*; import connect.DBConnect; import connect.DatabaseTableModel; import forms.Fill; import info.clearthought.layout.*; import org.freixas.jcalendar.*; import org.jooq.DSLContext; import org.jooq.Field; import org.jooq.SQLDialect; import org.jooq.exception.DataAccessException; import org.jooq.impl.DSL; import static test.generated.Tables.*; /** * @author ad ad */ public class SentForm extends JPanel implements Fill { DSLContext create = DSL.using(DBConnect.getConnect(), SQLDialect.MYSQL); public SentForm() { initComponents(); } private void button1MouseClicked(MouseEvent e) { try { java.util.Date utilDate = calendarCombo1.getDate(); java.sql.Date sqlDate = new java.sql.Date(utilDate.getTime()); create.insertInto(SENT, SENT.IDSENT, SENT.DATE, SENT.IDPRODUCTION, SENT.COUNT, SENT.NUMORDER). values(Integer.parseInt(textField1.getText()), sqlDate, Integer.parseInt(textField2.getText()), Integer.parseInt(textField3.getText()), Integer.parseInt(textField4.getText())). execute(); }catch (DataAccessException exp){ JOptionPane.showMessageDialog(Main.mainForm,exp); }catch (NumberFormatException exp){ JOptionPane.showMessageDialog(Main.mainForm,"Fill some data!"); } Main.mainForm.updateTable(); } private void textField1KeyTyped(KeyEvent e) { char c = e.getKeyChar(); if (!Character.isDigit(c) || c == KeyEvent.VK_BACK_SPACE || c == KeyEvent.VK_DELETE) { e.consume(); } } public void updateComboBoxes(){ ArrayList arrayList = new ArrayList(); for (Object[] objects1 : create.select(PRODUCTS.IDPRODUCTS, PRODUCTS.NAME).from(PRODUCTS).fetchArrays()) { arrayList.add(objects1[0] + " " + objects1[1]); } DefaultComboBoxModel comboBoxModel = new DefaultComboBoxModel(arrayList.toArray()); comboBox1.setModel(comboBoxModel); comboBoxModel = new DefaultComboBoxModel(arrayList.toArray()); comboBox3.setModel(comboBoxModel); arrayList.clear(); for (Object[] objects1 : create.select(ORDER_CONTRACT.IDORDER, ORDER_CONTRACT.DATE).from(ORDER_CONTRACT).fetchArrays()) { arrayList.add(objects1[0] + " " + objects1[1]); } comboBoxModel = new DefaultComboBoxModel(arrayList.toArray()); comboBox2.setModel(comboBoxModel); } private void comboBox1ActionPerformed(ActionEvent e) { String[] strings = comboBox1.getSelectedItem().toString().split(" "); textField2.setText(strings[0]); textField2.setBackground(Color.white); } private void comboBox2ActionPerformed(ActionEvent e) { String[] strings = comboBox2.getSelectedItem().toString().split(" "); textField4.setText(strings[0]); textField2.setBackground(Color.white); } private void button2MouseClicked(MouseEvent e) { try { create.delete(SENT).where(SENT.IDSENT.equal(Integer.parseInt(textField1.getText()))).execute(); }catch (NumberFormatException exp) { JOptionPane.showMessageDialog(Main.mainForm, "Input ID for delete!"); } Main.mainForm.updateTable(); } private void button3MouseClicked(MouseEvent e) { try { java.util.Date utilDate = calendarCombo1.getDate(); java.sql.Date sqlDate = new java.sql.Date(utilDate.getTime()); create.update(SENT).set(SENT.IDSENT, Integer.parseInt(textField1.getText())) .set(SENT.DATE, sqlDate) .set(SENT.IDPRODUCTION, Integer.parseInt(textField2.getText())) .set(SENT.COUNT, Integer.parseInt(textField3.getText())) .set(SENT.NUMORDER, Integer.parseInt(textField4.getText())) .where(SENT.IDSENT.equal((Integer) Main.mainForm.getTable1().getValueAt(Main.mainForm.getTable1().getSelectedRow(), 0))).execute(); }catch (IndexOutOfBoundsException exp){ JOptionPane.showMessageDialog(Main.mainForm,"Choose row to update!"); }catch (NumberFormatException exp){ JOptionPane.showMessageDialog(Main.mainForm, "Choose row to update!"); } Main.mainForm.updateTable(); } private void textField2KeyTyped(KeyEvent e) { char c = e.getKeyChar(); textField2.setBackground(Color.white); if (!Character.isDigit(c)) { e.consume(); } if (Character.isDigit(c) || c == KeyEvent.VK_BACK_SPACE || c == KeyEvent.VK_DELETE ) { boolean flag = false; String s; for (int i = 0; i < comboBox1.getItemCount(); i++) { String[] split = comboBox1.getItemAt(i).toString().split(" "); if (c == KeyEvent.VK_BACK_SPACE || c == KeyEvent.VK_DELETE) { s = textField2.getText(); if (split[0].equals(s)) { comboBox1.setSelectedIndex(i); textField2.setText(textField2.getText().substring(0, textField2.getText().length())); flag = true; break; } } else { s = textField2.getText() + c; if (split[0].equals(s)) { comboBox1.setSelectedIndex(i); textField2.setText(textField2.getText().substring(0, textField2.getText().length() - 1)); flag = true; break; } } } if (flag == false) { textField2.setBackground(new Color(170, 49, 58)); } } } private void textField4KeyTyped(KeyEvent e) { char c = e.getKeyChar(); textField4.setBackground(Color.white); if (!Character.isDigit(c)) { e.consume(); } if (Character.isDigit(c) || c == KeyEvent.VK_BACK_SPACE || c == KeyEvent.VK_DELETE ) { boolean flag = false; String s; for (int i = 0; i < comboBox2.getItemCount(); i++) { String[] split = comboBox2.getItemAt(i).toString().split(" "); if (c == KeyEvent.VK_BACK_SPACE || c == KeyEvent.VK_DELETE) { s = textField4.getText(); if (split[0].equals(s)) { comboBox2.setSelectedIndex(i); textField4.setText(textField4.getText().substring(0, textField4.getText().length())); flag = true; break; } } else { s = textField4.getText() + c; if (split[0].equals(s)) { comboBox2.setSelectedIndex(i); textField4.setText(textField4.getText().substring(0, textField4.getText().length() - 1)); flag = true; break; } } } if (flag == false) { textField4.setBackground(new Color(170, 49, 58)); } } } private void comboBox3ActionPerformed(ActionEvent e) { String[] strings = comboBox3.getSelectedItem().toString().split(" "); textField5.setText(strings[0]); textField5.setBackground(Color.white); } private void textField5KeyTyped(KeyEvent e) { char c = e.getKeyChar(); textField5.setBackground(Color.white); if (!Character.isDigit(c)) { e.consume(); } if (Character.isDigit(c) || c == KeyEvent.VK_BACK_SPACE || c == KeyEvent.VK_DELETE ) { boolean flag = false; String s; for (int i = 0; i < comboBox3.getItemCount(); i++) { String[] split = comboBox3.getItemAt(i).toString().split(" "); if (c == KeyEvent.VK_BACK_SPACE || c == KeyEvent.VK_DELETE) { s = textField5.getText(); if (split[0].equals(s)) { comboBox3.setSelectedIndex(i); textField5.setText(textField5.getText().substring(0, textField5.getText().length())); flag = true; break; } } else { s = textField5.getText() + c; if (split[0].equals(s)) { comboBox3.setSelectedIndex(i); textField5.setText(textField5.getText().substring(0, textField5.getText().length() - 1)); flag = true; break; } } } if (flag == false && !textField5.getText().isEmpty()) { textField5.setBackground(new Color(170, 49, 58)); } } } private void button5MouseClicked(MouseEvent e) { ResultSet resultSet; if(textField4.getText().isEmpty()) { resultSet = create.select(SENT.IDSENT, SENT.DATE, SENT.IDPRODUCTION, SENT.COUNT, SENT.NUMORDER, CUSTOMER.ADRESS) .from(SENT) .leftOuterJoin(ORDER_CONTRACT) .on(SENT.NUMORDER.equal(ORDER_CONTRACT.IDORDER)) .leftOuterJoin(CUSTOMER) .on(ORDER_CONTRACT.IDCUSTOMER.equal(CUSTOMER.IDCUSTOMER)) .where(DSL.month(SENT.DATE).equal(monthChooser1.getMonth()+1)) .fetchResultSet(); }else{ resultSet = create.select(SENT.IDSENT, SENT.DATE, SENT.IDPRODUCTION, SENT.COUNT, SENT.NUMORDER, CUSTOMER.ADRESS) .from(SENT) .leftOuterJoin(ORDER_CONTRACT) .on(SENT.NUMORDER.equal(ORDER_CONTRACT.IDORDER)) .leftOuterJoin(CUSTOMER) .on(ORDER_CONTRACT.IDCUSTOMER.equal(CUSTOMER.IDCUSTOMER)) .where(DSL.month(SENT.DATE).equal(monthChooser1.getMonth() + 1).and(SENT.IDPRODUCTION.equal(Integer.valueOf(textField5.getText())))) .fetchResultSet(); } Main.mainForm.getTable1().setModel(Main.mainForm.setDBTableModel(resultSet, SENT)); } private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents this2 = new JPanel(); label1 = new JLabel(); label2 = new JLabel(); textField1 = new JTextField(); label3 = new JLabel(); calendarCombo1 = new JCalendarCombo(); label7 = new JLabel(); comboBox1 = new JComboBox(); textField2 = new JTextField(); label5 = new JLabel(); textField3 = new JTextField(); label6 = new JLabel(); comboBox2 = new JComboBox(); textField4 = new JTextField(); button1 = new JButton(); button2 = new JButton(); button3 = new JButton(); label4 = new JLabel(); label8 = new JLabel(); monthChooser1 = new JMonthChooser(); label9 = new JLabel(); comboBox3 = new JComboBox(); textField5 = new JTextField(); button5 = new JButton(); //======== this ======== setLayout(new TableLayout(new double[][] { {TableLayout.FILL}, {TableLayout.PREFERRED}})); ((TableLayout)getLayout()).setHGap(5); ((TableLayout)getLayout()).setVGap(5); //======== this2 ======== { this2.setLayout(new TableLayout(new double[][] { {TableLayout.FILL, TableLayout.FILL, TableLayout.FILL, TableLayout.FILL, TableLayout.FILL, TableLayout.FILL}, {TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED}})); ((TableLayout)this2.getLayout()).setHGap(5); ((TableLayout)this2.getLayout()).setVGap(5); //---- label1 ---- label1.setText("Sent Form"); label1.setFont(new Font("Consolas", Font.BOLD, 20)); label1.setForeground(new Color(182, 66, 103)); this2.add(label1, new TableLayoutConstraints(1, 0, 4, 0, TableLayoutConstraints.CENTER, TableLayoutConstraints.CENTER)); //---- label2 ---- label2.setText("Id "); label2.setForeground(new Color(182, 66, 103)); label2.setFont(new Font("Consolas", Font.BOLD, 15)); this2.add(label2, new TableLayoutConstraints(0, 2, 1, 2, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL)); //---- textField1 ---- textField1.addKeyListener(new KeyAdapter() { @Override public void keyTyped(KeyEvent e) { textField1KeyTyped(e); } }); this2.add(textField1, new TableLayoutConstraints(2, 2, 5, 2, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL)); //---- label3 ---- label3.setText("Date"); label3.setForeground(new Color(182, 66, 103)); label3.setFont(new Font("Consolas", Font.BOLD, 15)); this2.add(label3, new TableLayoutConstraints(0, 4, 1, 4, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL)); this2.add(calendarCombo1, new TableLayoutConstraints(2, 4, 5, 4, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL)); //---- label7 ---- label7.setText("Id production"); label7.setForeground(new Color(182, 66, 103)); label7.setFont(new Font("Consolas", Font.BOLD, 15)); this2.add(label7, new TableLayoutConstraints(0, 6, 1, 6, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL)); //---- comboBox1 ---- comboBox1.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { comboBox1ActionPerformed(e); } }); this2.add(comboBox1, new TableLayoutConstraints(2, 6, 3, 6, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL)); //---- textField2 ---- textField2.addKeyListener(new KeyAdapter() { @Override public void keyTyped(KeyEvent e) { textField2KeyTyped(e); } }); this2.add(textField2, new TableLayoutConstraints(4, 6, 5, 6, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL)); //---- label5 ---- label5.setText("Count "); label5.setForeground(new Color(182, 66, 103)); label5.setFont(new Font("Consolas", Font.BOLD, 15)); this2.add(label5, new TableLayoutConstraints(0, 8, 1, 8, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL)); //---- textField3 ---- textField3.addKeyListener(new KeyAdapter() { @Override public void keyTyped(KeyEvent e) { textField1KeyTyped(e); } }); this2.add(textField3, new TableLayoutConstraints(2, 8, 5, 8, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL)); //---- label6 ---- label6.setText("Num order"); label6.setForeground(new Color(182, 66, 103)); label6.setFont(new Font("Consolas", Font.BOLD, 15)); this2.add(label6, new TableLayoutConstraints(0, 10, 1, 10, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL)); //---- comboBox2 ---- comboBox2.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { comboBox2ActionPerformed(e); } }); this2.add(comboBox2, new TableLayoutConstraints(2, 10, 3, 10, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL)); //---- textField4 ---- textField4.addKeyListener(new KeyAdapter() { @Override public void keyTyped(KeyEvent e) { textField4KeyTyped(e); } }); this2.add(textField4, new TableLayoutConstraints(4, 10, 5, 10, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL)); //---- button1 ---- button1.setText("Add"); button1.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { button1MouseClicked(e); } }); this2.add(button1, new TableLayoutConstraints(3, 11, 3, 11, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL)); //---- button2 ---- button2.setText("Delete"); button2.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { button2MouseClicked(e); } }); this2.add(button2, new TableLayoutConstraints(4, 11, 4, 11, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL)); //---- button3 ---- button3.setText("Update"); button3.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { button3MouseClicked(e); } }); this2.add(button3, new TableLayoutConstraints(5, 11, 5, 11, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL)); //---- label4 ---- label4.setText("Month report"); label4.setFont(new Font("Consolas", Font.BOLD, 20)); label4.setForeground(new Color(182, 66, 103)); this2.add(label4, new TableLayoutConstraints(2, 12, 3, 12, TableLayoutConstraints.CENTER, TableLayoutConstraints.CENTER)); //---- label8 ---- label8.setText("Select month"); label8.setForeground(new Color(182, 66, 103)); label8.setFont(new Font("Consolas", Font.BOLD, 15)); this2.add(label8, new TableLayoutConstraints(0, 13, 0, 13, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL)); this2.add(monthChooser1, new TableLayoutConstraints(2, 13, 5, 13, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL)); //---- label9 ---- label9.setText("Id "); label9.setForeground(new Color(182, 66, 103)); label9.setFont(new Font("Consolas", Font.BOLD, 15)); this2.add(label9, new TableLayoutConstraints(0, 14, 0, 14, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL)); //---- comboBox3 ---- comboBox3.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { comboBox3ActionPerformed(e); } }); this2.add(comboBox3, new TableLayoutConstraints(2, 14, 3, 14, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL)); //---- textField5 ---- textField5.addKeyListener(new KeyAdapter() { @Override public void keyTyped(KeyEvent e) { textField5KeyTyped(e); } }); this2.add(textField5, new TableLayoutConstraints(4, 14, 5, 14, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL)); //---- button5 ---- button5.setText("Select"); button5.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { button5MouseClicked(e); } }); this2.add(button5, new TableLayoutConstraints(5, 15, 5, 15, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL)); } add(this2, new TableLayoutConstraints(0, 0, 0, 0, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL)); // JFormDesigner - End of component initialization //GEN-END:initComponents } // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables private JPanel this2; private JLabel label1; private JLabel label2; private JTextField textField1; private JLabel label3; private JCalendarCombo calendarCombo1; private JLabel label7; private JComboBox comboBox1; private JTextField textField2; private JLabel label5; private JTextField textField3; private JLabel label6; private JComboBox comboBox2; private JTextField textField4; private JButton button1; private JButton button2; private JButton button3; private JLabel label4; private JLabel label8; private JMonthChooser monthChooser1; private JLabel label9; private JComboBox comboBox3; private JTextField textField5; private JButton button5; // JFormDesigner - End of variables declaration //GEN-END:variables @Override public void fill(ArrayList objects) { textField1.setText(String.valueOf(objects.get(0))); SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); Date parsed = null; try { parsed = format.parse(String.valueOf(objects.get(1))); calendarCombo1.setDate(parsed); calendarCombo1.updateUI(); } catch (ParseException e) { e.printStackTrace(); } textField2.setText(String.valueOf(objects.get(2))); textField3.setText(String.valueOf(objects.get(4))); textField4.setText(String.valueOf(objects.get(5))); for (int i = 0; i < comboBox1.getItemCount(); i++) { String[] split = comboBox1.getItemAt(i).toString().split(" "); if(split[0].equals(textField2.getText())){ comboBox1.setSelectedIndex(i); break; } } for (int i = 0; i < comboBox2.getItemCount(); i++) { String[] split = comboBox2.getItemAt(i).toString().split(" "); if(split[0].equals(textField4.getText())){ comboBox2.setSelectedIndex(i); break; } } } public ResultSet sentInnerJoin() { return create.select(SENT.IDSENT, SENT.DATE,SENT.IDPRODUCTION, PRODUCTS.NAME, SENT.COUNT, SENT.NUMORDER) .from(SENT) .leftOuterJoin(PRODUCTS) .on(PRODUCTS.IDPRODUCTS.equal(SENT.IDPRODUCTION)) .fetchResultSet(); } }
[ "fkenkandfkenk@gmail.com" ]
fkenkandfkenk@gmail.com
b255b739789781fe0b1cc8e6dc6042cf4fb193b1
f70e31715b1b057f299f2fe683d402f80cd704f3
/app/src/test/java/com/example/kimja/a5th_homework/ExampleUnitTest.java
d7c36a4939e8844d292591bf2ffc8e3bf15a9a11
[]
no_license
hk1459/6th-homework
1c32901be97f2773fa230907a4693f8c79bff3d6
97c513cd309811b1fb3089663f3a76fb5a45f333
refs/heads/master
2021-01-19T14:10:26.730422
2017-04-26T06:12:49
2017-04-26T06:12:49
88,130,905
0
0
null
null
null
null
UTF-8
Java
false
false
409
java
package com.example.kimja.a5th_homework; import org.junit.Test; import static org.junit.Assert.*; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ public class ExampleUnitTest { @Test public void addition_isCorrect() throws Exception { assertEquals(4, 2 + 2); } }
[ "gusrbdia66@naver.com" ]
gusrbdia66@naver.com
79fc5aa6576edeacaa71134e0935298866ed6189
1ed5f6ee95f56ad71dec7ba73e1096cc23420cda
/src/models/Observer.java
5ec7b336d7a45fd080ef591e856cee49cba261fe
[]
no_license
IITeam-Rocket/IceField
dcb9e0bb5039b587f0fdf90524465f56536bd005
12ead58fcff6d86b5cda853e7545c10ec461db09
refs/heads/master
2021-01-16T09:05:43.105103
2020-05-18T01:07:51
2020-05-18T01:07:51
243,052,027
0
2
null
2020-05-18T01:04:52
2020-02-25T17:00:35
Java
UTF-8
Java
false
false
275
java
package models; /** * An interface representing an object that observes an other object. * * @author Józsa György * @version 1.0 * @since graphical * @since 2020.04.28. */ public interface Observer { /** * Updates the object. */ void update(); }
[ "noreply@github.com" ]
noreply@github.com
3edbe81040a8c3a88b271a0e6a4e395e09ad3693
1870313299ab3f9430992157db9ad80d7c8d940e
/app/src/main/java/com/example/covid19newsapp/dto/NewsDAO.java
80a7ba2883cc3626fe23876ae54a02ce8c961a06
[]
no_license
tiagoguimaraesss/covid19newsapp
bb1d663998ed3ae70d4cd2d436b62b6249554930
cf6fd0e6f33731e897b906e8069a27fa37781c6f
refs/heads/main
2023-01-18T22:28:02.545728
2020-11-22T14:21:31
2020-11-22T14:21:31
311,351,351
0
0
null
null
null
null
UTF-8
Java
false
false
4,102
java
package com.example.covid19newsapp.dto; import com.example.covid19newsapp.model.News; import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class NewsDAO { public List<News> lista() { return new ArrayList<>(Arrays.asList(new News("forest", "Dicas para realização de exercícios físicos em casa", "Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?"), new News("forest", "Ações sociais são realizadas nas comunidades de Gravatai", "Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?"), new News("forest", "Dicas para higienização de alimentos", "Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?"), new News("forest", "Porto Alegre cria tendas para atendimento ao público", "Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?"))); } }
[ "tiago.guimaraes@ulbra.inf.br" ]
tiago.guimaraes@ulbra.inf.br
a1c7e7e51d1a9cab6a5795ccf08ba283f499e1bf
a2781ae290f12ea9dbf78d6e7ab4ae6f58cb8fb8
/src/laser/ddg/r/RDDGBuilder.java
0ce5124a45c69aeaf5377fac31283f37d43d54a3
[]
no_license
rahmanhafeezul/DDG-Explorer
9792192e87002d7eea3a2607bd1229f4130be8db
fee44dd7aa3415e225f511c8e945412a13efe5bd
refs/heads/master
2021-01-15T18:41:44.321168
2016-07-07T23:08:07
2016-07-07T23:08:07
60,204,473
0
0
null
2016-07-15T19:10:12
2016-06-01T19:20:56
Java
UTF-8
Java
false
false
6,998
java
package laser.ddg.r; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import javax.swing.JOptionPane; import laser.ddg.Attributes; import laser.ddg.DDGBuilder; import laser.ddg.DataInstanceNode; import laser.ddg.ProcedureInstanceNode; import laser.ddg.ProvenanceData; import laser.ddg.gui.DDGExplorer; import laser.ddg.gui.LegendEntry; import laser.ddg.persist.JenaWriter; import laser.ddg.visualizer.PrefuseGraphBuilder; /** * Builds the nodes used by ddgs that represent the execution of R scripts. * * @author Barbara Lerner * @version Jul 8, 2013 * */ public class RDDGBuilder extends DDGBuilder { /** * Creates the builder for R scripts * @param script the filename containing the script that was executed * @param provData the object that holds the ddg * @param dbWriter the object used to write to the database. If null, * the ddg being built will not be saved */ public RDDGBuilder(String script, ProvenanceData provData, JenaWriter dbWriter){ super(script, provData, dbWriter); } /** * Creates the legend to describe the node colors used, using R terminology * @return the items to appear in the legend */ public static ArrayList<LegendEntry> createNodeLegend () { ArrayList<LegendEntry> legend = new ArrayList<LegendEntry>(); legend.add(new LegendEntry("Collapsible Operation", PrefuseGraphBuilder.NONLEAF_COLOR)); legend.add(new LegendEntry("Expandable Operation", PrefuseGraphBuilder.STEP_COLOR)); legend.add(new LegendEntry("Simple Operation", PrefuseGraphBuilder.LEAF_COLOR)); legend.add(new LegendEntry("Parameter Binding", PrefuseGraphBuilder.INTERPRETER_COLOR)); legend.add(new LegendEntry("Checkpoint Operation", PrefuseGraphBuilder.CHECKPOINT_COLOR)); legend.add(new LegendEntry("Restore Operation", PrefuseGraphBuilder.RESTORE_COLOR)); legend.add(new LegendEntry("Data", PrefuseGraphBuilder.DATA_COLOR)); legend.add(new LegendEntry("Error", PrefuseGraphBuilder.EXCEPTION_COLOR)); legend.add(new LegendEntry("File", PrefuseGraphBuilder.FILE_COLOR)); legend.add(new LegendEntry("URL", PrefuseGraphBuilder.URL_COLOR)); return legend; } /** * Creates the legend to describe the edge colors used, using R terminology * @return the items to appear in the legend */ public static ArrayList<LegendEntry> createEdgeLegend () { ArrayList<LegendEntry> legend = new ArrayList<LegendEntry>(); legend.add(new LegendEntry("Control Flow", PrefuseGraphBuilder.CONTROL_FLOW_COLOR)); legend.add(new LegendEntry("Data Flow", PrefuseGraphBuilder.DATA_FLOW_COLOR)); return legend; } /** * Determines what kind of R function node to create and adds it * * @param type the type of procedure node, can be leaf, start or finish * @param id the id number of the node * @param nodeName the name of the node * @param funcName the name of the function executed * @return the node that is created */ @Override public ProcedureInstanceNode addProceduralNode(String type, int id, String nodeName, String funcName, double elapsedTime, int lineNum){ RFunctionInstanceNode newFuncNode = null; ProvenanceData provObject = getProvObject(); if(type.equals("Start")){ newFuncNode = new RStartNode(nodeName, funcName, provObject, elapsedTime, lineNum); } else if(type.equals("Leaf") || type.equals("Operation")){ newFuncNode = new RLeafNode(nodeName, funcName, provObject, elapsedTime, lineNum); } else if(type.equals("Finish")){ newFuncNode = new RFinishNode(nodeName, provObject, elapsedTime, lineNum); } else if(type.equals("Interm")){ // This type is not currently produced by RDataTracker. newFuncNode = new RIntermNode(nodeName, provObject, elapsedTime, lineNum); } else if(type.equals("Binding")){ // This type is not currently produced by RDataTracker. newFuncNode = new RBindingNode(nodeName, provObject, elapsedTime, lineNum); } else if (type.equals("Checkpoint")) { newFuncNode = new RCheckpointNode(nodeName, provObject, elapsedTime, lineNum); } else if (type.equals("Restore")) { newFuncNode = new RRestoreNode(nodeName, provObject, elapsedTime, lineNum); } provObject.addPIN(newFuncNode, id); return newFuncNode; } /** * Determines what kind of R function node to create and adds it * * @param type the type of procedure node, can be leaf, start or finish * @param id the id number of the node * @param name the name of the node * @return the node that is created */ @Override public ProcedureInstanceNode addProceduralNode(String type, int id, String name, double elapsedTime, int lineNum) { return addProceduralNode(type, id, name, null, elapsedTime, lineNum); } /** * Creates a new RDataInstanceNode that will be added to the provenance graph * * @param type type of data node to add * @param id id number assigned to the data node * @param name name of the data node * @param value optional value associated with the data node * @param time the timestamp of the data node * @param location the original location of a file, null if not a file node */ @Override public DataInstanceNode addDataNode(String type, int id, String name, String value, String time, String location){ RDataInstanceNode dataNode = new RDataInstanceNode(type, name, value, time, location); getProvObject().addDIN(dataNode, id); return dataNode; } /** * Produces a string describing the attributes to display to the user. The standard attributes always appear * in the same order and display with attribute names familiar to an R programmer. * @param attributes all the attributes * @return the attribute description to display to the user */ public static String getAttributeString(Attributes attributes) { // Get a consistent order when showing attributes // Names used in the DB String[] dbAttrNames = {"Architecture", "OperatingSystem", "Language", "LanguageVersion", "Script", "ProcessFileTimestamp", "WorkingDirectory", "DDGDirectory", "DateTime"}; // Names to display to the user String[] printAttrNames = {"Architecture", "Operating System", "Language", "Language Version", "Script", "Script Timestamp", "Working Directory", "DDG Directory", "DDG Timestamp"}; StringBuilder attrText = new StringBuilder(); int which = 0; for (String attrName : dbAttrNames) { String attrValue = attributes.get(attrName); if (attrValue != null) { attrText.append(printAttrNames[which] + " = " + attrValue + "\n"); } else { JOptionPane.showMessageDialog(DDGExplorer.getInstance(), "No value for " + attrName + "\n"); } which++; } // Print out any extra ones, deliberately skipping the one named "processName" List<String> attrNameList = Arrays.asList(dbAttrNames); for (String attrName : attributes.names()) { if (!attrName.equals("processName") && !attrNameList.contains(attrName)) { attrText.append(attrName + " = " + attributes.get(attrName) + "\n"); } } return attrText.toString(); } }
[ "blerner@mtholyoke.edu" ]
blerner@mtholyoke.edu
addce2231fcf00756a9782034dae18a08f282863
d85720b14910dc56d83e23beaae87b3da110439f
/SAXParser_Chapter5/src/SAXParserC.java
cae0d213bdd252d52255b2bc2460f17e7de93ab7
[]
no_license
sanikaj/NLP
dc79e2371fb3de62a8e1a84694b0f3c3876c3af6
29c5bbe33c53b2e62757c56314200cbf1a24b796
refs/heads/master
2021-01-22T05:24:47.128229
2014-08-12T00:19:04
2014-08-12T00:19:04
21,793,761
1
0
null
null
null
null
UTF-8
Java
false
false
2,128
java
import java.io.IOException; import java.util.ArrayList; import java.util.List; import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; import org.xml.sax.Attributes; import org.xml.sax.SAXException; import org.xml.sax.helpers.DefaultHandler; public class SAXParserC extends DefaultHandler { String fileName; String tmpValue; Catalog catalog; List<Catalog> catalogL; public SAXParserC(String fileName) { this.fileName = fileName; catalog = new Catalog(); catalogL = new ArrayList<Catalog>(); parseDocument(); printData(); } public void printData() { for(Catalog c: catalogL ) { System.out.println(c.toString()); } } public void parseDocument() { SAXParserFactory factory = SAXParserFactory.newInstance() ; try { SAXParser parser = factory.newSAXParser(); parser.parse(fileName,this); } catch (SAXException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } catch (ParserConfigurationException e) { e.printStackTrace(); } finally { } } @Override public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { if(qName.equals("catalog_item")) { catalog = new Catalog(); catalog.setGender(attributes.getValue("gender")); } if(qName.equals("size")) { catalog.setSize_description(attributes.getValue("description")); } } @Override public void endElement(String uri, String localName, String qName) throws SAXException { super.endElement(uri, localName, qName); if(qName.equals("catalog_item")) { catalogL.add(catalog); } if(qName.equals("item_number")) { catalog.setItem_number(tmpValue); } if(qName.equals("price")) { catalog.setPrice(Double.parseDouble(tmpValue)); } } @Override public void characters(char[] ch, int start, int length) throws SAXException { super.characters(ch, start, length); tmpValue = new String(ch,start,length); } public static void main(String[] args) { new SAXParserC("catalogFile.xml"); } }
[ "jos.sanika@gmail.com" ]
jos.sanika@gmail.com
623a83ed5bfa04b5f7316069b840f490fb83527d
7f51173f6e933e419927a32dda4e853aaf6d7c0d
/app/src/main/java/com/example/pickWrong/MainActivity.java
e44386d29eb953916409d8b2353fb704d8953e1d
[]
no_license
k558888666666/ForLegelReasonsThatsAjoke
efb6995a4adf3b09bf271ed056862b9daab40927
ed43433098d625bbb79b4369f2366e6cf1d3fd98
refs/heads/master
2020-06-01T20:20:31.871231
2019-06-08T17:21:44
2019-06-08T17:21:44
190,915,446
0
0
null
null
null
null
UTF-8
Java
false
false
6,402
java
package com.example.pickWrong; import android.media.MediaPlayer; import android.os.Handler; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.TextView; import android.widget.Toast; import java.util.Random; public class MainActivity extends AppCompatActivity { private Button[][] buttons = new Button[3][3]; private boolean PlayOrNot = true; MediaPlayer player,begin ; private Random rng = new Random(); private int winPoints = 0; private int failsPoints = 0; private TextView TextViewPoint; private TextView TextViewFail; private Handler mHandler = new Handler(); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); TextViewPoint = findViewById(R.id.text_view_point); TextViewFail = findViewById(R.id.text_view_fail); Button buttonRestart = findViewById(R.id.button_reset); buttonRestart.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { reStart(); } }); for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { String buttonID = "button_" + i + j; int resID = getResources().getIdentifier(buttonID, "id", getPackageName()); buttons[i][j] = findViewById(resID); } } begin = MediaPlayer.create(getApplicationContext(),R.raw.begininiin); begin.start(); Button buttonMusic = findViewById(R.id.button_music); buttonMusic.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { PlayOrNot = !PlayOrNot; if (!PlayOrNot){ begin.pause(); Toast.makeText(MainActivity.this," I pause it for u <3 ",Toast.LENGTH_SHORT).show(); }else begin.start(); } }); Toast.makeText(MainActivity.this," Start in 5 seconds :) ",Toast.LENGTH_LONG).show(); mHandler.postDelayed(mCheckForWin,5000); mHandler.postDelayed(mUpdatePointText,1); } private Runnable mCheckForWin = new Runnable() { @Override public void run() { int i = rng.nextInt(3); int j = rng.nextInt(3); int status = rng.nextInt(4) + 1; switch (status) { case 1: buttons[i][j].setBackgroundResource(R.drawable.yucks); buttons[i][j].setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { winPoints = winPoints + 1; ((Button) v).setBackgroundResource(R.drawable.start); ((Button) v).setOnClickListener(null); player=MediaPlayer.create(getApplicationContext(),R.raw.volumnup); player.start(); } }); break; case 2: buttons[i][j].setBackgroundResource(R.drawable.good); buttons[i][j].setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Toast.makeText(MainActivity.this,"How dare u :(",Toast.LENGTH_SHORT).show(); failsPoints = failsPoints + 1; ((Button) v).setBackgroundResource(R.drawable.start); ((Button) v).setOnClickListener(null); } }); break; case 3: buttons[i][j].setBackgroundResource(R.drawable.yucks); buttons[i][j].setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { winPoints = winPoints + 1; ((Button) v).setBackgroundResource(R.drawable.start); ((Button) v).setOnClickListener(null); player=MediaPlayer.create(getApplicationContext(),R.raw.volumnup); player.start(); } }); break; case 4: buttons[i][j].setBackgroundResource(R.drawable.yucks); buttons[i][j].setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { winPoints = winPoints + 1; ((Button) v).setBackgroundResource(R.drawable.start); ((Button) v).setOnClickListener(null); player=MediaPlayer.create(getApplicationContext(),R.raw.volumnup); player.start(); } }); break; } //buttons[i][j].setOnClickListener(null); if (failsPoints >= 3){ mHandler.removeCallbacks(this); Toast.makeText(MainActivity.this,"What did you do... WHAT DID YOU DO",Toast.LENGTH_LONG).show(); reStart(); }else { mHandler.postDelayed(this,200); } } } ; private Runnable mUpdatePointText = new Runnable() { @Override public void run() { TextViewPoint.setText("Score : " + winPoints); TextViewFail.setText("Fail : " + failsPoints); mHandler.postDelayed(this,1); } }; private void reStart(){ failsPoints = 0; winPoints = 0; for (int i=0 ; i<3 ;i++){ for (int j=0 ; j<3 ;j++){ buttons[i][j].setBackgroundResource(R.drawable.start); buttons[i][j].setOnClickListener(null); } } Toast.makeText(MainActivity.this," Restart in 5 seconds, dude ",Toast.LENGTH_LONG).show(); mHandler.postDelayed(mCheckForWin,5000); } }
[ "k558888666666@gamil.com" ]
k558888666666@gamil.com
2aa60dfa972d6854cbfe2093845356e5ff0cc50b
575e36a00e1e9f1b3aa7b1ef24614a92b0498f77
/app/build/generated/source/buildConfig/debug/com/apptechx/jokes/BuildConfig.java
9161db77e22cea3427c109a3a1ecc44cbd0f4647
[]
no_license
iamrahulyadav/AdultJokes
c7507f59329914405502ea2292bf144995a51dcc
1f0d0844f702f7ba51abd18019ebc319d2bf45df
refs/heads/master
2020-03-27T18:40:11.306044
2017-03-07T17:46:26
2017-03-07T17:46:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
440
java
/** * Automatically generated file. DO NOT MODIFY */ package com.apptechx.jokes; public final class BuildConfig { public static final boolean DEBUG = Boolean.parseBoolean("true"); public static final String APPLICATION_ID = "com.apptechx.jokes"; public static final String BUILD_TYPE = "debug"; public static final String FLAVOR = ""; public static final int VERSION_CODE = 3; public static final String VERSION_NAME = ""; }
[ "rudrik.patel@gmail.com" ]
rudrik.patel@gmail.com
613062555930c25874c123f3d3f5345f4d932db5
e37c90bcc7dac7dc6a9ec665e8f67309267466a9
/Model/src/com/dbms/csmq/model/publish/ViewObjTermsByStateImpl.java
9bd6b8e68f26c8bf3f915e6b6c102adfbb94bed0
[]
no_license
DBMS-Consulting/CQT_12c
791ed18acaa0b77e5836282bc2742df4b1087aaa
f92e51608079c41adc438f5d6e3485342be9be52
refs/heads/master
2021-01-20T17:50:45.862305
2020-05-08T17:49:55
2020-05-08T17:49:55
62,094,222
0
0
null
null
null
null
UTF-8
Java
false
false
1,608
java
package com.dbms.csmq.model.publish; import oracle.jbo.server.ViewObjectImpl; // --------------------------------------------------------------------- // --- File generated by Oracle ADF Business Components Design Time. // --- Wed Nov 16 12:05:15 EST 2011 // --- Custom code may be added to this class. // --- Warning: Do not modify method signatures of generated methods. // --------------------------------------------------------------------- public class ViewObjTermsByStateImpl extends ViewObjectImpl { /** * This is the default constructor (do not remove). */ public ViewObjTermsByStateImpl() { } /** * Returns the bind variable value for state. * @return bind variable value for state */ public String getstate() { return (String)getNamedWhereClauseParam("state"); } /** * Sets <code>value</code> for bind variable state. * @param value value to bind as state */ public void setstate(String value) { setNamedWhereClauseParam("state", value); } /** * Returns the bind variable value for activationGroup. * @return bind variable value for activationGroup */ public String getactivationGroup() { return (String)getNamedWhereClauseParam("activationGroup"); } /** * Sets <code>value</code> for bind variable activationGroup. * @param value value to bind as activationGroup */ public void setactivationGroup(String value) { setNamedWhereClauseParam("activationGroup", value); } }
[ "harish.pvr@hotmail.com" ]
harish.pvr@hotmail.com
0186384a9775ec4397e3ceb438f6cc49d38b9191
0228045e25edf18360356774fdb44245c4240d80
/e06.java
83ca00c5454b2751e42b5adacdf5af020ea2d9e5
[]
no_license
nayunhwan/SMaSH_Java
28b6ab988d6a6daba44d407da06dd0c0ebf8fe9c
a742224362a53d04364786d5b56a0f7bf1516b20
refs/heads/master
2021-06-05T05:25:14.442525
2016-09-08T13:17:27
2016-09-08T13:17:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
829
java
import java.util.Scanner; public class e06{ public static void main(String[] args) { Scanner s = new Scanner(System.in); int number = 0; int blank_count = 0; int blank_count2 = 0; System.out.print("출력하려는 행과 열의 크기를 입력하세요."); int rows = s.nextInt(); int columns = s.nextInt(); int temp = rows * columns; while(temp > 0){ temp = temp / 10; blank_count++; } for(int i = 0; i < rows; i++){ for(int j = 0; j < columns; j++){ number = (i + 1) * (j + 1); while(number > 0){ number = number / 10; blank_count2++; } number = (i + 1) * (j + 1); for(int k = 0; k < (blank_count - blank_count2 + 2); k++){ System.out.print(" "); } System.out.print(number); blank_count2 = 0; } System.out.println(""); } } }
[ "kbk9288@gmail.com" ]
kbk9288@gmail.com
c2735dc35a0ca833b5bd0b2c97303a9382826f96
bc342b3a64841d79bbe7894beadb9b3921af429b
/app/src/main/java/me/jessyan/mvparms/demo/di/module/ImageShowModule.java
7087fa4ff6c058cbd71806c4a1ba2aef1fd2decd
[]
no_license
enjoyDevepter/enjoy_client
1518c3c4fb63e13634aeac4b12d54a48688d222a
d2da28c2ac5a7f77410bf28f034505167a9efa59
refs/heads/master
2020-03-24T22:39:28.596044
2018-11-08T04:00:54
2018-11-08T04:00:54
143,096,453
0
0
null
null
null
null
UTF-8
Java
false
false
837
java
package me.jessyan.mvparms.demo.di.module; import com.jess.arms.di.scope.ActivityScope; import dagger.Module; import dagger.Provides; import me.jessyan.mvparms.demo.mvp.contract.ImageShowContract; import me.jessyan.mvparms.demo.mvp.model.ImageShowModel; @Module public class ImageShowModule { private ImageShowContract.View view; /** * 构建ImageShowModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter * * @param view */ public ImageShowModule(ImageShowContract.View view) { this.view = view; } @ActivityScope @Provides ImageShowContract.View provideImageShowView() { return this.view; } @ActivityScope @Provides ImageShowContract.Model provideImageShowModel(ImageShowModel model) { return model; } }
[ "guomin@mapbar.com" ]
guomin@mapbar.com
5c1f2d6c7a855d9f5ac799adbbc35acb3e83590d
20cb959c5acb6d963b1d65061f8396fd5d8a2638
/th/src/main/java/com/designer/th/Test/Impl/Rectangle.java
21c487eb110f7f98ed0d229973c915360b392dfe
[]
no_license
wnagfei/shiro-session-dubbo
3e46996c4b0174f39f5f701da75690869530918f
7db18c096066ee9d6124555acae7b8e9af73aa27
refs/heads/master
2020-04-29T22:50:03.591579
2019-03-19T08:18:31
2019-03-19T08:18:31
176,460,025
0
0
null
null
null
null
UTF-8
Java
false
false
163
java
package com.designer.th.Test.Impl; import com.designer.th.Test.Shape; public class Rectangle implements Shape { @Override public void draw() { } }
[ "wangfei@golaxy.cn" ]
wangfei@golaxy.cn
938efdac31ebc323a08d3d8b697df865f8f2fca8
e762bbaed7fd347a50e57ecfafe54c561607d161
/src/main/java/plugins/haesleinhuepf/implementations/generated/CLIJ2_Create2DBlock.java
f8f0aed6f7cdf65b0698ed8b72c9e6cd1486d403
[ "BSD-3-Clause" ]
permissive
marionlouveaux/clicy
3f0bc9f7ee0a4626a6d09c95d16b681843713480
297f4d16e831f4181e323d00e10c36caa0a851e0
refs/heads/master
2022-08-27T11:00:50.909896
2020-05-27T19:46:06
2020-05-27T19:46:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
556
java
package plugins.haesleinhuepf.implementations.generated; import plugins.haesleinhuepf.AbstractCLIJ2Block; import net.haesleinhuepf.clij2.plugins.Create2D; // this is generated code. See src/test/java/net/haesleinhuepf/clicy/codegenerator for details public class CLIJ2_Create2DBlock extends AbstractCLIJ2Block { /** * Allocated memory for a new 2D image in the GPU memory. * * BitDepth must be 8 (unsigned byte), 16 (unsigned short) or 32 (float). */ public CLIJ2_Create2DBlock() { super(new Create2D()); } }
[ "rhaase@mpi-cbg.de" ]
rhaase@mpi-cbg.de
5e91eefd3b8ca036bc4f2f0d4a96e8db3ef0268d
041415144d74f7067fadbf7ac4b2f5827dd0ecbe
/src/main/java/edu/princeton/alg2/week3/BaseballElimination.java
efeae1aac7696289f599c1a12fc7518c7b716a81
[]
no_license
novakov-alexey-zz/princeton-algs2
74b425a29650e297c5179bbe8ceff36c59e5e50e
96d8e150df06ebf73728c20303089f067a90ca3c
refs/heads/master
2022-11-21T21:30:15.569217
2017-11-08T21:45:56
2017-11-08T21:45:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,396
java
package edu.princeton.alg2.week3; import edu.princeton.cs.algs4.FlowEdge; import edu.princeton.cs.algs4.FlowNetwork; import edu.princeton.cs.algs4.FordFulkerson; import edu.princeton.cs.algs4.In; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; /** * @author Alexey Novakov */ public class BaseballElimination { private Map<String, Team> teams; private Team[] teamId; private int maxDivWins = Integer.MIN_VALUE; // create a baseball division from given filename in format specified below public BaseballElimination(String filename) { In in = new In(filename); int n = in.readInt(); teams = new HashMap<>(); teamId = new Team[n]; for (int i = 0; !in.isEmpty() && i < n; i++) { Team team = new Team(); String name = in.readString(); teams.put(name, team); teamId[i] = team; team.id = i; team.name = name; team.w = in.readInt(); team.l = in.readInt(); team.r = in.readInt(); team.g = new int[n]; for (int j = 0; j < n; j++) { team.g[j] = in.readInt(); } if (team.w > maxDivWins) { maxDivWins = team.w; } } trivialElimination(); nontrivialElimination(); } private void trivialElimination() { for (Team team : teams.values()) { Set<String> certificate = new HashSet<>(); teams.keySet().stream() .filter(aTeam -> !aTeam.equals(team.name)) .filter(aTeam -> teams.get(aTeam).w > team.w + team.r) .forEach(certificate::add); if (!certificate.isEmpty()) team.eliminationCertificate = certificate; } } private void nontrivialElimination() { for (Team team : teams.values()) { if (team.eliminationCertificate != null && team.eliminationCertificate.size() > 0) continue; int source = numberOfTeams(); int sink = numberOfTeams() + 1; int gameNode = numberOfTeams() + 2; int currentMaxWins = team.w + team.r; Set<FlowEdge> edges = new HashSet<>(); for (int i = 0; i < numberOfTeams(); i++) { if (i == team.id || teamId[i].w + teamId[i].r < maxDivWins) continue; for (int j = 0; j < i; j++) { if (j == team.id || teamId[i].g[j] == 0 || teamId[j].w + teamId[j].r < maxDivWins) continue; edges.add(new FlowEdge(source, gameNode, teamId[i].g[j])); edges.add(new FlowEdge(gameNode, i, Double.POSITIVE_INFINITY)); edges.add(new FlowEdge(gameNode, j, Double.POSITIVE_INFINITY)); gameNode++; } edges.add(new FlowEdge(i, sink, currentMaxWins - teamId[i].w)); } FlowNetwork network = new FlowNetwork(gameNode); edges.forEach(network::addEdge); FordFulkerson ff = new FordFulkerson(network, source, sink); Set<String> certificate = new HashSet<>(); for (FlowEdge edge : network.adj(numberOfTeams())) { if (edge.flow() < edge.capacity()) { Arrays.stream(teamId) .filter(v -> ff.inCut(v.id)) .forEach(v -> certificate.add(v.name)); } } if (certificate.size() > 0) { team.eliminationCertificate = certificate; } } } // number of teams public int numberOfTeams() { return teams.size(); } // all teams public Iterable<String> teams() { return teams.keySet(); } // number of wins for given team public int wins(String team) { validateTeam(team); return teams.get(team).w; } private void validateTeam(String team) { if (!teams.containsKey(team)) throw new IllegalArgumentException("Team does not exist in the input file"); } // number of losses for given team public int losses(String team) { validateTeam(team); return teams.get(team).l; } // number of remaining games for given team public int remaining(String team) { validateTeam(team); return teams.get(team).r; } // number of remaining games between team1 and team2 public int against(String team1, String team2) { validateTeam(team1); validateTeam(team2); return teams.get(team1).g[teams.get(team2).id]; } // is given team eliminated? public boolean isEliminated(String team) { validateTeam(team); return teams.get(team).eliminationCertificate != null; } // subset R of teams that eliminates given team; null if not eliminated public Iterable<String> certificateOfElimination(String team) { validateTeam(team); return teams.get(team).eliminationCertificate; } private static class Team { private String name; private int id; private int w; private int l; private int r; private int[] g; private Set<String> eliminationCertificate; } }
[ "novakov.alex@gmail.com" ]
novakov.alex@gmail.com
0d5091fd13ac1696bb46b54c087e61d08235401f
ac1cda2f5e56d30514b152648cf5684e98bc6fa0
/app/src/main/java/com/example/musicplayer/Fragment/PlayLocalMusicFragment.java
c850664415838084e822ebbd95f21df3f2c3fa20
[]
no_license
xieyipeng/MusicPlayer
8e6fa96d4a1d0d5cc4e4d92f6b756de0c2412e6b
87456b5fe773c8c799803286c6c247c24e08377f
refs/heads/master
2020-03-17T13:49:12.294932
2018-05-16T09:57:45
2018-05-16T09:57:45
133,645,892
0
0
null
null
null
null
UTF-8
Java
false
false
11,948
java
package com.example.musicplayer.Fragment; import android.Manifest; import android.media.MediaPlayer; import android.os.Bundle; import android.support.annotation.DrawableRes; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.SeekBar; import android.widget.Toast; import com.example.musicplayer.R; import com.example.musicplayer.adpter.SongAdapter; import com.example.musicplayer.bean.Song; import com.example.musicplayer.utils.AudioUtils; import com.example.musicplayer.utils.RequestPermissions; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Random; /** * * Created by 解奕鹏 on 2018/1/22. */ public class PlayLocalMusicFragment extends Fragment implements View.OnClickListener,SeekBar.OnSeekBarChangeListener{ private RecyclerView mSongRecyclerView; private SeekBar mSeekBar; private ImageView mPlayModeImageView; private ImageView mSikpPreviousImageView; private ImageView mSikpNextImageView; private ImageView mPlayOrPauseImageView; private MediaPlayer mediaPlayer=new MediaPlayer(); private int songIndex=-1; private int RANDOM_MODE=R.drawable.ic_random; private int QUEUE_MODE=R.drawable.ic_queue; private int REPEAD_MODE=R.drawable.ic_repeat_one; @DrawableRes private int playMode=RANDOM_MODE; private SongAdapter mAdapter; private List<Song> mSongList=new ArrayList<>(); @Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); mAdapter=new SongAdapter(getContext(),mSongList); } @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_play_music,container,false); } @Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); mSongRecyclerView=view.findViewById(R.id.song_recycler_view); mSeekBar=view.findViewById(R.id.seek_bar); mPlayModeImageView=view.findViewById(R.id.play_mode_image_view); mSikpNextImageView=view.findViewById(R.id.skip_next_image_view); mSikpPreviousImageView=view.findViewById(R.id.skip_previous_image_view); mPlayOrPauseImageView=view.findViewById(R.id.play_or_pause_image_view); RequestPermissions.requestPermissions(getActivity(), new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}, new RequestPermissions.OnPermissionsRequestListener() { @Override public void onGranted() { loadLocalMusic(); initEvnt(); } @Override public void onDenied(List<String> deniedList) { } }); } @Override public void onDestroy() { super.onDestroy(); if(null!=mediaPlayer){ mediaPlayer.stop(); mediaPlayer.release(); } } private void loadLocalMusic(){ //不要在UI线程下耗时操作 new Thread(new Runnable() { @Override public void run() { final List<Song> songs = AudioUtils.getAllSongs(getContext()); //不在非UI线程下更新UI //匿名内部类访问局部变量要加 final getActivity().runOnUiThread(new Runnable() { @Override public void run() { mAdapter.addSongs(songs); } }); } }).start(); } private void initEvnt(){ mSongRecyclerView.setLayoutManager(new LinearLayoutManager(getContext())); mSongRecyclerView.setAdapter(mAdapter); mAdapter.setOnItemClickListener(new SongAdapter.OnItemClickListener() { @Override public void onClick(Song song) { playMusic(song); } }); ChangePlayMode(playMode); mSikpPreviousImageView.setOnClickListener(this); mSikpNextImageView.setOnClickListener(this); mPlayOrPauseImageView.setOnClickListener(this); mPlayModeImageView.setOnClickListener(this); mSeekBar.setOnSeekBarChangeListener(this); } //ctrl+F12 private void playMusic(Song song){ try { mediaPlayer.reset(); mediaPlayer.setDataSource(song.getFileUrl()); mediaPlayer.prepare(); mediaPlayer.start(); songIndex=mSongList.indexOf(song); mPlayOrPauseImageView.setImageResource(R.drawable.ic_pause); //设置播放 activity bar AppCompatActivity appCompatActivity=(AppCompatActivity)getActivity(); appCompatActivity.getSupportActionBar().setTitle(song.getTitle()); appCompatActivity.getSupportActionBar().setSubtitle(song.getSinger()+"-"+song.getAlbum()); //设置seekBar的最大值 mSeekBar.setMax(song.getDuration()); //开始更新进度条 new Thread(mRunnable).start(); } catch (IOException e) { e.printStackTrace(); } } @Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { super.onRequestPermissionsResult(requestCode, permissions, grantResults); RequestPermissions.onRequestPermissionsResult(requestCode,permissions,grantResults); } @Override public void onClick(View v) { switch (v.getId()){ case R.id.skip_next_image_view: PlayNextSong(); break; case R.id.skip_previous_image_view: if (!mediaPlayer.isPlaying()){ return; } if (songIndex==0){ songIndex=mSongList.size()-1; Toast.makeText(getActivity(), "最后一首", Toast.LENGTH_SHORT).show(); }else { songIndex--; Toast.makeText(getActivity(), "上一首", Toast.LENGTH_SHORT).show(); } break; case R.id.play_mode_image_view: if (playMode==RANDOM_MODE){ playMode=QUEUE_MODE; Toast.makeText(getActivity(), "列表循环", Toast.LENGTH_SHORT).show(); }else { if (playMode==QUEUE_MODE){ playMode=REPEAD_MODE; Toast.makeText(getActivity(), "单曲循环", Toast.LENGTH_SHORT).show(); }else { if (playMode==REPEAD_MODE){ playMode=RANDOM_MODE; Toast.makeText(getActivity(), "随机播放", Toast.LENGTH_SHORT).show(); } } } ChangePlayMode(playMode); break; case R.id.play_or_pause_image_view: if (mediaPlayer.isPlaying()){ mediaPlayer.pause(); mPlayOrPauseImageView.setImageResource(R.drawable.ic_play); //Toast.makeText(getActivity(), "暂停", Toast.LENGTH_SHORT).show(); }else { if (songIndex==-1&&mSongList.isEmpty()){ if (playMode==RANDOM_MODE){ songIndex=new Random().nextInt(mSongList.size()); }else { songIndex=0; } playMusic(mSongList.get(songIndex)); } mPlayOrPauseImageView.setImageResource(R.drawable.ic_pause); mediaPlayer.start(); //Toast.makeText(getActivity(), "播放", Toast.LENGTH_SHORT).show(); new Thread(mRunnable).start(); } break; } } private void PlayNextSong() { if (!mediaPlayer.isPlaying()){ return; } if (playMode== RANDOM_MODE){ songIndex=new Random().nextInt(mSongList.size()-1); Toast.makeText(getActivity(), "随机下一首", Toast.LENGTH_SHORT).show(); }else { if(songIndex==mSongList.size()-1){ songIndex=0; Toast.makeText(getActivity(), "第一首", Toast.LENGTH_SHORT).show(); }else { songIndex++; Toast.makeText(getActivity(), "下一首", Toast.LENGTH_SHORT).show(); } } playMusic(mSongList.get(songIndex)); } private void ChangePlayMode(final int playMode){ if (playMode==REPEAD_MODE){ mediaPlayer.setLooping(true); } if (playMode==RANDOM_MODE){ mediaPlayer.setLooping(false); mediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() { @Override public void onCompletion(MediaPlayer mp) { playMusic(mSongList.get(new Random().nextInt(mSongList.size()))); } }); } if (playMode==QUEUE_MODE){ mediaPlayer.setLooping(false); mediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() { @Override public void onCompletion(MediaPlayer mp) { playMusic(mSongList.get((songIndex+1)%mSongList.size())); } }); } mPlayModeImageView.setImageResource(playMode); } //实时根据音乐时间更新进度条 //子线程 Runnable mRunnable=new Runnable() { @Override public void run() { while (mediaPlayer.isPlaying()) { mSeekBar.setProgress(mediaPlayer.getCurrentPosition()); } } }; //seek bar 接口里的三个方法 /** * 当进度更改的时候调用 * @param seekBar * @param progress * @param fromUser */ @Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { } /** * 开始改变进度的时候调用 * @param seekBar */ @Override public void onStartTrackingTouch(SeekBar seekBar) { } /** * 结束拖拽进度时调用 * @param seekBar */ @Override public void onStopTrackingTouch(SeekBar seekBar) { if(songIndex==-1){ return; } if (seekBar.getProgress()==seekBar.getMax()){ if (playMode!=REPEAD_MODE){ PlayNextSong(); } mSeekBar.setProgress(0); } mediaPlayer.seekTo(seekBar.getProgress()); //改变进度后如果是终止状态则变更为播放状态 if (!mediaPlayer.isPlaying()){ mediaPlayer.start(); mPlayOrPauseImageView.setImageResource(R.drawable.ic_pause); new Thread(mRunnable).start(); } } }
[ "32957035+xieyipeng@users.noreply.github.com" ]
32957035+xieyipeng@users.noreply.github.com
9461c9eacecc813a00050fef8fb1c2d570692f25
fdcf5d56f87684db740971bb0b0fe04f9e119cfa
/设计模式/38、MVC框架/mvc/src/main/java/com/cbf4life/view/SwfView.java
612b3e41d3450cba102882bee34e22a9c32d54cf
[]
no_license
glacier0315/design-pattern
76428a128491e015379e01e6170d1da91ff29a07
55ad2b044ae1dc6ebfd3a002b292792e003715b0
refs/heads/main
2021-07-10T13:55:00.705336
2017-04-11T09:28:51
2017-04-11T09:28:51
87,915,297
1
1
null
2021-04-30T08:50:15
2017-04-11T09:25:27
Java
UTF-8
Java
false
false
494
java
package com.cbf4life.view; import java.util.Map; /** * @author cbf4Life cbf4life@126.com * I'm glad to share my knowledge with you all. */ public class SwfView extends AbsView { public SwfView(AbsLangData _langData){ super(_langData); } @Override public void assemble() { Map<String,String> langMap = getLangData().getItems(); for(String key:langMap.keySet()){ /* * 组装一个HTTP的请求格式: * http://abc.com/xxx.swf?key1=value&key2=value */ } } }
[ "glacier0315@126.com" ]
glacier0315@126.com
3a4edc7edb91ddace07c8fab319a10eb7d808d51
0d6fe360d29fed26f0f42ca1f4ab35f01a282f0e
/lib/src/main/java/io/github/alttpj/memeforcehunt/lib/package-info.java
d9ac0b77a810fc6e62acf3bb18dbc2ca1e84adc7
[ "Apache-2.0" ]
permissive
alttpj/MemeforceHunt
0ebcb329022d3dc22f5a2a46c927f07e8cb42294
b09dbacca31412c876f45c95de4be03156950877
refs/heads/master
2023-02-07T04:33:53.533109
2020-12-28T16:02:03
2020-12-28T19:12:24
254,931,671
2
2
Apache-2.0
2020-05-25T17:15:40
2020-04-11T18:38:21
Java
UTF-8
Java
false
false
873
java
/* * Copyright 2020-2020 the ALttPJ Team @ https://github.com/alttpj * * 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. */ /** * Library for writing into the rom. */ @Value.Style(jdkOnly = true, stagedBuilder = true, visibility = Value.Style.ImplementationVisibility.PUBLIC) package io.github.alttpj.memeforcehunt.lib; import org.immutables.value.Value;
[ "bmarwell@gmail.com" ]
bmarwell@gmail.com
01da4b7b787992cb92cab7d4fe4b09725699a4c8
0e59c15a7556c8462e126662de37a111960c42b3
/MedKATp/src/org/ohnlp/medkat/taes/sectionFinder/SpecimensSubmittedAnnotation.java
b030f69d6c58ea07761b5013d165abad2a9769a2
[ "Apache-2.0" ]
permissive
RedStarAI/MedKAT
0981e96bd7d230f7c2c19078422785158fee10d9
6732760d30c11e654c61c8e8374d1d151c026ab8
refs/heads/master
2021-08-31T14:10:30.155098
2017-12-21T16:08:54
2017-12-21T16:08:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,562
java
/* First created by JCasGen Wed Jun 11 12:10:51 EDT 2008 */ package org.ohnlp.medkat.taes.sectionFinder; import org.apache.uima.jcas.JCas; import org.apache.uima.jcas.JCasRegistry; import org.apache.uima.jcas.cas.TOP_Type; /** * Updated by JCasGen Mon Mar 23 14:01:47 EDT 2009 * XML source: C:/ohnlp/MedKATp/descriptors/analysis_engine/aggregate/MedKATp.xml * @generated */ public class SpecimensSubmittedAnnotation extends TextSectionAnnotation { /** @generated * @ordered */ public final static int typeIndexID = JCasRegistry.register(SpecimensSubmittedAnnotation.class); /** @generated * @ordered */ public final static int type = typeIndexID; /** @generated */ public int getTypeIndexID() {return typeIndexID;} /** Never called. Disable default constructor * @generated */ protected SpecimensSubmittedAnnotation() {} /** Internal - constructor used by generator * @generated */ public SpecimensSubmittedAnnotation(int addr, TOP_Type type) { super(addr, type); readObject(); } /** @generated */ public SpecimensSubmittedAnnotation(JCas jcas) { super(jcas); readObject(); } /** @generated */ public SpecimensSubmittedAnnotation(JCas jcas, int begin, int end) { super(jcas); setBegin(begin); setEnd(end); readObject(); } /** <!-- begin-user-doc --> * Write your own initialization here * <!-- end-user-doc --> @generated modifiable */ private void readObject() {} }
[ "vamsi.thotakura666@gmail.com" ]
vamsi.thotakura666@gmail.com
d2b2bbfd3d050eb96762409d6f81da3e1c477252
4579b24a8010d8e3f3c2713abafba67560ef8129
/src/main/java/array/LargestNumber.java
577009764480545e79422c5a64cfd4541be64203
[]
no_license
gf53520/leetcode-practice
0356c486c3794dfd7d00100397b6a35ed70d2b9c
1e1237fb3d3f7524b93225d438f1615a8e2fda74
refs/heads/master
2020-05-15T17:16:09.785221
2019-05-13T15:59:07
2020-02-06T08:13:25
182,402,302
0
0
null
null
null
null
UTF-8
Java
false
false
981
java
package array; import java.util.Arrays; import java.util.stream.Collectors; // 179 最大数 /* 给定一组非负整数,重新排列它们的顺序使之组成一个最大的整数。 输入: [10,2] 输出: 210 输入: [3,30,34,5,9] 输出: 9534330 */ // 3放在了34和30中间, 比较34-3和3-34,30-3和3-30 public class LargestNumber { public String largestNumber(int[] nums) { if (nums == null || nums.length == 0) { return ""; } String[] strings = new String[nums.length]; int i = 0; for (int num : nums) { strings[i++] = String.valueOf(num); } Arrays.sort(strings, (o1, o2) -> (o2 + o1).compareTo(o1 + o2)); if ("0".equals(strings[0])) { return "0"; } return Arrays.stream(strings).collect(Collectors.joining("")); } public static void main(String[] args) { LargestNumber largestNumber = new LargestNumber(); System.out.println(largestNumber.largestNumber(new int[]{3, 30, 34, 5, 9})); } }
[ "guifengleaf@gmail.com" ]
guifengleaf@gmail.com
e1d4f405b522719ce21a864e538c3a8d51641a35
2237284b360d62863cb0c6c7059801488e3c9ecd
/library/src/main/java/com/tlw/swing/table/cn/DTableModel.java
b026d45a01dc32cca24c20f1a71cb1a9ec886fda
[]
no_license
tlw-ray/j2se
d7f044244f684a19c6efc9183eafcbb606ef0e70
5b58a7f834ed769fc39cf444df133ced58a10dbe
refs/heads/master
2021-01-19T06:41:01.840398
2020-11-03T05:44:58
2020-11-03T05:44:58
15,003,680
7
0
null
null
null
null
UTF-8
Java
false
false
673
java
package com.tlw.swing.table.cn; import java.util.List; import javax.swing.table.AbstractTableModel; class DTableModel extends AbstractTableModel{ private static final long serialVersionUID = -7095738944219971520L; //<CellData> private List[] listData; private int column; public DTableModel(List[] listData,int column){ this.listData=listData; this.column=column; } public int getColumnCount() { return column; } public int getRowCount() { return listData.length; } public Object getValueAt(int rowIndex, int columnIndex) { CellData cellData=(CellData) listData[rowIndex].get(columnIndex); return cellData==null?null:cellData.getValue(); } }
[ "tlw_ray@163.com" ]
tlw_ray@163.com
6e7a9f4efac8eb9d4f7a6b7c48843448adeb5e40
6e71c8d9dbcfdc6c9737252a99e8aa9bb8df373a
/src/main/java/com/luzko/libraryapp/model/dao/ColumnName.java
373b6ab7d64403fc6b9c952dce2fa77e818678d7
[]
no_license
luzko/libraryapp
dd9ccf9b96536d15f59cc25846fcb216504b6359
9c0a78fe1165284f49bd3630281c1e15efa5f948
refs/heads/master
2023-01-13T14:58:00.652775
2020-11-16T22:28:01
2020-11-16T22:28:01
293,557,511
0
0
null
null
null
null
UTF-8
Java
false
false
2,083
java
package com.luzko.libraryapp.model.dao; public class ColumnName { private ColumnName() { } //users public static final String USER_ID = "user_id"; public static final String LOGIN = "login"; public static final String PASSWORD = "password"; public static final String ROLE_ID_FK = "role_id_fk"; public static final String NAME = "name"; public static final String SURNAME = "surname"; public static final String EMAIL = "email"; public static final String USER_STATUS_ID_FK = "user_status_id_fk"; public static final String CONFIRM_CODE = "confirm"; public static final String AVATAR = "avatar"; public static final String COUNT = "count"; //books public static final String BOOK_ID = "book_id"; public static final String TITLE = "title"; public static final String YEAR = "year"; public static final String PAGES = "pages"; public static final String DESCRIPTION = "description"; public static final String NUMBER_COPIES = "number"; public static final String NUMBER = "number_copies"; public static final String CATEGORY_ID_FK = "category_id_fk"; public static final String CATEGORY = "category"; public static final String AUTHORS = "authors"; public static final String BOOK_COUNT = "count"; //authors public static final String AUTHOR_ID = "author_id"; public static final String AUTHOR = "author"; public static final String AUTHOR_COUNT = "count"; //orders public static final String ORDER_ID = "order_id"; public static final String BOOK_TITLE = "title"; public static final String USER_LOGIN = "login"; public static final String RETURN_DATE = "return_date"; public static final String ORDER_DATE = "order_date"; public static final String ORDER_STATUS = "status"; public static final String ORDER_TYPE = "type"; //orders views public static final String BOOK = "book"; public static final String USER = "user"; public static final String NEW = "new"; public static final String ALL = "all"; }
[ "luzdim45@gmail.com" ]
luzdim45@gmail.com
6469dedcd655f29d90bad326df5af5d2c88c5b31
2490284fb094bd12bc17f6589dbd070d93a734f1
/utils/src/main/java/com/bbq/util/selenium/bean/HttpProxyBean.java
eada6e14df21768867443dc3ffcb473886c658ef
[]
no_license
chuly/utils
c7fdd0aea4317c1b80a8874465ba678fa0148a67
bacf5a7ead5f3d31db6db6eda10a5a56dc607843
refs/heads/master
2021-01-20T13:47:06.675604
2017-05-31T16:14:22
2017-05-31T16:14:22
90,527,756
0
0
null
null
null
null
UTF-8
Java
false
false
1,468
java
package com.bbq.util.selenium.bean; import java.util.Date; public class HttpProxyBean { private String ip; private String port; private String httpType = "http";// 协议类型 http https private String oriUrl;// 来源 private int type;// 10:国内高匿代理,20:国内普通代理,30:国外高匿代理,40:国外普通代理 private String addr;// 地址 private Date createDate;// 创建日期 private String extParam;//额外参数 public String getExtParam() { return extParam; } public void setExtParam(String extParam) { this.extParam = extParam; } public String getIp() { return ip; } public void setIp(String ip) { this.ip = ip; } public String getPort() { return port; } public void setPort(String port) { this.port = port; } public String getOriUrl() { return oriUrl; } public void setOriUrl(String oriUrl) { this.oriUrl = oriUrl; } public int getType() { return type; } public void setType(int type) { this.type = type; } public String getAddr() { return addr; } public void setAddr(String addr) { this.addr = addr; } public Date getCreateDate() { return createDate; } public void setCreateDate(Date createDate) { this.createDate = createDate; } public String getHttpType() { return httpType; } public void setHttpType(String httpType) { this.httpType = httpType; } }
[ "chuly@windows10.microdone.cn" ]
chuly@windows10.microdone.cn
4b6421ad5a03a8305f1f3b2e913fd82d4b7ff524
b475767d79ecf6710546d7de3421217b115c6afe
/src/test/java/one/digitalinnovation/beerstock/service/BeerServiceTest.java
f0829a6b1203c905b8d593f96b775f734d6c2563
[]
no_license
daienelima/beer-api-digital-innovation-one
f21366687e3e92c80752289009bb6360f029edd3
a56df72a40fec7fb93b1260289377c4219f0931a
refs/heads/main
2023-03-22T00:05:31.339080
2021-03-15T23:17:59
2021-03-15T23:17:59
348,092,798
0
0
null
null
null
null
UTF-8
Java
false
false
7,888
java
package one.digitalinnovation.beerstock.service; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.empty; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.lessThan; import static org.hamcrest.Matchers.not; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import java.util.Collections; import java.util.List; import java.util.Optional; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import one.digitalinnovation.beerstock.builder.BeerDTOBuilder; import one.digitalinnovation.beerstock.dto.BeerDTO; import one.digitalinnovation.beerstock.entity.Beer; import one.digitalinnovation.beerstock.exception.BeerAlreadyRegisteredException; import one.digitalinnovation.beerstock.exception.BeerNotFoundException; import one.digitalinnovation.beerstock.exception.BeerStockExceededException; import one.digitalinnovation.beerstock.mapper.BeerMapper; import one.digitalinnovation.beerstock.repository.BeerRepository; @ExtendWith(MockitoExtension.class) public class BeerServiceTest { private static final long INVALID_BEER_ID = 1L; @Mock private BeerRepository beerRepository; private BeerMapper beerMapper = BeerMapper.INSTANCE; @InjectMocks private BeerService beerService; @Test void whenBeerInformedThenItShouldBeCreated() throws BeerAlreadyRegisteredException { // given BeerDTO expectedBeerDTO = BeerDTOBuilder.builder().build().toBeerDTO(); Beer expectedSavedBeer = beerMapper.toModel(expectedBeerDTO); // when when(beerRepository.findByName(expectedBeerDTO.getName())).thenReturn(Optional.empty()); when(beerRepository.save(expectedSavedBeer)).thenReturn(expectedSavedBeer); //then BeerDTO createdBeerDTO = beerService.createBeer(expectedBeerDTO); assertThat(createdBeerDTO.getId(), is(equalTo(expectedBeerDTO.getId()))); assertThat(createdBeerDTO.getName(), is(equalTo(expectedBeerDTO.getName()))); assertThat(createdBeerDTO.getQuantity(), is(equalTo(expectedBeerDTO.getQuantity()))); } @Test void whenAlreadyRegisteredBeerInformedThenAnExceptionShouldBeThrown() { // given BeerDTO expectedBeerDTO = BeerDTOBuilder.builder().build().toBeerDTO(); Beer duplicatedBeer = beerMapper.toModel(expectedBeerDTO); // when when(beerRepository.findByName(expectedBeerDTO.getName())).thenReturn(Optional.of(duplicatedBeer)); // then assertThrows(BeerAlreadyRegisteredException.class, () -> beerService.createBeer(expectedBeerDTO)); } @Test void whenValidBeerNameIsGivenThenReturnABeer() throws BeerNotFoundException { // given BeerDTO expectedFoundBeerDTO = BeerDTOBuilder.builder().build().toBeerDTO(); Beer expectedFoundBeer = beerMapper.toModel(expectedFoundBeerDTO); // when when(beerRepository.findByName(expectedFoundBeer.getName())).thenReturn(Optional.of(expectedFoundBeer)); // then BeerDTO foundBeerDTO = beerService.findByName(expectedFoundBeerDTO.getName()); assertThat(foundBeerDTO, is(equalTo(expectedFoundBeerDTO))); } @Test void whenNotRegisteredBeerNameIsGivenThenThrowAnException() { // given BeerDTO expectedFoundBeerDTO = BeerDTOBuilder.builder().build().toBeerDTO(); // when when(beerRepository.findByName(expectedFoundBeerDTO.getName())).thenReturn(Optional.empty()); // then assertThrows(BeerNotFoundException.class, () -> beerService.findByName(expectedFoundBeerDTO.getName())); } @Test void whenListBeerIsCalledThenReturnAListOfBeers() { // given BeerDTO expectedFoundBeerDTO = BeerDTOBuilder.builder().build().toBeerDTO(); Beer expectedFoundBeer = beerMapper.toModel(expectedFoundBeerDTO); //when when(beerRepository.findAll()).thenReturn(Collections.singletonList(expectedFoundBeer)); //then List<BeerDTO> foundListBeersDTO = beerService.listAll(); assertThat(foundListBeersDTO, is(not(empty()))); assertThat(foundListBeersDTO.get(0), is(equalTo(expectedFoundBeerDTO))); } @Test void whenListBeerIsCalledThenReturnAnEmptyListOfBeers() { //when when(beerRepository.findAll()).thenReturn(Collections.emptyList()); //then List<BeerDTO> foundListBeersDTO = beerService.listAll(); assertThat(foundListBeersDTO, is(empty())); } @Test void whenExclusionIsCalledWithValidIdThenABeerShouldBeDeleted() throws BeerNotFoundException{ // given BeerDTO expectedDeletedBeerDTO = BeerDTOBuilder.builder().build().toBeerDTO(); Beer expectedDeletedBeer = beerMapper.toModel(expectedDeletedBeerDTO); // when when(beerRepository.findById(expectedDeletedBeerDTO.getId())).thenReturn(Optional.of(expectedDeletedBeer)); doNothing().when(beerRepository).deleteById(expectedDeletedBeerDTO.getId()); // then beerService.deleteById(expectedDeletedBeerDTO.getId()); verify(beerRepository, times(1)).findById(expectedDeletedBeerDTO.getId()); verify(beerRepository, times(1)).deleteById(expectedDeletedBeerDTO.getId()); } @Test void whenIncrementIsCalledThenIncrementBeerStock() throws BeerNotFoundException, BeerStockExceededException { //given BeerDTO expectedBeerDTO = BeerDTOBuilder.builder().build().toBeerDTO(); Beer expectedBeer = beerMapper.toModel(expectedBeerDTO); //when when(beerRepository.findById(expectedBeerDTO.getId())).thenReturn(Optional.of(expectedBeer)); when(beerRepository.save(expectedBeer)).thenReturn(expectedBeer); int quantityToIncrement = 10; int expectedQuantityAfterIncrement = expectedBeerDTO.getQuantity() + quantityToIncrement; // then BeerDTO incrementedBeerDTO = beerService.increment(expectedBeerDTO.getId(), quantityToIncrement); assertThat(expectedQuantityAfterIncrement, equalTo(incrementedBeerDTO.getQuantity())); assertThat(expectedQuantityAfterIncrement, lessThan(expectedBeerDTO.getMax())); } @Test void whenIncrementIsGreatherThanMaxThenThrowException() { BeerDTO expectedBeerDTO = BeerDTOBuilder.builder().build().toBeerDTO(); Beer expectedBeer = beerMapper.toModel(expectedBeerDTO); when(beerRepository.findById(expectedBeerDTO.getId())).thenReturn(Optional.of(expectedBeer)); int quantityToIncrement = 80; assertThrows(BeerStockExceededException.class, () -> beerService.increment(expectedBeerDTO.getId(), quantityToIncrement)); } @Test void whenIncrementAfterSumIsGreatherThanMaxThenThrowException() { BeerDTO expectedBeerDTO = BeerDTOBuilder.builder().build().toBeerDTO(); Beer expectedBeer = beerMapper.toModel(expectedBeerDTO); when(beerRepository.findById(expectedBeerDTO.getId())).thenReturn(Optional.of(expectedBeer)); int quantityToIncrement = 45; assertThrows(BeerStockExceededException.class, () -> beerService.increment(expectedBeerDTO.getId(), quantityToIncrement)); } @Test void whenIncrementIsCalledWithInvalidIdThenThrowException() { int quantityToIncrement = 10; when(beerRepository.findById(INVALID_BEER_ID)).thenReturn(Optional.empty()); assertThrows(BeerNotFoundException.class, () -> beerService.increment(INVALID_BEER_ID, quantityToIncrement)); } }
[ "daiene.m17@gmail.com" ]
daiene.m17@gmail.com
dba4df9a8d2a642150fed5f8de380fcebc051a39
f84752e34c1211b68bb1941e011536d1ced76f52
/decorator-pattern/src/com/pattern/concretedecorator/Mocha.java
fa7753dd0d068719e754faec7016f9e11e15c38f
[]
no_license
kkrbharat14/decorator-pattern
4c2ce0c3e3982f8a8d14d8fba3e1fd156296a55c
c0d74d4d000b07f260235b33ff3f581ca908dd39
refs/heads/master
2022-04-26T09:42:36.051741
2020-04-27T22:43:37
2020-04-27T22:43:37
259,126,821
0
0
null
null
null
null
UTF-8
Java
false
false
445
java
package com.pattern.concretedecorator; import com.pattern.component.Beverage; import com.pattern.decorator.CondimentDecorator; public class Mocha extends CondimentDecorator { private Beverage beverage; public Mocha(Beverage beverage) { this.beverage = beverage; } @Override public String getDescription() { return beverage.getDescription()+ ", Mocha"; } @Override public double cost() { return beverage.cost() + 0.15; } }
[ "Bharat.santani@kpn.com" ]
Bharat.santani@kpn.com
b8ebed4fa7460eb35a8fd79028e3e36d9f250248
0fea8574113fff32407b60da2411725de0adc8d9
/Prog1.java
315d3569d754df645bbe5e4d1a9c3eaf9a05d29b
[ "Apache-2.0" ]
permissive
Malleswari299/Milestone1
c1a981cdb1425151bc50206c5a06b5cf1ecff18c
7b46a66558babe37ab617a46e4da0e9cd7d835fe
refs/heads/main
2023-07-06T03:59:02.423506
2021-08-14T04:06:35
2021-08-14T04:06:35
395,882,587
0
0
null
null
null
null
UTF-8
Java
false
false
443
java
import java.io.*; import java.util.Scanner; public class Prog1 { public static void main(String[] args) { int i,number=25; Scanner sc=new Scanner(System.in); int Array[]; Array = new int[number]; for(i=0;i<number;i++) { Array[i]=sc.nextInt(); } int max = Array[0]; for (i = 1; i < number; i++){ if (Array[i] > max) max = Array[i]; } System.out.println(max); } }
[ "noreply@github.com" ]
noreply@github.com
3cce3647d8698d9d7f0e5f77a529ca102eaa48d1
2ac6d8ef15211bdb30a459827723e69dc6ce8dec
/src/ru/defo/servlets/shpt_ctrl/DiffList.java
61dbedd7b892dd2c7023d6b4cd5a9b5ac762a313
[]
no_license
RuslanIvanilov/tsd
fc09c92bde32342112e619904b563af4a56a7bf8
091226faa73763d676c4b7985ffb1214e76a5b98
refs/heads/master
2020-03-29T02:52:48.715969
2018-10-24T23:01:50
2018-10-24T23:01:50
94,647,224
0
0
null
null
null
null
UTF-8
Java
false
false
1,731
java
package ru.defo.servlets.shpt_ctrl; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import ru.defo.util.AppUtil; import ru.defo.util.DefaultValue; /** * Servlet implementation class PrintStart */ @WebServlet("/shpt_ctrl/DiffList") public class DiffList extends HttpServlet { private static final long serialVersionUID = 1L; /** * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse * response) */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { HttpSession session = request.getSession(); response.setContentType("text/html;charset=utf-8"); System.out.println(this.getClass().getSimpleName()); session.setAttribute("backpage", request.getContextPath()+"/"+AppUtil.getPackageName(new Article())+"/"+new Article().getClass().getSimpleName()); session.setAttribute("actionname", DefaultValue.TOSAVE); session.setAttribute("actiondel", null); session.setAttribute("action", request.getContextPath()+"/"+AppUtil.getPackageName(new Save())+"/"+new Save().getClass().getSimpleName()); request.getRequestDispatcher("scanlist.jsp").forward(request, response); } /** * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse * response) */ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request, response); } }
[ "r.ivanilov@gmail.com" ]
r.ivanilov@gmail.com
abc2d32435db45fdcfa0c05fc7d48eccb3e4f9cf
7f6f14a66e971a634f3286c6cf4f1f54a730e2a9
/Sprint 04/TecSus/src/DigiCont/CadastroCliente.java
244b61745e53916be51c34a17cac76848d2d462b
[]
no_license
assenvitor/ProjetoTecSUS
e37dfaae2a3f86fe6a8c2e1b2153ba8cf400c41a
bea49d5ae0eef14708d226b5358a656a25ede440
refs/heads/master
2023-03-21T08:36:27.263673
2021-03-13T17:43:32
2021-03-13T17:43:32
295,708,438
0
0
null
null
null
null
UTF-8
Java
false
false
821
java
package DigiCont; public class CadastroCliente { public int idcliente; public String ClienteNome; public String ClienteEndereco; public String ClienteHidrometro; public int getIdcliente() { return idcliente; } public void setIdcliente(int idcliente) { this.idcliente = idcliente; } public String getClienteNome() { return ClienteNome; } public void setClienteNome(String clienteNome) { ClienteNome = clienteNome; } public String getClienteEndereco() { return ClienteEndereco; } public void setClienteEndereco(String clienteEndereco) { ClienteEndereco = clienteEndereco; } public String getClienteHidrometro() { return ClienteHidrometro; } public void setClienteHidometro(String clienteHidrometro) { ClienteHidrometro = clienteHidrometro; } }
[ "noreply@github.com" ]
noreply@github.com
019e32ba57a8b99032717422794b6b4c4a98f9e5
f8b95cf930ba11571d01faf554404b8e5aba3aef
/app/src/main/java/com/xzzb/bloom/model/MemberInfo.java
215b80fecd08822d219c90f206e2714e18373d1d
[]
no_license
wojiaohehao/Bloom
9003418c01949b21de48255e11d33eb5bc574b56
a20159e61555bf79043c8eb6588ed0f9386841cf
refs/heads/master
2021-01-19T17:36:18.080248
2017-04-15T08:24:01
2017-04-15T08:24:01
88,334,210
0
0
null
null
null
null
UTF-8
Java
false
false
821
java
package com.xzzb.bloom.model; public class MemberInfo { private String userId = ""; private String userName = ""; private String avatar = ""; private boolean isOnVideoChat = false; public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public String getAvatar() { return avatar; } public void setAvatar(String avatar) { this.avatar = avatar; } public boolean isOnVideoChat() { return isOnVideoChat; } public void setIsOnVideoChat(boolean isOnVideoChat) { this.isOnVideoChat = isOnVideoChat; } }
[ "poiug2035!" ]
poiug2035!
c23f5edd2f75257e891ee3bd2f9776f5e6a42c60
8dab0e19f8b9eac9af19777b7bc89b64e86c8050
/Activity_Fragment/src/test/java/com/sagnolo/activity_fragment/ExampleUnitTest.java
fe01c21489b5786b68e140c09a2a288ad199ed31
[]
no_license
sagnolo/Study_Android
2514e38f5fab661f295c21faaeb9b0ea258867ee
3546670de0eb59d62894c2a8c72d050e3b0f49a7
refs/heads/master
2020-04-30T13:41:30.116573
2019-03-26T02:59:27
2019-03-26T02:59:27
176,865,718
0
0
null
null
null
null
UTF-8
Java
false
false
390
java
package com.sagnolo.activity_fragment; import org.junit.Test; import static org.junit.Assert.*; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ public class ExampleUnitTest { @Test public void addition_isCorrect() { assertEquals(4, 2 + 2); } }
[ "rladnjs401@gmail.com" ]
rladnjs401@gmail.com
e8e345aae65aa0d870b77edd67d57f52ef6faf21
967ceeb47d218c332caba343018011ebe5fab475
/WEB-INF/retail_scm_core_src/com/skynet/retailscm/reportline/ReportLineMapper.java
cea6526640c047fc25c5d79a5fba9d390cb523d6
[ "Apache-2.0" ]
permissive
flair2005/retail-scm-integrated
bf14139a03083db9c4156a11c78a6f36f36b2e0b
eacb3bb4acd2e8ee353bf80e8ff636f09f803658
refs/heads/master
2021-06-23T08:02:37.521318
2017-08-10T17:18:50
2017-08-10T17:18:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,030
java
package com.skynet.retailscm.reportline; import java.sql.ResultSet; import java.sql.SQLException; import java.util.Date; import com.skynet.retailscm.BaseRowMapper; import com.skynet.retailscm.report.Report; public class ReportLineMapper extends BaseRowMapper<ReportLine>{ protected ReportLine internalMapRow(ResultSet rs, int rowNumber) throws SQLException{ ReportLine reportLine = getReportLine(); setId(reportLine, rs, rowNumber); setName(reportLine, rs, rowNumber); setOwner(reportLine, rs, rowNumber); setJanuary(reportLine, rs, rowNumber); setFebruary(reportLine, rs, rowNumber); setMarch(reportLine, rs, rowNumber); setApril(reportLine, rs, rowNumber); setMay(reportLine, rs, rowNumber); setJune(reportLine, rs, rowNumber); setJuly(reportLine, rs, rowNumber); setAugust(reportLine, rs, rowNumber); setSeptember(reportLine, rs, rowNumber); setOctober(reportLine, rs, rowNumber); setNovember(reportLine, rs, rowNumber); setDecember(reportLine, rs, rowNumber); setVersion(reportLine, rs, rowNumber); return reportLine; } protected ReportLine getReportLine(){ return new ReportLine(); } protected void setId(ReportLine reportLine, ResultSet rs, int rowNumber) throws SQLException{ //there will be issue when the type is double/int/long String id = rs.getString(ReportLineTable.COLUMN_ID); if(id == null){ //do nothing when nothing found in database return; } reportLine.setId(id); } protected void setName(ReportLine reportLine, ResultSet rs, int rowNumber) throws SQLException{ //there will be issue when the type is double/int/long String name = rs.getString(ReportLineTable.COLUMN_NAME); if(name == null){ //do nothing when nothing found in database return; } reportLine.setName(name); } protected void setOwner(ReportLine reportLine, ResultSet rs, int rowNumber) throws SQLException{ String reportId = rs.getString(ReportLineTable.COLUMN_OWNER); if( reportId == null){ return; } if( reportId.isEmpty()){ return; } Report report = reportLine.getOwner(); if( report != null ){ //if the root object 'reportLine' already have the property, just set the id for it; report.setId(reportId); return; } reportLine.setOwner(createEmptyOwner(reportId)); } protected void setJanuary(ReportLine reportLine, ResultSet rs, int rowNumber) throws SQLException{ //there will be issue when the type is double/int/long Double january = rs.getDouble(ReportLineTable.COLUMN_JANUARY); if(january == null){ //do nothing when nothing found in database return; } reportLine.setJanuary(january); } protected void setFebruary(ReportLine reportLine, ResultSet rs, int rowNumber) throws SQLException{ //there will be issue when the type is double/int/long Double february = rs.getDouble(ReportLineTable.COLUMN_FEBRUARY); if(february == null){ //do nothing when nothing found in database return; } reportLine.setFebruary(february); } protected void setMarch(ReportLine reportLine, ResultSet rs, int rowNumber) throws SQLException{ //there will be issue when the type is double/int/long Double march = rs.getDouble(ReportLineTable.COLUMN_MARCH); if(march == null){ //do nothing when nothing found in database return; } reportLine.setMarch(march); } protected void setApril(ReportLine reportLine, ResultSet rs, int rowNumber) throws SQLException{ //there will be issue when the type is double/int/long Double april = rs.getDouble(ReportLineTable.COLUMN_APRIL); if(april == null){ //do nothing when nothing found in database return; } reportLine.setApril(april); } protected void setMay(ReportLine reportLine, ResultSet rs, int rowNumber) throws SQLException{ //there will be issue when the type is double/int/long Double may = rs.getDouble(ReportLineTable.COLUMN_MAY); if(may == null){ //do nothing when nothing found in database return; } reportLine.setMay(may); } protected void setJune(ReportLine reportLine, ResultSet rs, int rowNumber) throws SQLException{ //there will be issue when the type is double/int/long Double june = rs.getDouble(ReportLineTable.COLUMN_JUNE); if(june == null){ //do nothing when nothing found in database return; } reportLine.setJune(june); } protected void setJuly(ReportLine reportLine, ResultSet rs, int rowNumber) throws SQLException{ //there will be issue when the type is double/int/long Double july = rs.getDouble(ReportLineTable.COLUMN_JULY); if(july == null){ //do nothing when nothing found in database return; } reportLine.setJuly(july); } protected void setAugust(ReportLine reportLine, ResultSet rs, int rowNumber) throws SQLException{ //there will be issue when the type is double/int/long Double august = rs.getDouble(ReportLineTable.COLUMN_AUGUST); if(august == null){ //do nothing when nothing found in database return; } reportLine.setAugust(august); } protected void setSeptember(ReportLine reportLine, ResultSet rs, int rowNumber) throws SQLException{ //there will be issue when the type is double/int/long Double september = rs.getDouble(ReportLineTable.COLUMN_SEPTEMBER); if(september == null){ //do nothing when nothing found in database return; } reportLine.setSeptember(september); } protected void setOctober(ReportLine reportLine, ResultSet rs, int rowNumber) throws SQLException{ //there will be issue when the type is double/int/long Double october = rs.getDouble(ReportLineTable.COLUMN_OCTOBER); if(october == null){ //do nothing when nothing found in database return; } reportLine.setOctober(october); } protected void setNovember(ReportLine reportLine, ResultSet rs, int rowNumber) throws SQLException{ //there will be issue when the type is double/int/long Double november = rs.getDouble(ReportLineTable.COLUMN_NOVEMBER); if(november == null){ //do nothing when nothing found in database return; } reportLine.setNovember(november); } protected void setDecember(ReportLine reportLine, ResultSet rs, int rowNumber) throws SQLException{ //there will be issue when the type is double/int/long Double december = rs.getDouble(ReportLineTable.COLUMN_DECEMBER); if(december == null){ //do nothing when nothing found in database return; } reportLine.setDecember(december); } protected void setVersion(ReportLine reportLine, ResultSet rs, int rowNumber) throws SQLException{ //there will be issue when the type is double/int/long Integer version = rs.getInt(ReportLineTable.COLUMN_VERSION); if(version == null){ //do nothing when nothing found in database return; } reportLine.setVersion(version); } protected Report createEmptyOwner(String reportId){ Report report = new Report(); report.setId(reportId); return report; } }
[ "philip_chang@163.com" ]
philip_chang@163.com
f756c502480534ee0ba0c8385579a9c01f332d6a
cec553215023a3cdbac1aff83d1363835fe85ec0
/Tipo2/src/Main2.java
9cfbef35c1e9fab547f260e6288430752d8d8092
[]
no_license
FabiolaKretzer/INE5404
b9558fb2fde30bac724a204efa7da8eaedc72d65
3041b21b42501c59cd31642b1f955d69119488c0
refs/heads/master
2021-05-11T16:12:21.261841
2018-01-16T23:35:39
2018-01-16T23:35:39
117,756,129
0
0
null
null
null
null
UTF-8
Java
false
false
1,524
java
import javax.swing.*; import java.awt.*; import java.awt.event.*; class Main2 { public static void main(String[] dsds) { JFrame f; f = new JFrame(); Reprodutor rep; f.setContentPane(rep = new Reprodutor()); //rep.addFig(new DesenhoOval()); //rep.addFig(new DesenhoQuadrado()); rep.addMouseListener(new OuveCliques()); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.setSize(400,500); f.setVisible(true); } }// class Reprodutor extends JPanel { private Reproduzivel[] fig = new Reproduzivel[50000]; private int prox = 0; void addFig(Reproduzivel fig) { this.fig[prox++] = fig; } public void paintComponent(Graphics g) { super.paintComponent(g); //***** for(int i = 0; i<prox; i++) { fig[i].reproduzir(g); } //***** } } class OuveCliques implements MouseListener { public void mouseClicked(MouseEvent e) { int x,y; x = e.getX(); y = e.getY(); System.out.print("clique("+ x +","+ y +") - "); } public void mousePressed(MouseEvent e) {} public void mouseReleased(MouseEvent e) {} public void mouseEntered(MouseEvent e) {} public void mouseExited(MouseEvent e) {} } interface Reproduzivel { void reproduzir(Graphics g); } class DesenhoOval implements Reproduzivel { public void reproduzir(Graphics g) { g.drawOval(50,100,80,80); } } class DesenhoQuadrado implements Reproduzivel { public void reproduzir(Graphics g) { g.drawRect(50,100,80,80); } }
[ "fabiolakretzer@hotmail.com" ]
fabiolakretzer@hotmail.com
8ba337e66d66a3e75585354cad69faf9dbbf45c4
da889968b2cc15fc27f974e30254c7103dc4c67e
/Optimization Algorithm_GUI/src/Input_Output_txt/Double_Auction/Read_Set_intput_CATS_Buyer_Parameter.java
1b364bfac51866daf24bf35b0e84bcac630ebb60
[]
no_license
say88888/My_Project_thesis
fcd4d96b34de8627fa054146eb6164b7c3636344
04908ea3ed6b7a9c1939a5d8e16dfc65d66437f4
refs/heads/master
2020-04-10T08:32:37.106239
2018-12-08T05:52:44
2018-12-08T05:52:44
160,908,221
0
0
null
null
null
null
UTF-8
Java
false
false
2,408
java
package Input_Output_txt.Double_Auction; import java.io.BufferedReader; import java.io.FileReader; import GUI.I_Set_Paths_for_Current_Simulation_Example; public class Read_Set_intput_CATS_Buyer_Parameter { private static String d_value; private static int goods_value; private static int bids_value; private static String[][] Parameter = new String[3][2]; private static String d_value1; private static int goods_value1; private static int bids_value1; private static String[][] Parameter1 = new String[3][2]; public static void Single_Auction() { // TODO Auto-generated method stub String str; int d = 0; try { FileReader PBr = new FileReader( I_Set_Paths_for_Current_Simulation_Example.path() + "\\CATS_Auction\\Single_Auction\\Set_intput_CATS_Buyer_Parameter.txt"); BufferedReader br = new BufferedReader(PBr); while ((str = br.readLine()) != null) { // 每次讀一行 Parameter[d++] = str.split("=| "); // 將此行以空白(white space)切成字串陣列, // 存入 Vector暫存 } br.close(); // 關檔 } catch (Exception e) { e.printStackTrace(); } d_value =Parameter[0][1]; goods_value = Integer.parseInt(Parameter[1][1]); bids_value = Integer.parseInt(Parameter[2][1]); } public static void Double_Auction() { // TODO Auto-generated method stub String str; int d = 0; try { FileReader PBr = new FileReader( I_Set_Paths_for_Current_Simulation_Example.path() + "\\CATS_Auction\\Double_Auction\\Set_intput_CATS_Buyer_Parameter.txt"); BufferedReader br = new BufferedReader(PBr); while ((str = br.readLine()) != null) { // 每次讀一行 Parameter1[d++] = str.split("=| "); // 將此行以空白(white space)切成字串陣列, // 存入 Vector暫存 } br.close(); // 關檔 } catch (Exception e) { e.printStackTrace(); } d_value1 =Parameter1[0][1]; goods_value1 = Integer.parseInt(Parameter1[1][1]); bids_value1 = Integer.parseInt(Parameter1[2][1]); } public static String d_value() { return d_value; } public static int goods_value() { return goods_value; } public static int bids_value() { return bids_value; } public static String d_value1() { return d_value1; } public static int goods_value1() { return goods_value1; } public static int bids_value1() { return bids_value1; } }
[ "gtvsta99@gmail.com" ]
gtvsta99@gmail.com
393358bd733743749fcd196e3724d984a8afe48e
56e9ecff6dddf36453c0b48a60a1fc8db6f08879
/config/src/main/java/org/springframework/security/config/annotation/web/configurers/DefaultLoginPageConfigurer.java
2172e693717bbee4a57bd83f6fe9e7acdc7786c6
[ "Apache-2.0" ]
permissive
Contrast-Security-OSS/spring-security
c94248c16d86c7f9157d1d48501cf7167d5868eb
bef354fe750f7208b8e4e8a9cfdf9a9d1917e984
refs/heads/master
2020-02-26T13:11:08.408315
2014-11-13T18:47:22
2014-11-13T18:47:22
25,587,725
1
2
null
null
null
null
UTF-8
Java
false
false
3,314
java
/* * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * 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.security.config.annotation.web.configurers; import org.springframework.security.config.annotation.web.HttpSecurityBuilder; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.web.AuthenticationEntryPoint; import org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter; /** * Adds a Filter that will generate a login page if one is not specified otherwise when using {@link WebSecurityConfigurerAdapter}. * * <p> * By default an {@link org.springframework.security.web.access.channel.InsecureChannelProcessor} and a {@link org.springframework.security.web.access.channel.SecureChannelProcessor} will be registered. * </p> * * <h2>Security Filters</h2> * * The following Filters are conditionally populated * * <ul> * <li>{@link DefaultLoginPageGeneratingFilter} if the {@link FormLoginConfigurer} did not have a login page specified</li> * </ul> * * <h2>Shared Objects Created</h2> * * No shared objects are created. *isLogoutRequest * <h2>Shared Objects Used</h2> * * The following shared objects are used: * * <ul> * <li>{@link org.springframework.security.web.PortMapper} is used to create the default {@link org.springframework.security.web.access.channel.ChannelProcessor} instances</li> * <li>{@link FormLoginConfigurer} is used to determine if the {@link DefaultLoginPageConfigurer} should be added and how to configure it.</li> * </ul> * * @see WebSecurityConfigurerAdapter * * @author Rob Winch * @since 3.2 */ public final class DefaultLoginPageConfigurer<H extends HttpSecurityBuilder<H>> extends AbstractHttpConfigurer<DefaultLoginPageConfigurer<H>,H> { private DefaultLoginPageGeneratingFilter loginPageGeneratingFilter = new DefaultLoginPageGeneratingFilter(); @Override public void init(H http) throws Exception { http.setSharedObject(DefaultLoginPageGeneratingFilter.class, loginPageGeneratingFilter); } @Override @SuppressWarnings("unchecked") public void configure(H http) throws Exception { AuthenticationEntryPoint authenticationEntryPoint = null; ExceptionHandlingConfigurer<?> exceptionConf = http.getConfigurer(ExceptionHandlingConfigurer.class); if(exceptionConf != null) { authenticationEntryPoint = exceptionConf.getAuthenticationEntryPoint(); } if(loginPageGeneratingFilter.isEnabled() && authenticationEntryPoint == null) { loginPageGeneratingFilter = postProcess(loginPageGeneratingFilter); http.addFilter(loginPageGeneratingFilter); } } }
[ "rwinch@vmware.com" ]
rwinch@vmware.com
3ec838e98c06a5e730899cde167f7d179d9cfce6
7187bfea6e16ed0573ff68a26f9a02be12fb5f27
/Udemy/The Complete Android N Developer Course/AndroidWearDemo/app/src/main/java/com/vinicius/androidweardemo/MainActivity.java
97bfe72cd0c72b79ba572db709f15e54afc6e3ab
[]
no_license
vinipachecov/Android
784f3528e776039dfc1ca2113cebc150e4c0f3bb
a835bf2476de3719a9fb017b8be26c5d04ad66e0
refs/heads/master
2021-01-23T05:03:50.923729
2017-10-03T16:24:46
2017-10-03T16:24:46
86,269,898
1
1
null
null
null
null
UTF-8
Java
false
false
784
java
package com.vinicius.androidweardemo; import android.app.Activity; import android.os.Bundle; import android.support.wearable.view.WatchViewStub; import android.widget.TextView; public class MainActivity extends Activity { private TextView mTextView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); final WatchViewStub stub = (WatchViewStub) findViewById(R.id.watch_view_stub); stub.setOnLayoutInflatedListener(new WatchViewStub.OnLayoutInflatedListener() { @Override public void onLayoutInflated(WatchViewStub stub) { mTextView = (TextView) stub.findViewById(R.id.text); } }); } }
[ "vinipachecov@gmail.com" ]
vinipachecov@gmail.com
2d04d26a8912a614fb40bd19c4d28d3953f550c6
75b2bbfbb0b516595ec455811894b793e8f57e60
/app/src/main/java/com/compta/firstak/notedefrais/adapter/FactureAdapter.java
a2b150b55f1306ee220cad378f84b1f11245989e
[]
no_license
ghadhab/NoteDeFrais
3e5eb06dcf8504d0fc9b858954925a5df0f07f57
cf32dacda235850747dc852ae256cd0cbdd45bb6
refs/heads/master
2021-01-20T01:17:18.496705
2016-07-14T11:18:37
2016-07-14T11:18:37
89,250,190
0
0
null
null
null
null
UTF-8
Java
false
false
2,103
java
package com.compta.firstak.notedefrais.adapter; import android.app.Activity; import android.content.Context; import android.graphics.Color; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.TextView; import com.compta.firstak.notedefrais.entity.Facture; import com.compta.firstak.notedefrais.R; import java.util.ArrayList; public class FactureAdapter extends ArrayAdapter<Facture>{ // Your sent context private Context context; // Your custom values for the spinner (User) private ArrayList<Facture> values; public FactureAdapter(Context context, int textViewResourceId, ArrayList<Facture> values) { super(context, textViewResourceId, values); this.context = context; this.values = values; } public int getCount(){ return values.size(); } public Facture getItem(int position){ return values.get(position); } public long getItemId(int position){ return position; } @Override public View getView(int position, View convertView, ViewGroup parent) { // I created a dynamic TextView here, but you can reference your own custom layout for each spinner item Activity activity = (Activity) getContext(); LayoutInflater inflater = activity.getLayoutInflater(); View rowView = inflater.inflate(R.layout.my_custum_list_view_facture, null); TextView textViewTitle = (TextView) rowView.findViewById(R.id.title_choose); textViewTitle.setText(values.get(position).getName()+" "+values.get(position).getNofacture()); return rowView; } @Override public View getDropDownView(int position, View convertView, ViewGroup parent) { TextView label = new TextView(context); label.setTextColor(Color.BLACK); label.setText(values.get(position).getName()+" "+values.get(position).getNofacture()); label.setPadding(20, 20, 20, 20); return label; } }
[ "mohamedsahbi.nakhli@esprit.tn" ]
mohamedsahbi.nakhli@esprit.tn
c00e6860656f276b8e6c173466d3374f443b01ab
9e898a099c727b0d44f7bfe42ed48f704db56ac7
/app/build/generated/source/kapt/debug/hilt_aggregated_deps/com_alican_workapp_ui_main_albums_AlbumsViewModel_HiltModules_KeyModuleModuleDeps.java
fe76d4ae930d3a4eee2cf171dddf43221d9e9dc0
[]
no_license
alicansekban/AlbumsApp
7a34de8c9eeb581c7c869726db5f870dc4a74b8f
8fc153a7536b3e4a56d11af0676dd8bb5a220388
refs/heads/master
2023-07-10T04:19:46.648089
2021-07-31T09:28:03
2021-07-31T09:28:03
391,306,375
0
0
null
null
null
null
UTF-8
Java
false
false
453
java
package hilt_aggregated_deps; import dagger.hilt.processor.internal.aggregateddeps.AggregatedDeps; /** * Generated class to pass information through multiple javac runs. */ @AggregatedDeps( components = "dagger.hilt.android.components.ActivityRetainedComponent", modules = "com.alican.workapp.ui.main.albums.AlbumsViewModel_HiltModules.KeyModule" ) class com_alican_workapp_ui_main_albums_AlbumsViewModel_HiltModules_KeyModuleModuleDeps { }
[ "alicansekban@kukapps.com" ]
alicansekban@kukapps.com
041c9581b60693cdfe21d81817a34c9716396553
4e8b791d3cc2376c06e9e2de41a0e41a5490c4be
/src/main/java/Chen/Actions/ChenActions/FlashAction.java
f6b9223789d11dc9a84e1f1a3b0264db0b0fa2d2
[]
no_license
Alchyr/Chen
e117516c61f34e87893b98537f3e33c9d1a006a8
b0a4389cfe09f6e4be9e452b476d5f690930f19a
refs/heads/master
2023-08-09T03:34:47.372011
2023-01-01T22:28:04
2023-01-01T22:28:04
169,192,733
1
2
null
2019-07-30T09:19:38
2019-02-05T04:59:47
Java
UTF-8
Java
false
false
1,913
java
package Chen.Actions.ChenActions; import Chen.Effects.RandomFastSliceEffect; import com.badlogic.gdx.graphics.Color; import com.megacrit.cardcrawl.actions.AbstractGameAction; import com.megacrit.cardcrawl.actions.utility.WaitAction; import com.megacrit.cardcrawl.cards.DamageInfo; import com.megacrit.cardcrawl.core.Settings; import com.megacrit.cardcrawl.dungeons.AbstractDungeon; public class FlashAction extends AbstractGameAction { private DamageInfo damageInfo; private int hits; public FlashAction(DamageInfo damageInfo, int hits) { this.actionType = ActionType.DAMAGE; this.source = damageInfo.owner; this.damageInfo = damageInfo; this.attackEffect = AttackEffect.SLASH_HORIZONTAL; this.hits = hits; } @Override public void update() { this.target = AbstractDungeon.getMonsters().getRandomMonster(null, true, AbstractDungeon.cardRandomRng); if (this.target == null || hits <= 0) { this.isDone = true; } else if (AbstractDungeon.getCurrRoom().monsters.areMonstersBasicallyDead()) { AbstractDungeon.actionManager.clearPostCombatActions(); this.isDone = true; } else { if (this.target.currentHealth > 0) { this.damageInfo.applyPowers(this.damageInfo.owner, this.target); AbstractDungeon.effectList.add(new RandomFastSliceEffect(target.hb.cX, target.hb.cY, Color.GOLD, Color.WHITE)); this.target.damage(this.damageInfo); if (this.hits > 1 && !AbstractDungeon.getMonsters().areMonstersBasicallyDead()) { --this.hits; AbstractDungeon.actionManager.addToTop(new FlashAction(damageInfo, hits)); } AbstractDungeon.actionManager.addToTop(new WaitAction(0.05F)); } this.isDone = true; } } }
[ "IsithAlchyr@gmail.com" ]
IsithAlchyr@gmail.com
c212a26ecac43b4c7262e9fb6921df466013db0c
34a671f5d6895aea0b8432ab9bc9c2f008d246bc
/src/main/java/gymob/models/Usuario.java
62130f11d07379b012f90973fc8e4de819b3fe75
[]
no_license
leooliveiraz/gymob_old
6608488a88222ca889f60d3649badc326a640e6a
592d84d66dac5887f3203ae6017c0dd380c675aa
refs/heads/master
2021-09-06T10:48:41.835763
2018-02-05T19:29:01
2018-02-05T19:29:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,189
java
package gymob.models; import java.util.Collection; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.userdetails.UserDetails; import lombok.Data; @Data @Entity public class Usuario implements UserDetails { private static final long serialVersionUID = 8057726859592646555L; @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private Long id; private String nome; private String username; private String senha; private String cpf; private String email; private String celular; @Override public Collection<? extends GrantedAuthority> getAuthorities() { return null; } @Override public String getPassword() { return getSenha(); } @Override public String getUsername() { return username; } @Override public boolean isAccountNonExpired() { return true; } @Override public boolean isAccountNonLocked() { return true; } @Override public boolean isCredentialsNonExpired() { return true; } @Override public boolean isEnabled() { return true; } }
[ "leopdor@gmail.com" ]
leopdor@gmail.com
25f15252b55b5a3ee0aee1bcd2e0575c7e540d91
ac35b29b2c916b43ae5bbbc252fb90e0e363eab2
/sp01-commons/src/main/java/com/tedu/sp01/service/UserService.java
e1acf8966a42170e03bb3bc05ca8383d4f7d7972
[]
no_license
fengzi66/test1
7a6db293077061b89cae2ea75be3751c1f2d5409
0990661b5c75ac3fc454b48593c9fd46dddb0322
refs/heads/master
2020-08-03T14:39:39.750304
2019-09-30T07:27:02
2019-09-30T07:27:02
211,788,696
0
0
null
null
null
null
UTF-8
Java
false
false
218
java
package com.tedu.sp01.service; import com.tedu.sp01.pojo.User; public interface UserService { //获取用户 User getUser(Integer id); //增加用户的积分 void addScore(Integer id, Integer score); }
[ "2308986368@qq.com" ]
2308986368@qq.com
5536db4ffbad228acd31e48ba442f24be96e6e30
143eb2593c97ebe2cbeebc30d47ba3bd3135f85d
/EVA2_10_TOASTVIEW1/app/src/main/java/com/example/eva2_10_toastview1/MainActivity.java
004c580ba1b53c82d2a6930c563b7cb0d4e8683b
[]
no_license
22mike22/Unidad-2
ad8bd6c8690c8d9458c9a011cc68702fadb4666a
e1bab805d46030929bb48485414965892e666799
refs/heads/master
2021-05-23T14:33:43.098573
2020-04-05T22:12:53
2020-04-05T22:12:53
253,341,900
0
0
null
null
null
null
UTF-8
Java
false
false
2,239
java
package com.example.eva2_10_toastview1; import androidx.appcompat.app.AppCompatActivity; import android.content.DialogInterface; import android.content.res.Resources; import android.os.Bundle; import android.view.Gravity; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; public class MainActivity extends AppCompatActivity{ EditText txtXCoordinate; EditText txtYCoordinate; TextView txtCaption; Button btnShowToast; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // bind GUI and Java controls txtCaption = (TextView) findViewById(R.id.txtCaption); txtXCoordinate = (EditText) findViewById(R.id.txtXCoordinate); txtYCoordinate = (EditText) findViewById(R.id.txtYCoordinate); btnShowToast = (Button) findViewById(R.id.btnShowToast); // find screen-size and density(dpi) int dpi = Resources.getSystem().getDisplayMetrics().densityDpi; int width= Resources.getSystem().getDisplayMetrics().widthPixels; int height = Resources.getSystem().getDisplayMetrics().heightPixels; txtCaption.append("\n Screen size= " + width + "x" + height +" Density=" + dpi + "dpi"); // show toast centered around selected X,Y coordinates btnShowToast.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { try { Toast myToast = Toast.makeText(getApplicationContext(), "Here", Toast.LENGTH_LONG); myToast.setGravity( Gravity.CENTER, Integer.valueOf(txtXCoordinate.getText().toString()), Integer.valueOf(txtYCoordinate.getText().toString())); myToast.show(); } catch (Exception e) { Toast.makeText(getApplicationContext(), e.getMessage(), Toast.LENGTH_LONG).show(); } } }); }// onCreate }
[ "miguel_222220@hotmail.com" ]
miguel_222220@hotmail.com
add422de1b96fdb328d68d94d425576c1e26d1f4
97282ab646a28e2541810add96a22881ef097c14
/app/src/main/java/com/bracketcove/postrainer/usecase/StartAlarm.java
b3b89ad241c60ffe358629b04ac8a582be5c53f7
[ "Apache-2.0" ]
permissive
AmrDroid/Postrainer
59002b358f3058234f79141b1edc1cc61172c5d4
cb7f846f136bdc372e07d613f389c4985bc22108
refs/heads/master
2020-12-02T17:44:42.703358
2017-07-06T10:56:30
2017-07-06T10:56:30
96,419,677
0
0
null
null
null
null
UTF-8
Java
false
false
610
java
package com.bracketcove.postrainer.usecase; import com.bracketcove.postrainer.data.alarm.AlarmService; import com.bracketcove.postrainer.data.viewmodel.Reminder; import io.reactivex.Completable; import io.reactivex.Observable; /** * * Created by R_KAY on 5/23/2017. */ public class StartAlarm implements UseCase.RequestModel { private final AlarmService alarmService; public StartAlarm(AlarmService alarmService) { this.alarmService = alarmService; } @Override public Observable runUseCase(Reminder reminder) { return alarmService.startAlarm(reminder); } }
[ "amrmostafa1995@gmail.oom" ]
amrmostafa1995@gmail.oom
3634c27f3905786dbd1a9188efd7c89bbdc27a88
83b85ffd19ec854c8a47aa8681529c34262d2c6f
/department-management-dao/src/main/java/com/epam/brest/courses/dao/DepartmentDaoJdbcImpl.java
17fcf9bf002a5806c76cfbfb450ab86fe508589d
[ "Apache-2.0" ]
permissive
Brest-Java-Course-2020/skononovich-department-mgnmnt
67f3e0de58bc2d0e6583b13ca2a2e34fbcd8a901
7ea20aea2e18a651ea62dc9eb0610bd5b5445098
refs/heads/master
2022-12-24T23:32:42.254953
2020-03-12T23:03:54
2020-03-12T23:03:54
240,070,668
0
1
Apache-2.0
2022-12-16T15:30:49
2020-02-12T17:18:11
JavaScript
UTF-8
Java
false
false
4,214
java
package com.epam.brest.courses.dao; import com.epam.brest.courses.model.Department; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Value; import org.springframework.jdbc.core.RowMapper; import org.springframework.jdbc.core.namedparam.MapSqlParameterSource; import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate; import org.springframework.jdbc.core.namedparam.SqlParameterSource; import org.springframework.jdbc.support.GeneratedKeyHolder; import org.springframework.jdbc.support.KeyHolder; import org.springframework.stereotype.Component; import java.sql.ResultSet; import java.sql.SQLException; import java.util.List; import java.util.Objects; import java.util.Optional; @Component public class DepartmentDaoJdbcImpl implements DepartmentDao { private static final Logger LOGGER = LoggerFactory.getLogger(DepartmentDaoJdbcImpl.class); @Value("${department.sqlGetDepartments}") private String sqlGetDepartments; @Value("${department.sqlGetDepartmentById}") private String SQL_GET_DEPARTMENT_BY_ID; @Value("${department.sqlAddDepartment}") private String SQL_ADD_DEPARTMENT; @Value("${department.sqlUpdateDepartment}") private String SQL_UPDATE_DEPARTMENT; @Value("${department.sqlDeleteDepartment}") private String SQL_DELETE_DEPARTMENT; private KeyHolder keyHolder = new GeneratedKeyHolder(); private final NamedParameterJdbcTemplate namedParameterJdbcTemplate; public DepartmentDaoJdbcImpl(NamedParameterJdbcTemplate namedParameterJdbcTemplate) { this.namedParameterJdbcTemplate = namedParameterJdbcTemplate; } @Override public List<Department> getDepartments() { LOGGER.debug("Вызван метод getDepartments"); return namedParameterJdbcTemplate.query(sqlGetDepartments, new DepartmentRowMapper()); } @Override public Optional<Department> getDepartmentById(Integer departmentId) { LOGGER.debug("Вызван метод получения департамента по его ID = " + departmentId); SqlParameterSource parameters = new MapSqlParameterSource().addValue("departmentId", departmentId); return Optional.ofNullable(namedParameterJdbcTemplate.queryForObject( SQL_GET_DEPARTMENT_BY_ID, parameters, new DepartmentRowMapper())); } @Override public int addDepartment(Department department) { LOGGER.debug("Вызван метод добаления департамента:" + department.toString()); SqlParameterSource parameters = new MapSqlParameterSource().addValue("departmentName", department.getDepartmentName()); namedParameterJdbcTemplate.update(SQL_ADD_DEPARTMENT, parameters, keyHolder); return Objects.requireNonNull(keyHolder.getKey()).intValue(); } @Override public int updateDepartment(Department department) { LOGGER.debug("Вызван метод обновления департамента с : id = " + department.getDepartmentId()); MapSqlParameterSource parameters = new MapSqlParameterSource(); parameters.addValue("departmentId", department.getDepartmentId()); parameters.addValue("departmentName", department.getDepartmentName()); return namedParameterJdbcTemplate.update(SQL_UPDATE_DEPARTMENT, parameters); } @Override public int deleteDepartment(Integer departmentId) { LOGGER.debug("Вызван метод удаления департамента : id = " + departmentId); SqlParameterSource parameters = new MapSqlParameterSource().addValue("departmentId", departmentId); return namedParameterJdbcTemplate.update(SQL_DELETE_DEPARTMENT, parameters); } private class DepartmentRowMapper implements RowMapper<Department> { @Override public Department mapRow(ResultSet resultSet, int i) throws SQLException { Department department = new Department(); department.setDepartmentId(resultSet.getInt("DEPARTMENTID")); department.setDepartmentName(resultSet.getString("DEPARTMENTNAME")); return department; } } }
[ "beergood6@gmail.com" ]
beergood6@gmail.com
18218f4aa9e42e14f604d5af7d8ed72b2ad5f50a
64a9063b846597877e68479553bbef10dc538930
/scooter/src/main/java/by/motolyha/scooter/repository/OrderRepository.java
190bfe346ab91a48863a3edd539bf2f4d79a073c
[]
no_license
DanikMotolyha/JavaSpring_3_Course
3380b1ebcf3e1e855e2d01ddeccd8799293c5f31
dd638381098f3e1fe06d3f5044b6f7c0fb80a891
refs/heads/main
2023-02-05T07:27:42.409221
2020-12-14T13:49:10
2020-12-14T13:49:10
305,181,747
0
0
null
null
null
null
UTF-8
Java
false
false
283
java
package by.motolyha.scooter.repository; import by.motolyha.scooter.model.Orders; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; @Repository public interface OrderRepository extends JpaRepository<Orders, Integer> { }
[ "motolyga2000@mail.ru" ]
motolyga2000@mail.ru
c5960e666c9ca05facb6389e285ecc57f7bc0967
ad60cbbf00ae2111beafb7ebd9bd7c2ba3357274
/xjp.app/src/main/java/com/xjp/app/common/exception/MyException.java
3b18ea7e224672c643f24633a351205a2d0e3b0b
[]
no_license
maopanpan/xjp.app
a059a21e8e5084f42c5ff389ee4ea00d463ca6c4
d7e7b06545af14100b317b203b767831e2f0ba2c
refs/heads/master
2021-07-18T05:45:18.070177
2017-10-20T06:28:28
2017-10-20T06:28:28
107,235,262
0
0
null
null
null
null
UTF-8
Java
false
false
207
java
package com.xjp.app.common.exception; /** * @Author: maopanpan * @Description: * @Date: 2017/10/18. **/ public class MyException extends Exception { public MyException() { super(); } }
[ "maopanpan@huizhongcf.com" ]
maopanpan@huizhongcf.com
b03cd125fd20d5ba306d1d74683b5b78e90e06c7
906014fd73f274a110db65c88c63d42a6b364488
/week-04/day-01/src/garden/main.java
4952af27547dcf7103e633cbc8c2afa23e89a173
[]
no_license
green-fox-academy/barnaszabi
f02b59156291b2c6f36e7015fac180b65b60a47f
4bfa2903897e79bf8b35677b71cc298e087fada4
refs/heads/master
2020-07-24T04:33:41.892544
2019-11-12T16:23:48
2019-11-12T16:23:48
207,802,492
3
1
null
null
null
null
UTF-8
Java
false
false
1,147
java
package garden; public class main { public static void main(String[] args) { Flower flower1 = new Flower(0, "yellow"); Flower flower2 = new Flower(0, "blue"); Tree tree1 = new Tree(0, "orange"); Tree tree2 = new Tree(0, "purple"); Garden garden = new Garden(); garden.addPlant(flower1); garden.addPlant(flower2); garden.addPlant(tree1); garden.addPlant(tree2); System.out.println(garden.plants.get(0).toString()); System.out.println(garden.plants.get(1).toString()); System.out.println(garden.plants.get(2).toString()); System.out.println(garden.plants.get(3).toString()); garden.watering(40); System.out.println(garden.plants.get(0).toString()); System.out.println(garden.plants.get(1).toString()); System.out.println(garden.plants.get(2).toString()); System.out.println(garden.plants.get(3).toString()); garden.watering(70); System.out.println(garden.plants.get(0).toString()); System.out.println(garden.plants.get(1).toString()); System.out.println(garden.plants.get(2).toString()); System.out.println(garden.plants.get(3).toString()); } }
[ "barnaszabi97@gmail.com" ]
barnaszabi97@gmail.com
b3969ef469259b62db5a02935c14747e772f55bf
d7acf54d5854e633311e8fe4a739f11856b765b7
/android-camera/src/main/java/com/philpot/camera/control/ImagePreviewController.java
e867dc0df8b14f209e4e4ad6884354b8bb193816
[ "Apache-2.0" ]
permissive
MattPhilpot/CameraConvolution
058db5d176ca653e4faf3bbff013e193148f8c47
5b214f7adf176634e58db27714b6cc39d3e29140
refs/heads/master
2021-07-04T09:53:57.959138
2021-05-14T14:55:22
2021-05-14T14:55:22
237,512,642
0
0
null
null
null
null
UTF-8
Java
false
false
3,879
java
package com.philpot.camera.control; import android.graphics.Bitmap; import android.graphics.Matrix; import android.os.Handler; import com.philpot.camera.filter.ConvolutionFilter; import com.philpot.camera.fragment.ImageEditor; import com.philpot.camera.fragment.ImageHolder; public class ImagePreviewController { private static final int LAP_THRESHOLD = -6118750; private ImageHolder mImageHolder; private ImageEditor mImageEditor; private ImagePreviewControllerCallback mControllerCallback; private boolean isGrayImagePreviewed = false; private boolean mIsBlurryCheckRunning = false; private boolean mIsImageBlurry = false; private boolean mFirstRun = true; public ImagePreviewController(ImageHolder holder, ImageEditor editor, ImagePreviewControllerCallback callback, boolean firstRun) { this.mImageHolder = holder; this.mImageEditor = editor; this.mControllerCallback = callback; this.mFirstRun = firstRun; } public ImageHolder getImageHolder() { return this.mImageHolder; } public ImageEditor getImageEditor() { return this.mImageEditor; } public void rotateImages(int degrees) { mImageHolder.setBaseImage(rotateImage(mImageHolder.getBaseImage(), degrees)); mImageHolder.setImage(rotateImage(mImageHolder.getImage(), degrees)); } private Bitmap rotateImage(Bitmap src, int degrees) { Matrix matrix = new Matrix(); matrix.postRotate(degrees); return Bitmap.createBitmap(src , 0, 0, src.getWidth(), src.getHeight(), matrix, true); } public void fixContrast(float contrastLevel) { if(isGrayImagePreviewed) { mImageHolder.setImage(mImageHolder.getBaseImage()); } else { mImageHolder.setImage(ConvolutionFilter.enhanceBitmap(mImageHolder.getBaseImage(), contrastLevel)); } isGrayImagePreviewed = !isGrayImagePreviewed; } public void adjustContrast(float contrastLevel) { mImageHolder.setImage(ConvolutionFilter.enhanceBitmap(mImageHolder.getBaseImage(), contrastLevel)); } public void returnToCamera() { mImageEditor.takeImage(); } public void saveImageAndFinish() { mImageEditor.returnImage(); } public boolean checkImageQuality() { if(!mIsBlurryCheckRunning && mFirstRun) { mIsBlurryCheckRunning = true; mControllerCallback.imageQualityCheckStarted(); new Thread(new Runnable() { public void run() { mIsImageBlurry = checkIsImageBlurry(); blurryHandler.post(blurryRunnable); mFirstRun = false; mIsBlurryCheckRunning = false; } }).start(); } return mIsBlurryCheckRunning; } private boolean checkIsImageBlurry() { Bitmap bmp = mImageHolder.getImage().copy(mImageHolder.getImage().getConfig(), true); bmp = ConvolutionFilter.applyPrewittConvolution(bmp); bmp = ConvolutionFilter.enhanceBitmap(bmp, 2); int[] pixels = new int[bmp.getHeight() * bmp.getWidth()]; bmp.getPixels(pixels, 0, bmp.getWidth(), 0, 0, bmp.getWidth(), bmp.getHeight()); for (int pixel : pixels) { if (pixel > LAP_THRESHOLD) return false; } return true; } private final Handler blurryHandler = new Handler(); private final Runnable blurryRunnable = new Runnable() { public void run() { mControllerCallback.imageQualityCheckFinished(isImageBlurry()); } }; public boolean isImageBlurry() { return this.mIsImageBlurry; } public boolean getFirstRun() { return this.mFirstRun; } public void setFirstRun(boolean firstRun) { this.mFirstRun = firstRun; } }
[ "mattp@linuxacademy.com" ]
mattp@linuxacademy.com
086ef3c3004192dff1af32dde7945f43509ada9b
a8477115d2f70a54b8b07b704fcea2c0cc85326c
/10Days_SpringMVC3_returnType/src/main/java/com/controller/TestController.java
ee694c1045e4f92408a473c01ae986ab0723eeaf
[]
no_license
peteryoon11/spring_training
23dac64cfb1ddd3247a8e6ee284212966fa38a7c
723e24104ab9a9fafd2129d07a4ca18e028a3795
refs/heads/master
2021-01-19T14:18:36.429217
2017-05-09T02:36:54
2017-05-09T02:36:54
88,142,199
0
0
null
null
null
null
UTF-8
Java
false
false
1,766
java
package com.controller; import java.util.ArrayList; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.SessionAttributes; import org.springframework.web.bind.support.SessionStatus; import org.springframework.web.servlet.ModelAndView; @Controller @SessionAttributes(value={"sess","myCommand"}) public class TestController { // return -> model and view // 1. String -> 보여줄 view 이름으로 분석 aaa.jsp @RequestMapping("/aaa") public String kkk3(Model sess) { sess.addAttribute("myCommand","홍길동"); return "aaa"; } // 2. ModelAndView ==> model 과 view 를 함께 저장가능. @RequestMapping("/info") public ModelAndView kkk4() { ModelAndView mav=new ModelAndView(); mav.setViewName("info"); // info.jsp 를 찾아라 mav.addObject("userid", "홍길동"); mav.addObject("passwd", "adda"); return mav; } // 3. Arraylist ==> model 로 분석 , view 정보 없다. mapping 값에서 찾음 . @ModelAttribute("nnn") @RequestMapping(value="/abc") public ArrayList<String> kkk5(SessionStatus status) { ArrayList<String> list = new ArrayList<String>(); list.add("123"); list.add("456"); list.add("홍길동"); status.setComplete(); return list; } @RequestMapping(value="/www") public void kkk6(Model mod) { mod.addAttribute("key11", "key 입니다."); mod.addAttribute("key12", "key12 입니다."); ArrayList<String> list = new ArrayList<String>(); list.add("123"); list.add("456"); list.add("홍길동"); System.out.println("www"); } }
[ "yjisub11@gmail.com" ]
yjisub11@gmail.com
7fc2c6a8ca5072ff22ff1255437ff50d584dc02c
043b72bd23ade1ea949589aea9298dae2cb58a5b
/exercicios37/comparator/ComparatorNome.java
e69c732ee3f3340935d4eaab121c0f0c053ca5d7
[]
no_license
williamxave/cursoloianejava
98fe382c14d1604127479f9b0bd3242ce4a1872b
cbc2e131bbbcd01db2f49cc3a962160bc20449dd
refs/heads/main
2023-02-08T13:47:58.053814
2020-12-31T02:41:11
2020-12-31T02:41:11
325,694,169
0
0
null
null
null
null
UTF-8
Java
false
false
340
java
package exercicios37.comparator; import java.util.Comparator; import exercicios37.Animal; public class ComparatorNome implements Comparator<Animal> { @Override public int compare(Animal animal1, Animal animal2) { // COMPARA UM COM OUTRO if (animal1.getNome().compareTo(animal2.getNome()) > 0) { return 1; } return -1; } }
[ "williamxavero@gmail.com" ]
williamxavero@gmail.com
4c667fb292c3ad71e2c0036d14a56ec5dc0f8922
ddeb6f5b0d3d1ca05f81c3fd09028808a9fff236
/ihrm-system/src/main/java/top/codecrab/system/shiro/config/ShiroConfig.java
8610c3cc150b85b21ac87d7ef0286b2345ff99be
[]
no_license
Coco-king/ihrm
df651aa5c066e3910960232e9f82d78a0f5e14d9
ed85fb67bd10eac58741eea6926fe7e8a449eacc
refs/heads/main
2023-04-18T04:05:08.773591
2021-04-23T09:29:48
2021-04-23T09:29:48
357,150,220
0
0
null
null
null
null
UTF-8
Java
false
false
3,893
java
package top.codecrab.system.shiro.config; import org.apache.shiro.mgt.SecurityManager; import org.apache.shiro.session.mgt.SessionManager; import org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor; import org.apache.shiro.spring.web.ShiroFilterFactoryBean; import org.apache.shiro.web.mgt.DefaultWebSecurityManager; import org.crazycake.shiro.RedisCacheManager; import org.crazycake.shiro.RedisManager; import org.crazycake.shiro.RedisSessionDAO; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import top.codecrab.common.shiro.realm.IhrmRealm; import top.codecrab.common.shiro.session.CustomWebSessionManager; import top.codecrab.system.shiro.realm.UserRealm; import java.util.LinkedHashMap; import java.util.Map; /** * @author codecrab * @since 2021年04月19日 15:19 */ @Configuration public class ShiroConfig { @Bean public IhrmRealm ihrmRealm() { return new UserRealm(); } /** * redis管理器 * 默认的ip和端口都是 127.0.0.1:6379 */ @Bean public RedisManager redisManager() { return new RedisManager(); } /** * 操作redis的对象 */ @Bean public RedisSessionDAO redisSessionDAO(RedisManager redisManager) { RedisSessionDAO dao = new RedisSessionDAO(); dao.setRedisManager(redisManager); return dao; } /** * redis的缓存控制器 可有可无 */ @Bean public RedisCacheManager redisCacheManager(RedisManager redisManager) { RedisCacheManager cacheManager = new RedisCacheManager(); cacheManager.setRedisManager(redisManager); return cacheManager; } /** * 创建安全管理器 */ @Bean public SecurityManager securityManager( IhrmRealm realm, SessionManager sessionManager, RedisCacheManager redisCacheManager ) { DefaultWebSecurityManager securityManager = new DefaultWebSecurityManager(); securityManager.setRealm(realm); // 标注使用DefaultWebSessionManager securityManager.setSessionManager(sessionManager); // 标注缓存处理器 securityManager.setCacheManager(redisCacheManager); return securityManager; } /** * redis控制器 */ @Bean public SessionManager sessionManager(RedisSessionDAO redisSessionDAO) { CustomWebSessionManager sessionManager = new CustomWebSessionManager(); sessionManager.setSessionDAO(redisSessionDAO); sessionManager.setSessionIdUrlRewritingEnabled(false); sessionManager.setSessionIdCookieEnabled(false); return sessionManager; } /** * 创建路径过滤器 */ @Bean("shiroFilterFactoryBean") public ShiroFilterFactoryBean shiroFilterFactoryBean(SecurityManager securityManager) { ShiroFilterFactoryBean factoryBean = new ShiroFilterFactoryBean(); factoryBean.setLoginUrl("/authError?code=1"); factoryBean.setSecurityManager(securityManager); factoryBean.setUnauthorizedUrl("/authError?code=2"); Map<String, String> filterMap = new LinkedHashMap<>(); //所有用户都可以访问 filterMap.put("/authError", "anon"); filterMap.put("/frame/login", "anon"); filterMap.put("/frame/register/**", "anon"); filterMap.put("/**", "authc"); factoryBean.setFilterChainDefinitionMap(filterMap); return factoryBean; } /** * 开启注解支持 */ @Bean public AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor(SecurityManager securityManager) { AuthorizationAttributeSourceAdvisor advisor = new AuthorizationAttributeSourceAdvisor(); advisor.setSecurityManager(securityManager); return advisor; } }
[ "3060550682@qq.com" ]
3060550682@qq.com
d22fc0939dc09ce56b4c437030b669a1f5a7625a
2e2422f2b36759efa5dc18b36b34d0243f921e91
/src/main/java/com/marom/ipldashboard/JobCompletionNotificationListener.java
5846cc33c05405d3493d68029f4abdc58741fb29
[]
no_license
marom/ipl-dashboard
999ee935582ab34d4bb206730775928f78211554
ed1e1baf7f5600e63fee4ff23f6d49ae1f648dc8
refs/heads/master
2023-04-23T22:06:34.058590
2021-05-10T20:44:17
2021-05-10T20:44:17
365,568,299
0
0
null
null
null
null
UTF-8
Java
false
false
1,290
java
package com.marom.ipldashboard; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.batch.core.BatchStatus; import org.springframework.batch.core.JobExecution; import org.springframework.batch.core.listener.JobExecutionListenerSupport; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Component; @Component public class JobCompletionNotificationListener extends JobExecutionListenerSupport { private static final Logger log = LoggerFactory.getLogger(JobCompletionNotificationListener.class); private final JdbcTemplate jdbcTemplate; @Autowired public JobCompletionNotificationListener(JdbcTemplate jdbcTemplate) { this.jdbcTemplate = jdbcTemplate; } @Override public void afterJob(JobExecution jobExecution) { if(jobExecution.getStatus() == BatchStatus.COMPLETED) { log.info("!!! JOB FINISHED! Time to verify the results"); jdbcTemplate.query("SELECT team1, team2, date FROM match", (rs, row) -> "Team 1: " + rs.getString(1) + " Team 2: " + rs.getString(2) + " Date: " + rs.getString(3) ).forEach(str -> System.out.println(str)); } } }
[ "maro.muszynski@gmail.com" ]
maro.muszynski@gmail.com
4847c02cef6e701732b670c6181ad2c59438be7e
3deb733fa98f792ac4e9146067a5526053a152a8
/Mynetty/src/main/java/com/github/cxt/Mynetty/websocketchat/MyHandler.java
870992b9d97cdd5cf46b1d27de4d2b2909577000
[]
no_license
caixt/demos
d36bcef6f52ccf69d8139f77e72eace8b5a59b99
55ffbcbd0d8ae647425b07a0aad2960bb476652f
refs/heads/master
2022-12-23T11:27:21.959759
2022-09-27T08:55:48
2022-09-27T08:55:48
58,050,805
3
1
null
2022-12-16T09:43:34
2016-05-04T12:37:59
Java
UTF-8
Java
false
false
3,173
java
package com.github.cxt.Mynetty.websocketchat; import java.io.File; import java.io.RandomAccessFile; import java.net.URISyntaxException; import java.net.URL; import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelFutureListener; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundHandlerAdapter; import io.netty.channel.DefaultFileRegion; import io.netty.handler.codec.http.DefaultHttpResponse; import io.netty.handler.codec.http.FullHttpRequest; import io.netty.handler.codec.http.HttpHeaders; import io.netty.handler.codec.http.HttpResponse; import io.netty.handler.codec.http.HttpResponseStatus; import io.netty.handler.codec.http.LastHttpContent; import io.netty.handler.codec.http.websocketx.WebSocketFrame; import io.netty.handler.ssl.SslHandler; import io.netty.handler.stream.ChunkedNioFile; import io.netty.util.ReferenceCountUtil; public class MyHandler extends ChannelInboundHandlerAdapter{ @Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { if (msg instanceof FullHttpRequest) { handleHttpRequest(ctx, (FullHttpRequest) msg); ReferenceCountUtil.release(msg); } else if (msg instanceof WebSocketFrame) {//如果是Websocket请求,则进行websocket操作 ctx.fireChannelRead(msg); } } private static final File INDEX; static { URL location = HttpRequestHandler.class.getProtectionDomain().getCodeSource().getLocation(); try { String path = location.toURI() + "WebsocketChatClient.html"; path = !path.contains("file:") ? path : path.substring(5); INDEX = new File(path); } catch (URISyntaxException e) { throw new IllegalStateException("Unable to locate WebsocketChatClient.html", e); } } public void handleHttpRequest(ChannelHandlerContext ctx, FullHttpRequest request) throws Exception { if ("/ws".equalsIgnoreCase(request.getUri())) { ctx.fireChannelRead(request.retain()); //2 } RandomAccessFile file = new RandomAccessFile(INDEX, "r");//4 HttpResponse response = new DefaultHttpResponse(request.getProtocolVersion(), HttpResponseStatus.OK); response.headers().set(HttpHeaders.Names.CONTENT_TYPE, "text/html; charset=UTF-8"); boolean keepAlive = HttpHeaders.isKeepAlive(request); if (keepAlive) { //5 response.headers().set(HttpHeaders.Names.CONTENT_LENGTH, file.length()); response.headers().set(HttpHeaders.Names.CONNECTION, HttpHeaders.Values.KEEP_ALIVE); } ctx.write(response); //6 if (ctx.pipeline().get(SslHandler.class) == null) { //7 ctx.write(new DefaultFileRegion(file.getChannel(), 0, file.length())); } else { ctx.write(new ChunkedNioFile(file.getChannel())); } ChannelFuture future = ctx.writeAndFlush(LastHttpContent.EMPTY_LAST_CONTENT); //8 if (!keepAlive) { future.addListener(ChannelFutureListener.CLOSE); //9 } file.close(); } }
[ "xiantong0216@126.com" ]
xiantong0216@126.com
216c959ecfacd62057b93d60238e3ac1bdc966b2
078206053987e4d58a72bb0689dbae4c69b46174
/DisasterRT /src/com/example/drt/Fragment2.java
04e4e5143bf05925184834d290fe8e8defb82df1
[]
no_license
tommy05662000/NTUE-Disaster
8d35b08c40dad8e359ece21cae76098ea6a76fa4
90c7818591fce3848c08b7fb70994e10b11d4005
refs/heads/master
2021-01-15T11:18:32.976382
2014-02-25T06:27:35
2014-02-25T06:27:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
765
java
package com.example.drt; import android.graphics.Color; import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; public class Fragment2 extends Fragment { View v; @Override public void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // TODO Auto-generated method stub // v = inflater.inflate(R.layout.webview, container, false); return v; } }
[ "tommy05662000@hotmail.com" ]
tommy05662000@hotmail.com