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
0a589a3be5f347f1cdd6fe88ebff8fa61328f5c2
a1f13b83d2eee3e5a9875a0aecf08840828a3c5f
/cristalView/src/main/java/ar/com/cristal/creditos/client/clientes/busqueda/detalle/LineaOperacionesHistorialCreditosClienteDTO.java
127b74baf66654eb53940f27eccca845830a25fc
[]
no_license
herdebran/gestamboWeb
935d109a3eeb38a1f670d925520cd074b3de4ef9
26e0423b5cd3e7e9e94c5e4c3fa8aada15d5c402
refs/heads/master
2020-12-25T17:00:48.628014
2016-09-19T11:04:48
2016-09-19T11:04:48
57,038,008
0
0
null
null
null
null
UTF-8
Java
false
false
3,292
java
package ar.com.cristal.creditos.client.clientes.busqueda.detalle; import ar.com.cristal.creditos.client.dto.DTO; @SuppressWarnings("serial") public class LineaOperacionesHistorialCreditosClienteDTO extends DTO { private long idCredito; private String fechaCreacionCredito; private Double montoCredito; private String usuario; private String estadoCredito; private String sucursal; private int cuotasPagas; private int cuotasTotal; private String fechaVencimiento; private String tipoComprobante; private String empresa; private String pagoVoluntario; private String descTipoCredito; private String fechaSolicitudCredito; private String tipoMedioEntregaDinero; private String medioDeContacto; public String getMedioDeContacto() { return medioDeContacto; } public void setMedioDeContacto(String medioDeContacto) { this.medioDeContacto = medioDeContacto; } public long getIdCredito() { return idCredito; } public void setIdCredito(long idCredito) { this.idCredito = idCredito; } public String getFechaCreacionCredito() { return fechaCreacionCredito; } public void setFechaCreacionCredito(String fechaCreacionCredito) { this.fechaCreacionCredito = fechaCreacionCredito; } public Double getMontoCredito() { return montoCredito; } public void setMontoCredito(Double montoCredito) { this.montoCredito = montoCredito; } public String getUsuario() { return usuario; } public void setUsuario(String usuario) { this.usuario = usuario; } public String getEstadoCredito() { return estadoCredito; } public void setEstadoCredito(String estadoCredito) { this.estadoCredito = estadoCredito; } public int getCuotasPagas() { return cuotasPagas; } public void setCuotasPagas(int cuotasPagas) { this.cuotasPagas = cuotasPagas; } public int getCuotasTotal() { return cuotasTotal; } public void setCuotasTotal(int cuotasTotal) { this.cuotasTotal = cuotasTotal; } public String getFechaVencimiento() { return fechaVencimiento; } public void setFechaVencimiento(String fechaVencimiento) { this.fechaVencimiento = fechaVencimiento; } public String getSucursal() { return sucursal; } public void setSucursal(String sucursal) { this.sucursal = sucursal; } public String getTipoComprobante() { return tipoComprobante; } public void setTipoComprobante(String tipoComprobante) { this.tipoComprobante = tipoComprobante; } public String getEmpresa() { return empresa; } public void setEmpresa(String empresa) { this.empresa = empresa; } public String getPagoVoluntario() { return pagoVoluntario == null ? "" : pagoVoluntario; } public String setPagoVoluntario(String pv) { return pagoVoluntario = pv; } public String getDescTipoCredito() { return descTipoCredito; } public void setDescTipoCredito(String descTipoCredito) { this.descTipoCredito = descTipoCredito; } public String getFechaSolicitudCredito() { return fechaSolicitudCredito; } public void setFechaSolicitudCredito(String fechaSolicitudCredito) { this.fechaSolicitudCredito = fechaSolicitudCredito; } public String getTipoMedioEntregaDinero() { return tipoMedioEntregaDinero; } public void setTipoMedioEntregaDinero(String tipoMedioEntregaDinero) { this.tipoMedioEntregaDinero = tipoMedioEntregaDinero; } }
[ "hernanmarzullo@gmail.com" ]
hernanmarzullo@gmail.com
4fdafb5516ff656c1d9502831dc8b80f356f1ed9
b1af7c61dcea66cb9e94806359818a464879dbe7
/bssv/util/JP560118/TestUpdateABSRequestNumber.java
1e174b112a782bb703200f31843322a726ab8f2f
[]
no_license
PPatel0212/Java-Web-Services-JDE
aa8c17bac68a73db153de903129246bf2d1f06ae
c296873106455f69aa541e45ae73a15756e9a413
refs/heads/master
2022-12-29T18:17:41.801803
2020-10-07T21:09:57
2020-10-07T21:09:57
264,015,732
0
0
null
2020-06-22T01:14:32
2020-05-14T20:15:26
Java
UTF-8
Java
false
false
1,466
java
package be.e1.bssv.util.JP560118; import be.e1.bssv.util.JP560118.valueobject.GetABSDataReply; import be.e1.bssv.util.JP560118.valueobject.GetABSDataRequest; import be.e1.bssv.util.JP560118.valueobject.UpdateABSReply; import be.e1.bssv.util.JP560118.valueobject.UpdateABSRequest; import java.math.BigDecimal; public class TestUpdateABSRequestNumber { public static void main(String[] args) { GetABSDataRequest get = new GetABSDataRequest(); /*get.setRequestNumber("BARTKOSC14092200000264");*/ get.setAddressNumber(new Integer(35805)); /*get.setLineNumber(new BigDecimal(1.0));*/ /*UpdateABSRequest req = new UpdateABSRequest(); req.setRequestNumber("BARTKOSC14092200000264"); req.setLineNumber(new BigDecimal(1.0)); UpdateABSReply reply = new UpdateABSReply();*/ GetABSDataReply reply = new GetABSDataReply(); BE_ABSDataManager mgr = new BE_ABSDataManager(); try{ /*reply = mgr.getABSData(get);*/ reply = mgr.getABSData(get); System.out.println(+reply.getAddressNumber()); System.out.println(reply.getBackordersAllowed()); System.out.println(reply.getCheckCreditLevel()); System.out.println(reply.getItemRestrictions()); }catch(Exception exp){ System.out.println(exp.getMessage()); } } }
[ "parineeta.ailani@gmail.com" ]
parineeta.ailani@gmail.com
f61f2aa16645c869433f831124066c615168e16c
83e37af07543a132580e6856f760fb8ce406b73e
/src/csust/teacher/activity/AddCourseActivity.java
1a66dd9b682ef058b2c79fb407ed43e342ed204e
[]
no_license
anLA7856/teacher01
0b3e9bea45e78594643d65477784389d4c421728
d6d170dbe3ebaf22e2a27dad60e3c44320297bde
refs/heads/master
2021-01-19T22:40:12.359134
2017-05-15T07:41:26
2017-05-15T07:41:26
64,984,660
1
2
null
null
null
null
UTF-8
Java
false
false
4,447
java
package csust.teacher.activity; import android.app.Activity; import android.app.ProgressDialog; import android.os.Bundle; import android.os.Handler; import android.view.View; import android.view.View.OnClickListener; import android.view.Window; import android.widget.EditText; import android.widget.ImageView; import android.widget.RelativeLayout; import android.widget.Toast; import csust.teacher.model.Model; import csust.teacher.net.ThreadPoolUtils; import csust.teacher.thread.HttpPostThread; import csust.teacher.utils.CharacterUtil; /** * 添加课程的activity,实现了触摸监听事件 * * @author anLA7856 * */ public class AddCourseActivity extends Activity implements OnClickListener { // 关闭按钮 private ImageView mClose; // 上传按钮 private RelativeLayout mUpload; // 课程名和课程描述 private EditText mCourseName, mCourseDespription; // 用于上传课程信息的url private String url = null; // 用于保存coursename和description private String courseName, description; // 用于定义记录框 private ProgressDialog mProDialog; // value,用来存post的json格式的字符串。 private String value = null; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // 去除activity首部的一条 requestWindowFeature(Window.FEATURE_NO_TITLE); // 加载界面 setContentView(R.layout.activity_upload); initView(); } /** * 用于初始化界面 */ private void initView() { mProDialog = new ProgressDialog(this); // 获得一一对应的值 mClose = (ImageView) findViewById(R.id.upload_close); mUpload = (RelativeLayout) findViewById(R.id.upload_upload); mCourseName = (EditText) findViewById(R.id.upload_coursename); mCourseDespription = (EditText) findViewById(R.id.upload_description); // 为关闭和上传添加事件 mClose.setOnClickListener(this); mUpload.setOnClickListener(this); } @Override public void onClick(View v) { int id = v.getId(); switch (id) { case R.id.upload_close: // 关闭就直接关闭 finish(); break; case R.id.upload_upload: // 上传事件 // 获得课程名和课程描述 courseName = mCourseName.getText().toString().trim(); description = mCourseDespription.getText().toString().trim(); // 进行相应的判断,以及检测 if (description.length() > 20) { Toast.makeText(AddCourseActivity.this, "描述不能超过20个字", 1).show(); break; } if (courseName.length() > 10) { Toast.makeText(AddCourseActivity.this, "课程名字不能超过10个字", 1) .show(); break; } if (courseName.trim().equals("")) { Toast.makeText(AddCourseActivity.this, "课程名字不能为空", 1).show(); break; } if (!new CharacterUtil().checkString(courseName.trim())) { Toast.makeText(AddCourseActivity.this, "课程名字不能包含非法字符", 1) .show(); break; } mProDialog.setTitle("创建课程中。。。"); mProDialog.show(); // 拼接url value = "{\"teacher_id\":\"" + Model.MYUSERINFO.getTeacher_id() + "\",\"course_name\":\"" + courseName + "\",\"description\":\"" + description + "\"}"; // url = Model.UPLOADNEWCOURSE + "teacher_id=" // + Model.MYUSERINFO.getTeacher_id() + "&course_name=" // + courseName + "&description=" + description; // 改为post方式。 ThreadPoolUtils.execute(new HttpPostThread(hand, Model.UPLOADNEWCOURSE, value)); // ThreadPoolUtils.execute(new HttpGetThread(hand, url)); break; default: break; } } // 用于处理上传后成功的handler Handler hand = new Handler() { public void handleMessage(android.os.Message msg) { mProDialog.dismiss(); super.handleMessage(msg); if (msg.what == 404) { // 请求失败的逻辑 Toast.makeText(AddCourseActivity.this, "请求失败,服务器故障", 1).show(); } else if (msg.what == 100) { // 服务器问题 Toast.makeText(AddCourseActivity.this, "服务器无响应", 1).show(); } else if (msg.what == 200) { // 处理成功的逻辑 String result = msg.obj.toString(); if (result.equals("[1]")) { // 添加成功! Toast.makeText(AddCourseActivity.this, "添加课程信息成功!", 1) .show(); finish(); } else { // 添加失败! Toast.makeText(AddCourseActivity.this, "添加失败!", 1).show(); } } }; }; }
[ "350493391@qq.com" ]
350493391@qq.com
fe5db3c966596d51ff261bbb7734b0cc49060d50
62e330c99cd6cedf20bc162454b8160c5e1a0df8
/basex-core/src/main/java/org/basex/query/func/prof/ProfMem.java
80da6c417d3aac1e97c273e7fd59ced028ab3623
[ "BSD-3-Clause" ]
permissive
nachawati/basex
76a717b069dcea3932fad5116e0a42a727052b58
0bc95648390ec3e91b8fd3e6ddb9ba8f19158807
refs/heads/master
2021-07-20T06:57:18.969297
2017-10-31T04:17:00
2017-10-31T04:17:00
106,351,382
0
0
null
2017-10-10T01:00:38
2017-10-10T01:00:38
null
UTF-8
Java
false
false
1,659
java
package org.basex.query.func.prof; import static org.basex.util.Token.*; import org.basex.query.*; import org.basex.query.func.*; import org.basex.query.func.fn.*; import org.basex.query.iter.*; import org.basex.query.value.*; import org.basex.query.value.item.*; import org.basex.util.*; /** * Function implementation. * * @author BaseX Team 2005-17, BSD License * @author Christian Gruen */ public final class ProfMem extends StandardFunc { @Override public Iter iter(final QueryContext qc) throws QueryException { // measure initial memory consumption Performance.gc(3); final long min = Performance.memory(); // optional message final byte[] msg = exprs.length > 2 ? toToken(exprs[2], qc) : null; // check caching flag if(exprs.length > 1 && toBoolean(exprs[1], qc)) { final Value v = qc.value(exprs[0]).cache().value(); dump(min, msg, qc); return v.iter(); } return new Iter() { final Iter iter = qc.iter(exprs[0]); @Override public Item next() throws QueryException { final Item it = iter.next(); if(it == null) dump(min, msg, qc); return it; } }; } /** * Dumps the memory consumption. * @param min initial memory usage * @param msg message (may be {@code null}) * @param qc query context */ private static void dump(final long min, final byte[] msg, final QueryContext qc) { Performance.gc(2); final long max = Performance.memory(); final long mb = Math.max(0, max - min); FnTrace.trace(token(Performance.format(mb)), msg, qc); } }
[ "mnachawa@gmu.edu" ]
mnachawa@gmu.edu
c9fb54acda2ce97e8634942b3bba74fe8cabbbb3
d5515553d071bdca27d5d095776c0e58beeb4a9a
/src/net/sourceforge/plantuml/hector2/layering/Layer.java
6f5e5a554542e6130cfa01dff7e753b9b259a8a0
[]
no_license
ccamel/plantuml
29dfda0414a3dbecc43696b63d4dadb821719489
3100d49b54ee8e98537051e071915e2060fe0b8e
refs/heads/master
2022-07-07T12:03:37.351931
2016-12-14T21:01:03
2016-12-14T21:01:03
77,067,872
1
0
null
2022-05-30T09:56:21
2016-12-21T16:26:58
Java
UTF-8
Java
false
false
3,160
java
/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * * Original Author: Arnaud Roques * * */ package net.sourceforge.plantuml.hector2.layering; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import net.sourceforge.plantuml.cucadiagram.IEntity; import net.sourceforge.plantuml.hector2.MinMax; import net.sourceforge.plantuml.hector2.mpos.MutationLayer; import net.sourceforge.plantuml.hector2.mpos.MutationLayerMove; public class Layer { private final int id; private final Map<IEntity, Integer> entities = new HashMap<IEntity, Integer>(); public Layer(int id) { this.id = id; } public Layer duplicate() { final Layer result = new Layer(id); result.entities.putAll(this.entities); return result; } public List<MutationLayer> getPossibleMutations() { final List<MutationLayer> result = new ArrayList<MutationLayer>(); for (Map.Entry<IEntity, Integer> ent : entities.entrySet()) { final IEntity entity = ent.getKey(); final int longitude = ent.getValue(); if (isLongitudeFree(longitude + 2)) { result.add(new MutationLayerMove(this, entity, longitude + 2)); } if (isLongitudeFree(longitude - 2)) { result.add(new MutationLayerMove(this, entity, longitude - 2)); } } return Collections.unmodifiableList(result); } private boolean isLongitudeFree(int longitude) { return entities.values().contains(longitude) == false; } public void put(IEntity ent, int longitude) { if (entities.containsKey(ent) == false) { throw new IllegalArgumentException(); } this.entities.put(ent, longitude); } public void add(IEntity ent) { final int pos = entities.size() * 2; this.entities.put(ent, pos); } public Collection<IEntity> entities() { return Collections.unmodifiableCollection(entities.keySet()); } public int getLongitude(IEntity ent) { return entities.get(ent); } public MinMax getMinMaxLongitudes() { return MinMax.from(entities.values()); } @Override public String toString() { return "layer " + id + " " + entities; } public final int getId() { return id; } }
[ "plantuml@gmail.com" ]
plantuml@gmail.com
e6fbfb183bd14ae97f34c2fbd02c38b8665827c9
447520f40e82a060368a0802a391697bc00be96f
/apks/comparison_androart/GROUPE SOCIETE GENERALE SA/source/android/support/v4/app/NotificationCompatBase.java
977bac6d4b14e6bccd657b7e75b1a51c6002b46a
[ "Apache-2.0" ]
permissive
iantal/AndroidPermissions
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
d623b732734243590b5f004d167e542e2e2ae249
refs/heads/master
2023-07-19T01:29:26.689186
2019-09-30T19:01:42
2019-09-30T19:01:42
107,239,248
0
0
Apache-2.0
2023-07-16T07:41:38
2017-10-17T08:22:57
null
UTF-8
Java
false
false
2,078
java
package android.support.v4.app; import android.app.Notification; import android.app.PendingIntent; import android.content.Context; import android.os.Bundle; public class NotificationCompatBase { public NotificationCompatBase() {} public static Notification add(Notification paramNotification, Context paramContext, CharSequence paramCharSequence1, CharSequence paramCharSequence2, PendingIntent paramPendingIntent) { paramNotification.setLatestEventInfo(paramContext, paramCharSequence1, paramCharSequence2, paramPendingIntent); return paramNotification; } public static abstract class Action { public Action() {} public abstract PendingIntent getActionIntent(); public abstract Bundle getExtras(); public abstract int getIcon(); public abstract RemoteInputCompatBase.RemoteInput[] getRemoteInputs(); public abstract CharSequence getTitle(); public static abstract interface Factory { public abstract NotificationCompatBase.Action build(int paramInt, CharSequence paramCharSequence, PendingIntent paramPendingIntent, Bundle paramBundle, RemoteInputCompatBase.RemoteInput[] paramArrayOfRemoteInput); public abstract NotificationCompatBase.Action[] newArray(int paramInt); } } public static abstract class UnreadConversation { public UnreadConversation() {} abstract long getLatestTimestamp(); abstract String[] getMessages(); abstract String getParticipant(); abstract String[] getParticipants(); abstract PendingIntent getReadPendingIntent(); abstract RemoteInputCompatBase.RemoteInput getRemoteInput(); abstract PendingIntent getReplyPendingIntent(); public static abstract interface Factory { public abstract NotificationCompatBase.UnreadConversation build(String[] paramArrayOfString1, RemoteInputCompatBase.RemoteInput paramRemoteInput, PendingIntent paramPendingIntent1, PendingIntent paramPendingIntent2, String[] paramArrayOfString2, long paramLong); } } }
[ "antal.micky@yahoo.com" ]
antal.micky@yahoo.com
8c4502f41ab574b2684411e4e07b78e423b1933a
a00326c0e2fc8944112589cd2ad638b278f058b9
/src/main/java/000/131/157/CWE191_Integer_Underflow__byte_rand_multiply_06.java
82a92460e0a41fd502e843ff0cf0f482ed866bf7
[]
no_license
Lanhbao/Static-Testing-for-Juliet-Test-Suite
6fd3f62713be7a084260eafa9ab221b1b9833be6
b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68
refs/heads/master
2020-08-24T13:34:04.004149
2019-10-25T09:26:00
2019-10-25T09:26:00
216,822,684
0
1
null
2019-11-08T09:51:54
2019-10-22T13:37:13
Java
UTF-8
Java
false
false
6,977
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE191_Integer_Underflow__byte_rand_multiply_06.java Label Definition File: CWE191_Integer_Underflow.label.xml Template File: sources-sinks-06.tmpl.java */ /* * @description * CWE: 191 Integer Underflow * BadSource: rand Set data to result of rand() * GoodSource: A hardcoded non-zero, non-min, non-max, even number * Sinks: multiply * GoodSink: Ensure there will not be an underflow before multiplying data by 2 * BadSink : If data is negative, multiply by 2, which can cause an underflow * Flow Variant: 06 Control flow: if(PRIVATE_STATIC_FINAL_FIVE==5) and if(PRIVATE_STATIC_FINAL_FIVE!=5) * * */ public class CWE191_Integer_Underflow__byte_rand_multiply_06 extends AbstractTestCase { /* The variable below is declared "final", so a tool should be able * to identify that reads of this will always give its initialized * value. */ private static final int PRIVATE_STATIC_FINAL_FIVE = 5; public void bad() throws Throwable { byte data; if (PRIVATE_STATIC_FINAL_FIVE==5) { /* POTENTIAL FLAW: Use a random value */ data = (byte)((new java.security.SecureRandom()).nextInt(1+Byte.MAX_VALUE-Byte.MIN_VALUE) + Byte.MIN_VALUE); } else { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run * but ensure data is inititialized before the Sink to avoid compiler errors */ data = 0; } if (PRIVATE_STATIC_FINAL_FIVE==5) { if(data < 0) /* ensure we won't have an overflow */ { /* POTENTIAL FLAW: if (data * 2) < Byte.MIN_VALUE, this will underflow */ byte result = (byte)(data * 2); IO.writeLine("result: " + result); } } } /* goodG2B1() - use goodsource and badsink by changing first PRIVATE_STATIC_FINAL_FIVE==5 to PRIVATE_STATIC_FINAL_FIVE!=5 */ private void goodG2B1() throws Throwable { byte data; if (PRIVATE_STATIC_FINAL_FIVE!=5) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run * but ensure data is inititialized before the Sink to avoid compiler errors */ data = 0; } else { /* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */ data = 2; } if (PRIVATE_STATIC_FINAL_FIVE==5) { if(data < 0) /* ensure we won't have an overflow */ { /* POTENTIAL FLAW: if (data * 2) < Byte.MIN_VALUE, this will underflow */ byte result = (byte)(data * 2); IO.writeLine("result: " + result); } } } /* goodG2B2() - use goodsource and badsink by reversing statements in first if */ private void goodG2B2() throws Throwable { byte data; if (PRIVATE_STATIC_FINAL_FIVE==5) { /* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */ data = 2; } else { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run * but ensure data is inititialized before the Sink to avoid compiler errors */ data = 0; } if (PRIVATE_STATIC_FINAL_FIVE==5) { if(data < 0) /* ensure we won't have an overflow */ { /* POTENTIAL FLAW: if (data * 2) < Byte.MIN_VALUE, this will underflow */ byte result = (byte)(data * 2); IO.writeLine("result: " + result); } } } /* goodB2G1() - use badsource and goodsink by changing second PRIVATE_STATIC_FINAL_FIVE==5 to PRIVATE_STATIC_FINAL_FIVE!=5 */ private void goodB2G1() throws Throwable { byte data; if (PRIVATE_STATIC_FINAL_FIVE==5) { /* POTENTIAL FLAW: Use a random value */ data = (byte)((new java.security.SecureRandom()).nextInt(1+Byte.MAX_VALUE-Byte.MIN_VALUE) + Byte.MIN_VALUE); } else { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run * but ensure data is inititialized before the Sink to avoid compiler errors */ data = 0; } if (PRIVATE_STATIC_FINAL_FIVE!=5) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ IO.writeLine("Benign, fixed string"); } else { if(data < 0) /* ensure we won't have an overflow */ { /* FIX: Add a check to prevent an underflow from occurring */ if (data > (Byte.MIN_VALUE/2)) { byte result = (byte)(data * 2); IO.writeLine("result: " + result); } else { IO.writeLine("data value is too small to perform multiplication."); } } } } /* goodB2G2() - use badsource and goodsink by reversing statements in second if */ private void goodB2G2() throws Throwable { byte data; if (PRIVATE_STATIC_FINAL_FIVE==5) { /* POTENTIAL FLAW: Use a random value */ data = (byte)((new java.security.SecureRandom()).nextInt(1+Byte.MAX_VALUE-Byte.MIN_VALUE) + Byte.MIN_VALUE); } else { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run * but ensure data is inititialized before the Sink to avoid compiler errors */ data = 0; } if (PRIVATE_STATIC_FINAL_FIVE==5) { if(data < 0) /* ensure we won't have an overflow */ { /* FIX: Add a check to prevent an underflow from occurring */ if (data > (Byte.MIN_VALUE/2)) { byte result = (byte)(data * 2); IO.writeLine("result: " + result); } else { IO.writeLine("data value is too small to perform multiplication."); } } } } public void good() throws Throwable { goodG2B1(); goodG2B2(); goodB2G1(); goodB2G2(); } /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "anhtluet12@gmail.com" ]
anhtluet12@gmail.com
fd47fcd9fbd65a3504901e0af4911d688aadedae
b3bae675f9474acc617e94ede34b5dc723089d00
/src/main/java/training360/mentortools/trainingClasses/UpdateTrainingClassWithSyllabusCommand.java
d4baab3781ad0e92dc783bf9bc4bca791217aaf2
[]
no_license
BrigiBalogh/mentor-tools
4518b45525c121fc66b52606ce5f6e74d5bb137f
19ee88bc300e0c6320c073b058946b7611c815ae
refs/heads/master
2023-07-24T18:06:57.185354
2021-09-03T12:16:22
2021-09-03T12:16:22
397,124,676
0
0
null
null
null
null
UTF-8
Java
false
false
383
java
package training360.mentortools.trainingClasses; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @Data @AllArgsConstructor @NoArgsConstructor public class UpdateTrainingClassWithSyllabusCommand { @Schema(description = "id of the syllabus", example ="11") private Long syllabusId; }
[ "73614406+BrigiBalogh@users.noreply.github.com" ]
73614406+BrigiBalogh@users.noreply.github.com
0ece3e7abe0aa3469c792ad9d686ca6c1d9cf8d8
c3ecdd4bfa4e1ff2d4727e0e8cf15476c5d47fed
/boot-maven-docker-compose/src/main/java/com/future/fock/my/future/MyFutureTask.java
bfdeedd431d95a33384adb1dbb989aa3d8b7cf6f
[]
no_license
blue19demon/docker-action
260e4954623a94b4c0bdf72d5b7249d18806c2f9
32639f033a9bdd101cffcc234e6413748550bbb1
refs/heads/master
2022-06-26T04:09:51.954320
2019-10-14T10:38:00
2019-10-14T10:38:00
215,015,647
0
0
null
2022-06-17T02:34:17
2019-10-14T10:36:05
Java
UTF-8
Java
false
false
1,205
java
package com.future.fock.my.future; import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.ReentrantLock; public class MyFutureTask<T> implements Runnable{ private OCallable<T> oCallable = null; private boolean isReady = false; private ReentrantLock lock = new ReentrantLock(); private Condition condition = lock.newCondition(); public MyFutureTask(MyCallable<T> myCallable) { this.oCallable = (OCallable<T>) myCallable; } @Override public void run() { try { T r=oCallable.call(); oCallable.setResult(r); set(oCallable); } catch (Exception e) { e.printStackTrace(); } } public T get() { while (!isReady) { try { lock.lock(); condition.await(); } catch (InterruptedException e) { e.printStackTrace(); } finally { lock.unlock(); } } return oCallable.getResult(); } public void set(OCallable<T> oCallable) { lock.lock(); if (isReady) { return; } this.oCallable = oCallable; isReady = true; condition.signal(); lock.unlock(); } }
[ "1843080373@qq.com" ]
1843080373@qq.com
7c527cbe91674a647ae857ded21908ac2cb86862
e3f64c0e19d6ff5bef4d5d3a2048af86da62884f
/app/src/main/java/com/example/daynightone/ThemeUtil.java
af8e579443c2bbe071dd59889d9ba716c10c3428
[]
no_license
tongchexinfeitao/DayNightOne
1284700c44b59c705784864f40d21b6b5bd702c2
92755f0205ab380ab24d718b07a12b130292d7bc
refs/heads/master
2021-05-09T09:49:21.418553
2018-01-30T00:48:15
2018-01-30T00:48:15
119,461,413
2
2
null
null
null
null
UTF-8
Java
false
false
1,289
java
package com.example.daynightone; import android.app.Activity; import android.content.Intent; /** * Created by hasee on 2017/8/7. */ public class ThemeUtil { //我当前应用的主题 private static int theme = 0; //日间模式主题 private static final int DAY_THEME = 0; //夜间模式主题 private static final int NIGHT_THEME = 1; public static void onActivityCreatedSetTheme(Activity activity) { switch (theme) { case DAY_THEME: activity.setTheme(R.style.day_theme); break; case NIGHT_THEME: activity.setTheme(R.style.night_theme); break; } } //点击按钮改变对应得主题 public static void ChangeCurrentTheme(Activity activity) { //1、改变当前主题的theme变量 switch (theme) { case DAY_THEME: theme = NIGHT_THEME; break; case NIGHT_THEME: theme = DAY_THEME; break; } //2、重启这个activity activity.finish(); activity.overridePendingTransition(R.anim.sliding_in, R.anim.sliding_out); activity.startActivity(new Intent(activity, activity.getClass())); } }
[ "tongchexinfeitao@sina.cn" ]
tongchexinfeitao@sina.cn
a137c81684bd2fca8f249107249bad5f40dbe3fe
d171ac583cabfc6eb2b8d5e65448c42b6a50fa32
/tools/src/constants/skills/Marksman.java
1430c6a77fbc16d27188b510aeafeaef59b13e9e
[ "MIT" ]
permissive
marcosppastor/MSV83
0d1d5b979f1591d12181ab4de160361881878145
f7df1ad6878b4b03f660beabd4b82575b143ba3a
refs/heads/main
2023-07-18T12:16:21.304766
2023-06-25T13:28:23
2023-06-25T13:28:23
385,090,216
5
0
null
null
null
null
UTF-8
Java
false
false
1,473
java
/* This file is part of the OdinMS Maple Story Server Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc> Matthias Butz <matze@odinms.de> Jan Christian Meyer <vimes@odinms.de> 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 version 3 as published by the Free Software Foundation. You may not use, modify or distribute this program under any other version of the GNU Affero General Public License. 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 Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ package constants.skills; /** * * @author BubblesDev */ public class Marksman { public static final int MAPLE_WARRIOR = 3221000; public static final int PIERCING_ARROW = 3221001; public static final int SHARP_EYES = 3221002; public static final int MARKSMAN_BOOST = 3220004; public static final int FROST_PREY = 3221005; public static final int BLIND = 3221006; public static final int SNIPE = 3221007; public static final int HEROS_WILL = 3221008; }
[ "marcosppastor@gmail.com" ]
marcosppastor@gmail.com
6b035aa444b582eaf0c0c7a21e9fc45ff49c623f
d4dafb381a9c5930918db8bedf403944df918884
/src/main/java/cn/com/sky/basics/test_runtime/TestRuntimeExecMac.java
3f79e5e45479243874a01f5cda6dbafffe4ea4d4
[]
no_license
git-sky/javabasics
3f307d33876e17b260740492fcd6c33bdf91bddb
25bf3ddbe6c08b77b499450cfdbd75e4eb81b51d
refs/heads/master
2022-12-25T12:01:04.569153
2021-06-20T14:48:55
2021-06-20T14:48:55
97,925,787
0
0
null
null
null
null
UTF-8
Java
false
false
822
java
package cn.com.sky.basics.test_runtime; import java.io.*; public class TestRuntimeExecMac { public static void main(String[] args) { try { Process process = Runtime.getRuntime().exec("ipconfig /all"); InputStreamReader ir = new InputStreamReader(process.getInputStream()); LineNumberReader input = new LineNumberReader(ir); String line; while ((line = input.readLine()) != null) if (line.indexOf("物理地址") > 0) { String MACAddr = line.substring(line.indexOf("-") + 1); System.out.println("MAC address = [" + MACAddr + "]"); } } catch (java.io.IOException e) { System.err.println("IOException " + e.getMessage()); } } }
[ "linkme2008@sina.com" ]
linkme2008@sina.com
28c371b254b31204edb59757d6c880479ba85f51
cb9756a5857c5aed806bf93b7aa8770b5e4bf4ff
/src/main/java/com/mlsc/waste/enterprise/dao/impl/EnterpriseTypeDaoImpl.java
8c013af12e820c3e12e5358fc8576e928bd9d1b5
[]
no_license
SUZHOUTEAM/swp
f28b2dc192a2258c1f96c6492bf20bbf5ea18fae
d5b62d2748b660e65f9ff834b2359453cd664eb2
refs/heads/master
2020-03-28T15:38:21.455615
2018-09-13T08:22:42
2018-09-13T08:22:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,291
java
package com.mlsc.waste.enterprise.dao.impl; import com.mlsc.epdp.common.base.db.dao.EntityDaoSupport; import com.mlsc.epdp.common.exception.DaoAccessException; import com.mlsc.waste.enterprise.dao.EnterpriseTypeDao; import com.mlsc.waste.enterprise.model.WasteEnterpriseType; import com.mlsc.waste.enterprise.model.WasteEnterpriseTypeBusiness; import com.mlsc.waste.utils.Constant; import com.mlsc.waste.utils.TableNameConstants; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.BeanPropertyRowMapper; import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate; import org.springframework.stereotype.Repository; import java.util.HashMap; import java.util.List; import java.util.Map; @Repository public class EnterpriseTypeDaoImpl extends EntityDaoSupport<WasteEnterpriseType> implements EnterpriseTypeDao { @Autowired private NamedParameterJdbcTemplate namedParameterJdbcTemplate; @Override public List<WasteEnterpriseTypeBusiness> getEnterpriseTypesByEnterpriseId(String enterId) throws DaoAccessException { Map<String, Object> map = new HashMap<String, Object>(); StringBuffer querySql = new StringBuffer("select wasteEnterpriseType.id , "); querySql.append(" wasteEnterpriseType.enterprise_id , "); querySql.append(" wasteEnterpriseType.enterprise_type_id, "); querySql.append(" codevalue.code as enterpriseTypeCode, "); querySql.append(" codevalue.value as enterpriseTypeName "); querySql.append(" from "); querySql.append(TableNameConstants.TABLE_WASTE_ENTERPRISE_TYPE + " wasteEnterpriseType "); querySql.append(" left join " + TableNameConstants.TABLE_CODE_VALUE + " codevalue on wasteEnterpriseType.enterprise_type_id = codevalue.id "); querySql.append(" where wasteEnterpriseType.enterprise_id = :enterprise_id and valid = :valid"); map.put("enterprise_id", enterId); map.put("valid", Constant.IS_VALID); List<WasteEnterpriseTypeBusiness> resultList = namedParameterJdbcTemplate.query(querySql.toString(), map, new BeanPropertyRowMapper<WasteEnterpriseTypeBusiness>(WasteEnterpriseTypeBusiness.class)); return resultList; } }
[ "517829464@qq.com" ]
517829464@qq.com
19860fdaa751405cba91c27616c6149b7fe0e428
d297e221e8ca16ff154a405ba215e8dda1a734a7
/Day12_Review/src/test/mypac4/MainClass2.java
87795e6a0f61fb6e5f0b33a08ccb621780c9eaa3
[]
no_license
zahir7/JavaSE
faaede565d3c1bbc5121e8901228e6be558bd449
ace92bc3751be9fef2a593291fae9f5657d3e681
refs/heads/master
2022-01-18T02:30:45.815616
2019-06-13T14:55:37
2019-06-13T14:55:37
79,884,974
0
0
null
null
null
null
UHC
Java
false
false
414
java
package test.mypac4; public class MainClass2 { //메인 메소드 public static void main(String[] args) { //Weapon 추상클래스를 상속받아 추상메소드를 구현한 객체 Weapon weapon=new Weapon(){//익명의 이너 클래스 @Override public void attackSky() { System.out.println("공중 공격을 해요!"); } }; weapon.attackSky(); weapon.attack(); } }
[ "zahir7@naver.com" ]
zahir7@naver.com
1d2a5554adf68dbaca515e1b6f1746db520cc970
3f00a0d8b5c66041841bc6f695bbca41cdba8b7f
/rocket/admin/src/main/java/com/nb6868/xquick/modules/uc/service/RoleMenuService.java
3abd1e21f679581f0857c21bbb9e30b12f3a41f5
[ "Apache-2.0" ]
permissive
hanjiongchen/xquick
4a87579dda00f7db61756d174f5e08ad1bc56319
2479d2a04b6a53633cf384263173e3b19eb6ad13
refs/heads/master
2022-04-20T21:04:13.518963
2020-04-23T01:49:23
2020-04-23T01:49:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
884
java
package com.nb6868.xquick.modules.uc.service; import com.nb6868.xquick.booster.service.BaseService; import com.nb6868.xquick.modules.uc.entity.RoleMenuEntity; import java.util.List; /** * 角色与菜单对应关系 * * @author Charles (zhanngchaoxu@gmail.com) */ public interface RoleMenuService extends BaseService<RoleMenuEntity> { /** * 根据角色ID,获取菜单ID列表 */ List<Long> getMenuIdListByRoleId(Long roleId); /** * 保存或修改 * @param roleId 角色ID * @param menuIdList 菜单ID列表 */ void saveOrUpdate(Long roleId, String roleCode, List<Long> menuIdList); /** * 根据角色id,删除角色菜单关系 * @param roleIds 角色ids */ boolean deleteByRoleIds(List<Long> roleIds); /** * 根据菜单id,删除角色菜单关系 * @param menuIds 菜单ids */ boolean deleteByMenuIds(List<Long> menuIds); }
[ "zhangchaoxu@gmail.com" ]
zhangchaoxu@gmail.com
07043800a031862f8b7b7709c1395a1c5fff4e5a
5252a00843c6082d739d7a00142525fff0a2f3e7
/zoeeasy-cloud-platform/zoeeasy-cloud-modules/zoeeasy-cloud-pms/zoeeasy-cloud-pms-api/src/main/java/com/zoeeasy/cloud/pms/specialvehicle/validator/CarColorEnumValidator.java
3ebc7f5eb33a834a76a2a3c9f6a455985dd162dc
[]
no_license
P79N6A/parking
be8dc0ae6394096ec49faa89521d723425a5c965
6e3ea14312edc7487f725f2df315de989eaabb10
refs/heads/master
2020-05-07T22:07:03.790311
2019-04-12T03:06:26
2019-04-12T03:06:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
224
java
package com.zoeeasy.cloud.pms.specialvehicle.validator; import com.baidu.unbiz.fluentvalidator.Validator; /** * @date: 2018/10/22. * @author:zm */ public interface CarColorEnumValidator extends Validator<Integer> { }
[ "xuqinghuo@126.com" ]
xuqinghuo@126.com
6fe25ada525634b7519a4efebdff336544cc01c3
0e31444a2403394a76533502728117f83acf5df1
/src/org/ice1000/julia/devkt/lang/psi/JuliaAssignOp.java
769288a0b4f3f3484818631e3db465be167cf0c2
[ "MIT" ]
permissive
devkt-plugins/julia-devkt
7dd4421820a5108ed8388522cfe0dfa3adac9ae6
74acbc2c6cf8924f33bc37eba539cf0403ece11c
refs/heads/master
2020-03-10T17:51:20.936506
2018-09-15T03:17:40
2018-09-15T03:17:40
129,510,220
0
0
null
null
null
null
UTF-8
Java
false
true
264
java
// This is a generated file. Not intended for manual editing. package org.ice1000.julia.devkt.lang.psi; import java.util.List; import org.jetbrains.annotations.*; public interface JuliaAssignOp extends JuliaExpr { @NotNull List<JuliaExpr> getExprList(); }
[ "ice1000kotlin@foxmail.com" ]
ice1000kotlin@foxmail.com
72b15071db813eaae65aa3b1ed4c63dfbcf26005
1b522a1e180d1c505be06e6031a49c541b9b77ac
/litho-rendercore/src/main/java/com/facebook/rendercore/LayoutCache.java
6ac0b7d02619a7d2a76e60566affb10b750c8be8
[ "Apache-2.0" ]
permissive
eldk/litho
ba69cf2ce1631d56c4afdef00b7acd7866280c49
d71cdbeb28cadb99e944d9a239b1b83f98033a7a
refs/heads/master
2023-08-24T13:25:46.346553
2023-05-25T17:42:56
2023-05-25T17:42:56
100,810,949
1
0
null
2017-08-19T17:38:57
2017-08-19T17:38:57
null
UTF-8
Java
false
false
2,179
java
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * 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.facebook.rendercore; import androidx.annotation.Nullable; import androidx.collection.LongSparseArray; import java.util.HashMap; import java.util.Map; /** * A Cache that can be used to reuse LayoutResults or parts of them across layout calculations. It's * responsibility of the implementer of the Layout function to put values in the cache for a given * node. Values put in the LayoutCache (WriteCache) will be available for read in the next layout * pass as ReadCache. */ public final class LayoutCache { public static final class CachedData { private final Map<Node<?>, LayoutResult> mCacheByNode = new HashMap<>(); private final LongSparseArray<Object> mCacheById = new LongSparseArray<>(); } private final CachedData mWriteCache = new CachedData(); private final @Nullable CachedData mReadCache; public LayoutCache() { this(null); } public LayoutCache(@Nullable CachedData oldWriteCache) { mReadCache = oldWriteCache; } @Nullable public LayoutResult get(Node<?> node) { return mReadCache == null ? null : mReadCache.mCacheByNode.get(node); } public void put(Node<?> node, LayoutResult layout) { mWriteCache.mCacheByNode.put(node, layout); } @Nullable public <T> T get(long uniqueId) { //noinspection unchecked return (T) (mReadCache == null ? null : mReadCache.mCacheById.get(uniqueId)); } public void put(long uniqueId, Object value) { mWriteCache.mCacheById.put(uniqueId, value); } public CachedData getWriteCacheData() { return mWriteCache; } }
[ "facebook-github-bot@users.noreply.github.com" ]
facebook-github-bot@users.noreply.github.com
f7d12d887f54217621214733ab7af8addf6cf8aa
bd5e2dc8147083ea5568182674c04f71588b8e51
/hansen-common-service/src/main/java/com/vo/LoginVo.java
d58d675bd880f3f8cc14e1a9160bdf6a05cfd2f0
[]
no_license
dream-home/hs
78be324327f350c4fad98a478c47f39df4efda72
2ee2183815e869d1df2bf19286b91d3d3ec14119
refs/heads/master
2021-07-03T19:40:57.347267
2017-09-26T08:27:48
2017-09-26T08:27:48
104,856,200
0
0
null
null
null
null
UTF-8
Java
false
false
1,165
java
package com.vo; /** * 用户登录信息 * @author qsy * @version v1.0 * @date 2016年11月27日 */ public class LoginVo { /** * 登录名 */ private String loginName; /** * 密码 */ private String password; /** * 验证码key */ private String imgKey; /** * 验证码 */ private String picCode; /** * @return the imgKey */ public String getImgKey() { return imgKey; } /** * @param imgKey the imgKey to set */ public void setImgKey(String imgKey) { this.imgKey = imgKey; } /** * @return the picCode */ public String getPicCode() { return picCode; } /** * @param picCode the picCode to set */ public void setPicCode(String picCode) { this.picCode = picCode; } /** * @return the loginName */ public String getLoginName() { return loginName; } /** * @param loginName the loginName to set */ public void setLoginName(String loginName) { this.loginName = loginName; } /** * @return the password */ public String getPassword() { return password; } /** * @param password the password to set */ public void setPassword(String password) { this.password = password; } }
[ "1510331524@qq.com" ]
1510331524@qq.com
c3de58c79f181dd1220bbe4ca13b60bc1411731b
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/training/edu/umd/cs/findbugs/ba/generic/TestGenericObjectType.java
c1af66241faaf1842fe54da0308e8833bb683b33
[]
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
1,752
java
/** * FindBugs - Find Bugs in Java programs * Copyright (C) 2006, University of Maryland * * This library 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 2.1 of the License, or (at your option) any later version. * * This library 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 library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package edu.umd.cs.findbugs.ba.generic; import GenericUtilities.TypeCategory.PARAMETERIZED; import edu.umd.cs.findbugs.ba.generic.GenericUtilities.TypeCategory; import java.util.List; import javax.annotation.Nullable; import org.apache.bcel.generic.ReferenceType; import org.apache.bcel.generic.Type; import org.junit.Test; /** * * * @author Nat Ayewah */ public class TestGenericObjectType { GenericObjectType obj; String javaSignature; String underlyingClass; TypeCategory typeCategory; @Nullable String variable; @Nullable Type extension; List<ReferenceType> parameters; @Test public void testParameterizedList() { initTest("Ljava/util/List<Ljava/lang/Comparable;>;", "java.util.List<java.lang.Comparable>", "java.util.List", PARAMETERIZED, null, null, GenericUtilities.getTypeParameters("Ljava/lang/Comparable;")); processTest(); } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
1fbe3022d89b6ff9e1e1cefbcc36a21cc196895f
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/18/18_60f48794646792b9709ee1ac452c186d9b517c24/TextFileFilter/18_60f48794646792b9709ee1ac452c186d9b517c24_TextFileFilter_t.java
cdcf16f30dbd43377f4783949f3d11a422aabc2b
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,418
java
package be.ibridge.kettle.trans.step.textfileinput; public class TextFileFilter implements Cloneable { /** The position of the occurence of the filter string to check at */ private int filterPosition; /** The string to filter on */ private String filterString; /** True if we want to stop when we reach a filter line */ private boolean filterLastLine; /** * @param filterPosition The position of the occurence of the filter string to check at * @param filterString The string to filter on * @param filterLastLine True if we want to stop when we reach a filter string on the specified position * False if you just want to skip the line. */ public TextFileFilter(int filterPosition, String filterString, boolean filterLastLine) { this.filterPosition = filterPosition; this.filterString = filterString; this.filterLastLine = filterLastLine; } public TextFileFilter() { } public Object clone() { try { Object retval = super.clone(); return retval; } catch(CloneNotSupportedException e) { return null; } } /** * @return Returns the filterLastLine. */ public boolean isFilterLastLine() { return filterLastLine; } /** * @param filterLastLine The filterLastLine to set. */ public void setFilterLastLine(boolean filterLastLine) { this.filterLastLine = filterLastLine; } /** * @return Returns the filterPosition. */ public int getFilterPosition() { return filterPosition; } /** * @param filterPosition The filterPosition to set. */ public void setFilterPosition(int filterPosition) { this.filterPosition = filterPosition; } /** * @return Returns the filterString. */ public String getFilterString() { return filterString; } /** * @param filterString The filterString to set. */ public void setFilterString(String filterString) { this.filterString = filterString; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
69173f8b229ea0b2dc0776b3dd6486c373edfd6b
ff7aa88dfc87442420d252d07902fe6ac19d4b04
/app/src/main/java/com/pcjr/pcjr_oa/ui/adapter/ContractAdapter.java
4c495d4edad3b3eb7a1d113492c9ddc57c0a4469
[]
no_license
MairoJack/Pcjr_oa
b842e8d9d4e78400122ab50292ea949461fee11c
2ec6fd8f41daa5bf789f96102ef3a3616c1cdc20
refs/heads/master
2021-09-01T23:58:06.029245
2017-12-29T08:51:09
2017-12-29T08:51:09
106,526,876
0
1
null
null
null
null
UTF-8
Java
false
false
793
java
package com.pcjr.pcjr_oa.ui.adapter; import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseViewHolder; import com.pcjr.pcjr_oa.R; import com.pcjr.pcjr_oa.bean.Contract; import com.pcjr.pcjr_oa.utils.DateUtils; /** * Created by mario on 2017/7/25. */ public class ContractAdapter extends BaseQuickAdapter<Contract, BaseViewHolder> { public ContractAdapter() { super(R.layout.item_contract); } @Override protected void convert(BaseViewHolder helper, Contract item) { helper.setText(R.id.txt_title, item.getContractNo()); helper.setText(R.id.txt_name, item.getCreatePersonName()); helper.setText(R.id.txt_time, DateUtils.longTimeToStr(item.getJoinDate(), DateUtils.DATE_FORMAT_YYYY_MM_DD)); } }
[ "541496358@qq.com" ]
541496358@qq.com
f558c0d4bf3d0acbf4c44824e24a549932c6b3ab
daed78503c8fdcfb0ad06002c3ac58d8a82e8718
/intellij/org.eclipse.xtext.core.idea.tests/xtend-gen/org/eclipse/xtext/formatting2/internal/idea/FormatterTestLanguageIdeaSetup.java
448e26986a944fd113936ab0d22a362e55402a2c
[ "LicenseRef-scancode-generic-cla" ]
no_license
knutwannheden/xtext
d85e145a33a5c5cf267576c3afa0938d9ffac862
4ba27914b8a65062f5f82ba2c80fc4233253c359
refs/heads/master
2021-01-17T22:14:56.783054
2015-07-15T07:46:23
2015-07-15T07:46:23
2,587,823
2
0
null
null
null
null
UTF-8
Java
false
false
799
java
package org.eclipse.xtext.formatting2.internal.idea; import com.google.inject.Injector; import org.eclipse.xtext.ISetup; import org.eclipse.xtext.formatting2.internal.idea.FormatterTestLanguageStandaloneSetupIdea; import org.eclipse.xtext.idea.extensions.EcoreGlobalRegistries; @SuppressWarnings("all") public class FormatterTestLanguageIdeaSetup implements ISetup { @Override public Injector createInjectorAndDoEMFRegistration() { Injector _xblockexpression = null; { EcoreGlobalRegistries.ensureInitialized(); FormatterTestLanguageStandaloneSetupIdea _formatterTestLanguageStandaloneSetupIdea = new FormatterTestLanguageStandaloneSetupIdea(); _xblockexpression = _formatterTestLanguageStandaloneSetupIdea.createInjector(); } return _xblockexpression; } }
[ "anton.kosyakov@itemis.de" ]
anton.kosyakov@itemis.de
7061166c97d6e194c1344ab98b741d43e0dea7c2
9f907527f44fdfc33b5add9f8d313bbeb96d1192
/src/codeforces/contests101_200/problemset144/Meeting.java
0cbdfdcc5074649d40628b6bc0ff9d1a179e1bb4
[]
no_license
kocko/algorithms
7af7052b13a080992dcfbff57171a2cac7c50c67
382b6b50538220a26e1af1644e72a4e1796374b6
refs/heads/master
2023-08-03T21:15:27.070471
2023-08-03T14:39:45
2023-08-03T14:39:45
45,342,667
5
0
null
null
null
null
UTF-8
Java
false
false
4,051
java
package codeforces.contests101_200.problemset144; import java.io.BufferedReader; import java.io.Closeable; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer; public class Meeting implements Closeable { private InputReader in = new InputReader(System.in); private PrintWriter out = new PrintWriter(System.out); private class Radiator { private int x, y, range; private Radiator(int x, int y, int range) { this.x = x; this.y = y; this.range = range; } } private class General { private int x, y; private General(int x, int y) { this.x = x; this.y = y; } } public void solve() { int xa = in.ni(), ya = in.ni(), xb = in.ni(), yb = in.ni(); int n = in.ni(); List<Radiator> radiators = new ArrayList<>(); for (int i = 0; i < n; i++) { radiators.add(new Radiator(in.ni(), in.ni(), in.ni())); } int from_x = Math.min(xa, xb), to_x = Math.max(xa, xb); int from_y = Math.min(ya, yb), to_y = Math.max(ya, yb); List<General> generals = findGenerals(from_x, to_x, from_y, to_y); int result = 0; for (General general : generals) { boolean warm = false; for (Radiator radiator : radiators) { if (within(general, radiator)) { warm = true; break; } } if (!warm) result++; } out.println(result); } private List<General> findGenerals(int from_x, int to_x, int from_y, int to_y) { List<General> result = new ArrayList<>(); result.add(new General(from_x, from_y)); result.add(new General(from_x, to_y)); result.add(new General(to_x, from_y)); result.add(new General(to_x, to_y)); for (int x = from_x + 1; x < to_x; x++) { result.add(new General(x, from_y)); } for (int x = from_x + 1; x < to_x; x++) { result.add(new General(x, to_y)); } for (int y = from_y + 1; y < to_y; y++) { result.add(new General(from_x, y)); } for (int y = from_y + 1; y < to_y; y++) { result.add(new General(to_x, y)); } return result; } private boolean within(General general, Radiator radiator) { double dist = Math.sqrt((general.x - radiator.x) * (general.x - radiator.x) + (general.y - radiator.y) * (general.y - radiator.y)); return dist <= radiator.range; } @Override public void close() throws IOException { in.close(); out.close(); } static class InputReader { public BufferedReader reader; public StringTokenizer tokenizer; public InputReader(InputStream stream) { reader = new BufferedReader(new InputStreamReader(stream), 32768); tokenizer = null; } public String next() { while (tokenizer == null || !tokenizer.hasMoreTokens()) { try { tokenizer = new StringTokenizer(reader.readLine()); } catch (IOException e) { throw new RuntimeException(e); } } return tokenizer.nextToken(); } public int ni() { return Integer.parseInt(next()); } public long nl() { return Long.parseLong(next()); } public void close() throws IOException { reader.close(); } } public static void main(String[] args) throws IOException { try (Meeting instance = new Meeting()) { instance.solve(); } } }
[ "konstantin.yovkov@tis.biz" ]
konstantin.yovkov@tis.biz
9157e8896eb9569631751395076fed358202cc0b
a23b277bd41edbf569437bdfedad22c2d7733dbe
/topcoder/ArithmeticProgression.java
17e11d9a81acf258e0a4a7cfe7b13d75c6f9d9c5
[]
no_license
alexandrofernando/java
155ed38df33ae8dae641d327be3c6c355b28082a
a783407eaba29a88123152dd5b2febe10eb7bf1d
refs/heads/master
2021-01-17T06:49:57.241130
2019-07-19T11:34:44
2019-07-19T11:34:44
52,783,678
1
0
null
2017-07-03T21:46:00
2016-02-29T10:38:28
Java
UTF-8
Java
false
false
1,155
java
public class ArithmeticProgression { public double minCommonDifference(int a0, int[] seq) { final int INFINITE = 10000000; int a[] = new int[seq.length + 1]; a[0] = a0; for (int i = 1; i < a.length; i++) { a[i] = seq[i - 1]; } Rational lower = new Rational(0, 1); Rational upper = new Rational(INFINITE, 1); for (int i = 1; i < a.length; i++) { if (a[i] < a[i - 1]) { return -1; } lower = Rational.max(lower, new Rational(a[i] - a[0], i)); upper = Rational.min(upper, new Rational(a[i] - a[0] + 1, i)); if (Rational.compare(lower, upper) >= 0) { return -1; } } return (double) lower.numerator / lower.denominator; } } class Rational { int numerator; int denominator; public Rational(int numerator, int denominator) { this.numerator = numerator; this.denominator = denominator; } static int compare(Rational r1, Rational r2) { return r1.numerator * r2.denominator - r1.denominator * r2.numerator; } static Rational max(Rational r1, Rational r2) { return (compare(r1, r2) > 0) ? r1 : r2; } static Rational min(Rational r1, Rational r2) { return (compare(r1, r2) < 0) ? r1 : r2; } }
[ "alexandrofernando@gmail.com" ]
alexandrofernando@gmail.com
5032e1341643e8f7f267ef8a1037f6d0c62481b2
2b0694f0563192e2d148d130164e94faf3b4e12f
/疯狂Android讲义源码/02/2.1/CustomView/src/org/crazyit/customview/CustomView.java
cc54fdf194992d2596db514162f2f3b7b2e93636
[]
no_license
bxh7425014/BookCode
4757956275cf540e9996b9064d981f6da75c9602
8996b36e689861d55662d15c5db8b0eb498c864b
refs/heads/master
2020-05-23T00:48:51.430340
2017-02-06T01:04:25
2017-02-06T01:04:25
84,735,079
9
3
null
null
null
null
GB18030
Java
false
false
1,497
java
package org.crazyit.customview; import org.crazyit.customview.R; import org.crazyit.customview.R.layout; import android.app.Activity; import android.os.Bundle; import android.view.MotionEvent; import android.view.View; import android.view.View.OnTouchListener; import android.widget.LinearLayout; /** * Description: * <br/>site: <a href="http://www.crazyit.org">crazyit.org</a> * <br/>Copyright (C), 2001-2012, Yeeku.H.Lee * <br/>This program is protected by copyright laws. * <br/>Program Name: * <br/>Date: * @author Yeeku.H.Lee kongyeeku@163.com * @version 1.0 */ public class CustomView extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); //获取布局文件中的LinearLayout容器 LinearLayout root = (LinearLayout)findViewById(R.id.root); //创建DrawView组件 final DrawView draw = new DrawView(this); //设置自定义组件的最大宽度、高度 draw.setMinimumWidth(300); draw.setMinimumHeight(500); //为draw组件绑定Touch事件 draw.setOnTouchListener(new OnTouchListener() { @Override public boolean onTouch(View arg0, MotionEvent event) { //修改draw组件的currentX、currentY两个属性 draw.currentX = event.getX(); draw.currentY = event.getY(); //通知draw组件重绘 draw.invalidate(); //返回true表明处理方法已经处理该事件 return true; } }); root.addView(draw); } }
[ "bxh7425014@163.com" ]
bxh7425014@163.com
e9d698f7db4b1f466a27e094e4cfbb44724e5df3
10dd0d94b749e7f10fbbd50b4344704561d415f2
/algorithm/src/thread/template/BoundedBlockingQueue.java
0c375be2506222fa9eaf63df6be25c98f0181667
[]
no_license
chying/algorithm_group
79d0bffea56e6dc0b327f879a309cfd7c7e4133e
cd85dd08f065ae0a6a9d57831bd1ac8c8ce916ce
refs/heads/master
2020-09-13T19:10:19.074546
2020-02-13T04:12:56
2020-02-13T04:12:56
222,877,592
7
3
null
null
null
null
UTF-8
Java
false
false
281
java
package thread.template; class BoundedBlockingQueue { public BoundedBlockingQueue(int capacity) { } public void enqueue(int element) throws InterruptedException { } public int dequeue() throws InterruptedException { return 0; } public int size() { return 0; } }
[ "852342406@qq.com" ]
852342406@qq.com
40ebbb0e2e443b6f6b84879b55f896eadcf3fe3f
36faefe34e3e413bf368f6480c2a0afa7f894493
/app/src/main/java/com/example/admin/androidebook/Adapter/DownloadAdapter.java
ac022a037b0f5601365c6cac241695b84f5de8d9
[]
no_license
fandofastest/ebook
24e9acd0fbdfebb590e6ea1d87c7f67f704dbe6f
cecaaa9172bdfec59d38747b6def9ea29069fb70
refs/heads/master
2020-11-29T18:54:50.139353
2019-12-26T04:23:15
2019-12-26T04:23:15
230,194,208
0
0
null
null
null
null
UTF-8
Java
false
false
5,178
java
package com.example.admin.androidebook.Adapter; import android.app.Activity; import android.content.Intent; import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.animation.Animation; import android.view.animation.AnimationUtils; import android.widget.Button; import android.widget.RelativeLayout; import android.widget.TextView; import android.widget.Toast; import com.example.admin.androidebook.Activity.PDFShow; import com.example.admin.androidebook.DataBase.DatabaseHandler; import com.example.admin.androidebook.Item.DownloadList; import com.example.admin.androidebook.R; import com.folioreader.model.HighLight; import com.folioreader.util.FolioReader; import com.folioreader.util.OnHighlightListener; import com.makeramen.roundedimageview.RoundedImageView; import com.squareup.picasso.Picasso; import java.util.List; /** * Created by admin on 01-01-2018. */ public class DownloadAdapter extends RecyclerView.Adapter<DownloadAdapter.ViewHolder> { private Activity activity; private List<DownloadList> downloadLists; private int lastPosition = -1; private DatabaseHandler db; public DownloadAdapter(Activity activity, List<DownloadList> downloadLists) { this.activity = activity; this.downloadLists = downloadLists; db = new DatabaseHandler(activity); } @Override public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { View view = LayoutInflater.from(activity).inflate(R.layout.download_adapter, parent, false); return new ViewHolder(view); } @Override public void onBindViewHolder(ViewHolder holder, final int position) { holder.textView_Name.setText(downloadLists.get(position).getTitle()); holder.textView_author.setText(downloadLists.get(position).getAuthor()); Picasso.with(activity).load("file://" + downloadLists.get(position).getImage()).placeholder(R.drawable.placeholder_landscap).into(holder.imageView); holder.relativeLayout.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (downloadLists.get(position).getUrl().contains(".epub")) { FolioReader folioReader = new FolioReader(activity); folioReader.registerHighlightListener(new OnHighlightListener() { @Override public void onHighlight(HighLight highlight, HighLight.HighLightAction type) { } }); folioReader.openBook(downloadLists.get(position).getUrl()); } else { activity.startActivity(new Intent(activity, PDFShow.class) .putExtra("link", downloadLists.get(position).getUrl()) .putExtra("toolbarTitle", downloadLists.get(position).getTitle()) .putExtra("type", "file")); } } }); holder.button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (!db.checkIdPdf(downloadLists.get(position).getId())) { db.deletePdf(downloadLists.get(position).getId()); downloadLists.remove(position); notifyDataSetChanged(); } else { Toast.makeText(activity, activity.getResources().getString(R.string.no_data), Toast.LENGTH_SHORT).show(); } } }); if (position > lastPosition) { if (position % 2 == 0) { Animation animation = AnimationUtils.loadAnimation(activity, R.anim.up_from_bottom_right); holder.itemView.startAnimation(animation); lastPosition = position; } else { Animation animation = AnimationUtils.loadAnimation(activity, R.anim.up_from_bottom_left); holder.itemView.startAnimation(animation); lastPosition = position; } } } @Override public int getItemCount() { return downloadLists.size(); } public class ViewHolder extends RecyclerView.ViewHolder { private RelativeLayout relativeLayout; private RoundedImageView imageView; private TextView textView_Name, textView_author; private Button button; public ViewHolder(View itemView) { super(itemView); relativeLayout = (RelativeLayout) itemView.findViewById(R.id.relativelayout_download_adapter); button = (Button) itemView.findViewById(R.id.button_delete_adapter); imageView = (RoundedImageView) itemView.findViewById(R.id.imageView_download_adapter); textView_Name = (TextView) itemView.findViewById(R.id.textViewName_download_adapter); textView_author = (TextView) itemView.findViewById(R.id.textView_subTitle_download_adapter); } } }
[ "fandofast@gmail.com" ]
fandofast@gmail.com
eeb44179b9742030853134ac36110c18467c5703
3b69b71639aad070c0134ca81bf4e9b4c3f3c272
/sampleAnalyseCode/src/main/java/com/codemage/datastuctures/Method.java
1de9efdc4bbbbc9cb744e5be33fc7cc54381c178
[ "Apache-2.0" ]
permissive
hasithalakmal/CodeAnalyser
54a6c41f0489f3da503081409c1a3f52acb07294
3afa0d900d9284d7a9a5da4cff0223298cac24c8
refs/heads/master
2021-01-12T11:09:55.565649
2016-11-06T16:51:07
2016-11-06T16:51:07
72,855,724
0
0
null
null
null
null
UTF-8
Java
false
false
2,557
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.codemage.datastuctures; /** * * @author Hasitha Lakmal */ public class Method { private int methID; private String methName; private int numberOfElementIO; private int numberOf1dIO; private int numberOfmdIO; private int maxCallingDistence; private int callingModuleWeight; private String methCodeline; private int lineNum; public int getMethID() { return methID; } public void setMethID(int methID) { this.methID = methID; } public int getNumberOfElementIO() { return numberOfElementIO; } public void setNumberOfElementIO(int numberOfElementIO) { this.numberOfElementIO = numberOfElementIO; } public int getNumberOf1dIO() { return numberOf1dIO; } public void setNumberOf1dIO(int numberOf1dIO) { this.numberOf1dIO = numberOf1dIO; } public int getNumberOfmdIO() { return numberOfmdIO; } public void setNumberOfmdIO(int numberOfmdIO) { this.numberOfmdIO = numberOfmdIO; } public int getMaxCallingDistence() { return maxCallingDistence; } public void setMaxCallingDistence(int maxCallingDistence) { this.maxCallingDistence = maxCallingDistence; } public int getCallingModuleWeight() { return callingModuleWeight; } public void setCallingModuleWeight(int callingModuleWeight) { this.callingModuleWeight = callingModuleWeight; } public String getMethCodeline() { return methCodeline; } public void setMethCodeline(String methCodeline) { this.methCodeline = methCodeline; } public String getMethName() { return methName; } public void setMethName(String methName) { this.methName = methName; } @Override public String toString() { return "Method{" + "methID=" + methID + ", methName=" + methName + ", numberOfElementIO=" + numberOfElementIO + ", numberOf1dIO=" + numberOf1dIO + ", numberOfmdIO=" + numberOfmdIO + ", maxCallingDistence=" + maxCallingDistence + ", callingModuleWeight=" + callingModuleWeight + ", methCodeline=" + methCodeline + '}'; } public int getLineNum() { return lineNum; } public void setLineNum(int lineNum) { this.lineNum = lineNum; } }
[ "ghasithalakmal@gmail.com" ]
ghasithalakmal@gmail.com
c6dad2957e2c5030b7b267c4f9d213d77bdeef82
cd2149faec90309745f582511e4b433e8892e7d2
/src/main/java/com/fe/v43/UbicacionType.java
1bb395db89cc09a421ada5b4e7fc04fc975ae9da
[]
no_license
alvarogrojas/facturaelectronica
061abfc4779cba8cffba09607f2f34dc3bbf115b
cc16ef4eea5469a0509f0f145af28d6e9a66a064
refs/heads/master
2023-01-21T12:09:49.725655
2020-12-05T14:09:36
2020-12-05T14:09:36
288,523,997
0
0
null
null
null
null
UTF-8
Java
false
false
5,747
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 // 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.09 at 11:06:27 AM CST // package com.fe.v43; import java.math.BigInteger; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for UbicacionType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="UbicacionType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="Provincia"> * &lt;simpleType> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}positiveInteger"> * &lt;totalDigits value="1"/> * &lt;pattern value="\d"/> * &lt;/restriction> * &lt;/simpleType> * &lt;/element> * &lt;element name="Canton"> * &lt;simpleType> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}positiveInteger"> * &lt;totalDigits value="2"/> * &lt;pattern value="\d\d"/> * &lt;/restriction> * &lt;/simpleType> * &lt;/element> * &lt;element name="Distrito"> * &lt;simpleType> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}positiveInteger"> * &lt;totalDigits value="2"/> * &lt;pattern value="\d\d"/> * &lt;/restriction> * &lt;/simpleType> * &lt;/element> * &lt;element name="Barrio" minOccurs="0"> * &lt;simpleType> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}positiveInteger"> * &lt;totalDigits value="2"/> * &lt;pattern value="\d\d"/> * &lt;/restriction> * &lt;/simpleType> * &lt;/element> * &lt;element name="OtrasSenas"> * &lt;simpleType> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"> * &lt;maxLength value="250"/> * &lt;/restriction> * &lt;/simpleType> * &lt;/element> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "UbicacionType", namespace = "https://cdn.comprobanteselectronicos.go.cr/xml-schemas/v4.3/facturaElectronica", propOrder = { "provincia", "canton", "distrito", "barrio", "otrasSenas" }) public class UbicacionType { @XmlElement(name = "Provincia", required = true) protected BigInteger provincia; @XmlElement(name = "Canton", required = true) protected BigInteger canton; @XmlElement(name = "Distrito", required = true) protected BigInteger distrito; @XmlElement(name = "Barrio") protected BigInteger barrio; @XmlElement(name = "OtrasSenas", required = true) protected String otrasSenas; /** * Gets the value of the provincia property. * * @return * possible object is * {@link BigInteger } * */ public BigInteger getProvincia() { return provincia; } /** * Sets the value of the provincia property. * * @param value * allowed object is * {@link BigInteger } * */ public void setProvincia(BigInteger value) { this.provincia = value; } /** * Gets the value of the canton property. * * @return * possible object is * {@link BigInteger } * */ public BigInteger getCanton() { return canton; } /** * Sets the value of the canton property. * * @param value * allowed object is * {@link BigInteger } * */ public void setCanton(BigInteger value) { this.canton = value; } /** * Gets the value of the distrito property. * * @return * possible object is * {@link BigInteger } * */ public BigInteger getDistrito() { return distrito; } /** * Sets the value of the distrito property. * * @param value * allowed object is * {@link BigInteger } * */ public void setDistrito(BigInteger value) { this.distrito = value; } /** * Gets the value of the barrio property. * * @return * possible object is * {@link BigInteger } * */ public BigInteger getBarrio() { return barrio; } /** * Sets the value of the barrio property. * * @param value * allowed object is * {@link BigInteger } * */ public void setBarrio(BigInteger value) { this.barrio = value; } /** * Gets the value of the otrasSenas property. * * @return * possible object is * {@link String } * */ public String getOtrasSenas() { return otrasSenas; } /** * Sets the value of the otrasSenas property. * * @param value * allowed object is * {@link String } * */ public void setOtrasSenas(String value) { this.otrasSenas = value; } }
[ "aagonzalezrojas@gmail.com" ]
aagonzalezrojas@gmail.com
443ff7bf54b2077d766c8eb83a109d979686b749
e217c7b807fb594c502e95af158fa22620726e7a
/org.kevoree.experiment.xacml/src/main/java/policy/impl/SessionImpl.java
839a8ccc543bcd58d23cb471f0c7781ec7760838
[]
no_license
dukeboard/kevoree-experiment
fdea13d2f81fc12957c929a3e4da1d09a47a9eb6
9c58f7be87421ca35121584bf3635287865a6592
refs/heads/master
2020-12-30T10:23:24.190959
2013-11-11T15:38:06
2013-11-11T15:38:06
2,078,144
0
0
null
null
null
null
UTF-8
Java
false
false
6,412
java
/** * <copyright> * </copyright> * * $Id$ */ package policy.impl; import java.util.Collection; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; import org.eclipse.emf.ecore.util.InternalEList; import policy.PolicyPackage; import policy.Role; import policy.Session; import policy.User; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Session</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link policy.impl.SessionImpl#getUser <em>User</em>}</li> * <li>{@link policy.impl.SessionImpl#getRoles <em>Roles</em>}</li> * </ul> * </p> * * @generated */ public class SessionImpl extends PolicyElementImpl implements Session { /** * The cached value of the '{@link #getUser() <em>User</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getUser() * @generated * @ordered */ protected User user; /** * The cached value of the '{@link #getRoles() <em>Roles</em>}' reference list. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getRoles() * @generated * @ordered */ protected EList<Role> roles; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected SessionImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return PolicyPackage.Literals.SESSION; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public User getUser() { if (user != null && user.eIsProxy()) { InternalEObject oldUser = (InternalEObject)user; user = (User)eResolveProxy(oldUser); if (user != oldUser) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, PolicyPackage.SESSION__USER, oldUser, user)); } } return user; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public User basicGetUser() { return user; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotificationChain basicSetUser(User newUser, NotificationChain msgs) { User oldUser = user; user = newUser; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PolicyPackage.SESSION__USER, oldUser, newUser); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setUser(User newUser) { if (newUser != user) { NotificationChain msgs = null; if (user != null) msgs = ((InternalEObject)user).eInverseRemove(this, PolicyPackage.USER__SESSION, User.class, msgs); if (newUser != null) msgs = ((InternalEObject)newUser).eInverseAdd(this, PolicyPackage.USER__SESSION, User.class, msgs); msgs = basicSetUser(newUser, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, PolicyPackage.SESSION__USER, newUser, newUser)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EList<Role> getRoles() { if (roles == null) { roles = new EObjectWithInverseResolvingEList.ManyInverse<Role>(Role.class, this, PolicyPackage.SESSION__ROLES, PolicyPackage.ROLE__SESSIONS); } return roles; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @SuppressWarnings("unchecked") @Override public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case PolicyPackage.SESSION__USER: if (user != null) msgs = ((InternalEObject)user).eInverseRemove(this, PolicyPackage.USER__SESSION, User.class, msgs); return basicSetUser((User)otherEnd, msgs); case PolicyPackage.SESSION__ROLES: return ((InternalEList<InternalEObject>)(InternalEList<?>)getRoles()).basicAdd(otherEnd, msgs); } return super.eInverseAdd(otherEnd, featureID, msgs); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case PolicyPackage.SESSION__USER: return basicSetUser(null, msgs); case PolicyPackage.SESSION__ROLES: return ((InternalEList<?>)getRoles()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case PolicyPackage.SESSION__USER: if (resolve) return getUser(); return basicGetUser(); case PolicyPackage.SESSION__ROLES: return getRoles(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case PolicyPackage.SESSION__USER: setUser((User)newValue); return; case PolicyPackage.SESSION__ROLES: getRoles().clear(); getRoles().addAll((Collection<? extends Role>)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case PolicyPackage.SESSION__USER: setUser((User)null); return; case PolicyPackage.SESSION__ROLES: getRoles().clear(); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case PolicyPackage.SESSION__USER: return user != null; case PolicyPackage.SESSION__ROLES: return roles != null && !roles.isEmpty(); } return super.eIsSet(featureID); } } //SessionImpl
[ "olivier-nathanael.ben_david@inria.fr" ]
olivier-nathanael.ben_david@inria.fr
dd7eb2cfd6bd1bbd08ca5950ca884ceee1212ecc
d42072b4bcb2f254fbf22416ad7c3405e98c3edb
/21_Dynamic_Filtering_Boot/src/main/java/ua/mapper/UserMapper.java
682ed855e458acc77cc3450db623b42b028544bd
[]
no_license
SokolSerhiy/Logos
ec8423581d14d98fa768b8be45264f0e245d73a8
6f4f62b2abc9d5688695778edc69363dd1b39192
refs/heads/master
2021-01-01T20:35:03.276125
2017-08-20T23:02:35
2017-08-20T23:02:35
41,263,797
15
23
null
null
null
null
UTF-8
Java
false
false
833
java
package ua.mapper; import org.springframework.security.core.authority.AuthorityUtils; import org.springframework.security.core.userdetails.User; import ua.domain.request.RegistrationRequest; import ua.entity.Role; import ua.entity.UserEntity; public interface UserMapper { public static User toUser(UserEntity entity){ return new User(entity.getEmail(), entity.getPassword(), AuthorityUtils.createAuthorityList(String.valueOf(entity.getRole()))); } public static UserEntity toUserEntity(RegistrationRequest request){ UserEntity entity = new UserEntity(); entity.setEmail(request.getEmail()); entity.setFullName(request.getFullName()); entity.setPassword(request.getPassword()); entity.setPhone(request.getPhone()); entity.setRole(request.getIsOwner() ? Role.ROLE_OWNER : Role.ROLE_USER); return entity; } }
[ "sokol.serhij@gmail.com" ]
sokol.serhij@gmail.com
b9b34e6d9578d07d4c3ffd2b70ab50664f94f35f
b1a1fe02ae0c19bcf2d35ae8b5bc745ce76b3802
/org.erlide.test_support/src/org/erlide/test_support/TestSourcePathProvider.java
9b935376d66c18e8a5a7cf74deae4ae811e6ce01
[]
no_license
liubin66/erlide
77d26069cd8df07cdb3916a18f6594ce07728ee6
25b8ea1c775c42e5c5dba4e792be146ce51ee8a9
refs/heads/master
2021-01-17T22:26:09.790303
2012-02-03T05:20:28
2012-02-03T05:20:28
3,363,877
1
0
null
null
null
null
UTF-8
Java
false
false
5,333
java
package org.erlide.test_support; import java.util.Collection; import java.util.Map; import java.util.Set; import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IResourceChangeEvent; import org.eclipse.core.resources.IResourceChangeListener; import org.eclipse.core.resources.IResourceDelta; import org.eclipse.core.resources.IResourceDeltaVisitor; import org.eclipse.core.resources.IResourceVisitor; import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.erlide.jinterface.ErlLogger; import org.erlide.utils.SourcePathProvider; import org.erlide.utils.SystemUtils; import com.google.common.collect.Maps; import com.google.common.collect.Sets; public class TestSourcePathProvider implements SourcePathProvider, IResourceChangeListener { Map<IProject, Set<IPath>> pathsMap; public TestSourcePathProvider() { pathsMap = Maps.newHashMap(); try { computeSourcePaths(); } catch (final CoreException e) { ErlLogger.warn(e); pathsMap = Maps.newHashMap(); } final IWorkspace workspace = ResourcesPlugin.getWorkspace(); workspace.addResourceChangeListener(this, IResourceChangeEvent.POST_CHANGE); } @Override public Collection<IPath> getSourcePathsForModel(final IProject project) { return getProjectPaths(project); } @Override public Collection<IPath> getSourcePathsForBuild(final IProject project) { return getProjectPaths(project); } @Override public Collection<IPath> getSourcePathsForExecution(final IProject project) { return getProjectPaths(project); } @Override public Collection<IPath> getIncludePaths(final IProject project) { return getProjectPaths(project); } private void computeSourcePaths() throws CoreException { ResourcesPlugin.getWorkspace().getRoot().accept(new IResourceVisitor() { @Override public boolean visit(final IResource resource) throws CoreException { final IProject project = resource.getProject(); if (project != null && isTestDir(resource)) { final Set<IPath> ps = getProjectPaths(project); ps.add(resource.getProjectRelativePath()); pathsMap.put(project, ps); } return true; } }); } private Set<IPath> getProjectPaths(final IProject project) { Set<IPath> ps = pathsMap.get(project); if (ps == null) { ps = Sets.newHashSet(); } return ps; } @Override public void resourceChanged(final IResourceChangeEvent event) { // TODO keep 'paths' updated final IResourceDelta delta = event.getDelta(); if (delta == null) { return; } try { final long time = System.currentTimeMillis(); delta.accept(new IResourceDeltaVisitor() { @Override public boolean visit(final IResourceDelta theDelta) throws CoreException { final IResource resource = theDelta.getResource(); if (!(resource instanceof IContainer)) { return false; } final IContainer container = (IContainer) resource; // TODO isintestpath is slow... final IPath location = container.getLocation(); final Set<IPath> paths = getProjectPaths(resource .getProject()); if (theDelta.getKind() == IResourceDelta.ADDED && !paths.contains(location) && isTestDir(container)) { paths.add(location); } if (theDelta.getKind() == IResourceDelta.REMOVED && paths.contains(location)) { paths.remove(location); } return true; } }); if (SystemUtils.hasFeatureEnabled("erlide.debug.tspp")) { System.out.println("TSPP took " + (System.currentTimeMillis() - time)); } } catch (final CoreException e) { e.printStackTrace(); } } static boolean isTestDir(final IResource resource) { if (!(resource instanceof IContainer)) { return false; } final String path = resource.getFullPath().toPortableString(); if (path.contains("garbage")) { return false; } if (path.contains("lost+found")) { return false; } try { for (final IResource res : ((IContainer) resource).members()) { if (res.getName().contains("_SUITE.erl")) { return true; } } } catch (final CoreException e) { } return false; } }
[ "vladdu55@gmail.com" ]
vladdu55@gmail.com
f879f3e99eddcca3332dfecbd460033428a7304c
b8b7a699565c6b94b3fd0434756c3de35aab042e
/chapter2/SalesTax.java
abaf9654daaea7770234b6266b6d7a77a66c71e1
[]
no_license
contactjw/java-gaddis
27ac9ad99a5a59343bbf7442f6941137f1215e6d
59052cafb11e396b486d80315698166b9ddf8d06
refs/heads/master
2020-09-10T21:48:13.464596
2020-01-15T00:54:54
2020-01-15T00:54:54
221,843,778
1
0
null
null
null
null
UTF-8
Java
false
false
857
java
package chapter2; import java.util.Scanner; public class SalesTax { public static void main(String[] args) { final double STATE_TAX = 0.04; final double COUNTY_TAX = 0.02; double purchase, totalState, totalCounty, totalTax, totalPurchase; Scanner keyboard = new Scanner(System.in); System.out.print("Enter the amount of the purchase: "); purchase = keyboard.nextDouble(); totalState = purchase * STATE_TAX; totalCounty = purchase * COUNTY_TAX; totalTax = totalState + totalCounty; totalPurchase = totalTax + purchase; System.out.println("Purchase price: $" + purchase); System.out.println("State Tax: $" + totalState); System.out.println("County Tax: $" + totalCounty); System.out.println("Total Taxes: $" + totalTax); System.out.println("Total price of purchase: $" + totalPurchase); keyboard.close(); } }
[ "contactjohnwest@gmail.com" ]
contactjohnwest@gmail.com
bcad255d745f1f29975547cc5d568883f1749420
855862d70f4eb1f0bb5643c41f5bd1e48f5c73b0
/src/main/java/org/opendaylight/yang/gen/v1/urn/etsi/osm/yang/nsd/base/rev170228/nsd/descriptor/common/User.java
9d9a815485501249fb8d8658daeda2aafdcd7603
[]
no_license
openslice/io.openslice.sol005nbi.osm10
547c407ce2fd0d39753bce6ad24df1fa7144fe21
7ce7638d8ebba962fe0329e0a181b7d54d464ca7
refs/heads/develop
2023-08-31T05:46:54.627867
2023-08-25T07:02:41
2023-08-25T07:02:41
403,761,611
0
1
null
2023-08-25T07:02:42
2021-09-06T21:22:06
Java
UTF-8
Java
false
false
3,105
java
package org.opendaylight.yang.gen.v1.urn.etsi.osm.yang.nsd.base.rev170228.nsd.descriptor.common; import java.lang.Class; import java.lang.Override; import java.lang.String; import java.util.Map; import org.eclipse.jdt.annotation.NonNull; import org.eclipse.jdt.annotation.Nullable; import org.opendaylight.yang.gen.v1.urn.etsi.osm.yang.nsd.base.rev170228.$YangModuleInfoImpl; import org.opendaylight.yang.gen.v1.urn.etsi.osm.yang.nsd.base.rev170228.NsdDescriptorCommon; import org.opendaylight.yang.gen.v1.urn.etsi.osm.yang.nsd.base.rev170228.nsd.descriptor.common.user.KeyPair; import org.opendaylight.yang.gen.v1.urn.etsi.osm.yang.nsd.base.rev170228.nsd.descriptor.common.user.KeyPairKey; import org.opendaylight.yangtools.yang.binding.Augmentable; import org.opendaylight.yangtools.yang.binding.ChildOf; import org.opendaylight.yangtools.yang.binding.CodeHelpers; import org.opendaylight.yangtools.yang.binding.Identifiable; import org.opendaylight.yangtools.yang.common.QName; /** * List of users to be added through cloud-config * * <p> * This class represents the following YANG schema fragment defined in module <b>nsd-base</b> * <pre> * list user { * key name; * leaf name { * type string; * } * leaf user-info { * type string; * } * list key-pair { * key name; * leaf name { * type string; * } * leaf key { * type string; * } * } * } * </pre>The schema path to identify an instance is * <i>nsd-base/nsd-descriptor-common/user</i> * * <p>To create instances of this class use {@link UserBuilder}. * @see UserBuilder * @see UserKey * */ public interface User extends ChildOf<NsdDescriptorCommon>, Augmentable<User>, Identifiable<UserKey> { public static final @NonNull QName QNAME = $YangModuleInfoImpl.qnameOf("user"); @Override default Class<org.opendaylight.yang.gen.v1.urn.etsi.osm.yang.nsd.base.rev170228.nsd.descriptor.common.User> implementedInterface() { return org.opendaylight.yang.gen.v1.urn.etsi.osm.yang.nsd.base.rev170228.nsd.descriptor.common.User.class; } /** * Name of the user * * * * @return <code>java.lang.String</code> <code>name</code>, or <code>null</code> if not present */ @Nullable String getName(); /** * The user name's real name * * * * @return <code>java.lang.String</code> <code>userInfo</code>, or <code>null</code> if not present */ @Nullable String getUserInfo(); /** * Used to configure the list of public keys to be injected as part of ns * instantiation * * * * @return <code>java.util.Map</code> <code>keyPair</code>, or <code>null</code> if not present */ @Nullable Map<KeyPairKey, KeyPair> getKeyPair(); /** * @return <code>java.util.Map</code> <code>keyPair</code>, or an empty list if it is not present */ default @NonNull Map<KeyPairKey, KeyPair> nonnullKeyPair() { return CodeHelpers.nonnull(getKeyPair()); } @Override UserKey key(); }
[ "ioannischatzis@gmail.com" ]
ioannischatzis@gmail.com
41f2c112b4ffb81e588550ec82399bd0dc25cbd4
afd8e1a90a2686d8dea5dfcc1a0f4c1d355f239d
/src/main/java/net/bitnine/agensbrowser/bundle/persistence/outer/model/type/LabelType.java
3f6a026cbbfdf5c0f3a2657e455b2ee2763c5695
[]
no_license
lydon-GH/agensgraph-web
ba468c9a3bb6805c273d96a183e387259754ef5b
19b993445d816ea40d5796dd9f675efca05e62d7
refs/heads/main
2023-02-23T21:54:02.484585
2021-01-30T03:15:31
2021-01-30T03:15:31
333,812,631
1
0
null
null
null
null
UTF-8
Java
false
false
7,106
java
// // Source code recreated from a .class file by IntelliJ IDEA // (powered by Fernflower decompiler) // package net.bitnine.agensbrowser.bundle.persistence.outer.model.type; import java.util.ArrayList; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import java.util.UUID; import org.json.simple.JSONArray; import org.json.simple.JSONObject; public class LabelType implements Cloneable { private String oid; private String name; private String owner; private String desc; private Long size; private Long sizeNotEmpty; private Boolean isDirty; private List<PropertyType> properties; private Set<String> neighbors; private LabelType.ElemType type; public LabelType() { this.oid = UUID.randomUUID().toString(); this.name = ""; this.type = LabelType.ElemType.NONE; this.owner = ""; this.desc = ""; this.size = 0L; this.sizeNotEmpty = 0L; this.isDirty = true; this.properties = new ArrayList(); this.neighbors = new HashSet(); } public LabelType(String name, String type) { this.oid = UUID.randomUUID().toString(); this.name = name; this.type = toElemType(type); this.owner = ""; this.desc = ""; this.size = 0L; this.sizeNotEmpty = 0L; this.isDirty = true; this.properties = new ArrayList(); this.neighbors = new HashSet(); } public LabelType(String oid, String name, String type, String owner, String desc) { this.oid = oid; this.name = name; this.type = toElemType(type); this.owner = owner; this.desc = desc; this.size = 0L; this.sizeNotEmpty = 0L; this.isDirty = true; this.properties = new ArrayList(); this.neighbors = new HashSet(); } public static final LabelType.ElemType toElemType(String elemType) { if (elemType.equalsIgnoreCase(LabelType.ElemType.EDGE.toString())) { return LabelType.ElemType.EDGE; } else { return elemType.equalsIgnoreCase(LabelType.ElemType.NODE.toString()) ? LabelType.ElemType.NODE : LabelType.ElemType.NONE; } } public String getOid() { return this.oid; } public String getName() { return this.name; } public LabelType.ElemType getType() { return this.type; } public String getOwner() { return this.owner; } public String getDesc() { return this.desc; } public Long getSize() { return this.size; } public Long getSizeNotEmpty() { return this.sizeNotEmpty; } public Boolean getIsDirty() { return this.isDirty; } public List<PropertyType> getProperties() { return this.properties; } public Set<String> getNeighbors() { return this.neighbors; } public void setOid(String oid) { this.oid = oid; } public void setName(String name) { this.name = name; } public void setType(LabelType.ElemType type) { this.type = type; } public void setOwner(String owner) { this.owner = owner; } public void setDesc(String desc) { this.desc = desc; } public void setSize(Long size) { this.size = size; } public void setSizeNotEmpty(Long sizeNotEmpty) { this.sizeNotEmpty = sizeNotEmpty; } public void setIsDirty(Boolean isDirty) { this.isDirty = isDirty; } public void setProperties(List<PropertyType> properties) { this.properties = properties; } public void setNeighbors(Set<String> neighbors) { this.neighbors = neighbors; } public void incrementSize() { this.size = this.size + 1L; } public void incrementSizeNotEmpty() { this.sizeNotEmpty = this.sizeNotEmpty + 1L; } public void resetSizeProperties(int val) { Iterator iter = this.properties.iterator(); while(iter.hasNext()) { ((PropertyType)iter.next()).setSize((long)val); } } public void incrementSizeProperties(Map<String, Object> props) { Iterator iter = this.properties.iterator(); while(iter.hasNext()) { PropertyType property = (PropertyType)iter.next(); if (props.containsKey(property.getKey())) { property.incrementSize(); } } } @Override public String toString() { return "{\"label_type\": " + this.toJson().toJSONString() + "}"; } public JSONObject toJson() { JSONObject json = new JSONObject(); json.put("oid", this.oid); json.put("name", this.name); json.put("type", this.type.toString()); json.put("owner", this.owner); json.put("desc", this.desc); json.put("size", this.size); json.put("size_not_empty", this.sizeNotEmpty); json.put("is_dirty", this.isDirty); JSONArray propertyArray = new JSONArray(); Iterator iter = this.properties.iterator(); while(iter.hasNext()) { propertyArray.add(((PropertyType)iter.next()).toJson()); } json.put("properties", propertyArray); JSONArray neighborArray = new JSONArray(); Iterator iter2 = this.neighbors.iterator(); while(iter2.hasNext()) { neighborArray.add(iter2.next()); } json.put("neighbors", neighborArray); return json; } @Override public int hashCode() { int[] prime = new int[]{17, 29, 31, 37, 73}; int result = prime[0]; result = prime[1] * result + prime[2] * (this.oid == null ? 0 : this.oid.hashCode()); return result; } public boolean equals(Object obj) { if (this == obj) { return true; } else if (obj == null) { return false; } else if (this.getClass() != obj.getClass()) { return false; } else { LabelType other = (LabelType)obj; if (this.oid != null && other.oid != null && this.oid.equals(other.oid)) { return true; } else { return this.name != null && other.name != null && this.name.equals(other.name) && this.type != null && other.type != null && this.type.equals(other.type); } } } public Object clone() throws CloneNotSupportedException { LabelType label = (LabelType)super.clone(); List<PropertyType> cloneProperties = new ArrayList(); Iterator iter = label.properties.iterator(); while(iter.hasNext()) { PropertyType cloneProp = (PropertyType)((PropertyType)iter.next()).clone(); cloneProperties.add(cloneProp); } label.setProperties(cloneProperties); return label; } public static enum ElemType { EDGE, NODE, NONE; private ElemType() { } } }
[ "447172979@qq.com" ]
447172979@qq.com
ea47f4953ab89f0705ce8472aae91c8ece49af1b
9b01ffa3db998c4bca312fd28aa977f370c212e4
/app/src/streamD/java/com/loki/singlemoduleapp/stub/SampleClass7067.java
f1163c95fb5c0b909de11feeddbec6d8531ae426
[]
no_license
SergiiGrechukha/SingleModuleApp
932488a197cb0936785caf0e73f592ceaa842f46
b7fefea9f83fd55dbbb96b506c931cc530a4818a
refs/heads/master
2022-05-13T17:15:21.445747
2017-07-30T09:55:36
2017-07-30T09:56:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
281
java
package com.loki.singlemoduleapp.stub; public class SampleClass7067 { private SampleClass7068 sampleClass; public SampleClass7067(){ sampleClass = new SampleClass7068(); } public String getClassName() { return sampleClass.getClassName(); } }
[ "sergey.grechukha@gmail.com" ]
sergey.grechukha@gmail.com
a8743daed08ea9953bb42c21dc14c2741974b3f8
f4e15ee34808877459d81fd601d6be03bdfb4a9d
/impl/org/controlsfx/version/VersionChecker.java
8b04faf465ea657aafe98d47e6c7889a715b7c47
[]
no_license
Lianite/wurm-server-reference
369081debfa72f44eafc6a080002c4a3970f8385
e4dd8701e4af13901268cf9a9fa206fcb5196ff0
refs/heads/master
2023-07-22T16:06:23.426163
2020-04-07T23:15:35
2020-04-07T23:15:35
253,933,452
0
0
null
null
null
null
UTF-8
Java
false
false
3,710
java
// // Decompiled by Procyon v0.5.30 // package impl.org.controlsfx.version; import com.sun.javafx.runtime.VersionInfo; import java.io.IOException; import java.io.Reader; import java.io.FileReader; import java.io.File; import java.util.Properties; public class VersionChecker { private static final String javaFXVersion; private static final String controlsFXSpecTitle; private static final String controlsFXSpecVersion; private static final String controlsFXImpVersion; private static final Package controlsFX; private static Properties props; public static void doVersionCheck() { if (VersionChecker.controlsFXSpecVersion == null) { return; } final Comparable[] splitSpecVersion = toComparable(VersionChecker.controlsFXSpecVersion.split("\\.")); final Comparable[] splitJavaVersion = toComparable(VersionChecker.javaFXVersion.replace('-', '.').split("\\.")); boolean notSupportedVersion = false; if (splitSpecVersion[0].compareTo(splitJavaVersion[0]) > 0) { notSupportedVersion = true; } else if (splitSpecVersion[0].compareTo(splitJavaVersion[0]) == 0 && splitSpecVersion[1].compareTo(splitJavaVersion[2]) > 0) { notSupportedVersion = true; } if (notSupportedVersion) { throw new RuntimeException("ControlsFX Error: ControlsFX " + VersionChecker.controlsFXImpVersion + " requires at least " + VersionChecker.controlsFXSpecTitle); } } private static Comparable<Comparable>[] toComparable(final String[] tokens) { final Comparable[] ret = new Comparable[tokens.length]; for (int i = 0; i < tokens.length; ++i) { final String token = tokens[i]; try { ret[i] = new Integer(token); } catch (NumberFormatException e) { ret[i] = token; } } return (Comparable<Comparable>[])ret; } private static String getControlsFXSpecificationTitle() { try { return VersionChecker.controlsFX.getSpecificationTitle(); } catch (NullPointerException ex) { return getPropertyValue("controlsfx_specification_title"); } } private static String getControlsFXSpecificationVersion() { try { return VersionChecker.controlsFX.getSpecificationVersion(); } catch (NullPointerException ex) { return getPropertyValue("controlsfx_specification_title"); } } private static String getControlsFXImplementationVersion() { try { return VersionChecker.controlsFX.getImplementationVersion(); } catch (NullPointerException ex) { return getPropertyValue("controlsfx_specification_title") + getPropertyValue("artifact_suffix"); } } private static synchronized String getPropertyValue(final String key) { if (VersionChecker.props == null) { try { final File file = new File("../controlsfx-build.properties"); if (file.exists()) { VersionChecker.props.load(new FileReader(file)); } } catch (IOException ex) {} } return VersionChecker.props.getProperty(key); } static { controlsFX = VersionChecker.class.getPackage(); javaFXVersion = VersionInfo.getVersion(); controlsFXSpecTitle = getControlsFXSpecificationTitle(); controlsFXSpecVersion = getControlsFXSpecificationVersion(); controlsFXImpVersion = getControlsFXImplementationVersion(); } }
[ "jdraco6@gmail.com" ]
jdraco6@gmail.com
9fb8573eb3dbefbc48e36f7fa84790e238603cf3
37634d1ecae018b3074192ba36be568e0369d4c4
/util/src/main/java/org/geojsf/factory/builder/GeoJsonFactoryBuilder.java
de8679a9fcc420f71f19e88be3ef996ca538fd6d
[]
no_license
aht-group/geojsf
5fce26472a30576e6fde84a753e4f46121fb7c99
e1dab2b6aae851f00ba55bb98aad539ec5ee9aa6
refs/heads/master
2023-08-30T15:57:16.554160
2023-08-28T13:38:30
2023-08-28T13:38:30
41,243,601
0
0
null
null
null
null
UTF-8
Java
false
false
1,555
java
package org.geojsf.factory.builder; import org.geojsf.factory.ejb.meta.EjbGeoJsonDataFactory; import org.geojsf.interfaces.model.json.GeoJsfJsonData; import org.geojsf.interfaces.model.json.GeoJsfJsonQuality; import org.geojsf.interfaces.model.json.GeoJsfLocationLevel; import org.jeesl.factory.builder.AbstractFactoryBuilder; import org.jeesl.interfaces.model.system.locale.JeeslDescription; import org.jeesl.interfaces.model.system.locale.JeeslLang; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class GeoJsonFactoryBuilder<L extends JeeslLang, D extends JeeslDescription, JSON extends GeoJsfJsonData<L,D,JQ,JL>, JQ extends GeoJsfJsonQuality<JQ,L,D,?>, JL extends GeoJsfLocationLevel<L,D,JL,?> > extends AbstractFactoryBuilder<L,D> { final static Logger logger = LoggerFactory.getLogger(GeoJsonFactoryBuilder.class); private final Class<JSON> cJson; public Class<JSON> getClassJson() {return cJson;} private final Class<JQ> cJsonQuality; public Class<JQ> getClassQuality() {return cJsonQuality;} private final Class<JL> cLocationLevel; public Class<JL> getClassLevel() {return cLocationLevel;} public GeoJsonFactoryBuilder(final Class<L> cL, final Class<D> cD, final Class<JSON> cJson, final Class<JQ> cJsonQuality, final Class<JL> cLocationLevel) { super(cL,cD); this.cJson=cJson; this.cJsonQuality=cJsonQuality; this.cLocationLevel=cLocationLevel; } public EjbGeoJsonDataFactory<JSON> ejbJson() {return new EjbGeoJsonDataFactory<JSON>(cJson);} }
[ "t.kisner@web.de" ]
t.kisner@web.de
aae191a1e429a2dfefbcd0501a7156f82070b885
dc0e271669780a11284b9626919846a51b00d54c
/service/com/hys/exam/service/local/ExamOlemPropManage.java
f88db93fe5878853a48691d8b5ed0e9245517daa
[ "Apache-2.0" ]
permissive
1224500506/NCME-Admin
4a4b8e62f85b352dee0a96f096748b04fbf1b67e
e4f0969938ed6d9c076a9d647681dd56a1bf2679
refs/heads/master
2021-04-24T19:28:33.899711
2018-01-15T01:54:21
2018-01-15T01:54:21
117,482,274
1
1
null
null
null
null
UTF-8
Java
false
false
1,817
java
package com.hys.exam.service.local; import java.util.List; import com.hys.exam.model.ExamOlemProp; import com.hys.exam.model.ExamOlemPropRefBaseProp; import com.hys.exam.queryObj.ExamOlemPropQuery; import com.hys.exam.returnObj.ExamReturnOlemProp; import com.hys.framework.service.BaseService; /** * * 标题:考试支撑平台 * * 作者:Tony 2011-1-27 * * 描述: * * 说明: */ public interface ExamOlemPropManage extends BaseService { /** * 添加三基属性 * @param prop */ public void addExamOlemProp(ExamOlemProp prop); /** * 修改三基属性 * @param prop */ public void updateExamOlemProp(ExamOlemProp prop); /** * 查三基属性 * @param prop * @return */ public ExamOlemProp getExamOlemPropById(ExamOlemProp prop); /** * 删除属性 * @param prop */ public boolean deleteExamOlemPropById(ExamOlemProp prop); /** * 查询三基属性列表 * @param query * @return */ public ExamReturnOlemProp getExamOlemPropList(ExamOlemPropQuery query); /** * 增加三基属性与基本属性的关系 * @param prop */ public void addExamOlemPropRefBaseProp(List<ExamOlemPropRefBaseProp> prop); /** * 删除三基属性与基本属性的关系 * @param prop */ public void deleteExamOlemPropRefBaseProp(ExamOlemPropRefBaseProp prop); /** * 取对应基本属性 * @param id * @return */ public List<ExamOlemPropRefBaseProp> getExamOlemPropRefBasePropList(Long id); /** * 取关系基本属性类型 * @param id * @return */ public int getExamOlemPropType(Long id); public Long getId(); /** * 导入三基属性 * @param olemPropList * @param olemBasePropList */ public void addImportExamOlemProp(List<ExamOlemProp> olemPropList,List<ExamOlemPropRefBaseProp> olemBasePropList); }
[ "weeho@DESKTOP-71D9DPN" ]
weeho@DESKTOP-71D9DPN
0bffafc49fd857ff1a4c82067fe37c5b7acc1eed
08345dde7830b0080ae84c0dee096053febea69d
/designPatternn_chan/src/main/java/e3/observer_vs_chain/observer/ChinaTopDnsServer.java
2fa751b7204251ea1d8d62afb0dc5c79c8227be4
[]
no_license
sumnear/codeLife
fbf2a929fd4b829c1cdd69464b30e169a5bc7fcf
227a2a2480d27fd1961e62f89173216d045736b1
refs/heads/master
2022-12-23T07:36:10.508350
2021-06-27T13:06:34
2021-06-27T13:06:34
198,769,670
0
0
null
2022-12-16T05:24:26
2019-07-25T06:18:32
Java
UTF-8
Java
false
false
405
java
package e3.observer_vs_chain.observer; /** * @author cbf4Life cbf4life@126.com * I'm glad to share my knowledge with you all. */ public class ChinaTopDnsServer extends DnsServer { @Override protected void sign(Recorder recorder) { recorder.setOwner("中国顶级DNS服务器"); } @Override protected boolean isLocal(Recorder recorder) { return recorder.getDomain().endsWith(".cn"); } }
[ "402347012@qq.com" ]
402347012@qq.com
1d2c195b6961acc7e56aa5da8a7b40d0c1f576bc
d9baa0eb780b2edcb8ae21fc34b701a46c862632
/1.JavaSyntax/src/com/javarush/task/task01/task0109/Solution.java
03e3313d5e23363bdf6191d6418d058226656f3b
[]
no_license
sustav86/JavaRush2_0
acce04d42f5e530bed9da0cf76fed16956561e3b
671b9bfee4f019b210f216aca0abcf28182a8e4e
refs/heads/master
2021-01-23T09:27:28.833763
2017-09-06T08:39:58
2017-09-06T08:39:58
102,581,825
0
0
null
null
null
null
UTF-8
Java
false
false
209
java
package com.javarush.task.task01.task0109; /** * Created by ukr-sustavov on 30.06.2017. */ public class Solution { public static void main(String[] args) { int a = 7; int b = 8; } }
[ "sustav86@gmail.com" ]
sustav86@gmail.com
26af4be1a7791b14f34badd2ee8923f8c07f83bd
8c907d0221ddf81dd61eaad2604afa607b708c7a
/src/advanced/java8/stream/optionalTask/Person.java
e9a801daa4bfdc048b343a4e7451372e74b9592b
[]
no_license
dixu11/SDA-zaawansowane
ccbb47491c02dac006fefaa8fbb02cc253126a07
689afb810330629ed3b45869666c4d6b766e07aa
refs/heads/master
2022-12-01T14:14:47.214119
2020-08-08T11:48:54
2020-08-08T11:48:54
275,354,494
0
0
null
null
null
null
UTF-8
Java
false
false
447
java
package advanced.java8.stream.optionalTask; public class Person { private String name; public Person(String name) { this.name = name; } public void hello() { System.out.println("Hi, my name is " + name); } public String getName() { return name; } @Override public String toString() { return "Person{" + "name='" + name + '\'' + '}'; } }
[ "daniel.szlicht25@gmail.com" ]
daniel.szlicht25@gmail.com
1f9ea959cfe46c44e454fe766203b29d0af03350
7a0acc1c2e808c7d363043546d9581d21a129693
/selenium/test/java/com/thoughtworks/selenium/corebased/TestFramesSpecialTargets.java
03c0048a513f0a8c12f54040136914087b94ddba
[ "Apache-2.0" ]
permissive
epall/selenium
39b9759f8719a168b021b28e500c64afc5f83582
273260522efb84116979da2a499f64510250249b
refs/heads/master
2022-06-25T22:15:25.493076
2010-03-11T00:43:02
2010-03-11T00:43:02
552,908
3
0
Apache-2.0
2022-06-10T22:44:36
2010-03-08T19:10:45
C
UTF-8
Java
false
false
1,026
java
package com.thoughtworks.selenium.corebased; import com.thoughtworks.selenium.*; import org.testng.annotations.*; import static org.testng.Assert.*; import java.util.regex.Pattern; public class TestFramesSpecialTargets extends SeleneseTestNgHelper { @Test public void testFramesSpecialTargets() throws Exception { selenium.openWindow("../tests/html/Frames.html", "SpecialTargets"); selenium.waitForPopUp("SpecialTargets", "10000"); selenium.selectWindow("SpecialTargets"); selenium.selectFrame("bottomFrame"); selenium.click("changeTop"); selenium.waitForPageToLoad("30000"); selenium.click("changeSpan"); selenium.open("../tests/html/Frames.html"); selenium.selectFrame("bottomFrame"); selenium.click("changeParent"); selenium.waitForPageToLoad("30000"); selenium.click("changeSpan"); selenium.open("../tests/html/Frames.html"); selenium.selectFrame("bottomFrame"); selenium.click("changeSelf"); selenium.waitForPageToLoad("30000"); selenium.click("changeSpan"); selenium.close(); } }
[ "simon.m.stewart@07704840-8298-11de-bf8c-fd130f914ac9" ]
simon.m.stewart@07704840-8298-11de-bf8c-fd130f914ac9
d7c5e0d8547f62d3e9db5f346215722d2d1b6bc5
cca87c4ade972a682c9bf0663ffdf21232c9b857
/com/tencent/mm/plugin/product/ui/HtmlTextView.java
e4cbcf2d400c88ec872a5e89ab4fe86b65856a17
[]
no_license
ZoranLi/wechat_reversing
b246d43f7c2d7beb00a339e2f825fcb127e0d1a1
36b10ef49d2c75d69e3c8fdd5b1ea3baa2bba49a
refs/heads/master
2021-07-05T01:17:20.533427
2017-09-25T09:07:33
2017-09-25T09:07:33
104,726,592
12
1
null
null
null
null
UTF-8
Java
false
false
3,612
java
package com.tencent.mm.plugin.product.ui; import android.content.Context; import android.graphics.drawable.Drawable; import android.text.Editable; import android.text.Html; import android.text.Html.ImageGetter; import android.text.Html.TagHandler; import android.text.Spanned; import android.text.method.LinkMovementMethod; import android.text.style.StrikethroughSpan; import android.util.AttributeSet; import android.widget.TextView; import android.widget.TextView.BufferType; import com.tencent.mm.sdk.platformtools.af.a; import com.tencent.mm.u.ap; import java.net.URL; import org.xml.sax.XMLReader; public class HtmlTextView extends TextView { ImageGetter oql = new ImageGetter(this) { final /* synthetic */ HtmlTextView oqp; { this.oqp = r1; } public final Drawable getDrawable(String str) { try { Drawable createFromStream = Drawable.createFromStream(new URL(str).openStream(), ""); if (createFromStream == null) { return createFromStream; } createFromStream.setBounds(0, 0, createFromStream.getIntrinsicWidth(), createFromStream.getIntrinsicHeight()); return createFromStream; } catch (Exception e) { return null; } } }; TagHandler oqm = new TagHandler(this) { final /* synthetic */ HtmlTextView oqp; { this.oqp = r1; } public final void handleTag(boolean z, String str, Editable editable, XMLReader xMLReader) { if (str.equalsIgnoreCase("strike") || str.equals("s")) { int length = editable.length(); if (z) { editable.setSpan(new StrikethroughSpan(), length, length, 17); return; } Object a = AnonymousClass3.a(editable, StrikethroughSpan.class); int spanStart = editable.getSpanStart(a); editable.removeSpan(a); if (spanStart != length) { editable.setSpan(new StrikethroughSpan(), spanStart, length, 33); } } } private static Object a(Editable editable, Class cls) { Object[] spans = editable.getSpans(0, editable.length(), cls); if (spans.length == 0) { return null; } for (int length = spans.length; length > 0; length--) { if (editable.getSpanFlags(spans[length - 1]) == 17) { return spans[length - 1]; } } return null; } }; public HtmlTextView(Context context, AttributeSet attributeSet, int i) { super(context, attributeSet, i); } public HtmlTextView(Context context, AttributeSet attributeSet) { super(context, attributeSet); } public final void setText(final String str) { ap.vL().a(new a(this) { private volatile Spanned oqn; final /* synthetic */ HtmlTextView oqp; public final boolean Bn() { this.oqn = Html.fromHtml(str, null, this.oqp.oqm); return true; } public final boolean Bo() { super.setText(this.oqn, BufferType.SPANNABLE); this.oqp.setMovementMethod(LinkMovementMethod.getInstance()); return true; } public final String toString() { return super.toString() + "|setText"; } }); } }
[ "lizhangliao@xiaohongchun.com" ]
lizhangliao@xiaohongchun.com
681aa14ec63b592ef4e5409d99c4a64868fde103
90274978f191f0c8eae9447b02cb017513dfb928
/src/main/java/com/entgroup/wxplatform/entoperation/dbload/UserDataLoader.java
fbd577e157caca0859e1aa5dc1f65302c36f6c05
[]
no_license
wuyongwen/entoperation
347f2b9b9343fcc5e50a0c7ac43cc8ce29b311bf
a3ab45736cadfa7702a05b4e3a6ed8b2e73978dd
refs/heads/master
2021-01-10T01:53:19.767975
2016-03-18T10:16:24
2016-03-18T10:16:24
52,863,463
0
0
null
null
null
null
UTF-8
Java
false
false
3,638
java
/******************************************************************************* * Copyright 2015 Brient Oh @ Pristine Core * boh@pristinecore.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.entgroup.wxplatform.entoperation.dbload; import java.util.HashSet; import java.util.Set; import org.apache.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationListener; import org.springframework.context.event.ContextRefreshedEvent; import org.springframework.stereotype.Component; import com.entgroup.wxplatform.entoperation.domain.Address; import com.entgroup.wxplatform.entoperation.domain.User; import com.entgroup.wxplatform.entoperation.domain.UserRole; import com.entgroup.wxplatform.entoperation.repositories.UserRepository; import com.entgroup.wxplatform.entoperation.repositories.UserRoleRepository; @Component public class UserDataLoader implements ApplicationListener<ContextRefreshedEvent> { private Logger logger = Logger.getLogger(UserDataLoader.class); @Autowired private UserRepository userRepository; @Autowired private UserRoleRepository userRoleRepository; @Override public void onApplicationEvent(ContextRefreshedEvent event) { long count = userRepository.count(); if(count>0) return; User admin = new User(); admin.setUsername("admin"); admin.setPassword("123456"); admin.setFirstName("Foo"); admin.setLastName("Bar"); Set<Address> addressSet = new HashSet<Address>(0); Address adminAddr1 = new Address(); adminAddr1.setAddress1("Street Address 1-1"); adminAddr1.setAddress2("Street Address 1-2"); adminAddr1.setAddrCity("Los Angeles"); adminAddr1.setAddrState("CA"); adminAddr1.setZipCode("90001"); adminAddr1.setUser(admin); addressSet.add(adminAddr1); Address adminAddr2 = new Address(); adminAddr2.setAddress1("Street Address 2-1"); adminAddr2.setAddress2("Street Address 2-1"); adminAddr2.setAddrCity("Los Angeles"); adminAddr2.setAddrState("CA"); adminAddr2.setZipCode("90002"); adminAddr2.setUser(admin); addressSet.add(adminAddr2); UserRole adminRole = new UserRole(); adminRole.setUserRoleName("Administrator"); adminRole.setUser(admin); Set<UserRole> adminRoles = new HashSet<UserRole>(0); adminRoles.add(adminRole); admin.setAddressSet(addressSet); admin.setUserRoles(adminRoles); userRepository.save(admin); logger.debug("Saved admin ID: " + admin.getUserId()); User user1 = new User(); user1.setUsername("johndoe"); user1.setPassword("123456"); user1.setFirstName("John"); user1.setLastName("Doe"); UserRole userRole = new UserRole(); userRole.setUserRoleName("User"); userRole.setUser(user1); Set<UserRole> userRoles = new HashSet<UserRole>(0); userRoles.add(userRole); user1.setUserRoles(userRoles); userRepository.save(user1); logger.debug("Saved user1 ID: " + user1.getUserId()); } }
[ "wuyongwen@gmail.com" ]
wuyongwen@gmail.com
6a21252df6a7794629e826f5863a1789ccdb3e92
c856144f8a98e0e051084f39345216339634f390
/main/src/main/java/eu/monnetproject/lemon/model/LexicalForm.java
40eb1d91b4bbca5c50e6dc8320aab1b6689b4b85
[]
permissive
monnetproject/lemon.api
e5defe0da20c5e910ecb9ebd71427bcadd3ab4bb
1f94a933908eed24e5c92009c24eaf4556b06c68
refs/heads/master
2021-07-05T06:28:01.063720
2019-11-14T08:25:13
2019-11-14T08:25:13
8,605,555
6
3
BSD-3-Clause
2021-06-04T01:02:11
2013-03-06T14:50:45
HTML
UTF-8
Java
false
false
3,162
java
/********************************************************************************** * Copyright (c) 2011, Monnet Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of the Monnet Project 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 MONNET PROJECT BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *********************************************************************************/ package eu.monnetproject.lemon.model; import java.util.Collection; import java.util.Map; /** * A form of a lexical entry * @author John McCrae */ public interface LexicalForm extends LemonElement { /** Get the primary written representation of the form */ Text getWrittenRep(); /** Set the primary written representation of the form */ void setWrittenRep(final Text writtenRep); /** Get the alternative representations of the form */ Map<Representation,Collection<Text>> getRepresentations(); /** Get a particular set of representations of the form */ Collection<Text> getRepresentation(final Representation representation); /** Add an alternative representation of the form */ boolean addRepresentation(final Representation representation, final Text representationVal); /** Remove an alternative representation of the form */ boolean removeRepresentation(final Representation representation, final Text representationVal); /** Get any variants of this form */ Map<FormVariant,Collection<LexicalForm>> getFormVariants(); /** Get a particular variant set of this form */ Collection<LexicalForm> getFormVariant(final FormVariant formVariant); /** Add a variant of this form */ boolean addFormVariant(final FormVariant formVariant, final LexicalForm formVariantVal); /** Remove a variant of this form */ boolean removeFormVariant(final FormVariant formVariant, final LexicalForm formVariantVal); }
[ "john@mccr.ae" ]
john@mccr.ae
33df36be02ee395763a354205e7d0698a4cf5a75
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/5/5_e29f7cb994c89ca75f93f97eaf18d9c589e4e773/IssuesMetricNodeFactory/5_e29f7cb994c89ca75f93f97eaf18d9c589e4e773_IssuesMetricNodeFactory_s.java
377ccd3c1a9b58d1eaf014d8aa811140c7a9998a
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,678
java
/* ImpressiveCode Depress Framework Copyright (C) 2013 ImpressiveCode contributors This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 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.impressivecode.depress.metric.im; import org.knime.core.node.NodeDialogPane; import org.knime.core.node.NodeFactory; import org.knime.core.node.NodeView; /** * * @author Marek Majchrzak, ImpressiveCode * */ public class IssuesMetricNodeFactory extends NodeFactory<IssuesMetricNodeModel> { @Override public IssuesMetricNodeModel createNodeModel() { return new IssuesMetricNodeModel(); } @Override public int getNrNodeViews() { return 0; } @Override public NodeView<IssuesMetricNodeModel> createNodeView(final int viewIndex, final IssuesMetricNodeModel nodeModel) { throw new IllegalStateException("View not supported"); } @Override public boolean hasDialog() { return true; } @Override public NodeDialogPane createNodeDialogPane() { return new IssuesMetricNodeDialog(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
9b7bad77b4026ae4b52fa1a6d6853b46fe0423e1
e43495f5e2549f0f8a826e49a8679cefbb9fe7cc
/app/src/main/java/com/huoniao/oc/custom/MyLineChart.java
b180a4bbfccc0653651661e66e9a06c6349b6230
[]
no_license
Potat0chips/Android_OC_1.14
cd9db6a0440f3f3f7838117a02cb2efd00f554fc
07009bbab1374656d86308551b63e736ca124eba
refs/heads/master
2022-03-22T04:53:16.584559
2019-11-21T15:58:53
2019-11-21T15:58:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
894
java
package com.huoniao.oc.custom; import android.content.Context; import android.util.AttributeSet; import android.view.MotionEvent; import com.github.mikephil.charting.charts.LineChart; /** * Created by Administrator on 2017/9/19. */ public class MyLineChart extends LineChart { public MyLineChart(Context context) { super(context); } public MyLineChart(Context context, AttributeSet attrs) { super(context, attrs); } public MyLineChart(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } @Override public boolean onInterceptTouchEvent(MotionEvent ev) { return super.onInterceptTouchEvent(ev); } @Override public boolean dispatchTouchEvent(MotionEvent ev) { getParent().requestDisallowInterceptTouchEvent(true); return super.dispatchTouchEvent(ev); } }
[ "1322127081@qq.com" ]
1322127081@qq.com
e964abb0ac55998b37b9bfe59acf1bd0a8ba1c98
1301cbc4546fe37105d21ba41429e9eb19e0fdd9
/redisson/src/main/java/org/redisson/client/protocol/decoder/ListResultReplayDecoder.java
75ef13dde3dad656495a2eadb7462965a864d1c1
[ "Apache-2.0" ]
permissive
guobao00007/redisson
9b56caf4981bb2a92dc7c6e00bb3c7d1666f6283
d444adab9aaf40a466e1cbc063a409c0dd7c95ab
refs/heads/master
2020-12-02T06:41:37.544722
2017-07-10T15:51:50
2017-07-10T15:51:50
96,880,608
1
0
null
2017-07-11T10:18:53
2017-07-11T10:18:53
null
UTF-8
Java
false
false
1,433
java
/** * Copyright 2016 Nikita Koksharov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.redisson.client.protocol.decoder; import java.util.Arrays; import java.util.List; import java.util.Map; import org.redisson.client.handler.State; import io.netty.buffer.ByteBuf; import io.netty.util.CharsetUtil; /** * * @author Nikita Koksharov * */ public class ListResultReplayDecoder implements MultiDecoder<List<Map<Object, Object>>> { @Override public Object decode(ByteBuf buf, State state) { return buf.toString(CharsetUtil.UTF_8); } @Override @SuppressWarnings("unchecked") public List<Map<Object, Object>> decode(List<Object> parts, State state) { Map<Object, Object>[] res = parts.toArray(new Map[parts.size()]); return Arrays.asList(res); } @Override public boolean isApplicable(int paramNum, State state) { return true; } }
[ "abracham.mitchell@gmail.com" ]
abracham.mitchell@gmail.com
a2324756ae4962bd099e93339c41442e4c2a6a81
3e176296759f1f211f7a8bcfbba165abb1a4d3f1
/gosu-core-api/src/main/java/gw/lang/ir/expression/IRNegationExpression.java
138b37522d5e7b9c034f44cf122955bad3eaadfc
[ "Apache-2.0", "BSD-3-Clause", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
gosu-lang/old-gosu-repo
6335ac90cd0c635fdec6360e3e208ba12ac0a39e
48c598458abd412aa9f2d21b8088120e8aa9de00
refs/heads/master
2020-05-18T03:39:34.631550
2014-04-21T17:36:38
2014-04-21T17:36:38
1,303,622
1
2
null
null
null
null
UTF-8
Java
false
false
506
java
/* * Copyright 2013 Guidewire Software, Inc. */ package gw.lang.ir.expression; import gw.lang.ir.IRExpression; import gw.lang.ir.IRType; import gw.lang.UnstableAPI; @UnstableAPI public class IRNegationExpression extends IRExpression { private IRExpression _root; public IRNegationExpression(IRExpression root) { _root = root; setParentToThis( root ); } public IRExpression getRoot() { return _root; } @Override public IRType getType() { return _root.getType(); } }
[ "smckinney@guidewire.com" ]
smckinney@guidewire.com
0ca04f8eb2282b13252f567985b0d14576944ad7
10d77fabcbb945fe37e15ae438e360a89a24ea05
/graalvm/transactions/fork/narayana/txbridge/src/test/java/org/jboss/jbossts/txbridge/tests/outbound/client/TestService.java
f7463bdcea6c20977c70683ef4360b8c2af1e448
[ "Apache-2.0", "LGPL-2.1-only" ]
permissive
nmcl/scratch
1a881605971e22aa300487d2e57660209f8450d3
325513ea42f4769789f126adceb091a6002209bd
refs/heads/master
2023-03-12T19:56:31.764819
2023-02-05T17:14:12
2023-02-05T17:14:12
48,547,106
2
1
Apache-2.0
2023-03-01T12:44:18
2015-12-24T15:02:58
Java
UTF-8
Java
false
false
1,501
java
/* * JBoss, Home of Professional Open Source * Copyright 2010, Red Hat, Inc. and/or its affiliates, * and individual contributors as indicated by the @author tags. * See the copyright.txt in the distribution for a * full listing of individual contributors. * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions * of the GNU Lesser General Public License, v. 2.1. * This program is distributed in the hope that it will be useful, but WITHOUT A * 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, * v.2.1 along with this distribution; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. * * (C) 2010, * @author JBoss, by Red Hat. */ package org.jboss.jbossts.txbridge.tests.outbound.client; import javax.jws.WebService; import javax.jws.soap.SOAPBinding; /** * Interface for a web service used by txbridge test cases. Client side version. * * @author Jonathan Halliday (jonathan.halliday@redhat.com) 2010-03 */ @WebService(name = "TestServiceImpl", targetNamespace = "http://client.outbound.tests.txbridge.jbossts.jboss.org/") @SOAPBinding(style = SOAPBinding.Style.RPC) public interface TestService { public void doNothing(); }
[ "mlittle@redhat.com" ]
mlittle@redhat.com
af01c97889f2d2ce6524bae13738e9b7de28adf4
2749c41932af2432ce8b6eda8542c134a9fbc288
/src/main/java/com/wizeek/leetcode/Solution155_5.java
bbaf96b7c4441b43da1ba17f3a291b152b8e580f
[]
no_license
araslanov/leetcode
857a637a0d642a4a8732afa0cd3a6321dfcdb9da
723564c6ec27c737cd77ac58ee2b1e5cb898c191
refs/heads/master
2022-10-15T09:21:29.161545
2022-09-20T06:21:39
2022-09-20T06:21:39
135,767,448
0
0
null
null
null
null
UTF-8
Java
false
false
748
java
package com.wizeek.leetcode; import java.util.Deque; import java.util.LinkedList; public class Solution155_5 { private final Deque<Integer> stack = new LinkedList<>(); private final Deque<Integer> minStack = new LinkedList<>(); public Solution155_5() { } public void push(int val) { stack.addFirst(val); if (minStack.isEmpty() || val <= minStack.peekFirst()) { minStack.addFirst(val); } } public void pop() { int value = stack.pollFirst(); if (value == minStack.peekFirst()) { minStack.pollFirst(); } } public int top() { return stack.peekFirst(); } public int getMin() { return minStack.peekFirst(); } }
[ "wizeek80@gmail.com" ]
wizeek80@gmail.com
4e8f89aeeecc3e87f01cdefa7ac0e0bcf455fc97
fe1f2c68a0540195b227ebee1621819766ac073b
/OVO_jdgui/myobfuscated/amk.java
debaa2fe9fadd2d4a2956d0515b50f96cdc0b90c
[]
no_license
Sulley01/KPI_4
41d1fd816a3c0b2ab42cff54a4d83c1d536e19d3
04ed45324f255746869510f0b201120bbe4785e3
refs/heads/master
2020-03-09T05:03:37.279585
2018-04-18T16:52:10
2018-04-18T16:52:10
128,602,787
2
1
null
null
null
null
UTF-8
Java
false
false
376
java
package myobfuscated; import android.os.IBinder; public final class amk extends bai implements alz { amk(IBinder paramIBinder) { super(paramIBinder, "com.google.android.gms.dynamic.IObjectWrapper"); } } /* Location: C:\dex2jar-2.0\classes-dex2jar.jar!\myobfuscated\amk.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "sullivan.alvin@ymail.com" ]
sullivan.alvin@ymail.com
8b97fd6cb33770850f78c47843901c493ce9eb4f
c95c97bed7f920bee21b55012630748085289782
/imageio/imageio-jmagick/src/main/java/com/twelvemonkeys/imageio/plugins/jmagick/XPMImageWriter.java
94f3b7c6f3c8b6069f29d209b6aa9009aff86c9e
[ "BSD-3-Clause" ]
permissive
finn-no/TwelveMonkeys
a3a4801ed1fa60c9f87c9fed36d5aa60b24fddce
c4178163623b4a62ad9f6b1f1d86c4a12a33e070
refs/heads/master
2023-08-02T20:42:07.652164
2021-04-06T06:37:39
2021-04-06T06:37:39
3,855,585
0
0
null
2021-04-06T06:37:40
2012-03-28T14:03:50
Java
UTF-8
Java
false
false
2,165
java
/* * Copyright (c) 2008, Harald Kuhr * 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 "TwelveMonkeys" 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 OWNER 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. */ package com.twelvemonkeys.imageio.plugins.jmagick; import javax.imageio.ImageWriteParam; /** * XPMImageWriter * * @author <a href="mailto:harald.kuhr@gmail.com">Harald Kuhr</a> * @author last modified by $Author: haraldk$ * @version $Id: XPMImageWriter.java,v 1.0 Dec 4, 2007 12:26:46 AM haraldk Exp$ */ public class XPMImageWriter extends JMagickWriter { public XPMImageWriter(final XPMImageWriterSpi pProvider) { super(pProvider); } protected ImageWriteParam createDefaultWriteParam() { return new ImageWriteParam(getLocale()); } }
[ "harald.kuhr@gmail.com" ]
harald.kuhr@gmail.com
c637a1f3d9de2e66eceb085a420863ce159c8585
aa4acdba351926db6b17ac000a3765ee7534df0c
/pss-simulator/data-writing-layer/src/main/scala/pss/writing/textfile/TextFilePssVariableWriter.java
4886f848cd67cd3626ff7cbac3bb78ede7a1481f
[]
no_license
nafeezabrar/pss-without-as
7579e28de6024e31bf0bd843ccc6fbe12508e01f
97c821da725ddc6e63612dacb67a7736b2aa4c5c
refs/heads/main
2023-01-07T09:21:58.157210
2020-11-09T14:58:23
2020-11-09T14:58:23
311,345,524
0
0
null
null
null
null
UTF-8
Java
false
false
1,061
java
package pss.writing.textfile; import pss.conversion.data_to_result.text.PssVariableToTextResultConverter; import pss.data.pss_type.PssType; import pss.data.pssvariable.PssVariables; import pss.exception.PssException; import pss.library.FileUtility; import pss.result.presentable.text.TextResult; import pss.writing.result.text.TextFileTextResultWriter; import java.io.FileWriter; import java.io.IOException; import java.net.URISyntaxException; public class TextFilePssVariableWriter { public static void writePssVariableInTextFile(String fileName, PssVariables pssVariables, PssType pssType) throws IOException, URISyntaxException, PssException { FileWriter fileWriter = FileUtility.createFileWriteSafely(fileName); PssVariableToTextResultConverter resultConverter = new PssVariableToTextResultConverter(); TextResult textResult = resultConverter.generateResult(pssVariables, pssType); TextFileTextResultWriter resultWriter = new TextFileTextResultWriter(fileWriter); resultWriter.writeResult(textResult); } }
[ "ishmumkhan@gmail.com" ]
ishmumkhan@gmail.com
01f85834ae805d68c5b7acc0426510ef0a10913b
c11dfb8d82ae0660e3ef5b0a753562b1f72cf5e1
/fresco-2.5.0/imagepipeline-base/src/main/java/com/facebook/imagepipeline/bitmaps/ArtBitmapFactory.java
37b48dc6cbbcc5bebba06558eb5035566a02d54a
[ "MIT" ]
permissive
Poomipat-Ch/Software-Architecture-and-Design-Fresco
8e7cad0b64fa1f7c5ae672da1bc6484d68639afb
fac688c6406738970780ef965c0fc2a13eacc600
refs/heads/main
2023-09-01T23:47:48.348929
2021-11-21T18:20:50
2021-11-21T18:20:50
430,391,642
0
0
null
null
null
null
UTF-8
Java
false
false
2,305
java
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ package com.facebook.imagepipeline.bitmaps; import android.annotation.TargetApi; import android.graphics.Bitmap; import android.os.Build; import com.facebook.common.internal.Preconditions; import com.facebook.common.references.CloseableReference; import com.facebook.imagepipeline.core.CloseableReferenceFactory; import com.facebook.imagepipeline.memory.BitmapPool; import com.facebook.imageutils.BitmapUtil; import com.facebook.infer.annotation.Nullsafe; import javax.annotation.concurrent.ThreadSafe; /** * Bitmap factory for ART VM (Lollipop and up). */ @Nullsafe(Nullsafe.Mode.LOCAL) @TargetApi(Build.VERSION_CODES.LOLLIPOP) @ThreadSafe public class ArtBitmapFactory extends PlatformBitmapFactory { private final com.facebook.imagepipeline.memory.BitmapPool mBitmapPool; private final com.facebook.imagepipeline.core.CloseableReferenceFactory mCloseableReferenceFactory; public ArtBitmapFactory(com.facebook.imagepipeline.memory.BitmapPool bitmapPool, com.facebook.imagepipeline.core.CloseableReferenceFactory closeableReferenceFactory) { mBitmapPool = bitmapPool; mCloseableReferenceFactory = closeableReferenceFactory; } /** * Creates a bitmap of the specified width and height. * * @param width the width of the bitmap * @param height the height of the bitmap * @param bitmapConfig the {@link android.graphics.Bitmap.Config} used to create the decoded * Bitmap * @return a reference to the bitmap * @exception java.lang.OutOfMemoryError if the Bitmap cannot be allocated */ @Override public com.facebook.common.references.CloseableReference<Bitmap> createBitmapInternal(int width, int height, Bitmap.Config bitmapConfig) { int sizeInBytes = BitmapUtil.getSizeInByteForBitmap(width, height, bitmapConfig); Bitmap bitmap = mBitmapPool.get(sizeInBytes); Preconditions.checkArgument( bitmap.getAllocationByteCount() >= width * height * BitmapUtil.getPixelSizeForBitmapConfig(bitmapConfig)); bitmap.reconfigure(width, height, bitmapConfig); return mCloseableReferenceFactory.create(bitmap, mBitmapPool); } }
[ "poomipat002@gmail.com" ]
poomipat002@gmail.com
b9c9c8f65904f57389d16e9bdad507eee68c05ec
07050005d13bf132d03f7b9741ff5960ba7e72e9
/product-view-service-feign/src/main/java/com/example/ProductClientFeignHystrix.java
572bb25fd985f0a64b44032f31837e0b51af0387
[]
no_license
295954776/springcloudlearn
39bba8493ea257ebe7f41ea0a69ae1e4dc0f1e11
83c5e8702f8b939ec9d0b0034a738cc8e8e53212
refs/heads/main
2023-02-25T08:51:40.161580
2021-02-03T09:48:09
2021-02-03T09:48:09
335,575,564
0
0
null
null
null
null
UTF-8
Java
false
false
538
java
package com.example; import com.example.service.ProductClientFeign; import org.springframework.stereotype.Component; import java.util.ArrayList; import java.util.List; /** * @Author: THM * @DateTime: 2021/2/3 13:42 * @Description: TODO */ @Component public class ProductClientFeignHystrix implements ProductClientFeign { @Override public List<Product> listProdcuts() { List<Product> result = new ArrayList<>(); result.add(new Product(0, "产品数据微服务不可用", 0)); return result; } }
[ "admin@example.com" ]
admin@example.com
a676c14672accbd09899ee9d0fbb0fc5c8ed496a
56ff4efd9b5dd55d1578269793082c2a4ba34bc7
/2_java/1_2_class/Ch07_Inherit_Poly/src/p08/abstractclass/AbstractBasic.java
1662e159e37df63c6334b178a9d7aaf580dbd07c
[]
no_license
10soos17/lecture_choongang
8274389e7a573bb0e568ee3b905691dd3dc639c3
f00a57965e4bc7755ca6115ac5be5b111ac58b31
refs/heads/master
2023-08-04T08:00:09.528129
2021-07-24T02:14:06
2021-07-24T02:14:06
355,406,674
0
0
null
null
null
null
UTF-8
Java
false
false
777
java
package p08.abstractclass; //Abstract Class : 추상 메소드가 존재할 때, "abstract"를 붙인다. // : 일반 클래스가 "설계도"라면, 추상클래스는 "미완성 설계도" // : 강제성, 일관성을 지키기 위해서 사용 // : 객체 생성 불가 => 자식을 통한 객체 생성 가능, 재정의 가능 public abstract class AbstractBasic { int num = 3;//1. 인스턴스 변수 //2. 생성자 public AbstractBasic() { } public AbstractBasic(int num) { super(); this.num = num; } //3. 일반 메소드 public void methodA() { System.out.println("methodA"); } //4.추상메소드 : 선언부만 있고, Body가 없는 메소드 // 메소드 앞에 반드시 "abstract" public abstract void methodB(); }
[ "shinsh1017@gmail.com" ]
shinsh1017@gmail.com
3db7fd1dc75591fdf91458b87e958db60dabc853
a681d645919cb366022a4bb847de10e00dcb3b03
/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/java/org/wso2/carbon/apimgt/application/extension/api/ApiApplicationRegistrationServiceImpl.java
00f537c086355de5da6e30d179a68ae9fcad4fb1
[ "Apache-2.0" ]
permissive
laki88/carbon-device-mgt
032309b492fa4c1b04cd730258ad71f09f2b62c9
993a387e7c28f53d2a7e356e8a7ffee7d1a543fe
refs/heads/master
2021-01-16T18:14:19.034969
2016-04-08T05:56:58
2016-04-08T05:56:58
50,497,152
0
0
null
2016-01-27T09:40:18
2016-01-27T09:40:17
null
UTF-8
Java
false
false
7,058
java
/* * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. 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.wso2.carbon.apimgt.application.extension.api; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.json.simple.JSONObject; import org.wso2.carbon.apimgt.application.extension.APIManagementProviderService; import org.wso2.carbon.apimgt.application.extension.api.util.RegistrationProfile; import org.wso2.carbon.apimgt.application.extension.constants.ApiApplicationConstants; import org.wso2.carbon.apimgt.application.extension.dto.ApiApplicationKey; import org.wso2.carbon.apimgt.application.extension.exception.APIManagerException; import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.apimgt.application.extension.api.util.APIUtil; import org.wso2.carbon.user.api.UserStoreException; import javax.ws.rs.DELETE; import javax.ws.rs.POST; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.QueryParam; import javax.ws.rs.core.Response; public class ApiApplicationRegistrationServiceImpl implements ApiApplicationRegistrationService { private static final Log log = LogFactory.getLog(ApiApplicationRegistrationServiceImpl.class); @Path("register/tenants/{tenantDomain}") @POST public Response register(@PathParam("tenantDomain") String tenantDomain, @QueryParam("applicationName") String applicationName) { Response response; try { PrivilegedCarbonContext.startTenantFlow(); PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenantDomain, true); if (PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId() == -1) { String msg = "Invalid tenant domain : " + tenantDomain; response = Response.status(Response.Status.NOT_ACCEPTABLE).entity(msg).build(); } String username = PrivilegedCarbonContext.getThreadLocalCarbonContext().getUserRealm() .getRealmConfiguration().getAdminUserName(); PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(username); APIManagementProviderService apiManagementProviderService = APIUtil.getAPIManagementProviderService(); ApiApplicationKey apiApplicationKey = apiManagementProviderService.generateAndRetrieveApplicationKeys( applicationName, ApiApplicationConstants.DEFAULT_TOKEN_TYPE, username, false); return Response.status(Response.Status.CREATED).entity(apiApplicationKey.toString()).build(); } catch (APIManagerException e) { String msg = "Error occurred while registering an application '" + applicationName + "'"; log.error(msg, e); response = Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build(); } catch (UserStoreException e) { String msg = "Failed to retrieve the tenant" + tenantDomain + "'"; log.error(msg, e); response = Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build(); } finally { PrivilegedCarbonContext.endTenantFlow(); } return response; } @Path("register") @POST public Response register(RegistrationProfile registrationProfile) { Response response; try { String username = APIUtil.getAuthenticatedUser(); APIManagementProviderService apiManagementProviderService = APIUtil.getAPIManagementProviderService(); if (registrationProfile.isMappingAnExistingOAuthApp()) { JSONObject jsonStringObject = new JSONObject(); jsonStringObject.put(ApiApplicationConstants.JSONSTRING_USERNAME_TAG, username); jsonStringObject.put(ApiApplicationConstants.JSONSTRING_KEY_TYPE_TAG, ApiApplicationConstants.DEFAULT_TOKEN_TYPE); jsonStringObject.put(ApiApplicationConstants.OAUTH_CLIENT_ID, registrationProfile.getConsumerKey()); jsonStringObject.put(ApiApplicationConstants.OAUTH_CLIENT_SECRET, registrationProfile.getConsumerSecret()); jsonStringObject.put(ApiApplicationConstants.JSONSTRING_VALIDITY_PERIOD_TAG, ApiApplicationConstants.DEFAULT_VALIDITY_PERIOD); apiManagementProviderService.registerExistingOAuthApplicationToAPIApplication( jsonStringObject.toJSONString(), registrationProfile.getApplicationName(), registrationProfile.getConsumerKey(), username, registrationProfile.isAllowedToAllDomains()); return Response.status(Response.Status.ACCEPTED).entity("OAuth App is mapped as APIM App").build(); } else { ApiApplicationKey apiApplicationKey = apiManagementProviderService.generateAndRetrieveApplicationKeys( registrationProfile.getApplicationName(), registrationProfile.getTags(), ApiApplicationConstants.DEFAULT_TOKEN_TYPE, username, false); return Response.status(Response.Status.CREATED).entity(apiApplicationKey.toString()).build(); } } catch (APIManagerException e) { String msg = "Error occurred while registering an application '" + registrationProfile.getApplicationName() + "'"; log.error(msg, e); response = Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build(); } return response; } @Path("unregister") @DELETE public Response unregister(@QueryParam("applicationName") String applicationName) { Response response; try { String username = APIUtil.getAuthenticatedUser(); APIManagementProviderService apiManagementProviderService = APIUtil.getAPIManagementProviderService(); apiManagementProviderService.removeAPIApplication(applicationName, username); return Response.status(Response.Status.ACCEPTED).build(); } catch (APIManagerException e) { String msg = "Error occurred while removing the application '" + applicationName; log.error(msg, e); response = Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build(); } return response; } }
[ "charitha.ws@gmail.com" ]
charitha.ws@gmail.com
8b6bb6e0f88f6d9a19c54a1a15afd0c81685f315
27511a2f9b0abe76e3fcef6d70e66647dd15da96
/src/com/instagram/creation/f/k.java
c2a8c56a4eddb18e9e2fb0731486fe78e5ba2db3
[]
no_license
biaolv/com.instagram.android
7edde43d5a909ae2563cf104acfc6891f2a39ebe
3fcd3db2c3823a6d29a31ec0f6abcf5ceca995de
refs/heads/master
2022-05-09T15:05:05.412227
2016-07-21T03:48:36
2016-07-21T03:48:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
971
java
package com.instagram.creation.f; import android.os.Handler; import android.os.Looper; import android.os.Message; import android.widget.ListView; final class k extends Handler { public k(l paraml, Looper paramLooper) { super(paramLooper); } public final void handleMessage(Message paramMessage) { int i = ((Integer)obj).intValue(); l.a(a, i); long l = System.currentTimeMillis(); int j = (int)(l - l.a(a)) * a.getListView().getHeight() / 500; if (what == 1) { a.getListView().smoothScrollBy(-j, 0); } for (;;) { l.a(a, l); if ((l.a(a, l.b(a), i)) || (l.b(a, l.b(a), i))) { l.c(a).sendMessageDelayed(l.c(a).obtainMessage(what, Integer.valueOf(i)), 10L); } return; if (what == 2) { a.getListView().smoothScrollBy(j, 0); } } } } /* Location: * Qualified Name: com.instagram.creation.f.k * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
68b638efc1d0d24c63c080917858eaf6baf566b7
ee34d271c618807f563adc99baa641930e4fcd39
/trunk/org.reliablesource.cuttlefish.ui.platform/src/org/reliablesource/cuttlefish/ui/platform/viewers/FaceBookGroupViewerContentProvider.java
d9c8e451fbe028ebd127faa8bccbc5c79fdfd215
[]
no_license
BGCX067/fabr3c-svn-to-git
990e0d38957742d4d4a5900026eecc2eedecf2a9
e58ccdc402dd21f2af0419e7b3977f17322f8aa7
refs/heads/master
2016-09-01T08:53:25.459281
2015-12-28T14:21:49
2015-12-28T14:21:49
48,875,604
0
0
null
null
null
null
UTF-8
Java
false
false
1,471
java
package org.reliablesource.cuttlefish.ui.platform.viewers; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.reliablesource.client.ui.viewers.ReliableElementContentProvider; import org.reliablesource.cuttlefish.core.model.INode; /** * * ContributorContentProvider.java<br> * Copyright (c) 2007, Reliable Source, Inc. All Rights Reserved<br> * <br> * * Created on: May 16, 2007 <br> * <br> * * @author Dennis Park <a * href="mailto:dennis.park@gmail.com">dennis.park@gmail.com</a> * * @since 1.0.0 */ public class FaceBookGroupViewerContentProvider extends ReliableElementContentProvider { @Override public void selectionChanged(SelectionChangedEvent event) { currentSelection = (IStructuredSelection) event.getSelection(); } /** * Returns the elements in the input, which must be either an array or a * <code>Collection</code>. */ @Override public Object[] getElements(Object _element) { return super.getElements(_element); } @Override public Object[] getChildren(Object _parentElement) { return super.getChildren(_parentElement); } @Override public Object getParent(Object element) { return super.getParent(element); } @Override public boolean hasChildren(Object element) { if (element instanceof INode) { // ((INode)element).g } return super.hasChildren(element); } }
[ "you@example.com" ]
you@example.com
366570a6d234916ba50c9de8f413a6c06878c27d
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/java-design-patterns/testing/608/App.java
651a887d89286ada4b17f0c7c46450af1650e5b7
[]
no_license
ASSERT-KTH/synthetic-checkstyle-error-dataset
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
40c057e1669584bfc6fecf789b5b2854660222f3
refs/heads/master
2023-03-18T12:50:55.410343
2019-01-25T09:54:39
2019-01-25T09:54:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,378
java
/** * The MIT License * Copyright (c) 2014-2016 Ilkka Seppälä * * 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.iluwatar.ambassador; /** * * The ambassador pattern creates a helper service that sends network requests on behalf of a * client. It is often used in cloud-based applications to offload features of a remote service. * * An ambassador service can be thought of as an out-of-process proxy that is co-located with * the client. Similar to the proxy design pattern, the ambassador service provides an interface * for another remote service. In addition to the interface, the ambassador provides extra * functionality and features, specifically offloaded common connectivity tasks. This usually * consists of monitoring, logging, routing, security etc. This is extremely useful in * legacy applications where the codebase is difficult to modify and allows for improvements * in the application's networking capabilities. * * In this example, we will the ({@link ServiceAmbassador}) class represents the ambassador while the * ({@link RemoteService}) class represents a remote application. * */ public class App { /** * Entry point */ public static void main(String[] args) { Client host1 = new Client(); Client host2 = new Client(); host1.useService(12); host2.useService( 73); } }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
6d73f2de304107a4390be41ad539357f410def2c
88b434f36b3532eafbbc51693625fbed014d5666
/src/main/java/client/Notify.java
2709c08bed71c13c4177433da522cb0265bf2f0f
[]
no_license
manojkhanwalkar/ClientAPISample
d66123d4410f0909c6abfc68e0328fe1c808312b
dae1a4b58fdca6963f6487187a87c3d95aaa839e
refs/heads/master
2021-01-19T05:24:48.204233
2015-08-02T19:56:27
2015-08-02T19:56:27
40,050,182
0
0
null
null
null
null
UTF-8
Java
false
false
162
java
package client; import data.Response; /** * Created by mkhanwalkar on 8/2/15. */ public interface Notify { public void callback(Response response); }
[ "manoj.khanwalkar@gmail.com" ]
manoj.khanwalkar@gmail.com
5dc5b7e8ec400a5354117ab809b9738b9148f98f
0af8b92686a58eb0b64e319b22411432aca7a8f3
/api-vs-impl-small/domain/src/main/java/org/gradle/testdomain/performancenull_28/Productionnull_2756.java
88809115e36c9914df4d1c8a5807592329a61be9
[]
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
591
java
package org.gradle.testdomain.performancenull_28; public class Productionnull_2756 { private final String property; public Productionnull_2756(String param) { this.property = param; } public String getProperty() { return property; } private String prop0; public String getProp0() { return prop0; } public void setProp0(String value) { prop0 = value; } private String prop1; public String getProp1() { return prop1; } public void setProp1(String value) { prop1 = value; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
233637de247d7dccef1ccdb7bd40cb69de222850
7e1511cdceeec0c0aad2b9b916431fc39bc71d9b
/flakiness-predicter/input_data/original_tests/square-okhttp/nonFlakyMethods/com.squareup.okhttp.internal.spdy.HpackDraft05Test-emptyHeaderName.java
c4e3540a08a4d666d640dd3a394037bb7a39ed64
[ "BSD-3-Clause" ]
permissive
Taher-Ghaleb/FlakeFlagger
6fd7c95d2710632fd093346ce787fd70923a1435
45f3d4bc5b790a80daeb4d28ec84f5e46433e060
refs/heads/main
2023-07-14T16:57:24.507743
2021-08-26T14:50:16
2021-08-26T14:50:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
296
java
@Test public void emptyHeaderName() throws IOException { hpackWriter.writeByteString(ByteString.encodeUtf8("")); assertBytes(0); assertEquals(ByteString.EMPTY,newReader(byteStream(0)).readByteString(true)); assertEquals(ByteString.EMPTY,newReader(byteStream(0)).readByteString(false)); }
[ "aalsha2@masonlive.gmu.edu" ]
aalsha2@masonlive.gmu.edu
e92aa44a40546ce27ebd917ab89626f7f2e72322
aa53f167822b54256b1baa99cbd02af464a36bd0
/src/main/java/net/config/SecureConfig.java
f4b8d0362a28ad5ab7a7ae5603257c8666fb1ecb
[]
no_license
costia097/SpringSecurityInit
e3ce778402a3b3479d64cd92ca90ab5dd4af6f6e
8da8f984a9460c6df4ec62d9253d00f162204d5c
refs/heads/master
2021-08-31T14:18:21.372825
2017-12-21T16:41:49
2017-12-21T16:41:49
115,026,772
0
0
null
null
null
null
UTF-8
Java
false
false
1,595
java
package net.config; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import org.springframework.security.config.annotation.authentication.configuration.EnableGlobalAuthentication; import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; @Configuration @EnableWebSecurity @EnableGlobalMethodSecurity(prePostEnabled=true) public class SecureConfig extends WebSecurityConfigurerAdapter { @Autowired public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception { auth.inMemoryAuthentication().withUser("mkyong").password("123").roles("USER"); auth.inMemoryAuthentication().withUser("admin").password("123456").roles("ADMIN"); auth.inMemoryAuthentication().withUser("dba").password("123456").roles("DBA"); } @Override protected void configure(HttpSecurity http) throws Exception { http.authorizeRequests() .antMatchers("/admin/**").access("hasRole('ROLE_ADMIN')") .antMatchers("/user/**").access("hasRole('ROLE_ADMIN') or hasRole('ROLE_USER')") .and().formLogin(); } }
[ "adaw36909@gmail.com" ]
adaw36909@gmail.com
30d550cc142ba58d90dcc6607eb024e9133df08a
23a96a03e550ee22a14b8fe9ed2ce44b6341de18
/examples/Tutor/target/generated-sources/clarion/clarion/equates/Create.java
27f88133dc49d6e28055bc52f6b29d8bce44a741
[]
no_license
polarisltd/jClarion
29782a3ed0a144943c6d99dd81f6c16ef0a504d8
37e57590cb9cc41448fdd09fda91c9094b0dd057
refs/heads/master
2020-12-31T07:33:15.586952
2016-04-28T13:51:58
2016-04-28T13:55:40
57,305,055
3
0
null
null
null
null
UTF-8
Java
false
false
1,479
java
package clarion.equates; public class Create { public static final int SSTRING=1; public static final int STRING=2; public static final int IMAGE=3; public static final int REGION=4; public static final int LINE=5; public static final int BOX=6; public static final int ELLIPSE=7; public static final int ENTRY=8; public static final int BUTTON=9; public static final int PROMPT=10; public static final int OPTION=11; public static final int CHECK=12; public static final int GROUP=13; public static final int LIST=14; public static final int COMBO=15; public static final int SPIN=16; public static final int TEXT=17; public static final int CUSTOM=18; public static final int MENU=19; public static final int ITEM=20; public static final int RADIO=21; public static final int MENUBAR=22; public static final int APPLICATION=24; public static final int WINDOW=25; public static final int REPORT=26; public static final int HEADER=27; public static final int FOOTER=28; public static final int BREAK=29; public static final int FORM=30; public static final int DETAIL=31; public static final int OLE=32; public static final int DROPLIST=33; public static final int DROPCOMBO=34; public static final int PROGRESS=35; public static final int SHEET=37; public static final int TAB=38; public static final int PANEL=39; public static final int RTF=40; public static final int SUBLIST=Create.LIST+0x100; public static final int TOOLBAR=128; }
[ "polarisltd@gmail.com" ]
polarisltd@gmail.com
c0b1afc9456cd80aa4a3c7fc95184ea398c86761
6a6057783d59c7a5ed9a4e06e2be974c3fedec0a
/src/test/java/app/myoss/cloud/datasource/routing/testcase/hikari/history/service/impl/UserHistoryServiceImpl.java
72e912c0adb32556a52cb43606130e884eaccfb8
[ "Apache-2.0" ]
permissive
myoss-cloud/myoss-datasource-routing
1b0748f6825b950e5729bfdc7c9ac1858881b723
2638bb553cd8e5fb933140577dacad49c111bee0
refs/heads/master
2021-07-14T22:57:06.186320
2020-07-21T05:12:21
2020-07-21T05:12:21
185,704,890
0
0
null
null
null
null
UTF-8
Java
false
false
1,460
java
/* * Copyright 2018-2019 https://github.com/myoss * * 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 app.myoss.cloud.datasource.routing.testcase.hikari.history.service.impl; import org.springframework.stereotype.Service; import app.myoss.cloud.datasource.routing.testcase.hikari.history.entity.UserHistory; import app.myoss.cloud.datasource.routing.testcase.hikari.history.mapper.UserHistoryMapper; import app.myoss.cloud.datasource.routing.testcase.hikari.history.service.UserHistoryService; import app.myoss.cloud.mybatis.repository.service.impl.BaseCrudServiceImpl; /** * This service implement access the database table t_sys_user_history * <p> * Database Table Remarks: 系统用户信息历史备份表 * </p> * * @author jerry * @since 2018年5月14日 下午3:39:43 */ @Service public class UserHistoryServiceImpl extends BaseCrudServiceImpl<UserHistoryMapper, UserHistory> implements UserHistoryService { }
[ "jerry.myoss@gmail.com" ]
jerry.myoss@gmail.com
7848db74aaf0732dcc33bc446a4b9c38dc7841fa
5120b826c0b659cc609e7cecdf9718aba243dfb0
/b2b_acc/hybris/bin/platform/bootstrap/gensrc/de/hybris/platform/adaptivesearch/data/AsPromotedSort.java
aacc5181cf86e98876e8cceb5727264e87a6d1c7
[]
no_license
miztli/hybris
8447c85555676742b524aee901a5f559189a469a
ff84a5089a0d99899672e60c3a60436ab8bf7554
refs/heads/master
2022-10-26T07:21:44.657487
2019-05-28T20:30:10
2019-05-28T20:30:10
186,463,896
1
0
null
2022-09-16T18:38:27
2019-05-13T17:13:05
Java
UTF-8
Java
false
false
889
java
/* * ---------------------------------------------------------------- * --- WARNING: THIS FILE IS GENERATED AND WILL BE OVERWRITTEN! * --- Generated at May 28, 2019 3:18:56 PM * ---------------------------------------------------------------- * * [y] hybris Platform * * Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. * * This software is the confidential and proprietary information of SAP * ("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 SAP. */ package de.hybris.platform.adaptivesearch.data; import de.hybris.platform.adaptivesearch.data.AbstractAsSortConfiguration; public class AsPromotedSort extends AbstractAsSortConfiguration { public AsPromotedSort() { // default constructor } }
[ "miztlimelgoza@miztlis-MacBook-Pro.local" ]
miztlimelgoza@miztlis-MacBook-Pro.local
e33fd7fc9663d53277713e5be1185d8de5721fd1
785f92468b22c5c2b11515d39a0972abba4b6acf
/fluent-mybatis-test/src/main/java/cn/org/atool/fluent/mybatis/db/sqlite/entity/SqliteStudentEntity.java
304fc428f24c23809743b50b2469c28ff6c43bb4
[ "Apache-2.0" ]
permissive
Akon1993/fluent-mybatis
13a195999da507cafd05dcd304f547e7c6561e74
0f72c6cad8e5044b210cbc1502c8a62db577c3d9
refs/heads/master
2023-08-03T02:29:14.085594
2021-09-13T14:43:24
2021-09-13T14:43:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,857
java
package cn.org.atool.fluent.mybatis.db.sqlite.entity; import cn.org.atool.fluent.mybatis.annotation.FluentMybatis; import cn.org.atool.fluent.mybatis.annotation.TableField; import cn.org.atool.fluent.mybatis.annotation.TableId; import cn.org.atool.fluent.mybatis.base.IEntity; import cn.org.atool.fluent.mybatis.base.RichEntity; import cn.org.atool.fluent.mybatis.functions.TableSupplier; import cn.org.atool.fluent.mybatis.metadata.DbType; import java.io.Serializable; import java.lang.Class; import java.lang.Integer; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; /** * SqliteStudentEntity: 数据映射实体定义 * * @author Powered By Fluent Mybatis */ @SuppressWarnings({"unchecked"}) @Data @Accessors( chain = true ) @EqualsAndHashCode( callSuper = false ) @FluentMybatis( table = "student", dbType = DbType.SQLITE ) public class SqliteStudentEntity extends RichEntity { private static final long serialVersionUID = 1L; /** */ @TableId("id") private Integer id; /** */ @TableField("address") private String address; /** */ @TableField("age") private Integer age; /** */ @TableField("birthday") private String birthday; /** */ @TableField("bonus_points") private Integer bonusPoints; /** */ @TableField("desk_mate_id") private Integer deskMateId; /** */ @TableField("email") private String email; /** */ @TableField("env") private String env; /** */ @TableField("gender") private Integer gender; /** */ @TableField("gmt_created") private String gmtCreated; /** */ @TableField("gmt_modified") private String gmtModified; /** */ @TableField("grade") private Integer grade; /** */ @TableField("home_address_id") private Integer homeAddressId; /** */ @TableField("home_county_id") private Integer homeCountyId; /** */ @TableField("is_deleted") private Integer isDeleted; /** */ @TableField("phone") private String phone; /** */ @TableField("status") private String status; /** */ @TableField("tenant") private Integer tenant; /** */ @TableField("user_name") private String userName; /** */ @TableField("version") private String version; @Override public Serializable findPk() { return this.id; } @Override public final Class<? extends IEntity> entityClass() { return SqliteStudentEntity.class; } @Override public final SqliteStudentEntity changeTableBelongTo(TableSupplier supplier) { return super.changeTableBelongTo(supplier); } @Override public final SqliteStudentEntity changeTableBelongTo(String table) { return super.changeTableBelongTo(table); } }
[ "darui.wu@163.com" ]
darui.wu@163.com
cf2da5f6173daaa01e154c3f2dff93a179920858
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/no_seeding/82_ipcalculator-ipac.IPAC_Applet-1.0-8/ipac/IPAC_Applet_ESTest_scaffolding.java
aaf21db3f76fd07092da5f68bb6f8841332c4076
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
522
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Mon Oct 28 22:13:48 GMT 2019 */ package ipac; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class IPAC_Applet_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
815b5de8c65f298c59065398249fa85092f81c2b
83f4a71aee31911a73a2bb858e1669fe9ff9d87a
/redis-distributed-lock-core/src/main/java/com/snowalker/config/RedisPoolUtil.java
ca055cd40d98191736cb31662a22f4582d68bf84
[ "Apache-2.0" ]
permissive
TaXueWWL/redis-distributed-lock
10761f7d69a22827343281fc8ec7ccdca2accc8f
adeff499fda7b63c752b408648a2dff40d066728
refs/heads/master
2023-06-24T15:19:27.453800
2022-03-29T09:02:03
2022-03-29T09:02:03
140,507,748
328
133
Apache-2.0
2023-06-14T22:32:46
2018-07-11T01:53:31
Java
UTF-8
Java
false
false
2,318
java
package com.snowalker.config; import redis.clients.jedis.Jedis; /** * @author snowalker * @date 2018-7-9 * @desc 封装单机版Jedis工具类 */ public class RedisPoolUtil { private RedisPoolUtil(){} private static RedisPool redisPool; public static String get(String key){ Jedis jedis = null; String result = null; try { jedis = RedisPool.getJedis(); result = jedis.get(key); } catch (Exception e){ e.printStackTrace(); } finally { if (jedis != null) { jedis.close(); } return result; } } public static Long setnx(String key, String value){ Jedis jedis = null; Long result = null; try { jedis = RedisPool.getJedis(); result = jedis.setnx(key, value); } catch (Exception e){ e.printStackTrace(); } finally { if (jedis != null) { jedis.close(); } return result; } } public static String getSet(String key, String value){ Jedis jedis = null; String result = null; try { jedis = RedisPool.getJedis(); result = jedis.getSet(key, value); } catch (Exception e){ e.printStackTrace(); } finally { if (jedis != null) { jedis.close(); } return result; } } public static Long expire(String key, int seconds){ Jedis jedis = null; Long result = null; try { jedis = RedisPool.getJedis(); result = jedis.expire(key, seconds); } catch (Exception e){ e.printStackTrace(); } finally { if (jedis != null) { jedis.close(); } return result; } } public static Long del(String key){ Jedis jedis = null; Long result = null; try { jedis = RedisPool.getJedis(); result = jedis.del(key); } catch (Exception e){ e.printStackTrace(); } finally { if (jedis != null) { jedis.close(); } return result; } } }
[ "1210812591@qq.com" ]
1210812591@qq.com
649b61c256347b960af42c3bdff860e98282c672
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/elastic--elasticsearch/38aeba438d6d14e2af913b7bcb0d8fee3dc1ffa2/after/StatisticalScriptFacetBuilder.java
a5b50c44598c09fd75592037a27cf9aa5b162b2a
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
2,707
java
/* * Licensed to Elastic Search and Shay Banon under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Elastic Search 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.elasticsearch.search.facets.statistical; import org.elasticsearch.common.collect.Maps; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.index.query.xcontent.XContentFilterBuilder; import org.elasticsearch.search.builder.SearchSourceBuilderException; import org.elasticsearch.search.facets.AbstractFacetBuilder; import java.io.IOException; import java.util.Map; /** * @author kimchy (shay.banon) */ public class StatisticalScriptFacetBuilder extends AbstractFacetBuilder { private String script; private Map<String, Object> params; public StatisticalScriptFacetBuilder(String name) { super(name); } public StatisticalScriptFacetBuilder global(boolean global) { this.global = global; return this; } public StatisticalScriptFacetBuilder facetFilter(XContentFilterBuilder filter) { this.facetFilter = filter; return this; } public StatisticalScriptFacetBuilder script(String script) { this.script = script; return this; } public StatisticalScriptFacetBuilder param(String name, Object value) { if (params == null) { params = Maps.newHashMap(); } params.put(name, value); return this; } @Override public void toXContent(XContentBuilder builder, Params params) throws IOException { if (script == null) { throw new SearchSourceBuilderException("script must be set on statistical script facet [" + name + "]"); } builder.startObject(name); builder.startObject(StatisticalFacetCollectorParser.NAME); builder.field("script", script); if (this.params != null) { builder.field("params", this.params); } builder.endObject(); addFilterFacetAndGlobal(builder, params); builder.endObject(); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
9b9e64790fe32ae31268750697344d5bff1d7564
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/44/298.java
e3f9883df3b489fe1588fd9e21805e2039b18c1b
[ "MIT" ]
permissive
qiuchili/ggnn_graph_classification
c2090fefe11f8bf650e734442eb96996a54dc112
291ff02404555511b94a4f477c6974ebd62dcf44
refs/heads/master
2021-10-18T14:54:26.154367
2018-10-21T23:34:14
2018-10-21T23:34:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
587
java
int reverse = int; int main() { int i; int[] a = new int[6]; for (i = 0;i <= 5;i++) { a[i] = Integer.parseInt(ConsoleInput.readToWhiteSpace(true)); } for (i = 0;i <= 5;i++) { a[i] = reverse(a[i]); System.out.print(a[i]); System.out.print("\n"); } return 0; } int reverse(int num) { int sum = 0; int i; int t; for (t = 1;1;t++) { if (Math.abs(num / Math.pow((double)10,(int)t)) >= 1) { continue; } else { break; } } for (i = 1;i <= t;i++) { sum = sum + (num % 10) * Math.pow((double)10,(int)t - i); num = num / 10; } return sum; }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
145bd709b36f7215bb38f1a70857feee51c38e91
d61807f004eb0d3e38e46434d1d31725369b459d
/icon-packs/ikonli-unicons-pack/src/main/java/org/kordamp/ikonli/unicons/UniconsSolidIkonHandler.java
caa31cd59cad0e5b420e8be0a856c39bab5c1845
[ "Apache-2.0" ]
permissive
deprecato/floss-grimoire_java-icons
a658094f36acc13c2869b0849fabe34b9e3dc74f
62e60014bbc436b08439e6f583ab3fa4fee0eda0
refs/heads/master
2023-02-16T11:52:46.302299
2020-12-28T13:44:05
2020-12-28T13:44:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,751
java
/* * SPDX-License-Identifier: Apache-2.0 * * Copyright 2015-2020 Andres Almiray * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.kordamp.ikonli.unicons; import org.kordamp.ikonli.AbstractIkonHandler; import org.kordamp.ikonli.Ikon; import org.kordamp.ikonli.IkonHandler; import org.kordamp.jipsy.ServiceProviderFor; import java.io.InputStream; import java.net.URL; /** * @author Andres Almiray */ @ServiceProviderFor(IkonHandler.class) public class UniconsSolidIkonHandler extends AbstractIkonHandler { private static final String FONT_RESOURCE = "/META-INF/resources/unicons/20201106/fonts/Unicons-Solid.ttf"; @Override public boolean supports(String description) { return description != null && description.startsWith("unis-"); } @Override public Ikon resolve(String description) { return UniconsSolid.findByDescription(description); } @Override public URL getFontResource() { return getClass().getResource(FONT_RESOURCE); } @Override public InputStream getFontResourceAsStream() { return getClass().getResourceAsStream(FONT_RESOURCE); } @Override public String getFontFamily() { return "Unicons-Solid"; } }
[ "aalmiray@gmail.com" ]
aalmiray@gmail.com
0108d9602834e3a8d188c730882eee3f26c80ec5
48a2135f2f05fc09c1bc367ef594ee9f704a4289
/ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/dedicatedcloud/backup/OvhRestorePoint.java
32decf752454b3f076784308a95f5cd4c10f41aa
[ "BSD-3-Clause" ]
permissive
UrielCh/ovh-java-sdk
913c1fbd4d3ea1ff91de8e1c2671835af67a8134
e41af6a75f508a065a6177ccde9c2491d072c117
refs/heads/master
2022-09-27T11:15:23.115006
2022-09-02T04:41:33
2022-09-02T04:41:33
87,030,166
13
4
BSD-3-Clause
2022-09-02T04:41:34
2017-04-03T01:59:23
Java
UTF-8
Java
false
false
673
java
package net.minidev.ovh.api.dedicatedcloud.backup; import java.util.Date; import net.minidev.ovh.api.complextype.OvhUnitAndValue; /** * Details about a restore point */ public class OvhRestorePoint { /** * Creation time of the restore point * * canBeNull */ public Date creationTime; /** * Size of the restore point * * canBeNull */ public OvhUnitAndValue<Long> size; /** * Show if the restore point is corrupted * * canBeNull */ public Boolean isCorrupted; /** * Type of the restore point * * canBeNull */ public OvhBackupTypeEnum type; /** * Id of the restore point * * canBeNull */ public Long restorePointId; }
[ "uriel.chemouni@gmail.com" ]
uriel.chemouni@gmail.com
013138fccf810bec5989c2476b2150b313e83d3d
dfd11915565d64fbd2a110feb3f616b94dd5a1f8
/java-bigdata/src/test/java/cn/itcast/storm/lifeCycle/spout/RandomWordSpout.java
6a8bf041e61782364151deadf5e2c76daaf146ee
[ "Apache-2.0" ]
permissive
jiangxincode/JavaWebTest
64fe4e1a8cb80e6bc1aa1508bff1e4e111020651
a766e429360eecb79734f322853a14f360175b67
refs/heads/master
2023-08-30T12:36:14.374336
2023-08-18T12:04:07
2023-08-18T12:04:07
27,476,304
0
0
null
null
null
null
UTF-8
Java
false
false
1,943
java
package cn.itcast.storm.lifeCycle.spout; import java.util.Map; import java.util.Random; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.storm.spout.SpoutOutputCollector; import org.apache.storm.task.TopologyContext; import org.apache.storm.topology.OutputFieldsDeclarer; import org.apache.storm.topology.base.BaseRichSpout; import org.apache.storm.tuple.Fields; import org.apache.storm.tuple.Values; import org.apache.storm.utils.Utils; /** * 随机从String数组当中读取一个单词发送给下一个bolt * @author Administrator * */ public class RandomWordSpout extends BaseRichSpout { private static final long serialVersionUID = -4287209449750623371L; private static final Log log = LogFactory.getLog(RandomWordSpout.class); private SpoutOutputCollector collector; private String[] words = new String[]{"storm", "hadoop", "hive", "flume"}; private Random random = new Random(); public RandomWordSpout() { log.warn("&&&&&&&&&&&&&&&&& RandomWordSpout constructor method invoked"); } @Override public void open(Map conf, TopologyContext context, SpoutOutputCollector collector) { log.warn("################# RandomWordSpout open() method invoked"); this.collector = collector; } @Override public void declareOutputFields(OutputFieldsDeclarer declarer) { log.warn("################# RandomWordSpout declareOutputFields() method invoked"); declarer.declare(new Fields("str")); } @Override public void nextTuple() { log.warn("################# RandomWordSpout nextTuple() method invoked"); Utils.sleep(500); String str = words[random.nextInt(words.length)]; collector.emit(new Values(str)); } @Override public void activate() { log.warn("################# RandomWordSpout activate() method invoked"); } @Override public void deactivate() { log.warn("################# RandomWordSpout deactivate() method invoked"); } }
[ "jiangxinnju@163.com" ]
jiangxinnju@163.com
d56ae439640b262a823ce0553ae7dbc344f15285
62517b063ad861be71cdf50b8bfc4e365392c553
/src/main/java/com/jue/java/learn/leetcode/editor/cn/BackspaceStringCompare/BackspaceStringCompare.java
f08ce50a6055391756ee5d68eeca452cc6cde0ca
[]
no_license
WANGJUEYA/basic-java
62d2e8b29d56be08e7bc76d7c10ecfd6632c438c
610f1ed7bfe7c99bd231b9b521f50f367ce9f98b
refs/heads/master
2023-09-01T09:31:11.573606
2023-09-01T06:00:39
2023-09-01T06:00:39
189,951,232
0
0
null
null
null
null
UTF-8
Java
false
false
2,636
java
//给定 S 和 T 两个字符串,当它们分别被输入到空白的文本编辑器后,判断二者是否相等,并返回结果。 # 代表退格字符。 // // 注意:如果对空文本输入退格字符,文本继续为空。 // // // // 示例 1: // // 输入:S = "ab#c", T = "ad#c" //输出:true //解释:S 和 T 都会变成 “ac”。 // // // 示例 2: // // 输入:S = "ab##", T = "c#d#" //输出:true //解释:S 和 T 都会变成 “”。 // // // 示例 3: // // 输入:S = "a##c", T = "#a#c" //输出:true //解释:S 和 T 都会变成 “c”。 // // // 示例 4: // // 输入:S = "a#c", T = "b" //输出:false //解释:S 会变成 “c”,但 T 仍然是 “b”。 // // // // 提示: // // // 1 <= S.length <= 200 // 1 <= T.length <= 200 // S 和 T 只含有小写字母以及字符 '#'。 // // // // // 进阶: // // // 你可以用 O(N) 的时间复杂度和 O(1) 的空间复杂度解决该问题吗? // // // // Related Topics 栈 双指针 // 👍 215 👎 0 package com.jue.java.learn.leetcode.editor.cn.BackspaceStringCompare; /** * @author JUE * @number 844 */ public class BackspaceStringCompare { public static void main(String[] args) { Solution solution = new Solution(); // System.out.println(solution.backspaceCompare("ab##", "c#d#")); System.out.println(solution.backspaceCompare("ab#c", "ad#c")); } } //leetcode submit region begin(Prohibit modification and deletion) class Solution { public boolean backspaceCompare(String S, String T) { // 倒着比可能会好点 int indexs = S.length(); int indext = T.length(); while (true) { indexs = nextChar(indexs - 1, S); indext = nextChar(indext - 1, T); if (indexs == -1 && indext == -1) { return true; } if (indexs == -1 || indext == -1) { return false; } if (S.charAt(indexs) != T.charAt(indext)) { return false; } } } public int nextChar(int index, String str) { if (index < 0) { return -1; } int count = 0; do { if (str.charAt(index) == '#') { count++; } else if (count == 0 && str.charAt(index) != '#') { return index; } else { count--; } index--; } while (index >= 0 && count >= 0); return index; } } //leetcode submit region end(Prohibit modification and deletion)
[ "573711282@qq.com" ]
573711282@qq.com
55ef68f7e7ec85d13f69c4a38d8fd5f0005c1210
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-ws/results/XWIKI-14227-5-10-Single_Objective_GGA-WeightedSum/com/xpn/xwiki/store/migration/AbstractDataMigrationManager_ESTest.java
5ca62a9fec32ec3204e3de60b10fcf02a918eb95
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
592
java
/* * This file was automatically generated by EvoSuite * Fri Jan 17 19:04:58 UTC 2020 */ package com.xpn.xwiki.store.migration; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class AbstractDataMigrationManager_ESTest extends AbstractDataMigrationManager_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
c784d403bae6fc4687b47bca209f798babad8e66
1a8e8ec0e2338725374bbd214c2dc332d10e02d7
/src/main/java/com/example/demo/services/CRUDService.java
f392a9bb7dce1ab5bd2701bfba7a242be2f8053e
[]
no_license
cosmin2689/librarytest
ec26a20a866c162691d6eb91ceb4e5669911c2e4
367cb0fc83d80274ea96af92d0dd9b7e7d9397af
refs/heads/master
2021-08-27T22:17:58.147071
2017-12-10T14:21:28
2017-12-10T14:21:28
113,753,123
0
0
null
null
null
null
UTF-8
Java
false
false
258
java
package com.example.demo.services; import java.util.List; /** * Created by Cosmin on 12/9/2017. */ public interface CRUDService<T> { List<?> listAll(); T getById(Integer id); T saveOrUpdate( T domainObject); void delete(Integer id); }
[ "you@example.com" ]
you@example.com
2a3a51029fd8c8aa173f2407a6fb384b7678ba91
bdada8dd2fee5ed621fb4663adf2ae91edf7f390
/xc-rep/src/main/java/com/xzsoft/xsr/core/service/impl/DictServiceImpl.java
572d62d3f3cd76fc6d693cc3bda00556220d9787
[]
no_license
yl23250/xc
abaf7dbbdf1ec3b32abe16a1aeca19ee29568387
47877dc79e8ea8947f526bb21a1242cae5d70dd8
refs/heads/master
2020-09-16T20:49:54.040706
2018-06-23T13:25:56
2018-06-23T13:25:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,315
java
package com.xzsoft.xsr.core.service.impl; import java.io.File; import java.io.FileOutputStream; import java.sql.Timestamp; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.Iterator; import org.apache.log4j.Logger; import org.dom4j.Document; import org.dom4j.DocumentException; import org.dom4j.DocumentHelper; import org.dom4j.Element; import org.dom4j.io.OutputFormat; import org.dom4j.io.SAXReader; import org.dom4j.io.XMLWriter; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.xzsoft.xsr.core.mapper.DictMapper; import com.xzsoft.xsr.core.modal.Dict; import com.xzsoft.xsr.core.service.DictService; @Service public class DictServiceImpl implements DictService { @Autowired private DictMapper dictMapper; public Logger log = Logger.getLogger(this.getClass()); /** * 字典导出 */ @Override public void dictExp(String filepath, String dictName) throws Exception { Document doc = DocumentHelper.createDocument(); Element root = doc.addElement("DICTLIST"); ArrayList<Dict> dictList = new ArrayList<Dict>(); dictList = dictMapper.selectDictByDictName(dictName); Element DICT = root.addElement("DICT"); DICT.addAttribute("DICT_TYPE", dictList.get(0).getDICT_TYPE()); DICT.addAttribute("DICT_DESC", dictList.get(0).getDICT_DESC()); DICT.addAttribute("DICT_NAME", dictList.get(0).getDICT_NAME()); for(Dict o:dictList){ Element DICTITEM = DICT.addElement("DICTITEM"); DICTITEM.addAttribute("ITEM_NAME", o.getITEM_NAME()); DICTITEM.addAttribute("ITEM_DESC", o.getITEM_DESC()); DICTITEM.addAttribute("ITEM_VAL", o.getITEM_VAL()); DICTITEM.addAttribute("DICT_TABLE", o.getDICT_TABLE()); DICTITEM.addAttribute("ITEM_CODE", o.getITEM_CODE()); } // 实例化输出格式对象 OutputFormat format = OutputFormat.createPrettyPrint(); // 设置输出编码 format.setEncoding("UTF-8"); // 创建需要写入的File对象 // 生成XMLWriter对象,构造函数中的参数为需要输出的文件流和格式 XMLWriter writer = new XMLWriter(new FileOutputStream(filepath), format); // 开始写入,write方法中包含上面创建的Document对象 writer.write(doc); writer.close(); } /** * 字典导入 */ @SuppressWarnings({ "unchecked", "rawtypes" }) @Override public String dictImpt(File folder,String userId) throws Exception { String message = ""; Timestamp time = new Timestamp(new Date().getTime()); // dom4j读取XML文件; SAXReader sax = new SAXReader(); org.dom4j.Document document = null; document = sax.read(folder); try{ // 获取文件根节点; org.dom4j.Element root = document.getRootElement(); // 获取文件DICT节点; org.dom4j.Element DICT = root.element("DICT"); //获取DICT属性 String DICT_TYPE = DICT.attributeValue("DICT_TYPE"); String DICT_DESC = DICT.attributeValue("DICT_DESC"); String DICT_NAME = DICT.attributeValue("DICT_NAME"); //判断字典是否存在 int count = dictMapper.isDictExist(DICT_NAME); if (count > 0) { message = "{flag:1,msg:'字典【" + DICT_NAME + "】已经存在'}"; } else{ for(Iterator j = DICT.elementIterator("DICTITEM");j.hasNext();){ org.dom4j.Element element = (org.dom4j.Element) j.next(); HashMap params = new HashMap(); params.put("DICT_NAME",DICT_NAME); params.put("DICT_DESC",DICT_DESC); params.put("DICT_TYPE",DICT_TYPE); params.put("DICT_TABLE",element.attributeValue("DICT_TABLE")); params.put("ITEM_CODE",element.attributeValue("ITEM_CODE")); params.put("ITEM_NAME",element.attributeValue("ITEM_NAME")); params.put("ITEM_VAL",element.attributeValue("ITEM_VAL")); params.put("ITEM_DESC",element.attributeValue("ITEM_DESC")); params.put("LAST_UPDATED_BY",userId); params.put("CREATED_BY",userId); params.put("LAST_UPDATE_DATE",time); params.put("CREATION_DATE",time); dictMapper.insertDict(params); } } message = "{flag:0,msg:'导入字典成功'}"; }catch(Exception e){ message = "{flag:1,msg:'导入字典失败'}"; } return message; } }
[ "381666890@qq.com" ]
381666890@qq.com
262a376d0fb133e95fdf35012254904f314aa436
8f14d280aa1e4dbde629226c48dbfe1bc64e918d
/Hermes/src/main/java/util/trace/difficultyPrediction/notification/RegisteredRatioListener.java
1bedb653775f601fa1dea29bb7d13cf204cd48fa
[]
no_license
daytonellwanger/Hermes
30c7459ae17742cd3a69eb5eb69e7389c22c3ba4
d14f731d9515c188353848b7195d012b17cf8f36
refs/heads/master
2021-11-07T04:31:29.245691
2021-10-20T23:51:19
2021-10-20T23:51:19
90,983,056
0
1
null
null
null
null
UTF-8
Java
false
false
1,209
java
package util.trace.difficultyPrediction.notification; import difficultyPrediction.featureExtraction.RatioFeaturesListener; import util.trace.TraceableInfo; import util.trace.Tracer; public class RegisteredRatioListener extends TraceableInfo{ // ICommand command; public RegisteredRatioListener(String aMessage, RatioFeaturesListener aListener, Object aFinder) { super(aMessage,aFinder); // command = aCommand; } public static String toString(RatioFeaturesListener aListener) { return "" + aListener; } public static RegisteredRatioListener newCase (String aMessage, RatioFeaturesListener aListener, Object aFinder) { if (shouldInstantiate(RegisteredRatioListener.class)) { RegisteredRatioListener retVal = new RegisteredRatioListener(aMessage, aListener, aFinder); retVal.announce(); return retVal; } Tracer.info(aFinder, aMessage); Tracer.info(RegisteredRatioListener.class, aMessage); return null; } public static RegisteredRatioListener newCase ( RatioFeaturesListener aListener, Object aFinder) { String aMessage = toString(aListener); return newCase(aMessage, aListener, aFinder); } }
[ "dewan@cs.unc.edu" ]
dewan@cs.unc.edu
02b6d72feda1bd4029e2c761964607bdf63aa155
e7a95b90343d9ce399151c924b4a1b9dd9d0c5cd
/src/com/test/CaseManagerCopy.java
9a2924650e01508b8c192ac4d9bbfe151430f1a3
[]
no_license
amrutheshag/Macro-soft
8524ddb3cd249e53241bf79974adb2f3deebb93b
cb7745210688a9911e33a6b7768fa8cb82208d46
refs/heads/master
2020-04-14T05:00:50.333746
2018-12-31T08:18:55
2018-12-31T08:18:55
163,651,252
0
0
null
null
null
null
UTF-8
Java
false
false
4,433
java
package com.test; import java.io.FileInputStream; import org.apache.log4j.xml.DOMConfigurator; import org.openqa.selenium.WebDriver; import org.testng.annotations.AfterMethod; import org.testng.annotations.Test; import com.pages.CaseManagerListingPage; import com.pages.HomePage; import com.pages.LoginPage; import com.pages.ProvidersPage; import utility.BrowserUtils; import utility.Constant; import utility.ExcelUtils; import utility.Log; public class CaseManagerCopy { WebDriver driver; FileInputStream fis; @Test public void CaseManagerCopyTestScript() throws Exception{ DOMConfigurator.configure("log4j.xml"); System.out.println("\n*****************************************************\n"); Log.info("\n*****************************************************\n"); System.out.println("Executing Case Manager- Copy"); Log.info("Executing Case Manager- Copy "); try{ String Path=Constant.Path_TestData + Constant.File_CaseManagersData; int rowCount=ExcelUtils.setExcelFile(Path, "Sheet1"); for (int count=1; count<=rowCount; count++){ String code= ExcelUtils.getCellData(count,1); String name=ExcelUtils.getCellData(count,2); String newCode= ExcelUtils.getCellData(count, 3); String newName= ExcelUtils.getCellData(count, 4); String city= ExcelUtils.getCellData(count, 5); String startDate= ExcelUtils.getCellData(count, 6); String endDate= ExcelUtils.getCellData(count, 7); String active= ExcelUtils.getCellData(count, 8); String subject= ExcelUtils.getCellData(count, 9); String type = ExcelUtils.getCellData(count, 10); String status = ExcelUtils.getCellData(count, 11); String priority = ExcelUtils.getCellData(count, 12); String followupDate = ExcelUtils.getCellData(count, 13); String noteType = ExcelUtils.getCellData(count, 14); String medium = ExcelUtils.getCellData(count, 15); String details = ExcelUtils.getCellData(count, 16); if (ExcelUtils.getCellData(count,0).isEmpty()) {System.out.println("End of Test Data");} else{ System.out.println("\n----------------------------------------------------\n"); System.out.println("Case Manager copy- Running Iteration No: " + ExcelUtils.getCellData(count,0)); System.out.println("\n----------------------------------------------------\n"); Log.info("----------------------------------------------------"); Log.info("Case Manager copy- Running Iteration No: " + ExcelUtils.getCellData(count,0)); Log.info("----------------------------------------------------"); copyCaseManagerMultiple(driver,code, name, newCode, newName); } } }catch (Exception e) {System.out.println("Test Data File not found");e.printStackTrace();} } public void copyCaseManagerMultiple(WebDriver driver,String code, String name, String newCode, String newName) throws Exception { // Launch Chrome Browser driver= BrowserUtils.openChromeBrowser(); //open risk manager driver.get(Constant.URL); System.out.println("opened browser"); //click network user LoginPage loginPageObject = new LoginPage(driver); loginPageObject.clickNetworkUser(); //click providers HomePage homePageObject = new HomePage(driver); try{ homePageObject.clickExitMyOpenCaseListing(); }catch(Exception e) { System.out.println("Blank Home Page"); Log.info("log4j - msg -Blank Home Page");} homePageObject.clickProviders(); Thread.sleep(2000); //click case managers ProvidersPage providersPageObject = new ProvidersPage(driver); providersPageObject.clickOnCaseManagers(); Thread.sleep(2000); CaseManagerListingPage caseManagerListingPageObject = new CaseManagerListingPage(driver); caseManagerListingPageObject.copyCaseManager( code, name,newCode, newName); } @AfterMethod public void afterMethod() throws Exception { if (driver!=null) driver.quit(); System.out.println("Done with Case Manager-Copy \n\n"); if (fis != null) fis.close(); } }
[ "agavirangappa@MAC-LAP-125.macrosoftindia.com" ]
agavirangappa@MAC-LAP-125.macrosoftindia.com
1ca5a70e8f94e29c8f235afea8609de51315a691
276c301d72b8889c67ec468eb1c6297cb843f062
/alfresco-mobile-android-commons/alfresco-mobile-android-commons/src/org/alfresco/mobile/android/application/commons/utils/AndroidVersion.java
1e2e7cfe16417c67d2f4a0c632dad574e6cc23f7
[ "MIT", "Apache-2.0" ]
permissive
davigp/alfresco-android-app
1e9ca96bb5f623650dcb037801b38add6b600fbd
b31e2843c0a043eb300ecac68f32f6d122a55216
refs/heads/master
2021-01-17T23:51:36.615087
2014-03-18T17:23:21
2014-03-18T17:23:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,780
java
/******************************************************************************* * Copyright (C) 2005-2012 Alfresco Software Limited. * * This file is part of Alfresco Mobile for Android. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. ******************************************************************************/ package org.alfresco.mobile.android.application.commons.utils; public final class AndroidVersion { private AndroidVersion() { } public static boolean isICSOrAbove() { return android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH; } public static boolean isJBOrAbove() { return android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN; } public static boolean isHCOrAbove() { return android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.HONEYCOMB; } public static boolean isHCMR1OrAbove() { return android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.HONEYCOMB_MR1; } public static boolean isHCMR2OrAbove() { return android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.HONEYCOMB_MR2; } }
[ "jeanmarie.pascal@alfresco.com" ]
jeanmarie.pascal@alfresco.com
a97ef1397dfddf9c7d1afc07d8d89b69edfe14bd
5979994b215fabe125cd756559ef2166c7df7519
/aimir-model-eclipselink/src/main/java/com/aimir/dao/device/impl/FirmwareIssueDaoImpl.java
c13950453d7315c67256edfbeacc5913cd503e0c
[]
no_license
TechTinkerer42/Haiti
91c45cb1b784c9afc61bf60d43e1d5623aeba888
debaea96056d1d4611b79bd846af8f7484b93e6e
refs/heads/master
2023-04-28T23:39:43.176592
2021-05-03T10:49:42
2021-05-03T10:49:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,986
java
/** * Copyright Nuri Telecom Corp. * 파일명: FirmwareIssueDaoImpl * 작성일자/작성자 : 2016.09.13 elevas park * @see * * * 펌웨어 배포 이력 DAO * * ============================================================================ * 수정 내역 * NO 수정일자 수정자 수정내역 * * ============================================================================ */ package com.aimir.dao.device.impl; import java.util.List; import java.util.Map; import java.util.Set; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.stereotype.Repository; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import com.aimir.dao.AbstractJpaDao; import com.aimir.dao.device.FirmwareIssueDao; import com.aimir.model.device.FirmwareIssue; import com.aimir.model.device.FirmwareIssuePk; import com.aimir.util.Condition; @Repository(value = "firmwareIssueDao") public class FirmwareIssueDaoImpl extends AbstractJpaDao<FirmwareIssue, FirmwareIssuePk> implements FirmwareIssueDao { private static Log logger = LogFactory.getLog(FirmwareIssueDaoImpl.class); protected FirmwareIssueDaoImpl() { super(FirmwareIssue.class); } @Override public Class<FirmwareIssue> getPersistentClass() { // TODO Auto-generated method stub return null; } @Override public List<Object> getSumFieldByCondition(Set<Condition> conditions, String field, String... groupBy) { // TODO Auto-generated method stub return null; } @Override public List<Object> getFirmwareIssueList(Map<String, Object> condition) throws Exception { // TODO Auto-generated method stub return null; } @Transactional(readOnly=true, propagation=Propagation.REQUIRES_NEW) public List<FirmwareIssue> getFirmwareIssue(Set<Condition> set) { return findByConditions(set); } }
[ "marsr0913@nuritelecom.com" ]
marsr0913@nuritelecom.com
f7713abd2061d88e61cd63093af651cec6a1c2a8
f0d25d83176909b18b9989e6fe34c414590c3599
/app/src/main/java/com/google/android/gms/common/util/zza.java
a279da0c7bae0e3de01984cea4cb117985dd78a6
[]
no_license
lycfr/lq
e8dd702263e6565486bea92f05cd93e45ef8defc
123914e7c0d45956184dc908e87f63870e46aa2e
refs/heads/master
2022-04-07T18:16:31.660038
2020-02-23T03:09:18
2020-02-23T03:09:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,390
java
package com.google.android.gms.common.util; import android.support.v4.util.ArrayMap; import java.util.AbstractSet; import java.util.Collection; import java.util.Iterator; @Deprecated public final class zza<E> extends AbstractSet<E> { private final ArrayMap<E, E> zzaJC; public zza() { this.zzaJC = new ArrayMap<>(); } public zza(int i) { this.zzaJC = new ArrayMap<>(i); } public final boolean add(E e) { if (this.zzaJC.containsKey(e)) { return false; } this.zzaJC.put(e, e); return true; } public final boolean addAll(Collection<? extends E> collection) { if (!(collection instanceof zza)) { return super.addAll(collection); } int size = size(); this.zzaJC.putAll(((zza) collection).zzaJC); return size() > size; } public final void clear() { this.zzaJC.clear(); } public final boolean contains(Object obj) { return this.zzaJC.containsKey(obj); } public final Iterator<E> iterator() { return this.zzaJC.keySet().iterator(); } public final boolean remove(Object obj) { if (!this.zzaJC.containsKey(obj)) { return false; } this.zzaJC.remove(obj); return true; } public final int size() { return this.zzaJC.size(); } }
[ "quyenlm.vn@gmail.com" ]
quyenlm.vn@gmail.com
5881a7872b5b5c97a72766bbbfcf297a7e99ca48
41f556d51b2ae751b76571648e57d767f9ab80d2
/Algorithms/Java/medium/1219_Path_with_Maximum_Gold_[Medium].java
66de0eb18d7b6777631f8d5bbd2c5c0d1328bb20
[]
no_license
homurax/leetcode
fc8bfc0b5406c25de22fad2875d77328a395dee3
92f169dc46fff5cfccb79153eef2da8714af209d
refs/heads/master
2023-08-31T22:34:53.681488
2023-08-31T03:01:09
2023-08-31T03:01:09
174,257,716
2
0
null
null
null
null
UTF-8
Java
false
false
2,033
java
/** * 1219. Path with Maximum Gold * * In a gold mine grid of size m * n, each cell in this mine has an integer representing the amount of gold in that cell, 0 if it is empty. * * Return the maximum amount of gold you can collect under the conditions: * * Every time you are located in a cell you will collect all the gold in that cell. * From your position you can walk one step to the left, right, up or down. * You can't visit the same cell more than once. * Never visit a cell with 0 gold. * You can start and stop collecting gold from any position in the grid that has some gold. * * * Example 1: * * Input: grid = [[0,6,0],[5,8,7],[0,9,0]] * Output: 24 * Explanation: * [[0,6,0], * [5,8,7], * [0,9,0]] * Path to get the maximum gold, 9 -> 8 -> 7. * * Example 2: * * Input: grid = [[1,0,7],[2,0,6],[3,4,5],[0,3,0],[9,0,20]] * Output: 28 * Explanation: * [[1,0,7], * [2,0,6], * [3,4,5], * [0,3,0], * [9,0,20]] * Path to get the maximum gold, 1 -> 2 -> 3 -> 4 -> 5 -> 6 -> 7. * * * Constraints: * * 1 <= grid.length, grid[i].length <= 15 * 0 <= grid[i][j] <= 100 * There are at most 25 cells containing gold. */ public class PathWithMaximumGold { public static int getMaximumGold(int[][] grid) { int ans = 0; int m = grid.length, n = grid[0].length; for (int i = 0; i < m; i++) { for (int j = 0; j < n; j++) { ans = Math.max(ans, dfs(grid, i, j)); } } return ans; } private static int dfs(int[][] grid, int i, int j) { if (i < 0 || i >= grid.length || j < 0 || j >= grid[0].length || grid[i][j] == 0) { return 0; } int bak = grid[i][j]; grid[i][j] = 0; int up = dfs(grid, i, j - 1); int down = dfs(grid, i, j + 1); int left = dfs(grid, i - 1, j); int right = dfs(grid, i + 1, j); int max = Math.max(up, Math.max(down, Math.max(left, right))); grid[i][j] = bak; return max + bak; } }
[ "homuraxenoblade@gmail.com" ]
homuraxenoblade@gmail.com
63bab9b6ad332fff80a8f8a5b3b18e34562f5a5f
86505462601eae6007bef6c9f0f4eeb9fcdd1e7b
/bin/modules/configurable-bundle/configurablebundleservices/src/de/hybris/platform/configurablebundleservices/search/solrfacetsearch/provider/impl/ProductBundleTemplatesValueProvider.java
c51a1fac9df07d2d9d41905b68f57a5eb446c626
[]
no_license
jp-developer0/hybrisTrail
82165c5b91352332a3d471b3414faee47bdb6cee
a0208ffee7fee5b7f83dd982e372276492ae83d4
refs/heads/master
2020-12-03T19:53:58.652431
2020-01-02T18:02:34
2020-01-02T18:02:34
231,430,332
0
4
null
2020-08-05T22:46:23
2020-01-02T17:39:15
null
UTF-8
Java
false
false
3,269
java
/* * Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. */ package de.hybris.platform.configurablebundleservices.search.solrfacetsearch.provider.impl; import static de.hybris.platform.servicelayer.util.ServicesUtil.validateParameterNotNullStandardMessage; import de.hybris.platform.core.model.c2l.LanguageModel; import de.hybris.platform.core.model.product.ProductModel; import de.hybris.platform.solrfacetsearch.config.IndexConfig; import de.hybris.platform.solrfacetsearch.config.IndexedProperty; import de.hybris.platform.solrfacetsearch.config.exceptions.FieldValueProviderException; import de.hybris.platform.solrfacetsearch.provider.FieldNameProvider; import de.hybris.platform.solrfacetsearch.provider.FieldValue; import de.hybris.platform.solrfacetsearch.provider.FieldValueProvider; import de.hybris.platform.solrfacetsearch.provider.impl.AbstractPropertyFieldValueProvider; import de.hybris.platform.configurablebundleservices.model.BundleTemplateModel; import java.io.Serializable; import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.springframework.beans.factory.annotation.Required; /** * This ValueProvider will provide the value for the {@link ProductModel}'s attribute bundleTemplates. It consists of * the concatenated id's of the bundle templates the product is assigned to. */ public class ProductBundleTemplatesValueProvider extends AbstractPropertyFieldValueProvider implements FieldValueProvider, Serializable { private transient FieldNameProvider fieldNameProvider; @Override public Collection<FieldValue> getFieldValues(final IndexConfig indexConfig, final IndexedProperty indexedProperty, final Object model) throws FieldValueProviderException { validateParameterNotNullStandardMessage("model", model); final List<FieldValue> fieldValues = new ArrayList<>(); if (model instanceof ProductModel) { final ProductModel productModel = (ProductModel) model; fieldValues.addAll(createFieldValue(productModel, indexedProperty)); } return fieldValues; } protected List<FieldValue> createFieldValue(final ProductModel productModel, final IndexedProperty indexedProperty) { final List<FieldValue> fieldValues = new ArrayList<>(); final Collection<BundleTemplateModel> bundleTemplates = productModel.getBundleTemplates(); for (final BundleTemplateModel bundleTemplate : bundleTemplates) { addFieldValues(fieldValues, indexedProperty, null, bundleTemplate.getId()); } return fieldValues; } protected void addFieldValues(final List<FieldValue> fieldValues, final IndexedProperty indexedProperty, final LanguageModel language, final Object value) { final Collection<String> fieldNames = getFieldNameProvider().getFieldNames(indexedProperty, language == null ? null : language.getIsocode()); for (final String fieldName : fieldNames) { fieldValues.add(new FieldValue(fieldName, value)); } } protected FieldNameProvider getFieldNameProvider() { return fieldNameProvider; } @Required public void setFieldNameProvider(final FieldNameProvider fieldNameProvider) { this.fieldNameProvider = fieldNameProvider; } }
[ "juan.gonzalez.working@gmail.com" ]
juan.gonzalez.working@gmail.com
bb423e273aa532491b4adf48d1ab389b22c6f90a
60ab345245921aea8cab939fd44679d758b0d093
/src/org/activiti/bpmn/converter/child/ActivitiListenerParser.java
caacd81a5d00e0af297d5343696a75b19f4f3979
[]
no_license
guogongzhou/afunms
405d56f7c5cad91d0a5e1fea5c9858f1358d0172
40127ef7aecdc7428a199b0e8cce30b27207fee8
refs/heads/master
2021-01-15T19:23:43.488074
2014-11-11T06:36:48
2014-11-11T06:36:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,198
java
/* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.activiti.bpmn.converter.child; import javax.xml.stream.XMLStreamReader; import org.activiti.bpmn.model.ActivitiListener; import org.activiti.bpmn.model.BaseElement; import org.activiti.bpmn.model.ImplementationType; import org.apache.commons.lang.StringUtils; /** * @author Tijs Rademakers */ public abstract class ActivitiListenerParser extends BaseChildElementParser { protected ActivitiListener listener; public void parseChildElement(XMLStreamReader xtr, BaseElement parentElement) throws Exception { listener = new ActivitiListener(); if (StringUtils.isNotEmpty(xtr.getAttributeValue(null, ATTRIBUTE_LISTENER_CLASS))) { listener.setImplementation(xtr.getAttributeValue(null, ATTRIBUTE_LISTENER_CLASS)); listener.setImplementationType(ImplementationType.IMPLEMENTATION_TYPE_CLASS); } else if (StringUtils.isNotEmpty(xtr.getAttributeValue(null, ATTRIBUTE_LISTENER_EXPRESSION))) { listener.setImplementation(xtr.getAttributeValue(null, ATTRIBUTE_LISTENER_EXPRESSION)); listener.setImplementationType(ImplementationType.IMPLEMENTATION_TYPE_EXPRESSION); } else if (StringUtils.isNotEmpty(xtr.getAttributeValue(null, ATTRIBUTE_LISTENER_DELEGATEEXPRESSION))) { listener.setImplementation(xtr.getAttributeValue(null, ATTRIBUTE_LISTENER_DELEGATEEXPRESSION)); listener.setImplementationType(ImplementationType.IMPLEMENTATION_TYPE_DELEGATEEXPRESSION); } listener.setEvent(xtr.getAttributeValue(null, ATTRIBUTE_LISTENER_EVENT)); parseChildElements(xtr, listener, new FieldExtensionParser()); } }
[ "happysoftware@foxmail.com" ]
happysoftware@foxmail.com
b9c223d06244760d9a174856be4d770b92c7fce3
ed6d37c441a73c296a8b621e14d96957060c2baf
/boot-jms/src/main/java/hello/JMSListener.java
8f81f5a282b6201d24254a8f40b83b513e498a07
[]
no_license
pczapski/spring-boot-crud
fb4236d6d65afa450005aaa67b14b1d09b911b76
17b3393a7ca95da9f32b3592d3faa1ca2cf9730e
refs/heads/master
2023-07-03T00:15:28.952673
2019-11-11T18:04:44
2019-11-11T18:04:44
92,623,969
0
0
null
2023-09-13T23:57:16
2017-05-27T21:03:56
JavaScript
UTF-8
Java
false
false
1,395
java
package hello; import java.io.IOException; import java.util.Map; import java.util.Set; import javax.jms.JMSException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; import org.springframework.jms.annotation.JmsListener; import org.springframework.jms.config.JmsListenerEndpointRegistry; import org.springframework.jms.core.JmsTemplate; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; @RestController @RequestMapping("/currencyRates") public class JMSListener { SseEmitter emitter; @Autowired JmsListenerEndpointRegistry registry; @Autowired JmsTemplate sender; @RequestMapping(path = "/stream", method = RequestMethod.GET) public SseEmitter stream() throws IOException { Set<String> listenerContainerIds = registry.getListenerContainerIds(); for (String string : listenerContainerIds) { registry.getListenerContainer(string).start(); } emitter = new SseEmitter(); return emitter; } @JmsListener(destination = "rates") public void receiveQueue(Map<String, Object> message) throws JMSException, Exception { if (emitter != null) { emitter.send(message, MediaType.APPLICATION_JSON); } } }
[ "miro1994" ]
miro1994
12af7d975172b3f0cc968e8bc3722581516ac4a2
5f083bc330f5e2039a2e6f1c154944ccbf9c461e
/norconex-collector-filesystem/src/main/java/com/norconex/collector/fs/doc/FileDocument.java
a3ff5eeb61480a7ee82e36508e04226dc5ba3a82
[]
no_license
kkjslee/collector-filesystem
df35ad5629a55d8ae7bbeb1aaf2b452eb6346fbf
1188f02eae0a522c0cb0baa2b82d3e789229e32e
refs/heads/master
2019-04-09T01:35:32.345276
2016-12-14T18:29:00
2016-12-14T18:29:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,556
java
/* Copyright 2013-2014 Norconex 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.norconex.collector.fs.doc; import com.norconex.commons.lang.io.CachedInputStream; import com.norconex.importer.doc.ImporterDocument; //TODO consider dropping since it just brings FileMetadata cast. public class FileDocument extends ImporterDocument { public FileDocument(String reference, CachedInputStream content) { super(reference, content, new FileMetadata(reference)); } public FileDocument(ImporterDocument importerDocument) { super(importerDocument.getReference(), importerDocument.getContent(), new FileMetadata(importerDocument.getMetadata())); setReference(importerDocument.getReference()); setContentType(importerDocument.getContentType()); setContentEncoding(importerDocument.getContentEncoding()); } public FileMetadata getMetadata() { return (FileMetadata) super.getMetadata(); } }
[ "pascal.essiembre@norconex.com" ]
pascal.essiembre@norconex.com
e4e690dca030431f06d0b54337167666f467bc74
62e334192393326476756dfa89dce9f0f08570d4
/tk_code/course-server/course-web-server/src/main/java/com/huatu/tiku/course/web/controller/v5/TeacherControllerV5.java
c9aea9d0a8a4a7d63ae9d28b159cfc385850c7eb
[]
no_license
JellyB/code_back
4796d5816ba6ff6f3925fded9d75254536a5ddcf
f5cecf3a9efd6851724a1315813337a0741bd89d
refs/heads/master
2022-07-16T14:19:39.770569
2019-11-22T09:22:12
2019-11-22T09:22:12
223,366,837
1
2
null
2022-06-30T20:21:38
2019-11-22T09:15:50
Java
UTF-8
Java
false
false
2,962
java
package com.huatu.tiku.course.web.controller.v5; import com.huatu.springboot.web.version.mapping.annotation.ApiVersion; import com.huatu.tiku.course.netschool.api.v5.TeacherServiceV5; import com.huatu.tiku.course.spring.conf.aspect.mapParam.LocalMapParam; import com.huatu.tiku.course.spring.conf.aspect.mapParam.LocalMapParamHandler; import com.huatu.tiku.course.util.ResponseUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.HashMap; /** * Created by lijun on 2018/6/26 */ @RestController @RequestMapping("/teacher") @ApiVersion("v5") public class TeacherControllerV5 { @Autowired private TeacherServiceV5 teacherService; /** * 老师在售课程 */ @LocalMapParam @GetMapping("getPayClassesAll") public Object getPayClassesAll( @RequestParam String teacherName, @RequestParam(defaultValue = "1") int page, @RequestParam(defaultValue = "10") int pageSize ) { HashMap<String, Object> map = LocalMapParamHandler.get(); return ResponseUtil.build(teacherService.getPayClassesAll(map)); } /** * 单个老师详情介绍 */ @GetMapping("{teacherId}/getTeacherDetail") public Object getTeacherDetail(@PathVariable int teacherId) { return ResponseUtil.build(teacherService.getTeacherDetail(teacherId)); } /** * 老师详情页 历史课件列表 */ @LocalMapParam @GetMapping("{teacherId}/historyLessonList") public Object historyLessonList( @PathVariable int teacherId, @RequestParam int classId, @RequestParam(defaultValue = "1") int page, @RequestParam(defaultValue = "10") int pageSize) { HashMap<String, Object> map = LocalMapParamHandler.get(); return ResponseUtil.build(teacherService.historyLessonList(map)); } /** * 老师详情页评价历史课程列表 */ @LocalMapParam @GetMapping("{teacherId}/historyCourse") public Object historyCourse( @PathVariable int teacherId, @RequestParam(defaultValue = "1") int page, @RequestParam(defaultValue = "10") int pageSize) { HashMap<String, Object> map = LocalMapParamHandler.get(); return ResponseUtil.build(teacherService.historyCourse(map)); } /** * 老师详情页评价课件评价列表 */ @LocalMapParam @GetMapping("{teacherId}/lessonEvaluateList") public Object lessonEvaluateList( @PathVariable int teacherId, @RequestParam int classId, @RequestParam int lessonId, @RequestParam(defaultValue = "1") int page, @RequestParam(defaultValue = "10") int pageSize ) { HashMap<String, Object> map = LocalMapParamHandler.get(); return ResponseUtil.build(teacherService.lessonEvaluateList(map)); } }
[ "jelly_b@126.com" ]
jelly_b@126.com
64187037ae1cb408a32aa63a4917bbe8a9d2e198
2b40d55e06270926fcae044043ae5beb95d74f3c
/actividades/prog/files/java/mil-ejemplos/darwin/xmlform/XmlForm.java
ed17a9d24541539352a78a8c6de17f89e151c3f7
[ "CC0-1.0", "CC-BY-SA-3.0", "BSD-2-Clause" ]
permissive
jsuabur/libro-de-actividades
15af2318407420b5cd81f4c4bc8a8371ee0c1eee
2941e34a5112962403d965e53435951981652503
refs/heads/master
2020-04-07T16:40:10.388462
2018-11-21T11:25:44
2018-11-21T11:25:44
158,537,991
0
0
CC0-1.0
2018-11-21T11:30:22
2018-11-21T11:30:22
null
UTF-8
Java
false
false
1,787
java
package xmlform; import java.io.*; import org.w3c.dom.*; import javax.xml.parsers.*; /** Convert a simple XML file to text. * @author Ian Darwin, http://www.darwinsys.com/ * @version $Id: XmlForm.java,v 1.20 2004/09/08 20:13:23 ian Exp $ */ public class XmlForm { protected Reader is; protected String fileName; protected static PrintStream msg = System.out; /** Construct a converter given an input filename */ public XmlForm(String fn) { fileName = fn; } /** Convert the file */ public void convert(boolean verbose) { try { if (verbose) System.err.println(">>>Parsing " + fileName + "..."); // Make the document a URL so relative DTD works. //String uri = "file:" + new File(fileName).getAbsolutePath(); InputStream uri = getClass().getResourceAsStream(fileName); DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document doc = builder.parse( uri ); if (verbose) System.err.println(">>>Walking " + fileName + "..."); XmlFormWalker c = new GenMIF(doc, msg); c.convertAll(); } catch (Exception ex) { System.err.println("+================================+"); System.err.println("| *Parse Error* |"); System.err.println("+================================+"); System.err.println(ex.getClass()); System.err.println(ex.getMessage()); System.err.println("+================================+"); } if (verbose) System.err.println(">>>Done " + fileName + "..."); } public static void main(String[] av) { if (av.length == 0) { System.err.println("Usage: XmlForm file"); return; } for (int i=0; i<av.length; i++) { String name = av[i]; new XmlForm(name).convert(true); } msg.close(); } }
[ "dvarrui@gmail.com" ]
dvarrui@gmail.com
d66b9ce7dff05ba03422c9ad65c03e02ddff06e2
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/15/15_3077ed426ad6fd470da63aeebe8d8fbfeab9fca2/EnderPearlListener/15_3077ed426ad6fd470da63aeebe8d8fbfeab9fca2_EnderPearlListener_s.java
4641d1a5207c7db9cbcf3b7a12b6f9c988e30440
[]
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
613
java
package me.shock.boatspeed; import org.bukkit.entity.EntityType; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.entity.EntityTeleportEvent; import org.bukkit.plugin.java.JavaPlugin; public class EnderPearlListener extends JavaPlugin implements Listener { final Main plugin; public EnderPearlListener(Main instance) { plugin = instance; } @EventHandler public void onTeleport(EntityTeleportEvent event) { EntityType entity = event.getEntityType(); if (entity.equals(EntityType.ENDER_PEARL)) event.setCancelled(true); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
29b9c4158830a0aff57b7739f081e6dc91b4b11a
7b73756ba240202ea92f8f0c5c51c8343c0efa5f
/classes5/com/tencent/biz/pubaccount/ecshopassit/EcShopAssistantManager$DiscoveryConfig.java
d0f6b7cfdee8245a314ddbf4dcc9f8dc11d9c0ae
[]
no_license
meeidol-luo/qooq
588a4ca6d8ad579b28dec66ec8084399fb0991ef
e723920ac555e99d5325b1d4024552383713c28d
refs/heads/master
2020-03-27T03:16:06.616300
2016-10-08T07:33:58
2016-10-08T07:33:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
561
java
package com.tencent.biz.pubaccount.ecshopassit; import com.tencent.mobileqq.hotpatch.NotVerifyClass; public class EcShopAssistantManager$DiscoveryConfig { public int a; public String a; public String b; public String c; public EcShopAssistantManager$DiscoveryConfig() { boolean bool = NotVerifyClass.DO_VERIFY_CLASS; } } /* Location: E:\apk\QQ_91\classes5-dex2jar.jar!\com\tencent\biz\pubaccount\ecshopassit\EcShopAssistantManager$DiscoveryConfig.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "1776098770@qq.com" ]
1776098770@qq.com
041a9ff11f7e2b8f8db82ff1822e2d967f55916c
9dbcda0c979ae425c79e570c70c3464f4052ecad
/src/br/com/luciano/exameocp/generics/GenericText.java
c67ffb23ae950dbf26b1755250b44d6657a50943
[ "Apache-2.0" ]
permissive
AntonioLimaSilva/ocp-java-se-8
46fbbb978e81ed3ed7cfdcaeffc4df436dd027df
3a5e133cebca199769878c4e5a1996f8dabbdf40
refs/heads/master
2021-09-19T09:30:42.958297
2018-07-26T12:58:33
2018-07-26T12:58:33
115,807,746
0
0
null
null
null
null
UTF-8
Java
false
false
770
java
package br.com.luciano.exameocp.generics; /** * * @author Luciano Lima * */ public class GenericText { public static void main(String[] args) { Integer arrayInteger[] = new Integer[]{1, 2, 3, 4, 5}; //O generics não si aplica para tipos primitivos int arrayInt[] = new int[]{1, 2, 3, 4, 5}; Double []arrayDouble = new Double[5]; arrayDouble[0] = 10.00; arrayDouble[1] = 11.00; arrayDouble[2] = 12.00; arrayDouble[3] = 13.00; arrayDouble[4] = 14.00; Character arrayCharacter[] = {'C', 'V', 'B', 'F'}; printArray(arrayInteger); printArray(arrayDouble); printArray(arrayCharacter); //printArray(arrayInt); Não compila } static <T> void printArray(T[] array) { for (T i : array) { System.out.println(i); } } }
[ "luclimasilva@hotmail.com" ]
luclimasilva@hotmail.com
ab34a1768c5263f428fa3e191ccaab7f667446b6
8b49b48892f698439ce7ce2e85b4fa3804370c62
/src/com/danbro/javase/src/main/java/multiThread/ThreadLocal/ThreadLocalTest1.java
a5cf05930d204fc023517a211065f96d90eba770
[]
no_license
Danbro007/jdk-source-analysis
319223e56ea9c3f752e86f258684981d4e95180f
bbe0b6acb07be13b59e60bec3fab7ec90d543ad9
refs/heads/master
2023-01-22T08:42:44.624405
2020-12-04T06:15:03
2020-12-04T06:15:03
277,484,296
0
0
null
null
null
null
UTF-8
Java
false
false
1,275
java
package multiThread.ThreadLocal; import java.text.SimpleDateFormat; import java.util.Random; /** * @Classname ThreadLocalTest1 * @Description TODO * @Date 2020/8/10 20:20 * @Author Danrbo */ public class ThreadLocalTest1 implements Runnable{ private static final ThreadLocal<SimpleDateFormat> FORMAT_THREAD_LOCAL = ThreadLocal.withInitial(()->new SimpleDateFormat("yyyyMMdd HHmm")); public static void main(String[] args) throws InterruptedException { ThreadLocalTest1 obj = new ThreadLocalTest1(); for (int i = 0; i < 10; i++) { Thread t = new Thread(obj, "" + i); Thread.sleep(new Random().nextInt(1000)); t.start(); } System.out.println("结束"); } @Override public void run() { System.out.println("Thread Name= "+Thread.currentThread().getName()+" default Formatter = "+FORMAT_THREAD_LOCAL.get().toPattern()); try { Thread.sleep(new Random().nextInt(1000)); } catch (InterruptedException e) { e.printStackTrace(); } FORMAT_THREAD_LOCAL.set(new SimpleDateFormat()); System.out.println("Thread Name= "+Thread.currentThread().getName()+" formatter = "+FORMAT_THREAD_LOCAL.get().toPattern()); } }
[ "710170342@qq.com" ]
710170342@qq.com
cc1bc18f9475552b2561929024ecab6cf4744091
01d6046f52c5e58c4ba648350778d13418f72f54
/src/main/java/com/ybg/rbac/user/dao/UserDao.java
a470f9ba833573a963cf3289889352d574c4fdd9
[]
no_license
MingHub0313/zmm_ybg_plus
05f03c5587de685d7f4df451d4c12ca8d1d3eed1
54f439870c93d382a3a71065f872823b24112d10
refs/heads/master
2022-07-02T13:15:57.271195
2020-01-16T03:46:56
2020-01-16T03:46:56
234,228,750
0
0
null
2022-06-17T02:48:56
2020-01-16T03:40:01
JavaScript
UTF-8
Java
false
false
2,093
java
package com.ybg.rbac.user.dao; import java.util.List; import org.springframework.social.connect.Connection; import com.ybg.base.jdbc.BaseMap; import com.ybg.base.util.Page; import com.ybg.rbac.user.domain.UserDTO; import com.ybg.rbac.user.qvo.UserQuery; /*** * @author https://gitee.com/YYDeament/88ybg * * @date 2016/10/1 */ public interface UserDao { /** * 创建用户 * * @param user * @return * @throws Exception */ UserDTO save(UserDTO user) throws Exception; /** * 更新数据,条件 和 需要更新的字段都不能为空 不限个数个条件 * * @author Deament * @param updatemap * 需要更新的字段和值 * @param wheremap * 更新中的条件字段和值 * @param table_name * 表的名称 **/ void update(BaseMap<String, Object> updatemap, BaseMap<String, Object> wheremap); /** * 分页查询 * * @param page * @param qvo * @return * @throws Exception */ Page list(Page page, UserQuery qvo) throws Exception; /** * 不分页查询 * * @param qvo * @return * @throws Exception */ List<UserDTO> list(UserQuery qvo) throws Exception; /** * 登陆 * * @param loginname * @return */ UserDTO login(String loginname); /** * 根据条件删除 * * @param wheremap */ void remove(BaseMap<String, Object> wheremap); /** * 清除注册不激活的用户 * * @throws Exception **/ void removeExpired() throws Exception; /** * 查询账户是否已存在 * * @param qvo * @return */ boolean checkisExist(UserQuery qvo); /** * 根据ID登陆 * * @param userId * @return */ UserDTO loginById(String userId); /** * 找到用户的社交ID * * @param connection * @return */ public List<String> findUserIdsWithConnection(Connection<?> connection); /** * 更新用户的角色依赖 * * @param userid * @param roleids */ void updateUserRole(String userid, List<String> roleids); /** * 根据ID 获取用户 * * @param id * @return */ UserDTO getById(String id); }
[ "zhangmingmig@adpanshi.com" ]
zhangmingmig@adpanshi.com
37d4bad773a25ab05548239403d9e32618c83c1e
54abf5b1b505afc1e5afb3d4fd88b80c5d37030b
/src/main/java/staticattrmeth/bank/BankTransaction.java
023fad5945f8f11e27cf4a7c6aa30bab270edfd8
[]
no_license
BrigiBalogh/training-solutions
af5a6cb8d902ce243a47af636cf7c2fea8c8486c
eadd05f484945535dbdd72402b193811ef1980e1
refs/heads/master
2023-05-06T16:15:02.640745
2021-05-23T17:10:37
2021-05-23T17:10:37
309,090,927
0
0
null
null
null
null
UTF-8
Java
false
false
1,691
java
package staticattrmeth.bank; import java.math.BigDecimal; import java.math.RoundingMode; public class BankTransaction { private static final long MIN_TRX_VALUE = 1; private static final long MAX_TRX_VALUE = 10_000_000; private static long countTrx = 0; private static BigDecimal sumOfTrxs = new BigDecimal("0"); private static long currentMinValue = MIN_TRX_VALUE; private static long currentMaxValue = MAX_TRX_VALUE; private long trxValue; public static void initTheDay() { countTrx = 0; sumOfTrxs = new BigDecimal("0"); currentMinValue = MIN_TRX_VALUE; currentMaxValue = MAX_TRX_VALUE; } public static BigDecimal averageOfTransaction() { return countTrx == 0 ? new BigDecimal("0") : sumOfTrxs.divide(new BigDecimal(Long.toString(countTrx)),0, RoundingMode.HALF_UP); } public static long getCurrentMinValue() { return countTrx == 0 ? 0 : currentMinValue; } public static long getCurrentMaxValue() { return countTrx == 0 ? 0 : currentMaxValue; } public static BigDecimal getSumOfTrxs() { return sumOfTrxs; } public BankTransaction(long trxValue){ if(trxValue <= MIN_TRX_VALUE && trxValue >= MAX_TRX_VALUE) { throw new IllegalArgumentException("The transaction is invalid !"); } countTrx++; sumOfTrxs = sumOfTrxs.add(new BigDecimal(Long.toString(trxValue))); if (trxValue < currentMinValue) currentMinValue = trxValue; if (trxValue > currentMaxValue) currentMaxValue = trxValue; this.trxValue = trxValue; } public long getTrxValue() { return trxValue; } }
[ "73614406+BrigiBalogh@users.noreply.github.com" ]
73614406+BrigiBalogh@users.noreply.github.com