blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
390
content_id
stringlengths
40
40
detected_licenses
listlengths
0
35
license_type
stringclasses
2 values
repo_name
stringlengths
6
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
539 values
visit_date
timestamp[us]date
2016-08-02 21:09:20
2023-09-06 10:10:07
revision_date
timestamp[us]date
1990-01-30 01:55:47
2023-09-05 21:45:37
committer_date
timestamp[us]date
2003-07-12 18:48:29
2023-09-05 21:45:37
github_id
int64
7.28k
684M
star_events_count
int64
0
77.7k
fork_events_count
int64
0
48k
gha_license_id
stringclasses
13 values
gha_event_created_at
timestamp[us]date
2012-06-11 04:05:37
2023-09-14 21:59:18
gha_created_at
timestamp[us]date
2008-05-22 07:58:19
2023-08-28 02:39:21
gha_language
stringclasses
62 values
src_encoding
stringclasses
26 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
128
12.8k
extension
stringclasses
11 values
content
stringlengths
128
8.19k
authors
listlengths
1
1
author_id
stringlengths
1
79
9efeba40c35b01a705476f8776bbec0823ec1bad
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a013/A013698Test.java
b4d44cdaef5f0df8af59a45f59bca7f71809e22f
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package irvine.oeis.a013; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A013698Test extends AbstractSequenceTest { }
[ "sairvin@gmail.com" ]
sairvin@gmail.com
398c198904215cf2ece99fb66f392b1c0da067d6
fcf43f603741c377f3e93a15101bb2bb75773013
/src/main/java/com/vmware/connection/helpers/builders/PropertyFilterSpecBuilder.java
36cc7d1db88c09e25cd2296c01561bae2106cedd
[ "Apache-2.0" ]
permissive
jdgwartney/boundary-vmware
9aac9fa47edb8bd3fc577b5dfbe9f2ad97e68af6
3eaf587df280a04e3ceab6255b3e65663f626b61
refs/heads/master
2021-01-18T14:51:16.692661
2015-03-16T14:46:12
2015-03-16T14:46:12
26,874,229
0
0
null
2015-01-04T21:40:58
2014-11-19T18:02:31
Java
UTF-8
Java
false
false
1,691
java
// Copyright 2014 Boundary, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.vmware.connection.helpers.builders; import com.vmware.vim25.ObjectSpec; import com.vmware.vim25.PropertyFilterSpec; import com.vmware.vim25.PropertySpec; import java.util.ArrayList; import java.util.Arrays; /** * */ public class PropertyFilterSpecBuilder extends PropertyFilterSpec { private void init() { if (propSet == null) { propSet = new ArrayList<>(); } if(objectSet == null) { objectSet = new ArrayList<>(); } } public PropertyFilterSpecBuilder reportMissingObjectsInResults(final Boolean value) { this.setReportMissingObjectsInResults(value); return this; } public PropertyFilterSpecBuilder propSet(final PropertySpec... propertySpecs) { init(); this.propSet.addAll(Arrays.asList(propertySpecs)); return this; } public PropertyFilterSpecBuilder objectSet(final ObjectSpec... objectSpecs) { init(); this.objectSet.addAll(Arrays.asList(objectSpecs)); return this; } }
[ "davidg@boundary.com" ]
davidg@boundary.com
daa192d07b731fc4edf67adc87648935feed3bd0
5aa049046323559a730bbe721c42f625606e651b
/C11/branches/yc/UpdateCan/src/com/zhonghong/datamode/McuServierDataMode.java
5d5b77d915320d5c6bfc46f09f68d34feeefbbb7
[]
no_license
YC-YC/work
84771f4aa6fe139bf705d77c96643489c1f6766e
e0a9e8d485c176d7bab43dd6b905164062c73d0d
refs/heads/master
2020-04-06T05:11:34.660751
2017-02-17T09:38:01
2017-02-17T09:38:01
54,162,618
2
0
null
null
null
null
UTF-8
Java
false
false
1,453
java
/** * */ package com.zhonghong.datamode; import android.zhonghong.mcuservice.CanProxy; import android.zhonghong.mcuservice.RegistManager.ICanInfoChangedListener; /** * @author YC * @time 2016-11-30 下午3:03:29 * TODO:mcuserver的数据模型 */ public class McuServierDataMode implements IDataMode { private static final String TAG = "McuServierData"; private CanProxy mCanProxy; private DataListener mDataListener; public McuServierDataMode() { super(); this.mCanProxy = new CanProxy(); } @Override public void registerDataListener(DataListener listener) { mCanProxy.registCanInfoChangedListener(caninfolistener); mDataListener = listener; } @Override public void unregisterDataListener(DataListener listener) { mCanProxy.unregistCanInfoChangeListener(caninfolistener); mDataListener = null; } @Override public synchronized void sendData(byte[] data) { mCanProxy.sendCanDataToMcu(data); } /** Can的信息有变化就是回调 */ ICanInfoChangedListener caninfolistener = new ICanInfoChangedListener() { @Override public void notify(int[] changeCMDs, short[] caninfo) { // Log.i(TAG, String.format("getCanInfo [%d][%d][%d][%d] packet", caninfo[0], caninfo[1], caninfo[2], caninfo[3])); if (mDataListener != null){ byte[] data = new byte[caninfo.length]; for (int i = 0; i < caninfo.length; i++){ data[i] = (byte) caninfo[i]; } mDataListener.onDataIn(data); } } }; }
[ "yellowc.yc@aliyun.com" ]
yellowc.yc@aliyun.com
0be7f27908b1da28c783985094a180d2da3e88bd
c9bc23ad5b3b2d21dec737c73c1e6c2a1cbe3504
/app/src/main/java/com/baidu/tts/chainofresponsibility/logger/d.java
ed5d27600781618452ea95e6818cce136fea9069
[]
no_license
IamWilliamWang/wolf
2e68faed4cab5ba5b04ae52bc44550be04f36079
6b7ff2b74f0413578a1a34132750e5d79b0c0fe6
refs/heads/master
2020-05-27T10:45:18.596136
2017-02-20T09:58:02
2017-02-20T09:58:02
82,542,835
0
0
null
null
null
null
UTF-8
Java
false
false
2,782
java
package com.baidu.tts.chainofresponsibility.logger; import android.util.Log; import com.baidu.tts.g.a.a; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; public class d { private static volatile d a = null; private List<b> b = g(); private ExecutorService c; private f d = new f(); private e e = new e(); private d.a f = d.a.b; private boolean g = false; private d() { this.b.add(this.d); this.c = Executors.newSingleThreadExecutor(new a("LoggerChainPoolThread")); } public static d a() { if (a == null) monitorenter; try { if (a == null) a = new d(); return a; } finally { monitorexit; } throw localObject; } private void a(c paramc, int paramInt, String paramString1, String paramString2) { c localc = paramc; if (paramc == null) localc = new c(); localc.a(paramInt); localc.a(paramString1); localc.b(paramString2); a(localc); } private void b(c paramc) { try { if ((this.c != null) && (!this.c.isShutdown())) this.c.execute(new d.b(this, paramc)); return; } catch (Exception paramc) { Log.e("LoggerChain", "executeWork exception=" + paramc.toString()); } } private List<b> g() { if (this.b == null) return new CopyOnWriteArrayList(); return this.b; } public void a(int paramInt, String paramString1, String paramString2) { a(new c(), paramInt, paramString1, paramString2); } public void a(c paramc) { if (paramc != null) switch (1.a[this.f.ordinal()]) { default: case 1: case 2: } while (true) { b(paramc); return; paramc.a(6); this.e.a(paramc, null, a); continue; if (!this.g) continue; this.e.a(paramc, null, a); } } public void a(String paramString) { if (this.e != null) this.e.a(paramString); } public void a(List<String> paramList) { if (this.e != null) this.e.a(paramList); } public void a(boolean paramBoolean) { this.g = paramBoolean; } public void b() { if (this.b != null) this.b.clear(); } public void b(String paramString) { if (this.e != null) this.e.b(paramString); } public void c() { if (this.e != null) this.e.a(); } public void d() { this.f = d.a.b; } public boolean e() { return (this.f == null) || (this.f == d.a.b); } } /* Location: C:\Users\Administrator\Desktop\狼王\classes.jar * Qualified Name: com.baidu.tts.chainofresponsibility.logger.d * JD-Core Version: 0.6.0 */
[ "iamjerichoholic@hotmail.com" ]
iamjerichoholic@hotmail.com
7e6993806b834979f36e58fb57d54cc9eb764f7f
a4110f29cc12c5e9ad3dc6d7d81cfe60b751398f
/src/com/Sts/DBTypes/StsHorpickClass.java
d4c310c0cae35c9d6b7354561d9bfb30fd1d6da9
[]
no_license
tlasseter/VolumePicker7
dd70320c10d4bd105fdb238df19d504ddad5ae90
3baa5d1047893690cf987f7bda27b0e2dcf87e84
refs/heads/master
2021-05-31T05:32:34.880131
2016-03-23T22:37:43
2016-03-23T22:37:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,467
java
package com.Sts.DBTypes; import com.Sts.DB.*; import com.Sts.Interfaces.*; import com.Sts.MVC.View3d.*; import com.Sts.Types.*; import com.Sts.UI.Beans.*; import javax.media.opengl.*; /** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2003</p> * <p>Company: </p> * @author not attributable * @version 1.0 */ public class StsHorpickClass extends StsClass implements StsSerializable, StsClassDisplayable, StsClassCursorDisplayable { public StsHorpickClass() { userName = "Autotracked Surfaces"; } public void initializeDisplayFields() { // initColors(StsHorpick.displayFields); displayFields = new StsFieldBean[] { new StsBooleanFieldBean(this, "isVisible", "Enable") }; super.setIsVisible(false); } public void drawOnCursor2d(StsGLPanel3d glPanel3d, int dirNo, float dirCoordinate, boolean axesFlipped, boolean xAxisReversed, boolean axisReversed) { if(currentObject == null) return; if(!isVisible) return; GL gl = glPanel3d.getGL(); // glPanel3d.setViewShift(gl, StsGraphicParameters.vertexOnEdgeShift); ((StsHorpick)currentObject).display2d(gl, dirNo, dirCoordinate, axesFlipped); // glPanel3d.resetViewShift(gl); /* int nElements = this.getSize(); GL gl = glPanel3d.getGL(); for(int n = 0; n < nElements; n++) { StsHorpick horpick = (StsHorpick)getElement(n); horpick.display2d(gl, dirNo, dirCoordinate, axesFlipped); } */ } public void drawOnCursor3d(StsGLPanel3d glPanel3d, int dirNo, float dirCoordinate, StsPoint[] planePoints, boolean isDragging) { } public void drawOn3dCurtain(StsGLPanel3d glPanel3d, StsSeismicCurtain seismicCurtain) { } public void displayClass(StsGLPanel3d glPanel3d) { if(currentObject == null) return; if(!isVisible) return; ((StsHorpick)currentObject).display(glPanel3d); } public StsHorpick getHorpickWithSurface(StsSurface surface) { for(int n = 0; n < getSize(); n++) { StsHorpick horpick = (StsHorpick) getElement(n); if (horpick.getSurface() == surface)return horpick; } return null; } public void setIsVisible(boolean isVisible) { super.setIsVisible(isVisible); currentModel.win3dDisplay(); } }
[ "t.lasseter@comcast.net" ]
t.lasseter@comcast.net
8d92468ba70b37e66c98b8f232d3bdeba38c5223
31fc34c0b8cec6d14f3269760f835332b6602084
/DevLibUtils/src/main/java/dev/utils/common/CoordinateUtils.java
177897c04914ac472f03b70be57301311af6a822
[ "Apache-2.0" ]
permissive
manitozhang/DevUtils
2568fb6e1854118691c65279c1e133f7651e80de
931061f4111a570314b18dc91ccf2195417e2bb3
refs/heads/master
2020-04-19T01:57:37.299743
2019-01-28T02:21:33
2019-01-28T02:21:33
167,887,533
1
0
Apache-2.0
2019-01-28T02:40:39
2019-01-28T02:40:39
null
UTF-8
Java
false
false
6,370
java
package dev.utils.common; import static java.lang.Math.PI; /** * detail: 坐标相关工具类 - GPS 纠偏 * Created by Ttt * =================== * 地球坐标系 (WGS-84) * 火星坐标系 (GCJ-02) * 百度坐标系 (BD09) * =================== * https://github.com/hujiulong/gcoord * =================== * 1. WGS84 坐标系:即地球坐标系,国际上通用的坐标系。设备一般包含GPS芯片或者北斗芯片获取的经纬度为WGS84地理坐标系, 谷歌地图采用的是WGS84地理坐标系(中国范围除外) * GPS设备得到的经纬度就是在WGS84坐标系下的经纬度。通常通过底层接口得到的定位信息都是WGS84坐标系。 * * 2. GCJ02 坐标系:即火星坐标系,是由中国国家测绘局制订的地理信息系统的坐标系统。由WGS84坐标系经加密后的坐标系。 * 国家规定,中国大陆所有公开地理数据都需要至少用GCJ-02进行加密,也就是说我们从国内公司的产品中得到的数据,一定是经过了加密的。 * 绝大部分国内互联网地图提供商都是使用GCJ-02坐标系,包括高德地图,谷歌地图中国区等。 * * 3. BD09 坐标系:即百度坐标系,其在GCJ-02上多增加了一次变换,用来保护用户隐私。从百度产品中得到的坐标都是BD-09坐标系。 */ public final class CoordinateUtils { private CoordinateUtils() { } private static final double X_PI = 3.14159265358979324 * 3000.0 / 180.0; private static final double A = 6378245.0; private static final double EE = 0.00669342162296594323; /** * BD09 坐标转 GCJ02 坐标 * @param lng BD09 坐标纬度 * @param lat BD09 坐标经度 * @return GCJ02 坐标:[经度,纬度] */ public static double[] bd09ToGcj02(double lng, double lat) { double x = lng - 0.0065; double y = lat - 0.006; double z = Math.sqrt(x * x + y * y) - 0.00002 * Math.sin(y * X_PI); double theta = Math.atan2(y, x) - 0.000003 * Math.cos(x * X_PI); double gg_lng = z * Math.cos(theta); double gg_lat = z * Math.sin(theta); return new double[]{gg_lng, gg_lat}; } /** * GCJ02 坐标转 BD09 坐标 * @param lng GCJ02 坐标经度 * @param lat GCJ02 坐标纬度 * @return BD09 坐标:[经度,纬度] */ public static double[] gcj02ToBd09(double lng, double lat) { double z = Math.sqrt(lng * lng + lat * lat) + 0.00002 * Math.sin(lat * X_PI); double theta = Math.atan2(lat, lng) + 0.000003 * Math.cos(lng * X_PI); double bd_lng = z * Math.cos(theta) + 0.0065; double bd_lat = z * Math.sin(theta) + 0.006; return new double[]{bd_lng, bd_lat}; } /** * GCJ02 坐标转 WGS84 坐标 * @param lng GCJ02 坐标经度 * @param lat GCJ02 坐标纬度 * @return WGS84 坐标:[经度,纬度] */ public static double[] gcj02ToWGS84(double lng, double lat) { if (outOfChina(lng, lat)) { return new double[]{lng, lat}; } double dlat = transformLat(lng - 105.0, lat - 35.0); double dlng = transformLng(lng - 105.0, lat - 35.0); double radlat = lat / 180.0 * PI; double magic = Math.sin(radlat); magic = 1 - EE * magic * magic; double sqrtmagic = Math.sqrt(magic); dlat = (dlat * 180.0) / ((A * (1 - EE)) / (magic * sqrtmagic) * PI); dlng = (dlng * 180.0) / (A / sqrtmagic * Math.cos(radlat) * PI); double mglat = lat + dlat; double mglng = lng + dlng; return new double[]{lng * 2 - mglng, lat * 2 - mglat}; } /** * WGS84 坐标转 GCJ02 坐标 * @param lng WGS84 坐标经度 * @param lat WGS84 坐标纬度 * @return GCJ02 坐标:[经度,纬度] */ public static double[] wgs84ToGcj02(double lng, double lat) { if (outOfChina(lng, lat)) { return new double[]{lng, lat}; } double dlat = transformLat(lng - 105.0, lat - 35.0); double dlng = transformLng(lng - 105.0, lat - 35.0); double radlat = lat / 180.0 * PI; double magic = Math.sin(radlat); magic = 1 - EE * magic * magic; double sqrtmagic = Math.sqrt(magic); dlat = (dlat * 180.0) / ((A * (1 - EE)) / (magic * sqrtmagic) * PI); dlng = (dlng * 180.0) / (A / sqrtmagic * Math.cos(radlat) * PI); double mglat = lat + dlat; double mglng = lng + dlng; return new double[]{mglng, mglat}; } /** * BD09 坐标转 WGS84 坐标 * @param lng BD09 坐标经度 * @param lat BD09 坐标纬度 * @return WGS84 坐标:[经度,纬度] */ public static double[] bd09ToWGS84(double lng, double lat) { double[] gcj = bd09ToGcj02(lng, lat); return gcj02ToWGS84(gcj[0], gcj[1]); } /** * WGS84 坐标转 BD09 坐标 * @param lng WGS84 坐标经度 * @param lat WGS84 坐标纬度 * @return BD09 坐标:[经度,纬度] */ public static double[] wgs84ToBd09(double lng, double lat) { double[] gcj = wgs84ToGcj02(lng, lat); return gcj02ToBd09(gcj[0], gcj[1]); } private static double transformLat(double lng, double lat) { double ret = -100.0 + 2.0 * lng + 3.0 * lat + 0.2 * lat * lat + 0.1 * lng * lat + 0.2 * Math.sqrt(Math.abs(lng)); ret += (20.0 * Math.sin(6.0 * lng * PI) + 20.0 * Math.sin(2.0 * lng * PI)) * 2.0 / 3.0; ret += (20.0 * Math.sin(lat * PI) + 40.0 * Math.sin(lat / 3.0 * PI)) * 2.0 / 3.0; ret += (160.0 * Math.sin(lat / 12.0 * PI) + 320 * Math.sin(lat * PI / 30.0)) * 2.0 / 3.0; return ret; } private static double transformLng(double lng, double lat) { double ret = 300.0 + lng + 2.0 * lat + 0.1 * lng * lng + 0.1 * lng * lat + 0.1 * Math.sqrt(Math.abs(lng)); ret += (20.0 * Math.sin(6.0 * lng * PI) + 20.0 * Math.sin(2.0 * lng * PI)) * 2.0 / 3.0; ret += (20.0 * Math.sin(lng * PI) + 40.0 * Math.sin(lng / 3.0 * PI)) * 2.0 / 3.0; ret += (150.0 * Math.sin(lng / 12.0 * PI) + 300.0 * Math.sin(lng / 30.0 * PI)) * 2.0 / 3.0; return ret; } private static boolean outOfChina(double lng, double lat) { return lng < 72.004 || lng > 137.8347 || lat < 0.8293 || lat > 55.8271; } }
[ "13798405957@163.com" ]
13798405957@163.com
a8aefd88a9627170d1b27c1d7262dad411c907b1
923b9e93e8d49c830d38a9103774ba39516b679e
/src/main/java/de/util/RedirectInterceptor.java
a96351f7fc5dd6efc40d27bd274d42dbfba1d3c2
[]
no_license
AIRAT1/spring-boot-demo-2
1c1298060cdd5b1cb8b7dab0cea1b83b4b1c305f
83a2066eb3849312b1a3d5a2c002fa3900b484b2
refs/heads/master
2022-12-31T21:12:54.693435
2020-10-21T17:13:46
2020-10-21T17:13:46
301,481,773
0
0
null
null
null
null
UTF-8
Java
false
false
750
java
package de.util; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class RedirectInterceptor extends HandlerInterceptorAdapter { @Override public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { if (modelAndView != null) { String args = request.getQueryString() != null ? request.getQueryString() : ""; String url = request.getRequestURL().toString() + "?" + args; response.setHeader("Turbolinks-location", url); } } }
[ "ayrat1@mail.ru" ]
ayrat1@mail.ru
3e2be153b69e6a499752a5d82d45e7aac337885c
1b0c578992559628dc9b5f7c3abaf0d467a23899
/Kevin_G_Exercises/Chapter_12_Exception_Handling_and_Text_IO/Programming_Exercise_31.java
44d579dd3d719d1bb3272bdc6d8ad430b98587f8
[]
no_license
RomaniEzzatYoussef/Exercises
c9897b92507abf2d7ddc79f7e05b8b3d208f1dad
396900c05dac95954f7ddbc424c5023deb562242
refs/heads/master
2020-09-25T05:52:16.701228
2019-12-13T19:26:12
2019-12-13T19:26:12
225,932,027
1
1
null
null
null
null
WINDOWS-1252
Java
false
false
4,199
java
package Chapter_12_Exception_Handling_and_Text_IO; import java.io.File; import java.io.FileNotFoundException; import java.util.Scanner; /** * Baby name popularity ranking * The popularity ranking of baby names from years 2001 to 2010 is downloaded from www.ssa.gov/oact/babynames and stored in files named babynameranking2001.txt, * babynameranking2002.txt, . . . , babynameranking2010.txt. * Each file contains one thousand lines. * Each line contains a ranking, a boy’s name, number for the boy’s name, a girl’s name, and number for the girl’s name. * So, the boy’s name Jacob and girl’s name Isabella are ranked #1 and the boy’s name Ethan and girl’s name Sophia are ranked #2. * 21,875 boys are named Jacob and 22,731 girls are named Isabella. * Write a program that prompts the user to enter the year, gender, and followed by a name, * and displays the ranking of the name for the year. * * 12/10/2016 * @author kevgu * */ public class Programming_Exercise_31 { public static void main(String[] args) throws FileNotFoundException { if (args.length == 0) { System.out.print("Current directory is empty."); System.exit(0); } Scanner input = new Scanner(System.in); File[] fileList = new File[args.length]; for (int i = 0; i < fileList.length; i++) fileList[i] = new File(args[i]); String year = getYear(input); char gender = getGender(input); String name = getName(input); getData(fileList, year, gender, name); input.close(); } public static void getData(File[] fileList, String year, char gender, String name) throws FileNotFoundException { for (int i = 0; i < fileList.length; i++) { if (fileList[i].toString().equals("babynamesranking" + year + ".txt")) try (Scanner reader = new Scanner(fileList[i])) { if (Character.toUpperCase(gender) == 'M') while (reader.hasNext()) { String[] getData = reader.nextLine().split(" "); if (getData[1].equals(name)) { System.out.print(name + " is ranked " + getData[0] + " in " + year + "."); System.exit(1); } } if (Character.toUpperCase(gender) == 'F') while (reader.hasNext()) { String[] getData = reader.nextLine().split(" "); if (getData[2].equals(name)) { System.out.print(name + " is ranked " + getData[0] + " in " + year + "."); System.exit(1); } } System.out.print(name + " is not within top 1000 in year " + year + "."); } } } public static String getName(Scanner input) { System.out.print("Enter a name: "); String name = input.next(); boolean correctValue = false; while (!correctValue) { for (int i = 0; i < name.length(); i++) if (!Character.isAlphabetic(name.charAt(i))) { System.out.print("Enter another name: "); name = input.next(); } else if (name.length() - 1 == i) correctValue = true; } return name.substring(0, 1).toUpperCase() + name.substring(1, name.length()).toLowerCase(); } public static char getGender(Scanner input) { char gender = 0; boolean correctValue = false; while (!correctValue) { try { System.out.print("Enter a gender (M | F) > "); gender = Character.toUpperCase(input.next().charAt(0)); while (gender != 'M' && gender != 'F') { System.out.print("Enter M or F > "); gender = Character.toUpperCase(input.next().charAt(0)); } correctValue = true; } catch (Exception ex) { System.out.println("Incorrect value, try again."); } } return gender; } public static String getYear(Scanner input) { String year = null; boolean correctValue = false; while (!correctValue) { try { System.out.print("Enter a year (2001 - 2010) > "); year = input.next(); while (Integer.parseInt(year) < 2001 || Integer.parseInt(year) > 2010) { System.out.print("Year must range from 2001 - 2010 > "); year = input.next(); } correctValue = true; } catch (Exception ex) { System.out.println("Incorrect value, try again."); } } return year; } }
[ "romaniezzat@hotmail.com" ]
romaniezzat@hotmail.com
3c4d3c0605ab566db11b793f5db20e3667dcdd11
ecb21f048319a1ac58de8f1da6eecec61c729022
/src/main/java/com/couchbase/client/dcp/core/time/FixedDelay.java
13d7ff497f6bbe518fadf1248ffcb23bf4a3fd0e
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
couchbase/java-dcp-client
82b9b601980634faf3836341187ed8e4b5c07e7d
5e6e65aeb837079f61a274b51f92466f92712cf2
refs/heads/master
2023-08-25T16:39:26.142463
2023-06-22T01:11:10
2023-06-22T01:11:44
62,625,088
40
11
Apache-2.0
2023-06-14T22:47:50
2016-07-05T09:50:21
Java
UTF-8
Java
false
false
1,072
java
/* * Copyright (c) 2016 Couchbase, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.couchbase.client.dcp.core.time; import java.util.concurrent.TimeUnit; /** * Delay which is fixed for every attempt. */ public class FixedDelay extends Delay { private final long delay; FixedDelay(long delay, TimeUnit unit) { super(unit); this.delay = delay; } @Override public long calculate(long attempt) { return delay; } @Override public String toString() { return "FixedDelay{" + delay + " " + unit() + "}"; } }
[ "david.nault@couchbase.com" ]
david.nault@couchbase.com
55f58c22936939e7919408551f437063c99343a5
c035232aebc7a5d8dee28c0cd04c0ad3e6d99970
/BigDataClient/BigDataStockAnalysis/Java/CanopyKMeansJob.java
4dd79f1af07dc733a363e9b2218c9bb3ed9e53fb
[]
no_license
or109/BigiBigi
6c08dfb2c0d7d9aecbeb7f75f811a947532caff9
1990d4b5590a168b57dc805864318ac95bf0f5c1
refs/heads/master
2016-09-06T17:21:14.023385
2015-03-15T21:58:00
2015-03-15T21:58:00
31,823,560
0
0
null
null
null
null
UTF-8
Java
false
false
4,750
java
package CanopyKMeans; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.conf.Configured; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.mapreduce.Job; import org.apache.hadoop.mapreduce.lib.input.SequenceFileInputFormat; import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; import org.apache.hadoop.mapreduce.lib.output.SequenceFileOutputFormat; import org.apache.hadoop.util.Tool; import org.apache.hadoop.util.ToolRunner; public class CanopyKMeansJob extends Configured implements Tool { @Override public int run(String[] args) throws Exception { // Prepare and clean environment String basePath = args[0]; Configuration conf = new Configuration(); Job job; conf.set("k", args[1]); conf.set("radios", args[2]); conf.set("total.stocks", args[3]); Path vectors = new Path(basePath + "/input"); Path canopyCenters = new Path(basePath + "/canopycenters"); Path kMeansCentroids = new Path(basePath + "/kmeanscentroids"); Path out = new Path(basePath + "/clusters"); conf.set("canopy.centers.path", canopyCenters.toString() + "/part-r-00000"); conf.set("kmeans.centroids.path", kMeansCentroids.toString() + "/part-r-00000"); FileSystem fs = FileSystem.get(conf); if (fs.exists(canopyCenters)) fs.delete(canopyCenters, true); if (fs.exists(kMeansCentroids)) fs.delete(kMeansCentroids, true); if (fs.exists(out)) fs.delete(out, true); // Prepare and start job #1 - Canopy Centers job = new Job(conf); job.setJobName("Canopy Centers"); job.setJarByClass(CanopyKMeansJob.class); job.setMapperClass(CanopyMapper.class); job.setReducerClass(CanopyReducer.class); SequenceFileInputFormat.addInputPath(job, vectors); SequenceFileOutputFormat.setOutputPath(job, canopyCenters); job.setOutputFormatClass(SequenceFileOutputFormat.class); job.setOutputKeyClass(Vector.class); job.setOutputValueClass(Vector.class); job.setNumReduceTasks(1); job.waitForCompletion(true); // Prepare and start job #2 - KMeans Centers job = new Job(conf); job.setJobName("KMeans Centers"); job.setJarByClass(CanopyKMeansJob.class); job.setMapperClass(KMeansCentersMapper.class); job.setReducerClass(KMeansCentersReducer.class); SequenceFileInputFormat.addInputPath(job, vectors); SequenceFileOutputFormat.setOutputPath(job, kMeansCentroids); job.setOutputFormatClass(SequenceFileOutputFormat.class); job.setOutputKeyClass(Vector.class); job.setOutputValueClass(Vector.class); job.setNumReduceTasks(1); job.waitForCompletion(true); // Prepare and start job #3 - KMeans Clustering (K iterations) int iteration = 1; int counter = 0; do { conf.set("iteration", iteration + ""); if (iteration != 1) { conf.set("kmeans.centroids.path", basePath + "/depth_" + (iteration - 1) + "/part-r-00000"); } out = new Path(basePath + "/depth_" + iteration); if (fs.exists(out)) fs.delete(out, true); job = new Job(conf); job.setJobName("KMeans Clustering " + iteration); job.setJarByClass(CanopyKMeansJob.class); job.setMapperClass(KMeansMapper.class); job.setReducerClass(KMeansReducer.class); job.setJarByClass(KMeansMapper.class); SequenceFileInputFormat.addInputPath(job, vectors); SequenceFileOutputFormat.setOutputPath(job, out); job.setOutputFormatClass(SequenceFileOutputFormat.class); job.setMapOutputKeyClass(Centroid.class); job.setMapOutputValueClass(Stock.class); job.setOutputKeyClass(Vector.class); job.setOutputValueClass(Vector.class); job.waitForCompletion(true); iteration++; counter = (int) job.getCounters() .findCounter(KMeansReducer.Counter.CONVERGED).getValue(); } while (counter > 0); conf.set("kmeans.centroids.path", basePath + "/depth_" + (iteration - 1) + "/part-r-00000"); out = new Path(basePath + "/output"); if (fs.exists(out)) fs.delete(out, true); // Prepare and start job #4 - KMeans Output job = new Job(conf); job.setJobName("KMeans Output"); job.setJarByClass(CanopyKMeansJob.class); job.setMapperClass(KMeansMapper.class); job.setReducerClass(KMeansFinalReducer.class); job.setJarByClass(KMeansMapper.class); SequenceFileInputFormat.addInputPath(job, vectors); FileOutputFormat.setOutputPath(job, out); job.setMapOutputKeyClass(Centroid.class); job.setMapOutputValueClass(Stock.class); job.setOutputKeyClass(Vector.class); job.setOutputValueClass(Stock.class); job.waitForCompletion(true); return job.waitForCompletion(true) ? 0 : 1; } public static void main(String[] args) throws Exception { int exitCode = ToolRunner.run(new CanopyKMeansJob(), args); System.exit(exitCode); } }
[ "you@example.com" ]
you@example.com
c2a1da5774ac7d1767ab8bb3fa36eed19fc400d5
baf90a659e8fd4cd7ed9f5c41881754d286ddbbd
/src/classifiers/englishClassifiers/DelaysClassifierEN.java
76e8c4cac3f29d9345019432157e32aa1973648e
[]
no_license
Linusdalin/AnalysisModule
3c837af034862e59ae4694b1e62aa1aeaddadf71
4fe0e966fb0634b83722309d321472a5fb0d0668
refs/heads/master
2021-01-10T16:57:34.162334
2015-10-12T19:46:06
2015-10-12T19:46:06
44,130,199
0
0
null
null
null
null
UTF-8
Java
false
false
650
java
package classifiers.englishClassifiers; import analysis2.ReplacerInterface; import classifiers.ClassifierInterface; import classifiers.baseClassifiers.DelaysClassifier; /** * Created with IntelliJ IDEA. * User: Linus * Date: 2014-10-31 * Time: 11:30 * To change this template use File | Settings | File Templates. * */ public class DelaysClassifierEN extends DelaysClassifier implements ClassifierInterface { private static final ReplacerInterface[] LanguageSpecificRuleList = { }; public DelaysClassifierEN(){ super(LanguageSpecificRuleList); name = "Delays"; } }
[ "linus.dalin@itclarifies.com" ]
linus.dalin@itclarifies.com
6d1b2c967b0b292aa1b459be5b13bca7a0dd56b5
6b808682a0cba552c39476b93f3dc2e165e96058
/src/main/java/com/ljj/ceet/util/pojo/SearchItem.java
34d229b5adc96eaeadbb73df9f8ee0f792333597
[]
no_license
KanadeSong/ceet
79d7f55cdffa2335752e45cb6d88419ffda4b0a5
1f38041c012042c156df05b30ef9ad2e04c38fa7
refs/heads/master
2021-10-27T12:26:38.506477
2019-04-17T09:23:00
2019-04-17T09:23:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,088
java
package com.ljj.ceet.util.pojo; public class SearchItem { private String id; private String title; private String sell_point; private Long price; private String image; private String category_name; private String item_desc; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getSell_point() { return sell_point; } public void setSell_point(String sell_point) { this.sell_point = sell_point; } public Long getPrice() { return price; } public void setPrice(Long price) { this.price = price; } public String getImage() { return image; } public void setImage(String image) { this.image = image; } public String getCategory_name() { return category_name; } public void setCategory_name(String category_name) { this.category_name = category_name; } public String getItem_desc() { return item_desc; } public void setItem_desc(String item_desc) { this.item_desc = item_desc; } }
[ "545430154@qq.com" ]
545430154@qq.com
ee9b89f1d6101581094aa014b99b0d008b10c505
9d6089379238e00c0a5fb2949c1a6e7c19b50958
/bin/ext-template/yb2bacceleratorcore/testsrc/de/hybris/platform/yb2bacceleratorcore/search/solrfacetsearch/provider/impl/FirstGenericVariantProductUrlValueProviderTest.java
e5146f12697d9d699b8c6ff4cd2ebd48b5f62dc1
[]
no_license
ChintalaVenkat/learning_hybris
55ce582b4796a843511d0ea83f4859afea52bd88
6d29f59578512f9fa44a3954dc67d0f0a5216f9b
refs/heads/master
2021-06-18T17:47:12.173132
2021-03-26T11:00:09
2021-03-26T11:00:09
193,689,090
0
0
null
2019-06-25T10:46:40
2019-06-25T10:46:39
null
UTF-8
Java
false
false
4,044
java
/* * [y] hybris Platform * * Copyright (c) 2000-2014 hybris AG * All rights reserved. * * This software is the confidential and proprietary information of hybris * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with hybris. * * */ package de.hybris.platform.yb2bacceleratorcore.search.solrfacetsearch.provider.impl; import de.hybris.bootstrap.annotations.UnitTest; import de.hybris.platform.b2b.model.GenericVariantProductModel; import de.hybris.platform.commerceservices.search.solrfacetsearch.provider.impl.PropertyFieldValueProviderTestBase; import de.hybris.platform.commerceservices.url.UrlResolver; import de.hybris.platform.core.model.product.ProductModel; import de.hybris.platform.solrfacetsearch.config.IndexedProperty; import de.hybris.platform.solrfacetsearch.config.exceptions.FieldValueProviderException; import de.hybris.platform.solrfacetsearch.provider.FieldValue; import de.hybris.platform.solrfacetsearch.provider.FieldValueProvider; import de.hybris.platform.variants.model.VariantProductModel; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Comparator; import java.util.List; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.runners.MockitoJUnitRunner; /** * Unit Tests for {@link FirstGenericVariantProductUrlValueProvider}. */ @UnitTest @RunWith(MockitoJUnitRunner.class) public class FirstGenericVariantProductUrlValueProviderTest extends PropertyFieldValueProviderTestBase { private static final String SOLR_PROPERTY = "firstVariantUrl"; private static final String FIELD_NAME_INDEXING = SOLR_PROPERTY + "_string"; private static final String FIELD_NAME_SORTING = SOLR_PROPERTY + "_sortable_string"; @Mock private IndexedProperty indexedProperty; // f.y.i.: had to add local class because Mockito.when was not working when calling resolve() private final UrlResolver<ProductModel> productModelUrlResolver = new UrlResolver<ProductModel>() { private static final String URL = "url"; @Override public String resolve(final ProductModel source) { return URL; } }; @Mock private Comparator<GenericVariantProductModel> genericVariantProductModelComparator; private FirstGenericVariantProductUrlValueProvider valueProvider; @Before public void setUp() throws Exception { valueProvider = new FirstGenericVariantProductUrlValueProvider(); valueProvider.setProductModelUrlResolver(productModelUrlResolver); valueProvider.setGenericVariantProductModelComparator(genericVariantProductModelComparator); configure(); } @Override protected String getPropertyName() { return SOLR_PROPERTY; } @Override protected void configure() { setPropertyFieldValueProvider(valueProvider); configureBase(); ((FirstGenericVariantProductUrlValueProvider) getPropertyFieldValueProvider()).setFieldNameProvider(fieldNameProvider); Assert.assertTrue(getPropertyFieldValueProvider() instanceof FieldValueProvider); } @Test public void testProductWithVariantGeneratesFields() throws FieldValueProviderException { final ProductModel model = new ProductModel(); final List<VariantProductModel> variants = new ArrayList<>(); final GenericVariantProductModel variant = new GenericVariantProductModel(); variants.add(variant); model.setVariants(variants); final List fieldNames = Arrays.asList(new String[] { FIELD_NAME_INDEXING, FIELD_NAME_SORTING }); Mockito.when(fieldNameProvider.getFieldNames(Mockito.eq(indexedProperty), Mockito.anyString())).thenReturn(fieldNames); final Collection<FieldValue> result = ((FieldValueProvider) getPropertyFieldValueProvider()).getFieldValues(indexConfig, indexedProperty, model); // result should not be empty Assert.assertNotNull(result); Assert.assertFalse(result.isEmpty()); } }
[ "a.basov@aimprosoft.com" ]
a.basov@aimprosoft.com
c4cec1e067260425513590034a962b2ba17f7823
0cf378b7320592a952d5343a81b8a67275ab5fab
/webprotege-shared/src/main/java/edu/stanford/bmir/protege/web/shared/place/OWLObjectPropertyItem.java
44346e7f3a9298b12dfe5f0f3f30f40b681452d0
[ "BSD-2-Clause" ]
permissive
curtys/webprotege-attestation
945de9f6c96ca84b7022a60f4bec4886c81ab4f3
3aa909b4a8733966e81f236c47d6b2e25220d638
refs/heads/master
2023-04-11T04:41:16.601854
2023-03-20T12:18:44
2023-03-20T12:18:44
297,962,627
0
0
MIT
2021-08-24T08:43:21
2020-09-23T12:28:24
Java
UTF-8
Java
false
false
764
java
package edu.stanford.bmir.protege.web.shared.place; import org.semanticweb.owlapi.model.OWLObjectProperty; /** * @author Matthew Horridge, Stanford University, Bio-Medical Informatics Research Group, Date: 20/05/2014 */ public class OWLObjectPropertyItem extends Item<OWLObjectProperty> { private static final Type<OWLObjectProperty> TYPE = new Type<OWLObjectProperty>("ObjectProperty"); public OWLObjectPropertyItem(OWLObjectProperty item) { super(item); } public static Type<OWLObjectProperty> getType() { return TYPE; } @Override public Type<OWLObjectProperty> getAssociatedType() { return TYPE; } @Override public String getItemRendering() { return getItem().toString(); } }
[ "matthew.horridge@stanford.edu" ]
matthew.horridge@stanford.edu
ea62369fa1d0f59618b4dcae4642018b2636bd27
fbf27d453d933352a2c8ef76e0445f59e6b5d304
/server/src/com/fy/engineserver/util/datacheck/handler/FairylandTreasureCheckHandler.java
afd0e37504e4bfc2517083955afe1a97d916aa41
[]
no_license
JoyPanda/wangxian_server
0996a03d86fa12a5a884a4c792100b04980d3445
d4a526ecb29dc1babffaf607859b2ed6947480bb
refs/heads/main
2023-06-29T05:33:57.988077
2021-04-06T07:29:03
2021-04-06T07:29:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,580
java
package com.fy.engineserver.util.datacheck.handler; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import com.fy.engineserver.activity.fairylandTreasure.ArticleForDraw; import com.fy.engineserver.activity.fairylandTreasure.FairylandBox; import com.fy.engineserver.activity.fairylandTreasure.FairylandTreasureManager; import com.fy.engineserver.datasource.article.data.articles.Article; import com.fy.engineserver.datasource.article.manager.ArticleManager; import com.fy.engineserver.sprite.npc.MemoryNPCManager; import com.fy.engineserver.sprite.npc.MemoryNPCManager.NPCTempalte; import com.fy.engineserver.util.CompoundReturn; import com.fy.engineserver.util.datacheck.DataCheckHandler; import com.fy.engineserver.util.datacheck.DataCheckManager; import com.fy.engineserver.util.datacheck.SendHtmlToMail; public class FairylandTreasureCheckHandler implements DataCheckHandler { @Override public String getHandlerName() { return "仙界宝箱检查"; } @Override public String[] involveConfigfiles() { return new String[] { "fairylandTreasure.xls" }; } @Override /** * 仙界宝箱|物品|描述 * 仙界宝箱|宝箱npcId|不存在 * 仙界宝箱|仙界宝箱钥匙名字|不存在 * 仙界宝箱|获得道具概率和祈福加成概率|数组长度不一致 * 仙界宝箱|获得道具概率和祈福类型|数组长度不一致 * 仙界宝箱|抽奖库物品|不存在 * 仙界宝箱|抽奖库必现物品|不存在 */ public CompoundReturn getCheckResult() { CompoundReturn cr = CompoundReturn.create(); String[] titles = new String[] { "物品类型", "物品", "描述" }; List<SendHtmlToMail> mailList = new ArrayList<SendHtmlToMail>(); FairylandTreasureManager ftm=FairylandTreasureManager.getInstance(); MemoryNPCManager mnm=(MemoryNPCManager)MemoryNPCManager.getNPCManager(); LinkedHashMap<Integer, NPCTempalte> templates=mnm.getTemplates(); List<FairylandBox> fairylandBoxList=ftm.getFairylandBoxList(); for(FairylandBox fb:fairylandBoxList){ if(!templates.containsKey(fb.getNpcId())){ mailList.add(new SendHtmlToMail(titles, new String[] { "仙界宝箱", "宝箱npcId", "<font color=red>[" + fb.getNpcId() + "]</font>不存在" })); } Article a = ArticleManager.getInstance().getArticle(fb.getBoxKeyName()); if (a == null) { mailList.add(new SendHtmlToMail(titles, new String[] { "仙界宝箱", "宝箱钥匙名字", "<font color=red>[" + fb.getBoxKeyName() + "]</font>不存在" })); } else { if (!DataCheckManager.getInstance().isRightColorOfArticle(a.getName(), a.getColorType()).getBooleanValue()) { mailList.add(new SendHtmlToMail(titles, new String[] { "仙界宝箱", "宝箱钥匙名字", "物品<font color=red>[" + fb.getBoxKeyName() + "]</font>颜色不对,错误(" + DataCheckManager.getInstance().isRightColorOfArticle(a.getName(), a.getColorType()).getStringValue() + ")" })); } } if (fb.getRates().length != fb.getPrayRates().length) { mailList.add(new SendHtmlToMail(titles, new String[] { "仙界宝箱", "数组长度不一致", "获得各类型道具的概率数组长度和祈福加成的数组长度不一致" })); }else { if(fb.getRates().length!=(ftm.prayTypeMap.size()-1)){ mailList.add(new SendHtmlToMail(titles, new String[] { "仙界宝箱", "数组长度不一致", "获得各类型道具的概率数组长度和祈福类型长度不一致" })); } } } Map<Integer, List<ArticleForDraw>> drawMap=ftm.getDrawMap(); for(Integer type:drawMap.keySet()){ List<ArticleForDraw> afdList= drawMap.get(type); if(afdList!=null&&afdList.size()>0){ for(ArticleForDraw afd:afdList){ Article a = ArticleManager.getInstance().getArticle(afd.getName()); if (a == null) { mailList.add(new SendHtmlToMail(titles, new String[] { "仙界宝箱", "抽奖库-"+ftm.prayTypeMap.get(type), "<font color=red>[" + afd.getName() + "]</font>不存在" })); } else { if (!DataCheckManager.getInstance().isRightColorOfArticle(a.getName(), a.getColorType()).getBooleanValue()) { mailList.add(new SendHtmlToMail(titles, new String[] { "仙界宝箱", "抽奖库-"+ftm.prayTypeMap.get(type), "物品<font color=red>[" + afd.getName() + "]</font>颜色不对,错误(" + DataCheckManager.getInstance().isRightColorOfArticle(a.getName(), a.getColorType()).getStringValue() + ")" })); } } } } } Map<Integer, List<ArticleForDraw>> drawSureShowMap = ftm.getDrawSureShowMap(); for(Integer type:drawSureShowMap.keySet()){ List<ArticleForDraw> afdList= drawMap.get(type); if(afdList!=null&&afdList.size()>0){ for(ArticleForDraw afd:afdList){ Article a = ArticleManager.getInstance().getArticle(afd.getName()); if (a == null) { mailList.add(new SendHtmlToMail(titles, new String[] { "仙界宝箱", "必现抽奖库-"+ftm.prayTypeMap.get(type), "<font color=red>[" + afd.getName() + "]</font>不存在" })); } else { if (!DataCheckManager.getInstance().isRightColorOfArticle(a.getName(), a.getColorType()).getBooleanValue()) { mailList.add(new SendHtmlToMail(titles, new String[] { "仙界宝箱", "必现抽奖库-"+ftm.prayTypeMap.get(type), "物品<font color=red>[" + afd.getName() + "]</font>颜色不对,错误(" + DataCheckManager.getInstance().isRightColorOfArticle(a.getName(), a.getColorType()).getStringValue() + ")" })); } } } } } return cr.setBooleanValue(mailList.size() > 0).setObjValue(mailList.toArray(new SendHtmlToMail[0])); } }
[ "1414464063@qq.com" ]
1414464063@qq.com
b627c7e1fe5316ecf94c2a4cf1c745884dcbecd6
139960e2d7d55e71c15e6a63acb6609e142a2ace
/mobile_app1/module553/src/main/java/module553packageJava0/Foo51.java
db7a34f4c6db5cd241e9ff897a0842007d896da7
[ "Apache-2.0" ]
permissive
uber-common/android-build-eval
448bfe141b6911ad8a99268378c75217d431766f
7723bfd0b9b1056892cef1fef02314b435b086f2
refs/heads/master
2023-02-18T22:25:15.121902
2023-02-06T19:35:34
2023-02-06T19:35:34
294,831,672
83
7
Apache-2.0
2021-09-24T08:55:30
2020-09-11T23:27:37
Java
UTF-8
Java
false
false
486
java
package module553packageJava0; import java.lang.Integer; public class Foo51 { Integer int0; Integer int1; Integer int2; public void foo0() { new module553packageJava0.Foo50().foo7(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } public void foo5() { foo4(); } public void foo6() { foo5(); } public void foo7() { foo6(); } }
[ "oliviern@uber.com" ]
oliviern@uber.com
447562fdcdbfd24fe757303963e05e276de54731
95ffdbacafb9255d9dfe8c5caa84c5d324025848
/zssmodel/src/org/zkoss/zss/model/SChart.java
91d774fad982c2853f630ac3c8b38938f166fce2
[ "MIT" ]
permissive
dataspread/dataspread-web
2143f3451c141a4857070a67813208c8f2da50dc
2d07f694c7419473635e355202be11396023f915
refs/heads/master
2023-01-12T16:12:47.862760
2021-05-09T02:30:42
2021-05-09T02:30:42
88,792,776
139
34
null
2023-01-06T01:36:17
2017-04-19T21:32:30
Java
UTF-8
Java
false
false
2,788
java
/* {{IS_NOTE Purpose: Description: History: 2013/12/01 , Created by dennis }}IS_NOTE Copyright (C) 2013 Potix Corporation. All Rights Reserved. {{IS_RIGHT }}IS_RIGHT */ package org.zkoss.zss.model; import java.util.List; import org.zkoss.zss.model.chart.SChartData; /** * Represents a chart in a sheet. * @author dennis * @since 3.5.0 */ public interface SChart { /** * @since 3.5.0 */ public enum ChartType{ AREA, BAR, BUBBLE, COLUMN, DOUGHNUT, LINE, OF_PIE, PIE, RADAR, SCATTER, STOCK, SURFACE } /** * @since 3.5.0 */ public enum ChartGrouping { STANDARD, STACKED, PERCENT_STACKED, CLUSTERED; //bar only } /** * @since 3.5.0 */ public enum ChartLegendPosition { BOTTOM, LEFT, RIGHT, TOP, TOP_RIGHT } /** * @since 3.5.0 */ public enum BarDirection { HORIZONTAL, //horizontal, bar chart VERTICAL; //vertical, column chart } public String getId(); public SSheet getSheet(); public ChartType getType(); public SChartData getData(); public ViewAnchor getAnchor(); public void setAnchor(ViewAnchor anchor); public String getTitle(); public String getXAxisTitle(); public String getYAxisTitle(); void setTitle(String title); void setXAxisTitle(String xAxisTitle); void setYAxisTitle(String yAxisTitle); public void setLegendPosition(ChartLegendPosition pos); public ChartLegendPosition getLegendPosition(); public void setGrouping(ChartGrouping grouping); public ChartGrouping getGrouping(); public BarDirection getBarDirection(); public void setBarDirection(BarDirection direction); public boolean isThreeD(); public void setThreeD(boolean threeD); //ZSS-822 public List<SChartAxis> getValueAxises(); public List<SChartAxis> getCategoryAxises(); //ZSS-822 public void addValueAxis(SChartAxis axis); public void addCategoryAxis(SChartAxis axis); //ZSS-830 // -90 ~ 90; default: 0 public int getRotX(); public void setRotX(int rotX); //ZSS-830 // 0 ~ 360; default: 0 public int getRotY(); public void setRotY(int rotY); //ZSS-830 // 0 ~ 240; default: 30 public int getPerspective(); public void setPerspective(int perspective); //ZSS-830 // 5 ~ 500; default: 100 public int getHPercent(); public void setHPercent(int percent); //ZSS-830 // 20 ~ 2000; default: 100 public int getDepthPercent(); public void setDepthPercent(int percent); //ZSS-830 // default: true public boolean isRightAngleAxes(); public void setRightAngleAxes(boolean b); //ZSS-830 // -100 ~ +100; default: 0 public int getBarOverlap(); public void setBarOverlap(int overlap); //ZSS-982 // default: true public void setPlotOnlyVisibleCells(boolean plotOnlyVisibleCells); public boolean isPlotOnlyVisibleCells(); }
[ "mangeshbendre@gmail.com" ]
mangeshbendre@gmail.com
20a1935004bc00e73ef50c49b0fc950f6b279c51
f0d0631e221382c8a7d48c8bed6acc4efe0bfd2d
/JavaSource/org/unitime/timetable/events/QueryEncoderBackend.java
417ae6d148c239c3d9c203ad8a7c57b55d094782
[ "CC-BY-3.0", "EPL-1.0", "CC0-1.0", "CDDL-1.0", "MIT", "LGPL-2.1-or-later", "LGPL-3.0-only", "BSD-3-Clause", "LGPL-2.1-only", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-freemarker", "Apache-2.0", "LicenseRef-scancode-public-domain", "LicenseRef-scancode-generic-cla", "LicenseRef-scancode-free-unknown", "LicenseRef-scancode-unknown-license-reference" ]
permissive
tomas-muller/unitime
8c7097003b955053f32fe5891f1d29b554c4dd45
de307a63552128b75ae9a83d7e1d44c71b3dc266
refs/heads/master
2021-12-29T04:57:46.000745
2021-12-09T19:02:43
2021-12-09T19:02:43
30,605,965
4
0
Apache-2.0
2021-02-17T15:14:49
2015-02-10T18:01:29
Java
UTF-8
Java
false
false
5,906
java
/* * Licensed to The Apereo Foundation under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * The Apereo Foundation licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * limitations under the License. * */ package org.unitime.timetable.events; import java.math.BigInteger; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.security.spec.InvalidKeySpecException; import java.security.spec.KeySpec; import java.util.Date; import javax.crypto.Cipher; import javax.crypto.IllegalBlockSizeException; import javax.crypto.SecretKey; import javax.crypto.SecretKeyFactory; import javax.crypto.spec.PBEKeySpec; import javax.crypto.spec.SecretKeySpec; import org.unitime.timetable.defaults.ApplicationProperty; import org.unitime.timetable.gwt.command.client.GwtRpcException; import org.unitime.timetable.gwt.command.server.GwtRpcImplementation; import org.unitime.timetable.gwt.command.server.GwtRpcImplements; import org.unitime.timetable.gwt.shared.EventInterface.EncodeQueryRpcRequest; import org.unitime.timetable.gwt.shared.EventInterface.EncodeQueryRpcResponse; import org.unitime.timetable.model.HashedQuery; import org.unitime.timetable.model.dao.HashedQueryDAO; import org.unitime.timetable.security.SessionContext; import biweekly.util.org.apache.commons.codec.binary.Base64; /** * @author Tomas Muller */ @GwtRpcImplements(EncodeQueryRpcRequest.class) public class QueryEncoderBackend implements GwtRpcImplementation<EncodeQueryRpcRequest, EncodeQueryRpcResponse> { @Override public EncodeQueryRpcResponse execute(EncodeQueryRpcRequest request, SessionContext context) { String query = request.getQuery() + (context.getUser() == null ? "" : "&user=" + context.getUser().getExternalUserId() + (context.getUser() == null || context.getUser().getCurrentAuthority() == null ? "" : "&role=" + context.getUser().getCurrentAuthority().getRole())); if (request.isHash() && ApplicationProperty.UrlEncoderHashQueryWhenAsked.isTrue()) { return new EncodeQueryRpcResponse(encode(query), hash(query)); } else { return new EncodeQueryRpcResponse(encode(query)); } } private static SecretKey secret() throws NoSuchAlgorithmException, InvalidKeySpecException { byte salt[] = new byte[] { (byte)0x33, (byte)0x7b, (byte)0x09, (byte)0x0e, (byte)0xcf, (byte)0x5a, (byte)0x58, (byte)0xd9 }; SecretKeyFactory factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1"); KeySpec spec = new PBEKeySpec(ApplicationProperty.UrlEncoderSecret.value().toCharArray(), salt, 1024, 128); SecretKey key = factory.generateSecret(spec); return new SecretKeySpec(key.getEncoded(), "AES"); } public static String encode(String text) { try { Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding"); cipher.init(Cipher.ENCRYPT_MODE, secret()); //return new BigInteger(cipher.doFinal(text.getBytes())).toString(36); return new Base64(-1, new byte[] {}, true).encodeAsString(cipher.doFinal(text.getBytes())); } catch (Exception e) { throw new GwtRpcException("Encoding failed: " + e.getMessage(), e); } } public static String hash(String text) { try { if (text.length() > 2048) return null; MessageDigest md5 = MessageDigest.getInstance("MD5"); Date ts = new Date(); String hash = new BigInteger(md5.digest(text.getBytes())).toString(36) + Long.toString(ts.getTime(), 36); HashedQuery hq = new HashedQuery(); hq.setQueryHash(hash); hq.setQueryText(text); hq.setCreated(ts); hq.setNbrUsed(0l); hq.setLastUsed(ts); HashedQueryDAO.getInstance().save(hq); return hash; } catch (Exception e) { throw new GwtRpcException("Hashing failed: " + e.getMessage(), e); } } public static String decode(String text) { return decode(text, false); } public static String decode(String text, boolean hash) { try { if (text == null || text.isEmpty()) return null; if (hash) { HashedQuery hq = HashedQueryDAO.getInstance().get(text); if (hq == null) throw new GwtRpcException("The query hash " + text + " no longer exists. Please create a new URL."); hq.setNbrUsed(1 + hq.getNbrUsed()); hq.setLastUsed(new Date()); HashedQueryDAO.getInstance().update(hq); return hq.getQueryText(); } else { Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding"); cipher.init(Cipher.DECRYPT_MODE, secret()); try { return new String(cipher.doFinal(new Base64(-1, new byte[] {}, true).decode(text))); } catch (Exception e) { try { return new String(cipher.doFinal(new BigInteger(text, 36).toByteArray())); } catch (IllegalBlockSizeException x) { byte[] bytes = new BigInteger(text, 36).toByteArray(); byte[] fixed = new byte[(1 + bytes.length / cipher.getBlockSize()) * cipher.getBlockSize()]; for (int i = 0; i < fixed.length - bytes.length; i++) fixed[i] = -1; System.arraycopy(bytes, 0, fixed, fixed.length - bytes.length, bytes.length); return new String(cipher.doFinal(fixed)); } } } } catch (Exception e) { throw new GwtRpcException("Decoding failed: " + e.getMessage(), e); } } public static void main(String[] args) { System.out.println(encode("output=events.csv&type=PERSON&ext=1001&token=1xhp5vo3zfxrpbzjzhtanmcipolx03fv42ohz4xa507x5acydh&user=1001")); } }
[ "muller@unitime.org" ]
muller@unitime.org
51712d03d4a669b767a608628b329d6d0f744078
8138da3b905564d6b2933d5ebae6b7d5b3d9d20c
/wb/t20190208/JString2.java
4c627be22fd49f932fc1a5b171a2841c4d58b92e
[ "MIT" ]
permissive
stackprobe/Spica01
08f0fa0eb67dbc146d3116e74451ade79b9e0589
1e4e1b3e1b20bafc85805f6cf0ee01a16b39a9de
refs/heads/master
2021-06-30T07:16:34.917063
2020-09-29T14:24:10
2020-09-29T14:24:10
155,574,647
0
0
null
null
null
null
UTF-8
Java
false
false
1,465
java
package wb.t20190208; import java.io.ByteArrayOutputStream; import charlotte.tools.JString; import charlotte.tools.StringTools; public class JString2 { public static String filter(String str) throws Exception { StringBuffer buff = new StringBuffer(); for(char chr : str.toCharArray()) { if(AllowedCharacters.i().contains(chr)) { buff.append(chr); } else { buff.append(String.format("\\u%04x", chr & 0xffff)); } } return buff.toString(); } private static class AllowedCharacters { private static AllowedCharacters _i = null; public static AllowedCharacters i() throws Exception { if(_i == null) { _i = new AllowedCharacters(); } return _i; } private int[] _bits = new int[2048]; private AllowedCharacters() throws Exception { add('\t'); add('\n'); add(' '); for(char chr : StringTools.HALF.toCharArray()) { add(chr); } try(ByteArrayOutputStream mem = new ByteArrayOutputStream(0x20000)) { for(int chr = 0x0000; chr <= 0xffff; chr++) { if(JString.JChar.i().contains(chr)) { mem.write(chr >> 8); mem.write(chr & 0xff); } } for(char chr : mem.toString(StringTools.CHARSET_SJIS).toCharArray()) { add(chr); } } } private void add(int chr) { _bits[(chr & 0x0000ffe0) >>> 5] |= 1 << (chr & 0x0000001f); } public boolean contains(int chr) { return (_bits[(chr & 0x0000ffe0) >>> 5] & (1 << (chr & 0x0000001f))) != 0; } } }
[ "stackprobes@gmail.com" ]
stackprobes@gmail.com
8a51b7d162e4eb08a9cf017656752c9f1c5ed3fd
22e6bf275fdf02a7ff2046e7c37282dde85bb43e
/core/src/test/resources/plugin/controller/view/index/A.java
cdd8bb45e9e79d4af2515401a736fc61b59ec84a
[]
no_license
ybz216/juzu
05206904eb7099abaa5a477224e4dcb4de9ed4c2
37612ff8b031ec55523fa4654546ab4c2536fc2c
refs/heads/master
2022-05-11T10:50:40.699471
2020-01-14T14:18:50
2020-01-29T18:27:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
906
java
/* * Copyright 2013 eXo Platform SAS * * 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 plugin.controller.view.index; import juzu.Response; import juzu.View; import java.io.IOException; /** @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a> */ public class A { @View public Response.Content index() throws IOException { return Response.ok("index"); } }
[ "julien@julienviet.com" ]
julien@julienviet.com
2ebffe6dcf6a47de0d8db183c9f7c4814ef3ffd6
fc033645e516c9c4fc75c17c54dcf4189a3fa9c8
/buildSrc/src/main/java/Versions.java
3288e6ed6180c49dc59df1a2d202b50ca5617ecf
[]
no_license
przrak/otus_java_2020_09
6b9133238f8db047c3c225defb41bd23e9add478
fed8f365122ee13ea6d9800db9180caf4bff020e
refs/heads/master
2023-02-04T01:32:54.321100
2020-12-13T14:54:50
2020-12-13T14:54:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
304
java
public interface Versions { String guava = "28.2-jre"; String jmh = "1.26"; String jol = "0.14"; String asm = "9.0"; String glassfishJson = "1.1.4"; String protobuf = "3.12.1"; String flyway = "6.4.4"; String testcontainers = "1.14.3"; String postgresql = "42.2.5"; }
[ "petrelevich@yandex.ru" ]
petrelevich@yandex.ru
a3b9e700469984d1d66b141ecc7c94159051a86c
4c5378724e83becba2a3aa23f2931ad4f8cfffaa
/src/main/java/edu/vt/cs/irwin/etdscraper/Main.java
86c19cd3ebdb4bfd5d6a112363e7e52f0bb65c6d
[]
no_license
mikesir87/ETD-Scraper
249ab8cbcc6016b38e350529e95b4857dee2331a
392d64625b71eb759dbf57910d089085c2d7c9c4
refs/heads/master
2021-01-18T01:44:06.675735
2014-07-28T14:56:38
2014-07-28T14:56:38
22,120,807
0
0
null
null
null
null
UTF-8
Java
false
false
2,051
java
/* * File created on Jul 10, 2014 * * Copyright 2008-2013 Nerdwin15 * * 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 edu.vt.cs.irwin.etdscraper; import java.util.List; import java.util.concurrent.ExecutorService; import javax.inject.Inject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.google.inject.Guice; import com.google.inject.Injector; import edu.vt.cs.irwin.etdscraper.repository.EtdRepository; import edu.vt.cs.irwin.etdscraper.retriever.EtdRetriever; /** * The main class for the project. * * @author Michael Irwin */ public class Main { private static final Logger logger = LoggerFactory.getLogger(Main.class); public static void main(String[] args) throws Exception { Configuration config = Configuration.setup(args); if (config == null) return; Injector injector = Guice.createInjector(new EtdModule(config)); Main main = injector.getInstance(Main.class); main.run(); } @Inject protected EtdRetriever retriever; @Inject protected ExecutorService executorService; @Inject protected EtdRepository etdRepository; public void run() { try { List<Etd> etds = retriever.retrieveEtds(); logger.info("Retrieved a total of " + etds.size() + " etds"); logger.info("Saving all ETDs to the database now"); for (Etd etd : etds) { etdRepository.saveEtd(etd); } logger.info("Finished saving ETDs to the database"); } finally { executorService.shutdownNow(); } } }
[ "mikesir87@gmail.com" ]
mikesir87@gmail.com
0175e550e6ec9db7ea2761507d6b047a12591805
4f435cc1296d0f0ca5fec1ef220f2f29aa6d0c46
/src/test/java/com/westear/ssm/dao/test/DemoDaoTest.java
b761bbac81d7c10cb48b5d612a1e8d571282d556
[]
no_license
westear/ssm-pro
93c27150db5bacdb332aacc11e00a27db7886dc8
3adf02207a663f54a4cbb0e9e7f6fed04585dc80
refs/heads/master
2021-01-13T15:56:46.236799
2017-04-07T03:42:45
2017-04-09T09:22:56
76,789,746
1
1
null
null
null
null
UTF-8
Java
false
false
1,691
java
package com.westear.ssm.dao.test; import java.util.List; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import com.westear.ssm.dao.AppointmentMapper; import com.westear.ssm.dao.BookMapper; import com.westear.ssm.model.Appointment; import com.westear.ssm.model.AppointmentExample; import com.westear.ssm.model.Book; import com.westear.ssm.test.DemoTest; import com.westear.ssm.util.pageUtil.Page; import com.westear.ssm.vo.BookAppointVO; public class DemoDaoTest extends DemoTest{ @Autowired private BookMapper bookMapper; @Autowired private AppointmentMapper appointmentMapper; @Test public void addBook() throws Exception{ String bookName = "设计模式解析(第2版)"; Long bookNum = new Long(300000); Book book = new Book(); book.setName(bookName); book.setNum(bookNum); bookMapper.insert(book); } @Test public void selectAppoint(){ int pageNo = 1; int pageSize = 10; Page<Appointment> page = new Page<Appointment>(pageNo, pageSize); AppointmentExample example = new AppointmentExample(); List<Appointment> appointmentList = appointmentMapper.selectAppointmentByPage(page, example); if(appointmentList != null && appointmentList.size() > 0){ for(Appointment appointment : appointmentList){ System.out.println(appointment.getStudentId()+" : "+appointment.getBookId()); } } } @Test public void selectBookAppoint(){ int pageNo = 1; int pageSize = 10; Page<BookAppointVO> page = new Page<BookAppointVO>(pageNo, pageSize); List<BookAppointVO> list = appointmentMapper.selectBookAndAppointment(page); for(BookAppointVO ba : list){ System.out.println(ba.toString()); } } }
[ "xyq667129@163.com" ]
xyq667129@163.com
287190ed4baf57ec5f5be58fd313c8c1974ee22b
5148293c98b0a27aa223ea157441ac7fa9b5e7a3
/Method_Scraping/xml_scraping/NicadOutputFile_t1_beam_2nd/Nicad_t1_beam_2nd1259.java
8f7f8b019a5cb75e0c28d52c774d55d6ca390dd5
[]
no_license
ryosuke-ku/TestCodeSeacherPlus
cfd03a2858b67a05ecf17194213b7c02c5f2caff
d002a52251f5461598c7af73925b85a05cea85c6
refs/heads/master
2020-05-24T01:25:27.000821
2019-08-17T06:23:42
2019-08-17T06:23:42
187,005,399
0
0
null
null
null
null
UTF-8
Java
false
false
507
java
// clone pairs:6156:70% // 8147:beam/sdks/java/core/src/main/java/org/apache/beam/sdk/values/ValueWithRecordId.java public class Nicad_t1_beam_2nd1259 { public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof ValueWithRecordId)) { return false; } ValueWithRecordId<?> otherRecord = (ValueWithRecordId<?>) other; return Objects.deepEquals(id, otherRecord.id) && Objects.deepEquals(value, otherRecord.value); } }
[ "naist1020@gmail.com" ]
naist1020@gmail.com
30ac5eecb5fdf3bee6a58aad7bb2d260d95a989d
05816b4ea192490ac116e4793b4f2175b26ce791
/src/main/java/com/cn/tianxia/ws/QueryTransfer.java
c45cc67d6dfdd2332b1a7dd3db551acdc39e80fa
[]
no_license
pumaxiaoyao/Spring-mvc-interface
7099b489b96312936802946ee075ece12e9f1017
6e2ba6c7c25463a31484fc4e6f83c2e3c47112e2
refs/heads/master
2020-05-21T21:49:55.833642
2019-02-13T10:10:49
2019-02-13T10:10:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,507
java
/** * QueryTransfer.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. */ package com.cn.tianxia.ws; public class QueryTransfer implements java.io.Serializable { private com.cn.tianxia.ws.QueryTransferRequest req; public QueryTransfer() { } public QueryTransfer( com.cn.tianxia.ws.QueryTransferRequest req) { this.req = req; } /** * Gets the req value for this QueryTransfer. * * @return req */ public com.cn.tianxia.ws.QueryTransferRequest getReq() { return req; } /** * Sets the req value for this QueryTransfer. * * @param req */ public void setReq(com.cn.tianxia.ws.QueryTransferRequest req) { this.req = req; } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof QueryTransfer)) return false; QueryTransfer other = (QueryTransfer) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = true && ((this.req==null && other.getReq()==null) || (this.req!=null && this.req.equals(other.getReq()))); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = 1; if (getReq() != null) { _hashCode += getReq().hashCode(); } __hashCodeCalc = false; return _hashCode; } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(QueryTransfer.class, true); static { typeDesc.setXmlType(new javax.xml.namespace.QName("http://ws.oxypite.com/", ">QueryTransfer")); org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("req"); elemField.setXmlName(new javax.xml.namespace.QName("http://ws.oxypite.com/", "req")); elemField.setXmlType(new javax.xml.namespace.QName("http://ws.oxypite.com/", "QueryTransferRequest")); elemField.setMinOccurs(0); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); } /** * Return type metadata object */ public static org.apache.axis.description.TypeDesc getTypeDesc() { return typeDesc; } /** * Get Custom Serializer */ public static org.apache.axis.encoding.Serializer getSerializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanSerializer( _javaType, _xmlType, typeDesc); } /** * Get Custom Deserializer */ public static org.apache.axis.encoding.Deserializer getDeserializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanDeserializer( _javaType, _xmlType, typeDesc); } }
[ "xfearless1201@gmail.com" ]
xfearless1201@gmail.com
5aea83dc0290f91274c0cf28d574f2e4f7b91ef4
75231940a2b62bc05d039abcd3bec5be542dc682
/wanxindepository/src/main/java/cn/itcast/wanxindepository/common/domain/PageVO.java
db053983c0b604ea20c2a63dd5d62a370679c16d
[]
no_license
q2315648899/wanxin-p2p-apollo
dd04465478b3e3110be5c3b5a43d194985eed519
16c6f1609dfeab658ada07d484ed25252768750e
refs/heads/master
2023-06-18T13:47:53.491868
2021-07-17T09:11:52
2021-07-17T09:11:52
380,989,537
0
1
null
null
null
null
UTF-8
Java
false
false
3,350
java
package cn.itcast.wanxindepository.common.domain; import java.io.Serializable; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; public class PageVO<T> implements Iterable<T>, Serializable { private List<T> content = new ArrayList<T>(); private long total; private int pageNo; private int pageSize; public PageVO() { } public PageVO(List<T> content, long total, int pageNo, int pageSize) { this.content = content; this.total = total; this.pageNo = pageNo; this.pageSize = pageSize; } /** * Returns if there is a previous page. * * @return if there is a previous page. */ public boolean hasPrevious() { return getPageNo() > 0; } /** * Returns if there is a next page. * * @return if there is a next page. */ public boolean hasNext() { return getPageNo() + 1 < getTotalPage(); } /** * Returns whether the current page is the first one. * * @return whether the current page is the first one. */ public boolean isFirst() { return !hasPrevious(); } /** * Returns whether the current page is the last one. * * @return whether the current page is the last one. */ boolean isLast() { return !hasNext(); } /** * Returns the total amount of elements of all pages. * * @return the total amount of elements of all pages. */ public long getTotal() { return total; } public void setTotal(long total) { this.total = total; } /** * Returns the number of total pages. * * @return the number of total pages */ public int getTotalPage() { return getPageSize() == 0 ? 1 : (int) Math.ceil((double) total / (double) getPageSize()); } /** * Returns the page content as unmodifiable {@link List}. * * @return Returns the page content as unmodifiable {@link List} */ public List<T> getContent() { return Collections.unmodifiableList(content); } public void setContent(List<T> content) { this.content = content; } /** * Returns whether the current page has content. * * @return whether the current page has content. */ public boolean hasContent() { return getContentSize() > 0; } /** * Returns the number of elements on current page. * * @return the number of elements on current page. */ public int getContentSize() { return content.size(); } /** * Returns the number of items of each page. * * @return the number of items of each page */ public int getPageSize() { return pageSize; } public void setPageSize(int pageSize) { this.pageSize = pageSize; } /** * Returns the number of current page. (Zero-based numbering.) * * @return the number of current page. */ public int getPageNo() { return pageNo; } /** * Set the number of current page. (Zero-based numbering.) */ public void setPageNo(int pageNo) { this.pageNo = pageNo; } public Iterator<T> iterator() { return getContent().iterator(); } }
[ "406972433@qq.com" ]
406972433@qq.com
dde86d867d018d8a1de0723d2d2e77cbe708a399
87c3c335023681d1c906892f96f3a868b3a6ee8e
/HTML5/dev/simplivity-citrixplugin-service/src/main/java/com/vmware/vim25/LicenseManagerLicenseKey.java
75c66e0e4bc1f9449732860db309a40215a20000
[ "Apache-2.0" ]
permissive
HewlettPackard/SimpliVity-Citrix-VCenter-Plugin
19d2b7655b570d9515bf7e7ca0cf1c823cbf5c61
504cbeec6fce27a4b6b23887b28d6a4e85393f4b
refs/heads/master
2023-08-09T08:37:27.937439
2020-04-30T06:15:26
2020-04-30T06:15:26
144,329,090
0
1
Apache-2.0
2020-04-07T07:27:53
2018-08-10T20:24:34
Java
UTF-8
Java
false
false
658
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.6 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2019.06.12 at 09:16:35 AM EDT // package com.vmware.vim25; /** * */ public enum LicenseManagerLicenseKey { esxFull, esxVmtn, esxExpress, san, iscsi, nas, vsmp, backup, vc, vcExpress, esxHost, gsxHost, serverHost, drsPower, vmotion, drs, das; }
[ "anuanusha471@gmail.com" ]
anuanusha471@gmail.com
c101291b0a702069ed60890764fb233f98538b79
4301d0824c68a764926bbeb70bad3f8eac68a31b
/examples/data/derby/v3/preA.pruned0180/000137.java
2d0f50115706291c98051d61454ad0e81040bddd
[]
no_license
stepthom/tcp.lda
35eb552f1a00392af49b1631250d7009ce36f6d1
aad1dca7c893bfcbdfa1870879cf894f7c44d9a5
refs/heads/master
2020-04-05T16:53:38.634211
2012-11-26T20:36:23
2012-11-26T20:36:23
6,835,530
2
0
null
null
null
null
UTF-8
Java
false
false
2,700
java
apach derbi test function test test jdbcapi java sql connect java sql driver manag java sql databas meta data java sql result set meta data java sql statem java sql callabl statem java sql result set java sql sqlexcept java sql type java sql timestamp java sql time java sql date java math big decim java util properti apach derbi tool metadata metadata test metadata metadata arg properti arg arg con start jbm con creat statem sqlexcept dump sqlexcept throwabl system println fail unexpect except print stack trace system arg except metadata arg run test result set meta data databas meta data dmd proc arg arg arrai arg arg sqlexcept proc procedur dmd procedur arg arg arg procedur column dmd procedur column arg arg arg arg tabl dmd tabl arg arg arg arg arrai column dmd column arg arg arg arg column privileg dmd column privileg arg arg arg arg tabl privileg dmd tabl privileg arg arg arg row identifi dmd row identifi arg arg arg arg arg version column dmd version column arg arg arg primari kei dmd primari kei arg arg arg import kei dmd import kei arg arg arg export kei dmd export kei arg arg arg cross refer dmd cross refer arg arg arg arg arg arg type info dmd type info index info dmd index info arg arg arg arg arg system println unexpect procedur encount proc dump proc result set sqlexcept result set meta data rsmd meta data num col rsmd column count header num col num col system println column num col system print header rsmd column label system print header system print rsmd column type system println buffer error column error column buffer num col system print header equal data type apach derbi test function test util test util jdbcmajor version statem connect integ integ system print type system print system print system println close getpc big decim date time timestamp getpc getpc getpc getpca getpcb isro sqlexcept driver manag connect jdbc connect meta data read test databas meta data program simpli call meta data method print result test pass print result match previous store master test discern pass author alan constructor intial connect statem field test make call run test method metadata test java turn call back implement method method respons execut metadata queri return result set compli jdbc specif shouldn number column result set displai column head column type part head displai data fetch end result set loop column column data displai dummi method test procedur column overload getpc test procedur column overload getpc test procedur column method shouldn return alia procedur instanc method method alia return procedur column return java procedur method notb procedur column paramet check method paramt work procedur column check nest connect work
[ "stephen.warner.thomas@gmail.com" ]
stephen.warner.thomas@gmail.com
a6fb2359ce97022fc6e3adfd6950227a235a3f72
c965bf50a919514585804032f09c519c55971973
/src/main/java/com/longfor/fsscreportdb/ods/mapper/OdsZdSwglzzsfb3Mapper.java
ee7a445350e94389a40811ce30a419430de73ed0
[]
no_license
fantisticjob/fssc-rptdata
8320d374e2f877f44410b2c90d25cda8418a40c6
22f499041416d0a48c2a3ae17146944b70cfc3ca
refs/heads/main
2023-07-12T06:27:14.774910
2021-08-17T08:34:36
2021-08-17T08:34:36
397,172,507
0
1
null
null
null
null
UTF-8
Java
false
false
390
java
package com.longfor.fsscreportdb.ods.mapper; import com.longfor.fsscreportdb.ods.entity.OdsZdSwglzzsfb3; import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** * <p> * 增值税纳税申报表附列资料(三) Mapper 接口 * </p> * * @author chenziyao * @since 2020-08-11 */ public interface OdsZdSwglzzsfb3Mapper extends BaseMapper<OdsZdSwglzzsfb3> { }
[ "1048508578@qq.com" ]
1048508578@qq.com
af753fad9532e283a7fdcef840bef2abc5280477
3247360ea20edce37f6f2ab727a403644bd44497
/bitcamp-java-basic/src/main/java/ch25/c/Test03.java
26d02e42de0bff4084efaa6f2bf66c74062618b8
[]
no_license
choitaehoon1998/bitcamp-java-20190527
57b1774d50f245b0b77016f0ae541710233010b6
2450c3042642df3eae2fc896e12c376c7d27b048
refs/heads/master
2020-06-13T20:17:08.537015
2019-10-15T12:30:20
2019-10-15T12:30:20
194,775,340
0
0
null
2020-04-30T11:45:18
2019-07-02T02:41:02
Java
UTF-8
Java
false
false
748
java
// PreparedStatement를 이용하여 SQL 삽입 공격 차단하기 package ch25.c; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; public class Test03 { public static void main(String[] args)throws Exception { Connection con = DriverManager.getConnection( "jdbc:mariadb://localhost/bitcampdb?user=bitcamp&password=1111"); PreparedStatement prst = con.prepareStatement( "update x_board set contents =? ,title=? where board_id = ?"); prst.setString(1, "1"); prst.setString(2, "2"); prst.setString(3, "3"); int no =prst.executeUpdate(); if(no ==0) { System.out.println("업데이트 실패"); }else { System.out.println("성공"); } } }
[ "hugebigdream@gmail.com" ]
hugebigdream@gmail.com
7e22ee0840c148008b0b2a1c9edae6015847470b
13c07fc7b43542f4b91c2697c282f398a28e4099
/tests-arquillian/src/test/java/org/jboss/weld/tests/contexts/request/rmi/Bridge.java
0ecdb76cf6d5f5b033841789117c158c4a06c123
[ "Apache-2.0" ]
permissive
Mattlk13/core
d889253fa1d1815ffbfea21dcc077616766eb3bb
6c369e15b89d25ce33151f5f5db91c57e916c68a
refs/heads/master
2023-08-18T03:11:48.024635
2020-03-28T12:23:48
2020-03-28T12:23:48
81,315,189
0
0
Apache-2.0
2023-05-01T20:35:07
2017-02-08T10:01:42
Java
UTF-8
Java
false
false
140
java
package org.jboss.weld.tests.contexts.request.rmi; import javax.ejb.Remote; @Remote public interface Bridge { String doSomething(); }
[ "jharting@redhat.com" ]
jharting@redhat.com
23c4e36bc544da4de51154b83e103bb781faee74
0db6bc42d85eda033ab12792810002f9002073cf
/basemock/src/main/java/com/github/dreamhead/moco/extractor/JsonPathRequestExtractor.java
738bd125ce1c3329e9b68ce7e4b87cf5beffd11b
[]
no_license
shichaowei/mockserver
0225ac8fc45cb7081df077649acf61f83fe4eb24
7e3ea0c4fde77ef5c9f3bdcf87052a81997cc2c0
refs/heads/master
2021-01-20T04:12:09.689470
2017-04-28T02:22:21
2017-04-28T02:22:21
89,658,762
0
0
null
null
null
null
UTF-8
Java
false
false
1,751
java
package com.github.dreamhead.moco.extractor; import com.github.dreamhead.moco.HttpRequest; import com.github.dreamhead.moco.HttpRequestExtractor; import com.google.common.base.Optional; import com.jayway.jsonpath.JsonPath; import com.jayway.jsonpath.PathNotFoundException; import java.io.ByteArrayInputStream; import java.io.IOException; import java.util.List; import static com.google.common.base.Optional.absent; import static com.google.common.base.Optional.of; public class JsonPathRequestExtractor extends HttpRequestExtractor<Object> { private final ContentRequestExtractor extractor = new ContentRequestExtractor(); private final JsonPath jsonPath; public JsonPathRequestExtractor(final String jsonPath) { this.jsonPath = JsonPath.compile(jsonPath); } @Override protected Optional<Object> doExtract(final HttpRequest request) { Optional<byte[]> requestBody = extractor.extract(request); try { if (!requestBody.isPresent()) { return absent(); } Object jsonPathContent = jsonPath.read(new ByteArrayInputStream(requestBody.get())); if (jsonPathContent == null) { return absent(); } return of(toStringArray(jsonPathContent)); } catch (PathNotFoundException e) { return absent(); } catch (IOException e) { return absent(); } } private Object toStringArray(final Object content) { if (content instanceof List) { @SuppressWarnings("unchecked") List<String> texts = (List<String>) content; return texts.toArray(new String[texts.size()]); } return content.toString(); } }
[ "1239378293@qq.com" ]
1239378293@qq.com
1245c01b1fb5bc569d0dabf56d7073d4f7b8a30b
8ef2cecd392f43cc670ae8c6f149be6d71d737ba
/src/com/google/api/services/drive/Drive$Files$Delete.java
e3ea64da0b8ca0fbcf79c1c88fd8f12b2465b0af
[]
no_license
NBchitu/AngelEyes2
28e563380be6dcf5ba5398770d66ebeb924a033b
afea424b70597c7498e9c6da49bcc7b140a383f7
refs/heads/master
2021-01-16T18:30:51.913292
2015-02-15T07:30:00
2015-02-15T07:30:00
30,744,510
0
0
null
null
null
null
UTF-8
Java
false
false
705
java
package com.google.api.services.drive; import com.google.api.client.util.Key; import com.google.common.base.Preconditions; public class Drive$Files$Delete extends DriveRequest<Void> { @Key private String fileId; Drive$Files$Delete(Drive.Files paramFiles, String paramString) { super(paramFiles.a, "DELETE", "files/{fileId}", null, Void.class); this.fileId = ((String)Preconditions.a(paramString, "Required parameter fileId must be specified.")); } } /* Location: C:\DISKD\fishfinder\apktool-install-windows-r05-ibot\classes_dex2jar.jar * Qualified Name: com.google.api.services.drive.Drive.Files.Delete * JD-Core Version: 0.7.0.1 */
[ "bjtu2010@hotmail.com" ]
bjtu2010@hotmail.com
e5f069ddaa630a0282a9d8256cff10d6b7ab7202
219cbfd2b09c8989afbdcdd4198b77dd93799b1e
/develop/server/project/game/src/main/java/com/home/game/logic/union/GUnion.java
17ce3be02db75d7b996f63862e230926eb52dcd5
[ "Apache-2.0" ]
permissive
shineTeam7/tank
2c9d6e1f01ebe6803731b520ce84eea52c593d2b
1d37e93474bc00ca3923be08d0742849c73f1049
refs/heads/master
2022-12-02T01:35:12.116350
2020-08-17T12:09:01
2020-08-17T12:09:01
288,139,019
2
1
null
null
null
null
UTF-8
Java
false
false
1,099
java
package com.home.game.logic.union; import com.home.base.constlist.generate.GFunctionType; import com.home.base.constlist.generate.GRoleGroupChangeType; import com.home.base.data.social.union.GUnionData; import com.home.base.data.social.union.GUnionSimpleData; import com.home.commonBase.constlist.generate.FunctionType; import com.home.commonBase.data.social.roleGroup.RoleGroupChangeData; import com.home.commonBase.data.social.roleGroup.RoleGroupSimpleData; import com.home.commonBase.data.social.union.UnionSimpleData; import com.home.commonGame.global.GameC; import com.home.commonGame.logic.union.Union; import com.home.commonGame.tool.func.IGameRankTool; import com.home.commonGame.tool.func.RoleGroupRankTool; /** g层工会 */ public class GUnion extends Union { @Override public void construct() { super.construct(); } /** 创建公会简版数据 */ @Override protected RoleGroupSimpleData toCreateRoleGroupSimpleData() { return new GUnionSimpleData(); } @Override protected void onChangeData(RoleGroupChangeData data) { super.onChangeData(data); } }
[ "359944951@qq.com" ]
359944951@qq.com
fbdc2a6eb6f7778593b76c61fb897a1b8be42f8d
eefee2e1fda02b84819b0fbc312e9d5beee3e952
/src/main/java/indi/twc/algorithm/offer/No31to40/Main38.java
ddefb31c89ecb8bf97a84778e4220cbe244cb30d
[]
no_license
SkyScraperTwc/BrushExercise
85aeacd6a56991ef81e3cdbdb3f9f61b5d0dafe0
d1810e32a315202f7583bb30c8b7b1bb0d63883d
refs/heads/master
2021-09-12T21:22:10.897823
2018-04-21T02:26:53
2018-04-21T02:26:53
109,250,174
3
2
null
null
null
null
UTF-8
Java
false
false
656
java
package indi.twc.algorithm.offer.No31to40; import indi.twc.algorithm.offer.common.TreeNode; /** * 输入一棵二叉树,判断该二叉树是否是平衡二叉树 */ public class Main38 { public static void main(String[] args) { } public boolean IsBalanced_Solution(TreeNode root) { if (root == null) { return true; } int left = Main37.TreeDepth(root.left); int right = Main37.TreeDepth(root.right); if (Math.abs(left - right) > 1) { return false; } else { return IsBalanced_Solution(root.left) && IsBalanced_Solution(root.right); } } }
[ "543145646@qq.com" ]
543145646@qq.com
9ecd76e1d5d2b4d84f73a3840c17b6792f126d46
d9c082ee60b180cff36174dc7fe708748768784c
/src/main/java/com/github/bdg91/tello/command/control/EmergencyCommand.java
b96f841dff861674b48d6e9bcf7667bbc36bb497
[ "MIT" ]
permissive
fiorenzino/tello-java-driver
0c6b3ac7aadffb0e89f5e4485b4f03a55cc78525
3eba7ee1cfe115d4113b6125f8c568c9d5c7e9b2
refs/heads/master
2021-07-12T08:04:01.201898
2019-08-28T20:25:17
2019-08-28T20:25:17
205,016,653
0
0
null
null
null
null
UTF-8
Java
false
false
1,951
java
/* * MIT License * * Copyright © 2019 Bas de Groot * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package com.github.bdg91.tello.command.control; import com.github.bdg91.tello.client.TelloClient; import com.github.bdg91.tello.command.Command; import java.io.IOException; /** * Command to stop all the motors immediately. */ public class EmergencyCommand implements Command { private static final String COMMAND = "emergency"; private final TelloClient telloClient; public EmergencyCommand(final TelloClient telloClient) { this.telloClient = telloClient; } /** * Executes the emergency {@link Command}. * * @return 'ok' if everything is okay, 'error' otherwise * @throws IOException if sending the command or receiving the return value fails */ public String execute() throws IOException { return telloClient.sendCommand(COMMAND); } }
[ "fiorenzino@gmail.com" ]
fiorenzino@gmail.com
88c6804dc44ef3a4f94444ff7a873069730c3bfc
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/training/com/thoughtworks/go/plugin/configrepo/contract/CRBaseTest.java
ac1b3f2da3c5d03871797da48ad16e46717631bf
[]
no_license
STAMP-project/dspot-experiments
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
121487e65cdce6988081b67f21bbc6731354a47f
refs/heads/master
2023-02-07T14:40:12.919811
2019-11-06T07:17:09
2019-11-06T07:17:09
75,710,758
14
19
null
2023-01-26T23:57:41
2016-12-06T08:27:42
null
UTF-8
Java
false
false
6,662
java
/** * Copyright 2018 ThoughtWorks, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.thoughtworks.go.plugin.configrepo.contract; import com.google.gson.Gson; import com.google.gson.JsonObject; import com.google.gson.JsonPrimitive; import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; import java.util.Map; import junit.framework.TestCase; import org.junit.Assert; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; public abstract class CRBaseTest<T extends CRBase> { private boolean printExamples = false; protected Gson gson; @Rule public ExpectedException thrown = ExpectedException.none(); @Test public void shouldHaveEqualsImplementedForTests() { // just try equality of each example with other for (Object o : getExamples().entrySet()) { Map.Entry<String, T> right = ((Map.Entry<String, T>) (o)); for (Map.Entry<String, T> left : getExamples().entrySet()) { if ((left.getValue()) == (right.getValue())) Assert.assertThat(String.format("example '%s' should equal to itself", left.getKey()), left.getValue().equals(right.getValue()), CRBaseTest.is(true)); else Assert.assertThat(String.format("example '%s' should not equal to '%s'", left.getKey(), right.getKey()), left.getValue().equals(right.getValue()), CRBaseTest.is(false)); } } } @Test public void shouldSerializeToJson() { Map<String, T> examples = getExamples(); for (Map.Entry<String, T> example : examples.entrySet()) { String exampleName = example.getKey(); T value = example.getValue(); String json = gson.toJson(value); if (printExamples) { System.out.print("-----\n"); System.out.print(String.format("Example \'%s\':\n", exampleName)); System.out.print(json); System.out.print("\n"); } } } @Test public void shouldReturnLocation() { Map<String, T> examples = getExamples(); for (Map.Entry<String, T> example : examples.entrySet()) { String exampleName = example.getKey(); T value = example.getValue(); String location = getLocation("TEST_PARENT"); if (printExamples) { System.out.print("-----\n"); System.out.print(String.format("Example \'%s\' Location:\n", exampleName)); System.out.print(location); } TestCase.assertNotNull(location); } } @Test public void shouldIgnoreWhenJsonHasUnknownElements() { Map<String, T> examples = getExamples(); for (Map.Entry<String, T> example : examples.entrySet()) { T value = example.getValue(); JsonObject jsonObject = ((JsonObject) (gson.toJsonTree(value))); jsonObject.add("extraProperty", new JsonPrimitive("This is not part of message type")); String json = gson.toJson(jsonObject); T deserializedValue = ((T) (gson.fromJson(json, value.getClass()))); Assert.assertThat(String.format("Example %s - Deserialized value should equal to value before serialization", example.getKey()), deserializedValue, CRBaseTest.is(value)); } } @Test public void shouldSerializeToJsonAndDeserialize() { Map<String, T> examples = getExamples(); for (Map.Entry<String, T> example : examples.entrySet()) { T value = example.getValue(); String json = gson.toJson(value); Type typeOfT = new TypeToken<T>() {}.getType(); T deserializedValue = ((T) (gson.fromJson(json, value.getClass()))); Assert.assertThat(String.format("Example %s - Deserialized value should equal to value before serialization", example.getKey()), deserializedValue, CRBaseTest.is(value)); } } @Test public void shouldGetErrorsWhenDeserializedFromEmptyBlock() { String json = "{}"; Class<? extends CRBase> typeOfT = null; for (T example : getGoodExamples().values()) { typeOfT = example.getClass(); break; } T deserializedValue = ((T) (gson.fromJson(json, typeOfT))); ErrorCollection errorCollection = new ErrorCollection(); deserializedValue.getErrors(errorCollection, "GetErrorsWhenDeserializedFromEmptyBlockTest"); } @Test public void shouldThrowWhenJsonFormatIsInvalid() { Map<String, T> examples = getExamples(); for (Map.Entry<String, T> example : examples.entrySet()) { T value = example.getValue(); String json = gson.toJson(value); json += "some extra non-json content"; try { gson.fromJson(json, value.getClass()); } catch (Exception ex) { return; } TestCase.fail(("Should have thrown invalid format for " + (example.getKey()))); } } @Test public void shouldErrorWhenBadExample() { Map<String, T> examples = getBadExamples(); for (Map.Entry<String, T> example : examples.entrySet()) { ErrorCollection errorCollection = new ErrorCollection(); example.getValue().getErrors(errorCollection, "ErrorWhenBadExampleTest"); Assert.assertThat(String.format("Example %s - invalid value should return errors", example.getKey()), errorCollection.isEmpty(), CRBaseTest.is(false)); } } @Test public void shouldNotErrorWhenGoodExample() { Map<String, T> examples = getGoodExamples(); for (Map.Entry<String, T> example : examples.entrySet()) { ErrorCollection errorCollection = new ErrorCollection(); example.getValue().getErrors(errorCollection, "NotErrorWhenGoodExampleTest"); Assert.assertThat(String.format("Example %s - valid value should not return errors", example.getKey()), errorCollection.isEmpty(), CRBaseTest.is(true)); } } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
5506622ba1ffd6c858d41e20144076157e0ca217
082e26b011e30dc62a62fae95f375e4f87d9e99c
/docs/weixin_7.0.4_source/反编译源码/反混淆后/src/main/java/com/tencent/p177mm/plugin/report/service/GroupIDKeyDataInfo.java
91975312ef754f1d02cf94231625d41ea2622430
[]
no_license
xsren/AndroidReverseNotes
9631a5aabc031006e795a112b7ac756a8edd4385
9202c276fe9f04a978e4e08b08e42645d97ca94b
refs/heads/master
2021-04-07T22:50:51.072197
2019-07-16T02:24:43
2019-07-16T02:24:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,011
java
package com.tencent.p177mm.plugin.report.service; import android.os.Parcel; import android.os.Parcelable; import android.os.Parcelable.Creator; import com.tencent.mars.smc.IDKey; import com.tencent.matrix.trace.core.AppMethodBeat; import java.util.ArrayList; /* renamed from: com.tencent.mm.plugin.report.service.GroupIDKeyDataInfo */ class GroupIDKeyDataInfo implements Parcelable { public static final Creator<GroupIDKeyDataInfo> CREATOR = new C37371(); public boolean pXA; ArrayList<IDKey> pXz = new ArrayList(); /* renamed from: com.tencent.mm.plugin.report.service.GroupIDKeyDataInfo$1 */ static class C37371 implements Creator<GroupIDKeyDataInfo> { C37371() { } public final /* bridge */ /* synthetic */ Object[] newArray(int i) { return new GroupIDKeyDataInfo[i]; } public final /* synthetic */ Object createFromParcel(Parcel parcel) { AppMethodBeat.m2504i(72695); GroupIDKeyDataInfo groupIDKeyDataInfo = new GroupIDKeyDataInfo(parcel); AppMethodBeat.m2505o(72695); return groupIDKeyDataInfo; } } GroupIDKeyDataInfo(ArrayList<IDKey> arrayList) { AppMethodBeat.m2504i(72696); this.pXz = arrayList; this.pXA = false; AppMethodBeat.m2505o(72696); } public int describeContents() { return 0; } public void writeToParcel(Parcel parcel, int i) { AppMethodBeat.m2504i(72697); parcel.writeTypedList(this.pXz); parcel.writeInt(this.pXA ? 1 : 0); AppMethodBeat.m2505o(72697); } protected GroupIDKeyDataInfo(Parcel parcel) { boolean z = true; AppMethodBeat.m2504i(72698); parcel.readTypedList(this.pXz, IDKey.CREATOR); if (parcel.readInt() != 1) { z = false; } this.pXA = z; AppMethodBeat.m2505o(72698); } static { AppMethodBeat.m2504i(72699); AppMethodBeat.m2505o(72699); } }
[ "alwangsisi@163.com" ]
alwangsisi@163.com
608690e2cb7a69b718ec161f24677aadfa80b966
6f36fc4a0f9c680553f8dd64c5df55c403f8f2ed
/src/main/java/it/csi/siac/siacfinser/business/service/soggetto/RicercaSoggettiSiacService.java
85017ea700e9fa83883472c30161c4367197244e
[]
no_license
unica-open/siacbilser
b46b19fd382f119ec19e4e842c6a46f9a97254e2
7de24065c365564b71378ce9da320b0546474130
refs/heads/master
2021-01-06T13:25:34.712460
2020-03-04T08:44:26
2020-03-04T08:44:26
241,339,144
0
0
null
null
null
null
UTF-8
Java
false
false
5,813
java
/* *SPDX-FileCopyrightText: Copyright 2020 | CSI Piemonte *SPDX-License-Identifier: EUPL-1.2 */ package it.csi.siac.siacfinser.business.service.soggetto; import java.util.Arrays; import java.util.List; import org.apache.commons.lang.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Service; import it.csi.siac.siaccommonser.business.service.base.exception.ServiceParamError; import it.csi.siac.siaccorser.model.Ente; import it.csi.siac.siaccorser.model.Esito; import it.csi.siac.siaccorser.model.errore.ErroreCore; import it.csi.siac.siacfinser.Constanti; import it.csi.siac.siacfinser.business.service.AbstractBaseService; import it.csi.siac.siacfinser.frontend.webservice.msg.RicercaSoggetti; import it.csi.siac.siacfinser.frontend.webservice.msg.RicercaSoggettiResponse; import it.csi.siac.siacfinser.integration.dad.SoggettoFinDad; import it.csi.siac.siacfinser.model.errore.ErroreFin; import it.csi.siac.siacfinser.model.ric.ParametroRicercaSoggetto; import it.csi.siac.siacfinser.model.soggetto.Soggetto; @Service @Scope(BeanDefinition.SCOPE_PROTOTYPE) public class RicercaSoggettiSiacService extends AbstractBaseService<RicercaSoggetti, RicercaSoggettiResponse> { @Autowired private SoggettoFinDad soggettoDad; @Override protected void init() { final String methodName = "RicercaSoggettiSiacService : init()"; log.debug(methodName, "Begin"); } // @Transactional(readOnly = true) // public RicercaSoggettiResponse executeService(RicercaSoggetti serviceRequest) // { // return super.executeService(serviceRequest); // } @Override public void execute() { final String methodName = "RicercaSoggettiSiacService - execute()"; // 1. Vengono letti i valori ricevuti in input dalla request ParametroRicercaSoggetto paramRicSogg = req.getParametroRicercaSoggetto(); Ente ente = req.getRichiedente().getAccount().getEnte(); Integer idEnte = ente.getUid(); String codiceAmbito = req.getCodiceAmbito(); if (codiceAmbito == null) codiceAmbito = Constanti.AMBITO_FIN; // 2. Si invoca il metodo ricercaSoggetti che ci restituisce il numero // di risultati attesi dalla query composta // secondo i parametri di ricerca List<Soggetto> listaRisultati = soggettoDad.ricercaSoggetti(paramRicSogg, idEnte, codiceAmbito); // ...solo se il numero di risultati attesi e minore del numero massimo // accettabile si procede con il caricamento di tutti i dati: if (listaRisultati.size() <= Constanti.MAX_RIGHE_ESTRAIBILI) { // 3. si invoca il metodo che carica tutti i dati rispetto alla // query composta dall'input ricevuto: List<Soggetto> paginata = getPaginata(listaRisultati, req.getNumPagina(), req.getNumRisultatiPerPagina()); // 4. Viene costruita la response per esito OK res.setEsito(Esito.SUCCESSO); res.setSoggetti(paginata); res.setNumRisultati(listaRisultati.size()); res.setNumPagina(req.getNumPagina()); } else { // Viene costruita la response per esito KO res.setErrori(Arrays.asList(ErroreFin.RICERCA_TROPPO_ESTESA.getErrore())); res.setEsito(Esito.FALLIMENTO); res.setSoggetti(null); } } @Override protected void checkServiceParam() throws ServiceParamError { final String methodName = "RicercaSoggettiSiacService : checkServiceParam()"; log.debug(methodName, " Begin"); ParametroRicercaSoggetto paramRicSogg = req.getParametroRicercaSoggetto(); checkCondition(paramRicSogg != null, ErroreCore.NESSUN_CRITERIO_RICERCA.getErrore("NESSUN PARAMETRO INIZIALIZZATO")); checkCondition( StringUtils.isNotBlank(paramRicSogg.getCodiceSoggetto()) || StringUtils.isNotBlank(paramRicSogg.getPartitaIva()) || StringUtils.isNotBlank(paramRicSogg.getCodiceFiscale()) || StringUtils.isNotBlank(paramRicSogg.getCodiceFiscaleEstero()) || StringUtils.isNotBlank(paramRicSogg.getDenominazione()) || StringUtils.isNotBlank(paramRicSogg.getClasse()) || StringUtils.isNotBlank(paramRicSogg.getTitoloNaturaGiuridica()) || StringUtils.isNotBlank(paramRicSogg.getFormaGiuridica()) || StringUtils.isNotBlank(paramRicSogg.getSesso()) || StringUtils.isNotBlank(paramRicSogg.getMatricola()) || StringUtils.isNotBlank(paramRicSogg.getComuneNascita()) || StringUtils.isNotBlank(paramRicSogg.getStatoSoggetto()) //SIAC-6565-CR1215 || StringUtils.isNotBlank(paramRicSogg.getCodiceSoggettoPrecedente()) || StringUtils.isNotBlank(paramRicSogg.getEmailPec()) || StringUtils.isNotBlank(paramRicSogg.getCodDestinatario()) || StringUtils.isNotBlank(paramRicSogg.getCodiceSoggettoSuccessore()), ErroreCore.NESSUN_CRITERIO_RICERCA.getErrore("NESSUN PARAMETRO INIZIALIZZATO")); checkCondition( (StringUtils.isBlank(paramRicSogg.getSesso()) && StringUtils.isBlank(paramRicSogg .getComuneNascita())) || StringUtils.isNotBlank(paramRicSogg.getDenominazione()), ErroreCore.PARAMETRO_NON_INIZIALIZZATO .getErrore("LA DENOMINAZIONE E' OBBLIGATORIA SE VIENE INDICATO IL SESSO O IL COMUNE DI NASCITA")); checkCondition( StringUtils.isBlank(paramRicSogg.getFormaGiuridica()) || StringUtils.isNotBlank(paramRicSogg.getDenominazione()), ErroreCore.PARAMETRO_NON_INIZIALIZZATO .getErrore("LA DENOMINAZIONE E' OBBLIGATORIA SE HO INDICATO LA NATURA GIURIDICA")); checkCondition( StringUtils.isBlank(paramRicSogg.getDenominazione()) || paramRicSogg.getDenominazione().trim().replaceAll("%", "") .replaceAll(" ", "").length() >= 3, ErroreCore.PARAMETRO_NON_INIZIALIZZATO .getErrore("LA DENOMINAZIONE DEVE ESSERE LUNGA ALMENO 3 CARATTERI (% ESCLUSO)")); } }
[ "barbara.malano@csi.it" ]
barbara.malano@csi.it
05a7db2ad984cba6cbaf6021265704f0cc580446
e7e497b20442a4220296dea1550091a457df5a38
/java_workplace/xiaonei-sns-core-trunk/src/main/java/com/xiaonei/platform/core/opt/permission/strategy/impl/IntimateSpace.java
6acaeffd2bc757f7d77c3e672818342203c15901
[]
no_license
gunner14/old_rr_code
cf17a2dedf8dfcdcf441d49139adaadc770c0eea
bb047dc88fa7243ded61d840af0f8bad22d68dee
refs/heads/master
2021-01-17T18:23:28.154228
2013-12-02T23:45:33
2013-12-02T23:45:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,554
java
package com.xiaonei.platform.core.opt.permission.strategy.impl; import com.xiaonei.platform.core.opt.permission.AbcStrategy; import com.xiaonei.platform.core.opt.permission.Source; import com.xiaonei.platform.core.opt.permission.Strategy; import com.xiaonei.platform.core.opt.permission.define.RelationDef; import com.xiaonei.platform.core.opt.permission.impl.RelationExpImpl; import com.xiaonei.platform.core.opt.permission.source.Status; import com.xiaonei.platform.core.opt.permission.strategy.Ret; public class IntimateSpace extends AbcStrategy { public Ret doStrategy(Source guester, Source source) { Status visiter = (Status) guester; Status owner = (Status) source; int path = visiter.getFromToPath(); if (path == RelationDef.notInit) append("RelationNotInit|"); path = RelationExpImpl.getInstance().getRelationPath(guester, source); //System.out.println("--------from:"+visiter+"|to:"+owner+"|path:"+path) ; if (path == RelationDef.uuGuestRequest) { append("RelationGuestRequest|"); return Strategy.RET_TRUE; } if (path == RelationDef.uuBlocked) { append("RelationBlocked|"); return new Ret(false, false, this.getClassName() + ".Block"); } if (path <= owner.getControl()) { return Strategy.RET_TRUE; } else { // if (RelationExpImpl.getInstance().isGouYinGuo(guester, source)) { // append("RelationGouYinGuo|"); // visiter.setFromToPath(RelationDef.uuGuestRequest); // // System.out.println("--------going:"+visiter.getUserId()) ; // return Strategy.RET_TRUE; // } if (path == RelationDef.uuFriend) { append("RelationFriend|"); return new Ret(false, false, this.getClassName() + ".Friend"); } if (path == RelationDef.uuSchoolmate) { append("RelationSchoolMate|"); return new Ret(false, false, this.getClassName() + ".Network"); } if (path == RelationDef.uuSameStage) { append("RelationSameStage|"); return new Ret(false, false, this.getClassName() + ".Stage"); } } /* if(visiter.getStage()==owner.getControl()) { return this.RET_TRUE ; } */ return Strategy.RET_CONTINUE; } }
[ "liyong19861014@gmail.com" ]
liyong19861014@gmail.com
91d0bf8b4a21f261ec5e8dc87a7a5b0bd0c6b412
ad01d3afcadd5b163ecf8ba60ba556ea268b4827
/amuedrp/trunk/EMS/src/java/com/myapp/struts/Voting/Resultset.java
6b78c3d8de82b098ae215e4467cd92d95ca11480
[]
no_license
ynsingh/repos
64a82c103f0033480945fcbb567b599629c4eb1b
829ad133367014619860932c146c208e10bb71e0
refs/heads/master
2022-04-18T11:39:24.803073
2020-04-08T09:39:43
2020-04-08T09:39:43
254,699,274
1
2
null
null
null
null
UTF-8
Java
false
false
1,211
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com.myapp.struts.Voting; import com.myapp.struts.hbm.Candidate1; import com.myapp.struts.hbm.Election; import com.myapp.struts.hbm.Position1; /** * * @author Edrp-04 */ public class Resultset { private Election election; private Position1 position; private Candidate1 candidate; /** * @return the election */ public Election getElection() { return election; } /** * @param election the election to set */ public void setElection(Election election) { this.election = election; } /** * @return the position */ public Position1 getPosition() { return position; } /** * @param position the position to set */ public void setPosition(Position1 position) { this.position = position; } /** * @return the candidate */ public Candidate1 getCandidate() { return candidate; } /** * @param candidate the candidate to set */ public void setCandidate(Candidate1 candidate) { this.candidate = candidate; } }
[ "ynsingh@0c22728b-0eb9-4c4e-a44d-29de7e55569f" ]
ynsingh@0c22728b-0eb9-4c4e-a44d-29de7e55569f
a5eb436ade2cb85af1b76f5adf7cb59148cdfcf2
319fb429a0895417ff6dc7d4d589f1eda85749b7
/Database/app/src/main/java/com/chrysalis/database/Product.java
78b75f3236a447f86eb103f4137c77789b072f7c
[ "MIT" ]
permissive
freakygeeks/AndroidStudioDevelopmentEssentials
e6aecc931ab51157b75bd7641bb3405f957e5d3c
c5b82ccd85b03cece383f7cd88a25df645e58799
refs/heads/master
2021-07-10T04:46:56.838843
2021-04-02T14:48:17
2021-04-02T14:48:17
52,785,694
0
1
null
2021-04-02T14:47:27
2016-02-29T11:18:10
Java
UTF-8
Java
false
false
951
java
package com.chrysalis.database; /** * Created by ~chrysalis~ on 11/15/2015. */ public class Product { private int id; private String productname; private int quantity; public Product() { } public Product (int ID, String productName, int qty) { this.id = ID; this.productname = productName; this.quantity = qty; } public Product (String productName, int qty) { this.productname = productName; this.quantity = qty; } public void setId (int prodID) { this.id = prodID; } public int getId () { return this.id; } public void setProductName (String productName) { this.productname = productName; } public String getProductName () { return this.productname; } public void setQuantity (int qty) { this.quantity = qty; } public int getQuantity() { return this.quantity; } }
[ "freakygeeks@users.noreply.github.com" ]
freakygeeks@users.noreply.github.com
cd87b7a39da37d863e514101e542ecb3eab9d613
ff05965a1216a8b5f17285f438558e6ed06e0db4
/systests/uncategorized/src/test/java/org/apache/cxf/systest/callback/CallbackImpl.java
82b603c18a34bf2c97de458167602addfc633c5a
[]
no_license
liucong/jms4cxf2
5ba89e857e9c6a4c542dffe0a13b3f704a19be77
56f6d8211dba6704348ee7e7551aa1a1f2c4d889
refs/heads/master
2023-01-09T18:08:51.730922
2009-09-16T03:16:48
2009-09-16T03:16:48
194,633
1
4
null
2023-01-02T21:54:29
2009-05-07T03:43:06
Java
UTF-8
Java
false
false
1,622
java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.cxf.systest.callback; import org.apache.callback.CallbackPortType; @javax.jws.WebService(serviceName = "CallbackService", portName = "CallbackPort", endpointInterface = "org.apache.callback.CallbackPortType", targetNamespace = "http://apache.org/callback", wsdlLocation = "testutils/basic_callback_test.wsdl") public class CallbackImpl implements CallbackPortType { //private static final Logger LOG = // Logger.getLogger(CallbackImpl.class.getPackage().getName()); /** * serverSayHi * @param: return_message (String) * @return: String */ public String serverSayHi(String message) { return new String("Hi " + message); } }
[ "liucong07@gmail.com" ]
liucong07@gmail.com
7b631429a4b0b20bd18b39cc6ef59710a2277519
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project73/src/main/java/org/gradle/test/performance73_2/Production73_143.java
8e61a287f87e5d36b3be99bb3601e3714cb0f532
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
305
java
package org.gradle.test.performance73_2; public class Production73_143 extends org.gradle.test.performance16_2.Production16_143 { private final String property; public Production73_143() { this.property = "foo"; } public String getProperty() { return property; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
66a0b84115dc9b7b503465882c8c47e81717af5f
e58a8e0fb0cfc7b9a05f43e38f1d01a4d8d8cf1f
/MazeRunner2/src/com/puttysoftware/mazerunner2/maze/objects/BattleCharacter.java
4ea6bcb879604c15a0f26b62263af396b252d3b3
[ "Unlicense" ]
permissive
retropipes/older-java-games
777574e222f30a1dffe7936ed08c8bfeb23a21ba
786b0c165d800c49ab9977a34ec17286797c4589
refs/heads/master
2023-04-12T14:28:25.525259
2021-05-15T13:03:54
2021-05-15T13:03:54
235,693,016
0
0
null
null
null
null
UTF-8
Java
false
false
529
java
/* MazeRunnerII: An RPG Copyright (C) 2011-2012 Eric Ahnell Any questions should be directed to the author via email at: products@puttysoftware.com */ package com.puttysoftware.mazerunner2.maze.objects; import com.puttysoftware.mazerunner2.creatures.AbstractCreature; import com.puttysoftware.mazerunner2.maze.abc.AbstractBattleCharacter; public class BattleCharacter extends AbstractBattleCharacter { // Constructors public BattleCharacter(final AbstractCreature newTemplate) { super(newTemplate); } }
[ "eric.ahnell@puttysoftware.com" ]
eric.ahnell@puttysoftware.com
49c15cd73ee1624be9345249a8b98bb449636fd6
13dfd110df6cccc7ed5ce992ba5e7eadc56a42af
/sm-core/src/main/java/com/salesmanager/core/business/services/customer/notification/CustomerNotificationServiceImpl.java
af026a19e7ad665f198acc9c64e73ed2b8ee1417
[]
no_license
ajaytiwari000/Habbit
24ca9455f0200e648640079945a04b01918dac7b
1ccff760c0a17515748cdc7c9d133fae71b8d937
refs/heads/master
2023-03-21T11:32:26.708784
2021-03-12T07:38:02
2021-03-12T07:38:02
265,888,454
1
0
null
null
null
null
UTF-8
Java
false
false
1,421
java
package com.salesmanager.core.business.services.customer.notification; import com.salesmanager.core.business.exception.ServiceException; import com.salesmanager.core.business.repositories.customer.notification.CustomerNotificationRepository; import com.salesmanager.core.business.services.common.generic.SalesManagerEntityServiceImpl; import com.salesmanager.core.model.customer.CustomerNotification; import javax.inject.Inject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; @Service("customerNotificationService") public class CustomerNotificationServiceImpl extends SalesManagerEntityServiceImpl<Long, CustomerNotification> implements CustomerNotificationService { private static final Logger LOGGER = LoggerFactory.getLogger(CustomerNotificationServiceImpl.class); private CustomerNotificationRepository customerNotificationRepository; @Inject public CustomerNotificationServiceImpl( CustomerNotificationRepository customerNotificationRepository) { super(customerNotificationRepository); this.customerNotificationRepository = customerNotificationRepository; } @Override public CustomerNotification getByPhone(String phone) throws ServiceException { try { return customerNotificationRepository.getByPhone(phone).orElse(null); } catch (Exception e) { throw new ServiceException(e); } } }
[ "ajaytiwari000@gmail.com" ]
ajaytiwari000@gmail.com
6096918a82f401d7e55aa94109bfe2d2d35ce9e5
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/9/9_1914c199146384380d689dfa17d771efdff139c0/cgFilterByType/9_1914c199146384380d689dfa17d771efdff139c0_cgFilterByType_t.java
a742cacd3560424cf962e4fd3db5703908f382ca
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
400
java
package cgeo.geocaching.filter; import cgeo.geocaching.cgBase; import cgeo.geocaching.cgCache; public class cgFilterByType extends cgFilter { public cgFilterByType(String type){ super(type); } @Override boolean applyFilter(cgCache cache) { return name.equals(cache.type); } @Override public String getFilterName() { return cgBase.cacheTypesInv.get(name); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
695acd4390bcade7fc06870b2a5f0fcd51448692
a88404e860f9e81f175d80c51b8e735fa499c93c
/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/V3RelationalOperatorEnumFactory.java
c3ad0e78ea9b4fba785f17f82241dcb2ccff4795
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
sabri0/hapi-fhir
4a53409d31b7f40afe088aa0ee8b946860b8372d
c7798fee4880ee8ffc9ed2e42c29c3b8f6753a1c
refs/heads/master
2020-06-07T20:02:33.258075
2019-06-18T09:40:00
2019-06-18T09:40:00
193,081,738
2
0
Apache-2.0
2019-06-21T10:46:17
2019-06-21T10:46:17
null
UTF-8
Java
false
false
3,364
java
package org.hl7.fhir.r4.model.codesystems; /* Copyright (c) 2011+, HL7, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of HL7 nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // Generated on Thu, Dec 27, 2018 10:06-0500 for FHIR v4.0.0 import org.hl7.fhir.r4.model.EnumFactory; public class V3RelationalOperatorEnumFactory implements EnumFactory<V3RelationalOperator> { public V3RelationalOperator fromCode(String codeString) throws IllegalArgumentException { if (codeString == null || "".equals(codeString)) return null; if ("CT".equals(codeString)) return V3RelationalOperator.CT; if ("EQ".equals(codeString)) return V3RelationalOperator.EQ; if ("GE".equals(codeString)) return V3RelationalOperator.GE; if ("GN".equals(codeString)) return V3RelationalOperator.GN; if ("GT".equals(codeString)) return V3RelationalOperator.GT; if ("LE".equals(codeString)) return V3RelationalOperator.LE; if ("LT".equals(codeString)) return V3RelationalOperator.LT; if ("NE".equals(codeString)) return V3RelationalOperator.NE; throw new IllegalArgumentException("Unknown V3RelationalOperator code '"+codeString+"'"); } public String toCode(V3RelationalOperator code) { if (code == V3RelationalOperator.CT) return "CT"; if (code == V3RelationalOperator.EQ) return "EQ"; if (code == V3RelationalOperator.GE) return "GE"; if (code == V3RelationalOperator.GN) return "GN"; if (code == V3RelationalOperator.GT) return "GT"; if (code == V3RelationalOperator.LE) return "LE"; if (code == V3RelationalOperator.LT) return "LT"; if (code == V3RelationalOperator.NE) return "NE"; return "?"; } public String toSystem(V3RelationalOperator code) { return code.getSystem(); } }
[ "jamesagnew@gmail.com" ]
jamesagnew@gmail.com
8f73473fbfa1936f2772a15d1ab983e0a397a3fa
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/32/32_09b4a3e40edbf833bcd3e4e3afe23a4751cddf1c/ExternalCreditCardValidatorTest/32_09b4a3e40edbf833bcd3e4e3afe23a4751cddf1c_ExternalCreditCardValidatorTest_t.java
e5fd5e783ba98cf8b7ff37f93e420fa44fdb0f1f
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
6,637
java
/** * Copyright (c) 2013 HAN University of Applied Sciences * Arjan Oortgiese * Joëll Portier * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ package nl.han.dare2date.service.web; import junit.framework.Assert; import nl.han.dare2date.applyregistrationservice.Creditcard; import nl.han.dare2date.service.jms.util.JMSUtil; import org.junit.Test; import javax.jms.Connection; import javax.jms.JMSException; import javax.naming.NamingException; import javax.xml.datatype.DatatypeConfigurationException; import javax.xml.datatype.DatatypeFactory; import javax.xml.datatype.XMLGregorianCalendar; import java.util.GregorianCalendar; public class ExternalCreditCardValidatorTest { private IExternalCreditCardValidator validator; @Test public void testValidateWithValidInformation() { Connection connection = JMSUtil.getConnection(); try { validator = new ExternalCreditCardValidator(connection); } catch (JMSException e) { Assert.fail(); //To change body of catch statement use File | Settings | File Templates. } catch (NamingException e) { Assert.fail(); } IExternalCreditCardValidator ecv = null; try { ecv = new ExternalCreditCardValidator(connection); } catch(Exception e){ Assert.fail(); } Creditcard cc = new Creditcard(); cc.setNumber(4539339738582406L); cc.setCvc(123); GregorianCalendar gregorianCalendar = new GregorianCalendar(); DatatypeFactory datatypeFactory = null; try { datatypeFactory = DatatypeFactory.newInstance(); } catch (DatatypeConfigurationException e) { Assert.fail(); } XMLGregorianCalendar date = datatypeFactory.newXMLGregorianCalendar(gregorianCalendar); date.setYear(2020); cc.setValidThrough(date); ecv.handleMessage(cc); try { Assert.assertFalse(ecv.getReplyMessage().getBooleanProperty("valid")); } catch (JMSException e) { Assert.fail(); } try { connection.close(); } catch (JMSException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } } @Test public void testValidateWithInvalidDate() { Connection connection = JMSUtil.getConnection(); try { validator = new ExternalCreditCardValidator(connection); } catch (JMSException e) { Assert.fail(); //To change body of catch statement use File | Settings | File Templates. } catch (NamingException e) { Assert.fail(); } IExternalCreditCardValidator ecv = null; try { ecv = new ExternalCreditCardValidator(connection); } catch(Exception e){ Assert.fail(); } Creditcard cc = new Creditcard(); cc.setNumber(79927398713L); cc.setCvc(123); GregorianCalendar gregorianCalendar = new GregorianCalendar(); DatatypeFactory datatypeFactory = null; try { datatypeFactory = DatatypeFactory.newInstance(); } catch (DatatypeConfigurationException e) { Assert.fail(); } XMLGregorianCalendar date = datatypeFactory.newXMLGregorianCalendar(gregorianCalendar); date.setYear(2020); cc.setValidThrough(date); ecv.handleMessage(cc); try { Assert.assertTrue(ecv.getReplyMessage().getBooleanProperty("valid")); } catch (JMSException e) { Assert.fail(); } try { connection.close(); } catch (JMSException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } } @Test public void testValidateWithInvalidCreditcardNumber() { Connection connection = JMSUtil.getConnection(); try { validator = new ExternalCreditCardValidator(connection); } catch (JMSException e) { Assert.fail(); //To change body of catch statement use File | Settings | File Templates. } catch (NamingException e) { Assert.fail(); } IExternalCreditCardValidator ecv = null; try { ecv = new ExternalCreditCardValidator(connection); } catch(Exception e){ Assert.fail(); } Creditcard cc = new Creditcard(); cc.setNumber(4539339738582405L); cc.setCvc(123); GregorianCalendar gregorianCalendar = new GregorianCalendar(); DatatypeFactory datatypeFactory = null; try { datatypeFactory = DatatypeFactory.newInstance(); } catch (DatatypeConfigurationException e) { Assert.fail(); } XMLGregorianCalendar date = datatypeFactory.newXMLGregorianCalendar(gregorianCalendar); date.setYear(2020); cc.setValidThrough(date); ecv.handleMessage(cc); try { Assert.assertFalse(ecv.getReplyMessage().getBooleanProperty("valid")); } catch (JMSException e) { Assert.fail(); } try { connection.close(); } catch (JMSException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
772a3ac2cb37b9e094178b6f9ee5a96263e41791
8f8dfbc9f3543a12934bb652d141100d315f1f78
/client/src/test/java/org/ehrbase/client/classgenerator/examples/ehrbasemultioccurrencedev1composition/definition/LocationOfMeasurementDefiningCode.java
1d2a1e76cf8f468e58f01cb25382a5af266bab2d
[ "Apache-2.0" ]
permissive
yasir2000/openEHR_SDK
f36081d2d507809fc2b5dcd2c8d239497c133148
31605a69a982be2f1f10e24be92f39171059b93d
refs/heads/master
2023-08-06T00:32:41.467027
2021-07-13T12:45:52
2021-07-13T12:45:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,446
java
package org.ehrbase.client.classgenerator.examples.ehrbasemultioccurrencedev1composition.definition; import java.lang.String; import org.ehrbase.client.classgenerator.EnumValueSet; public enum LocationOfMeasurementDefiningCode implements EnumValueSet { TEMPLE("Temple", "Temperature is measured at the temple, over the superficial temporal\n" + " artery.\n" + " ", "local", "at0060"), INTRAVASCULAR("Intravascular", "Temperature is measured within the vascular system.", "local", "at0028"), URINARY_BLADDER("Urinary bladder", "Temperature is measured in the urinary bladder.", "local", "at0027"), NASOPHARYNX("Nasopharynx", "Temperature is measured within the nasopharynx.", "local", "at0026"), VAGINA("Vagina", "Temperature is measured within the vagina.", "local", "at0051"), RECTUM("Rectum", "Temperature measured within the rectum.", "local", "at0025"), SKIN("Skin", "Temperature is measured from exposed skin.", "local", "at0043"), MOUTH("Mouth", "Temperature is measured within the mouth.", "local", "at0022"), AXILLA("Axilla", "Temperature is measured from the skin of the axilla with the arm positioned\n" + " down by the side.\n" + " ", "local", "at0024"), OESOPHAGUS("Oesophagus", "Temperatue is measured within the oesophagus.", "local", "at0054"), INGUINAL_SKIN_CREASE("Inguinal skin crease", "Temperature is measured in the inguinal skin crease between the leg and\n" + " abdominal wall.\n" + " ", "local", "at0055"), FOREHEAD("Forehead", "Temperature is measured on the forehead.", "local", "at0061"), EAR_CANAL("Ear canal", "Temperature is measured from within the external auditory canal.", "local", "at0023"); private String value; private String description; private String terminologyId; private String code; LocationOfMeasurementDefiningCode(String value, String description, String terminologyId, String code) { this.value = value; this.description = description; this.terminologyId = terminologyId; this.code = code; } public String getValue() { return this.value ; } public String getDescription() { return this.description ; } public String getTerminologyId() { return this.terminologyId ; } public String getCode() { return this.code ; } }
[ "s.spiska@symeda.de" ]
s.spiska@symeda.de
ebb1b736882bc232a74b165461ddce9e2981ff9e
61922ecc67f1e0b74d2750c37eb29b5d41c6dfb8
/Solutions/workspace/CompactDiscDaoSpringDataMongoRest/src/test/java/com/conygre/training/mongo/CompactDiscServiceTest.java
66006a821a64b5123af4c9439d79b6a916f35fa0
[]
no_license
manasvi-savani/spring-course
386058714d6e2015b27996258e50c25048156afb
a076c17adc9dfb9a1ed66251b0e99b2113626a3b
refs/heads/master
2023-07-10T15:16:14.232143
2021-08-13T18:08:43
2021-08-13T18:08:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,623
java
package com.conygre.training.mongo; import com.conygre.training.MongoJavaConfig; import com.conygre.training.entities.CompactDisc; import com.conygre.training.service.CompactDiscService; import com.mongodb.BasicDBObject; import org.junit.After; import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.mongodb.core.MongoTemplate; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.support.AnnotationConfigContextLoader; import static org.junit.Assert.assertEquals; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = MongoJavaConfig.class, loader = AnnotationConfigContextLoader.class) public class CompactDiscServiceTest { @Autowired private CompactDiscService service; @Autowired private MongoTemplate mongoTemplate; @Test @Ignore public void getAllCDsThroughServiceLayerAndRetrieve() { service.addToCatalog(new CompactDisc("Risque", "Chic", 12.99)); // get the first item from the iterator CompactDisc disc = service.getCatalog().iterator().next(); assertEquals("Chic", disc.getArtist()); } @After public void cleanUp() { for (String collectionName : mongoTemplate.getCollectionNames()) { if (!collectionName.startsWith("system.")) { mongoTemplate.getCollection(collectionName).remove(new BasicDBObject()); } } } }
[ "=" ]
=
e3249bcda06c767e3df79125f3baa474d49a84d6
c8cdff97fb4b6ce366bb6ab9adaff866b761a791
/src/repl_it/oop/ParkingMeter.java
0893e52ff044c9bb3538e970cc9c6a0c1e38a978
[]
no_license
SDET222/java-programmingC
6a50c147f526f60382c8febfe68c1a1c7f2921b2
f6098a8a3ff2412135120efde901ab3ac558c362
refs/heads/master
2023-06-22T00:48:25.451665
2021-07-26T23:51:53
2021-07-26T23:51:53
366,196,266
0
0
null
null
null
null
UTF-8
Java
false
false
1,302
java
package repl_it.oop; public class ParkingMeter { int timeLeft; int maxTime=0; public ParkingMeter(int maxTime) { this.maxTime = maxTime; } /** * If the value of the parameter is equal to 25, the value of timeLeft is * increased by 30; otherwise no increase is performed. Furthermore, the * increase occurs only if the value of timeLeft will not exceed the value of * maxTime. add returns a boolean value: true if timeLeft was increase, false * otherwise. */ public boolean add(int time) { if(time==25&&(timeLeft<maxTime)){ timeLeft+=30; return true; } return false; } //A method named tick() that accepts no parameters and returns no value. // tick() decreases the value of timeLeft by 1, but only if the value of // timeLeft is greater than 0. public void tick() { if(timeLeft>0) { timeLeft--; } } //A method named isExpired() that accepts no parameters. // isExpired returns a boolean value: true if the value of timeLeft is // equal to 0; false otherwise. public boolean isExpired() { if(timeLeft==0){ return true; } return false; } }
[ "jkrogers222@gmail.com" ]
jkrogers222@gmail.com
9d4a21d443e2056c29d5d6705038eec0cb0d03ae
c359beff19d9fbb944ef04e28b3e7f9e59a742a2
/sources/com/android/keyguard/MiuiKeyguardPasswordView.java
3bc39d695d4440450adf90e9de9f55b2b2fdcefd
[]
no_license
minz1/MIUISystemUI
872075cae3b18a86f58c5020266640e89607ba17
5cd559e0377f0e51ad4dc0370cac445531567c6d
refs/heads/master
2020-07-16T05:43:35.778470
2019-09-01T21:12:11
2019-09-01T21:12:11
205,730,364
3
1
null
null
null
null
UTF-8
Java
false
false
6,842
java
package com.android.keyguard; import android.app.ActivityManagerNative; import android.app.admin.DevicePolicyManager; import android.app.admin.DevicePolicyManagerCompat; import android.content.Context; import android.content.res.Configuration; import android.os.RemoteException; import android.os.UserHandle; import android.os.UserManager; import android.os.UserManagerCompat; import android.os.Vibrator; import android.util.AttributeSet; import android.util.Log; import android.widget.LinearLayout; import android.widget.TextView; import com.android.internal.widget.LockPatternUtils; import com.android.keyguard.BackButton; import com.android.keyguard.EmergencyButton; import com.android.keyguard.utils.PhoneUtils; import com.android.systemui.R; public abstract class MiuiKeyguardPasswordView extends LinearLayout implements BackButton.BackButtonCallback, EmergencyButton.EmergencyButtonCallback { protected BackButton mBackButton; protected KeyguardSecurityCallback mCallback; protected TextView mDeleteButton; protected EmergencyButton mEmergencyButton; protected EmergencyCarrierArea mEmergencyCarrierArea; protected MiuiKeyguardFaceUnlockView mFaceUnlockView; private float mFontScale; protected KeyguardBouncerMessageView mKeyguardBouncerMessageView; protected KeyguardUpdateMonitor mKeyguardUpdateMonitor; protected LockPatternUtils mLockPatternUtils; private int mOrientation; protected UserManager mUm; protected Vibrator mVibrator; /* access modifiers changed from: protected */ public abstract String getPromptReasonString(int i); /* access modifiers changed from: protected */ public abstract void handleConfigurationFontScaleChanged(); /* access modifiers changed from: protected */ public abstract void handleConfigurationOrientationChanged(); public MiuiKeyguardPasswordView(Context context) { super(context); } public MiuiKeyguardPasswordView(Context context, AttributeSet attrs) { super(context, attrs); this.mVibrator = (Vibrator) this.mContext.getSystemService("vibrator"); this.mUm = (UserManager) this.mContext.getSystemService("user"); this.mKeyguardUpdateMonitor = KeyguardUpdateMonitor.getInstance(this.mContext); } /* access modifiers changed from: protected */ public void onFinishInflate() { super.onFinishInflate(); this.mEmergencyCarrierArea = (EmergencyCarrierArea) findViewById(R.id.keyguard_selector_fade_container); this.mEmergencyButton = (EmergencyButton) findViewById(R.id.emergency_call_button); this.mEmergencyButton.setCallback(this); this.mBackButton = (BackButton) findViewById(R.id.back_button); this.mBackButton.setCallback(this); this.mDeleteButton = (TextView) findViewById(R.id.delete_button); this.mKeyguardBouncerMessageView = (KeyguardBouncerMessageView) findViewById(R.id.keyguard_security_bouncer_message); this.mFaceUnlockView = (MiuiKeyguardFaceUnlockView) findViewById(R.id.miui_keyguard_face_unlock_view); this.mFaceUnlockView.setKeyguardFaceUnlockView(false); } /* access modifiers changed from: protected */ public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); float fontScale = newConfig.fontScale; if (this.mFontScale != fontScale) { handleConfigurationFontScaleChanged(); this.mFontScale = fontScale; } int orientation = newConfig.orientation; if (this.mOrientation != orientation) { handleConfigurationOrientationChanged(); this.mOrientation = orientation; } } /* access modifiers changed from: protected */ public void switchUser(int targetId) { if (KeyguardUpdateMonitor.getCurrentUser() != targetId) { try { ActivityManagerNative.getDefault().switchUser(targetId); } catch (RemoteException e) { Log.e("MiuiKeyguardPasswordView", "switchUser failed", e); } } } /* access modifiers changed from: protected */ public boolean allowUnlock(int userId) { if (userId != 0 && !KeyguardUpdateMonitor.getInstance(this.mContext).getStrongAuthTracker().hasOwnerUserAuthenticatedSinceBoot()) { setSwitchUserWrongMessage(R.string.input_password_after_boot_msg_must_enter_owner_space); handleWrongPassword(); return false; } else if (userId != KeyguardUpdateMonitor.getCurrentUser() && MiuiKeyguardUtils.isGreenKidActive(this.mContext)) { setSwitchUserWrongMessage(R.string.input_password_after_boot_msg_can_not_switch_when_greenkid_active); handleWrongPassword(); return false; } else if (userId != KeyguardUpdateMonitor.getCurrentUser() && PhoneUtils.isInCall(this.mContext)) { Log.d("miui_keyguard_password", "Can't switch user to " + userId + " when calling"); setSwitchUserWrongMessage(R.string.input_password_after_boot_msg_can_not_switch_when_calling); handleWrongPassword(); return false; } else if (userId == KeyguardUpdateMonitor.getCurrentUser() || userId == 0 || userId != getManagedProfileId(this.mUm, UserHandle.myUserId())) { return true; } else { Log.d("miui_keyguard_password", "Can't switch user to " + userId + " when managed profile id"); handleWrongPassword(); return false; } } private int getManagedProfileId(UserManager um, int parentUserId) { int[] profileIds = UserManagerCompat.getProfileIdsWithDisabled(um, parentUserId); if (profileIds != null && profileIds.length > 0) { for (int profileId : profileIds) { if (profileId != parentUserId) { return profileId; } } } return -10000; } public void onBackButtonClicked() { if (this.mCallback != null) { this.mCallback.reset(); } } public void onEmergencyButtonClickedWhenInCall() { if (this.mCallback != null) { this.mCallback.reset(); this.mCallback.userActivity(); } } private void setSwitchUserWrongMessage(int resId) { this.mKeyguardBouncerMessageView.showMessage(0, resId); } /* access modifiers changed from: protected */ public long getRequiredStrongAuthTimeout() { return DevicePolicyManagerCompat.getRequiredStrongAuthTimeout((DevicePolicyManager) this.mContext.getSystemService("device_policy"), null, KeyguardUpdateMonitor.getCurrentUser()); } /* access modifiers changed from: protected */ public void handleWrongPassword() { } }
[ "emerytang@gmail.com" ]
emerytang@gmail.com
2f9b2b4c70ad035ee9ddbb44173dd0919468dc4c
a04c8230aa8a10efcd16bdd80e98aa84ff42ab62
/app/src/main/java/com/jake/health/ui/fragment/MineFragment.java
3a059e543c5616ed23f7dfa6a049a1d1b4db69df
[]
no_license
czg12300/HealthNote
3e7842084f364a75a2df8d39c42ad326fc7288f5
eb4182aa89dae8709697ead61f08d728e87742f8
refs/heads/master
2016-09-12T08:44:32.788862
2016-06-06T16:19:43
2016-06-06T16:19:43
56,570,134
0
0
null
null
null
null
UTF-8
Java
false
false
2,740
java
package com.jake.health.ui.fragment; import com.jake.health.R; import com.jake.health.core.ImageLoadManager; import com.jake.health.ui.activity.MainActivity; import com.jake.health.ui.adapter.MineMenuAdapter; import com.jake.health.ui.base.BaseWorkerFragment; import com.jake.health.ui.helper.TestHelper; import com.jake.health.ui.helper.ViewHelper; import com.jake.health.ui.widgt.ThemeUtils; import android.os.Message; import android.view.View; import android.widget.Button; import android.widget.ImageView; import android.widget.ListView; /** * 描述:侧边栏我的信息 * * @author jakechen * @since 2016/4/19 16:00 */ public class MineFragment extends BaseWorkerFragment implements View.OnClickListener { private static final int MSG_UI_INIT_DATA = 0x001; private ImageView mIvBackMain; private ImageView mIvAvatar; private ListView mLvMenu; private MineMenuAdapter mMineMenuAdapter; private Button mBtnLoginOut; @Override protected void initView() { setContentView(R.layout.fragment_mine); ThemeUtils.adjustStatusBar(findViewById(R.id.rl_top), getActivity()); mIvBackMain = (ImageView) findViewById(R.id.iv_back_main); mIvAvatar = (ImageView) findViewById(R.id.iv_avatar); mBtnLoginOut = (Button) findViewById(R.id.btn_login_out); mIvBackMain.setImageDrawable(ViewHelper.createBackDrawable()); mLvMenu = (ListView) findViewById(R.id.lv_menu_item); } @Override protected void initEvent() { super.initEvent(); mIvBackMain.setOnClickListener(this); mBtnLoginOut.setOnClickListener(this); findViewById(R.id.rl_root).setOnClickListener(this); } @Override protected void initData() { super.initData(); mMineMenuAdapter = new MineMenuAdapter(getActivity(), this); mLvMenu.setAdapter(mMineMenuAdapter); sendEmptyUiMessage(MSG_UI_INIT_DATA); } @Override public void onClick(View v) { final int id = v.getId(); if (id == R.id.iv_back_main) { ((MainActivity) getActivity()).closeMine(); } else if (id == R.id.btn_login_out) { ((MainActivity) getActivity()).loginOut(); } } @Override public void handleUiMessage(Message msg) { super.handleUiMessage(msg); switch (msg.what) { case MSG_UI_INIT_DATA: dealInitData(); break; } } private void dealInitData() { ImageLoadManager.load(this, "http://img3.imgtn.bdimg.com/it/u=287053482,141286521&fm=11&gp=0.jpg", mIvAvatar, true); mMineMenuAdapter.setDataAndNotifyDataSetChanged(TestHelper.getTestMenu()); } }
[ "903475400@qq.com" ]
903475400@qq.com
b62176c8a5523410af9cb6a0ebd0432b0de6536e
cfa9d3ed69bf73172c3b1d6a0f2cb6660c976b93
/android/LGame-Android-0.3.1/src/org/loon/framework/android/game/core/graphics/opengl/AndroidGLU.java
0aaf8ef04590909931c24156fe9c6cd922bdead4
[]
no_license
jackyglony/loon-simple
7f3c6fd49a05de28daff0495a202d281a18706ce
cbf9c70e41ef5421bc1a5bb55939aa527aac675d
refs/heads/master
2020-12-25T12:18:22.710566
2013-06-30T03:11:06
2013-06-30T03:11:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,215
java
package org.loon.framework.android.game.core.graphics.opengl; /** * Copyright 2008 - 2011 * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. * * @project loonframework * @author chenpeng * @email ceponline@yahoo.com.cn * @version 0.1 */ class AndroidGLU implements GLU { public void gluLookAt (GL10 gl, float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ) { android.opengl.GLU.gluLookAt(((AndroidGL10)gl).gl, eyeX, eyeY, eyeZ, centerX, centerY, centerZ, upX, upY, upZ); } public void gluOrtho2D (GL10 gl, float left, float right, float bottom, float top) { android.opengl.GLU.gluOrtho2D(((AndroidGL10)gl).gl, left, right, bottom, top); } public void gluPerspective (GL10 gl, float fovy, float aspect, float zNear, float zFar) { android.opengl.GLU.gluPerspective(((AndroidGL10)gl).gl, fovy, aspect, zNear, zFar); } public boolean gluProject (float objX, float objY, float objZ, float[] model, int modelOffset, float[] project, int projectOffset, int[] view, int viewOffset, float[] win, int winOffset) { int result = android.opengl.GLU.gluProject(objX, objY, objZ, model, modelOffset, project, projectOffset, view, viewOffset, win, winOffset); return result == GL10.GL_TRUE; } public boolean gluUnProject (float winX, float winY, float winZ, float[] model, int modelOffset, float[] project, int projectOffset, int[] view, int viewOffset, float[] obj, int objOffset) { int result = android.opengl.GLU.gluUnProject(winX, winY, winZ, model, modelOffset, project, projectOffset, view, viewOffset, obj, objOffset); return result == GL10.GL_TRUE; } }
[ "loontest@282ca0c4-f913-11dd-a8e2-f7cb3c35fcff" ]
loontest@282ca0c4-f913-11dd-a8e2-f7cb3c35fcff
bd4393cb5ca38d5b95aac71e6c15b840984b315d
d97cc290f95aa4b5b06e91f9fd8e765fbfe77ee0
/codewars/src/main/java/urban/codewars/kyu8/Formatting.java
242d7ae98e55194ea18f4eb4a5d7eb19ea31e966
[]
no_license
diegourban/competitive-programming
cd1fcd924be6c07df7c5ab5678c83eca8f9fd7a5
3a7062d017d33ca22c3b450f58e3aa9b3e21bf95
refs/heads/master
2021-01-12T05:09:06.237492
2018-01-03T21:34:36
2018-01-03T21:34:36
77,868,806
1
1
null
null
null
null
UTF-8
Java
false
false
244
java
package urban.codewars.kyu8; public class Formatting { public static double twoDecimalPlaces(double number) { final long factor = 100; long tmp = Math.round(number * factor); return (double) tmp / factor; } }
[ "diego.urban88@gmail.com" ]
diego.urban88@gmail.com
c47d99b99820e2b608bc548d6011c0e7aa2ba6e2
c911cec851122d0c6c24f0e3864cb4c4def0da99
/com/google/android/exoplayer/extractor/ts/AdtsReader.java
6ba3c4427f3b16de6fcf814017541e974090f1e3
[]
no_license
riskyend/PokemonGo_RE_0.47.1
3a468ad7b6fbda5b4f8b9ace30447db2211fc2ed
2ca0c6970a909ae5e331a2430f18850948cc625c
refs/heads/master
2020-01-23T22:04:35.799795
2016-11-19T01:01:46
2016-11-19T01:01:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,426
java
package com.google.android.exoplayer.extractor.ts; import android.util.Pair; import com.google.android.exoplayer.MediaFormat; import com.google.android.exoplayer.extractor.TrackOutput; import com.google.android.exoplayer.util.CodecSpecificDataUtil; import com.google.android.exoplayer.util.ParsableBitArray; import com.google.android.exoplayer.util.ParsableByteArray; import java.util.Arrays; import java.util.Collections; final class AdtsReader extends ElementaryStreamReader { private static final int CRC_SIZE = 2; private static final int HEADER_SIZE = 5; private static final int ID3_HEADER_SIZE = 10; private static final byte[] ID3_IDENTIFIER = { 73, 68, 51 }; private static final int ID3_SIZE_OFFSET = 6; private static final int MATCH_STATE_FF = 512; private static final int MATCH_STATE_I = 768; private static final int MATCH_STATE_ID = 1024; private static final int MATCH_STATE_START = 256; private static final int MATCH_STATE_VALUE_SHIFT = 8; private static final int STATE_FINDING_SAMPLE = 0; private static final int STATE_READING_ADTS_HEADER = 2; private static final int STATE_READING_ID3_HEADER = 1; private static final int STATE_READING_SAMPLE = 3; private final ParsableBitArray adtsScratch; private int bytesRead; private TrackOutput currentOutput; private long currentSampleDuration; private boolean hasCrc; private boolean hasOutputFormat; private final ParsableByteArray id3HeaderBuffer; private final TrackOutput id3Output; private int matchState; private long sampleDurationUs; private int sampleSize; private int state; private long timeUs; public AdtsReader(TrackOutput paramTrackOutput1, TrackOutput paramTrackOutput2) { super(paramTrackOutput1); this.id3Output = paramTrackOutput2; paramTrackOutput2.format(MediaFormat.createId3Format()); this.adtsScratch = new ParsableBitArray(new byte[7]); this.id3HeaderBuffer = new ParsableByteArray(Arrays.copyOf(ID3_IDENTIFIER, 10)); setFindingSampleState(); } private boolean continueRead(ParsableByteArray paramParsableByteArray, byte[] paramArrayOfByte, int paramInt) { int i = Math.min(paramParsableByteArray.bytesLeft(), paramInt - this.bytesRead); paramParsableByteArray.readBytes(paramArrayOfByte, this.bytesRead, i); this.bytesRead += i; return this.bytesRead == paramInt; } private void findNextSample(ParsableByteArray paramParsableByteArray) { byte[] arrayOfByte = paramParsableByteArray.data; int i = paramParsableByteArray.getPosition(); int k = paramParsableByteArray.limit(); if (i < k) { int j = i + 1; i = arrayOfByte[i] & 0xFF; if ((this.matchState == 512) && (i >= 240) && (i != 255)) { if ((i & 0x1) == 0) {} for (boolean bool = true;; bool = false) { this.hasCrc = bool; setReadingAdtsHeaderState(); paramParsableByteArray.setPosition(j); return; } } switch (this.matchState | i) { default: i = j; if (this.matchState != 256) { this.matchState = 256; i = j - 1; } case 511: case 329: case 836: for (;;) { break; this.matchState = 512; i = j; continue; this.matchState = 768; i = j; continue; this.matchState = 1024; i = j; } } setReadingId3HeaderState(); paramParsableByteArray.setPosition(j); return; } paramParsableByteArray.setPosition(i); } private void parseAdtsHeader() { this.adtsScratch.setPosition(0); int i; int j; if (!this.hasOutputFormat) { i = this.adtsScratch.readBits(2); j = this.adtsScratch.readBits(4); this.adtsScratch.skipBits(1); Object localObject = CodecSpecificDataUtil.buildAacAudioSpecificConfig(i + 1, j, this.adtsScratch.readBits(3)); Pair localPair = CodecSpecificDataUtil.parseAacAudioSpecificConfig((byte[])localObject); localObject = MediaFormat.createAudioFormat(null, "audio/mp4a-latm", -1, -1, -1L, ((Integer)localPair.second).intValue(), ((Integer)localPair.first).intValue(), Collections.singletonList(localObject), null); this.sampleDurationUs = (1024000000L / ((MediaFormat)localObject).sampleRate); this.output.format((MediaFormat)localObject); this.hasOutputFormat = true; } for (;;) { this.adtsScratch.skipBits(4); j = this.adtsScratch.readBits(13) - 2 - 5; i = j; if (this.hasCrc) { i = j - 2; } setReadingSampleState(this.output, this.sampleDurationUs, 0, i); return; this.adtsScratch.skipBits(10); } } private void parseId3Header() { this.id3Output.sampleData(this.id3HeaderBuffer, 10); this.id3HeaderBuffer.setPosition(6); setReadingSampleState(this.id3Output, 0L, 10, this.id3HeaderBuffer.readSynchSafeInt() + 10); } private void readSample(ParsableByteArray paramParsableByteArray) { int i = Math.min(paramParsableByteArray.bytesLeft(), this.sampleSize - this.bytesRead); this.currentOutput.sampleData(paramParsableByteArray, i); this.bytesRead += i; if (this.bytesRead == this.sampleSize) { this.currentOutput.sampleMetadata(this.timeUs, 1, this.sampleSize, 0, null); this.timeUs += this.currentSampleDuration; setFindingSampleState(); } } private void setFindingSampleState() { this.state = 0; this.bytesRead = 0; this.matchState = 256; } private void setReadingAdtsHeaderState() { this.state = 2; this.bytesRead = 0; } private void setReadingId3HeaderState() { this.state = 1; this.bytesRead = ID3_IDENTIFIER.length; this.sampleSize = 0; this.id3HeaderBuffer.setPosition(0); } private void setReadingSampleState(TrackOutput paramTrackOutput, long paramLong, int paramInt1, int paramInt2) { this.state = 3; this.bytesRead = paramInt1; this.currentOutput = paramTrackOutput; this.currentSampleDuration = paramLong; this.sampleSize = paramInt2; } public void consume(ParsableByteArray paramParsableByteArray) { while (paramParsableByteArray.bytesLeft() > 0) { switch (this.state) { default: break; case 0: findNextSample(paramParsableByteArray); break; case 1: if (continueRead(paramParsableByteArray, this.id3HeaderBuffer.data, 10)) { parseId3Header(); } break; case 2: if (this.hasCrc) {} for (int i = 7; continueRead(paramParsableByteArray, this.adtsScratch.data, i); i = 5) { parseAdtsHeader(); break; } case 3: readSample(paramParsableByteArray); } } } public void packetFinished() {} public void packetStarted(long paramLong, boolean paramBoolean) { this.timeUs = paramLong; } public void seek() { setFindingSampleState(); } } /* Location: /Users/mohamedtajjiou/Downloads/Rerverse Engeneering/dex2jar-2.0/com.nianticlabs.pokemongo_0.47.1-2016111700_minAPI19(armeabi-v7a)(nodpi)_apkmirror.com (1)-dex2jar.jar!/com/google/android/exoplayer/extractor/ts/AdtsReader.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "mohamedtajjiou@Mohameds-Air.SpeedportEntry2090126200030" ]
mohamedtajjiou@Mohameds-Air.SpeedportEntry2090126200030
a21ea38dd41c4c1da4ee46c0cd5ca63bc682aaab
8abb3c86e967b9d5bc3baee685e1d4f3db686287
/dal-jdbc/src/test/java/org/unidal/dal/jdbc/intg/UserDaoTest.java
ad196725118b48d12d5cffa3f32c59a85be060ad
[]
no_license
marsqing/frameworks
337572f7a77bcc3447fd1afd7c43dadf589de9c2
20a511dfef78455b2145b453314d2c0951bbef35
refs/heads/master
2021-01-21T23:29:27.490019
2015-07-22T13:16:48
2015-07-22T13:16:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,194
java
package org.unidal.dal.jdbc.intg; import org.junit.Assert; import org.junit.Test; import org.unidal.dal.jdbc.datasource.DataSourceException; import org.unidal.dal.jdbc.entity.EntityInfoManager; import org.unidal.dal.jdbc.test.JdbcTestCase; import org.unidal.test.user.address.dal.UserAddress; import org.unidal.test.user.address.dal.UserAddressDao; import org.unidal.test.user.address.dal.UserAddressEntity; import org.unidal.test.user.dal.User; import org.unidal.test.user.dal.UserDao; import org.unidal.test.user.dal.UserEntity; public class UserDaoTest extends JdbcTestCase { private EntityInfoManager m_entityManager; @Override public void setUp() throws Exception { super.setUp(); m_entityManager = lookup(EntityInfoManager.class); m_entityManager.register(UserEntity.class); m_entityManager.register(UserAddressEntity.class); } @Test public void testFindByPK() throws Exception { try { UserDao userDao = lookup(UserDao.class); UserAddressDao userAddressDao = lookup(UserAddressDao.class); User user1 = userDao.createLocal(); user1.setKeyUserId(1); userDao.delete(user1); userAddressDao.deleteAllByUserId(1); user1.setUserId(1); user1.setUserName("user name"); user1.setPassword(""); userDao.insert(user1); User user2 = userDao.findByPK(1, UserEntity.READSET_FULL); Assert.assertEquals(user2.getUserId(), user1.getUserId()); Assert.assertEquals(user2.getUserName(), user1.getUserName()); UserAddress userAddress1 = userAddressDao.createLocal(); userAddress1.setUserId(1); userAddress1.setType("H"); userAddress1.setAddress("Home Address"); userAddressDao.insert(userAddress1); userAddress1.setUserId(1); userAddress1.setType("O"); userAddress1.setAddress("Office Address"); userAddressDao.insert(userAddress1); userAddress1.setUserId(1); userAddress1.setType("B"); userAddress1.setAddress("Billing Address"); userAddressDao.insert(userAddress1); User user3 = userDao.findWithSubObjectsByPK(1, UserEntity.READSET_FULL_WITH_ALL_ADDRESSES_FULL); Assert.assertEquals("H", user3.getHomeAddress().getType()); Assert.assertEquals("Home Address", user3.getHomeAddress().getAddress()); Assert.assertEquals("O", user3.getOfficeAddress().getType()); Assert.assertEquals("Office Address", user3.getOfficeAddress().getAddress()); Assert.assertEquals("B", user3.getBillingAddress().getType()); Assert.assertEquals("Billing Address", user3.getBillingAddress().getAddress()); userDao.delete(user1); userAddressDao.deleteAllByUserId(1); } catch (DataSourceException e) { if (e.isDataSourceDown()) { System.out.println("Can't connect to database, gave up"); } else { throw e; } } } @Override protected String getDefaultDataSource() { return "jdbc-dal"; } }
[ "qmwu2000@gmail.com" ]
qmwu2000@gmail.com
1d16c5ad86823c31a081ebcf35d870073b7b619f
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
/Code Snippet Repository/Hibernate/Hibernate969.java
701a0995e7b297305bfb8ecaffda66dd6ce0aaff
[]
no_license
saber13812002/DeepCRM
3336a244d4852a364800af3181e03e868cf6f9f5
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
refs/heads/master
2023-03-16T00:08:06.473699
2018-04-18T05:29:50
2018-04-18T05:29:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
914
java
public static NativeSQLQueryJoinReturn extractReturnDescription( JaxbHbmNativeQueryJoinReturnType rtnSource, HbmLocalMetadataBuildingContext context, int queryReturnPosition) { final int dot = rtnSource.getProperty().lastIndexOf( '.' ); if ( dot == -1 ) { throw new MappingException( String.format( Locale.ENGLISH, "Role attribute for sql query return [%s] not formatted correctly {owningAlias.propertyName}", rtnSource.getAlias() ), context.getOrigin() ); } String roleOwnerAlias = rtnSource.getProperty().substring( 0, dot ); String roleProperty = rtnSource.getProperty().substring( dot + 1 ); return new NativeSQLQueryJoinReturn( rtnSource.getAlias(), roleOwnerAlias, roleProperty, //FIXME: get the PersistentClass extractPropertyResults( rtnSource.getAlias(), rtnSource, null, context ), rtnSource.getLockMode() ); }
[ "Qing.Mi@my.cityu.edu.hk" ]
Qing.Mi@my.cityu.edu.hk
7c363b2a1a90ac1392145b5fa685741e464c7d6d
318f01d9c7d6d5615c32eaf3a48b38e72c89dec6
/thirdpp-channel/src/main/java/com/zendaimoney/thirdpp/channel/entity/AccountAgreement.java
859f2e1988abd381c72d67781616b0e581e31971
[]
no_license
ichoukou/thirdapp
dce52f5df2834f79a51895475b995a3e758be8c0
aae0a1596e06992b600a1a442723b833736240e3
refs/heads/master
2020-05-03T03:12:33.064089
2018-04-18T06:00:14
2018-04-18T06:00:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,292
java
package com.zendaimoney.thirdpp.channel.entity; import java.io.Serializable; import java.util.Date; /** * 协议支付账户表 * * @author wulj */ public class AccountAgreement implements Serializable { private static final long serialVersionUID = 7634319158460228443L; private Long id; private String name; private String idType; private String idNum; private Date createTime; private Date updateTime; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getIdType() { return idType; } public void setIdType(String idType) { this.idType = idType; } public String getIdNum() { return idNum; } public void setIdNum(String idNum) { this.idNum = idNum; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public Date getUpdateTime() { return updateTime; } public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; } }
[ "gaohongxuhappy@163.com" ]
gaohongxuhappy@163.com
2b68bba98a94b76feac37055c5b851514b57a7b8
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_fe08084c37834fdec495e2703a94b20ce03bfce1/TestVersioning/2_fe08084c37834fdec495e2703a94b20ce03bfce1_TestVersioning_t.java
0b4c283212a8a2f4fd2f85257a754c75308336e1
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,927
java
/* * Copyright (C) 2003-2010 eXo Platform SAS. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Affero General Public License * as published by the Free Software Foundation; either version 3 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see<http://www.gnu.org/licenses/>. */ package org.exoplatform.wiki.mow.core.api; import java.util.Iterator; import org.exoplatform.wiki.chromattic.ext.ntdef.NTFrozenNode; import org.exoplatform.wiki.chromattic.ext.ntdef.NTVersion; import org.exoplatform.wiki.mow.api.WikiNodeType; import org.exoplatform.wiki.mow.api.WikiType; import org.exoplatform.wiki.mow.core.api.wiki.AttachmentImpl; import org.exoplatform.wiki.mow.core.api.wiki.PageImpl; /** * Created by The eXo Platform SAS * Author : viet nguyen * viet.nguyen@exoplatform.com * Jul 7, 2010 */ public class TestVersioning extends AbstractMOWTestcase { public void testGetVersionHistory() throws Exception { PageImpl wikipage = createWikiPage(WikiType.PORTAL, "versioning", "testGetVersionHistory-001"); assertNotNull(wikipage.getVersionableMixin()); assertNotNull(wikipage.getVersionableMixin().getVersionHistory().getRootVersion().getCreated()); assertTrue(wikipage.getVersionableMixin().isCheckedOut()); } public void testCreateVersionHistoryTree() throws Exception { PageImpl wikipage = createWikiPage(WikiType.PORTAL, "versioning", "testCreateVersionHistoryTree-001"); wikipage.setTitle("testCreateVersionHistoryTree"); wikipage.getContent().setText("testCreateVersionHistoryTree-ver1.0"); NTVersion ver1 = wikipage.checkin(); assertNotNull(ver1); wikipage.checkout(); wikipage.getContent().setText("testCreateVersionHistoryTree-ver2.0"); NTVersion ver2 = wikipage.checkin(); assertNotNull(ver2); assertNotSame(ver1, ver2); wikipage.checkout(); wikipage.restore(ver1.getName(), false); assertEquals("testCreateVersionHistoryTree-ver1.0", wikipage.getContent().getText()); wikipage.checkout(); wikipage.getContent().setText("testCreateVersionHistoryTree-ver3.0"); NTVersion ver3 = wikipage.checkin(); wikipage.checkout(); Iterator<NTVersion> iter = wikipage.getVersionableMixin().getVersionHistory().iterator(); NTVersion version = iter.next(); assertEquals("jcr:rootVersion", version.getName()); version = iter.next(); NTFrozenNode frozenNode = version.getNTFrozenNode(); assertEquals("testCreateVersionHistoryTree-ver1.0", ((AttachmentImpl) (frozenNode.getChildren().get(WikiNodeType.Definition.CONTENT))).getText()); assertNotNull(frozenNode.getUpdatedDate()); assertNotNull(frozenNode.getAuthor()); version = iter.next(); frozenNode = version.getNTFrozenNode(); assertEquals("testCreateVersionHistoryTree-ver2.0", ((AttachmentImpl) (frozenNode.getChildren().get(WikiNodeType.Definition.CONTENT))).getText()); assertNotNull(frozenNode.getUpdatedDate()); assertNotNull(frozenNode.getAuthor()); version = iter.next(); frozenNode = version.getNTFrozenNode(); assertEquals("testCreateVersionHistoryTree-ver3.0", ((AttachmentImpl) (frozenNode.getChildren().get(WikiNodeType.Definition.CONTENT))).getText()); assertNotNull(frozenNode.getUpdatedDate()); assertNotNull(frozenNode.getAuthor()); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
f5cabcc44c00b8a3d1686a40151eea4b513799ca
aeddd2ba1405e2aa801d760a45a3db8df64b6c0f
/src/main/java/com/wnf/entity/Person.java
cdf809e7c938ba795c9e22f6f6a6e094f042fbe6
[]
no_license
wunaifu/SpringBootMybatisOneToMany
e410b919ddc76850aea21ff82091c55e801d55ae
afbb6e46d073c587647098fb5ec57da3ee36e55c
refs/heads/master
2020-03-22T05:44:08.851263
2018-07-19T08:01:32
2018-07-19T08:01:32
139,586,571
1
0
null
null
null
null
UTF-8
Java
false
false
892
java
package com.wnf.entity; public class Person { private String pname; private int pid; private int page; private Card card; @Override public String toString() { return "Person{" + "pname='" + pname + '\'' + ", pid=" + pid + ", page=" + page + ", card=" + card + '}'; } public String getPname() { return pname; } public void setPname(String pname) { this.pname = pname; } public int getPid() { return pid; } public void setPid(int pid) { this.pid = pid; } public int getPage() { return page; } public void setPage(int page) { this.page = page; } public Card getCard() { return card; } public void setCard(Card card) { this.card = card; } }
[ "1278022159@qq.com" ]
1278022159@qq.com
d481541ea133b3e77053fd91dcd28b32518edecd
5ed504d34c147fd127b5336c99242365da3df86b
/src/com/salescrm/GetPersonByUserProfileIdAPI.java
3cb5c2ba58ee5057ced2bf1cde7e399fd19a0e79
[]
no_license
Arasu378/SalesCrmApi
232212a652c7176993b877072500b62f7a9ab121
9b05db749909e7158560d597cfe1041921e1d4a0
refs/heads/master
2021-08-23T20:24:56.605096
2017-12-06T11:36:56
2017-12-06T11:36:56
102,078,944
0
0
null
null
null
null
UTF-8
Java
false
false
602
java
package com.salescrm; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import consumeclass.GetPersonByUserProfileIdClass; import response.PersonResponse; @Path("/getPersonByUserProfileId/{UserProfileId}") public class GetPersonByUserProfileIdAPI { @GET @Secured @Produces(MediaType.APPLICATION_JSON) public PersonResponse getPersonByUserProfileId(@PathParam("UserProfileId")int UserProfileId){ return GetPersonByUserProfileIdClass.getPersonByUserProfileId(UserProfileId); } }
[ "info@kyrostechnologies.com" ]
info@kyrostechnologies.com
f96751a378481610330108cee350939f6dfb2699
504651e52edbc41056255b9f7bcdf97d739ee5e0
/app/src/main/java/com/i9930/croptrails/FarmDetails/Model/ChemiclasInfo.java
336a0c8520c15910e78a46eec604c79c493dd001
[]
no_license
Yash-Gupta-21/ct_lite_android-master
55edc2ba8040b0648edb6c70e93ab3575df298d1
f09a8d307fc0b532934d1a420aa54a95caad4756
refs/heads/master
2023-08-04T17:43:48.147523
2021-10-04T06:53:38
2021-10-04T06:53:38
413,306,223
0
0
null
null
null
null
UTF-8
Java
false
false
1,028
java
package com.i9930.croptrails.FarmDetails.Model; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class ChemiclasInfo { @SerializedName("material_id") @Expose private String materialId; @SerializedName("sum") @Expose private String sum; @SerializedName("chemical") @Expose private String chemical; @SerializedName("unit") @Expose private String unit; public String getMaterialId() { return materialId; } public void setMaterialId(String materialId) { this.materialId = materialId; } public String getSum() { return sum; } public void setSum(String sum) { this.sum = sum; } public String getChemical() { return chemical; } public void setChemical(String chemical) { this.chemical = chemical; } public String getUnit() { return unit; } public void setUnit(String unit) { this.unit = unit; } }
[ "21yashgupta@gmail.com" ]
21yashgupta@gmail.com
ce33e5c8c11f958fc9edabf675f6bc6cc75efd9c
fe49bebdae362679d8ea913d97e7a031e5849a97
/bqerpejb/src/power/ejb/manage/contract/business/ConJPaymentPlanFacade.java
185107f59ca95c4ec7196c99f022398954846ae0
[]
no_license
loveyeah/BQMIS
1f87fad2c032e2ace7e452f13e6fe03d8d09ce0d
a3f44db24be0fcaa3cf560f9d985a6ed2df0b46b
refs/heads/master
2020-04-11T05:21:26.632644
2018-03-08T02:13:18
2018-03-08T02:13:18
124,322,652
0
2
null
null
null
null
UTF-8
Java
false
false
5,915
java
package power.ejb.manage.contract.business; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.logging.Level; import javax.ejb.EJB; import javax.ejb.Stateless; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.Query; import org.apache.taglibs.standard.lang.jstl.NullLiteral; import com.sun.org.apache.xerces.internal.impl.dtd.models.DFAContentModel; import power.ejb.comm.NativeSqlHelperRemote; import power.ejb.hr.LogUtil; import power.ejb.manage.contract.form.PaymentPlanForm; /** * @author slTang */ @Stateless public class ConJPaymentPlanFacade implements ConJPaymentPlanFacadeRemote { @PersistenceContext private EntityManager entityManager; @EJB(beanName = "NativeSqlHelper") protected NativeSqlHelperRemote bll; public ConJPaymentPlan save(ConJPaymentPlan entity) { LogUtil.log("saving ConJPaymentPlan instance", Level.INFO, null); try { if(entity.getPaymentId()==null){ entity.setPaymentId(bll.getMaxId("CON_J_PAYMENT_PLAN", "PAYMENT_ID")); } entity.setIsUse("Y"); entityManager.persist(entity); LogUtil.log("save successful", Level.INFO, null); return entity; } catch (RuntimeException re) { LogUtil.log("save failed", Level.SEVERE, re); throw re; } } public void delete(ConJPaymentPlan entity) { entity.setIsUse("N"); this.update(entity); } public ConJPaymentPlan update(ConJPaymentPlan entity) { LogUtil.log("updating ConJPaymentPlan instance", Level.INFO, null); try { ConJPaymentPlan result = entityManager.merge(entity); LogUtil.log("update successful", Level.INFO, null); return result; } catch (RuntimeException re) { LogUtil.log("update failed", Level.SEVERE, re); throw re; } } public ConJPaymentPlan findById(Long id) { LogUtil.log("finding ConJPaymentPlan instance with id: " + id, Level.INFO, null); try { ConJPaymentPlan instance = entityManager.find( ConJPaymentPlan.class, id); return instance; } catch (RuntimeException re) { LogUtil.log("find failed", Level.SEVERE, re); throw re; } } @SuppressWarnings("unchecked") public List<PaymentPlanForm> findByConId(Long conId) { String sql= // "select t.payment_id,\n" + // " t.con_id,\n" + // " t.payment_moment,\n" + // " t.pay_price,\n" + // " to_char(t.pay_date,'yyyy-mm-dd'),\n" + // " t.memo,\n" + // " t.last_modified_by,\n" + // " to_char(t.last_modified_date,'yyyy-mm-dd'),\n" + // " t.enterprise_code,\n" + // " t.is_use,\n" + // " (select b.bala_flag from con_j_balance b where b.is_use='Y' and b.con_id = t.con_id),"+ // " getworkername(t.last_modified_by),\n" + // " con.currency_type,\n"+ // " con.act_amount\n"+ // " from con_j_payment_plan t,CON_J_CONTRACT_INFO con\n" + // " where t.con_id = ?\n" + // " and t.is_use = 'Y'\n" + // " and con.con_id=t.con_id\n"+ // " and t.is_use = 'Y'"; "select t.payment_id,\n" + " t.con_id,\n" + " t.payment_moment,\n" + " t.pay_price,\n" + " to_char(t.pay_date, 'yyyy-mm-dd'),\n" + " t.memo,\n" + " t.last_modified_by,\n" + " to_char(t.last_modified_date, 'yyyy-mm-dd'),\n" + " t.enterprise_code,\n" + " t.is_use,\n" + " (select b.bala_flag\n" + " from con_j_balance b\n" + " where b.is_use = 'Y'\n" + " and b.con_id = t.con_id\n" + " and b.payment_id = t.payment_id and rownum=1) bala_flag,\n" + " getworkername(t.last_modified_by),\n" + " (select sys.currency_name from SYS_C_CURRENCY sys where sys.currency_id=con.currency_type) currencyName ,\n" + " con.act_amount,\n" + " con.operate_by,\n" + " getworkername(con.operate_by)\n" + " from con_j_payment_plan t, CON_J_CONTRACT_INFO con\n" + " where t.con_id = "+conId+"\n" + " and t.is_use = 'Y'\n" + " and con.con_id = t.con_id\n" + " and t.is_use = 'Y'"; List list=bll.queryByNativeSQL(sql); List<PaymentPlanForm> arrlist=new ArrayList(); Iterator it=list.iterator(); java.text.DecimalFormat df=new java.text.DecimalFormat("#.#####"); while(it.hasNext()){ PaymentPlanForm model=new PaymentPlanForm(); Object[] o=(Object[])it.next(); if(o[0]!=null) model.setPaymentId(Long.parseLong(o[0].toString())); if(o[1]!=null) model.setConId(Long.parseLong(o[1].toString())); if(o[2]!=null) model.setPaymentMoment(o[2].toString()); if(o[3]!=null) model.setPayPrice(Double.parseDouble(o[3].toString())); if(o[4]!=null) model.setPayDate(o[4].toString()); if(o[5]!=null) model.setMemo(o[5].toString()); if(o[6]!=null) model.setLastModifiedBy(o[6].toString()); if(o[7]!=null) model.setLastModifiedDate(o[7].toString()); if(o[8]!=null) model.setEnterpriseCode(o[8].toString()); if(o[9]!=null) model.setIsUse(o[9].toString()); if(o[10]!=null) model.setPayStatu(o[10].toString()); if(o[11]!=null) model.setLastModifyName(o[11].toString()); if(o[12]!=null) model.setCurrencyName(o[12].toString()); if(o[13]!=null){ model.setActAmount(Double.parseDouble(o[13].toString())); if(o[3]!=null) // model.setPayRate(model.getPayPrice()/model.getActAmount()); model.setPayRate(df.format(model.getPayPrice()/model.getActAmount())); } if (o[14] !=null) { model.setOperateBy(o[14].toString()); } if (o[15] !=null) { model.setOperateName(o[15].toString()); } arrlist.add(model); } return arrlist; } }
[ "yexinhua@rtdata.cn" ]
yexinhua@rtdata.cn
3e6528b424f6d9c4fdabb829a4b33dbe63e61f84
e8f4d3d48a1925b515d509902232108a3439d5a0
/snz/snz-statistic-api/src/main/java/io/terminus/snz/statistic/model/PurchaserRequirementCount.java
4a42f009ccce5b49d53f553409b5ddabd72a3672
[]
no_license
palmelf/test-snz
bfd7b6ea3bc9e5cfda8e4434e9bcb69674719748
6d6914863b539753f466025aefc2b579c7263f63
refs/heads/master
2021-01-22T10:36:43.453850
2016-04-09T08:23:36
2016-04-09T08:23:36
33,541,041
0
0
null
2015-04-07T12:13:30
2015-04-07T12:13:29
null
UTF-8
Java
false
false
807
java
package io.terminus.snz.statistic.model; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.Setter; import lombok.ToString; import java.io.Serializable; import java.util.Map; /** * Desc:采购商需求的统计数据信息 * Mail:v@terminus.io * author:Michael Zhao * Date:2014-07-10. */ @ToString @EqualsAndHashCode public class PurchaserRequirementCount implements Serializable { private static final long serialVersionUID = 307955313272517105L; @Setter @Getter private Long userId; //采购商用户编号 @Setter @Getter private String userName; //采购商用户名称 @Setter @Getter private Map<Integer , Integer> statusCounts; //采购商的不同阶段的需求统计数据 }
[ "yangzhiliang1018@gmail.com" ]
yangzhiliang1018@gmail.com
d6e65e3b657c8b5f4e4b04a5ec2eaa4ad101c671
53d677a55e4ece8883526738f1c9d00fa6560ff7
/com/tencent/mm/plugin/webview/preload/e$a.java
050075f470bf5fc51f0f27e7486451446a3a486d
[]
no_license
0jinxing/wechat-apk-source
544c2d79bfc10261eb36389c1edfdf553d8f312a
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
refs/heads/master
2020-06-07T20:06:03.580028
2019-06-21T09:17:26
2019-06-21T09:17:26
193,069,132
9
4
null
null
null
null
UTF-8
Java
false
false
470
java
package com.tencent.mm.plugin.webview.preload; import com.tencent.mm.plugin.webview.ui.tools.jsapi.i; import java.util.Map; public abstract interface e$a { public abstract void a(i parami, String paramString, Map<String, Object> paramMap); } /* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes7-dex2jar.jar * Qualified Name: com.tencent.mm.plugin.webview.preload.e.a * JD-Core Version: 0.6.2 */
[ "172601673@qq.com" ]
172601673@qq.com
1fbcd8440b034274836eac7370eb023068f8d4af
844135b18e32b96d02274ede28527049e9e546d2
/trunk/faceye-portal/core-components-support/src/com/faceye/core/componentsupport/web/controller/ExtComponentSupportAction.java
7004303224092fbce0a4f5d23af0df4134055671
[]
no_license
BGCX067/faceye-svn-to-git
bb0ded91c7a0d97f4914035b4257c9f629449d50
9b9d14a70a102412ed24ec699a5be963ac10a81e
refs/heads/master
2016-09-01T08:55:33.894716
2015-12-28T14:08:28
2015-12-28T14:08:28
48,759,478
0
1
null
null
null
null
UTF-8
Java
false
false
604
java
package com.faceye.core.componentsupport.web.controller; import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.ActionForm; import com.faceye.core.componentsupport.service.iface.IDomainService; import com.faceye.core.web.controller.ExtTemplateAction; public abstract class ExtComponentSupportAction extends ExtTemplateAction { protected IDomainService domainService=null; public IDomainService getDomainService() { return domainService; } public void setDomainService(IDomainService domainService) { this.domainService = domainService; } }
[ "you@example.com" ]
you@example.com
1ce743d33df667f8f85aa99cd5c103f292722438
f66223284a1788b2bcf8045f6412724ce49d5ffb
/PackageParser4/src/com/rarnu/tools/root/utils/GoogleUtils.java
be2aa90f417152ee21c85152d6cbc92954dac685
[]
no_license
mimoccc/root-tools
8e4d895f23c46012effb7414086cd5b8a27f2c69
d38e3931ba7aa55cba1445efba8220d3a24333e5
refs/heads/master
2021-01-17T14:39:47.178150
2014-01-15T05:51:07
2014-01-15T05:51:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,893
java
package com.rarnu.tools.root.utils; import android.content.Context; import com.rarnu.tools.root.common.GoogleInfo; import com.rarnu.tools.root.common.GooglePackageInfo; import java.io.File; import java.util.ArrayList; import java.util.List; public class GoogleUtils { public static List<GoogleInfo> getGoogleApps(Context context, GooglePackageInfo packageInfo, int sdkVer) { List<GoogleInfo> list = new ArrayList<GoogleInfo>(); for (String apk : packageInfo.apks) { GoogleInfo item = new GoogleInfo(); item.fileName = apk; item.type = 0; item.status = getGoogleInfoStatus(item, sdkVer); item.optional = false; list.add(item); } for (String apk : packageInfo.apks_optional) { GoogleInfo item = new GoogleInfo(); item.fileName = apk; item.type = 0; item.status = getGoogleInfoStatus(item, sdkVer); item.optional = true; list.add(item); } for (String jar : packageInfo.jars) { GoogleInfo item = new GoogleInfo(); item.fileName = jar; item.type = 1; item.status = getGoogleInfoStatus(item, sdkVer); item.optional = false; list.add(item); } for (String lib : packageInfo.libs) { GoogleInfo item = new GoogleInfo(); item.fileName = lib; item.type = 2; item.status = getGoogleInfoStatus(item, sdkVer); item.optional = false; list.add(item); } for (String xml : packageInfo.xmls) { GoogleInfo item = new GoogleInfo(); item.fileName = xml.substring(xml.indexOf("/") + 1); item.path = xml.substring(0, xml.indexOf("/")); item.type = 3; item.status = getGoogleInfoStatus(item, sdkVer); item.optional = false; list.add(item); } return list; } private static int getGoogleInfoStatus(GoogleInfo item, int sdkVer) { int ret = -1; String filePath = ""; switch (item.type) { case 0: filePath = "/system/app/" + item.fileName; break; case 1: filePath = "/system/framework/" + item.fileName; break; case 2: filePath = "/system/lib/" + item.fileName; break; case 3: filePath = "/system/etc/" + item.path + "/" + item.fileName; break; } if (!new File(filePath).exists()) { ret = 1; } else { if (item.type == 0) { String newFilePath = ""; switch (item.type) { case 0: case 1: case 2: newFilePath = DirHelper.GOOGLE_DIR + sdkVer + "/" + item.fileName; break; case 3: newFilePath = DirHelper.GOOGLE_DIR + sdkVer + "/" + item.path + "/" + item.fileName; break; } ret = ApkUtils.checkSignature(filePath, newFilePath) ? 0 : 2; } else { ret = 0; } } return ret; } public static boolean isAllFilesCorrect(List<GoogleInfo> list) { boolean ret = true; for (GoogleInfo gi : list) { if (gi.status == 2) { ret = false; break; } if (gi.status != 0 && !gi.optional) { ret = false; break; } } return ret; } public static boolean isAllOptionalFilesCorrect(List<GoogleInfo> list) { boolean ret = true; for (GoogleInfo gi : list) { if (gi.optional) { if (gi.status != 0) { ret = false; break; } } } return ret; } public static List<GoogleInfo> getInstallFileList(List<GoogleInfo> list, boolean overrideBroken, boolean installOptional, int mode) { List<GoogleInfo> result = new ArrayList<GoogleInfo>(); for (GoogleInfo gi : list) { if (mode == 1) { if (gi.optional && gi.status != 0 && installOptional) { result.add(gi); } } else { if (gi.status == 2 && overrideBroken) { result.add(gi); } else if (gi.status == 1 && gi.optional && installOptional) { result.add(gi); } else if (gi.status == 1 && !gi.optional) { result.add(gi); } } } return result; } }
[ "rarnu1985@gmail.com" ]
rarnu1985@gmail.com
a56b0d40d2f32ad651de57658be4da5287bb9711
c5e6c9fc7942572ddbdfb0c087505254d2a4ffc4
/game7/xxkg/src/main/java/com/tumei/game/protos/treasure/RequestTreasureRank.java
1febcf3508dbf853b8930ab7925f463ef22eefe8
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
zhangwei9757/xiaocaibao
60074b00651ae41506c4eabb2636dfaae7947d7c
9e2ad2669af0b0453ea9149f8732953c57c2bb7e
refs/heads/master
2020-03-25T01:26:04.975319
2018-10-15T09:30:17
2018-10-15T09:30:17
143,237,486
1
0
null
null
null
null
UTF-8
Java
false
false
1,053
java
package com.tumei.game.protos.treasure; import com.tumei.game.GameUser; import com.tumei.game.protos.structs.TreasureRankStruct; import com.tumei.game.services.TreasureRankService; import com.tumei.model.RoleBean; import com.tumei.websocket.BaseProtocol; import com.tumei.websocket.WebSocketUser; import org.springframework.stereotype.Component; import java.util.ArrayList; import java.util.List; /** * Created by Administrator on 2017/3/13 0013. * * */ @Component public class RequestTreasureRank extends BaseProtocol { public int seq; class ReturnTreasureRank extends BaseProtocol { public int seq; public String result = ""; public List<TreasureRankStruct> ranks = new ArrayList<>(); } @Override public void onProcess(WebSocketUser session) { GameUser user = (GameUser) session; ReturnTreasureRank rl = new ReturnTreasureRank(); rl.seq = seq; long uid = user.getUid(); RoleBean rb = user.getDao().findRole(uid); rl.ranks = TreasureRankService.getInstance().getRanks(uid, rb.getNickname()); user.send(rl); } }
[ "245370344@qq.com" ]
245370344@qq.com
bf06e792713ffe8198758532eaaf490aef135ca4
4e2f16f2904d75e55cce1b2cef54acf79aa21280
/integration-test/framework/src/main/java/com/android/build/gradle/integration/common/utils/AssumeUtil.java
6196b79c699a2611f2719593f258fe32d1a85c0c
[]
no_license
yuweiguocn/build-system
0e49a836728614efd30e9bae8c7e92b0d8371f2e
bc4c85f7b25770caa4c565176b8f92e1cdd9cf70
refs/heads/master
2020-09-21T16:20:14.670290
2019-11-29T12:07:13
2019-11-29T12:07:13
224,846,645
13
5
null
null
null
null
UTF-8
Java
false
false
2,565
java
/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.build.gradle.integration.common.utils; import com.android.SdkConstants; import com.android.build.gradle.integration.common.fixture.GradleTestProject; import com.android.repository.Revision; import org.junit.Assume; /** * Common assume for test. */ public class AssumeUtil { public static void assumeBuildToolsAtLeast(int major) { assumeBuildToolsAtLeast(new Revision(major)); } public static void assumeBuildToolsAtLeast(int major, int minor, int micro) { assumeBuildToolsAtLeast(new Revision(major, minor, micro)); } public static void assumeBuildToolsAtLeast(int major, int minor, int micro, int preview) { assumeBuildToolsAtLeast(new Revision(major, minor, micro, preview)); } public static void assumeBuildToolsAtLeast(Revision revision) { Revision currentVersion = Revision.parseRevision( GradleTestProject.DEFAULT_BUILD_TOOL_VERSION); Assume.assumeTrue("Test is only applicable to build tools >= " + revision.toString(), currentVersion.compareTo(revision) >= 0); } public static void assumeBuildToolsGreaterThan(Revision revision) { Assume.assumeTrue( "Test needs build tools higher than " + revision.toString(), Revision.parseRevision(GradleTestProject.DEFAULT_BUILD_TOOL_VERSION) .compareTo(revision) > 0); } public static void assumeNotWindows() { Assume.assumeFalse(SdkConstants.currentPlatform() == SdkConstants.PLATFORM_WINDOWS); } public static void assumeNotWindowsBot() { Assume.assumeFalse( SdkConstants.currentPlatform() == SdkConstants.PLATFORM_WINDOWS && System.getenv("BUILDBOT_BUILDERNAME") != null); } public static void assumeIsLinux() { Assume.assumeTrue(SdkConstants.currentPlatform() == SdkConstants.PLATFORM_LINUX); } }
[ "yuweiguocn@gmail.com" ]
yuweiguocn@gmail.com
fe1035bb0061e2a7b753483def58e71b0b215b0f
8388d3009c0be9cb4e3ea25abbce7a0ad6f9b299
/business/agriclaim/agriclaim-api/src/main/java/com/sinosoft/agriclaim/api/compensatemanage/dto/PrpLChargeDto.java
7225f514baf551e5962bc59ab01ec79bb8d6bb85
[]
no_license
foxhack/NewAgri2018
a182bd34d0c583a53c30d825d5e2fa569f605515
be8ab05e0784c6e7e7f46fea743debb846407e4f
refs/heads/master
2021-09-24T21:58:18.577979
2018-10-15T11:24:21
2018-10-15T11:24:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,971
java
package com.sinosoft.agriclaim.api.compensatemanage.dto; import java.io.Serializable; import com.sinosoft.framework.dto.BaseRequest; /** * @author codegen@研发中心 * @mail admin@sinosoft.com.cn * @time 2017-11-08 05:40:44.225 * 赔款费用信息表Api操作对象 */ public class PrpLChargeDto extends BaseRequest implements Serializable{ private static final long serialVersionUID = 1L; /** 属性赔款计算书号/赔款计算书号 */ private String compensateNo ; /** 属性险种/险种 */ private String riskCode ; /** 属性保单号/保单号 */ private String policyNo ; /** 属性序号/序号 */ private java.lang.Integer serialNo ; /** 属性险别代码/险别代码 */ private String kindCode ; /** 属性费用类别代码/费用类别代码 */ private String chargeCode ; /** 属性费用名称/费用名称 */ private String chargeName ; /** 属性币别代码/币别代码 */ private String currency ; /** 属性费用金额/费用金额 */ private java.lang.Double chargeAmount ; /** 属性计入赔款金额/计入赔款金额 */ private java.lang.Double sumRealPay ; /** 属性标志字段/标志字段 */ private String flag ; /** 属性录入时间/录入时间 */ private java.util.Date inputDate ; /** 属性费用信息标志/费用信息标志 */ private String changeFlag ; /** 属性费用信息报告/费用信息报告 */ private java.lang.Double chargeReport ; /** 属性支付对象类型/支付对象类型 */ private String payObjectType ; /** 属性支付对象代码/支付对象代码 */ private String payObjectCode ; /** 属性支付对象姓名/支付对象姓名 */ private String payObjectName ; /** 属性保单标的序号/保单标的序号 */ private java.lang.Integer itemKindNo ; /** 属性预支付数量/预支付数量 */ private java.lang.Integer prechargeAmount ; /** 属性检查代码/检查代码 */ private String checkDeptCode ; /** 属性检查姓名/检查姓名 */ private String checkDeptName ; /** 属性本次费用/本次费用 */ private java.lang.Double thisAmount ; /** 属性修改人/修改人 */ private String updateBy ; /** 属性修改日期/修改日期 */ private java.util.Date updateDate ; /** * 属性赔款计算书号/赔款计算书号的getter方法 */ public String getCompensateNo() { return compensateNo; } /** * 属性赔款计算书号/赔款计算书号的setter方法 */ public void setCompensateNo(String compensateNo) { this.compensateNo = compensateNo; } /** * 属性险种/险种的getter方法 */ public String getRiskCode() { return riskCode; } /** * 属性险种/险种的setter方法 */ public void setRiskCode(String riskCode) { this.riskCode = riskCode; } /** * 属性保单号/保单号的getter方法 */ public String getPolicyNo() { return policyNo; } /** * 属性保单号/保单号的setter方法 */ public void setPolicyNo(String policyNo) { this.policyNo = policyNo; } /** * 属性序号/序号的getter方法 */ public java.lang.Integer getSerialNo() { return serialNo; } /** * 属性序号/序号的setter方法 */ public void setSerialNo(java.lang.Integer serialNo) { this.serialNo = serialNo; } /** * 属性险别代码/险别代码的getter方法 */ public String getKindCode() { return kindCode; } /** * 属性险别代码/险别代码的setter方法 */ public void setKindCode(String kindCode) { this.kindCode = kindCode; } /** * 属性费用类别代码/费用类别代码的getter方法 */ public String getChargeCode() { return chargeCode; } /** * 属性费用类别代码/费用类别代码的setter方法 */ public void setChargeCode(String chargeCode) { this.chargeCode = chargeCode; } /** * 属性费用名称/费用名称的getter方法 */ public String getChargeName() { return chargeName; } /** * 属性费用名称/费用名称的setter方法 */ public void setChargeName(String chargeName) { this.chargeName = chargeName; } /** * 属性币别代码/币别代码的getter方法 */ public String getCurrency() { return currency; } /** * 属性币别代码/币别代码的setter方法 */ public void setCurrency(String currency) { this.currency = currency; } /** * 属性费用金额/费用金额的getter方法 */ public java.lang.Double getChargeAmount() { return chargeAmount; } /** * 属性费用金额/费用金额的setter方法 */ public void setChargeAmount(java.lang.Double chargeAmount) { this.chargeAmount = chargeAmount; } /** * 属性计入赔款金额/计入赔款金额的getter方法 */ public java.lang.Double getSumRealPay() { return sumRealPay; } /** * 属性计入赔款金额/计入赔款金额的setter方法 */ public void setSumRealPay(java.lang.Double sumRealPay) { this.sumRealPay = sumRealPay; } /** * 属性标志字段/标志字段的getter方法 */ public String getFlag() { return flag; } /** * 属性标志字段/标志字段的setter方法 */ public void setFlag(String flag) { this.flag = flag; } /** * 属性录入时间/录入时间的getter方法 */ public java.util.Date getInputDate() { return inputDate; } /** * 属性录入时间/录入时间的setter方法 */ public void setInputDate(java.util.Date inputDate) { this.inputDate = inputDate; } /** * 属性费用信息标志/费用信息标志的getter方法 */ public String getChangeFlag() { return changeFlag; } /** * 属性费用信息标志/费用信息标志的setter方法 */ public void setChangeFlag(String changeFlag) { this.changeFlag = changeFlag; } /** * 属性费用信息报告/费用信息报告的getter方法 */ public java.lang.Double getChargeReport() { return chargeReport; } /** * 属性费用信息报告/费用信息报告的setter方法 */ public void setChargeReport(java.lang.Double chargeReport) { this.chargeReport = chargeReport; } /** * 属性支付对象类型/支付对象类型的getter方法 */ public String getPayObjectType() { return payObjectType; } /** * 属性支付对象类型/支付对象类型的setter方法 */ public void setPayObjectType(String payObjectType) { this.payObjectType = payObjectType; } /** * 属性支付对象代码/支付对象代码的getter方法 */ public String getPayObjectCode() { return payObjectCode; } /** * 属性支付对象代码/支付对象代码的setter方法 */ public void setPayObjectCode(String payObjectCode) { this.payObjectCode = payObjectCode; } /** * 属性支付对象姓名/支付对象姓名的getter方法 */ public String getPayObjectName() { return payObjectName; } /** * 属性支付对象姓名/支付对象姓名的setter方法 */ public void setPayObjectName(String payObjectName) { this.payObjectName = payObjectName; } /** * 属性保单标的序号/保单标的序号的getter方法 */ public java.lang.Integer getItemKindNo() { return itemKindNo; } /** * 属性保单标的序号/保单标的序号的setter方法 */ public void setItemKindNo(java.lang.Integer itemKindNo) { this.itemKindNo = itemKindNo; } /** * 属性预支付数量/预支付数量的getter方法 */ public java.lang.Integer getPrechargeAmount() { return prechargeAmount; } /** * 属性预支付数量/预支付数量的setter方法 */ public void setPrechargeAmount(java.lang.Integer prechargeAmount) { this.prechargeAmount = prechargeAmount; } /** * 属性检查代码/检查代码的getter方法 */ public String getCheckDeptCode() { return checkDeptCode; } /** * 属性检查代码/检查代码的setter方法 */ public void setCheckDeptCode(String checkDeptCode) { this.checkDeptCode = checkDeptCode; } /** * 属性检查姓名/检查姓名的getter方法 */ public String getCheckDeptName() { return checkDeptName; } /** * 属性检查姓名/检查姓名的setter方法 */ public void setCheckDeptName(String checkDeptName) { this.checkDeptName = checkDeptName; } /** * 属性本次费用/本次费用的getter方法 */ public java.lang.Double getThisAmount() { return thisAmount; } /** * 属性本次费用/本次费用的setter方法 */ public void setThisAmount(java.lang.Double thisAmount) { this.thisAmount = thisAmount; } /** * 属性修改人/修改人的getter方法 */ public String getUpdateBy() { return updateBy; } /** * 属性修改人/修改人的setter方法 */ public void setUpdateBy(String updateBy) { this.updateBy = updateBy; } /** * 属性修改日期/修改日期的getter方法 */ public java.util.Date getUpdateDate() { return updateDate; } /** * 属性修改日期/修改日期的setter方法 */ public void setUpdateDate(java.util.Date updateDate) { this.updateDate = updateDate; } }
[ "vicentdk77@users.noreply.github.com" ]
vicentdk77@users.noreply.github.com
b3de36e9e36d548e5744a4c6718946ea57ded032
b5a4790330d45512e481060d0e930223defbbb35
/src/main/java/com/igomall/util/CompressUtils.java
fd2048cd9fb00bf1510cdd29019bed7faaafeeae
[]
no_license
heyewei/cms_shop
451081a46b03e85938d8dd256a9b97662241ac63
29047908c40202ddaa3487369a4429ab15634b9d
refs/heads/master
2023-02-13T15:43:17.118001
2020-12-29T09:58:52
2020-12-29T09:58:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,223
java
/* * Copyright 2008-2018 shopxx.net. All rights reserved. * Support: localhost * License: localhost/license * FileId: j8Ux0aViYrO+Mz0exGKBtTwEQGe1cOHk */ package com.igomall.util; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.HashSet; import java.util.Set; import org.apache.commons.compress.archivers.ArchiveEntry; import org.apache.commons.compress.archivers.ArchiveException; import org.apache.commons.compress.archivers.ArchiveInputStream; import org.apache.commons.compress.archivers.ArchiveOutputStream; import org.apache.commons.compress.archivers.ArchiveStreamFactory; import org.apache.commons.io.FileUtils; import org.apache.commons.io.FilenameUtils; import org.apache.commons.io.IOUtils; import org.apache.commons.io.filefilter.TrueFileFilter; import org.apache.commons.lang.ArrayUtils; import org.apache.commons.lang.StringUtils; import org.springframework.util.Assert; /** * Utils - 压缩/解压缩 * * @author 爱购 Team * @version 6.1 */ public final class CompressUtils { /** * 不可实例化 */ private CompressUtils() { } /** * 压缩 * * @param srcFiles * 源文件 * @param destFile * 目标文件 * @param archiverName * 压缩方式 * @param encoding * 字符集编码 */ public static void archive(File[] srcFiles, File destFile, String archiverName, String encoding) { Assert.notNull(destFile, "[Assertion failed] - destFile is required; it must not be null"); Assert.state(!destFile.exists() || destFile.isFile(), "[Assertion failed] - destFile must not exists or destFile must be file"); Assert.hasText(archiverName, "[Assertion failed] - archiverName must have text; it must not be null, empty, or blank"); File destDir = destFile.getParentFile(); if (destDir != null) { destDir.mkdirs(); } ArchiveOutputStream archiveOutputStream = null; try { archiveOutputStream = new ArchiveStreamFactory(encoding).createArchiveOutputStream(archiverName, new BufferedOutputStream(new FileOutputStream(destFile))); if (ArrayUtils.isNotEmpty(srcFiles)) { for (File srcFile : srcFiles) { if (srcFile == null || !srcFile.exists()) { continue; } Set<File> files = new HashSet<>(); if (srcFile.isFile()) { files.add(srcFile); } if (srcFile.isDirectory()) { files.addAll(FileUtils.listFilesAndDirs(srcFile, TrueFileFilter.INSTANCE, TrueFileFilter.INSTANCE)); } String basePath = FilenameUtils.getFullPath(srcFile.getCanonicalPath()); for (File file : files) { try { String entryName = FilenameUtils.separatorsToUnix(StringUtils.substring(file.getCanonicalPath(), basePath.length())); ArchiveEntry archiveEntry = archiveOutputStream.createArchiveEntry(file, entryName); archiveOutputStream.putArchiveEntry(archiveEntry); if (file.isFile()) { InputStream inputStream = null; try { inputStream = new BufferedInputStream(new FileInputStream(file)); IOUtils.copy(inputStream, archiveOutputStream); } catch (FileNotFoundException e) { throw new RuntimeException(e.getMessage(), e); } catch (IOException e) { throw new RuntimeException(e.getMessage(), e); } finally { IOUtils.closeQuietly(inputStream); } } } catch (IOException e) { throw new RuntimeException(e.getMessage(), e); } finally { archiveOutputStream.closeArchiveEntry(); } } } } } catch (ArchiveException e) { throw new RuntimeException(e.getMessage(), e); } catch (FileNotFoundException e) { throw new RuntimeException(e.getMessage(), e); } catch (IOException e) { throw new RuntimeException(e.getMessage(), e); } finally { IOUtils.closeQuietly(archiveOutputStream); } } /** * 压缩 * * @param srcFiles * 源文件 * @param destFile * 目标文件 * @param archiverName * 压缩方式 */ public static void archive(File[] srcFiles, File destFile, String archiverName) { archive(srcFiles, destFile, archiverName, null); } /** * 压缩 * * @param srcFile * 源文件 * @param destFile * 目标文件 * @param archiverName * 压缩方式 * @param encoding * 字符集编码 */ public static void archive(File srcFile, File destFile, String archiverName, String encoding) { archive(new File[] { srcFile }, destFile, archiverName, encoding); } /** * 压缩 * * @param srcFile * 源文件 * @param destFile * 目标文件 * @param archiverName * 压缩方式 */ public static void archive(File srcFile, File destFile, String archiverName) { archive(new File[] { srcFile }, destFile, archiverName, null); } /** * 解压缩 * * @param srcFile * 源文件 * @param destDir * 目标目录 * @param encoding * 字符集编码 */ public static void extract(File srcFile, File destDir, String encoding) { Assert.notNull(srcFile, "[Assertion failed] - srcFile is required; it must not be null"); Assert.state(srcFile.exists(), "[Assertion failed] - srcFile must exists"); Assert.state(srcFile.isFile(), "[Assertion failed] - srcFile must be file"); Assert.notNull(destDir, "[Assertion failed] - destDir is required; it must not be null"); Assert.state(destDir.mkdirs() || destDir.isDirectory(), "[Assertion failed] - destDir must make directorys or is directory"); ArchiveInputStream archiveInputStream = null; try { archiveInputStream = new ArchiveStreamFactory(encoding).createArchiveInputStream(new BufferedInputStream(new FileInputStream(srcFile))); ArchiveEntry archiveEntry; while ((archiveEntry = archiveInputStream.getNextEntry()) != null) { if (archiveEntry.isDirectory()) { new File(destDir, archiveEntry.getName()).mkdirs(); } else { OutputStream outputStream = null; try { outputStream = new BufferedOutputStream(new FileOutputStream(new File(destDir, archiveEntry.getName()))); IOUtils.copy(archiveInputStream, outputStream); } catch (FileNotFoundException e) { throw new RuntimeException(e.getMessage(), e); } catch (IOException e) { throw new RuntimeException(e.getMessage(), e); } finally { IOUtils.closeQuietly(outputStream); } } } } catch (FileNotFoundException e) { throw new RuntimeException(e.getMessage(), e); } catch (ArchiveException e) { throw new RuntimeException(e.getMessage(), e); } catch (IOException e) { throw new RuntimeException(e.getMessage(), e); } finally { IOUtils.closeQuietly(archiveInputStream); } } /** * 解压缩 * * @param srcFile * 源文件 * @param destDir * 目标目录 */ public static void extract(File srcFile, File destDir) { extract(srcFile, destDir, null); } }
[ "1169794338@qq.com" ]
1169794338@qq.com
374fa4cd62b4ccc96330647257610066bd6c868e
02e0dec4a8cd37fc2b79438b9d113b6a8fb3ea5c
/src/main/java/com/hejinyo/service/other/impl/Jzt_GpsServiceImpl.java
9446827e19233bac4fe2908e37230fb2dc253653
[]
no_license
HejinYo/base_old
0d7e1fd77840e8a8280543d75277907204d3ae47
ac7642d95f13980f53e051199160c6433be093f9
refs/heads/master
2021-01-20T01:57:46.180223
2017-03-19T12:44:31
2017-03-19T12:44:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
795
java
package com.hejinyo.service.other.impl; import com.hejinyo.mapper.other.Jzt_GpsMapper; import com.hejinyo.model.other.Jzt_Gps; import com.hejinyo.service.other.Jzt_GpsService; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.List; @Service("jzt_gpsService") public class Jzt_GpsServiceImpl implements Jzt_GpsService { @Resource(name = "jzt_GpsMapper") private Jzt_GpsMapper jzt_gpsMapper; @Override public List<Jzt_Gps> getJzt_GpsList() { return jzt_gpsMapper.getJzt_GpsList(); } @Override public int addJzt_Gps(Jzt_Gps jzt_gps) { return jzt_gpsMapper.addJzt_Gps(jzt_gps); } @Override public int delJzt_Gps(Jzt_Gps jzt_gps) { return jzt_gpsMapper.delJzt_Gps(jzt_gps); } }
[ "hejinyo@gmail.com" ]
hejinyo@gmail.com
2a3372113e4768f8ef56189d267a422875fa7124
317423805077bdfcd3a057d672855d04153b0608
/src/com/android/settings/Display.java
f90e0f05497e5e0fcfede22f80b9245d5ae72972
[ "Apache-2.0" ]
permissive
voku/android_packages_apps_Settings
367ea846e36f7e05f6d639a5bef299c7f187eaf0
0ced0b1574cd29aa09672d7eda32dba2ac88cfe8
refs/heads/froyo
2021-01-20T22:35:32.702975
2011-12-17T04:35:24
2011-12-17T04:35:24
2,033,668
1
1
NOASSERTION
2020-12-16T16:45:19
2011-07-12T01:46:50
Java
UTF-8
Java
false
false
4,844
java
/* * Copyright (C) 2006 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.settings; import android.app.Activity; import android.app.ActivityManagerNative; import android.content.res.Configuration; import android.content.res.Resources; import android.content.res.TypedArray; import android.os.Bundle; import android.os.RemoteException; import android.util.DisplayMetrics; import android.util.TypedValue; import android.view.View; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.Spinner; import android.widget.TextView; public class Display extends Activity implements View.OnClickListener { @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.display); mFontSize = (Spinner) findViewById(R.id.fontSize); mFontSize.setOnItemSelectedListener(mFontSizeChanged); String[] states = new String[3]; Resources r = getResources(); states[0] = r.getString(R.string.small_font); states[1] = r.getString(R.string.medium_font); states[2] = r.getString(R.string.large_font); ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, states); adapter.setDropDownViewResource( android.R.layout.simple_spinner_dropdown_item); mFontSize.setAdapter(adapter); mPreview = (TextView) findViewById(R.id.preview); mPreview.setText(r.getText(R.string.font_size_preview_text)); Button save = (Button) findViewById(R.id.save); save.setText(r.getText(R.string.font_size_save)); save.setOnClickListener(this); mTextSizeTyped = new TypedValue(); TypedArray styledAttributes = obtainStyledAttributes(android.R.styleable.TextView); styledAttributes.getValue(android.R.styleable.TextView_textSize, mTextSizeTyped); DisplayMetrics metrics = getResources().getDisplayMetrics(); mDisplayMetrics = new DisplayMetrics(); mDisplayMetrics.density = metrics.density; mDisplayMetrics.heightPixels = metrics.heightPixels; mDisplayMetrics.scaledDensity = metrics.scaledDensity; mDisplayMetrics.widthPixels = metrics.widthPixels; mDisplayMetrics.xdpi = metrics.xdpi; mDisplayMetrics.ydpi = metrics.ydpi; styledAttributes.recycle(); } @Override public void onResume() { super.onResume(); try { mCurConfig.updateFrom( ActivityManagerNative.getDefault().getConfiguration()); } catch (RemoteException e) { } if (mCurConfig.fontScale < 1) { mFontSize.setSelection(0); } else if (mCurConfig.fontScale > 1) { mFontSize.setSelection(2); } else { mFontSize.setSelection(1); } updateFontScale(); } private void updateFontScale() { mDisplayMetrics.scaledDensity = mDisplayMetrics.density * mCurConfig.fontScale; float size = mTextSizeTyped.getDimension(mDisplayMetrics); mPreview.setTextSize(TypedValue.COMPLEX_UNIT_PX, size); } public void onClick(View v) { try { ActivityManagerNative.getDefault().updateConfiguration(mCurConfig); } catch (RemoteException e) { } finish(); } private Spinner.OnItemSelectedListener mFontSizeChanged = new Spinner.OnItemSelectedListener() { public void onItemSelected(android.widget.AdapterView av, View v, int position, long id) { if (position == 0) { mCurConfig.fontScale = .75f; } else if (position == 2) { mCurConfig.fontScale = 1.25f; } else { mCurConfig.fontScale = 1.0f; } updateFontScale(); } public void onNothingSelected(android.widget.AdapterView av) { } }; private Spinner mFontSize; private TextView mPreview; private TypedValue mTextSizeTyped; private DisplayMetrics mDisplayMetrics; private Configuration mCurConfig = new Configuration(); }
[ "initial-contribution@android.com" ]
initial-contribution@android.com
6582024bc19fbd0c4bd7dc45ac5121f95750ac49
3144772be9d90dfc72346b6dec053730c804273d
/src/main/java/sul/protocol/java338/login/LoginSuccess.java
00bc017143b9acca82735eaefbbb02ce697ba809
[ "MIT" ]
permissive
sel-utils/java
be42f04044674afd77808ae324515358995ba854
9b9cc88dfc6e871ceb7eddb3d7c6585756fe1e07
refs/heads/master
2021-01-23T05:57:03.737951
2018-02-05T12:12:02
2018-02-05T12:12:02
86,325,412
3
1
null
2017-06-14T20:36:36
2017-03-27T11:06:07
Java
UTF-8
Java
false
false
2,065
java
/* * This file was automatically generated by sel-utils and * released under the MIT License. * * License: https://github.com/sel-project/sel-utils/blob/master/LICENSE * Repository: https://github.com/sel-project/sel-utils * Generated from https://github.com/sel-project/sel-utils/blob/master/xml/protocol/java338.xml */ package sul.protocol.java338.login; import java.nio.charset.StandardCharsets; import sul.utils.*; public class LoginSuccess extends Packet { public static final int ID = (int)2; public static final boolean CLIENTBOUND = true; public static final boolean SERVERBOUND = false; @Override public int getId() { return ID; } public String uuid; public String username; public LoginSuccess() {} public LoginSuccess(String uuid, String username) { this.uuid = uuid; this.username = username; } @Override public int length() { return Buffer.varuintLength(uuid.getBytes(StandardCharsets.UTF_8).length) + uuid.getBytes(StandardCharsets.UTF_8).length + Buffer.varuintLength(username.getBytes(StandardCharsets.UTF_8).length) + username.getBytes(StandardCharsets.UTF_8).length + 1; } @Override public byte[] encode() { this._buffer = new byte[this.length()]; this.writeVaruint(ID); byte[] dvz=uuid.getBytes(StandardCharsets.UTF_8); this.writeVaruint((int)dvz.length); this.writeBytes(dvz); byte[] dnc5bu=username.getBytes(StandardCharsets.UTF_8); this.writeVaruint((int)dnc5bu.length); this.writeBytes(dnc5bu); return this.getBuffer(); } @Override public void decode(byte[] buffer) { this._buffer = buffer; this.readVaruint(); int bvdvz=this.readVaruint(); uuid=new String(this.readBytes(bvdvz), StandardCharsets.UTF_8); int bvdnc5bu=this.readVaruint(); username=new String(this.readBytes(bvdnc5bu), StandardCharsets.UTF_8); } public static LoginSuccess fromBuffer(byte[] buffer) { LoginSuccess ret = new LoginSuccess(); ret.decode(buffer); return ret; } @Override public String toString() { return "LoginSuccess(uuid: " + this.uuid + ", username: " + this.username + ")"; } }
[ "selutils@mail.com" ]
selutils@mail.com
463c81a510c0f93c4ecab6bddfc1142b5ba51a28
16d42b3515ff0f26713ae6a0fcda62686849ef13
/app/src/main/java/com/cloudcreativity/storage/ui/buyPrice/AddProviderModel.java
0dc459003de7e6b57181ac230945f546dbf30c9f
[]
no_license
TasteBlood/lzdx_storage_app
167ae95e7d7e33aff79eb37b6fc0131c8a28cebe
abdd9153d476d128a155509c5ee442e851f0fece
refs/heads/master
2020-06-28T07:33:33.691563
2020-02-26T01:05:11
2020-02-26T01:05:11
200,177,114
0
0
null
null
null
null
UTF-8
Java
false
false
2,945
java
package com.cloudcreativity.storage.ui.buyPrice; import android.databinding.ObservableField; import android.text.TextUtils; import android.view.View; import com.cloudcreativity.storage.base.BaseActivity; import com.cloudcreativity.storage.base.BaseDialogImpl; import com.cloudcreativity.storage.base.BaseModel; import com.cloudcreativity.storage.base.BaseResult; import com.cloudcreativity.storage.databinding.ActivityProviderAddBinding; import com.cloudcreativity.storage.utils.DefaultObserver; import com.cloudcreativity.storage.utils.HttpUtils; import com.cloudcreativity.storage.utils.ToastUtils; import org.greenrobot.eventbus.EventBus; import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.schedulers.Schedulers; public class AddProviderModel extends BaseModel<BaseActivity, ActivityProviderAddBinding>{ public ObservableField<String> shopName = new ObservableField<>(); public ObservableField<String> realname = new ObservableField<>(); public ObservableField<String> address = new ObservableField<>(); public ObservableField<String> mobile = new ObservableField<>(); AddProviderModel(BaseActivity context, ActivityProviderAddBinding binding, BaseDialogImpl baseDialog) { super(context, binding, baseDialog); } @Override protected void initView() { binding.tlbAddProvider.setNavigationOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { context.finish(); } }); } @Override protected void initData() { } public void onSave(){ if(TextUtils.isEmpty(shopName.get())){ getBaseDialog().showRequestErrorMessage("商家名称不能为空"); return; } if(TextUtils.isEmpty(realname.get())){ getBaseDialog().showRequestErrorMessage("真实姓名不能为空"); return; } if(TextUtils.isEmpty(address.get())){ getBaseDialog().showRequestErrorMessage("地址不能为空"); return; } if(TextUtils.isEmpty(mobile.get())){ getBaseDialog().showRequestErrorMessage("联系方式不能为空"); return; } HttpUtils.getInstance().addProvider(shopName.get(),realname.get(), address.get(),mobile.get()) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new DefaultObserver<BaseResult>(getBaseDialog(),true) { @Override public void onSuccess(BaseResult baseResult) { EventBus.getDefault().post("refresh_provider_list"); context.finish(); } @Override public void onFail(ExceptionReason msg) { } }); } }
[ "xxw0701@sina.com" ]
xxw0701@sina.com
09d858cdd08690c6ed4a30981c1c4b4f4182bc69
443928d406ef51efd35020de050decd8151dae9b
/asn-binary-notes/src/main/java/org/v2x/vehicle/BrakeSystemStatus.java
72735140e7d121453fb59aafcfb5210066d88f49
[ "Apache-2.0" ]
permissive
zyjohn0822/asn1-uper-v2x-se
ad430889ca9f3d42f2c083810df2a5bc7b18ec22
85f9bf98a12a57a04260282a9154f1b988de8dec
refs/heads/master
2023-04-21T11:44:34.222501
2021-05-08T08:23:27
2021-05-08T08:23:27
365,459,042
2
1
null
null
null
null
UTF-8
Java
false
false
3,104
java
package org.v2x.vehicle; import org.bn.annotations.ASN1Element; import org.bn.annotations.ASN1Sequence; /** * @author zhangyong */ @ASN1Sequence(name = "BrakeSystemStatus", isSet = false) public class BrakeSystemStatus { @ASN1Element(name = "brakePadel", isOptional = true, hasTag = false, hasDefaultValue = false) private BrakePedalStatus brakePadel = null; @ASN1Element(name = "wheelBrakes", isOptional = true, hasTag = false, hasDefaultValue = false) private BrakeAppliedStatus wheelBrakes = null; @ASN1Element(name = "traction", isOptional = true, hasTag = false, hasDefaultValue = false) private TractionControlStatus traction = null; @ASN1Element(name = "abs", isOptional = true, hasTag = false, hasDefaultValue = false) private AntiLockBrakeStatus abs = null; @ASN1Element(name = "scs", isOptional = true, hasTag = false, hasDefaultValue = false) private StabilityControlStatus scs = null; @ASN1Element(name = "brakeBoost", isOptional = true, hasTag = false, hasDefaultValue = false) private BrakeBoostApplied brakeBoost = null; @ASN1Element(name = "auxBrakes", isOptional = true, hasTag = false, hasDefaultValue = false) private AuxiliaryBrakeStatus auxBrakes = null; public BrakePedalStatus getBrakePadel() { return this.brakePadel; } public void setBrakePadel(BrakePedalStatus value) { this.brakePadel = value; } public boolean isBrakePadelPresent() { return this.brakePadel != null; } public BrakeAppliedStatus getWheelBrakes() { return this.wheelBrakes; } public void setWheelBrakes(BrakeAppliedStatus value) { this.wheelBrakes = value; } public boolean isWheelBrakesPresent() { return this.wheelBrakes != null; } public TractionControlStatus getTraction() { return this.traction; } public void setTraction(TractionControlStatus value) { this.traction = value; } public boolean isTractionPresent() { return this.traction != null; } public AntiLockBrakeStatus getAbs() { return this.abs; } public void setAbs(AntiLockBrakeStatus value) { this.abs = value; } public boolean isAbsPresent() { return this.abs != null; } public StabilityControlStatus getScs() { return this.scs; } public void setScs(StabilityControlStatus value) { this.scs = value; } public boolean isScsPresent() { return this.scs != null; } public BrakeBoostApplied getBrakeBoost() { return this.brakeBoost; } public void setBrakeBoost(BrakeBoostApplied value) { this.brakeBoost = value; } public boolean isBrakeBoostPresent() { return this.brakeBoost != null; } public AuxiliaryBrakeStatus getAuxBrakes() { return this.auxBrakes; } public void setAuxBrakes(AuxiliaryBrakeStatus value) { this.auxBrakes = value; } public boolean isAuxBrakesPresent() { return this.auxBrakes != null; } }
[ "31430762+zyjohn0822@users.noreply.github.com" ]
31430762+zyjohn0822@users.noreply.github.com
ab7b4407ae83c226f6a5d5c5b517bd214349fb40
082e26b011e30dc62a62fae95f375e4f87d9e99c
/docs/weixin_7.0.4_source/反编译源码/反混淆后/src/main/java/com/tencent/p177mm/plugin/appbrand/jsapi/p317u/p320b/p902a/C45625b.java
accfa348d5403377f998944b25768ed7dec6379a
[]
no_license
xsren/AndroidReverseNotes
9631a5aabc031006e795a112b7ac756a8edd4385
9202c276fe9f04a978e4e08b08e42645d97ca94b
refs/heads/master
2021-04-07T22:50:51.072197
2019-07-16T02:24:43
2019-07-16T02:24:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
285
java
package com.tencent.p177mm.plugin.appbrand.jsapi.p317u.p320b.p902a; /* renamed from: com.tencent.mm.plugin.appbrand.jsapi.u.b.a.b */ public final class C45625b extends C10531a { private static final int CTRL_INDEX = 536; public static final String NAME = "insertXWebVideo"; }
[ "alwangsisi@163.com" ]
alwangsisi@163.com
c15e8fc81f7e38b125e6e7a8d321e6a19096056b
ad9e38079bc8500dfc7b13b6324819c84f5660fc
/aula04/exemplos/exemplos01/AppPessoa.java
c4a8534200b2e55c28ceb123c23d6f26d2a407f3
[]
no_license
EmilioGut/treinamento
c41c1582ce4255c7a2fdf6dbbe79ed2b91a31a24
c97be6165b58c571e378d54fff19a2acf77844e6
refs/heads/master
2023-04-25T11:47:55.727207
2021-05-20T20:41:40
2021-05-20T20:41:40
365,324,931
0
0
null
null
null
null
UTF-8
Java
false
false
225
java
public class AppPessoa { public static void main(String[] args) { Pessoa p1 = new Pessoa("Emerson", 49); Pessoa p2 = new Pessoa("Marcelo", 34); p1.apresentar(); p2.apresentar(); } }
[ "emerson.paduan@gmail.com" ]
emerson.paduan@gmail.com
383df0e378c78b1d2f2be6c7e337b874bdbee6ed
93f315fee18f8c97f6dad2a5d693778ca19691bf
/src/array/SumOddLengthSubarrays.java
1877b6ded1328b508a865c29ce5baa67ed7d0c74
[]
no_license
AlexhahahaDrag/arithmetic
34f8e0b135a5f747e04546f81b6365a2a7208040
92232fd1758963bc964bea0759e8f0852b3cdaa0
refs/heads/master
2023-08-31T07:13:12.184136
2023-08-22T05:56:58
2023-08-22T05:56:58
170,278,495
2
0
null
null
null
null
UTF-8
Java
false
false
1,811
java
package array; /** *description: * 5503. 所有奇数长度子数组的和 显示英文描述 * 通过的用户数0 * 尝试过的用户数0 * 用户总通过次数0 * 用户总提交次数0 * 题目难度Easy * 给你一个正整数数组 arr ,请你计算所有可能的奇数长度子数组的和。 * * 子数组 定义为原数组中的一个连续子序列。 * * 请你返回 arr 中 所有奇数长度子数组的和 。 * * * * 示例 1: * * 输入:arr = [1,4,2,5,3] * 输出:58 * 解释:所有奇数长度子数组和它们的和为: * [1] = 1 * [4] = 4 * [2] = 2 * [5] = 5 * [3] = 3 * [1,4,2] = 7 * [4,2,5] = 11 * [2,5,3] = 10 * [1,4,2,5,3] = 15 * 我们将所有值求和得到 1 + 4 + 2 + 5 + 3 + 7 + 11 + 10 + 15 = 58 * 示例 2: * * 输入:arr = [1,2] * 输出:3 * 解释:总共只有 2 个长度为奇数的子数组,[1] 和 [2]。它们的和为 3 。 * 示例 3: * * 输入:arr = [10,11,12] * 输出:66 *author: alex *createDate: 2020/9/19 22:36 *version: 1.0.0 */ public class SumOddLengthSubarrays { public int sumOddLengthSubarrays(int[] arr) { int map[] = new int[arr.length + 1]; for(int i = 0; i < arr.length; i++) { map[i + 1] += map[i] + arr[i]; } int sum = map[map.length - 1]; int len = 3; while(len < map.length) { for(int i = len; i < map.length; i++) { sum += map[i] - map[i -len]; } len += 2; } return sum; } public static void main(String[] args) { int[] arr = {1,4,2,5,3}; SumOddLengthSubarrays sumOddLengthSubarrays = new SumOddLengthSubarrays(); System.out.println(sumOddLengthSubarrays.sumOddLengthSubarrays(arr)); } }
[ "734663446@qq.com" ]
734663446@qq.com
25b72080dac379df14904874982f69b8d4fc53a0
ed5c0f718b75dfbb0fce308366d8aa8e2506b420
/work/decompile-82634944/net/minecraft/server/PacketSplitter.java
1b4d46ae16bd497bdb0853fc8af05632220efe56
[ "Apache-2.0" ]
permissive
RutgersGRID/minecraftworlds
24d92275f4e3373835f14aa1a0aa2f2dfb3862bb
ec6e6f5634cad8423c25c3e3606b9a3814600b78
refs/heads/master
2022-08-06T16:15:32.197094
2020-05-26T20:42:19
2020-05-26T20:42:19
88,202,857
1
1
Apache-2.0
2020-04-07T19:26:12
2017-04-13T20:16:27
Java
UTF-8
Java
false
false
1,450
java
package net.minecraft.server; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.ByteToMessageDecoder; import io.netty.handler.codec.CorruptedFrameException; import java.util.List; public class PacketSplitter extends ByteToMessageDecoder { public PacketSplitter() {} protected void decode(ChannelHandlerContext channelhandlercontext, ByteBuf bytebuf, List<Object> list) throws Exception { bytebuf.markReaderIndex(); byte[] abyte = new byte[3]; for (int i = 0; i < abyte.length; ++i) { if (!bytebuf.isReadable()) { bytebuf.resetReaderIndex(); return; } abyte[i] = bytebuf.readByte(); if (abyte[i] >= 0) { PacketDataSerializer packetdataserializer = new PacketDataSerializer(Unpooled.wrappedBuffer(abyte)); try { int j = packetdataserializer.g(); if (bytebuf.readableBytes() >= j) { list.add(bytebuf.readBytes(j)); return; } bytebuf.resetReaderIndex(); } finally { packetdataserializer.release(); } return; } } throw new CorruptedFrameException("length wider than 21-bit"); } }
[ "rianders@docs.rutgers.edu" ]
rianders@docs.rutgers.edu
7ee7ea33ad801026adef6e71638f11b3dad69864
ad3a61f4c350ad3371777a7d53703d9040b5059b
/app/src/main/java/com/soundcloud/android/crop/CircleHighlightView.java
5fea5a3fccffdc62dac4e8f3af83243fd766bc8c
[]
no_license
IceSeaOnly/Time
1ec83485de6a88de8f0c7510e6b75ea903d28b05
3e3e2e0990f7a445f3cdca82b25ab660d2aff064
refs/heads/master
2021-01-21T06:18:17.728347
2017-02-27T13:42:05
2017-02-27T13:42:05
83,204,539
1
0
null
null
null
null
UTF-8
Java
false
false
4,218
java
package com.soundcloud.android.crop; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Path; import android.graphics.Path.Direction; import android.graphics.Rect; import android.graphics.Region; import android.view.View; public class CircleHighlightView extends HighlightView { public CircleHighlightView(View context) { super( context); } @Override protected void draw(Canvas canvas) { canvas.save(); Path path = new Path(); outlinePaint.setStrokeWidth( outlineWidth); if(!hasFocus()) { outlinePaint.setColor( Color.BLACK); canvas.drawRect( drawRect, outlinePaint); } else { Rect viewDrawingRect = new Rect(); viewContext.getDrawingRect( viewDrawingRect); float radius = (drawRect.right - drawRect.left) / 2; path.addCircle( drawRect.left + radius, drawRect.top + radius, radius, Direction.CW); outlinePaint.setColor( highlightColor); canvas.clipPath( path, Region.Op.DIFFERENCE); canvas.drawRect( viewDrawingRect, outsidePaint); canvas.restore(); canvas.drawPath( path, outlinePaint); if(handleMode == HandleMode.Always || (handleMode == HandleMode.Changing && modifyMode == ModifyMode.Grow)) { drawHandles( canvas); } } } // Determines which edges are hit by touching at (x, y) @Override public int getHit(float x, float y) { return getHitOnCircle( x, y); } @Override void handleMotion(int edge, float dx, float dy) { Rect r = computeLayout(); if(edge == MOVE) { // Convert to image space before sending to moveBy() moveBy( dx * (cropRect.width() / r.width()), dy * (cropRect.height() / r.height())); } else { if(((GROW_LEFT_EDGE | GROW_RIGHT_EDGE) & edge) == 0) { dx = 0; } if(((GROW_TOP_EDGE | GROW_BOTTOM_EDGE) & edge) == 0) { dy = 0; } // �Ǹ�����仯���ȡ�����ο�;Ĭ�ϲο�dx if(Math.abs( dx) < Math.abs( dy)) { dx = 0.0f;// dx����Ϊ0��growBy�ͻ���dy�ο�������1:1�����dx } float xDelta = dx * (cropRect.width() / r.width()); float yDelta = dy * (cropRect.height() / r.height()); growBy( (((edge & GROW_LEFT_EDGE) != 0) ? -1 : 1) * xDelta, (((edge & GROW_TOP_EDGE) != 0) ? -1 : 1) * yDelta); } } /** * ����x,y���꣬��������Բ�Ĺ�ϵ��Բ�ϡ�Բ�ڡ�Բ�⣩ * @param x * @param y * @return */ private int getHitOnCircle(float x, float y) { Rect r = computeLayout(); int retval = GROW_NONE; final float hysteresis = 20F; int radius = (r.right - r.left) / 2; int centerX = r.left + radius; int centerY = r.top + radius; //�жϴ���λ���Ƿ���Բ�� float ret = (x - centerX) * (x - centerX) + (y - centerY) * (y - centerY); double rRadius = Math.sqrt( ret); double gap = Math.abs( rRadius - radius); if(gap <= hysteresis) {// Բ�ϡ����������Ǽ̳���HighlightView�����ƾ��ο�ģ�����������ģ�ⷵ�����������£����Ǵ�Բ�ϣ��ײ���á���Ҳ�����Զ��塣 if(x < centerX) {// left retval |= GROW_LEFT_EDGE; } else { retval |= GROW_RIGHT_EDGE; } if(y < centerY) {// up retval |= GROW_TOP_EDGE; } else { retval |= GROW_BOTTOM_EDGE; } } else if(rRadius > radius) {// outside retval = GROW_NONE; } else if(rRadius < radius) {// inside��Բ�ھ�ִ��move retval = MOVE; } return retval; } }
[ "1041414957@qq.com" ]
1041414957@qq.com
52671a2e2cd582c7837ad8e1f399407b0eb001ec
5f783378eb66481617346c3ea9aa8df20c683b0a
/src/main/java/com/netsuite/suitetalk/proxy/v2018_1/transactions/bank/CheckExpenseList.java
6ac7197c2a3256b67f8233399abb1ce19815aef1
[]
no_license
djXplosivo/suitetalk-axis-proxy
b9bd506bcb43e4254439baf3a46c7ef688c7e57f
0ffba614f117962f9de2867a0677ec8494a2605a
refs/heads/master
2020-03-28T02:49:27.612364
2018-09-06T02:36:05
2018-09-06T02:36:05
147,599,598
0
0
null
null
null
null
UTF-8
Java
false
false
4,223
java
package com.netsuite.suitetalk.proxy.v2018_1.transactions.bank; import java.io.Serializable; import java.lang.reflect.Array; import java.util.Arrays; import javax.xml.namespace.QName; import org.apache.axis.description.AttributeDesc; import org.apache.axis.description.ElementDesc; import org.apache.axis.description.TypeDesc; import org.apache.axis.encoding.Deserializer; import org.apache.axis.encoding.Serializer; import org.apache.axis.encoding.ser.BeanDeserializer; import org.apache.axis.encoding.ser.BeanSerializer; public class CheckExpenseList implements Serializable { private CheckExpense[] expense; private boolean replaceAll; private Object __equalsCalc = null; private boolean __hashCodeCalc = false; private static TypeDesc typeDesc = new TypeDesc(CheckExpenseList.class, true); public CheckExpenseList() { super(); } public CheckExpenseList(CheckExpense[] expense, boolean replaceAll) { super(); this.expense = expense; this.replaceAll = replaceAll; } public CheckExpense[] getExpense() { return this.expense; } public void setExpense(CheckExpense[] expense) { this.expense = expense; } public CheckExpense getExpense(int i) { return this.expense[i]; } public void setExpense(int i, CheckExpense _value) { this.expense[i] = _value; } public boolean isReplaceAll() { return this.replaceAll; } public void setReplaceAll(boolean replaceAll) { this.replaceAll = replaceAll; } public synchronized boolean equals(Object obj) { if (!(obj instanceof CheckExpenseList)) { return false; } else { CheckExpenseList other = (CheckExpenseList)obj; if (obj == null) { return false; } else if (this == obj) { return true; } else if (this.__equalsCalc != null) { return this.__equalsCalc == obj; } else { this.__equalsCalc = obj; boolean _equals = (this.expense == null && other.getExpense() == null || this.expense != null && Arrays.equals(this.expense, other.getExpense())) && this.replaceAll == other.isReplaceAll(); this.__equalsCalc = null; return _equals; } } } public synchronized int hashCode() { if (this.__hashCodeCalc) { return 0; } else { this.__hashCodeCalc = true; int _hashCode = 1; if (this.getExpense() != null) { for(int i = 0; i < Array.getLength(this.getExpense()); ++i) { Object obj = Array.get(this.getExpense(), i); if (obj != null && !obj.getClass().isArray()) { _hashCode += obj.hashCode(); } } } _hashCode += (this.isReplaceAll() ? Boolean.TRUE : Boolean.FALSE).hashCode(); this.__hashCodeCalc = false; return _hashCode; } } public static TypeDesc getTypeDesc() { return typeDesc; } public static Serializer getSerializer(String mechType, Class _javaType, QName _xmlType) { return new BeanSerializer(_javaType, _xmlType, typeDesc); } public static Deserializer getDeserializer(String mechType, Class _javaType, QName _xmlType) { return new BeanDeserializer(_javaType, _xmlType, typeDesc); } static { typeDesc.setXmlType(new QName("urn:bank_2018_1.transactions.webservices.netsuite.com", "CheckExpenseList")); AttributeDesc attrField = new AttributeDesc(); attrField.setFieldName("replaceAll"); attrField.setXmlName(new QName("", "replaceAll")); attrField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "boolean")); typeDesc.addFieldDesc(attrField); ElementDesc elemField = new ElementDesc(); elemField.setFieldName("expense"); elemField.setXmlName(new QName("urn:bank_2018_1.transactions.webservices.netsuite.com", "expense")); elemField.setXmlType(new QName("urn:bank_2018_1.transactions.webservices.netsuite.com", "CheckExpense")); elemField.setMinOccurs(0); elemField.setNillable(false); elemField.setMaxOccursUnbounded(true); typeDesc.addFieldDesc(elemField); } }
[ "ccolon@git.eandjmedia.com" ]
ccolon@git.eandjmedia.com
ac02b7daee574509d462021fcb9fa45d7613c1b0
d60e287543a95a20350c2caeabafbec517cabe75
/LACCPlus/Hadoop/3276_1.java
31107f4dc1aa062b4f041329712a06de66d35490
[ "MIT" ]
permissive
sgholamian/log-aware-clone-detection
242067df2db6fd056f8d917cfbc143615c558b2c
9993cb081c420413c231d1807bfff342c39aa69a
refs/heads/main
2023-07-20T09:32:19.757643
2021-08-27T15:02:50
2021-08-27T15:02:50
337,837,827
0
0
null
null
null
null
UTF-8
Java
false
false
3,820
java
//,temp,RpcProgramNfs3.java,1331,1425,temp,RpcProgramNfs3.java,406,481 //,3 public class xxx { @VisibleForTesting RENAME3Response rename(XDR xdr, SecurityHandler securityHandler, SocketAddress remoteAddress) { RENAME3Response response = new RENAME3Response(Nfs3Status.NFS3_OK); RENAME3Request request = null; try { request = RENAME3Request.deserialize(xdr); } catch (IOException e) { LOG.error("Invalid RENAME request"); return new RENAME3Response(Nfs3Status.NFS3ERR_INVAL); } FileHandle fromHandle = request.getFromDirHandle(); int fromNamenodeId = fromHandle.getNamenodeId(); String fromName = request.getFromName(); FileHandle toHandle = request.getToDirHandle(); int toNamenodeId = toHandle.getNamenodeId(); String toName = request.getToName(); if (LOG.isDebugEnabled()) { LOG.debug("NFS RENAME from: {}/{} to: {}/{} client: {}", fromHandle.dumpFileHandle(), fromName, toHandle.dumpFileHandle(), toName, remoteAddress); } DFSClient dfsClient = clientCache.getDfsClient(securityHandler.getUser(), fromNamenodeId); if (dfsClient == null) { response.setStatus(Nfs3Status.NFS3ERR_SERVERFAULT); return response; } if (fromNamenodeId != toNamenodeId) { // renaming file from one namenode to another is not supported response.setStatus(Nfs3Status.NFS3ERR_INVAL); return response; } String fromDirFileIdPath = Nfs3Utils.getFileIdPath(fromHandle); String toDirFileIdPath = Nfs3Utils.getFileIdPath(toHandle); Nfs3FileAttributes fromPreOpAttr = null; Nfs3FileAttributes toPreOpAttr = null; WccData fromDirWcc = null; WccData toDirWcc = null; try { fromPreOpAttr = Nfs3Utils.getFileAttr(dfsClient, fromDirFileIdPath, iug); if (fromPreOpAttr == null) { LOG.info("Can't get path for fromHandle fileId: {}", fromHandle.getFileId()); return new RENAME3Response(Nfs3Status.NFS3ERR_STALE); } toPreOpAttr = Nfs3Utils.getFileAttr(dfsClient, toDirFileIdPath, iug); if (toPreOpAttr == null) { LOG.info("Can't get path for toHandle fileId: {}", toHandle.getFileId()); return new RENAME3Response(Nfs3Status.NFS3ERR_STALE); } if (!checkAccessPrivilege(remoteAddress, AccessPrivilege.READ_WRITE)) { WccData fromWcc = new WccData(Nfs3Utils.getWccAttr(fromPreOpAttr), fromPreOpAttr); WccData toWcc = new WccData(Nfs3Utils.getWccAttr(toPreOpAttr), toPreOpAttr); return new RENAME3Response(Nfs3Status.NFS3ERR_ACCES, fromWcc, toWcc); } String src = fromDirFileIdPath + "/" + fromName; String dst = toDirFileIdPath + "/" + toName; dfsClient.rename(src, dst, Options.Rename.NONE); // Assemble the reply fromDirWcc = Nfs3Utils.createWccData(Nfs3Utils.getWccAttr(fromPreOpAttr), dfsClient, fromDirFileIdPath, iug); toDirWcc = Nfs3Utils.createWccData(Nfs3Utils.getWccAttr(toPreOpAttr), dfsClient, toDirFileIdPath, iug); return new RENAME3Response(Nfs3Status.NFS3_OK, fromDirWcc, toDirWcc); } catch (IOException e) { LOG.warn("Exception", e); // Try to return correct WccData try { fromDirWcc = Nfs3Utils.createWccData( Nfs3Utils.getWccAttr(fromPreOpAttr), dfsClient, fromDirFileIdPath, iug); toDirWcc = Nfs3Utils.createWccData(Nfs3Utils.getWccAttr(toPreOpAttr), dfsClient, toDirFileIdPath, iug); } catch (IOException e1) { LOG.info("Can't get postOpDirAttr for {} or {}", fromDirFileIdPath, toDirFileIdPath, e1); } int status = mapErrorStatus(e); return new RENAME3Response(status, fromDirWcc, toDirWcc); } } };
[ "sgholami@uwaterloo.ca" ]
sgholami@uwaterloo.ca
b2d0f425b5726350892d36c1704594507b533613
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/MATH-40b-3-23-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/apache/commons/math/analysis/solvers/BracketingNthOrderBrentSolver_ESTest_scaffolding.java
4eb60a7e3c5c248635c3a06838b4bedadb8f3d3a
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
4,557
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Tue Jan 21 21:56:44 UTC 2020 */ package org.apache.commons.math.analysis.solvers; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import static org.evosuite.shaded.org.mockito.Mockito.*; @EvoSuiteClassExclude public class BracketingNthOrderBrentSolver_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.math.analysis.solvers.BracketingNthOrderBrentSolver"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.Runtime.getInstance().resetRuntime(); try { initMocksToAvoidTimeoutsInTheTests(); } catch(ClassNotFoundException e) {} } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(BracketingNthOrderBrentSolver_ESTest_scaffolding.class.getClassLoader() , "org.apache.commons.math.exception.MathIllegalStateException", "org.apache.commons.math.analysis.solvers.BracketingNthOrderBrentSolver", "org.apache.commons.math.exception.NumberIsTooSmallException", "org.apache.commons.math.util.Incrementor", "org.apache.commons.math.exception.NullArgumentException", "org.apache.commons.math.exception.util.ExceptionContext", "org.apache.commons.math.analysis.solvers.UnivariateRealSolverUtils", "org.apache.commons.math.util.Incrementor$MaxCountExceededCallback", "org.apache.commons.math.util.FastMath", "org.apache.commons.math.util.MathUtils", "org.apache.commons.math.analysis.UnivariateFunction", "org.apache.commons.math.analysis.solvers.AllowedSolution", "org.apache.commons.math.analysis.solvers.UnivariateRealSolver", "org.apache.commons.math.exception.NotStrictlyPositiveException", "org.apache.commons.math.exception.NumberIsTooLargeException", "org.apache.commons.math.exception.NotFiniteNumberException", "org.apache.commons.math.exception.MathInternalError", "org.apache.commons.math.analysis.solvers.BaseUnivariateRealSolver", "org.apache.commons.math.exception.TooManyEvaluationsException", "org.apache.commons.math.util.Precision", "org.apache.commons.math.exception.util.Localizable", "org.apache.commons.math.exception.MathIllegalArgumentException", "org.apache.commons.math.util.Incrementor$1", "org.apache.commons.math.analysis.solvers.AbstractUnivariateRealSolver", "org.apache.commons.math.exception.MaxCountExceededException", "org.apache.commons.math.analysis.solvers.BaseAbstractUnivariateRealSolver", "org.apache.commons.math.exception.MathArithmeticException", "org.apache.commons.math.exception.util.LocalizedFormats", "org.apache.commons.math.exception.MathIllegalNumberException", "org.apache.commons.math.analysis.solvers.BracketedUnivariateRealSolver", "org.apache.commons.math.exception.util.ExceptionContextProvider", "org.apache.commons.math.exception.NoBracketingException", "org.apache.commons.math.exception.util.ArgUtils" ); } private static void initMocksToAvoidTimeoutsInTheTests() throws ClassNotFoundException { mock(Class.forName("org.apache.commons.math.analysis.UnivariateFunction", false, BracketingNthOrderBrentSolver_ESTest_scaffolding.class.getClassLoader())); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
55b44ca2de919962e9ad7920d28f486297ed4a7b
a5d01febfd8d45a61f815b6f5ed447e25fad4959
/Source Code/5.27.0/sources/com/iqoption/util/aj.java
0a5b00975b2f06c579a85c1759e7f1bfa368b888
[]
no_license
kkagill/Decompiler-IQ-Option
7fe5911f90ed2490687f5d216cb2940f07b57194
c2a9dbbe79a959aa1ab8bb7a89c735e8f9dbc5a6
refs/heads/master
2020-09-14T20:44:49.115289
2019-11-04T06:58:55
2019-11-04T06:58:55
223,236,327
1
0
null
2019-11-21T18:17:17
2019-11-21T18:17:16
null
UTF-8
Java
false
false
1,946
java
package com.iqoption.util; import android.content.Context; import android.content.Intent; import android.net.Uri; import android.os.Looper; import android.os.Process; import android.text.TextUtils; import com.iqoption.app.d; import java.util.UUID; /* compiled from: SystemUtils */ public class aj { private static final String TAG = "com.iqoption.util.aj"; static String fu(int i) { return i <= 160 ? "mdpi" : i <= 240 ? "hdpi" : i <= 320 ? "xhdpi" : i <= 480 ? "xxhdpi" : "xxxhdpi"; } public static String bl(Context context) { return fu(context.getResources().getDisplayMetrics().densityDpi); } public static String bO(Context context) { String deviceId = d.aP(context).getDeviceId(); if (!TextUtils.isEmpty(deviceId)) { return deviceId; } deviceId = UUID.randomUUID().toString(); d.aP(context).dP(deviceId); return deviceId; } public static boolean anH() { return Looper.getMainLooper().equals(Looper.myLooper()); } public static void bm(Context context) { if (context != null) { Intent intent = new Intent(); intent.setAction("android.settings.APPLICATION_DETAILS_SETTINGS"); intent.addCategory("android.intent.category.DEFAULT"); intent.setData(Uri.fromParts("package", context.getPackageName(), null)); intent.addFlags(268435456); intent.addFlags(1073741824); intent.addFlags(8388608); context.startActivity(intent); } } public static void aWY() { Process.killProcess(Process.myPid()); } public static String jQ(String str) { if (str.endsWith("/")) { return str; } StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(str); stringBuilder.append('/'); return stringBuilder.toString(); } }
[ "yihsun1992@gmail.com" ]
yihsun1992@gmail.com
3a537f149d812f8e07b903375683cd78e5d360ff
0fff4cd12b37d085c2b9be3a1ccd24a81f61b042
/src/main/java/lehjr/numina/client/gui/clickable/AbstractIconButton.java
b3adc2bfe95222dc3d2ff07edfa48de9c871330e
[ "BSD-2-Clause" ]
permissive
lehjr/MachineMusePowersuits
673e0c9ab40ff5fa220813b0c78aa99ad54cb794
082834036cf665a5ccdf5fe34c9e59937dce612b
refs/heads/1.19.2
2023-09-01T08:03:35.603524
2023-08-29T10:54:11
2023-08-29T10:54:11
323,434,512
11
9
NOASSERTION
2023-08-20T23:34:57
2020-12-21T19:54:53
Java
UTF-8
Java
false
false
724
java
package lehjr.numina.client.gui.clickable; import lehjr.numina.client.gui.GuiIcon; import lehjr.numina.client.gui.geometry.MusePoint2D; public abstract class AbstractIconButton extends Clickable { GuiIcon.DrawableGuiIcon icon; public AbstractIconButton(GuiIcon.DrawableGuiIcon icon, double width, double height, double leftPos, double topPos) { this(icon, new MusePoint2D(width, height), new MusePoint2D(leftPos, topPos)); } public AbstractIconButton(GuiIcon.DrawableGuiIcon icon, MusePoint2D wh, MusePoint2D ul) { super(ul, wh); this.icon = icon; super.setWH(wh); super.setUL(ul); } public GuiIcon.DrawableGuiIcon getIcon() { return icon; } }
[ "lehjr1@gmail.com" ]
lehjr1@gmail.com
5c5b04a33886ddbaf2779317aec4878c7718bb79
ea7f3017e537d7f8c06d8308e13a53f1d67a488d
/nanoverse/runtime/io/FileSystemInputManager.java
d51b46488e22ff89e16f1fe0c186ed80c686d800
[]
no_license
avaneeshnarla/Nanoverse-Source
fc87600af07b586e382fff4703c20378abbd7171
2f8585256bb2e09396a2baf3ec933cb7338a933f
refs/heads/master
2020-05-25T23:25:42.321611
2017-02-16T18:16:31
2017-02-16T18:16:31
61,486,158
0
0
null
null
null
null
UTF-8
Java
false
false
2,180
java
/* * Nanoverse: a declarative agent-based modeling language for natural and * social science. * * Copyright (c) 2015 David Bruce Borenstein and Nanoverse, LLC. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/> */ package nanoverse.runtime.io; import nanoverse.runtime.control.GeneralParameters; import nanoverse.runtime.io.deserialize.*; import nanoverse.runtime.io.serialize.binary.BinaryOutputHandle; import java.io.*; /** * Created by dbborens on 10/24/2015. */ public class FileSystemInputManager { private final GeneralParameters p; private final DiskInputManager manager; public FileSystemInputManager(GeneralParameters p) { this.p = p; manager = new DiskInputManager(); } public FileSystemInputManager(GeneralParameters p, DiskInputManager manager) { this.p = p; this.manager = manager; } public BinaryInputHandle readProjectBinaryFile(String filename) { String path = p.getPath(); return manager.doMakeBinaryReader(path, filename); } public BinaryInputHandle readInstanceBinaryFile(String filename) { String path = p.getInstancePath(); return manager.doMakeBinaryReader(path, filename); } public TextInputHandle readProjectTextFile(String filename) { String path = p.getPath(); return manager.doMakeTextReader(path, filename); } public TextInputHandle readInstanceTextFile(String filename) { String path = p.getInstancePath(); return manager.doMakeTextReader(path, filename); } }
[ "avaneesh.narla@gmail.com" ]
avaneesh.narla@gmail.com
53a1cf2b3efeb793fa32abb4a50b7e86af15f74e
dff5f6a9677345fb8d00c4d77958e36db0ceed8b
/vjkit/src/test/java/com/vip/vjtools/vjkit/collection/ListUtilTest.java
9d28620a8f5eaa16df49b153735d25eb53d37eef
[ "Apache-2.0" ]
permissive
imTovin/vjtools
e2633cce46bacc5c7cdd15a86ff037acfbc5d46c
0088a21dd69d2deea245b157729d4b23e8a3ca97
refs/heads/master
2020-03-25T01:28:11.202833
2018-08-01T03:04:26
2018-08-01T03:04:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,587
java
package com.vip.vjtools.vjkit.collection; import static org.assertj.core.api.Assertions.*; import java.util.List; import java.util.Random; import org.junit.Test; import com.google.common.collect.Ordering; public class ListUtilTest { @Test public void guavaBuildList() { List<String> list1 = ListUtil.newArrayList(); List<String> list2 = ListUtil.newArrayList("a", "b"); assertThat(list2).hasSize(2).containsExactly("a", "b"); List<String> list3 = ListUtil.newArrayList(SetUtil.newHashSet("a", "b")); assertThat(list2).hasSize(2).containsExactly("a", "b"); List<String> list4 = ListUtil.newArrayListWithCapacity(10); List<String> list5 = ListUtil.newCopyOnWriteArrayList(); List<String> list6 = ListUtil.newCopyOnWriteArrayList("a", "b"); assertThat(list6).hasSize(2).containsExactly("a", "b"); List<String> list7 = ListUtil.newLinkedList(); } @Test public void jdkBuild() { List<String> list1 = ListUtil.emptyList(); assertThat(list1).hasSize(0); List<String> list2 = ListUtil.emptyListIfNull(null); assertThat(list2).isNotNull().hasSize(0); List<String> list3 = ListUtil.emptyListIfNull(list1); assertThat(list3).isSameAs(list1); try { list1.add("a"); fail("should fail before"); } catch (Throwable t) { assertThat(t).isInstanceOf(UnsupportedOperationException.class); } List<String> list4 = ListUtil.singletonList("1"); assertThat(list4).hasSize(1).contains("1"); try { list4.add("a"); fail("should fail before"); } catch (Throwable t) { assertThat(t).isInstanceOf(UnsupportedOperationException.class); } List<String> list5 = ListUtil.newArrayList(); List<String> list6 = ListUtil.unmodifiableList(list5); try { list6.add("a"); fail("should fail before"); } catch (Throwable t) { assertThat(t).isInstanceOf(UnsupportedOperationException.class); } List<String> list7 = ListUtil.synchronizedList(list6); } @Test public void general() { List<String> list1 = ListUtil.newArrayList(); List<String> list2 = ListUtil.newArrayList("a", "b", "c"); List<String> list3 = ListUtil.newArrayList("a"); assertThat(ListUtil.isEmpty(list1)).isTrue(); assertThat(ListUtil.isEmpty(null)).isTrue(); assertThat(ListUtil.isEmpty(list2)).isFalse(); assertThat(ListUtil.isNotEmpty(list1)).isFalse(); assertThat(ListUtil.isNotEmpty(null)).isFalse(); assertThat(ListUtil.isNotEmpty(list2)).isTrue(); assertThat(ListUtil.getFirst(list2)).isEqualTo("a"); assertThat(ListUtil.getLast(list2)).isEqualTo("c"); assertThat(ListUtil.getFirst(list3)).isEqualTo("a"); assertThat(ListUtil.getLast(list3)).isEqualTo("a"); assertThat(ListUtil.getFirst(list1)).isNull(); assertThat((List<String>)ListUtil.getFirst(null)).isNull(); } @Test public void sortAndSearch() { List<String> list = ListUtil.newArrayList("d", "a", "c", "b", "e", "i", "g"); ListUtil.sort(list); assertThat(list).hasSize(7).containsExactly("a", "b", "c", "d", "e", "g", "i"); ListUtil.shuffle(list); ListUtil.shuffle(list, new Random()); System.out.println("shuffle list:" + list); ListUtil.sort(list, Ordering.natural()); assertThat(list).hasSize(7).containsExactly("a", "b", "c", "d", "e", "g", "i"); assertThat(ListUtil.binarySearch(list, "b")).isEqualTo(1); assertThat(ListUtil.binarySearch(list, "b", Ordering.natural())).isEqualTo(1); assertThat(ListUtil.binarySearch(list, "x")).isEqualTo(-8); // reverse List list8 = ListUtil.reverse(list); assertThat(list8).hasSize(7).containsExactly("i", "g", "e", "d", "c", "b", "a"); // sortReverse ListUtil.shuffle(list8); ListUtil.sortReverse(list8); assertThat(list8).hasSize(7).containsExactly("i", "g", "e", "d", "c", "b", "a"); ListUtil.shuffle(list8); ListUtil.sortReverse(list8, Ordering.natural()); assertThat(list8).hasSize(7).containsExactly("i", "g", "e", "d", "c", "b", "a"); } @Test public void collectionCalc() { List<String> list1 = ListUtil.newArrayList("1", "2", "3", "6", "6"); List<String> list2 = ListUtil.newArrayList("4", "5", "6", "7", "6", "6"); List<String> result = ListUtil.union(list1, list2); assertThat(result).containsExactly("1", "2", "3", "6", "6", "4", "5", "6", "7", "6", "6"); List<String> result2 = ListUtil.intersection(list1, list2); assertThat(result2).containsExactly("6", "6"); List<String> result3 = ListUtil.difference(list2, list1); assertThat(result3).containsExactly("4", "5", "7", "6"); List<String> result4 = ListUtil.disjoint(list1, list2); assertThat(result4).containsExactly("1", "2", "3", "4", "5", "7", "6"); } }
[ "calvin.xiao@vipshop.com" ]
calvin.xiao@vipshop.com
467f35f7da4c26a6b0973c59ecd3e35483294b37
28ae21bb9987bc4f04b9193c7193f0a54a067a0a
/baremaps-blob/src/main/java/com/baremaps/blob/CompositeBlobStore.java
2a12136df559bd96f33c735c457aa112c2a60c71
[ "Apache-2.0" ]
permissive
algoroq/baremaps
2200ad7c6207cc413a39439c6e7989552038a5b7
a8e4785aa6dab807e49a9fbeefede3550d42d4f2
refs/heads/main
2023-07-10T23:57:27.202438
2021-07-30T10:58:10
2021-07-30T10:58:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,318
java
/* * Copyright (C) 2020 The Baremaps 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 com.baremaps.blob; import java.net.URI; import java.util.HashMap; import java.util.Map; public class CompositeBlobStore implements BlobStore { public static final String UNSUPPORTED_SCHEME = "Unsupported scheme: %s"; private final Map<String, BlobStore> schemes; public CompositeBlobStore() { schemes = new HashMap<>(); schemes.put(null, new FileBlobStore()); schemes.put("file", new FileBlobStore()); schemes.put("res", new ResourceBlobStore()); } public void addScheme(String scheme, BlobStore blobStore) { schemes.put(scheme, blobStore); } @Override public Blob head(URI uri) throws BlobStoreException { if (schemes.containsKey(uri.getScheme())) { return schemes.get(uri.getScheme()).head(uri); } else { throw new BlobStoreException(String.format(UNSUPPORTED_SCHEME, uri.getScheme())); } } @Override public Blob get(URI uri) throws BlobStoreException { if (schemes.containsKey(uri.getScheme())) { return schemes.get(uri.getScheme()).get(uri); } else { throw new BlobStoreException(String.format(UNSUPPORTED_SCHEME, uri.getScheme())); } } @Override public void put(URI uri, Blob blob) throws BlobStoreException { if (schemes.containsKey(uri.getScheme())) { schemes.get(uri.getScheme()).put(uri, blob); } else { throw new BlobStoreException(String.format(UNSUPPORTED_SCHEME, uri.getScheme())); } } @Override public void delete(URI uri) throws BlobStoreException { if (schemes.containsKey(uri.getScheme())) { schemes.get(uri.getScheme()).delete(uri); } else { throw new BlobStoreException(String.format(UNSUPPORTED_SCHEME, uri.getScheme())); } } }
[ "bchapuis@gmail.com" ]
bchapuis@gmail.com
0e94a64c1c5afa42fd49dd089ad243beaf6db5f1
be815aacbd7b06ac0ce3f412831639aa0297b988
/cloud-pipeline-common/model/src/test/java/com/epam/pipeline/entity/model/ModelParametersSerializationAndDeserializationTest.java
97478435617930a48e7683c4c5266ad3579df1b8
[ "Apache-2.0" ]
permissive
epam/cloud-pipeline
8a861dae60d0f86089ff55e2f278e8593fc5e112
570dd898e96de931b96e584c86e72296b0e40607
refs/heads/develop
2023-08-30T08:03:18.672866
2023-08-29T17:07:13
2023-08-29T17:07:13
174,065,041
155
73
Apache-2.0
2023-09-14T13:36:36
2019-03-06T03:34:40
Java
UTF-8
Java
false
false
6,123
java
/* * Copyright 2017-2019 EPAM Systems, Inc. (https://www.epam.com/) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.epam.pipeline.entity.model; import com.epam.pipeline.config.JsonMapper; import com.fasterxml.jackson.core.type.TypeReference; import org.apache.commons.io.FileUtils; import org.junit.BeforeClass; import org.junit.Test; import java.io.IOException; import java.nio.charset.Charset; import java.nio.file.Files; import java.nio.file.Path; import java.util.Collections; import static org.hamcrest.CoreMatchers.instanceOf; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; public class ModelParametersSerializationAndDeserializationTest { private static final String MODEL_PARAMETERS_JSON = "{" + "\"type\": \"MODEL\"," + "\"inputs\": [{" + "\"name\": \"input_name\"," + "\"type\": \"input_type\"" + "}]," + "\"outputColumn\": \"output_column\"," + "\"values\": [{" + "\"name\": \"value_name\"," + "\"type\": \"value_type\"" + "}]" + "}"; private static final String PROTOCOL_PARAMETERS_JSON = "{" + "\"type\": \"PROTOCOL\"," + "\"inputs\": [{" + "\"name\": \"input_name\"," + "\"type\": \"input_type\"" + "}]," + "\"outputs\": [{" + "\"name\": \"output_name\"," + "\"type\": \"output_type\"" + "}]" + "}"; private static final RModelStepParameters MODEL_PARAMETERS = new RModelStepParameters(); private static final ProtocolStepParameters PROTOCOL_PARAMETERS = new ProtocolStepParameters(); static { MODEL_PARAMETERS.setType(ModelStepType.MODEL); MODEL_PARAMETERS.setInputs(Collections.singletonList( InputParameter.builder().name("input_name").type("input_type").build() )); MODEL_PARAMETERS.setOutputs(Collections.singletonList( ConfValue.builder().name("output_name").type("output_type").build() )); MODEL_PARAMETERS.setOutputColumn("output_column"); MODEL_PARAMETERS.setValues(Collections.singletonList( ConfValue.builder().name("value_name").type("value_type").build() )); PROTOCOL_PARAMETERS.setType(ModelStepType.PROTOCOL); PROTOCOL_PARAMETERS.setInputs(Collections.singletonList( InputParameter.builder().name("input_name").type("input_type").build() )); PROTOCOL_PARAMETERS.setOutputs(Collections.singletonList( ConfValue.builder().name("output_name").type("output_type").build() )); } @BeforeClass public static void setUp() { new JsonMapper().init(); } @Test public void deserializationShouldWorkForModelParametersClass() { final AbstractStepParameters deserializedModelParameters = JsonMapper.parseData(MODEL_PARAMETERS_JSON, new TypeReference<AbstractStepParameters>() {}); assertThat(deserializedModelParameters, instanceOf(RModelStepParameters.class)); assertThat(deserializedModelParameters, is(MODEL_PARAMETERS)); } @Test public void serializationShouldWorkForModelParametersClass() throws IOException { final Path tempFile = Files.createTempFile("modelParametersSerialization", "test"); try { JsonMapper.writeData(MODEL_PARAMETERS, tempFile.toFile()); final String serializedModelParameters = FileUtils.readFileToString(tempFile.toFile(), Charset.defaultCharset()); final AbstractStepParameters deserializedModelParameters = JsonMapper.parseData(serializedModelParameters, new TypeReference<AbstractStepParameters>() {}); assertThat(deserializedModelParameters, instanceOf(RModelStepParameters.class)); assertThat(deserializedModelParameters, is(MODEL_PARAMETERS)); } finally { Files.delete(tempFile); } } @Test public void deserializationShouldWorkForProtocolParametersClass() { final AbstractStepParameters deserializedModelParameters = JsonMapper.parseData(PROTOCOL_PARAMETERS_JSON, new TypeReference<AbstractStepParameters>() {}); assertThat(deserializedModelParameters, instanceOf(ProtocolStepParameters.class)); assertThat(deserializedModelParameters, is(PROTOCOL_PARAMETERS)); } @Test public void serializationShouldWorkForProtocolParametersClass() throws IOException { final Path tempFile = Files.createTempFile("protocolParametersSerialization", "test"); try { JsonMapper.writeData(PROTOCOL_PARAMETERS, tempFile.toFile()); final String serializedModelParameters = FileUtils.readFileToString(tempFile.toFile(), Charset.defaultCharset()); final AbstractStepParameters deserializedModelParameters = JsonMapper.parseData(serializedModelParameters, new TypeReference<AbstractStepParameters>() {}); assertThat(deserializedModelParameters, instanceOf(ProtocolStepParameters.class)); assertThat(deserializedModelParameters, is(PROTOCOL_PARAMETERS)); } finally { Files.delete(tempFile); } } }
[ "aleksandr_sidoruk@epam.com" ]
aleksandr_sidoruk@epam.com
fa5aedd4101731ec5753b2b3bdeaf36f25a91f83
30fdd7a2a8fd73a6a5b6f0b2afd8dfda0129c331
/jOOQ/src/main/java/org/jooq/impl/RowSubqueryCondition.java
c7184fe1887ab8845f2f1db1aec55151ee1fb600
[ "Apache-2.0" ]
permissive
kimchoyoung/jOOQ
7e709c0be2c85cb230772bdfe1c5e584e3fc6957
c9ac008f96df43434e25deae22e2f5b555457847
refs/heads/master
2021-04-18T11:00:27.734713
2018-06-04T08:39:11
2018-06-04T08:39:11
126,759,304
0
0
null
2018-04-09T14:33:38
2018-03-26T01:53:18
Java
UTF-8
Java
false
false
7,679
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Other licenses: * ----------------------------------------------------------------------------- * Commercial licenses for this work are available. These replace the above * ASL 2.0 and offer limited warranties, support, maintenance, and commercial * database integrations. * * For more information, please visit: http://www.jooq.org/licenses * * * * * * * * * * * * * * * * */ package org.jooq.impl; import static org.jooq.Clause.CONDITION; import static org.jooq.Clause.CONDITION_COMPARISON; import static org.jooq.Comparator.EQUALS; import static org.jooq.Comparator.IN; import static org.jooq.Comparator.NOT_EQUALS; import static org.jooq.Comparator.NOT_IN; import static org.jooq.SQLDialect.H2; import static org.jooq.SQLDialect.HSQLDB; import static org.jooq.SQLDialect.MARIADB; import static org.jooq.SQLDialect.MYSQL; // ... import static org.jooq.SQLDialect.POSTGRES; // ... import static org.jooq.impl.DSL.exists; import static org.jooq.impl.DSL.field; import static org.jooq.impl.DSL.name; import static org.jooq.impl.DSL.notExists; import static org.jooq.impl.DSL.row; import static org.jooq.impl.DSL.select; import static org.jooq.impl.Tools.EMPTY_STRING; import static org.jooq.impl.Tools.DataKey.DATA_ROW_VALUE_EXPRESSION_PREDICATE_SUBQUERY; import java.util.ArrayList; import java.util.EnumSet; import java.util.List; import org.jooq.Clause; import org.jooq.Comparator; import org.jooq.Condition; import org.jooq.Configuration; import org.jooq.Context; import org.jooq.Field; import org.jooq.QuantifiedSelect; import org.jooq.QueryPartInternal; import org.jooq.Record; import org.jooq.RenderContext; import org.jooq.Row; import org.jooq.RowN; import org.jooq.SQLDialect; import org.jooq.Select; /** * @author Lukas Eder */ final class RowSubqueryCondition extends AbstractCondition { /** * Generated UID */ private static final long serialVersionUID = -1806139685201770706L; private static final Clause[] CLAUSES = { CONDITION, CONDITION_COMPARISON }; private static final EnumSet<SQLDialect> SUPPORT_NATIVE = EnumSet.of(H2, HSQLDB, MARIADB, MYSQL, POSTGRES); private final Row left; private final Select<?> right; private final QuantifiedSelect<?> rightQuantified; private final Comparator comparator; RowSubqueryCondition(Row left, Select<?> right, Comparator comparator) { this.left = left; this.right = right; this.rightQuantified = null; this.comparator = comparator; } RowSubqueryCondition(Row left, QuantifiedSelect<?> right, Comparator comparator) { this.left = left; this.right = null; this.rightQuantified = right; this.comparator = comparator; } @Override public final void accept(Context<?> ctx) { ctx.visit(delegate(ctx)); } @Override public final Clause[] clauses(Context<?> ctx) { return null; } private final QueryPartInternal delegate(Context<?> ctx) { final Configuration configuration = ctx.configuration(); final RenderContext render = ctx instanceof RenderContext ? (RenderContext) ctx : null; SQLDialect family = configuration.dialect().family(); // [#3505] TODO: Emulate this where it is not supported if (rightQuantified != null) { return new Native(); } // [#2395] These dialects have full native support for comparison // predicates with row value expressions and subqueries: else if (SUPPORT_NATIVE.contains(family)) { return new Native(); } // [#2395] All other configurations have to be emulated else { String table = render == null ? "t" : render.nextAlias(); List<String> names = new ArrayList<String>(); for (int i = 0; i < left.size(); i++) names.add(table + "_" + i); Field<?>[] fields = new Field[names.size()]; for (int i = 0; i < fields.length; i++) fields[i] = field(name(table, names.get(i))); Condition condition; switch (comparator) { case GREATER: condition = ((RowN) left).gt(row(fields)); break; case GREATER_OR_EQUAL: condition = ((RowN) left).ge(row(fields)); break; case LESS: condition = ((RowN) left).lt(row(fields)); break; case LESS_OR_EQUAL: condition = ((RowN) left).le(row(fields)); break; case IN: case EQUALS: case NOT_IN: case NOT_EQUALS: default: condition = ((RowN) left).eq(row(fields)); break; } Select<Record> subselect = select().from(right.asTable(table, names.toArray(EMPTY_STRING))) .where(condition); switch (comparator) { case NOT_IN: case NOT_EQUALS: return (QueryPartInternal) notExists(subselect); default: return (QueryPartInternal) exists(subselect); } } } private class Native extends AbstractCondition { /** * Generated UID */ private static final long serialVersionUID = -1552476981094856727L; @Override public final void accept(Context<?> ctx) { ctx.visit(left) .sql(' ') .visit(comparator.toKeyword()) .sql(' '); if (rightQuantified == null) { // Some databases need extra parentheses around the RHS boolean extraParentheses = false ; ctx.sql(extraParentheses ? "((" : "("); ctx.data(DATA_ROW_VALUE_EXPRESSION_PREDICATE_SUBQUERY, true); ctx.subquery(true) .formatIndentStart() .formatNewLine() .visit(right) .formatIndentEnd() .formatNewLine() .subquery(false); ctx.data(DATA_ROW_VALUE_EXPRESSION_PREDICATE_SUBQUERY, null); ctx.sql(extraParentheses ? "))" : ")"); } // [#2054] Quantified row value expression comparison predicates shouldn't have parentheses before ANY or ALL else { ctx.data(DATA_ROW_VALUE_EXPRESSION_PREDICATE_SUBQUERY, true); ctx.subquery(true) .visit(rightQuantified) .subquery(false); ctx.data(DATA_ROW_VALUE_EXPRESSION_PREDICATE_SUBQUERY, null); } } @Override public final Clause[] clauses(Context<?> ctx) { return CLAUSES; } } }
[ "lukas.eder@gmail.com" ]
lukas.eder@gmail.com
f1e09566090e2c8f9542659857265f05daad3d88
509d496f1d4a37d1b56693d19cf96c528938baaa
/src/argouml-app/src/org/argouml/uml/ui/behavior/common_behavior/PropPanelReturnAction.java
0512d54bdb44e2c583901b4c92dbf0b44cf27d02
[ "LicenseRef-scancode-other-permissive", "BSD-3-Clause" ]
permissive
SofienBoutaib/argouml
bb65203a680b6d2c977c0bb96637914fd30584b1
71809598cfc3793b14809c51c975ac305e9bea6a
refs/heads/master
2022-06-20T21:36:50.184555
2011-11-01T17:43:21
2011-11-01T17:43:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,778
java
/* $Id: PropPanelReturnAction.java 18591 2010-07-29 00:36:56Z bobtarling $ ***************************************************************************** * Copyright (c) 2009 Contributors - see below * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * tfmorris ***************************************************************************** * * Some portions of this file was previously release using the BSD License: */ // Copyright (c) 1996-2007 The Regents of the University of California. All // Rights Reserved. Permission to use, copy, modify, and distribute this // software and its documentation without fee, and without a written // agreement is hereby granted, provided that the above copyright notice // and this paragraph appear in all copies. This software program and // documentation are copyrighted by The Regents of the University of // California. The software program and documentation are supplied "AS // IS", without any accompanying services from The Regents. The Regents // does not warrant that the operation of the program will be // uninterrupted or error-free. The end-user understands that the program // was developed for research purposes and is advised not to rely // exclusively on the program for any reason. IN NO EVENT SHALL THE // UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, // SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, // ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF // THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE // PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF // CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, // UPDATES, ENHANCEMENTS, OR MODIFICATIONS. package org.argouml.uml.ui.behavior.common_behavior; /** * The properties panel for a ReturnAction. * <p> * TODO: this property panel needs refactoring to remove dependency on * old gui components. * @deprecated in 0.31.2 by Bob Tarling This is replaced by the XML property * panels module */ @Deprecated public class PropPanelReturnAction extends PropPanelAction { /** * The constructor. * */ public PropPanelReturnAction() { super("label.return-action", lookupIcon("ReturnAction")); } }
[ "email@cs-ware.de" ]
email@cs-ware.de
c8fbe3cb28f2bc9fb9567f88ab9a1ce2ee5ac00b
af58eabf5360cb82082e1b0590696b627118d5a3
/marketing-data/src/main/java/com/zhongmei/yunfu/bean/req/CustomerCouponResp.java
bcb933d1a5a2d80b83304ae8153bb52e3b70dbb5
[]
no_license
sengeiou/marketing-app
f4b670f3996ba190decd2f1b8e4a276eb53b8b2a
278f3da95584e2ab7d97dff1a067db848e70a9f3
refs/heads/master
2020-06-07T01:51:25.743676
2019-06-20T08:58:28
2019-06-20T08:58:28
192,895,799
0
1
null
2019-06-20T09:59:09
2019-06-20T09:59:08
null
UTF-8
Java
false
false
3,543
java
package com.zhongmei.yunfu.bean.req; import com.zhongmei.yunfu.db.enums.CouponType; import com.zhongmei.yunfu.util.ValueEnums; import java.io.Serializable; import java.math.BigDecimal; /** * Created by demo on 2018/12/15 */ public class CustomerCouponResp implements Serializable { private Integer applyDish;//菜品使用规则,1部分可用 2部分不可用 private String content; private Integer couponState;//优惠券状态 private Integer couponType;//优惠券类型 1,折扣 2。代金 3礼品 private BigDecimal discountValue; private Long endTime;//使用结束时间 private BigDecimal fullValue;//满额 private Long id; private String name; private String remark; private Long customerCouponId;//记录id private Long dishId; private String dishName; public Integer getApplyDish() { return applyDish; } public void setApplyDish(Integer applyDish) { this.applyDish = applyDish; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } public Integer getCouponState() { return couponState; } public void setCouponState(Integer couponState) { this.couponState = couponState; } public CouponType getCouponType() { return ValueEnums.toEnum(CouponType.class, couponType); } public void setCouponType(CouponType couponType) { this.couponType = ValueEnums.toValue(couponType); } public BigDecimal getDiscountValue() { return discountValue; } public void setDiscountValue(BigDecimal discountValue) { this.discountValue = discountValue; } public Long getEndTime() { return endTime; } public void setEndTime(Long endTime) { this.endTime = endTime; } public BigDecimal getFullValue() { return fullValue; } public void setFullValue(BigDecimal fullValue) { this.fullValue = fullValue; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark; } public Long getDishId() { return dishId; } public void setDishId(Long dishId) { this.dishId = dishId; } public String getDishName() { return dishName; } public void setDishName(String dishName) { this.dishName = dishName; } public Long getCustomerCouponId() { return customerCouponId; } public void setCustomerCouponId(Long customerCouponId) { this.customerCouponId = customerCouponId; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((id == null) ? 0 : id.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; CustomerCouponResp other = (CustomerCouponResp) obj; if (this.id == null) { return false; } else { return this.id.equals(other.id); } } }
[ "yangyuanping_cd@shishike.com" ]
yangyuanping_cd@shishike.com
6910bcff5b38ffeb2242f20fc3ca76a51b96ced1
732a6fa36e14baf7f828ef19a62b515312f9a109
/qa-project/channels/Mind-AllianceAutomationFramework/src/com/mindalliance/functionaltestsripts/CA007_CreatePlanWithSpecialCharacter.java
cfc323a08ec2967425a8bab39eca77f6651c6e7c
[]
no_license
gauravbvt/test
4e991ad3e7dd5ea670ab88f3a74fe8a42418ec20
04e48c87ff5c2209fc4bc703795be3f954909c3a
refs/heads/master
2020-11-24T02:43:32.565109
2014-10-07T23:47:39
2014-10-07T23:47:39
100,468,202
0
0
null
null
null
null
UTF-8
Java
false
false
6,652
java
package com.mindalliance.functionaltestsripts; import java.util.List; import org.openqa.selenium.Alert; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.ui.Select; import com.mindalliance.globallibrary.ApplicationFunctionLibrary; import com.mindalliance.globallibrary.GenericFunctionLibrary; import com.mindalliance.globallibrary.GlobalVariables; import com.mindalliance.globallibrary.LogFunctions; import com.mindalliance.globallibrary.ReportFunctions; public class CA007_CreatePlanWithSpecialCharacter { public CA007_CreatePlanWithSpecialCharacter() { try { GlobalVariables.sTestCaseId = "CA007_CreatePlanWithSpecialCharacter"; GlobalVariables.sDescription = "Testcase: " + GlobalVariables.sTestCaseId + " execution started"; LogFunctions.writeLogs(GlobalVariables.sDescription); System.out.println(GlobalVariables.sDescription); // Call login() GlobalVariables.bIsSuccess = ApplicationFunctionLibrary.login(); if (GlobalVariables.bIsSuccess) { // Click on 'Channel Administration' link GlobalVariables.iStepNo++ ; GlobalVariables.sDescription = "Navigated to Channel Administration"; GlobalVariables.oDriver.findElement(By.linkText(GlobalVariables.viewElements.get("channelsAdministration"))).click(); // Write Results LogFunctions.writeLogs(GlobalVariables.sDescription); LogFunctions.writeResults(GlobalVariables.sTestCaseId, GlobalVariables.iStepNo, GlobalVariables.sDescription, GlobalVariables.sPassed, GlobalVariables.sBlank, GlobalVariables.sBlank); // WebElement Synchronization Thread.currentThread(); Thread.sleep(2000); // Enter the details: newPlanUri GlobalVariables.iStepNo++ ; GlobalVariables.sDescription = "(New Plan URI) and (owned by) Entered with Special Characters"; GlobalVariables.oDriver.findElement(By.name("newPlanUri")).clear(); GlobalVariables.oElement = GlobalVariables.oDriver.findElement(By.name("newPlanUri")); GlobalVariables.oElement.sendKeys(GlobalVariables.testData.get(")(*&^%$#!")); GlobalVariables.oDriver.findElement(By.name("newPlanClient")).clear(); GlobalVariables.oElement = GlobalVariables.oDriver.findElement(By.name("newPlanClient")); GlobalVariables.oElement.sendKeys(GlobalVariables.testData.get(")(*&^%$#!")); // Write Results LogFunctions.writeLogs(GlobalVariables.sDescription); LogFunctions.writeResults(GlobalVariables.sTestCaseId, GlobalVariables.iStepNo, GlobalVariables.sDescription, GlobalVariables.sPassed, GlobalVariables.sBlank, GlobalVariables.sBlank); // WebElement Synchronization Thread.currentThread(); Thread.sleep(2000); // Click on 'Submit' button GlobalVariables.iStepNo++ ; GlobalVariables.sDescription = "Plan Created"; GlobalVariables.oDriver.findElement(By.name("Submit")).submit(); // WebElement Synchronization Thread.currentThread(); Thread.sleep(2000); // Assertion: Verify that plan Created Successfully GlobalVariables.oDropDown =new Select(GlobalVariables.oDriver.findElement(By.name("plan-sel"))); List <WebElement> options = GlobalVariables.oDropDown.getOptions(); for(WebElement option : options) { if(GlobalVariables.testData.get("New Plan v.1 (dev)").equals(option.getText())){ // Write Results LogFunctions.writeLogs(GlobalVariables.sDescription); LogFunctions.writeResults(GlobalVariables.sTestCaseId, GlobalVariables.iStepNo, GlobalVariables.sDescription, GlobalVariables.sPassed, GlobalVariables.sBlank, GlobalVariables.sBlank); option.setSelected(); break; } } // WebElement Synchronization Thread.currentThread(); Thread.sleep(2000); // Click on 'Delete Plan' button GlobalVariables.oDriver.findElement(By.xpath(GlobalVariables.channelsAdmin.get("sXpathDeletePlan"))).click(); Alert alert = GlobalVariables.oDriver.switchTo().alert(); // Click on 'OK" button of message box in order to confirm it alert.accept(); //Thread sleep Thread.currentThread(); Thread.sleep(2000); // Call logout() GlobalVariables.iStepNo++ ; GlobalVariables.sDescription = "Logout is successful"; GlobalVariables.oDriver.findElement(By.xpath(GlobalVariables.channelsAdmin.get("sXpathLogoutAdminPage"))).click(); // Write Results LogFunctions.writeLogs(GlobalVariables.sDescription); LogFunctions.writeResults(GlobalVariables.sTestCaseId, GlobalVariables.iStepNo, GlobalVariables.sDescription, GlobalVariables.sPassed, GlobalVariables.sBlank, GlobalVariables.sBlank); //Thread sleep Thread.currentThread(); Thread.sleep(2000); GlobalVariables.oDriver.quit(); LogFunctions.writeLogs("Testcase: " + GlobalVariables.sTestCaseId + " execution completed"); System.out.println("Testcase: " + GlobalVariables.sTestCaseId + " execution completed"); } else LogFunctions.writeResults(GlobalVariables.sTestCaseId, GlobalVariables.iStepNo, GlobalVariables.sDescription, GlobalVariables.sFailed, GlobalVariables.sBlank, GlobalVariables.sBlank); } catch (Exception e) { if (GlobalVariables.oDriver.getTitle().equals(GlobalVariables.sInternalErrorPageTitle)) { LogFunctions.writeResults(GlobalVariables.sTestCaseId, GlobalVariables.iStepNo, GlobalVariables.sDescription, GlobalVariables.sFailed, e.getMessage(),GlobalVariables.sErrorLogSubDirectoryPath + "\\" + GlobalVariables.sTestCaseId + ".logs"); GlobalVariables.oElement = GlobalVariables.oDriver.findElement(By.id("stackTrace")); LogFunctions.writeErrorLogs(GlobalVariables.oElement.getText()); ApplicationFunctionLibrary.logout(); } else { LogFunctions.writeResults(GlobalVariables.sTestCaseId, GlobalVariables.iStepNo, GlobalVariables.sDescription, GlobalVariables.sFailed, e.getMessage(),GlobalVariables.sBlank); ApplicationFunctionLibrary.logout(); } System.out.println("Testcase: " + GlobalVariables.sTestCaseId + " execution failed"); } } public static void main(String args[]) { try { GenericFunctionLibrary.initializeTestData(); GenericFunctionLibrary.loadObjectRepository(); new CA007_CreatePlanWithSpecialCharacter(); GenericFunctionLibrary.tearDownTestData(); ReportFunctions.generateAutomationReport(); } catch (Exception oException) { // TODO Auto-generated catch block oException.printStackTrace(); } } }
[ "afourtech@baad322d-9929-0410-88f0-f92e8ff3e1bd" ]
afourtech@baad322d-9929-0410-88f0-f92e8ff3e1bd
ad15baf2085319fb9e2335019ed2557a681ca3f2
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project23/src/test/java/org/gradle/test/performance23_4/Test23_378.java
f2b66dde291474236eafd06dd18ddafa63bc0c62
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
292
java
package org.gradle.test.performance23_4; import static org.junit.Assert.*; public class Test23_378 { private final Production23_378 production = new Production23_378("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
53544a49a01efc4b3c0dadc3f17a05607d50e690
78f7fd54a94c334ec56f27451688858662e1495e
/partyanalyst-service/trunk/src/main/java/com/itgrids/partyanalyst/service/ICadreDashBoardService.java
3783be205d2f8ee646cd4deb3e9c255c08065dbe
[]
no_license
hymanath/PA
2e8f2ef9e1d3ed99df496761a7b72ec50d25e7ef
d166bf434601f0fbe45af02064c94954f6326fd7
refs/heads/master
2021-09-12T09:06:37.814523
2018-04-13T20:13:59
2018-04-13T20:13:59
129,496,146
1
0
null
null
null
null
UTF-8
Java
false
false
7,375
java
package com.itgrids.partyanalyst.service; import java.util.Date; import java.util.List; import com.itgrids.partyanalyst.dto.AppDbDataVO; import com.itgrids.partyanalyst.dto.CadreBasicInformationVO; import com.itgrids.partyanalyst.dto.CadreDashboardVO; import com.itgrids.partyanalyst.dto.CadreDataSourceTypeVO; import com.itgrids.partyanalyst.dto.CadreRegisterInfo; import com.itgrids.partyanalyst.dto.GenericVO; import com.itgrids.partyanalyst.dto.IdAndNameVO; import com.itgrids.partyanalyst.dto.RegistrationCountVO; import com.itgrids.partyanalyst.dto.RegistrationVO; import com.itgrids.partyanalyst.dto.ResultStatus; import com.itgrids.partyanalyst.dto.SelectOptionVO; import com.itgrids.partyanalyst.dto.SurveyTransactionVO; import com.itgrids.partyanalyst.dto.WSResultVO; public interface ICadreDashBoardService { public List<CadreRegisterInfo> getDashBoardBasicInfo(String accessType,Long accessValue); public List<CadreRegisterInfo> getRecentlyRegisteredCadresInfo(); public List<CadreRegisterInfo> getAssemblyWiseCompletedPercentage(Long assemblyId,Long stateId, String accessType, String accessValue, String percType); public List<CadreRegisterInfo> getDistrictWiseCompletedPercentage(Long districtId,Long stateId, String accessType, String accessValue, String percType); public CadreRegisterInfo getWorkingMembersInfo(String hours,String accessType,Long accessValue); public List<CadreRegisterInfo> getCandidateDataCollectionInfo(Long locationType,List<Long> locationIds,Date fromDate,Date toDate); public List<CadreRegisterInfo> getDetailsForConstituency(Long constituencyId); public List<CadreRegisterInfo> getDetailsForDistricts(Long districtId); public List<CadreRegisterInfo> getAssemblyConstituencies(String type); public List<CadreRegisterInfo> getPanchayatsInConstituencies(Long constituencyId); public List<CadreRegisterInfo> getBoothsInConstituencies(Long constituencyId); public List<CadreRegisterInfo> getStateWiseRegistrationInfo(List<Long> stateIds,String fromDate,String toDate,Long userCountValue); public List<CadreRegisterInfo> getLocationWiseRegistrationInfo(List<Long> ids,String type,String fromDateStr, String toDateStr,boolean reqOthers,Long userCountValue); public List<CadreRegisterInfo> getCastGroupWiseCadreCount(Long constituencyId,String type); public List<CadreRegisterInfo> getConstituencyWiseAgeRangeCount(Long constituencyId); public List<CadreRegisterInfo> getConstituencyWiseGenderCadreCount(Long constituencyId); public List<CadreRegisterInfo> getConstituencyWiseCastCadreCount(Long constituencyId); public List<CadreRegisterInfo> getDistrictWiseAgeRangeCount(Long districtId); public List<CadreRegisterInfo> getDistrictWiseGenderCadreCount(Long districtId); public List<CadreRegisterInfo> getDistrictWiseCastCadreCount(Long districtId); public CadreRegisterInfo getRegisteredDetailsByLocation(String locationType,List<Long> locationIds,int startIndex,int maxIndex,String orderBy,String orderType); public List<CadreRegisterInfo> getDataForSubLocations(String fromLocation,Long fromLocationId,String toLocation,String fromDateStr, String toDateStr,Long constituencyId); public AppDbDataVO getAllVersionsOfAnApp(String appName,Double currentVerson,boolean includeTest); public AppDbDataVO getAllUpdatesByVersion(String appName,Double version); public List<CadreRegisterInfo> getRecentlyRegisteredCadresInfo(Integer startIndex,Integer maxIndex,String accessType,Long accessValue); public CadreRegisterInfo getRegisteredInfo(Long locationId,String locationType,int startIndex,int maxIndex); public CadreRegisterInfo getWorkingMembersDetails(String hours); public List<CadreRegisterInfo> getWorkStartedConstituencyCount(String accessType,Long accessValue); public String getStateBasedOnLocation(String AccessType,String accessValue); public List<CadreBasicInformationVO> getConstituencySurveyUsers(Long constituencyId); public ResultStatus saveCadreSurveyUserAssignInfo(CadreRegisterInfo vo); public List<CadreRegisterInfo> getAssignedUsersForCadresurveyUser(Long constituencyId,Long userId); public List<CadreRegisterInfo> getSlowUserDetails(Long locationType,List<Long> locationIds,Date fromDate,Date toDate,Long recordsCount); public List<SurveyTransactionVO> getLocationswiseUsersList(String usersType,String areaType, Long stateTypeId,String FdateStr, String TdateStr); public WSResultVO gettingUserDetailsByLocation(String location,Long locationId,String type,Date date); //public SurveyTransactionVO getDaywiseWebUserDetails(Long userId,String FdateStr, String TdateStr); public WSResultVO getAllParliamentsForAssembly(); public void getAnalysisData(); public List<CadreRegisterInfo> getCandidateDataCollectionInfoForOnlineUsers(Long locationType,List<Long> locationIds,Date fromDate,Date toDate,String sourceType,Long stateTypeId); public List<CadreRegisterInfo> getCandidateDataCollectionInfo(Long locationType,List<Long> locationIds,Date fromDate,Date toDate,String sourceType); public List<GenericVO> getInactiveUsersListDetails(String hours, String accessType, String accessValue); public String updateTabAllocationDetails(Long authId,String cause,Long userId); public List<CadreRegisterInfo> getAuthDetails(Long id,String variable); public String registerAllUsers(RegistrationVO user); public List<CadreRegisterInfo> getLocationWiseAgeRangeAndGenderCount(String type,Long stateId,Long constituencyId); public List<CadreRegisterInfo> getRegisteredCountByUserForHourWise(Date fromDate,Date toDate); public List<CadreRegisterInfo> getDistrictWiseAgeRangeCountByAccess(Long districtId,String accessType,String accessValue); public List<CadreRegisterInfo> getCastGroupWiseCadreCountByAccess(Long districtId,String accessType,String accessValue); public List<CadreRegisterInfo> getDistrictWiseGenderCadreCountByAccess(Long districtId,String accessType,String accessValue); public List<CadreRegisterInfo> getDistrictWiseCastCadreCountByAccess(Long districtId,String accessType,String accessValue); public CadreRegisterInfo getTotalRegisterCadreInfo(); public List<CadreRegisterInfo> getGHMCRegisteredCountDetails(String type); public CadreRegisterInfo getDashBoardBasicRegistrationInfo(String accessType,Long accessValue,Long stateId); public SurveyTransactionVO getDaywiseWebUserDetails(Long userId,String FdateStr, String TdateStr,Long memberTypeId); public List<CadreDashboardVO> get2016LocationWiseRegisteredCounts(String type,Long locationScopeId,String locationType); public List<CadreDataSourceTypeVO> getDataSourceTypeWiseRegisteredDetails(); public List<List<CadreDashboardVO>> get2016LocationWiseRegisteredCountsForPreviligedUser(Long userId, String locationType, String type); public List<RegistrationCountVO> getRegistrationCountDtls(String location, Long constId, String scope); public List<IdAndNameVO> getCadreRegistrationCountByConstituency(Long constituencyId,String fromDateStr,String toDateStr); public List<IdAndNameVO> getDataSourceTypeWiseCountsByType(String type); public List<CadreDashboardVO> get2016LocationWiseRegisteredCountsForConstitunecy(String type,Long locationScopeId,String locationType,Long districId,Long constType); }
[ "itgrids@b17b186f-d863-de11-8533-00e0815b4126" ]
itgrids@b17b186f-d863-de11-8533-00e0815b4126
e9c7a9639a38bbf7905b4796f395d49846ee5d52
c040aeeac7c86eedeaaa40e5744a40b70f0d1408
/src/com/sykj/shenfu/dao/IProducematerialDao.java
c7e7988bef9e7f2644111431bc734d54375ce688
[]
no_license
lucher007/shenfu
b6cc96f039e80f318586e2cc3b7db80e68528cb4
5cdfb03455515be3e175902682f9a039c3320332
refs/heads/master
2020-04-14T11:32:45.179553
2019-01-02T09:02:12
2019-01-02T09:19:36
163,816,793
0
1
null
null
null
null
UTF-8
Java
false
false
2,124
java
package com.sykj.shenfu.dao; import java.util.ArrayList; import java.util.List; import com.sykj.shenfu.po.Producematerial; /** * 用户数据层接口 */ public interface IProducematerialDao { /** * 添加 * * @param ScaleConf * @return */ public Integer save(Producematerial form); /** * 批量添加 * @param Stb * @return */ public Integer saveBatch(ArrayList<Producematerial> producemateriallist); /** * 更新 * * @param Producematerial * @return */ public Integer update(Producematerial form); /** * 删除 * * @param id * @return */ public Integer delete(Integer id); /** * 批量删除 * * @param id * @return */ public Integer deleteBatchByProducecode(String producecode); /** * 批量删除 * * @param id * @return */ public Integer deleteBatchByProductidentfy(String productidentfy); /** * 分页查询 * * @param Producematerial * @return */ public List<Producematerial> findByList(Producematerial form); /** * 全部查询 * * @param Producematerial * @return */ public List<Producematerial> queryByList(Producematerial form); /** * 分页总数 * * @param Producematerial * @return */ public Integer findByCount(Producematerial form); /** * 查询根据ID * * @param Producematerial * @return */ public Producematerial findById(Integer id); /** * 根据条件查询 * * @param Producematerial * @return */ public List<Producematerial> findByProducecode(String producecode); /** * 根据条件查询 * * @param Producematerial * @return */ public List<Producematerial> findByProductidentfy(String productidentfy); /** * 全部查询 * * @param Producematerial * @return */ public List<Producematerial> queryListByProducecode(Producematerial form); /** * 分页总数 * * @param Producematerial * @return */ public Integer findCountByProducecode(Producematerial form); }
[ "lucher007@192.168.1.9" ]
lucher007@192.168.1.9
e8974e079e4c7dfb9ce8eb94bb7003bc1d867bd7
cb90dd02bb6b2e3d45f42a9c0a8dc8e887226e71
/assertj-android/src/main/java/org/assertj/android/api/widget/AbstractProgressBarAssert.java
f97691177daec3ba22e4859d3aeba27044ab14ba
[ "Apache-2.0" ]
permissive
MichaelEvans/assertj-android
2f25ae1a602407f26a691853ef39194ff038ea5e
5b168dcd5308dfe0e21b3dc1a268053900cc99ca
refs/heads/master
2021-01-12T22:46:42.036299
2015-07-23T16:02:04
2015-07-23T16:02:04
39,574,667
1
0
null
2015-07-23T15:16:54
2015-07-23T15:16:53
null
UTF-8
Java
false
false
2,952
java
// Copyright 2013 Square, Inc. package org.assertj.android.api.widget; import android.graphics.drawable.Drawable; import android.view.animation.Interpolator; import android.widget.ProgressBar; import org.assertj.android.api.view.AbstractViewAssert; import static org.assertj.core.api.Assertions.assertThat; public abstract class AbstractProgressBarAssert<S extends AbstractProgressBarAssert<S, A>, A extends ProgressBar> extends AbstractViewAssert<S, A> { protected AbstractProgressBarAssert(A actual, Class<S> selfType) { super(actual, selfType); } public S hasIndeterminateDrawable(Drawable drawable) { isNotNull(); Drawable actualDrawable = actual.getIndeterminateDrawable(); assertThat(actualDrawable) // .overridingErrorMessage("Expected indeterminate drawable <%s> but was <%s>.", drawable, actualDrawable) // .isSameAs(drawable); return myself; } public S hasInterpolator(Interpolator interpolator) { isNotNull(); Interpolator actualInterpolator = actual.getInterpolator(); assertThat(actualInterpolator) // .overridingErrorMessage("Expected interpolator <%s> but was <%s>.", interpolator, actualInterpolator) // .isSameAs(interpolator); return myself; } public S hasMaximum(int maximum) { isNotNull(); int actualMaximum = actual.getMax(); assertThat(actualMaximum) // .overridingErrorMessage("Expected maximum <%s> but was <%s>.", maximum, actualMaximum) // .isEqualTo(maximum); return myself; } public S hasProgress(int progress) { isNotNull(); int actualProgress = actual.getProgress(); assertThat(actualProgress) // .overridingErrorMessage("Expected progress <%s> but was <%s>.", progress, actualProgress) // .isEqualTo(progress); return myself; } public S hasProgressDrawable(Drawable drawable) { isNotNull(); Drawable actualDrawable = actual.getProgressDrawable(); assertThat(actualDrawable) // .overridingErrorMessage("Expected progress drawable <%s> but was <%s>.", drawable, actualDrawable) // .isSameAs(drawable); return myself; } public S hasSecondaryProgress(int progress) { isNotNull(); int actualProgress = actual.getSecondaryProgress(); assertThat(actualProgress) // .overridingErrorMessage("Expected secondary progress <%s> but was <%s>.", progress, actualProgress) // .isEqualTo(progress); return myself; } public S isIndeterminate() { isNotNull(); assertThat(actual.isIndeterminate()) // .overridingErrorMessage("Expected to be indeterminate but was not.") // .isTrue(); return myself; } public S isNotIndeterminate() { isNotNull(); assertThat(actual.isIndeterminate()) // .overridingErrorMessage("Expected to not be indeterminate but was.") // .isFalse(); return myself; } }
[ "jw@squareup.com" ]
jw@squareup.com