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
80021377a1cefcc146fb96070c1ff96ca13c211c
f1b5543affa2bc6cfbc44ec0587a0cb8aa6195d4
/src/main/java/com/eomcs/oop/ex04/Exam0111.java
08f50ff3c60164a0508c1b483f5593db5f2cd887
[]
no_license
eomjinyoung/bitcamp-20201221
1b5d5ebe5c17a0af9e123df0e5bdd37203372ecb
582c105d48a5369e1d4a4eb0a7e91f4ed7823111
refs/heads/main
2023-05-12T20:01:45.249224
2021-06-03T10:12:59
2021-06-03T10:12:59
326,534,759
1
0
null
null
null
null
UTF-8
Java
false
false
1,205
java
// 생성자 활용 예 - 자바에서 제공하는 클래스 사용을 통해 생성자 활용을 익혀보자! package com.eomcs.oop.ex04; public class Exam0111 { public static void main(String[] args) throws Exception { // 생성자를 호출하여 문자열 인스턴스를 초기화시킨다. // => 문자열 리터럴을 사용하여 String 인스턴스를 초기화시키기. String s1 = new String("Hello"); // => char[] 을 사용하여 String 인스턴스 초기화시키기. char[] chars = new char[] {'H', 'e', 'l', 'l', 'o'}; String s2 = new String(chars); // => 바이트 배열을 가지고 String 인스턴스 초기화시키기 byte[] bytes = { (byte)0x48, // H (byte)0x65, // e (byte)0x6c, // l (byte)0x6c, // l (byte)0x6f // o }; String s3 = new String(bytes); System.out.printf("%s, %s, %s\n", s1, s2, s3); } } // 생성자의 활용 // => 인스턴스 변수를 초기화시키기 위해 여러 개의 생성자를 만들어 제공할 수 있다. // => 자신에게 맞는 적절한 생성자를 호출하여 인스턴스를 초기화시킨 후 사용하면 된다.
[ "jinyoung.eom@gmail.com" ]
jinyoung.eom@gmail.com
b961389ae1365cef56e218d11eb40c1e3007ab54
184fa0d0166e8bb39ef7f5056effb3242fb684db
/app/src/main/java/de/uzl/itm/ncoap/android/client/ServiceDiscoveryTask.java
82032e677378c60f56d16cba5e1a4f9cd3166121
[]
no_license
az666/spitfirefox
a9246ef45a1653d52a80fd02ccdc1428630dcf2f
c44549786021fd07d118ba647695b6026de99cb5
refs/heads/master
2020-05-07T08:39:31.320437
2018-03-20T18:50:08
2018-03-20T18:50:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,570
java
/** * Created by olli on 13.05.15. */ package de.uzl.itm.ncoap.android.client; import android.app.ProgressDialog; import android.os.AsyncTask; import android.widget.*; import de.uzl.itm.client.R; import de.uzl.itm.ncoap.application.client.ClientCallback; import de.uzl.itm.ncoap.application.client.CoapClient; import de.uzl.itm.ncoap.application.linkformat.LinkValueList; import de.uzl.itm.ncoap.communication.blockwise.BlockSize; import de.uzl.itm.ncoap.message.*; import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.URI; import java.util.*; /** * Created by olli on 07.05.15. */ public class ServiceDiscoveryTask extends AsyncTask<Void, Void, Void> { private CoapClientActivity activity; private CoapClient coapClient; private ProgressDialog progressDialog; private String serverName; private int portNumber; private boolean confirmable; private BlockSize block2Size; public ServiceDiscoveryTask(CoapClientActivity activity){ this.activity = activity; this.coapClient = this.activity.getClientApplication(); this.progressDialog = new ProgressDialog(this.activity); } @Override protected void onPreExecute(){ //Read server name from UI this.serverName = ((EditText) activity.findViewById(R.id.txt_server)).getText().toString(); try { this.portNumber = Integer.valueOf(((EditText) activity.findViewById(R.id.txt_port)).getText().toString()); } catch(NumberFormatException ex) { this.portNumber = 5683; } this.confirmable = ((RadioButton) activity.findViewById(R.id.rad_con)).isChecked(); this.block2Size = this.getBlock2Size(); progressDialog.setMessage( this.activity.getResources().getString(R.string.waiting) ); progressDialog.show(); } private BlockSize getBlock2Size() { long block2Szx= ((Spinner) activity.findViewById(R.id.spn_block2)).getSelectedItemId() - 1; return BlockSize.getBlockSize(block2Szx); } @Override protected Void doInBackground(final Void... nothing) { try { if("".equals(serverName)) { showToast("Enter Server (Host or IP)"); return null; } //Create socket address from server name and port InetSocketAddress remoteEndpoint = new InetSocketAddress(InetAddress.getByName(serverName), portNumber); //Read CON/NON from UI int messageType; if(this.confirmable){ messageType = MessageType.CON; } else { messageType = MessageType.NON; } //Create CoAP request to discover resources URI targetURI = new URI("coap", null, serverName, portNumber, "/.well-known/core", null, null); CoapRequest coapRequest = new CoapRequest(messageType, MessageCode.GET, targetURI); //Set block2 option (if any) if(BlockSize.UNBOUND != this.block2Size) { coapRequest.setPreferredBlock2Size(this.block2Size); } this.coapClient.sendCoapRequest(coapRequest, remoteEndpoint, new ServiceDiscoveryCallback()); return null; } catch (final Exception e) { this.progressDialog.dismiss(); showToast(e.getMessage()); return null; } } private void showToast(final String text){ activity.runOnUiThread(new Runnable() { @Override public void run() { Toast.makeText(activity, text, Toast.LENGTH_SHORT).show(); } }); } private class ServiceDiscoveryCallback extends ClientCallback { @Override public void processCoapResponse(final CoapResponse coapResponse) { activity.runOnUiThread(new Runnable() { @Override public void run() { progressDialog.dismiss(); try { String payload = coapResponse.getContent().toString(CoapMessage.CHARSET); LinkValueList linkValueList = LinkValueList.decode(payload); String[] uriReferences = new String[linkValueList.getUriReferences().size()]; uriReferences = linkValueList.getUriReferences().toArray(uriReferences); Arrays.sort(uriReferences); showToast("Found " + uriReferences.length + " Resources!"); // ArrayAdapter<String> adapter = new ArrayAdapter<>(activity, // android.R.layout.simple_spinner_dropdown_item, uriReferences); ArrayAdapter adapter = new ArrayAdapter(activity, R.layout.spinner_item, uriReferences); // adapter.setDropDownViewResource(R.layout.spinner_item); // ((Spinner) activity.findViewById(R.id.txt_service)).setAdapter(adapter); // ((Spinner) view.findViewById(R.id.spn_block1)).setAdapter(adapter); AutoCompleteTextView txtService = ((AutoCompleteTextView) activity.findViewById(R.id.txt_service)); txtService.setAdapter(adapter); txtService.setHint(R.string.service_hint2); //Set Method Spinner to GET ((Spinner) activity.findViewById(R.id.spn_methods)).setSelection(1); } catch (Exception ex) { showToast("Unexpected ERROR:\n" + ex.getMessage()); } } }); } @Override public void processResponseBlockReceived(final long receivedLength, final long expectedLength) { activity.runOnUiThread(new Runnable() { @Override public void run() { String expected = expectedLength == -1 ? "UNKNOWN" : ("" + expectedLength); progressDialog.setMessage(receivedLength + " / " + expected); } }); } @Override public void processBlockwiseResponseTransferFailed() { showToast("Blockwise response transfer failed for some unknown reason..."); } @Override public void processMiscellaneousError(final String description) { showToast("ERROR: " + description + "!"); } } }
[ "kleine@itm.uni-luebeck.de" ]
kleine@itm.uni-luebeck.de
dfab92d5b951b5b36ba9e72e5c9dc6a5ad88a4e3
49face745d28332d909299176f2d90d7ada64cb4
/src/main/java/com/valhala/tarefa/web/beans/BaseJSFBean.java
e5b489e3536469ae648dc66c8501e3fe701d8fa1
[]
no_license
BrunoLV/tarefas-jee
545c0a4bd436e6fcbeb0f12c2892e93cf12af4e5
95b94d8e01e67845f0c6c18cfde06393ac649441
refs/heads/master
2020-05-27T13:10:09.592889
2015-02-24T20:40:57
2015-02-24T20:40:57
17,162,461
0
2
null
null
null
null
UTF-8
Java
false
false
4,048
java
package com.valhala.tarefa.web.beans; import javax.faces.application.FacesMessage; import javax.faces.application.FacesMessage.Severity; import javax.faces.context.FacesContext; import javax.faces.context.Flash; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; /** * Classe base dos managed beas da aplicação. * Essa classe possui os métodos comuns aos managed beans para manopulação de mensagem no contexto * e sessão. * @author Bruno Luiz Viana * @version 1.0 * @since 23/02/2014 * */ public class BaseJSFBean { /** * Método utilizado para inserir uma mensagem de sucesso no contexto. * @param mensagem */ protected void inserirMensagemDeSucesso(String mensagem) { inserirMensagem(FacesMessage.SEVERITY_INFO, mensagem); } // fim do método inserirMensagemDeSucesso /** * Método utilizado para inserir uma mensagem de erro no contexto. * @param mensagem */ protected void inserirMensagemDeErro(String mensagem) { inserirMensagem(FacesMessage.SEVERITY_ERROR, mensagem); } // fim do método inserirMensagemDeErro /** * Método utilizado efetivamente para inserir mensagem no contexto. * @param severidade * @param mensagem */ private void inserirMensagem(Severity severidade, String mensagem) { FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(severidade, mensagem, null)); } // fim do método inserirMensagems /** * Método utilizado para recuperar o FacesContext da requisição. * @return */ protected FacesContext getFacesContext() { return FacesContext.getCurrentInstance(); } // fim do método getFacesContext /** * Método utilizado para recuperar a request a ser executada. * @return */ protected HttpServletRequest getRequest() { return (HttpServletRequest) getFacesContext().getExternalContext().getRequest(); } // fim do método getRequest /** * Método utilizado para recuperar a session. * @return */ protected HttpSession getSession() { return getRequest().getSession(); } // fim do método getSession /** * Método utilizado para obter o escopo Flash da aplicação. * @return */ protected Flash getFlashScope() { return getFacesContext().getExternalContext().getFlash(); } // fim do método getFlashScope /** * Método uitilizado para inserir um objeto no FlashScope * @param chave * @param valor */ protected void inserirObjetoNoFlashScope(String chave, Object valor) { getFlashScope().put(chave, valor); getFlashScope().setKeepMessages(true); } // fim do método inserirObjetoNoFlashScope /** * Método utilizado para verificar a existencia de determinado objeto no FlashScope * @param chave * @return */ protected boolean verificarExistenciaObjetoFlashScope(Object chave) { return getFlashScope().containsKey(chave); } // fim do método verificarExistenciaObjetoFlashScope /** * Método utiliza para recuperar um objeto do FlashScope * @param chave * @return */ protected Object obterObjetoDoFlashScope(Object chave) { return getFlashScope().get(chave); } // fim do método obterObjetoDoFlashScope /** * Método uitilizado para inserir um objeto no SessionScope * @param chave * @param valor */ protected void inserirObjetoNaSession(String chave, Object valor) { getSession().setAttribute(chave, valor); } // fim do método inserirObjetoNaSession /** * Método uitilizado para remover um objeto no SessionScope * @param chave * @param valor */ protected void removerObjetoDaSession(String chave) { getSession().removeAttribute(chave); } // fim do método removerObjetoDaSession /** * Método utiliza para recuperar um objeto do SessionScope * @param chave * @return */ protected Object obterObjectDaSession(String chave) { return getSession().getAttribute(chave); } // fim do método obterObjectDaSession } // fim da classe BaseJSFBean
[ "brunolviana22@hotmail.com" ]
brunolviana22@hotmail.com
40a439d024c8ed158fb951be7b59123c2d08915b
063f3b313356c366f7c12dd73eb988a73130f9c9
/erp_ejb/src_facturacion/com/bydan/erp/facturacion/business/dataaccess/TipoParamFactuDescuentoDataAccessAdditional.java
4966f15d2f563a062c5748b84736403e2d495e3f
[ "Apache-2.0" ]
permissive
bydan/pre
0c6cdfe987b964e6744ae546360785e44508045f
54674f4dcffcac5dbf458cdf57a4c69fde5c55ff
refs/heads/master
2020-12-25T14:58:12.316759
2016-09-01T03:29:06
2016-09-01T03:29:06
67,094,354
0
0
null
null
null
null
UTF-8
Java
false
false
1,725
java
/* * ============================================================================ * GNU Lesser General Public License * ============================================================================ * * BYDAN - Free Java BYDAN library. * Copyright (C) 2008 * * 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. * * BYDAN Corporation */ package com.bydan.erp.facturacion.business.dataaccess; import java.util.List; import java.util.ArrayList; import java.util.Set; import java.util.HashSet; import java.util.ArrayList; import java.io.Serializable; import java.util.Date; import com.bydan.framework.erp.business.entity.DatoGeneral; import com.bydan.framework.erp.business.dataaccess.*;//DataAccessHelperSinIdGenerated; import com.bydan.erp.facturacion.business.entity.*; @SuppressWarnings("unused") public class TipoParamFactuDescuentoDataAccessAdditional extends DataAccessHelperSinIdGenerated<TipoParamFactuDescuento> { public TipoParamFactuDescuentoDataAccessAdditional () { } }
[ "byrondanilo10@hotmail.com" ]
byrondanilo10@hotmail.com
0e782630c653c289c5f700062d2edc62f7c65caf
90f17cd659cc96c8fff1d5cfd893cbbe18b1240f
/src/main/java/com/airbnb/lottie/parser/AnimatableValueParser.java
19dab1ede82b697f68ef52deb293135641a67332
[]
no_license
redpicasso/fluffy-octo-robot
c9b98d2e8745805edc8ddb92e8afc1788ceadd08
b2b62d7344da65af7e35068f40d6aae0cd0835a6
refs/heads/master
2022-11-15T14:43:37.515136
2020-07-01T22:19:16
2020-07-01T22:19:16
276,492,708
0
0
null
null
null
null
UTF-8
Java
false
false
3,711
java
package com.airbnb.lottie.parser; import androidx.annotation.Nullable; import com.airbnb.lottie.LottieComposition; import com.airbnb.lottie.model.animatable.AnimatableColorValue; import com.airbnb.lottie.model.animatable.AnimatableFloatValue; import com.airbnb.lottie.model.animatable.AnimatableGradientColorValue; import com.airbnb.lottie.model.animatable.AnimatableIntegerValue; import com.airbnb.lottie.model.animatable.AnimatablePointValue; import com.airbnb.lottie.model.animatable.AnimatableScaleValue; import com.airbnb.lottie.model.animatable.AnimatableShapeValue; import com.airbnb.lottie.model.animatable.AnimatableTextFrame; import com.airbnb.lottie.parser.moshi.JsonReader; import com.airbnb.lottie.utils.Utils; import com.airbnb.lottie.value.Keyframe; import java.io.IOException; import java.util.List; public class AnimatableValueParser { private AnimatableValueParser() { } public static AnimatableFloatValue parseFloat(JsonReader jsonReader, LottieComposition lottieComposition) throws IOException { return parseFloat(jsonReader, lottieComposition, true); } public static AnimatableFloatValue parseFloat(JsonReader jsonReader, LottieComposition lottieComposition, boolean z) throws IOException { return new AnimatableFloatValue(parse(jsonReader, z ? Utils.dpScale() : 1.0f, lottieComposition, FloatParser.INSTANCE)); } static AnimatableIntegerValue parseInteger(JsonReader jsonReader, LottieComposition lottieComposition) throws IOException { return new AnimatableIntegerValue(parse(jsonReader, lottieComposition, IntegerParser.INSTANCE)); } static AnimatablePointValue parsePoint(JsonReader jsonReader, LottieComposition lottieComposition) throws IOException { return new AnimatablePointValue(parse(jsonReader, Utils.dpScale(), lottieComposition, PointFParser.INSTANCE)); } static AnimatableScaleValue parseScale(JsonReader jsonReader, LottieComposition lottieComposition) throws IOException { return new AnimatableScaleValue(parse(jsonReader, lottieComposition, ScaleXYParser.INSTANCE)); } static AnimatableShapeValue parseShapeData(JsonReader jsonReader, LottieComposition lottieComposition) throws IOException { return new AnimatableShapeValue(parse(jsonReader, Utils.dpScale(), lottieComposition, ShapeDataParser.INSTANCE)); } static AnimatableTextFrame parseDocumentData(JsonReader jsonReader, LottieComposition lottieComposition) throws IOException { return new AnimatableTextFrame(parse(jsonReader, lottieComposition, DocumentDataParser.INSTANCE)); } static AnimatableColorValue parseColor(JsonReader jsonReader, LottieComposition lottieComposition) throws IOException { return new AnimatableColorValue(parse(jsonReader, lottieComposition, ColorParser.INSTANCE)); } static AnimatableGradientColorValue parseGradientColor(JsonReader jsonReader, LottieComposition lottieComposition, int i) throws IOException { return new AnimatableGradientColorValue(parse(jsonReader, lottieComposition, new GradientColorParser(i))); } @Nullable private static <T> List<Keyframe<T>> parse(JsonReader jsonReader, LottieComposition lottieComposition, ValueParser<T> valueParser) throws IOException { return KeyframesParser.parse(jsonReader, lottieComposition, 1.0f, valueParser); } @Nullable private static <T> List<Keyframe<T>> parse(JsonReader jsonReader, float f, LottieComposition lottieComposition, ValueParser<T> valueParser) throws IOException { return KeyframesParser.parse(jsonReader, lottieComposition, f, valueParser); } }
[ "aaron@goodreturn.org" ]
aaron@goodreturn.org
f912c8db536692d8684a855bd4a74137e6905eaf
148100c6a5ac58980e43aeb0ef41b00d76dfb5b3
/sources/com/bumptech/glide/load/C1194a.java
c86ffe6b27e046d2f8830c373c1c75d9dbc40304
[]
no_license
niravrathod/car_details
f979de0b857f93efe079cd8d7567f2134755802d
398897c050436f13b7160050f375ec1f4e05cdf8
refs/heads/master
2020-04-13T16:36:29.854057
2018-12-27T19:03:46
2018-12-27T19:03:46
163,325,703
0
0
null
null
null
null
UTF-8
Java
false
false
210
java
package com.bumptech.glide.load; import java.io.File; /* renamed from: com.bumptech.glide.load.a */ public interface C1194a<T> { /* renamed from: a */ boolean mo975a(T t, File file, C3452e c3452e); }
[ "niravrathod473@gmail.com" ]
niravrathod473@gmail.com
cf4eaeeb4f2d99ccb846e77035e0856f897984bc
473b76b1043df2f09214f8c335d4359d3a8151e0
/benchmark/bigclonebenchdata_partial/300397.java
1135ae771bf3ed18aef0357b6eee58b039b86a7d
[]
no_license
whatafree/JCoffee
08dc47f79f8369af32e755de01c52d9a8479d44c
fa7194635a5bd48259d325e5b0a190780a53c55f
refs/heads/master
2022-11-16T01:58:04.254688
2020-07-13T20:11:17
2020-07-13T20:11:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,376
java
class c300397 { private static void readAndRewrite(File inFile, File outFile) throws IOException { ImageInputStream iis = ImageIO.createImageInputStream(new BufferedInputStream(new FileInputStream(inFile))); DcmParser dcmParser = DcmParserFactory.getInstance().newDcmParser(iis); Dataset ds = DcmObjectFactory.getInstance().newDataset(); dcmParser.setDcmHandler(ds.getDcmHandler()); dcmParser.parseDcmFile(null, Tags.PixelData); PixelDataReader pdReader = pdFact.newReader(ds, iis, dcmParser.getDcmDecodeParam().byteOrder, dcmParser.getReadVR()); System.out.println("reading " + inFile + "..."); pdReader.readPixelData(false); ImageOutputStream out = ImageIO.createImageOutputStream(new BufferedOutputStream(new FileOutputStream(outFile))); DcmEncodeParam dcmEncParam = DcmEncodeParam.IVR_LE; ds.writeDataset(out, dcmEncParam); ds.writeHeader(out, dcmEncParam, Tags.PixelData, dcmParser.getReadVR(), dcmParser.getReadLength()); System.out.println("writing " + outFile + "..."); PixelDataWriter pdWriter = pdFact.newWriter(pdReader.getPixelDataArray(), false, ds, out, dcmParser.getDcmDecodeParam().byteOrder, dcmParser.getReadVR()); pdWriter.writePixelData(); out.flush(); out.close(); System.out.println("done!"); } }
[ "piyush16066@iiitd.ac.in" ]
piyush16066@iiitd.ac.in
af2a128d2b8867374ce1d26724f49d0e541b93d8
aaa9649c3e52b2bd8e472a526785f09e55a33840
/EquationFunction/src/com/misys/equation/function/runtime/FunctionAdaptorHandler.java
4f48505d8f1e4fbbf2adf3297df2868a534657e3
[]
no_license
jcmartin2889/Repo
dbfd02f000e65c96056d4e6bcc540e536516d775
259c51703a2a50061ad3c99b8849477130cde2f4
refs/heads/master
2021-01-10T19:34:17.555112
2014-04-29T06:01:01
2014-04-29T06:01:01
19,265,367
1
0
null
null
null
null
UTF-8
Java
false
false
884
java
package com.misys.equation.function.runtime; import com.misys.equation.common.access.EquationStandardSession; import com.misys.equation.common.internal.eapi.core.EQException; import com.misys.equation.function.adaptor.FunctionAdaptor; public class FunctionAdaptorHandler { // This attribute is used to store cvs version information. public static final String _revision = "$Id: FunctionAdaptorHandler.java 6793 2010-03-31 12:10:20Z deroset $"; /** * Return a Function Reflection of the option * * @param session * - the Equation standard session * @param optionId * - the option Id * * @return the function reflection of the option */ public FunctionAdaptor getFunctionAdaptor(EquationStandardSession session, String optionId) throws EQException { FunctionAdaptor fr = new FunctionAdaptor(session, optionId, ""); return fr; } }
[ "jomartin@MAN-D7R8ZYY1.misys.global.ad" ]
jomartin@MAN-D7R8ZYY1.misys.global.ad
20c665d1f8eb5ae691ac867fa5fc8694beee16ea
28c04d9193c25b6364df5d980b53f68b816fc0ea
/src/com/javarush/test/level13/lesson11/home06/Solution.java
ba40621bda1927bbfdd8039d6102f17f9338839e
[]
no_license
PetroRulov/JavaRushHomeWorks
bfcd824c63bc7ab78802ad3af7f6f730ef3f65b4
c88f55ab4424d80e168f649d18b9e356d091e66e
refs/heads/master
2020-12-25T15:18:11.195051
2019-10-09T13:52:55
2019-10-09T13:52:55
66,652,482
0
0
null
null
null
null
UTF-8
Java
false
false
981
java
package com.javarush.test.level13.lesson11.home06; /* Исправление ошибок 1. Переделай наследование в классах и интерфейсах так, чтобы программа компилировалась и продолжала делать то же самое. 2. Класс Hobbie должен наследоваться от интерфейсов Desire, Dream. */ public class Solution { public static void main(String[] args) throws Exception { System.out.println(Dream.HOBBIE.toString()); System.out.println(new Hobbie().INDEX); } interface Desire { } interface Dream /*implements Hobbie*/ { static Hobbie HOBBIE = new Hobbie(); } static class Hobbie /*extends*/ implements Desire, Dream { static int INDEX = 1; @Override public String toString() { INDEX++; return "" + INDEX; } } }
[ "prulov.pr@gmail.com" ]
prulov.pr@gmail.com
66da4fbd303b2a0089a3f56ff312e18fa51c0098
f00cc7cebd863e67375bae8b28e1893575ac137c
/src/main/java/com/rks/musicx/misc/utils/permissionManager.java
526eecb86123e52fb58b66ea4c5d6ee8d34eba7f
[ "Apache-2.0" ]
permissive
agandhy25/MusicX-Music-Player
890a07c9c9b955acd24664b3a31b2862da8bb916
38ab743d86c0338b79de06926ae5c592ac34c46d
refs/heads/master
2021-01-19T02:12:15.907947
2017-01-28T16:55:09
2017-01-28T16:55:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,311
java
package com.rks.musicx.misc.utils; import android.Manifest; import android.annotation.TargetApi; import android.app.Activity; import android.content.DialogInterface; import android.content.Intent; import android.content.pm.PackageManager; import android.net.Uri; import android.os.Build; import android.provider.Settings; import android.support.v4.app.ActivityCompat; import android.support.v4.content.ContextCompat; import android.support.v7.app.AlertDialog; import android.widget.Toast; import com.rks.musicx.R; import java.util.ArrayList; import java.util.List; import static com.rks.musicx.misc.utils.Constants.OVERLAY_REQ; import static com.rks.musicx.misc.utils.Constants.PERMISSIONS_REQ; /** * Created by Coolalien on 12/26/2016. */ public class permissionManager { /** * String array of permissions */ private static String[] permissions= new String[]{ Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_PHONE_STATE, Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.RECORD_AUDIO, Manifest.permission.SYSTEM_ALERT_WINDOW}; /** * Check Permission * @param activity * @return */ public static boolean checkPermissions(Activity activity) { int result; List<String> listPermissionsNeeded = new ArrayList<>(); for (String p:permissions) { result = ContextCompat.checkSelfPermission(activity,p); if (result != PackageManager.PERMISSION_GRANTED) { listPermissionsNeeded.add(p); } } if (!listPermissionsNeeded.isEmpty()) { ActivityCompat.requestPermissions(activity, listPermissionsNeeded.toArray(new String[listPermissionsNeeded.size()]),PERMISSIONS_REQ ); return false; } return true; } public static void widgetPermission(Activity activity){ // check if we can draw overlays if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N && !Settings.canDrawOverlays(activity)) { DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() { @TargetApi(Build.VERSION_CODES.N) @Override public void onClick(DialogInterface dialog, int which) { if (which == DialogInterface.BUTTON_POSITIVE) { Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION, Uri.parse("package:" + activity.getPackageName())); activity.startActivityForResult(intent, OVERLAY_REQ); } else if (which == DialogInterface.BUTTON_NEGATIVE) { Toast.makeText(activity, R.string.toast_permissions_not_granted, Toast.LENGTH_SHORT).show(); activity.finish(); } } }; new AlertDialog.Builder(activity) .setTitle(R.string.permissions_title) .setMessage(R.string.draw_over_permissions_message) .setPositiveButton(R.string.btn_continue, listener) .setNegativeButton(R.string.btn_cancel, listener) .setCancelable(false) .show(); } } }
[ "developerrajneeshsingh@gmail.com" ]
developerrajneeshsingh@gmail.com
345a658e07dace70a58176367204de9a4c196dad
3fb7e49830089ff21ce4e8a330fe26c45454d9d2
/wicket-jquery-ui/src/main/java/com/googlecode/wicket/jquery/ui/widget/menu/MenuItem.java
6ac1910ddce3c1f90abdb2a00771a07fffc4116d
[]
no_license
IzabellaK/wicket-jquery-ui
2e1eb10b6041787c6f4dd6d8d8483d5efde36ce7
40e772411d1b1ee064be0106d0c11a3b61a0b984
refs/heads/master
2021-01-17T23:06:32.529684
2013-09-22T22:56:37
2013-09-22T22:56:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,483
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.googlecode.wicket.jquery.ui.widget.menu; import java.util.ArrayList; import java.util.List; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.model.IModel; import org.apache.wicket.model.Model; import com.googlecode.wicket.jquery.ui.JQueryIcon; /** * Provides a standard menu-item that supports sub-menus * * @author Sebastien Briquet - sebfz1 * @since 1.4.2 * @since 6.2.2 */ public class MenuItem extends AbstractMenuItem { private static final long serialVersionUID = 1L; /** children items */ private final List<IMenuItem> items; /** * Constructor * @param title the title of the menu-item */ public MenuItem(String title) { this(Model.of(title), JQueryIcon.BLANK); } /** * Constructor * @param title the title of the menu-item * @param icon the icon css class (ie: ui-my-icon) */ public MenuItem(String title, String icon) { this(Model.of(title), icon); } /** * Constructor * @param title IModel that represent the title of the menu-item */ public MenuItem(IModel<String> title) { this(title, JQueryIcon.BLANK); } /** * Constructor * @param title IModel that represent the title of the menu-item * @param icon the icon css class (ie: ui-my-icon) */ public MenuItem(IModel<String> title, String icon) { super(title, icon); this.items = new ArrayList<IMenuItem>(); } /** * Constructor * @param title the title of the menu-item * @param items the sub-menu items * */ public MenuItem(String title, List<IMenuItem> items) { this(Model.of(title), JQueryIcon.BLANK, items); } /** * Constructor * @param title the title of the menu-item * @param icon the icon css class (ie: ui-my-icon) * @param items the sub-menu items */ public MenuItem(String title, String icon, List<IMenuItem> items) { this(Model.of(title), icon, items); } /** * Constructor * @param title IModel that represent the title of the menu-item * @param items the sub-menu items */ public MenuItem(IModel<String> title, List<IMenuItem> items) { this(title, JQueryIcon.BLANK, items); } /** * Constructor * @param title IModel that represent the title of the menu-item * @param icon the icon css class (ie: ui-my-icon) * @param items the sub-menu items */ public MenuItem(IModel<String> title, String icon, List<IMenuItem> items) { super(title, icon); this.items = items; } // Properties // @Override public List<IMenuItem> getItems() { return this.items; } // Methods // public boolean addItem(IMenuItem item) { return this.items.add(item); } // Events // @Override public void onClick(AjaxRequestTarget target) { } }
[ "sebfz1@gmail.com" ]
sebfz1@gmail.com
e105cc74d8ef95073398168792092bad8951733e
ce1a693343bda16dc75fd64f1688bbfa5d27ac07
/system-jmx/src/tests/org/jboss/test/system/controller/instantiate/standard/test/StandardMBeanRedeployAfterErrorNewUnitTestCase.java
93db15d14c6b582e1ab7391bf39a94cd2cf5d627
[]
no_license
JavaQualitasCorpus/jboss-5.1.0
641c412b1e4f5f75bb650cecdbb2a56de2f6a321
9307e841b1edc37cc97c732e4b87125530d8ae49
refs/heads/master
2023-08-12T08:39:55.319337
2020-06-02T17:48:09
2020-06-02T17:48:09
167,004,817
0
0
null
null
null
null
UTF-8
Java
false
false
1,766
java
/* * JBoss, Home of Professional Open Source. * Copyright 2008, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This 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 software 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 software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.test.system.controller.instantiate.standard.test; import junit.framework.Test; import org.jboss.test.AbstractTestDelegate; /** * StandardMBeanNewUnitTestCase. * * @author <a href="adrian@jboss.com">Adrian Brock</a> * @version $Revision: 85945 $ */ public class StandardMBeanRedeployAfterErrorNewUnitTestCase extends StandardMBeanRedeployAfterErrorTest { public static Test suite() { return suite(StandardMBeanRedeployAfterErrorNewUnitTestCase.class); } public StandardMBeanRedeployAfterErrorNewUnitTestCase(String name) { super(name); } public static AbstractTestDelegate getDelegate(Class clazz) throws Exception { return getNewControllerDelegate(clazz); } }
[ "taibi@sonar-scheduler.rd.tut.fi" ]
taibi@sonar-scheduler.rd.tut.fi
8c552c0566623a15870693166780fb5ac386ab16
1d0b192a6596c9c2307306e6a3835c19cd42714c
/src/main/java/Factory/NYPizzaIngredientFactory.java
dc65275397619ac74de44a0c1c3b97acb631ac99
[ "Apache-2.0" ]
permissive
hackeryang/Head-First-Design-Patterns
da75f9a5d46574a26b38a4f5f4ceab2d586a76c8
a05287820f352fb8a6221aed78cade5639de7243
refs/heads/master
2021-03-22T14:06:23.189337
2020-03-15T00:05:50
2020-03-15T00:05:50
247,372,161
1
0
null
null
null
null
UTF-8
Java
false
false
643
java
package Factory; public class NYPizzaIngredientFactory implements PizzaIngredientFactory { public Dough createDough() { return new ThinCrustDough(); } public Sauce createSauce() { return new MarinaraSauce(); } public Cheese createCheese() { return new ReggianoCheese(); } public Veggies[] createVeggies() { Veggies veggies[] = {new Garlic(), new Onion(), new Mushroom(), new RedPepper()}; return veggies; } public Pepperoni createPepperoni() { return new SlicedPepperoni(); } public Clams createClam() { return new FreshClams(); } }
[ "375446972@qq.com" ]
375446972@qq.com
052974754bb03600e4a7a5700a1f366059ab445a
beb0cd117c656c04fe0d3caa6327eaae5219b5a9
/app/src/main/java/com/xingen/camera/glide/GlideLoader.java
bd6cba4a5582426d7a5f45e18e795f32b2fae18b
[]
no_license
ws1119/Camera2App
af3e7d10606c3c6c17aeddd64aa737a540b5d477
5fbdd6d46a3996dcda0a2635b3670d3604e30778
refs/heads/master
2020-09-24T12:37:39.189417
2018-02-08T03:00:02
2018-02-08T03:00:02
225,760,981
1
0
null
2019-12-04T02:26:25
2019-12-04T02:26:25
null
UTF-8
Java
false
false
4,945
java
package com.xingen.camera.glide; import android.content.Context; import android.graphics.Bitmap; import android.widget.ImageView; import com.xingen.camera.R; /** * Created by ${xingen} on 2017/7/5. * <p> * 图片异步加载的操作类 */ public class GlideLoader { /** * 加载本地Resource图片 */ public static void loadLocalResource(Context context, int resourceId, ImageView imageView) { loadLocalResource(context, resourceId, imageView, false); } /** * 加载本地Resource,图片 * * @param context * @param resourceId * @param imageView * @param isCircle 是否为圆角 */ public static void loadLocalResource(Context context, int resourceId, ImageView imageView, boolean isCircle) { GlideRequest<Bitmap> glideRequest = GlideApp.with(context).asBitmap(); if (isCircle) {//进行圆角转换 glideRequest.circleCrop().transform(new CircleTransform(context)); }else{ glideRequest.centerCrop(); } glideRequest.load(resourceId).into(imageView); } /** * 加载本地Resource,生成指定的圆角的图片 * * @param context * @param resourceId * @param imageView * @param cornerRadius 圆角度数 */ public static void loadLocalResource(Context context, int resourceId, ImageView imageView, float cornerRadius) { GlideApp.with(context).asBitmap().load(resourceId).into(new CircularBitmapImageViewTarget(context, imageView, cornerRadius)); } /** * 加载网络资源,生成指定的圆角的图片 * * @param context * @param url * @param imageView * @param cornerRadius 圆角度数 */ public static void loadNetWorkResource(Context context, String url,int defaultResource,int errorResource, ImageView imageView, float cornerRadius) { GlideApp.with(context).asBitmap().load(url).placeholder(defaultResource).error(errorResource).into(new CircularBitmapImageViewTarget(context, imageView, cornerRadius)); } /** * 加载网络图片 * * @param context * @param imageUrl * @param imageView */ public static void loadNetWorkResource(Context context, String imageUrl, ImageView imageView) { loadNetWorkResource(context, imageUrl, imageView, false); } /** * 加载网络图片 , 圆角显示 * * @param context * @param imageUrl * @param imageView * @param isCircle */ public static void loadNetWorkResource(Context context, String imageUrl, ImageView imageView, boolean isCircle) { int defaultImageResource = R.mipmap.ic_launcher; loadNetWorkResource(context, imageUrl, imageView, defaultImageResource, isCircle); } public static void loadGifResource(Context context, String imageUrl, ImageView imageView){ int defaultImageResource = R.mipmap.ic_launcher; GlideApp.with(context).asGif().load(imageUrl).error(defaultImageResource).placeholder(defaultImageResource).into(imageView); } /** * 加载网络图片 , 圆角显示 * * @param context * @param imageUrl * @param imageView * @param isCircle */ public static void loadNetWorkResource(Context context, String imageUrl, ImageView imageView, int defaultImageResource, boolean isCircle) { loadNetWorkResource(context, imageUrl, imageView, defaultImageResource, defaultImageResource, isCircle); } /** * 加载网络图片 , 圆角显示 * * @param context * @param imageUrl * @param imageView * @param isCircle */ public static void loadNetWorkResource(Context context, String imageUrl, ImageView imageView, int defaultImageResource, int errorResourceId, boolean isCircle) { loadNetWorkResource(context, imageUrl, imageView, defaultImageResource, errorResourceId, defaultImageResource, isCircle); } /** * 加载网络图片 * * @param context * @param imageUrl * @param imageView * @param nullResourceId * @param placeResourceId * @param errorResourceId * @param isCircle */ public static void loadNetWorkResource(Context context, String imageUrl, ImageView imageView, int nullResourceId, int placeResourceId, int errorResourceId, boolean isCircle) { GlideRequest<Bitmap> glideRequest = GlideApp.with(context).asBitmap(); if (isCircle) {//进行圆角转换 glideRequest.circleCrop().transform(new CircleTransform(context)); }else{ glideRequest.centerCrop(); } glideRequest.load(imageUrl).error(errorResourceId)//异常时候显示的图片 .placeholder(placeResourceId)//加载成功前显示的图片 .fallback(nullResourceId)//url为空的时候,显示的图片 .into(imageView); } }
[ "13767004362@163.com" ]
13767004362@163.com
fb1e7a878c1318a10553b6234d0a286067202f39
f7f9d7fa841e856927e02513ecc74dc00c935f8a
/server/src/main/java/org/codelibs/fesen/snapshots/SnapshotInProgressException.java
64268469312aece7f0f071a98099179c07893167
[ "CDDL-1.0", "MIT", "BSD-3-Clause", "LGPL-2.0-or-later", "LGPL-2.1-only", "NAIST-2003", "LicenseRef-scancode-generic-export-compliance", "ICU", "SunPro", "Python-2.0", "CC-BY-SA-3.0", "MPL-1.1", "GPL-2.0-only", "CPL-1.0", "LicenseRef-scancode-other-copyleft", "Apache-2.0", "LicenseRef-scancode-public-domain", "CC-PDDC", "BSD-2-Clause", "LicenseRef-scancode-unicode-mappings", "LicenseRef-scancode-unicode", "CC0-1.0", "Apache-1.1", "EPL-1.0", "Classpath-exception-2.0" ]
permissive
codelibs/fesen
3f949fd3533e8b25afc3d3475010d1b1a0d95c09
b2440fbda02e32f7abe77d2be95ead6a16c8af06
refs/heads/main
2022-07-27T21:14:02.455938
2021-12-21T23:54:20
2021-12-21T23:54:20
330,334,670
4
0
Apache-2.0
2022-05-17T01:54:31
2021-01-17T07:07:56
Java
UTF-8
Java
false
false
1,448
java
/* * Licensed to Elasticsearch under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch 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.codelibs.fesen.snapshots; import java.io.IOException; import org.codelibs.fesen.FesenException; import org.codelibs.fesen.common.io.stream.StreamInput; import org.codelibs.fesen.rest.RestStatus; /** * Thrown on the attempt to execute an action that requires * that no snapshot is in progress. */ public class SnapshotInProgressException extends FesenException { public SnapshotInProgressException(String msg) { super(msg); } public SnapshotInProgressException(StreamInput in) throws IOException { super(in); } @Override public RestStatus status() { return RestStatus.BAD_REQUEST; } }
[ "shinsuke@apache.org" ]
shinsuke@apache.org
c83cd2f999ad63ce5bdaac656a422a3629a997a8
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_11022.java
86c87a3f038e391ed7abf7da8c8b3411fa1af085
[]
no_license
P79N6A/icse_20_user_study
5b9c42c6384502fdc9588430899f257761f1f506
8a3676bc96059ea2c4f6d209016f5088a5628f3c
refs/heads/master
2020-06-24T08:25:22.606717
2019-07-25T15:31:16
2019-07-25T15:31:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
347
java
protected void callOnColorChangedListeners(int oldColor,int newColor){ if (colorChangedListeners != null && oldColor != newColor) { for ( OnColorChangedListener listener : colorChangedListeners) { try { listener.onColorChanged(newColor); } catch ( Exception e) { e.printStackTrace(); } } } }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
533b9cae2ad456cd947a4c7f7c71994eec85de75
c4a14d70951d7ec5aac7fe7ebb2db891cfe6c0b1
/modulos/apps/LOCALGIS-PLUGIN-DatosExternos/src/main/java/com/geopista/ui/plugin/external/ConfigureExternalDSDialog.java
8a578764de19838948934947c5634860cd7cbf29
[]
no_license
pepeysusmapas/allocalgis
925756321b695066775acd012f9487cb0725fcde
c14346d877753ca17339f583d469dbac444ffa98
refs/heads/master
2020-09-14T20:15:26.459883
2016-09-27T10:08:32
2016-09-27T10:08:32
null
0
0
null
null
null
null
WINDOWS-1252
Java
false
false
7,309
java
/** * ConfigureExternalDSDialog.java * © MINETUR, Government of Spain * This program is part of LocalGIS * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ package com.geopista.ui.plugin.external; import java.awt.Frame; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.DefaultComboBoxModel; import javax.swing.JButton; import javax.swing.JComboBox; import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JOptionPane; import com.geopista.app.AppContext; public class ConfigureExternalDSDialog extends JDialog { private static AppContext aplicacion = (AppContext) AppContext.getApplicationContext(); private final static String NEW = aplicacion.getI18nString("Nuevo"); private final static String MODIFY = aplicacion.getI18nString("Modificar"); private final static String DELETE = aplicacion.getI18nString("ExternalDataSourcePlugin.Borrar"); private final static String DATASOURCE = aplicacion.getI18nString("ExternalDataSourcePlugin.DataSource"); private final static String CONFIRMMSG = aplicacion.getI18nString("ExternalDataSourcePlugin.MsgConfirmacion"); private final static String CONFDIALOGTITLE= aplicacion.getI18nString("ConfigureExternalDataSource"); public ConfigureExternalDSDialog (final Frame frame, boolean modal) { super(frame, CONFDIALOGTITLE, modal); try { jbInit(); } catch (Exception ex) { ex.printStackTrace(); } } private void jbInit() { java.awt.GridBagConstraints gridBagConstraints; jLabel1 = new JLabel(); jButton1 = new JButton(); jButton3 = new JButton(); jButton2 = new JButton(); jComboBox1 = new JComboBox(); getContentPane().setLayout(new java.awt.GridBagLayout()); setSize(300,200); setResizable(false); jLabel1.setText(DATASOURCE); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.gridwidth = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.insets = new java.awt.Insets(15, 20, 0, 0); getContentPane().add(jLabel1, gridBagConstraints); jButton1.setText(NEW); jButton1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { jButton1ActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 12; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST; gridBagConstraints.insets = new java.awt.Insets(40, 20, 5, 10); getContentPane().add(jButton1, gridBagConstraints); jButton3.setText(DELETE); jButton3.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { jButton3ActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 7; gridBagConstraints.gridy = 12; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST; gridBagConstraints.insets = new java.awt.Insets(40, 10, 5, 20); getContentPane().add(jButton3, gridBagConstraints); jButton2.setText(MODIFY); jButton2.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { jButton2ActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 12; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST; gridBagConstraints.insets = new java.awt.Insets(40, 10, 5, 10); getContentPane().add(jButton2, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 0; gridBagConstraints.gridwidth = 4; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(15, 20, 0, 20); getContentPane().add(jComboBox1, gridBagConstraints); } private void jButton3ActionPerformed(ActionEvent evt) { if (JOptionPane.showConfirmDialog(this, CONFIRMMSG) == JOptionPane.OK_OPTION) { setDeletebuttonPressed(true); dispose(); } } private void jButton2ActionPerformed(ActionEvent evt) { setModifyButtonPressed(true); dispose(); } private void jButton1ActionPerformed(ActionEvent evt) { setNewButtonPressed(true); dispose(); } public void setDataSourceList(String[] list) { jComboBox1.setModel(new DefaultComboBoxModel(list)); } private JButton jButton1; private JButton jButton2; private JButton jButton3; private JComboBox jComboBox1; private JLabel jLabel1; private boolean isNewButtonPressed; private boolean isModifyButtonPressed; private boolean isDeletebuttonPressed; public boolean isNewButtonPressed() { return isNewButtonPressed; } public void setNewButtonPressed(boolean isNewButtonPressed) { this.isNewButtonPressed = isNewButtonPressed; } public boolean isModifyButtonPressed() { return isModifyButtonPressed; } public void setModifyButtonPressed(boolean isModifyButtonPressed) { this.isModifyButtonPressed = isModifyButtonPressed; } public boolean isDeletebuttonPressed() { return isDeletebuttonPressed; } public void setDeletebuttonPressed(boolean isDeletebuttonPressed) { this.isDeletebuttonPressed = isDeletebuttonPressed; } public String getSelectedDataSource() { return (String) jComboBox1.getSelectedItem(); } }
[ "jorge.martin@cenatic.es" ]
jorge.martin@cenatic.es
09d374a039ae0c4fe1f1da289501e393691a88ce
17c30fed606a8b1c8f07f3befbef6ccc78288299
/P9_8_0_0/src/main/java/com/huawei/internal/telephony/msim/CardSubscriptionManagerEx.java
83327d42a36626fd63ae0be7672fcb069034dd50
[]
no_license
EggUncle/HwFrameWorkSource
4e67f1b832a2f68f5eaae065c90215777b8633a7
162e751d0952ca13548f700aad987852b969a4ad
refs/heads/master
2020-04-06T14:29:22.781911
2018-11-09T05:05:03
2018-11-09T05:05:03
157,543,151
1
0
null
2018-11-14T12:08:01
2018-11-14T12:08:01
null
UTF-8
Java
false
false
613
java
package com.huawei.internal.telephony.msim; import android.os.Handler; import com.huawei.android.util.NoExtAPIException; public class CardSubscriptionManagerEx extends Handler { public static SubscriptionDataEx getCardSubscriptions(int cardIndex) { throw new NoExtAPIException("method not supported."); } public static void registerForSimStateChanged(Handler h, int what, Object obj) { throw new NoExtAPIException("method not supported."); } public static void unRegisterForSimStateChanged(Handler h) { throw new NoExtAPIException("method not supported."); } }
[ "lygforbs0@mail.com" ]
lygforbs0@mail.com
49d426b77a3969183e54444895144802335abf58
072216667ef59e11cf4994220ea1594538db10a0
/googleplay/com/google/android/play/headerlist/PlayHeaderScrollableContentListener.java
3d1dce07d272a69000bab1acf8eb59f629747e32
[]
no_license
jackTang11/REMIUI
896037b74e90f64e6f7d8ddfda6f3731a8db6a74
48d65600a1b04931a510e1f036e58356af1531c0
refs/heads/master
2021-01-18T05:43:37.754113
2015-07-03T04:01:06
2015-07-03T04:01:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,640
java
package com.google.android.play.headerlist; import android.database.DataSetObserver; import android.widget.Adapter; import com.google.android.play.headerlist.PlayScrollableContentView.OnScrollListener; public class PlayHeaderScrollableContentListener implements OnScrollListener { private int mAbsoluteY; private Adapter mAdapter; private final PlayHeaderListLayout mLayout; private final DataSetObserver mObserver; protected int mScrollState; public PlayHeaderScrollableContentListener(PlayHeaderListLayout layout) { this.mAbsoluteY = -1; this.mLayout = layout; this.mObserver = new DataSetObserver() { public void onChanged() { PlayHeaderScrollableContentListener.this.reset(false); PlayHeaderScrollableContentListener.this.mLayout.syncCurrentListViewOnNextScroll(); } public void onInvalidated() { onChanged(); } }; } void reset() { reset(true); } private void reset(boolean resetAdapter) { this.mAbsoluteY = -1; if (resetAdapter) { updateAdapter(null); } this.mScrollState = 0; } private void updateAdapter(Adapter adapter) { if (this.mAdapter != adapter) { if (this.mAdapter != null) { this.mAdapter.unregisterDataSetObserver(this.mObserver); } this.mAdapter = adapter; if (this.mAdapter != null) { this.mAdapter.registerDataSetObserver(this.mObserver); } reset(false); } } }
[ "songjd@putao.com" ]
songjd@putao.com
7a091393e2f276c16fba52f64a260ba7422e387e
a5798578c6e17ba2342cba6b9bea2cdc2fc93c8f
/app/src/main/java/com/example/leidong/ldmart/fragments/MyBuyerFragment.java
677ef5c0bfad4e2cc34afbfdb9183d23987e9385
[]
no_license
tarui98/LDMart
be354c829fa65155288e7beb6b10a4127e6923de
49d64998117879abd9cc483a60eb3ed0580b2422
refs/heads/master
2020-07-16T12:48:28.365964
2018-05-05T02:23:36
2018-05-05T02:23:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,775
java
package com.example.leidong.ldmart.fragments; import android.annotation.SuppressLint; import android.app.AlertDialog; import android.app.Fragment; import android.content.DialogInterface; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.EditText; import android.widget.LinearLayout; import android.widget.Toast; import com.example.leidong.ldmart.MyApplication; import com.example.leidong.ldmart.R; import com.example.leidong.ldmart.beans.Buyer; import com.example.leidong.ldmart.constants.Constants; import com.example.leidong.ldmart.greendao.BuyerDao; import com.example.leidong.ldmart.secure.SecureUtils; import com.example.leidong.ldmart.storage.MySharedPreferences; import butterknife.BindView; import butterknife.ButterKnife; /** * 买家个人信息Fragment * * @author Lei Dong */ public class MyBuyerFragment extends Fragment implements View.OnClickListener { private static final String TAG = "MyBuyerFragment"; //买家用户名输入框 @BindView(R.id.buyer_name) EditText mBuyerNameEt; //买家密码输入框1的layout @BindView(R.id.password1_layout) LinearLayout mPassword1Layout; //买家密码输入框1 @BindView(R.id.buyer_password1) EditText mBuyerPassword1Et; //买家密码输入框2的layout @BindView(R.id.password2_layout) LinearLayout mPassword2Layout; //买家密码输入框2 @BindView(R.id.buyer_password2) EditText mBuyerPassword2Et; //买家电话输入框 @BindView(R.id.buyer_phone) EditText mBuyerPhoneEt; //买家地址输入框 @BindView(R.id.buyer_address) EditText mBuyerAddressEt; //更改信息按钮 @BindView(R.id.btn_change) Button mBtnChange; //保存信息按钮 @BindView(R.id.btn_save) Button mBtnSave; //用户身份码 private int mUserMode; //买家Id private Long mBuyerId; //MySharedPreferences private MySharedPreferences mMySharedPreferences; private BuyerDao mBuyerDao; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){ View view = inflater.inflate(R.layout.fragment_my_buyer, container, false); ButterKnife.bind(this, view); return view; } @Override public void onActivityCreated(Bundle savedInstanceState){ super.onActivityCreated(savedInstanceState); //初始化组件 initWidgets(); //初始化动作 initActions(); } /** * 初始化动作 */ private void initActions() { mBtnChange.setOnClickListener(this); mBtnSave.setOnClickListener(this); } /** * 初始化组件 */ private void initWidgets() { mMySharedPreferences = MySharedPreferences.getMySharedPreferences(MyApplication.getsContext()); mUserMode = mMySharedPreferences.load(Constants.USER_MODE, 0); mBuyerId = mMySharedPreferences.load(Constants.BUYER_ID, 0L); mBuyerDao = MyApplication.getInstance().getDaoSession().getBuyerDao(); //输入框不可输入 mBuyerNameEt.setFocusableInTouchMode(false); mBuyerNameEt.setEnabled(false); mBuyerAddressEt.setFocusableInTouchMode(false); mBuyerPhoneEt.setEnabled(false); mBuyerPhoneEt.setFocusableInTouchMode(false); mBuyerAddressEt.setEnabled(false); //填充买家信息 Buyer buyer = mBuyerDao.queryBuilder().where(BuyerDao.Properties.Id.eq(mBuyerId)).unique(); if(buyer != null){ String buyerName = buyer.getUsername(); String buyerPassword = buyer.getPassword(); String buyerAddress = buyer.getAddress(); String buyerPhone = buyer.getPhone(); mBuyerNameEt.setText(buyerName); mBuyerPhoneEt.setText(buyerPhone); mBuyerAddressEt.setText(buyerAddress); } } /** * 按钮点击事件 * * @param view 点击的View */ @Override public void onClick(View view) { switch (view.getId()){ case R.id.btn_change: clickChangeBtn(); break; case R.id.btn_save: clickSaveBtn(); break; default: break; } } /** * 点击保存按钮 */ @SuppressLint("ShowToast") private void clickSaveBtn() { String buyerName = mBuyerNameEt.getText().toString().trim(); String buyerPassword1 = mBuyerPassword1Et.getText().toString().trim(); String buyerPassword2 = mBuyerPassword2Et.getText().toString().trim(); String buyerPhone = mBuyerPhoneEt.getText().toString().trim(); String buyerAddress = mBuyerAddressEt.getText().toString().trim(); if(buyerName.length() > 0 && buyerPassword1.length() > 0 && buyerPassword2.length() > 0 && buyerPhone.length() > 0 && buyerAddress.length() > 0 && SecureUtils.isPasswordLegal(buyerPassword1, buyerPassword2)){ //修改买家信息 Buyer buyer = mBuyerDao.queryBuilder().where(BuyerDao.Properties.Id.eq(mBuyerId)).unique(); buyer.setUsername(buyerName); buyer.setPassword(buyerPassword1); buyer.setPhone(buyerPhone); buyer.setAddress(buyerAddress); mBuyerDao.update(buyer); Toast.makeText(MyApplication.getsContext(), R.string.user_info_update_finish, Toast.LENGTH_LONG).show(); mPassword1Layout.setVisibility(View.GONE); mPassword2Layout.setVisibility(View.GONE); mBuyerNameEt.setFocusableInTouchMode(false); mBuyerNameEt.setEnabled(false); mBuyerPhoneEt.setFocusableInTouchMode(false); mBuyerPhoneEt.setEnabled(false); mBuyerAddressEt.setFocusableInTouchMode(false); mBuyerAddressEt.setEnabled(false); } else{ AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); builder.setTitle(R.string.warning); builder.setIcon(R.drawable.app_icon); builder.setMessage(R.string.warning_format_error); builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { mBuyerNameEt.setText(null); mBuyerPassword1Et.setText(null); mBuyerPassword2Et.setText(null); mBuyerPhoneEt.setText(null); mBuyerAddressEt.setText(null); } }); builder.setNegativeButton(R.string.cancel, null); builder.create().show(); } } /** * 点击更改信息按钮 */ @SuppressLint("ShowToast") private void clickChangeBtn() { Toast.makeText(MyApplication.getsContext(), "请更改您的信息", Toast.LENGTH_LONG).show(); //可输入 mBuyerNameEt.setFocusableInTouchMode(true); mBuyerNameEt.setEnabled(true); mBuyerAddressEt.setFocusableInTouchMode(true); mBuyerAddressEt.setEnabled(true); mBuyerPhoneEt.setFocusableInTouchMode(true); mBuyerPhoneEt.setEnabled(true); //密码输入框可见 mPassword1Layout.setVisibility(View.VISIBLE); mPassword2Layout.setVisibility(View.VISIBLE); //清除输入框信息 mBuyerNameEt.setText(null); mBuyerPhoneEt.setText(null); mBuyerAddressEt.setText(null); } }
[ "leidongld@sina.com" ]
leidongld@sina.com
d6b270bc8ae64c54b12fdd2b942bbf19a526605c
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/16/16_609838267dacc30cc58a62f8cad1234dab7e37ec/LoginServlet/16_609838267dacc30cc58a62f8cad1234dab7e37ec_LoginServlet_t.java
667b14e8a021b000ad158451af184434602ddd92
[]
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,889
java
package quizweb.accountmanagement; import java.io.IOException; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import quizweb.User; /** * Servlet implementation class LoginServlet */ @WebServlet("/LoginServlet") public class LoginServlet extends HttpServlet { private static final long serialVersionUID = 1L; /** * @see HttpServlet#HttpServlet() */ public LoginServlet() { super(); // TODO Auto-generated constructor stub } /** * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub } /** * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) */ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { AccountManager am = (AccountManager)getServletContext().getAttribute("account manager"); String username = request.getParameter("username"); String password = request.getParameter("password"); if(am.accountMatch(username, password)) { HttpSession session = request.getSession(); User user = User.getUserByUsername(username); session.setAttribute("user", user); RequestDispatcher dispatch = request.getRequestDispatcher("homepage.jsp"); dispatch.forward(request, response); } else { RequestDispatcher dispatch = request.getRequestDispatcher("tryAgain.html"); dispatch.forward(request, response); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
32bb49ba2e976823e2aa9e80671343345ad0a5a0
b79a9ab661d8731dc86ba7565a806f7b8a66cc3e
/src/main/java/com/niche/ng/service/CommonSettingsService.java
9507099f03bfdc0afd6f3fb549f939ec5bc316af
[]
no_license
RRanjitha/projectgh
f08d962a917a9c92ca5a5cea23292110479c7f15
a437a770b4fddb04e41b9e00cf7e0fa59f53ac13
refs/heads/master
2020-03-30T11:55:44.385866
2018-10-02T05:23:13
2018-10-02T05:23:13
150,845,304
0
0
null
null
null
null
UTF-8
Java
false
false
1,016
java
package com.niche.ng.service; import com.niche.ng.service.dto.CommonSettingsDTO; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import java.util.Optional; /** * Service Interface for managing CommonSettings. */ public interface CommonSettingsService { /** * Save a commonSettings. * * @param commonSettingsDTO the entity to save * @return the persisted entity */ CommonSettingsDTO save(CommonSettingsDTO commonSettingsDTO); /** * Get all the commonSettings. * * @param pageable the pagination information * @return the list of entities */ Page<CommonSettingsDTO> findAll(Pageable pageable); /** * Get the "id" commonSettings. * * @param id the id of the entity * @return the entity */ Optional<CommonSettingsDTO> findOne(Long id); /** * Delete the "id" commonSettings. * * @param id the id of the entity */ void delete(Long id); }
[ "ranji.cs016@gmail.com" ]
ranji.cs016@gmail.com
31cb9195b6e4d0527085678421f884ed21dc5316
d492576b6d452f1f4bc8c4f4ffc1b054f5cc5eff
/Reportes/src/co/gov/ideam/sirh/datasource/JRDataSourceIdeam.java
0ddead99b03f7154d6dfce711bd4d87b37d801e9
[]
no_license
Sirhv2/AppSirh
d5f3cb55e259c29e46f3e22a7d39ed7b01174c84
6074d04bc0f4deb313e7f3c73a284d51e499af4d
refs/heads/master
2021-01-15T12:04:12.129393
2016-09-16T21:09:30
2016-09-16T21:09:30
68,330,584
0
0
null
null
null
null
UTF-8
Java
false
false
2,462
java
package co.gov.ideam.sirh.datasource; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.List; import net.sf.jasperreports.engine.JRDataSource; import net.sf.jasperreports.engine.JRException; import net.sf.jasperreports.engine.JRField; /** * Data source utilizado para llenar un reporte con base en ls objetos * que se reciben en una lista. */ public class JRDataSourceIdeam implements JRDataSource{ private List data; private int indiceActual = -1; /** * DataSource para llenar los reportes con la informacin recibida * como parametro. * @param data */ public JRDataSourceIdeam(List data){ this.data = data; } /** * Retorna un valor boolean que indica si hay o no mas objetos en la * lista. * @return boolean * @throws net.sf.jasperreports.engine.JRException */ public boolean next() throws JRException { if (data == null){ return false; } indiceActual++; return (indiceActual < data.size()); } /** * Retorna un valor del objeto que viene en la lista, utiliza reflexion * para ejecutar el metodo getXXXX correspondiente. * @param field * @return Object * @throws net.sf.jasperreports.engine.JRException */ public Object getFieldValue(JRField field) throws JRException { Object o = null; String atributo = field.getName(); String nombreAtributo = "get" + atributo.substring(0,1).toUpperCase() + atributo.substring(1); Object objData = this.data.get(indiceActual); if (objData == null){ throw new JRException("No existe un registro con indice " + indiceActual); } try { Method metodo = objData.getClass().getMethod(nombreAtributo, null); Object retorno = metodo.invoke(objData, null); return retorno; } catch (NoSuchMethodException ex) { throw new JRException(ex.getMessage()); } catch (SecurityException ex) { throw new JRException(ex.getMessage()); } catch (IllegalAccessException ex) { throw new JRException(ex.getMessage()); } catch (IllegalArgumentException ex) { throw new JRException(ex.getMessage()); } catch (InvocationTargetException ex) { throw new JRException(ex.getMessage()); } } }
[ "jfgc1394@gmail.com" ]
jfgc1394@gmail.com
289f76e78862a1927dee8ba075eac5986e29b531
d5b8084532ab76c1a75d311375427cf73a22ecd8
/src/main/java/com/epmweb/server/service/dto/WishlistProductsDTO.java
e10c0d27e0781d6611265ebb65054f1f8fc88387
[]
no_license
thetlwinoo/epm-web
4959f71e2766284f53e29eaf892467822bc6493b
ae6e41fc4df0767301909e536c30f63f58d8a489
refs/heads/master
2022-12-21T15:44:42.018331
2020-03-27T11:44:53
2020-03-27T11:44:53
250,519,805
1
1
null
2022-12-16T04:42:45
2020-03-27T11:43:54
Java
UTF-8
Java
false
false
1,798
java
package com.epmweb.server.service.dto; import java.io.Serializable; import java.util.Objects; /** * A DTO for the {@link com.epmweb.server.domain.WishlistProducts} entity. */ public class WishlistProductsDTO implements Serializable { private Long id; private Long productId; private String productName; private Long wishlistId; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Long getProductId() { return productId; } public void setProductId(Long productsId) { this.productId = productsId; } public String getProductName() { return productName; } public void setProductName(String productsName) { this.productName = productsName; } public Long getWishlistId() { return wishlistId; } public void setWishlistId(Long wishlistsId) { this.wishlistId = wishlistsId; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } WishlistProductsDTO wishlistProductsDTO = (WishlistProductsDTO) o; if (wishlistProductsDTO.getId() == null || getId() == null) { return false; } return Objects.equals(getId(), wishlistProductsDTO.getId()); } @Override public int hashCode() { return Objects.hashCode(getId()); } @Override public String toString() { return "WishlistProductsDTO{" + "id=" + getId() + ", product=" + getProductId() + ", product='" + getProductName() + "'" + ", wishlist=" + getWishlistId() + "}"; } }
[ "thetlwinoo85@yahoo.com" ]
thetlwinoo85@yahoo.com
a148722f2169eddbcd9030e97bae5e6e1c50d301
652b2842d281b98f06170545cd3af9b49bc65849
/java-basic/src/main/java/basic/thread/Interrupted.java
e117b673fcc77f0e77437961b9afc174594a1ea0
[]
no_license
LUCKYZHOUSTAR/JAVA-repository
bc55d028252eb2588c69f0ae921dd229fe4f4f38
fb7538db24b0f35a05101d8932d77db0dd297389
refs/heads/master
2022-12-27T06:59:43.700820
2020-05-28T02:44:47
2020-05-28T02:44:47
110,965,806
1
1
null
2022-12-16T10:40:41
2017-11-16T11:56:07
Java
UTF-8
Java
false
false
1,783
java
package basic.thread; import java.util.concurrent.TimeUnit; /** * @Author:chaoqiang.zhou * @Description:中断就是线程的一个标识,代表线程中断过而已,但是当抛出interrunption后,该标识会自动的进行 * 清除操作 * @Date:Create in 20:44 2017/10/24 */ public class Interrupted { public static void main(String[] args) throws Exception { // sleepThread不停的尝试睡眠 Thread sleepThread = new Thread(new SleepRunner(), "SleepThread"); sleepThread.setDaemon(true); // busyThread不停的运行 Thread busyThread = new Thread(new BusyRunner(), "BusyThread"); busyThread.setDaemon(true); sleepThread.start(); busyThread.start(); // 休眠5秒,让sleepThread和busyThread充分运行 TimeUnit.SECONDS.sleep(5); sleepThread.interrupt(); busyThread.interrupt(); //SleepThread interrupted is false // BusyThread interrupted is true //因为sleep中断后,抛出了InterruptedException的异常,其实在抛出这个异常之间,会先进行中断标识位的清除,因此isInterrupted返回false System.out.println("SleepThread interrupted is " + sleepThread.isInterrupted()); System.out.println("BusyThread interrupted is " + busyThread.isInterrupted()); // 防止sleepThread和busyThread立刻退出 SleepUtils.second(2); } static class SleepRunner implements Runnable { @Override public void run() { while (true) { SleepUtils.second(10); } } } static class BusyRunner implements Runnable { @Override public void run() { while (true) { } } } }
[ "chaoqiang.zhou@Mtime.com" ]
chaoqiang.zhou@Mtime.com
b5a82da9ebdb17ce1a728566dd18b920d25cedeb
ff59a7508187f4156d7339fd09500e02c0e0e94a
/NewPropertiesFileCreation.java
8b951e829680b06e0325d662ebc7ed8fd174b534
[]
no_license
preetishIbankG99/collections
374224ce24871c62ef6da880b6dfd87394ce300a
6b5d59b73948d68c84f74b218440fad28ce7d646
refs/heads/master
2023-08-18T17:32:30.787429
2021-09-20T14:38:12
2021-09-20T14:38:12
402,770,196
0
0
null
null
null
null
UTF-8
Java
false
false
429
java
package collectionsamples; import java.io.FileWriter; import java.util.Properties; public class NewPropertiesFileCreation { public static void main(String[] args)throws Exception{ Properties p=new Properties(); p.setProperty("name","Suman Jaiswal"); p.setProperty("email","sumanjaiswal@javatpoint.com"); p.store(new FileWriter("info.properties"),"Javatpoint Properties Example"); } }
[ "shubhamsethiabc87@gmail.com" ]
shubhamsethiabc87@gmail.com
5b490266c4c3bd42b85cf5d47ef589bc9652fb71
7413949903a82d2fb5d928f3c17aace5024091a4
/JPA/src/uo/ri/business/ForemanService.java
7c85feb6277354b2b8f69995f7f138c8878f80ad
[ "MIT" ]
permissive
thewillyhuman/GIISOF01-3-001-Repositorios-De-Informacion
6b0ce68f988da783a4435e100c094ce912b6a442
bdd44fb8204dde793021bf633bb88828cd6126b2
refs/heads/master
2021-09-17T02:09:56.537395
2018-06-26T17:17:45
2018-06-26T17:17:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,158
java
/* * MIT License * * Copyright (c) 2018 Guillermo Facundo Colunga * * 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 uo.ri.business; import java.util.List; import uo.ri.business.dto.ClientDto; import uo.ri.util.exception.BusinessException; /** * The Interface ForemanService. * * @author Guillermo Facundo Colunga * @version 201806081225 */ public interface ForemanService { /** * Adds the client. * * @param client * the client * @param idRecomendador * the id recomendador * @throws BusinessException * the business exception */ void addClient(ClientDto client, Long idRecomendador) throws BusinessException; /** * Delete client. * * @param id * the id * @throws BusinessException * the business exception */ void deleteClient(Long id) throws BusinessException; /** * Find all clients. * * @return the list * @throws BusinessException * the business exception */ List<ClientDto> findAllClients() throws BusinessException; /** * Find client by id. * * @param id * the id * @return the client dto * @throws BusinessException * the business exception */ ClientDto findClientById(Long id) throws BusinessException; /** * Find recomended clients by cliente id. * * @param id * of the recommender client * @return the list of recommended clients, might be empty if there is none * @throws BusinessException * the business exception */ List<ClientDto> findRecomendedClientsByClienteId(Long id) throws BusinessException; /** * Update client. * * @param dto * the dto * @throws BusinessException * the business exception */ void updateClient(ClientDto dto) throws BusinessException; }
[ "colunga91@gmail.com" ]
colunga91@gmail.com
c31470091cce67412a14c3455f07c7ec627f60ad
1e92cc6b09a058f4bb4f0dbc30ee2d5dbca51932
/ncaaUI/src/main/java/io/spring/marchmadness/controller/TaskController.java
62ad58eef0291bc6c80df3fd4347a635bd870972
[ "Apache-2.0" ]
permissive
mminella/TaskMadness
6bbb28313e9e1b9d5c2314bf16d1a2f59b4ce1cd
e6510084c65d671b2f2b6701a9a453a2860ea5f0
refs/heads/master
2021-01-19T03:53:58.269086
2019-03-18T22:46:18
2019-03-18T22:46:18
50,684,051
4
1
null
2016-07-29T18:05:53
2016-01-29T18:57:34
Java
UTF-8
Java
false
false
1,687
java
/* * Copyright 2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.spring.marchmadness.controller; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cloud.task.repository.TaskExplorer; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; /** * @author Michael Minella */ @Controller @RequestMapping("/task") public class TaskController { @Autowired private TaskExplorer taskExplorer; @RequestMapping(value = {""}, method = RequestMethod.GET) public String list(Pageable pageable, Model model) { model.addAttribute("page", taskExplorer.findAll(pageable)); return "task/list"; } @RequestMapping(value = {"/{id}"}, method = RequestMethod.GET) public String detail(@PathVariable("id") long id, Model model) { model.addAttribute("task", taskExplorer.getTaskExecution(id)); return "task/detail"; } }
[ "mminella@pivotal.io" ]
mminella@pivotal.io
eeb36bef7b93a8d137e4a8d57d00402a4c23cd53
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-ws/results/XCOMMONS-928-9-26-Single_Objective_GGA-WeightedSum/org/xwiki/platform/wiki/creationjob/internal/ExtensionInstaller_ESTest_scaffolding.java
b808fd52e25d7e1dda3b802ae7d484fd6c3e7c9b
[ "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
467
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Mon Mar 30 18:04:54 UTC 2020 */ package org.xwiki.platform.wiki.creationjob.internal; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class ExtensionInstaller_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
abb988c6a03e6dcdc54cb7011e37b714c6f0c0c0
e98a7a353eadc75420c2004452462df3d1a2d014
/taotao-cloud-gateway/src/main/java/com/taotao/cloud/gateway/filter/global/GrayReactiveLoadBalancerClientFilter.java
25c95256506695cd0bed1b60739e9b679fb17484
[ "Apache-2.0" ]
permissive
reefexxx123/taotao-cloud
a5c4ebc3bba9dd0a93846f5b0eb0f7a84331f4f3
58b475e66ea212d4bb82657a253583d666c644fd
refs/heads/master
2022-11-08T20:22:11.875074
2020-06-23T14:02:44
2020-06-23T14:02:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,632
java
/** * Project Name: my-projects * Package Name: com.taotao.cloud.demog.ateway.filter * Date: 2020/4/27 14:13 * Author: dengtao */ package com.taotao.cloud.gateway.filter.global; import com.taotao.cloud.gateway.loadBalancer.GrayLoadBalancer; import com.taotao.cloud.log.utils.LogUtil; import org.springframework.cloud.client.ServiceInstance; import org.springframework.cloud.client.loadbalancer.LoadBalancerUriTools; import org.springframework.cloud.client.loadbalancer.reactive.DefaultRequest; import org.springframework.cloud.client.loadbalancer.reactive.Request; import org.springframework.cloud.client.loadbalancer.reactive.Response; import org.springframework.cloud.gateway.config.LoadBalancerProperties; import org.springframework.cloud.gateway.filter.GatewayFilterChain; import org.springframework.cloud.gateway.filter.GlobalFilter; import org.springframework.cloud.gateway.filter.ReactiveLoadBalancerClientFilter; import org.springframework.cloud.gateway.support.DelegatingServiceInstance; import org.springframework.cloud.gateway.support.NotFoundException; import org.springframework.cloud.gateway.support.ServerWebExchangeUtils; import org.springframework.cloud.loadbalancer.core.ServiceInstanceListSupplier; import org.springframework.cloud.loadbalancer.support.LoadBalancerClientFactory; import org.springframework.core.Ordered; import org.springframework.http.HttpHeaders; import org.springframework.stereotype.Component; import org.springframework.web.server.ServerWebExchange; import reactor.core.publisher.Mono; import java.net.URI; /** * 蓝绿发布<br> * * @author dengtao * @version v1.0.0 */ @Component public class GrayReactiveLoadBalancerClientFilter implements GlobalFilter, Ordered { private static final int LOAD_BALANCER_CLIENT_FILTER_ORDER = 10150; private final LoadBalancerClientFactory clientFactory; private final LoadBalancerProperties properties; public GrayReactiveLoadBalancerClientFilter(LoadBalancerClientFactory clientFactory, LoadBalancerProperties properties) { this.clientFactory = clientFactory; this.properties = properties; } @Override public int getOrder() { return LOAD_BALANCER_CLIENT_FILTER_ORDER; } @Override public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) { URI url = exchange.getAttribute(ServerWebExchangeUtils.GATEWAY_REQUEST_URL_ATTR); String schemePrefix = exchange.getAttribute(ServerWebExchangeUtils.GATEWAY_SCHEME_PREFIX_ATTR); if (url != null && ("grayLb".equals(url.getScheme()) || "grayLb".equals(schemePrefix))) { ServerWebExchangeUtils.addOriginalRequestUrl(exchange, url); LogUtil.info(ReactiveLoadBalancerClientFilter.class.getSimpleName() + " url before: " + url); return this.choose(exchange).doOnNext((response) -> { if (!response.hasServer()) { throw NotFoundException.create(this.properties.isUse404(), "Unable to find instance for " + url.getHost()); } else { URI uri = exchange.getRequest().getURI(); String overrideScheme = null; if (schemePrefix != null) { overrideScheme = url.getScheme(); } DelegatingServiceInstance serviceInstance = new DelegatingServiceInstance(response.getServer(), overrideScheme); URI requestUrl = this.reconstructURI(serviceInstance, uri); LogUtil.info("LoadBalancerClientFilter url chosen: " + requestUrl); exchange.getAttributes().put(ServerWebExchangeUtils.GATEWAY_REQUEST_URL_ATTR, requestUrl); } }).then(chain.filter(exchange)); } else { return chain.filter(exchange); } } protected URI reconstructURI(ServiceInstance serviceInstance, URI original) { return LoadBalancerUriTools.reconstructURI(serviceInstance, original); } private Mono<Response<ServiceInstance>> choose(ServerWebExchange exchange) { URI uri = exchange.getAttribute(ServerWebExchangeUtils.GATEWAY_REQUEST_URL_ATTR); assert uri != null; GrayLoadBalancer loadBalancer = new GrayLoadBalancer(clientFactory.getLazyProvider(uri.getHost(), ServiceInstanceListSupplier.class), uri.getHost()); return loadBalancer.choose(this.createRequest(exchange)); } private Request createRequest(ServerWebExchange exchange) { HttpHeaders headers = exchange.getRequest().getHeaders(); return new DefaultRequest<>(headers); } }
[ "981376577@qq.com" ]
981376577@qq.com
f6c5e86c2a74196688436a4c8bc2fa59fe34a812
e94a5b26a9aee4affa2c8ff3b62a13ca11b228ed
/app/src/main/java/com/haotang/easyshare/mvp/model/MyCouponModel.java
41ab47e7571de29db152f7a30c3d61de99e61a8b
[]
no_license
xxxxxxxxxxj/Pet_New
63a3563937a09253972e35b8f74326e68a6044de
569422053dd56f1545d3fdb559d571f50bbb6d5c
refs/heads/master
2021-06-25T01:26:56.943565
2018-10-15T02:15:40
2018-10-15T02:15:40
129,057,735
0
0
null
null
null
null
UTF-8
Java
false
false
765
java
package com.haotang.easyshare.mvp.model; import com.haotang.easyshare.mvp.model.http.MyCouponApiService; import com.haotang.easyshare.mvp.model.imodel.IMyCouponModel; import com.ljy.devring.DevRing; import java.util.Map; import io.reactivex.Observable; import okhttp3.RequestBody; /** * <p>Title:${type_name}</p> * <p>Description:</p> * <p>Company:北京昊唐科技有限公司</p> * * @author 徐俊 * @date zhoujunxia on 2018/8/29 11:42 */ public class MyCouponModel implements IMyCouponModel { /** * 我的优惠券列表 * @param body */ @Override public Observable list(Map<String, String> headers, RequestBody body) { return DevRing.httpManager().getService(MyCouponApiService.class).list(headers,body); } }
[ "xvjun@haotang365.com.cn" ]
xvjun@haotang365.com.cn
313ac841b6861bd22b12e983a629178a7921726d
a66a4d91639836e97637790b28b0632ba8d0a4f9
/src/generators/compression/huffman2/HuffmanCoding/HuffmanModel.java
54136a31644d98723b54e3436e555c06a4b35371
[]
no_license
roessling/animal-av
7d0ba53dda899b052a6ed19992fbdfbbc62cf1c9
043110cadf91757b984747750aa61924a869819f
refs/heads/master
2021-07-13T05:31:42.223775
2020-02-26T14:47:31
2020-02-26T14:47:31
206,062,707
0
2
null
2020-10-13T15:46:14
2019-09-03T11:37:11
Java
UTF-8
Java
false
false
294
java
package generators.compression.huffman2.HuffmanCoding; import java.util.Map; import generators.compression.huffman2.Node.TreeNode; public class HuffmanModel { public String input; public String compressed; public TreeNode tree; public Map<Character, String> lookupTable; }
[ "guido@tk.informatik.tu-darmstadt.de" ]
guido@tk.informatik.tu-darmstadt.de
b6848f4739ea8aa3fbade470986c25346c4a84fd
712a5e8475b6c9276bd4f8f857be95fdf6f30b9f
/com/google/android/gms/common/api/zze.java
e1ebc6a02bcf891878df8c963c6f2918f564e54d
[]
no_license
swapnilsen/OCR_2
b29bd22a51203b4d39c2cc8cb03c50a85a81218f
1889d208e17e94a55ddeae91336fe92110e1bd2d
refs/heads/master
2021-01-20T08:46:03.508508
2017-05-03T19:50:52
2017-05-03T19:50:52
90,187,623
1
0
null
null
null
null
UTF-8
Java
false
false
287
java
package com.google.android.gms.common.api; import android.support.annotation.NonNull; public class zze<T extends Result> { private T zzazt; public void zzb(@NonNull T t) { this.zzazt = t; } @NonNull protected T zzvs() { return this.zzazt; } }
[ "swasen@cisco.com" ]
swasen@cisco.com
2575e270ba05c2313d9494426eaa560d97f07215
9ccadd02f867d50daff77a78e0f5559183530668
/spring-cloud-kubernetes-leader/src/main/java/org/springframework/cloud/kubernetes/leader/LeaderProperties.java
6787df0147fc46febcd1f3eada19eb19ea4b374c
[ "Apache-2.0" ]
permissive
jstrachan/spring-cloud-kubernetes-1
a1a16522427fb05570499336ea4d34eef512973f
466dba0a508d5de70848e0dc555832e7f01236e0
refs/heads/master
2020-03-20T20:53:47.996300
2018-06-18T05:28:44
2018-06-18T05:28:44
137,713,232
0
0
null
null
null
null
UTF-8
Java
false
false
4,083
java
/* * Copyright (C) 2018 to the original authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.cloud.kubernetes.leader; import java.util.Collections; import java.util.Map; import org.springframework.boot.context.properties.ConfigurationProperties; /** * @author <a href="mailto:gytis@redhat.com">Gytis Trikleris</a> */ @ConfigurationProperties("spring.cloud.kubernetes.leader") public class LeaderProperties { private static final String DEFAULT_LEADER_ID_PREFIX = "leader.id."; private static final boolean DEFAULT_AUTO_STARTUP = true; private static final String DEFAULT_CONFIG_MAP_NAME = "leaders"; private static final long DEFAULT_LEASE_DURATION = 30000; private static final long DEFAULT_RETRY_PERIOD = 5000; private static final double DEFAULT_JITTER_FACTOR = 1.2; /** * Should leader election be started automatically on startup. * Default: true */ private boolean autoStartup = DEFAULT_AUTO_STARTUP; /** * Role for which leadership this candidate will compete. */ private String role; /** * Kubernetes namespace where the leaders ConfigMap and candidates are located. */ private String namespace; /** * Kubernetes ConfigMap where leaders information will be stored. * Default: leaders */ private String configMapName = DEFAULT_CONFIG_MAP_NAME; /** * Kubernetes labels common to all leadership candidates. * Default: empty */ private Map<String, String> labels = Collections.emptyMap(); /** * Leader id property prefix for the ConfigMap. * Default: leader.id. */ private String leaderIdPrefix = DEFAULT_LEADER_ID_PREFIX; /** * Time period after which leader should check it's leadership or new leader should be elected. * Default: 30s */ private long leaseDuration = DEFAULT_LEASE_DURATION; /** * Time period after connections should be retired after failure. * Default: 5s */ private long retryPeriod = DEFAULT_RETRY_PERIOD; /** * A parameter to randomise scheduler. * Default: 1.2 */ private double jitterFactor = DEFAULT_JITTER_FACTOR; public boolean isAutoStartup() { return autoStartup; } public void setAutoStartup(boolean autoStartup) { this.autoStartup = autoStartup; } public String getRole() { return role; } public void setRole(String role) { this.role = role; } public String getNamespace() { return namespace; } public String getNamespace(String defaultValue) { if (namespace == null || namespace.isEmpty()) { return defaultValue; } return namespace; } public void setNamespace(String namespace) { this.namespace = namespace; } public String getConfigMapName() { return configMapName; } public void setConfigMapName(String configMapName) { this.configMapName = configMapName; } public Map<String, String> getLabels() { return labels; } public void setLabels(Map<String, String> labels) { this.labels = Collections.unmodifiableMap(labels); } public String getLeaderIdPrefix() { return leaderIdPrefix; } public void setLeaderIdPrefix(String leaderIdPrefix) { this.leaderIdPrefix = leaderIdPrefix; } public long getLeaseDuration() { return leaseDuration; } public void setLeaseDuration(long leaseDuration) { this.leaseDuration = leaseDuration; } public long getRetryPeriod() { return retryPeriod; } public void setRetryPeriod(long retryPeriod) { this.retryPeriod = retryPeriod; } public double getJitterFactor() { return jitterFactor; } public void setJitterFactor(double jitterFactor) { this.jitterFactor = jitterFactor; } }
[ "iocanel@gmail.com" ]
iocanel@gmail.com
eaa3f441b6ddb79040fc5417e099a427c40f9644
f110ce3d12092b2ba44ab307a630c4f40efcad32
/src/main/java/com.hbcd/testscript/mobile/s5a/mOptimization/ScenB14360.java
f9b81760f4fdbf2980c475b115c5632275fd8cd8
[]
no_license
rahullodha85/ta-banner-tests
db1dafe02110b44e0f32c2ce262869dfa2ae7dbd
02dbf6bcd96c9b34adb17c19e133537f1213c287
refs/heads/master
2021-01-25T09:45:37.800829
2017-06-09T16:39:04
2017-06-09T16:39:04
93,874,921
0
0
null
null
null
null
UTF-8
Java
false
false
711
java
package com.hbcd.testscript.mobile.s5a.mOptimization; import com.hbcd.banner.mobile.saks.validations.ValidateBag; import com.hbcd.banner.mobile.saks.validations.ValidatePdp; import com.hbcd.base.ScenarioMobileSaks; import com.hbcd.commonbanner.base.pages.SearchFunction; /** * Created by 901124 on 2/29/2016. */ public class ScenB14360 extends ScenarioMobileSaks { /**/ @Override public void executeScript() throws Exception { String item1 = dataObject.getSkuListInfo().get(0); nav.SearchFor(item1); pdp.AddToBag(1); pdp.EnterBag(); ValidateBag.hasImageThumbnail(item1); bag.ClickProductImage(item1); ValidatePdp.hasAddToBagButton(); } }
[ "rahul_lodha@s5a.com" ]
rahul_lodha@s5a.com
25bee5a8094a384b3bbed990552f53553fac67c1
288151cf821acf7fe9430c2b6aeb19e074a791d4
/mfoyou-agent-server/mfoyou-agent-taobao/src/main/java/com/alipay/api/domain/AlipayEcoMycarParkingCardbarcodeCreateModel.java
594ba8b23ac9de84ffe03f28f281b2b808e07613
[]
no_license
jiningeast/distribution
60022e45d3a401252a9c970de14a599a548a1a99
c35bfc5923eaecf2256ce142955ecedcb3c64ae5
refs/heads/master
2020-06-24T11:27:51.899760
2019-06-06T12:52:59
2019-06-06T12:52:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
846
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 停车卡生成二维码 * * @author auto create * @since 1.0, 2016-10-26 18:05:18 */ public class AlipayEcoMycarParkingCardbarcodeCreateModel extends AlipayObject { private static final long serialVersionUID = 7229528714362112924L; /** * 设备商订单id */ @ApiField("equipment_id") private String equipmentId; /** * 支付宝交易流水号订单 */ @ApiField("parking_id") private String parkingId; public String getEquipmentId() { return this.equipmentId; } public void setEquipmentId(String equipmentId) { this.equipmentId = equipmentId; } public String getParkingId() { return this.parkingId; } public void setParkingId(String parkingId) { this.parkingId = parkingId; } }
[ "15732677882@163.com" ]
15732677882@163.com
986151794c3774232b6da731d68a489f9f33341c
ae296cb09143290d7dcf03bfac637c835746b77d
/app/src/main/java/com/example/red/magazine/malls/model/ServiceProvidersModel.java
f26394346e70936e7d1dfc8f31888381900d14a4
[]
no_license
messyKassaye/addismalls
3f5b5b55567da02c77ed6825b2035659574ac01e
8ab6e8648fdbdcf93c66c73bfce807af14bf239b
refs/heads/master
2020-03-07T04:18:26.842190
2018-03-29T10:42:32
2018-03-29T10:42:32
127,262,660
0
0
null
null
null
null
UTF-8
Java
false
false
832
java
package com.example.red.magazine.malls.model; /** * Created by RED on 10/2/2017. */ public class ServiceProvidersModel { private String id; private String name; private String photo_path; public ServiceProvidersModel(String id, String name, String photo_path) { this.id = id; this.name = name; this.photo_path = photo_path; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getPhoto_path() { return photo_path; } public void setPhoto_path(String photo_path) { this.photo_path = photo_path; } }
[ "nurelayinmehammed@gmail.com" ]
nurelayinmehammed@gmail.com
07c58953b266001313e7871c6c76767ea46b7c01
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/93/946.java
caccb6340689377e3857ae9eeeaa6ef7573ddce6
[ "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
821
java
package <missing>; public class GlobalMembers { public static int Main() { int n = 0; //???? int[] a = {3, 5, 7}; n = Integer.parseInt(ConsoleInput.readToWhiteSpace(true)); if ((n % 3 != 0 && n % 5 != 0) && n % 7 != 0) { System.out.print("n"); } else { if (n % 7 == 0) //??n?7????? { for (int i = 0;i < 2;i++) { if (n % a[i] == 0) //??n?3?5????? { System.out.print(a[i]); System.out.print(" "); } } System.out.print(7); } else if (n % 5 == 0) //??n???7????5????? { if (n % 3 == 0) { System.out.print(a[0]); System.out.print(" "); System.out.print(a[1]); } else { System.out.print(a[1]); } } else { System.out.print(a[0]); } } return 0; } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
758c1f39fcd54139c33f3e4a7d5f29485da9c068
a5f98c9b2368108b442b33f6fb60994bbf03f01f
/src/com/eyesfree/corejava/v1ch06/clone/Employee.java
fa193a71e7cc8e575ed587394aaaaf4ea07cb437
[]
no_license
heshuying/corejava_ten
b109f916be6733a750b08bdd31704f4222d28870
28d1cb20c54eab9e7054d066a524cc94bba5be47
refs/heads/master
2022-02-20T08:04:04.949785
2019-09-20T23:46:56
2019-09-20T23:46:56
208,604,775
0
0
null
null
null
null
UTF-8
Java
false
false
1,296
java
package com.eyesfree.corejava.v1ch06.clone; import java.util.Date; import java.util.GregorianCalendar; public class Employee implements Cloneable { private String name; private double salary; private Date hireDay; public Employee(String name, double salary) { this.name = name; this.salary = salary; hireDay = new Date(); } public Employee clone() throws CloneNotSupportedException { // call Object.clone() Employee cloned = (Employee) super.clone(); // clone mutable fields cloned.hireDay = (Date) hireDay.clone(); return cloned; } /** * Set the hire day to a given date. * @param year the year of the hire day * @param month the month of the hire day * @param day the day of the hire day */ public void setHireDay(int year, int month, int day) { Date newHireDay = new GregorianCalendar(year, month - 1, day).getTime(); // Example of instance field mutation hireDay.setTime(newHireDay.getTime()); } public void raiseSalary(double byPercent) { double raise = salary * byPercent / 100; salary += raise; } public String toString() { return "Employee[name=" + name + ",salary=" + salary + ",hireDay=" + hireDay + "]"; } }
[ "heshuying@hyjf.com" ]
heshuying@hyjf.com
c8db3d3ad8bc8cac928f6c990a201ac890da7693
b578b314cbd753481f0e16b403a692e73aa9102d
/src/com/baosteel/qcsh/ui/activity/home/happyliving/MyRecordListActivity.java
12f26fe39025c9fdadd41428569ac7429acac7d4
[]
no_license
leizhiheng/BaoGang
70bd001369a53233648d35f6faf8c54e7bd92f00
0dcf1c5afd4bd8e0874dad6cfb011f9806ab036d
refs/heads/master
2021-01-10T08:38:17.610547
2015-10-16T09:58:23
2015-10-16T09:58:23
44,375,387
0
2
null
null
null
null
UTF-8
Java
false
false
1,687
java
package com.baosteel.qcsh.ui.activity.home.happyliving; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import com.baosteel.qcsh.R; import com.baosteel.qcsh.ui.fragment.home.happyliving.ApplyRecordListFragment; import com.baosteel.qcsh.ui.fragment.home.happyliving.ReserveRecordListFragment; import com.common.base.BaseActivity; public class MyRecordListActivity extends BaseActivity implements OnClickListener { public static final String EXTRA_FRAGMENT_INDEX = "fragment.index"; /** * 加载预约服务列表的Fragment */ public static final int FRAGMENT_INDEX_RESERVE_RECORD = 0; /** * 加载申报记录列表的Fragment */ public static final int FRAGMENT_INDEX_APPLY_RECORD = 1; private int mFragmentIndex; private String mTitle; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.commen_container_layout); initData(); initView(); loadData(); } private void initData() { mFragmentIndex = getIntent().getIntExtra(EXTRA_FRAGMENT_INDEX, FRAGMENT_INDEX_RESERVE_RECORD); mTitle = getIntent().getStringExtra(EXTRA_KEY_TITLE); } private void initView() { setTitle(mTitle); if (mFragmentIndex == FRAGMENT_INDEX_APPLY_RECORD) { getSupportFragmentManager().beginTransaction().replace(R.id.container, new ApplyRecordListFragment()).commit(); } else if (mFragmentIndex == FRAGMENT_INDEX_RESERVE_RECORD) { getSupportFragmentManager().beginTransaction().replace(R.id.container, new ReserveRecordListFragment()).commit(); } } private void loadData() { } @Override public void onClick(View v) { } }
[ "293575570@qq.com" ]
293575570@qq.com
3c94fd70dfeb2743e486c0d07f4d57828a2da2a5
0ca9a0873d99f0d69b78ed20292180f513a20d22
/src/main/java/com/google/android/gms/common/api/internal/zzdi.java
be17b827f7511f7ba1ae9a66c8c424e7cf1cdfb0
[]
no_license
Eliminater74/com.google.android.tvlauncher
44361fbbba097777b99d7eddd6e03d4bbe5f4d60
e8284f9970d77a05042a57e9c2173856af7c4246
refs/heads/master
2021-01-14T23:34:04.338366
2020-02-24T16:39:53
2020-02-24T16:39:53
242,788,539
1
0
null
null
null
null
UTF-8
Java
false
false
4,775
java
package com.google.android.gms.common.api.internal; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.os.Looper; import android.support.annotation.NonNull; import android.support.p001v4.app.Fragment; import android.support.p001v4.app.FragmentActivity; import android.support.p001v4.util.ArrayMap; import java.io.FileDescriptor; import java.io.PrintWriter; import java.lang.ref.WeakReference; import java.util.Map; import java.util.WeakHashMap; /* compiled from: SupportLifecycleFragmentImpl */ public final class zzdi extends Fragment implements zzcf { private static WeakHashMap<FragmentActivity, WeakReference<zzdi>> zza = new WeakHashMap<>(); private Map<String, LifecycleCallback> zzb = new ArrayMap(); /* access modifiers changed from: private */ public int zzc = 0; /* access modifiers changed from: private */ public Bundle zzd; public static zzdi zza(FragmentActivity fragmentActivity) { zzdi zzdi; WeakReference weakReference = zza.get(fragmentActivity); if (weakReference != null && (zzdi = (zzdi) weakReference.get()) != null) { return zzdi; } try { zzdi zzdi2 = (zzdi) fragmentActivity.getSupportFragmentManager().findFragmentByTag("SupportLifecycleFragmentImpl"); if (zzdi2 == null || zzdi2.isRemoving()) { zzdi2 = new zzdi(); fragmentActivity.getSupportFragmentManager().beginTransaction().add(zzdi2, "SupportLifecycleFragmentImpl").commitAllowingStateLoss(); } zza.put(fragmentActivity, new WeakReference(zzdi2)); return zzdi2; } catch (ClassCastException e) { throw new IllegalStateException("Fragment with tag SupportLifecycleFragmentImpl is not a SupportLifecycleFragmentImpl", e); } } public final <T extends LifecycleCallback> T zza(String str, Class<T> cls) { return (LifecycleCallback) cls.cast(this.zzb.get(str)); } public final void zza(String str, @NonNull LifecycleCallback lifecycleCallback) { if (!this.zzb.containsKey(str)) { this.zzb.put(str, lifecycleCallback); if (this.zzc > 0) { new Handler(Looper.getMainLooper()).post(new zzdj(this, lifecycleCallback, str)); return; } return; } StringBuilder sb = new StringBuilder(String.valueOf(str).length() + 59); sb.append("LifecycleCallback with tag "); sb.append(str); sb.append(" already added to this fragment."); throw new IllegalArgumentException(sb.toString()); } public final void onCreate(Bundle bundle) { super.onCreate(bundle); this.zzc = 1; this.zzd = bundle; for (Map.Entry next : this.zzb.entrySet()) { ((LifecycleCallback) next.getValue()).zza(bundle != null ? bundle.getBundle((String) next.getKey()) : null); } } public final void onStart() { super.onStart(); this.zzc = 2; for (LifecycleCallback zzb2 : this.zzb.values()) { zzb2.zzb(); } } public final void onResume() { super.onResume(); this.zzc = 3; for (LifecycleCallback zze : this.zzb.values()) { zze.zze(); } } public final void onActivityResult(int i, int i2, Intent intent) { super.onActivityResult(i, i2, intent); for (LifecycleCallback zza2 : this.zzb.values()) { zza2.zza(i, i2, intent); } } public final void onSaveInstanceState(Bundle bundle) { super.onSaveInstanceState(bundle); if (bundle != null) { for (Map.Entry next : this.zzb.entrySet()) { Bundle bundle2 = new Bundle(); ((LifecycleCallback) next.getValue()).zzb(bundle2); bundle.putBundle((String) next.getKey(), bundle2); } } } public final void onStop() { super.onStop(); this.zzc = 4; for (LifecycleCallback zza2 : this.zzb.values()) { zza2.zza(); } } public final void onDestroy() { super.onDestroy(); this.zzc = 5; for (LifecycleCallback zzh : this.zzb.values()) { zzh.zzh(); } } public final void dump(String str, FileDescriptor fileDescriptor, PrintWriter printWriter, String[] strArr) { super.dump(str, fileDescriptor, printWriter, strArr); for (LifecycleCallback zza2 : this.zzb.values()) { zza2.zza(str, fileDescriptor, printWriter, strArr); } } public final /* synthetic */ Activity zza() { return getActivity(); } }
[ "eliminater74@gmail.com" ]
eliminater74@gmail.com
b3f2b4a943b64548198993541387e2393b83da4c
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/aosp-mirror--platform_frameworks_base/ca5002f6bde51c0dc80281a821650ab28f36b39c/before/UiBot.java
2a5132dbf0b5d034bb64d26eb12d2ef1245921cc
[]
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
6,409
java
/* * Copyright (C) 2015 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.shell; import android.app.Instrumentation; import android.app.StatusBarManager; import android.support.test.uiautomator.By; import android.support.test.uiautomator.UiDevice; import android.support.test.uiautomator.UiObject; import android.support.test.uiautomator.UiObjectNotFoundException; import android.support.test.uiautomator.UiSelector; import android.support.test.uiautomator.Until; import android.util.Log; import static junit.framework.Assert.assertFalse; import static junit.framework.Assert.assertTrue; /** * A helper class for UI-related testing tasks. */ final class UiBot { private static final String TAG = "UiBot"; private static final String SYSTEMUI_PACKAGE = "com.android.systemui"; private final Instrumentation mInstrumentation; private final UiDevice mDevice; private final int mTimeout; public UiBot(Instrumentation instrumentation, int timeout) { mInstrumentation = instrumentation; mDevice = UiDevice.getInstance(instrumentation); mTimeout = timeout; } /** * Opens the system notification and gets a given notification. * * @param text Notificaton's text as displayed by the UI. * @return notification object. */ public UiObject getNotification(String text) { boolean opened = mDevice.openNotification(); Log.v(TAG, "openNotification(): " + opened); boolean gotIt = mDevice.wait(Until.hasObject(By.pkg(SYSTEMUI_PACKAGE)), mTimeout); assertTrue("could not get system ui (" + SYSTEMUI_PACKAGE + ")", gotIt); return getObject(text); } public void closeNotifications() throws Exception { // TODO: mDevice should provide such method.. StatusBarManager sbm = (StatusBarManager) mInstrumentation.getContext().getSystemService("statusbar"); sbm.collapsePanels(); } /** * Opens the system notification and clicks a given notification. * * @param text Notificaton's text as displayed by the UI. */ public void clickOnNotification(String text) { UiObject notification = getNotification(text); click(notification, "bug report notification"); } /** * Gets an object that might not yet be available in current UI. * * @param text Object's text as displayed by the UI. */ public UiObject getObject(String text) { boolean gotIt = mDevice.wait(Until.hasObject(By.text(text)), mTimeout); assertTrue("object with text '(" + text + "') not visible yet", gotIt); return getVisibleObject(text); } /** * Gets an object that might not yet be available in current UI. * * @param id Object's fully-qualified resource id (like {@code android:id/button1}) */ public UiObject getObjectById(String id) { boolean gotIt = mDevice.wait(Until.hasObject(By.res(id)), mTimeout); assertTrue("object with id '(" + id + "') not visible yet", gotIt); return getVisibleObjectById(id); } /** * Gets an object which is guaranteed to be present in the current UI. * * @param text Object's text as displayed by the UI. */ public UiObject getVisibleObject(String text) { UiObject uiObject = mDevice.findObject(new UiSelector().text(text)); assertTrue("could not find object with text '" + text + "'", uiObject.exists()); return uiObject; } /** * Gets an object which is guaranteed to be present in the current UI. * * @param text Object's text as displayed by the UI. */ public UiObject getVisibleObjectById(String id) { UiObject uiObject = mDevice.findObject(new UiSelector().resourceId(id)); assertTrue("could not find object with id '" + id+ "'", uiObject.exists()); return uiObject; } /** * Asserts an object is not visible. */ public void assertNotVisibleById(String id) { // TODO: not working when the bugreport dialog is shown, it hangs until the dialog is // dismissed and hence always work. boolean hasIt = mDevice.hasObject(By.res(id)); assertFalse("should not have found object with id '" + id+ "'", hasIt); } /** * Clicks on a UI element. * * @param uiObject UI element to be clicked. * @param description Elements's description used on logging statements. */ public void click(UiObject uiObject, String description) { try { boolean clicked = uiObject.click(); // TODO: assertion below fails sometimes, even though the click succeeded, // (specially when clicking the "Just Once" button), so it's currently just logged. // assertTrue("could not click on object '" + description + "'", clicked); Log.v(TAG, "onClick for " + description + ": " + clicked); } catch (UiObjectNotFoundException e) { throw new IllegalStateException("exception when clicking on object '" + description + "'", e); } } /** * Chooses a given activity to handle an Intent. * * @param name name of the activity as displayed in the UI (typically the value set by * {@code android:label} in the manifest). */ public void chooseActivity(String name) { // It uses an intent chooser now, so just getting the activity by text is enough... UiObject activity = getVisibleObject(name); click(activity, name); } public void pressBack() { mDevice.pressBack(); } public void turnScreenOn() throws Exception { mDevice.executeShellCommand("input keyevent KEYCODE_WAKEUP"); mDevice.executeShellCommand("wm dismiss-keyguard"); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
33115eb7d509e0d338248182bf02118ae326223f
496f1774f09a593b341f89c73a1e13b140dedd75
/src/test/java/com/gs/gestiontache/IntegrationTest.java
cd8b392cccbdad2d88f747d5557025d4702114f1
[]
no_license
mostafabenel/WorkRepo
80c088d8a7f1bf9e205c37541129ff86890a16bb
c5385705102df9fb7663820fea62f62f48906d62
refs/heads/main
2023-07-26T06:46:23.283554
2021-09-08T11:52:46
2021-09-08T11:52:46
404,328,303
0
0
null
null
null
null
UTF-8
Java
false
false
506
java
package com.gs.gestiontache; import com.gs.gestiontache.GestiontacheApp; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import org.springframework.boot.test.context.SpringBootTest; /** * Base composite annotation for integration tests. */ @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) @SpringBootTest(classes = GestiontacheApp.class) public @interface IntegrationTest { }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
b0d8049e0bc5ce2b3649b586038c2a30194fa051
c8655251bb853a032ab7db6a9b41c13241565ff6
/jframe-utils/src/main/java/com/alipay/api/domain/AntMerchantExpandMapplyorderQueryModel.java
8946e3a5ccad3000d3218f6be7550dddc61c185f
[]
no_license
jacksonrick/JFrame
3b08880d0ad45c9b12e335798fc1764c9b01756b
d9a4a9b17701eb698b957e47fa3f30c6cb8900ac
refs/heads/master
2021-07-22T21:13:22.548188
2017-11-03T06:49:44
2017-11-03T06:49:44
107,761,091
1
0
null
null
null
null
UTF-8
Java
false
false
625
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 商户入驻单查询接口 * * @author auto create * @since 1.0, 2016-07-28 23:35:07 */ public class AntMerchantExpandMapplyorderQueryModel extends AlipayObject { private static final long serialVersionUID = 6436936213427319287L; /** * 支付宝端商户入驻申请单据号 */ @ApiField("order_no") private String orderNo; public String getOrderNo() { return this.orderNo; } public void setOrderNo(String orderNo) { this.orderNo = orderNo; } }
[ "809573150@qq.com" ]
809573150@qq.com
8e0df3adab290c94c3f947ca4ed5e8660ad137a6
bc8a8a13561711ad588e0e48f80d4449ab18abdc
/src/main/java/org/nuxeo/ecm/platform/retention/DAO.java
0081f8c08c28d872b0c2be71afbb644dc53c2f19
[]
no_license
bdelbosc/nuxeo-platform-retention
d37162f9a777cd3ed3ca016d6afe6d5892496e02
2d895e5577daed1610a446d4f3b7c8653dfd402d
refs/heads/master
2021-01-16T18:02:56.866754
2012-05-21T14:00:13
2012-05-21T14:00:13
5,284,153
1
0
null
null
null
null
UTF-8
Java
false
false
660
java
package org.nuxeo.ecm.platform.retention; public abstract class DAO<T> { /** * Get an obect by id * * @param id * @return */ public abstract T find(String id); /** * List all object ids * * @return Array of ids */ public abstract String[] findAll(); /** * Persist a new object * * @param obj */ public abstract T create(T obj); /** * Update an existing object * * @param obj */ public abstract T update(T obj); /** * Remove an object * * @param obj */ public abstract void delete(T obj); }
[ "bdelbosc@nuxeo.com" ]
bdelbosc@nuxeo.com
0c48372950274945ad62d83a367ccf101dc160d8
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/LANG-19b-1-11-MOEAD-WeightedSum:TestLen:CallDiversity/org/apache/commons/lang3/text/translate/NumericEntityUnescaper_ESTest_scaffolding.java
dfc0e1e13b8ff150cfe80de2f13b955952e4163b
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
2,150
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sun Jan 19 18:45:46 UTC 2020 */ package org.apache.commons.lang3.text.translate; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class NumericEntityUnescaper_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.lang3.text.translate.NumericEntityUnescaper"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(NumericEntityUnescaper_ESTest_scaffolding.class.getClassLoader() , "org.apache.commons.lang3.text.translate.NumericEntityUnescaper", "org.apache.commons.lang3.text.translate.CharSequenceTranslator", "org.apache.commons.lang3.text.translate.AggregateTranslator" ); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
1d8b4fa3512d58d21e0bbaabd036fa88980697ed
c6aa94983f3c8f82954463af3972ae06b30396a7
/microservice_platform/zlt-uaa/src/main/java/com/central/oauth/config/ValidateCodeSecurityConfig.java
f469507abc7f23ca03b8f2ec48881bc90f2e9db2
[ "Apache-2.0" ]
permissive
dobulekill/jun_springcloud
f01358caacb1b04f57908dccc6432d0a5e17745e
33248f65301741ed97a24b978a5c22d5d6c052fb
refs/heads/master
2023-01-24T13:24:59.282130
2020-11-25T17:30:47
2020-11-25T17:30:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
916
java
/** * */ package com.central.oauth.config; import org.springframework.security.config.annotation.SecurityConfigurerAdapter; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.web.DefaultSecurityFilterChain; import org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter; import org.springframework.stereotype.Component; import javax.annotation.Resource; import javax.servlet.Filter; /** * 校验码相关安全配置 * * @author Wujun */ @Component("validateCodeSecurityConfig") public class ValidateCodeSecurityConfig extends SecurityConfigurerAdapter<DefaultSecurityFilterChain, HttpSecurity> { @Resource private Filter validateCodeFilter; @Override public void configure(HttpSecurity http) { http.addFilterBefore(validateCodeFilter, AbstractPreAuthenticatedProcessingFilter.class); } }
[ "wujun728@hotmail.com" ]
wujun728@hotmail.com
73e41530c7dabbd7882dfc3393eff0f0bfe4d73e
3f87df2a878de64eccdcac22bb09b8944ba06fd4
/java/spring/unofficial/udemy/OAuth2/social-login-web-client/src/main/java/com/appdeveloperblog/ws/clients/sociallogin/socialloginwebclient/SocialLoginWebClientApplication.java
818f44c738b9e942e7572df03c55b67c13d88b6c
[]
no_license
juncevich/workshop
621d1262a616ea4664198338b712898af9e61a76
fbaeecfb399be65a315c60d0aa24ecae4067918d
refs/heads/master
2023-04-30T14:53:43.154005
2023-04-15T17:26:53
2023-04-15T17:26:53
78,441,425
0
0
null
2023-03-28T20:52:35
2017-01-09T15:27:29
JavaScript
UTF-8
Java
false
false
385
java
package com.appdeveloperblog.ws.clients.sociallogin.socialloginwebclient; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class SocialLoginWebClientApplication { public static void main(String[] args) { SpringApplication.run(SocialLoginWebClientApplication.class, args); } }
[ "a.juncevich@gmail.com" ]
a.juncevich@gmail.com
cfa1bfb2cde6a4d3032f3943c63608078c39ef0b
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/9/9_6a39003fe809cb1c5857979a9f3717db2763ae89/GraphElementTreeNode/9_6a39003fe809cb1c5857979a9f3717db2763ae89_GraphElementTreeNode_t.java
6c672e126a0a2593c8ba6a794b35fce82efb80e0
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,595
java
/* * JGraLab - The Java Graph Laboratory * * Copyright (C) 2006-2012 Institute for Software Technology * University of Koblenz-Landau, Germany * ist@uni-koblenz.de * * For bug reports, documentation and further information, visit * * https://github.com/jgralab/jgralab * * 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>. * * Additional permission under GNU GPL version 3 section 7 * * If you modify this Program, or any covered work, by linking or combining * it with Eclipse (or a modified version of that program or an Eclipse * plugin), containing parts covered by the terms of the Eclipse Public * License (EPL), the licensors of this Program grant you additional * permission to convey the resulting work. Corresponding Source for a * non-source form of such a combination shall include the source code for * the parts of JGraLab used as well as that of the covered work. */ package de.uni_koblenz.jgralab.utilities.tgtree; import java.util.ArrayList; import java.util.Collections; import java.util.Enumeration; import javax.swing.tree.TreeNode; import de.uni_koblenz.jgralab.GraphElement; import de.uni_koblenz.jgralab.schema.Attribute; abstract class GraphElementTreeNode implements TreeNode { protected ArrayList<GraphElementTreeNode> incs; protected GraphElementTreeNode parent; protected abstract void init(); protected abstract GraphElement<?, ?> get(); protected GraphElementTreeNode(GraphElementTreeNode parent) { this.parent = parent; } @Override public Enumeration<GraphElementTreeNode> children() { init(); return Collections.enumeration(incs); } @Override public boolean getAllowsChildren() { init(); return false; } @Override public TreeNode getChildAt(int childIndex) { init(); return incs.get(childIndex); } @Override public int getChildCount() { init(); return incs.size(); } @Override public int getIndex(TreeNode node) { init(); return incs.indexOf(node); } @Override public TreeNode getParent() { return parent; } @Override public boolean isLeaf() { init(); return incs.isEmpty(); } public abstract String getToolTipText(); public abstract String getClipboardText(); private static String escapeHTML(Object o) { if (o == null) { return "null"; } String s = o.toString(); s = s.replace("<", "&lt;"); s = s.replace(">", "&gt;"); return s; } public String getAttributeString() { if (get().getAttributedElementClass().getAttributeList().isEmpty()) { return "$noAttrs$"; } StringBuilder sb = new StringBuilder(); for (Attribute attr : get().getAttributedElementClass() .getAttributeList()) { sb.append(attr.getName()); sb.append(" = "); sb.append(escapeHTML(get().getAttribute(attr.getName()))); sb.append("<br>"); } return sb.toString(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
ed88e77519357abdac37501dfb44a30ba1bcba83
b9d20d5f7bb3418e1a6536250e1941d2afb1142c
/BD1807_day01/src/com/cn/test/QuickSort02.java
4144bb64f41ae612e2fedb16419bbf86317bfa33
[]
no_license
chenjian-520/hadoop2.7-base
d08edbe00d038de494a73e838661dcb6000a5492
7940bb06815e4ae8c2700e5fa29a65e204406ff1
refs/heads/master
2020-05-25T04:07:14.746202
2019-05-20T11:02:45
2019-05-20T11:02:45
187,619,548
2
0
null
null
null
null
UTF-8
Java
false
false
646
java
package com.cn.test; public class QuickSort02 { public static void main(String[] args) { // TODO Auto-generated method stub } public static int getIndex(int[] arr,int left,int right){ int key=arr[left]; while(left<right){ while(arr[right]>=key&&left<right){ right--; } arr[left]=arr[right]; while(arr[left]<=key&&left<right){ left++; } arr[right]=arr[left]; } arr[left] = key; return left; } public static void quick(int[] arr,int left,int right){ if(left>=right){ return; } int index = getIndex(arr, left, right); quick(arr, left, index-1); quick(arr, index+1, right); } }
[ "563732435@qq.com" ]
563732435@qq.com
cdcbb48c90015ecc607eca5ffa6122355224ab54
9fe800087ef8cc6e5b17fa00f944993b12696639
/batik-bridge/src/main/java/org/apache/batik/bridge/TextSpanLayout.java
b7d6ae9bb260ede44a5c32fcc9cb94a698647b9a
[ "Apache-2.0" ]
permissive
balabit-deps/balabit-os-7-batik
14b80a316321cbd2bc29b79a1754cc4099ce10a2
652608f9d210de2d918d6fb2146b84c0cc771842
refs/heads/master
2023-08-09T03:24:18.809678
2023-05-22T20:34:34
2023-05-27T08:21:21
158,242,898
0
0
Apache-2.0
2023-07-20T04:18:04
2018-11-19T15:03:51
Java
UTF-8
Java
false
false
7,711
java
/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.apache.batik.bridge; import java.awt.Graphics2D; import java.awt.Shape; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; import org.apache.batik.gvt.font.GVTGlyphMetrics; import org.apache.batik.gvt.font.GVTGlyphVector; import org.apache.batik.gvt.font.GVTLineMetrics; /** * Class that performs layout of attributed text strings into * glyph sets paintable by TextPainter instances. * Similar to java.awt.font.TextLayout in function and purpose. * Note that while this utility interface is provided for the convenience of * <code>TextPainter</code> implementations, conforming <code>TextPainter</code>s * are not required to use this class. * @see java.awt.font.TextLayout * @see org.apache.batik.bridge.TextPainter * * @author <a href="mailto:bill.haneman@ireland.sun.com">Bill Haneman</a> * @version $Id: TextSpanLayout.java 1808001 2017-09-11 09:51:29Z ssteiner $ */ public interface TextSpanLayout { int DECORATION_UNDERLINE = 0x1; int DECORATION_STRIKETHROUGH = 0x2; int DECORATION_OVERLINE = 0x4; int DECORATION_ALL = DECORATION_UNDERLINE | DECORATION_OVERLINE | DECORATION_STRIKETHROUGH; /** * Paints the specified text layout using the * specified Graphics2D and rendering context. * @param g2d the Graphics2D to use */ void draw(Graphics2D g2d); /** * Returns the outline of the specified decorations on the glyphs, * transformed by an AffineTransform. * @param decorationType an integer indicating the type(s) of decorations * included in this shape. May be the result of "OR-ing" several * values together: * e.g. <code>DECORATION_UNDERLINE | DECORATION_STRIKETHROUGH</code> */ Shape getDecorationOutline(int decorationType); /** * Returns the rectangular bounds of the completed glyph layout. * This includes stroking information, this does not include * deocrations. */ Rectangle2D getBounds2D(); /** * Returns the bounds of the geometry (this is always the bounds * of the outline). */ Rectangle2D getGeometricBounds(); /** * Returns the outline of the completed glyph layout, transformed * by an AffineTransform. */ Shape getOutline(); /** * Returns the current text position at the completion * of glyph layout. * (This is the position that should be used for positioning * adjacent layouts.) */ Point2D getAdvance2D(); /** * Returns the advance between each glyph in text progression direction. */ float [] getGlyphAdvances(); /** * Returns the Metrics for a particular glyph. */ GVTGlyphMetrics getGlyphMetrics(int glyphIndex); /** * Returns the Line metrics for this text span. */ GVTLineMetrics getLineMetrics(); Point2D getTextPathAdvance(); /** * Returns the current text position at the completion beginning * of glyph layout, before the application of explicit * glyph positioning attributes. */ Point2D getOffset(); /** * Sets the scaling factor to use for string. if ajdSpacing is * true then only the spacing between glyphs will be adjusted * otherwise the glyphs and the spaces between them will be * adjusted. * @param xScale Scale factor to apply in X direction. * @param yScale Scale factor to apply in Y direction. * @param adjSpacing True if only spaces should be adjusted. */ void setScale(float xScale, float yScale, boolean adjSpacing); /** * Sets the text position used for the implicit origin * of glyph layout. Ignored if multiple explicit glyph * positioning attributes are present in ACI * (e.g. if the aci has multiple X or Y values). */ void setOffset(Point2D offset); /** * Returns a Shape which encloses the currently selected glyphs * as specified by glyph indices <code>begin</code> and <code>end</code>. * @param beginCharIndex the index of the first glyph in the contiguous * selection. * @param endCharIndex the index of the last glyph in the contiguous * selection. */ Shape getHighlightShape(int beginCharIndex, int endCharIndex); /** * Perform hit testing for coordinate at x, y. * @return a TextHit object encapsulating the character index for * successful hits and whether the hit is on the character * leading edge. * @param x the x coordinate of the point to be tested. * @param y the y coordinate of the point to be tested. */ TextHit hitTestChar(float x, float y); /** * Returns true if the advance direction of this text is vertical. */ boolean isVertical(); /** * Returns true if this layout in on a text path. */ boolean isOnATextPath(); /** * Returns the number of glyphs in this layout. */ int getGlyphCount(); /** * Returns the number of chars represented by the glyphs within the * specified range. * @param startGlyphIndex The index of the first glyph in the range. * @param endGlyphIndex The index of the last glyph in the range. * @return The number of chars. */ int getCharacterCount(int startGlyphIndex, int endGlyphIndex); /** * Returns the glyph index of the glyph that has the specified char index. * * @param charIndex The original index of the character in the text node's * text string. * @return The index of the matching glyph in this layout's glyph vector, * or -1 if a matching glyph could not be found. */ int getGlyphIndex(int charIndex); /** * Returns true if the text direction in this layout is from left to right. */ boolean isLeftToRight(); /** * Return true is the character index is represented by glyphs * in this layout. * * @param index index of the character in the ACI. * @return true if the layout represents that character. */ boolean hasCharacterIndex(int index); /** * Return the glyph vector asociated to this layout. * * @return glyph vector */ GVTGlyphVector getGlyphVector(); /** * Return the rotation angle applied to the * character. * * @param index index of the character in the ACI * @return rotation angle */ double getComputedOrientationAngle(int index); /** * Return true if this text run represents * an alt glyph. */ boolean isAltGlyph(); /** * Return true if this text has been reversed. */ boolean isReversed(); /** * Reverse (and optionally mirror) glyphs if not * already reversed. */ void maybeReverse(boolean mirror); }
[ "testbot@balabit.com" ]
testbot@balabit.com
22725c8077a3a6c0473fcfc761caa07ef48ee6d7
1f529e3ea6e6204c14fc118ef47e37235d50bab7
/example/joda-time/mutants/AOIS_170/org/joda/time/field/FieldUtils.java
a65e380553aad568edfbeffa8c317c4b7a9705ae
[]
no_license
leofernandesmo/safira-impact-analysis
9405730b581feff4a3ae5c2b31d5a320cb6e489c
daa577d267ed54822658f22dfc51291a69d5c450
refs/heads/master
2020-04-24T12:00:32.976812
2019-03-12T19:50:35
2019-03-12T19:50:35
171,943,672
0
0
null
null
null
null
UTF-8
Java
false
false
6,581
java
// This is a mutant program. // Author : ysma package org.joda.time.field; import java.math.BigDecimal; import java.math.RoundingMode; import org.joda.time.DateTimeField; import org.joda.time.DateTimeFieldType; import org.joda.time.IllegalFieldValueException; /** @ContextInfo( MutationOperatorGroup=AOIS Before=val2 After=val2-- MutatedLine=-1 AstContext=null )*/ public class FieldUtils { private FieldUtils() { super(); } public static int safeNegate( int value ) { if (value == Integer.MIN_VALUE) { throw new java.lang.ArithmeticException( "Integer.MIN_VALUE cannot be negated" ); } return -value; } public static int safeAdd( int val1, int val2 ) { int sum = val1 + val2; if ((val1 ^ sum) < 0 && (val1 ^ val2) >= 0) { throw new java.lang.ArithmeticException( "The calculation caused an overflow: " + val1 + " + " + val2 ); } return sum; } public static long safeAdd( long val1, long val2 ) { long sum = val1 + val2; if ((val1 ^ sum) < 0 && (val1 ^ val2) >= 0) { throw new java.lang.ArithmeticException( "The calculation caused an overflow: " + val1 + " + " + val2 ); } return sum; } public static long safeSubtract( long val1, long val2 ) { long diff = val1 - val2; if ((val1 ^ diff) < 0 && (val1 ^ val2) < 0) { throw new java.lang.ArithmeticException( "The calculation caused an overflow: " + val1 + " - " + val2 ); } return diff; } public static int safeMultiply( int val1, int val2 ) { long total = (long) val1 * (long) val2; if (total < Integer.MIN_VALUE || total > Integer.MAX_VALUE) { throw new java.lang.ArithmeticException( "Multiplication overflows an int: " + val1 + " * " + val2 ); } return (int) total; } public static long safeMultiply( long val1, int val2 ) { switch (val2) { case -1 : if (val1 == Long.MIN_VALUE) { throw new java.lang.ArithmeticException( "Multiplication overflows a long: " + val1 + " * " + val2 ); } return -val1; case 0 : return 0L; case 1 : return val1; } long total = val1 * val2; if (total / val2-- != val1) { throw new java.lang.ArithmeticException( "Multiplication overflows a long: " + val1 + " * " + val2 ); } return total; } public static long safeMultiply( long val1, long val2 ) { if (val2 == 1) { return val1; } if (val1 == 1) { return val2; } if (val1 == 0 || val2 == 0) { return 0; } long total = val1 * val2; if (total / val2 != val1 || val1 == Long.MIN_VALUE && val2 == -1 || val2 == Long.MIN_VALUE && val1 == -1) { throw new java.lang.ArithmeticException( "Multiplication overflows a long: " + val1 + " * " + val2 ); } return total; } public static long safeDivide( long dividend, long divisor ) { if (dividend == Long.MIN_VALUE && divisor == -1L) { throw new java.lang.ArithmeticException( "Multiplication overflows a long: " + dividend + " / " + divisor ); } return dividend / divisor; } public static long safeDivide( long dividend, long divisor, java.math.RoundingMode roundingMode ) { if (dividend == Long.MIN_VALUE && divisor == -1L) { throw new java.lang.ArithmeticException( "Multiplication overflows a long: " + dividend + " / " + divisor ); } java.math.BigDecimal dividendBigDecimal = new java.math.BigDecimal( dividend ); java.math.BigDecimal divisorBigDecimal = new java.math.BigDecimal( divisor ); return dividendBigDecimal.divide( divisorBigDecimal, roundingMode ).longValue(); } public static int safeToInt( long value ) { if (Integer.MIN_VALUE <= value && value <= Integer.MAX_VALUE) { return (int) value; } throw new java.lang.ArithmeticException( "Value cannot fit in an int: " + value ); } public static int safeMultiplyToInt( long val1, long val2 ) { long val = FieldUtils.safeMultiply( val1, val2 ); return FieldUtils.safeToInt( val ); } public static void verifyValueBounds( org.joda.time.DateTimeField field, int value, int lowerBound, int upperBound ) { if (value < lowerBound || value > upperBound) { throw new org.joda.time.IllegalFieldValueException( field.getType(), Integer.valueOf( value ), Integer.valueOf( lowerBound ), Integer.valueOf( upperBound ) ); } } public static void verifyValueBounds( org.joda.time.DateTimeFieldType fieldType, int value, int lowerBound, int upperBound ) { if (value < lowerBound || value > upperBound) { throw new org.joda.time.IllegalFieldValueException( fieldType, Integer.valueOf( value ), Integer.valueOf( lowerBound ), Integer.valueOf( upperBound ) ); } } public static void verifyValueBounds( java.lang.String fieldName, int value, int lowerBound, int upperBound ) { if (value < lowerBound || value > upperBound) { throw new org.joda.time.IllegalFieldValueException( fieldName, Integer.valueOf( value ), Integer.valueOf( lowerBound ), Integer.valueOf( upperBound ) ); } } public static int getWrappedValue( int currentValue, int wrapValue, int minValue, int maxValue ) { return getWrappedValue( currentValue + wrapValue, minValue, maxValue ); } public static int getWrappedValue( int value, int minValue, int maxValue ) { if (minValue >= maxValue) { throw new java.lang.IllegalArgumentException( "MIN > MAX" ); } int wrapRange = maxValue - minValue + 1; value -= minValue; if (value >= 0) { return value % wrapRange + minValue; } int remByRange = -value % wrapRange; if (remByRange == 0) { return 0 + minValue; } return wrapRange - remByRange + minValue; } public static boolean equals( java.lang.Object object1, java.lang.Object object2 ) { if (object1 == object2) { return true; } if (object1 == null || object2 == null) { return false; } return object1.equals( object2 ); } }
[ "leofernandesmo@gmail.com" ]
leofernandesmo@gmail.com
091324a7c616ef4204117416437d0c5bd8c32b2d
db824b5305c81e53e2df99b733c68baaeaf727cb
/dd_adserver/src/com/kokmobi/server/bean/AdPluginInfo.java
9d53a1b219c8c70c6c9a17d3348a2e07c0ff1d8c
[]
no_license
luotianwen/pgy
bd86d8c52ad7632d482017d55293c167d32e39fa
b90cf94deea005f55300fa19bedff766ce9fcbef
refs/heads/master
2021-01-23T23:13:53.332427
2017-09-09T14:41:06
2017-09-09T14:41:06
102,959,923
0
1
null
null
null
null
UTF-8
Java
false
false
1,024
java
package com.kokmobi.server.bean; public class AdPluginInfo { private int versions; private int apkid; private String packagename; private int isoutdownload; private String attachmentPath; private String wwwurl; public int getVersions() { return versions; } public void setVersions(int versions) { this.versions = versions; } public int getApkid() { return apkid; } public void setApkid(int apkid) { this.apkid = apkid; } public String getPackagename() { return packagename; } public void setPackagename(String packagename) { this.packagename = packagename; } public int getIsoutdownload() { return isoutdownload; } public void setIsoutdownload(int isoutdownload) { this.isoutdownload = isoutdownload; } public String getAttachmentPath() { return attachmentPath; } public void setAttachmentPath(String attachmentPath) { this.attachmentPath = attachmentPath; } public String getWwwurl() { return wwwurl; } public void setWwwurl(String wwwurl) { this.wwwurl = wwwurl; } }
[ "tw l" ]
tw l
63e7b3f48c4f77b655238746a6a858247978e157
ed4134e24f04da20fd3fb0c71885b2057e87355c
/modules/_deprecated/org/molgenis/util/CsvStringReader.java
68dd35bb78f5d4ef2da1a828f9c585802fab072a
[]
no_license
paraiko/molgenis_apps-legacy
9ac28bedd26ad984684587d9a7bcf65f2e4f15e0
4ce3b74363754997685fc68a89c122345ea421d3
refs/heads/master
2021-05-23T05:29:44.733744
2019-03-12T15:35:26
2019-03-12T15:35:26
4,698,718
0
1
null
2013-04-29T20:40:38
2012-06-18T08:23:32
Java
UTF-8
Java
false
false
1,269
java
package org.molgenis.util; import java.io.BufferedReader; import java.io.IOException; import java.io.StringReader; import java.util.zip.DataFormatException; /** * CSV reader for <a href="http://tools.ietf.org/html/rfc4180">comma-separated * value Strings</a> * * @see org.molgenis.util.CsvReader#parse */ @Deprecated public class CsvStringReader extends CsvBufferedReaderMultiline { /** Input comma-separated value String */ private String csvString; /** * Construct the CsvReader for a String. * * @param csvString * @throws DataFormatException * @throws IOException */ public CsvStringReader(String csvString) throws IOException { this(csvString, true); } /** * Construct the CsvReader for a String. * * @param csvString * @throws DataFormatException * @throws IOException */ public CsvStringReader(String csvString, boolean hasHeader) throws IOException { super(); if (csvString == null) throw new IllegalArgumentException("csvString is null"); this.csvString = csvString; this.hasHeader = hasHeader; this.reset(); } @Override public void reset() throws IOException { if (this.reader != null) this.reader.close(); this.reader = new BufferedReader(new StringReader(csvString)); super.reset(); } }
[ "d.hendriksen@umcg.nl" ]
d.hendriksen@umcg.nl
cab212c2f9c9170336abc22ee5990e99a66192ef
765c8ae871b65da04396d4a3f8b856a11eedeb11
/Testing/src/main/java/org/lobobrowser/cobra_testing/ParseAnchorsTest.java
d5fa2f8c101565c9de9e49c9fe0c154f4ab226f7
[]
no_license
sridhar-newsdistill/Loboevolution
5ef7d36aae95707e1ab76d7bf1ce872ddd6f6355
a93de9bea470e3996a4afb2f73d9be77037644b6
refs/heads/master
2020-06-13T12:26:03.979017
2016-11-26T16:58:29
2016-11-26T16:58:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,929
java
/* GNU GENERAL LICENSE Copyright (C) 2006 The Lobo Project. Copyright (C) 2014 - 2016 Lobo Evolution 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 verion 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 License for more details. You should have received a copy of the GNU General Public along with this program. If not, see <http://www.gnu.org/licenses/>. Contact info: lobochief@users.sourceforge.net; ivan.difrancesco@yahoo.it */ package org.lobobrowser.cobra_testing; import java.io.InputStream; import java.io.InputStreamReader; import java.io.Reader; import java.net.URL; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathFactory; import org.lobobrowser.html.parser.HtmlParser; import org.lobobrowser.html.test.SimpleUserAgentContext; import org.lobobrowser.http.UserAgentContext; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; /** * The Class ParseAnchorsTest. */ public class ParseAnchorsTest { /** The Constant TEST_URI. */ private static final String TEST_URI = "http://sourceforge.net/projects/loboevolution/"; public static void main(String[] args) throws Exception { LogManager.getLogger("org.lobobrowser"); UserAgentContext uacontext = new SimpleUserAgentContext(); // In this case we will use a standard XML document // as opposed to Cobra's HTML DOM implementation. DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); URL url = new URL(TEST_URI); InputStream in = url.openConnection().getInputStream(); try { Reader reader = new InputStreamReader(in, "UTF-8"); Document document = builder.newDocument(); // Here is where we use Cobra's HTML parser. HtmlParser parser = new HtmlParser(uacontext, document); parser.parse(reader); // Now we use XPath to locate "a" elements that are // descendents of any "html" element. XPath xpath = XPathFactory.newInstance().newXPath(); NodeList nodeList = (NodeList) xpath.evaluate("html//a", document, XPathConstants.NODESET); int length = nodeList.getLength(); for (int i = 0; i < length; i++) { Element element = (Element) nodeList.item(i); System.out.println("## Anchor # " + (i + 1) + ": " + element.getAttribute("href")); } } finally { in.close(); } } }
[ "ivan.difrancesco@yahoo.it" ]
ivan.difrancesco@yahoo.it
33b9f6a2e54cd15a3ff3f4a5297decf0609086d9
ecd31d3d2416c9421286967a53df30ccc3b10616
/BoShi/src/com/boshi/db/datamodel/news/JuniorCollegeInviteNews.java
5b95f39789a74a1726be0dfbc265488726de97af
[]
no_license
squarlhan/ccstssh
439f26b63628365b05c743f064c329231a1dd4d3
94daf2fdf79ee5f9e4560ffbb0fbc3c745bbab2e
refs/heads/master
2020-05-18T03:27:11.499850
2017-05-10T07:14:34
2017-05-10T07:14:34
34,333,232
0
0
null
null
null
null
UTF-8
Java
false
false
739
java
package com.boshi.db.datamodel.news; import javax.persistence.*; import java.io.Serializable; @NamedQueries( { @NamedQuery(name = "JuniorCollegeInviteNews.ListAll", query = "select DISTINCT t from JuniorCollegeInviteNews t order by t.date DESC"), @NamedQuery(name = "JuniorCollegeInviteNews.Amount", query = "select COUNT(DISTINCT t) from JuniorCollegeInviteNews t") }) @Entity @Table(name = "JuniorCollegeInviteNews") public class JuniorCollegeInviteNews extends ContentOfNews implements Serializable { // 大专招聘新闻 private static final long serialVersionUID = 1L; public JuniorCollegeInviteNews(String title, String content) { super(title, content); } public JuniorCollegeInviteNews() { } }
[ "squarlhan@52547bf6-66a5-11de-b8ef-473237edd27e" ]
squarlhan@52547bf6-66a5-11de-b8ef-473237edd27e
3ba2112fe99bdd17062c9b809470af4e2d5cd0fe
41b5626593f86fe60035fdaae236edf2c9352926
/roncoo-education-system/roncoo-education-system-service/src/main/java/com/roncoo/education/system/service/api/pc/biz/PcApiSysMenuRoleBiz.java
e5b3852294bff1b07b4ed366fc8169d347654e5d
[ "MIT" ]
permissive
chenhaoaixuexi/cloudCourse
5b662a822108efa70606c06e590870a9aa6dbbe7
eafac97da0a08d7a3245aef2a248778d963c1997
refs/heads/master
2023-04-06T11:30:58.368217
2020-04-08T05:10:53
2020-04-08T05:10:53
253,463,242
0
0
MIT
2023-03-27T22:19:49
2020-04-06T10:22:05
Java
UTF-8
Java
false
false
2,180
java
package com.roncoo.education.system.service.api.pc.biz; import java.util.ArrayList; import java.util.List; import org.apache.commons.collections.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; import com.roncoo.education.system.common.req.SysMenuRoleListREQ; import com.roncoo.education.system.common.req.SysMenuRoleSaveREQ; import com.roncoo.education.system.common.resq.SysMenuRoleListRESQ; import com.roncoo.education.system.service.dao.SysMenuDao; import com.roncoo.education.system.service.dao.SysMenuRoleDao; import com.roncoo.education.system.service.dao.impl.mapper.entity.SysMenuRole; import com.roncoo.education.util.base.Result; /** * 菜单角色关联表 * * @author wujing */ @Component public class PcApiSysMenuRoleBiz { @Autowired private SysMenuRoleDao dao; @Autowired private SysMenuDao sysMenuDao; /** * 列出菜单角色关联信息接口 * * @param req * @return */ public Result<SysMenuRoleListRESQ> list(SysMenuRoleListREQ req) { if (req.getRoleId() == null) { return Result.error("角色ID不能为空"); } SysMenuRoleListRESQ resq = new SysMenuRoleListRESQ(); List<SysMenuRole> list = dao.listByRoleId(req.getRoleId()); List<String> roleIdList = new ArrayList<>(); if (CollectionUtils.isNotEmpty(list)) { for (SysMenuRole sysMenuRole : list) { roleIdList.add(String.valueOf(sysMenuRole.getMenuId())); } resq.setList(roleIdList); } return Result.success(resq); } @Transactional public Result<Integer> save(SysMenuRoleSaveREQ req) { if (req.getRoleId() == null) { return Result.error("角色ID不能为空"); } if (CollectionUtils.isNotEmpty(req.getMenuId())) { // 先删除角色下所有的关联菜单 dao.deleteByRoleId(req.getRoleId()); for (Long menuId : req.getMenuId()) { SysMenuRole entity = new SysMenuRole(); entity.setMenuId(menuId); entity.setRoleId(req.getRoleId()); dao.save(entity); } } return Result.success(1); } }
[ "chen@LAPTOP-0BE253LS.localdomain" ]
chen@LAPTOP-0BE253LS.localdomain
1a435b2581b08de45ceaefc2b7afcb8cc6258c8d
28f170ff98716c35be39110c13b2d2eb974c1330
/src/com/jm3005/learn/spring/mvc/validation/ModelNumber.java
e22b26b96b8c07d2993b4393e5ac3d72ecf07cdb
[]
no_license
WeInnovate/JM3005
e097e65ed189237ce69ec374c293ed3024bb6669
7d7c98c46bb57914b31e5d9de75ab75b71457b60
refs/heads/master
2021-08-16T11:49:06.171053
2018-07-28T07:12:24
2018-07-28T07:12:24
131,672,874
1
0
null
null
null
null
UTF-8
Java
false
false
616
java
package com.jm3005.learn.spring.mvc.validation; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Retention; import java.lang.annotation.Target; import javax.validation.Constraint; import javax.validation.Payload; @Constraint(validatedBy = ModelNumberValidator.class) @Retention(RUNTIME) @Target(FIELD) public @interface ModelNumber { String value() default "MOD"; String message() default " prefix should be MOD"; public Class<?>[] groups() default {}; public Class<? extends Payload>[] payload() default {}; }
[ "er.dwivediatul@gmail.com" ]
er.dwivediatul@gmail.com
29050ed688099f60695979e386111a4ee8b25d99
374af48da0033b847b6f73fbbfccab52888e1667
/rio-core/rio-api/src/main/java/org/rioproject/associations/Association.java
15c52d39e3110684649a6ad9c6544956299a5be7
[ "Apache-2.0" ]
permissive
pfirmstone/Rio
7883fc7e40da7e4e54c78ed784530ee3cf659e6f
66dba3be4ad79326508c7a0e9c8d0990609fba2e
refs/heads/master
2023-06-21T19:00:39.479548
2019-09-18T22:11:46
2019-09-18T22:11:46
164,203,730
0
0
Apache-2.0
2023-04-20T04:21:35
2019-01-05T10:14:28
Java
UTF-8
Java
false
false
7,485
java
/* * Copyright to the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.rioproject.associations; import net.jini.core.lookup.ServiceItem; import java.util.Collection; import java.util.concurrent.Future; /** * Associations provide a mechanism to model and enforce uses and requires * associations between services in an * {@link org.rioproject.opstring.OperationalString}. Associations take 5 forms: * <ul> * <li><b><u>Uses </u> </b> <br> * A weak association relationship where if A uses B exists then, then B may be * present for A * <li><b><u>Requires </u> </b> <br> * A stronger association relationship where if A requires B exists then B must * be present for A * <li><b><u>Colocated</u> </b> <br> * An association which requires that A be colocated with B in the same * JVM. If B does not exist, or cannot be located, A shall not be created * without B * <li><b><u>Opposed</u> </b> <br> * An association which requires that A exist in a different JVM then B. * <li><b><u>Isolated</u> </b> <br> * An association which requires that A exist in a different machine then B. * </ul> * <p> * Associations are optional and may be declared as part of a service's * OperationalString declaration. An example :<br> * <div style="margin-left: 40px;"> <span style="font-family: * monospace;">associations {<br> * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; association * name:"JavaSpace", type:'requires', property:"space"<br> * &nbsp;&nbsp;&nbsp; }<br> * } * </div> * * @author Dennis Reedy */ public interface Association<T> extends Iterable<T> { /** * Association State enums indicate the following: * <ul> * <li>PENDING: Indicates that an associated service has not been discovered * <li>DISCOVERED: Indicates that an associated service has been discovered * <li>CHANGED: Indicates that an associated service has changed, that is an * end-point has changed, and the association now points a different service * <li>BROKEN: Indicates that the association is broken * </ul> */ public enum State { PENDING, DISCOVERED, CHANGED, BROKEN } /** * Get the AssociationType * * @return The AssociationType */ AssociationType getAssociationType(); /** * Set the Association state * * @param state The Association state */ void setState(State state); /** * Get the Association state * * @return The Association state */ State getState(); /** * Get the associated service's name * * @return The associated service's name */ String getName(); /** * Get the associated service's OperationalString name * * @return The associated service's OperationalString name */ String getOperationalStringName(); /** * Get the AssociationDescriptor * * @return The {@link AssociationDescriptor} used to * create this Association */ AssociationDescriptor getAssociationDescriptor(); /** * Get the number of associated services * * @return The number of associated services */ int getServiceCount(); /** * Get the first service Object that can be used to communicate to the * associated service. * * @return The first service (proxy) Object in the collection of associated * services. If there are no services a null will be returned. */ T getService(); /** * Get a future representing pending service association. * * @return a Future representing pending service association. A new Future * is created each time. * * @see AssociationProxy * @see ServiceSelectionStrategy */ Future<T> getServiceFuture(); /** * Get all Objects that can be used to communicate to all known associated * services. * * @return Array of service Object instances that can be used to * communicate to all known associated service instances. A new collection * is allocated each time. If there are no services, an empty collection * will be returned */ Collection<T> getServices(); /** * Get the ServiceItem for the service thats first in the List of services. * * @return The ServiceItem for an associated service. If there are no * services, a null will be returned */ ServiceItem getServiceItem(); /** * Get the ServiceItem for the associated service. The collection of * associated services will be searched and if the service proxy is equal * to a known associated service proxy, the * {@link net.jini.core.lookup.ServiceID} for that service will be returned * * @param service The proxy of an associated service * * @return The ServiceItem for an associated service. If the service is * unknown, a null will be returned */ ServiceItem getServiceItem(T service); /** * Get ServiceItem instances for all known associated service instances. * * @return Array of ServiceItem instances for all known associated * service instances. A new array is allocated each time. If there are no * services, an empty array will be returned */ ServiceItem[] getServiceItems(); /** * Get the next ServiceItem in the collection of associated services. * * @return The next ServiceItem in the collection of associated services. * If there are services, a null will be returned. If the current * ServiceItem is the last in the collection, the first ServiceItem in the * collection will be returned */ ServiceItem getNextServiceItem(); /** * Add a service to the Association * * @param item The ServiceItem for the service to add * @return True if added, false if the ServiceItem already exists */ boolean addServiceItem(ServiceItem item); /** * Remove a service from the Association * * @param service The proxy for the Service to remove * @return The ServiceItem of the removed service */ ServiceItem removeService(T service); /** * Register an {@link AssociationServiceListener} for notification. * * @param al The AssociationServiceListener. If the AssociationServiceListener * is not null and not already registered it will be added to the collection of * AssociationServiceListeners */ void registerAssociationServiceListener(AssociationServiceListener<T> al); /** * Remove a {@link AssociationServiceListener} for notification. * * @param al The AssociationServiceListener. If the AssociationServiceListener * is not null and registered, it will be removed from the collection of * AssociationServiceListeners */ void removeAssociationServiceListener(AssociationServiceListener<T> al); void terminate(); }
[ "dennis.reedy@gmail.com" ]
dennis.reedy@gmail.com
1476ba816d16863acb3ae090f488360f96cf64f4
603031481abadd73826099e8b0e915d9c976b4f8
/as2-lib/src/main/java/com/helger/as2lib/crypto/ECryptoAlgorithmSign.java
9d0058543423408bc4fdd21bb33dcd69971aecd0
[]
no_license
niranjanghule/as2-lib
bae0d20fc1811a30f0a25551b4d77d37fa8bb013
ed5bba272b86531a134c8dde51575e993b176166
refs/heads/master
2023-08-18T03:08:21.200987
2021-09-24T17:08:29
2021-09-24T17:08:29
410,042,613
0
0
null
2021-09-24T17:07:47
2021-09-24T17:07:47
null
UTF-8
Java
false
false
6,946
java
/** * The FreeBSD Copyright * Copyright 1994-2008 The FreeBSD Project. All rights reserved. * Copyright (C) 2013-2021 Philip Helger philip[at]helger[dot]com * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE FREEBSD PROJECT ``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 FREEBSD PROJECT 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. * * The views and conclusions contained in the software and documentation * are those of the authors and should not be interpreted as representing * official policies, either expressed or implied, of the FreeBSD Project. */ package com.helger.as2lib.crypto; import javax.annotation.Nonnull; import javax.annotation.Nullable; import org.bouncycastle.asn1.ASN1ObjectIdentifier; import org.bouncycastle.asn1.nist.NISTObjectIdentifiers; import org.bouncycastle.asn1.oiw.OIWObjectIdentifiers; import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers; import com.helger.commons.annotation.DevelopersNote; import com.helger.commons.annotation.Nonempty; import com.helger.commons.lang.EnumHelper; /** * This enum contains all signing supported crypto algorithms. The algorithms * contained in here may not be used for encryption of anything. See * {@link ECryptoAlgorithmCrypt} for encryption algorithms.<br> * Note: Mendelson uses the RFC 5751 identifiers. * * @author Philip Helger */ public enum ECryptoAlgorithmSign implements ICryptoAlgorithm { /** See compatibility note in RFC 5751, section 3.4.3.1 */ @Deprecated @DevelopersNote ("Use DIGEST_MD5 instead") DIGEST_RSA_MD5("rsa-md5", PKCSObjectIdentifiers.md5, "MD5WITHRSA"), /** See compatibility note in RFC 5751, section 3.4.3.1 */ @Deprecated @DevelopersNote ("Use DIGEST_SHA1 or DIGEST_SHA_1 instead") DIGEST_RSA_SHA1("rsa-sha1", OIWObjectIdentifiers.idSHA1, "SHA1WITHRSA"), /** Same for RFC 3851 and RFC 5751 */ DIGEST_MD5 ("md5", PKCSObjectIdentifiers.md5, "MD5WITHRSA"), /** * Old version as of RFC 3851. */ @DevelopersNote ("Use DIGEST_SHA_1 instead") DIGEST_SHA1("sha1", OIWObjectIdentifiers.idSHA1, "SHA1WITHRSA"), /** * Old version as of RFC 3851. */ @DevelopersNote ("Use DIGEST_SHA_256 instead") DIGEST_SHA256("sha256", NISTObjectIdentifiers.id_sha256, "SHA256WITHRSA"), /** * Old version as of RFC 3851. */ @DevelopersNote ("Use DIGEST_SHA_384 instead") DIGEST_SHA384("sha384", NISTObjectIdentifiers.id_sha384, "SHA384WITHRSA"), /** * Old version as of RFC 3851. */ @DevelopersNote ("Use DIGEST_SHA_512 instead") DIGEST_SHA512("sha512", NISTObjectIdentifiers.id_sha512, "SHA512WITHRSA"), /** * New version as of RFC 5751. */ DIGEST_SHA_1 ("sha-1", OIWObjectIdentifiers.idSHA1, "SHA1WITHRSA"), /** * New version as of RFC 5751. */ DIGEST_SHA_224 ("sha-224", NISTObjectIdentifiers.id_sha224, "SHA224WITHRSA"), /** * New version as of RFC 5751. */ DIGEST_SHA_256 ("sha-256", NISTObjectIdentifiers.id_sha256, "SHA256WITHRSA"), /** * New version as of RFC 5751. */ DIGEST_SHA_384 ("sha-384", NISTObjectIdentifiers.id_sha384, "SHA384WITHRSA"), /** * New version as of RFC 5751. */ DIGEST_SHA_512 ("sha-512", NISTObjectIdentifiers.id_sha512, "SHA512WITHRSA"); public static final ECryptoAlgorithmSign DEFAULT_RFC_3851 = DIGEST_SHA1; public static final ECryptoAlgorithmSign DEFAULT_RFC_5751 = DIGEST_SHA_256; private final String m_sID; private final ASN1ObjectIdentifier m_aOID; private final String m_sBCAlgorithmName; private ECryptoAlgorithmSign (@Nonnull @Nonempty final String sID, @Nonnull final ASN1ObjectIdentifier aOID, @Nonnull @Nonempty final String sBCAlgorithmName) { m_sID = sID; m_aOID = aOID; m_sBCAlgorithmName = sBCAlgorithmName; } @Nonnull @Nonempty public String getID () { return m_sID; } @Nonnull public ASN1ObjectIdentifier getOID () { return m_aOID; } /** * @return The algorithm name to be used for BouncyCastle to do the SMIME * packaging. */ @Nonnull @Nonempty public String getSignAlgorithmName () { return m_sBCAlgorithmName; } /** * @return <code>true</code> if this is an algorithm defined by RFC 3851, * <code>false</code> otherwise. Please note that some algorithms are * contained in both algorithm sets! * @since 4.2.0 */ public boolean isRFC3851Algorithm () { return this == DIGEST_RSA_MD5 || this == DIGEST_RSA_SHA1 || this == DIGEST_MD5 || this == DIGEST_SHA1 || this == DIGEST_SHA256 || this == DIGEST_SHA384 || this == DIGEST_SHA512; } /** * @return <code>true</code> if this is an algorithm defined by RFC 5751, * <code>false</code> otherwise. Please note that some algorithms are * contained in both algorithm sets! * @since 4.2.0 */ public boolean isRFC5751Algorithm () { return this == DIGEST_MD5 || this == DIGEST_SHA_1 || this == DIGEST_SHA_256 || this == DIGEST_SHA_384 || this == DIGEST_SHA_512; } @Nullable public static ECryptoAlgorithmSign getFromIDOrNull (@Nullable final String sID) { // Case insensitive for #32 return EnumHelper.getFromIDCaseInsensitiveOrNull (ECryptoAlgorithmSign.class, sID); } @Nonnull public static ECryptoAlgorithmSign getFromIDOrThrow (@Nullable final String sID) { // Case insensitive for #32 return EnumHelper.getFromIDCaseInsensitiveOrThrow (ECryptoAlgorithmSign.class, sID); } @Nullable public static ECryptoAlgorithmSign getFromIDOrDefault (@Nullable final String sID, @Nullable final ECryptoAlgorithmSign eDefault) { // Case insensitive for #32 return EnumHelper.getFromIDCaseInsensitiveOrDefault (ECryptoAlgorithmSign.class, sID, eDefault); } }
[ "philip@helger.com" ]
philip@helger.com
b4037e30db3eb2f8ac13fb4425792221397e3724
4ab11aac2a3b4e8d11902dfcfb967d5742d5ecb9
/common/basic/src/main/java/com/mg/common/pojo/ParamItem.java
3481bdcdfa4c4cd3d535d294235631bc5c2c5403
[]
no_license
MT-GMZ/mg
af72d0d71ce1b6a8100cddc84af4bbaa14efb9e8
020a6796fafa494a6a875689da202835c680f04e
refs/heads/master
2023-01-19T23:56:13.961811
2020-11-29T06:06:21
2020-11-29T06:06:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
535
java
package com.mg.common.pojo; public class ParamItem { private String key; private String value; private Class clType; public String getKey() { return key; } public void setKey(String key) { this.key = key; } public String getValue() { return value; } public void setValue(String value) { this.value = value; } public Class getClType() { return clType; } public void setClType(Class clType) { this.clType = clType; } }
[ "mataoshou@163.com" ]
mataoshou@163.com
3f35b0ccc3b725b16ec3f2dbecc54e65fcca6893
3efa417c5668b2e7d1c377c41d976ed31fd26fdc
/src/br/com/mind5/security/user/model/action/UserVisiNodeUpdate.java
e7b9e013eb845decca24dcd734a7c5a5568daa4d
[]
no_license
grazianiborcai/Agenda_WS
4b2656716cc49a413636933665d6ad8b821394ef
e8815a951f76d498eb3379394a54d2aa1655f779
refs/heads/master
2023-05-24T19:39:22.215816
2023-05-15T15:15:15
2023-05-15T15:15:15
109,902,084
0
0
null
2022-06-29T19:44:56
2017-11-07T23:14:21
Java
UTF-8
Java
false
false
821
java
package br.com.mind5.security.user.model.action; import java.util.List; import br.com.mind5.model.action.ActionVisitorTemplateAction; import br.com.mind5.model.decisionTree.DeciTree; import br.com.mind5.model.decisionTree.DeciTreeOption; import br.com.mind5.security.user.info.UserInfo; import br.com.mind5.security.user.model.decisionTree.UserNodeUpdate; public final class UserVisiNodeUpdate extends ActionVisitorTemplateAction<UserInfo, UserInfo> { public UserVisiNodeUpdate(DeciTreeOption<UserInfo> option) { super(option, UserInfo.class, UserInfo.class); } @Override protected Class<? extends DeciTree<UserInfo>> getTreeClassHook() { return UserNodeUpdate.class; } @Override protected List<UserInfo> toBaseClassHook(List<UserInfo> baseInfos, List<UserInfo> results) { return results; } }
[ "mmaciel@mind5.com" ]
mmaciel@mind5.com
6d5c634e5fdbc5c152b14b0b9321cd1a6f237755
95947d3d4b6445e12a3a3fced250f34821607211
/src/main/java/com/ziggy192/coursesource/crawler/UnicaMainCrawler.java
b456b86f4c1d0edd67410f5543f9d7652516bff1
[]
no_license
ziggy192/course-source
40442ed38a68b978c1b0688727af591d473e3721
74dd211a50e5bcec08129145ec59fbfb505eb740
refs/heads/master
2020-04-02T09:03:07.522516
2018-11-04T15:45:47
2018-11-04T15:45:47
154,273,303
0
0
null
null
null
null
UTF-8
Java
false
false
5,253
java
package com.ziggy192.coursesource.crawler; import com.ziggy192.coursesource.entity.CategoryMapping; import com.ziggy192.coursesource.Constants; import com.ziggy192.coursesource.DummyDatabase; import com.ziggy192.coursesource.dao.CategoryDAO; import com.ziggy192.coursesource.dao.DomainDAO; import com.ziggy192.coursesource.entity.DomainEntity; import com.ziggy192.coursesource.url_holder.CategoryUrlHolder; import com.ziggy192.coursesource.util.ParserUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.xml.namespace.QName; import javax.xml.stream.XMLEventReader; import javax.xml.stream.XMLStreamException; import javax.xml.stream.events.Attribute; import javax.xml.stream.events.StartElement; import javax.xml.stream.events.XMLEvent; import java.util.ArrayList; import java.util.List; public class UnicaMainCrawler implements Runnable { public static Logger logger = LoggerFactory.getLogger(UnicaMainCrawler.class.toString()); public static int domainId; public static void main(String[] args) { DummyDatabase.applicaionInit(); Thread unicaMainCrawler = new Thread(new UnicaMainCrawler()); BaseThread.getInstance().getExecutor().execute(unicaMainCrawler); } public List<CategoryUrlHolder> getCategories() { List<CategoryUrlHolder> categories = new ArrayList<>(); String uri = Constants.UNICA_DOMAIN; String beginSign = "col-lg-3 col-md-3 col-sm-4 cate-md"; String endSign = "col-lg-5 col-md-5 col-sm-4 cate-sm"; String htmlContent = ParserUtils.parseHTML(uri, beginSign, endSign); String newContent = ParserUtils.addMissingTag(htmlContent); // System.out.println(newContent);; logger.info(newContent); try { XMLEventReader staxReader = ParserUtils.getStaxReader(newContent); boolean insideMainMenu = false; while (staxReader.hasNext()) { XMLEvent event = staxReader.nextEvent(); if (event.isStartElement()) { StartElement startElement = event.asStartElement(); if (!insideMainMenu) { Attribute idAttribute = startElement.getAttributeByName(new QName("id")); if (idAttribute != null && idAttribute.getValue().equals("mysidebarmenu")) { insideMainMenu = true; } } // while (attributes.hasNext()) { // Attribute attribute = attributes.next(); // if (!insideMainMenu) { // if (attribute.getName().toString().equals("class") && attribute.getValue().equals("main-menu")) { // //inside the main menu div // // insideMainMenu = true; // } // } // // // // } if (insideMainMenu) { if (startElement.getName().getLocalPart().equals("a") && !ParserUtils.getAttributeByName(startElement,"title").trim().isEmpty()) { String href = ParserUtils.getAttributeByName(startElement, "href"); String titleAtt = ParserUtils.getAttributeByName(startElement, "title"); //exclude the All Category tag String categoryURL = href; categoryURL = Constants.UNICA_DOMAIN + categoryURL; String categoryName = titleAtt; CategoryUrlHolder categoryUrlHolder = new CategoryUrlHolder(categoryName, categoryURL); categories.add(categoryUrlHolder); logger.info(categoryUrlHolder.toString()); } } } } } catch (XMLStreamException e) { e.printStackTrace(); } return categories; } @Override public void run() { logger.info("start thread"); try { // todo insert domain to db if not yet availabe if (DomainDAO.getInstance().getDomainByName(Constants.UNICA_DOMAIN_NAME) == null) { //insert to database // DummyDatabase.insertDomain(Constants.EDUMALL_DOMAIN_NAME, Constants.EDUMALL_DOMAIN); DomainEntity domainEntity = new DomainEntity(); domainEntity.setName(Constants.UNICA_DOMAIN_NAME); domainEntity.setDomainUrl(Constants.UNICA_DOMAIN); DomainDAO.getInstance().persist(domainEntity); } domainId = DomainDAO.getInstance().getDomainByName(Constants.UNICA_DOMAIN_NAME).getId(); //get all category from domain url List<CategoryUrlHolder> categories = getCategories(); //check issuspend synchronized (BaseThread.getInstance()) { while (BaseThread.getInstance().isSuspended()) { BaseThread.getInstance().wait(); } } //domain name and url co truoc trong database // for (CategoryUrlHolder categoryUrlHolder : categories) { //map edumall category name -> my general category name -> categoryId String edumallCategoryName = categoryUrlHolder.getCategoryName(); CategoryMapping categoryMapping = CategoryMapping.mapUnica(edumallCategoryName); //get categoryId from database int categoryId = CategoryDAO.getInstance().getCategoryId(categoryMapping); Thread unicalEachCategoryCrawler = new Thread(new UnicaEachCategoryCrawler(categoryId, categoryUrlHolder.getCategoryURL())); //todo thread executor BaseThread.getInstance().getExecutor().execute(unicalEachCategoryCrawler); // edumallEachCategoryCrawler.start(); //check is suspend synchronized (BaseThread.getInstance()) { while (BaseThread.getInstance().isSuspended()) { BaseThread.getInstance().wait(); } } } } catch (Exception e) { e.printStackTrace(); } logger.info("END THREAD"); } }
[ "luuquangnghia97@gmail.com" ]
luuquangnghia97@gmail.com
6ead940f2215adb2aa00482450810f0345ace8d2
f0a0e7f1570f6ed770e6dcd28b52e8c561fbf168
/Android/AndroidStudioProjects_multicampus/P688/app/build/generated/source/buildConfig/debug/com/example/student/p688/BuildConfig.java
607af4f73561d33d1083d8f8ba13ca3a4634f2e7
[]
no_license
hojinWoo/TIL
0c97b7439c8d47052ce0a57f2b57b07a3e4f212a
f4624e5ff0ee5bfcffa6281339526304708a8afd
refs/heads/master
2020-03-07T17:09:56.552775
2018-08-24T07:32:41
2018-08-24T07:32:41
127,603,896
4
2
null
null
null
null
UTF-8
Java
false
false
455
java
/** * Automatically generated file. DO NOT MODIFY */ package com.example.student.p688; public final class BuildConfig { public static final boolean DEBUG = Boolean.parseBoolean("true"); public static final String APPLICATION_ID = "com.example.student.p688"; public static final String BUILD_TYPE = "debug"; public static final String FLAVOR = ""; public static final int VERSION_CODE = 1; public static final String VERSION_NAME = "1.0"; }
[ "dnghwls7@ajou.ac.kr" ]
dnghwls7@ajou.ac.kr
6b64d7ede5c846bf0d010bd10b5be40aebc91c04
c305913f83121d2fecec0b83d15da14c2816faec
/ibas.approvalprocess.service/src/main/java/org/colorcoding/ibas/approvalprocess/service/rest/JsonConfig.java
9e2c147e3230ea6fa6f0b46d207864043d3adb1a
[ "Apache-2.0" ]
permissive
color-coding/ibas.approvalprocess
c66d99b3dcd36fe06ee046c486a2119fa3935e1a
4db2c5b01d76cfaf5b1b58e5ede5782726d03485
refs/heads/master
2023-08-03T07:45:36.663913
2023-07-05T12:56:08
2023-07-27T10:50:42
98,139,063
0
93
Apache-2.0
2020-11-13T06:42:54
2017-07-24T02:00:00
TypeScript
UTF-8
Java
false
false
618
java
package org.colorcoding.ibas.approvalprocess.service.rest; import javax.ws.rs.ext.ContextResolver; import javax.ws.rs.ext.Provider; import org.eclipse.persistence.jaxb.JAXBContextProperties; import org.glassfish.jersey.moxy.json.MoxyJsonConfig; @Provider public class JsonConfig implements ContextResolver<MoxyJsonConfig> { private final MoxyJsonConfig config; public JsonConfig() { this.config = new MoxyJsonConfig().property(JAXBContextProperties.JSON_WRAPPER_AS_ARRAY_NAME, true); } @Override public MoxyJsonConfig getContext(Class<?> objectType) { return config; } }
[ "niuren.zhu@icloud.com" ]
niuren.zhu@icloud.com
a7858f00c43e0607c7f957119671817d71f7a0f1
0fa83a176789e75086759b5bc34000fe008c3145
/javageci-tools/src/main/java/javax0/geci/lexeger/matchers/NotMatcher.java
9dd67dc786147dbbbe7f445af1f38d83cb2fe741
[ "Apache-2.0" ]
permissive
verhas/javageci
ba3d41160bd52978923348301c2392df7aec2525
d91952bc18c1ddbb81d7726858638e6b0219ff59
refs/heads/master
2022-07-26T08:02:18.295132
2022-07-06T15:13:15
2022-07-06T15:13:15
151,435,201
130
16
Apache-2.0
2021-11-02T21:12:04
2018-10-03T15:28:10
Java
UTF-8
Java
false
false
778
java
package javax0.geci.lexeger.matchers; import javax0.geci.lexeger.JavaLexed; import javax0.geci.lexeger.MatchResult; public class NotMatcher extends LexMatcher { private final LexMatcher[] matchers; public NotMatcher(Lexpression expr, JavaLexed javaLexed, LexMatcher... matchers) { super(expr, javaLexed); this.matchers = matchers; } @Override public MatchResult matchesAt(final int i) { if (consumed()) { return MatchResult.NO_MATCH; } for (final var matcher : matchers) { matcher.reset(); final var result = matcher.matchesAt(i); if (!result.matches) { return matching(i, i + 1); } } return MatchResult.NO_MATCH; } }
[ "peter@verhas.com" ]
peter@verhas.com
8e92732c9283dff146b8c3c1d06b5fcfb5ce1915
32f38cd53372ba374c6dab6cc27af78f0a1b0190
/app/src/main/java/defpackage/dch.java
dcbfec8e8b206650b1f49e492a53ff7779176e6d
[ "BSD-3-Clause" ]
permissive
shuixi2013/AmapCode
9ea7aefb42e0413f348f238f0721c93245f4eac6
1a3a8d4dddfcc5439df8df570000cca12b15186a
refs/heads/master
2023-06-06T23:08:57.391040
2019-08-29T04:36:02
2019-08-29T04:36:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
294
java
package defpackage; /* renamed from: dch reason: default package */ /* compiled from: GengduoParam */ public final class dch { public String a = null; public String b = null; public String c = null; public boolean d = false; public String e = null; public int f = 0; }
[ "hubert.yang@nf-3.com" ]
hubert.yang@nf-3.com
c5651137d2554095441204c3becb0fbb30d1b2c1
ce2813f714d83602ee9b3b237c7304446ae741da
/src/LINTCODE5/LINTCODE401.java
ccda127f072d226c270af429b4b17238589be31c
[]
no_license
tmhbatw/LINTCODEANSWER
bc54bb40a4826b0f9aa11aead4d99978a22e1ee8
7db879f075cde6e1b2fce86f6a3068e59f4e9b34
refs/heads/master
2021-12-13T16:38:05.780408
2021-10-09T16:50:59
2021-10-09T16:50:59
187,010,547
2
0
null
null
null
null
UTF-8
Java
false
false
1,307
java
package LINTCODE5; import datastructure.ParentTreeNode; import java.util.Comparator; import java.util.PriorityQueue; public class LINTCODE401 { /*Description * Find the kth smallest number in a row and column sorted matrix. * Each row and each column of the matrix is incremental. * */ /*Solution * 可以创建一个小根堆,通过小根堆的排序逐个读出最小的数字直到第k个 * */ public int kthSmallest(int[][] matrix, int k) { if(matrix.length==0||matrix[0].length==0||k==0) return 0; PriorityQueue<Row> queue=new PriorityQueue<>(new Comparator<Row>() { @Override public int compare(Row o1, Row o2) { return o1.nums[o1.index]-o2.nums[o2.index]; } }); for(int i=0;i<matrix.length;i++){ queue.add(new Row(0,matrix[i])); } while(--k>0){ Row curr=queue.poll(); if(++curr.index<curr.nums.length) queue.add(curr); } return queue.peek().nums[queue.peek().index]; // write your code here } class Row{ int index; int[] nums; public Row(int index , int[] nums){ this.index=index; this.nums=nums; } } }
[ "1060226998@qq.com" ]
1060226998@qq.com
aeb450851a54df50c71c7efe5cd596c77b4a5640
3a7fc488f72daa37123ef49ff5180138fde3187f
/src/com/lineage/data/quest/DarkElfLv50_2.java
5ef96bd750195f11c21f70d88ed6bdb3355fe718
[]
no_license
WeiFangChou/lineage_363
52c3dc712e19853829c3d1802973cf307ca52143
dc2d3b3adc026d4b2933ec3573c44ce99ac8f6ea
refs/heads/master
2022-09-12T15:37:48.729753
2020-05-25T14:32:55
2020-05-25T14:32:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,050
java
package com.lineage.data.quest; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import com.lineage.data.executor.QuestExecutor; import com.lineage.server.model.Instance.L1PcInstance; import com.lineage.server.serverpackets.S_NPCTalkReturn; import com.lineage.server.serverpackets.S_ServerMessage; import com.lineage.server.templates.L1Quest; /** * 说明:暗黑的武器,死神之证 (黑暗妖精50级以上官方任务) * * @author daien * */ public class DarkElfLv50_2 extends QuestExecutor { private static final Log _log = LogFactory.getLog(DarkElfLv50_2.class); /** * 任务资料 */ public static L1Quest QUEST; /** * 任务资料说明HTML */ private static final String _html = "y_q_d50_2"; /* * <img src="#1210"></img> <font fg=66ff66>步骤.1 暗黑的武器 </font><BR> <BR> * 达到限制条件的黑暗妖精,如果到威顿村找<font * fg=0000ff>卡立普</font>的话,会告诉你,他有办法帮你制作出暗黑系列的武器。为了制作出你想要的暗黑武器 * ,必须收集下列对应的材料。<BR> <BR> 制作成品与对应材料:<BR> <img src="#896"></img> 暗黑钢爪<BR> * ├─幽暗钢爪 x1<BR> ├─诅咒的皮革(地) x10<BR> ├─龙之心 x1<BR> ├─冰之女王之心 x9<BR> ├─格兰肯之泪 * x3<BR> ├─高品质绿宝石 x3<BR> └─金币 x100,000<BR> <BR> <img src="#898"></img> * 暗黑双刀<BR> ├─幽暗双刀 x1<BR> ├─诅咒的皮革(水) x10<BR> ├─龙之心 x1<BR> ├─冰之女王之心 x9<BR> * ├─格兰肯之泪 x3<BR> ├─高品质红宝石 x3<BR> └─金币 x100,000 <BR> <BR> <img * src="#900"></img> 暗黑十字弓<BR> ├─幽暗十字弓 x1 <BR> ├─诅咒的皮革(风) x10 <BR> ├─龙之心 x1 * <BR> ├─冰之女王之心 x9 <BR> ├─格兰肯之泪 x3<BR> ├─高品质蓝宝石 x3 <BR> └─金币 x100,000<BR> * <BR> 注意事项:<BR> 必须要等级达到50以上的黑暗妖精,卡立普才会帮忙制作暗黑武器<BR> 只能三种武器选择一种<BR> <BR> * 任务目标:<BR> 搜集必需的材料,请卡立普帮忙制作暗黑武器<BR> <BR> 相关物品:<BR> <font fg=ffff00>金币 x * 100000</font><BR> <font fg=ffff00>高品质红宝石 x 3</font><BR> <font * fg=ffff00>高品质蓝宝石 x 3</font><BR> <font fg=ffff00>高品质绿宝石 x 3</font><BR> * <font fg=ffff00>格兰肯之泪 x 3</font><BR> <font fg=ffff00>冰之女王之心 x * 9</font><BR> <font fg=ffff00>龙之心 x 1</font><BR> <font fg=ffff00>诅咒的皮革(水) * x 10</font><BR> <font fg=ffff00>诅咒的皮革(风) x 10</font><BR> <font * fg=ffff00>诅咒的皮革(地) x 10</font><BR> <font fg=ffff00>幽暗十字弓 x 1</font><BR> * <font fg=ffff00>幽暗 钢爪 x 1</font><BR> <font fg=ffff00>幽暗 双刀 x 1</font><BR> * <BR> */ private DarkElfLv50_2() { // TODO Auto-generated constructor stub } public static QuestExecutor get() { return new DarkElfLv50_2(); } @Override public void execute(L1Quest quest) { try { // 设置任务 QUEST = quest; } catch (final Exception e) { _log.error(e.getLocalizedMessage(), e); } finally { // _log.info("任务启用:" + QUEST.get_note()); } } @Override public void startQuest(L1PcInstance pc) { try { // 判断职业 if (QUEST.check(pc)) { // 判断等级 if (pc.getLevel() >= QUEST.get_questlevel()) { // 任务尚未开始 设置为开始 if (pc.getQuest().get_step(QUEST.get_id()) != 1) { pc.getQuest().set_step(QUEST.get_id(), 1); } } else { // 该等级 无法执行此任务 pc.sendPackets(new S_NPCTalkReturn(pc.getId(), "y_q_not1")); } } else { // 该职业无法执行此任务 pc.sendPackets(new S_NPCTalkReturn(pc.getId(), "y_q_not2")); } } catch (final Exception e) { _log.error(e.getLocalizedMessage(), e); } } @Override public void endQuest(L1PcInstance pc) { try { // 任务尚未结束 设置为结束 if (!pc.getQuest().isEnd(QUEST.get_id())) { pc.getQuest().set_end(QUEST.get_id()); final String questName = QUEST.get_questname(); // 3109:\f1%0 任务完成! pc.sendPackets(new S_ServerMessage("\\fT" + questName + "任务完成!")); // 任务可以重复 if (QUEST.is_del()) { // 3110:请注意这个任务可以重复执行,需要重复任务,请在任务管理员中执行解除。 pc.sendPackets(new S_ServerMessage( "\\fT请注意这个任务可以重复执行,需要重复任务,请在任务管理员中执行解除。")); } else { // 3111:请注意这个任务不能重复执行,无法在任务管理员中解除执行。 new S_ServerMessage("\\fR请注意这个任务不能重复执行,无法在任务管理员中解除执行。"); } } } catch (final Exception e) { _log.error(e.getLocalizedMessage(), e); } } @Override public void showQuest(L1PcInstance pc) { try { // 展示任务说明 if (_html != null) { pc.sendPackets(new S_NPCTalkReturn(pc.getId(), _html)); } } catch (final Exception e) { _log.error(e.getLocalizedMessage(), e); } } @Override public void stopQuest(L1PcInstance pc) { // TODO Auto-generated method stub } }
[ "136034343@qq.com" ]
136034343@qq.com
564830bb3be7c356affbf83508126fc13b479a5f
a159ab5cc3bc60e013c402f8e6b9bed57e916be0
/4.12/src/HK4.java
c96a36c46531009640a5b330cacb3fa6098d7dea
[]
no_license
chickeboy/java-Study
919a8e8034fa2de6fe8ddc9aa4f39a1c267001a6
2ab9ba21ea44bc7ba48423921bbe9e4cb1b543ea
refs/heads/master
2020-05-24T09:47:17.296617
2019-07-24T07:38:30
2019-07-24T07:38:30
187,210,908
1
0
null
null
null
null
GB18030
Java
false
false
562
java
/*4.猴子吃桃问题:猴子第一天摘下若干个桃子,当即吃了一半,还不瘾,又多吃了一个    第二天早上又将剩下的桃子吃掉一半,又多吃了一个。 以后每天早上都吃了前一天剩下的一半零一个。 到第10天早上想再吃时,见只剩下一个桃子了。求第一天共摘了多少*/ public class HK4 { public static void main(String[] args) { // TODO Auto-generated method stub int i = 1; int days = 1; while(days<10) { i=(i+1)*2; days++; } System.out.println(i); } }
[ "1119644047@qq.com" ]
1119644047@qq.com
b47f850c13c6a39bd65b431b0a484148edebeb7b
907c89215c2979527ec7083bfdf8b02a4a4f592d
/QXQP-SSH/src/com/koi/dao/ICustomerDao.java
cc5cedd87e239551183a1a5dac46365ae9984a50
[]
no_license
973319261/QXQP
ced6e7fca90b71b60e94213a49af4b4fa009c373
b73c1767bef8030e77705454571baec69b9ad5d5
refs/heads/main
2023-01-10T15:57:16.565941
2020-11-05T08:54:42
2020-11-05T08:54:42
310,236,277
3
0
null
null
null
null
UTF-8
Java
false
false
1,952
java
package com.koi.dao; import java.util.List; import com.koi.po.PwReception; import com.koi.po.SysInsuranceDetail; import com.koi.po.SysRecOtherCostDetail; import com.koi.po.SysRecProductDetail; import com.koi.po.SysRecRepairItemDetail; import com.koi.po.SysThreePacksDetail; import com.koi.vo.ReceptionVo; public interface ICustomerDao { /** * 生成维修单号 * * @return */ public int maintenanceNum(String d); /** * 保存主页面信息 * * @param listReception * @param listRecRepairItem * @param listRecProduct * @param listRecOtherCost * @param listArrInsuranceMoney * @param listThreePacksDetail * @return */ public int updateListReceptione(List<PwReception> listReception, List<SysRecRepairItemDetail> listRecRepairItem, List<SysRecProductDetail> listRecProduct, List<SysRecOtherCostDetail> listRecOtherCost, List<SysInsuranceDetail> listArrInsuranceMoney, List<SysThreePacksDetail> listThreePacksDetail); /** * 查询客户接待单据信息 * * @param toAudit * @param maintenanceNum * @param carNum * @param documentStateID * @param balanceStateID * @param startIndex * @param pageSize * @return */ public List<ReceptionVo> selectReception(String toAudit, String maintenanceNum, String carNum, int documentStateID, int balanceStateID, Long startIndex, Long pageSize); /** * 查询客户接待单据信息条数 * @param toAudit * @param maintenanceNum * @param carNum * @param documentStateID * @param balanceStateID * @return */ public Long selectReceptionCount(String toAudit, String maintenanceNum, String carNum, int documentStateID, int balanceStateID); /** * 查询客户接待明细信息 * @param receptionID * @return */ public List<Object> selectReceptionDetail(int receptionID); /** * 删除客户接待单据信息 * @param receptionID * @return */ public boolean delectReception(int receptionID); }
[ "973319261@qq.com" ]
973319261@qq.com
978cba9df93b02b9eec2bbc4a3980691762d086c
ff4c2311bed4be63d5bd0c4c8b5a8b070087c09c
/src/main/java/com/vonchange/ognl/ASTBitOr.java
056dae993cd9ac454fe317aeedb4fdd5cb803be7
[]
no_license
VonChange/mybati
db011f93f38c8f1cca55c71fde5fe61ca93c2048
76f2067259dd1886d5513c03da873f5de63324b3
refs/heads/master
2023-01-25T05:25:04.529396
2020-12-07T06:47:32
2020-12-07T06:47:32
270,598,657
0
0
null
2020-07-05T22:41:30
2020-06-08T08:57:41
Java
UTF-8
Java
false
false
2,526
java
//-------------------------------------------------------------------------- // Copyright (c) 1998-2004, Drew Davidson and Luke Blanshard // 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 Drew Davidson 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.vonchange.ognl; /** * @author Luke Blanshard (blanshlu@netscape.net) * @author Drew Davidson (drew@ognl.org) */ class ASTBitOr extends NumericExpression { public ASTBitOr(int id) { super(id); } public ASTBitOr(OgnlParser p, int id) { super(p, id); } public void jjtClose() { flattenTree(); } protected Object getValueBody( OgnlContext context, Object source ) throws OgnlException { Object result = _children[0].getValue( context, source ); for ( int i=1; i < _children.length; ++i ) result = OgnlOps.binaryOr( result, _children[i].getValue(context, source) ); return result; } public String getExpressionOperator(int index) { return "|"; } }
[ "80767699@yonghui.cn" ]
80767699@yonghui.cn
904590e588aa4508212a00c2713e3b6e0fba502f
25cfbbb243aef9514848b160b0e8d7ba31d44a7d
/src/main/java/com/tencentcloudapi/gse/v20191112/models/DescribeRuntimeConfigurationRequest.java
0d505747fe1c156d0419689e4398e01c416a3d4f
[ "Apache-2.0" ]
permissive
feixueck/tencentcloud-sdk-java
ceaf3c493eec493878c0373f5d07f6fe34fa5f7b
ebdfb9cf12ce7630f53b387e2ac8d17471c6c7d0
refs/heads/master
2021-08-17T15:37:34.198968
2021-01-08T01:30:26
2021-01-08T01:30:26
240,156,902
0
0
Apache-2.0
2021-01-08T02:57:29
2020-02-13T02:04:37
Java
UTF-8
Java
false
false
1,609
java
/* * Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.tencentcloudapi.gse.v20191112.models; import com.tencentcloudapi.common.AbstractModel; import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.Expose; import java.util.HashMap; public class DescribeRuntimeConfigurationRequest extends AbstractModel{ /** * 服务器舰队 Id */ @SerializedName("FleetId") @Expose private String FleetId; /** * Get 服务器舰队 Id * @return FleetId 服务器舰队 Id */ public String getFleetId() { return this.FleetId; } /** * Set 服务器舰队 Id * @param FleetId 服务器舰队 Id */ public void setFleetId(String FleetId) { this.FleetId = FleetId; } /** * Internal implementation, normal users should not use it. */ public void toMap(HashMap<String, String> map, String prefix) { this.setParamSimple(map, prefix + "FleetId", this.FleetId); } }
[ "tencentcloudapi@tenent.com" ]
tencentcloudapi@tenent.com
643851eeacbf60456da4f5c911fff345352e82cd
7a21ff93edba001bef328a1e927699104bc046e5
/project-parent/module-parent/core-module-parent/water-core/src/main/java/com/dotop/smartwater/project/module/core/water/vo/WorkCenterProcessMsgVo.java
a05db77eddaa423aebc5af86c20aeaa1dcacd659
[]
no_license
150719873/zhdt
6ea1ca94b83e6db2012080f53060d4abaeaf12f5
c755dacdd76b71fd14aba5e475a5862a8d92c1f6
refs/heads/master
2022-12-16T06:59:28.373153
2020-09-14T06:57:16
2020-09-14T06:57:16
299,157,259
1
0
null
2020-09-28T01:45:10
2020-09-28T01:45:10
null
UTF-8
Java
false
false
1,348
java
package com.dotop.smartwater.project.module.core.water.vo; import java.util.Date; import java.util.List; import com.dotop.smartwater.dependence.core.common.BaseVo; import lombok.Data; import lombok.EqualsAndHashCode; /** * @date 2019年3月4日 * @description */ @Data @EqualsAndHashCode(callSuper = false) public class WorkCenterProcessMsgVo extends BaseVo { private String id; private String processId; private String parentId; private String status; private String processNodeId; // 处理结果-字典类型id // private String handleDictChildId; private DictionaryChildVo handleDictChild; private List<String> uploadPhotos; private List<String> uploadFiles; // 意见内容 private String opinionContent; // 处理人 (完成节点提交人) private String completer; // 处理人 (完成节点提交人) private String completerName; // 处理时间 (完成节点提交人) private Date completeDate; // 上报位置 (经度,纬度) private List<String> coordinates; // 处理人id private List<String> handlers; // 抄送人角色id private List<String> carbonCopyers; // 处理人id private List<String> handlerRoles; // 抄送人角色id private List<String> carbonCopyerRoles; // 通知人id private List<String> noticers; // 通知人角色id private List<String> noticerRoles; }
[ "2216502193@qq.com" ]
2216502193@qq.com
b5e47492022662347485a3d76471b770dac19c36
55843796932e9af2b93e5eeef82952596b457c93
/arquillian-spring-jpa/src/main/java/com/acme/spring/jpa/service/impl/DefaultStockService.java
e5837f65afd07c8caa4c87b550d359ffa1f825a0
[]
no_license
jmnarloch/arquillian-container-spring-showcase
363adf08536da82ee49aa9c9e544c2645de838a7
4ee16d0845fabd105c5ed1cf2ca5872406c333f8
refs/heads/master
2020-04-04T02:04:43.208093
2012-05-21T16:37:25
2012-05-21T16:37:25
3,936,725
2
0
null
2012-08-22T21:45:26
2012-04-05T05:53:15
Java
UTF-8
Java
false
false
3,050
java
/* * JBoss, Home of Professional Open Source * Copyright 2012, Red Hat Middleware LLC, and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.acme.spring.jpa.service.impl; import com.acme.spring.jpa.domain.Stock; import com.acme.spring.jpa.repository.StockRepository; import com.acme.spring.jpa.service.StockService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.annotation.PostConstruct; import java.util.List; /** * <p>A default implementation of {@link com.acme.spring.jpa.service.StockService}, it simply delegates all * operations to underlying {@link com.acme.spring.jpa.repository.StockRepository}.</p> * * @author <a href="mailto:jmnarloch@gmail.com">Jakub Narloch</a> */ @Service @Transactional public class DefaultStockService implements StockService { /** * <p>Represents the instance of {@link com.acme.spring.jpa.repository.StockRepository} </p> */ @Autowired private StockRepository stockRepository; /** * <p>Creates new instance of {@link DefaultStockService} instance.</p> */ public DefaultStockService() { // empty constructor } /** * <p>Initializes this service.</p> * * @throws IllegalStateException if not all dependencies has been provided */ @PostConstruct protected void init() { if (stockRepository == null) { throw new IllegalStateException("The stock repository hasn't been provided."); } } /** * {@inheritDoc} */ @Override public long save(Stock stock) { return stockRepository.save(stock); } /** * {@inheritDoc} */ @Override public void update(Stock stock) { stockRepository.update(stock); } /** * {@inheritDoc} */ @Override @Transactional(readOnly = true) public Stock get(long id) { return stockRepository.get(id); } /** * {@inheritDoc} */ @Override @Transactional(readOnly = true) public Stock getBySymbol(String symbol) { return stockRepository.getBySymbol(symbol); } /** * {@inheritDoc} */ @Override @Transactional(readOnly = true) public List<Stock> getAll() { return stockRepository.getAll(); } }
[ "jmnarloch@gmail.com" ]
jmnarloch@gmail.com
7da31e28771d685f250d004fe69bd97e9369f530
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/45/405.java
f45596aaf632ce112902e472489ded866037d56a
[ "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
895
java
package <missing>; public class GlobalMembers { public static void Main() { int i; String s = new String(new char[100]); String w = new String(new char[100]); //C++ TO JAVA CONVERTER TODO TASK: Pointer arithmetic is detected on this variable, so pointers on this variable are left unchanged: char * p; //C++ TO JAVA CONVERTER TODO TASK: Pointer arithmetic is detected on this variable, so pointers on this variable are left unchanged: char * q; String tempVar = ConsoleInput.scanfRead(); if (tempVar != null) { s = tempVar.charAt(0); } String tempVar2 = ConsoleInput.scanfRead(" "); if (tempVar2 != null) { w = tempVar2.charAt(0); } p = s; q = w; while (*p != *q) { q++; } for (i = 0;i < s.length();i++,p++,q++) { if (*p != *q) { break; } } if (i == s.length()) { System.out.printf("%d",q - w - s.length()); } } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
ccde1248dfa455bac4ce2b6096e3d5c165fa1ff4
fbadaeab2f78ede5d91013e77817836f319c56c3
/src/magic/card/Sorin_s_Vengeance.java
c48b40af023f545810df62163d83cfc0cb46ee85
[]
no_license
neoedmund/neoedmund-magarena
181b340fc3a25cf8e99ebd21fb4dd05de727708c
abe5f43288b88286a4a539fb0357bac8201b2568
refs/heads/master
2016-09-06T05:17:18.761950
2012-03-20T12:51:52
2012-03-20T12:51:52
32,125,604
0
1
null
null
null
null
UTF-8
Java
false
false
2,160
java
package magic.card; import magic.model.MagicCard; import magic.model.MagicDamage; import magic.model.MagicGame; import magic.model.MagicPayedCost; import magic.model.MagicPlayer; import magic.model.action.MagicChangeLifeAction; import magic.model.action.MagicDealDamageAction; import magic.model.action.MagicMoveCardAction; import magic.model.action.MagicTargetAction; import magic.model.choice.MagicTargetChoice; import magic.model.event.MagicEvent; import magic.model.event.MagicSpellCardEvent; import magic.model.stack.MagicCardOnStack; import magic.model.target.MagicDamageTargetPicker; import magic.model.target.MagicTarget; public class Sorin_s_Vengeance { public static final MagicSpellCardEvent S = new MagicSpellCardEvent() { @Override public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) { final MagicPlayer player = cardOnStack.getController(); final MagicCard card = cardOnStack.getCard(); return new MagicEvent( card, player, MagicTargetChoice.NEG_TARGET_PLAYER, new MagicDamageTargetPicker(10), new Object[]{cardOnStack,player}, this, card + " deals 10 damage to target player$ and " + player + " gains 10 life."); } @Override public void executeEvent( final MagicGame game, final MagicEvent event, final Object[] data, final Object[] choiceResults) { final MagicCardOnStack cardOnStack = (MagicCardOnStack)data[0]; game.doAction(new MagicMoveCardAction(cardOnStack)); event.processTarget(game,choiceResults,0,new MagicTargetAction() { public void doAction(final MagicTarget target) { final MagicDamage damage=new MagicDamage(cardOnStack.getCard(),target,10,false); game.doAction(new MagicDealDamageAction(damage)); } }); game.doAction(new MagicChangeLifeAction((MagicPlayer)data[1],10)); } }; }
[ "neoedmund@gmail.com" ]
neoedmund@gmail.com
7f531f06472caae92cd14b82c77b23db0dac1f92
63152c4f60c3be964e9f4e315ae50cb35a75c555
/sql/catalyst/target/java/org/apache/spark/sql/catalyst/expressions/aggregate/CountIf.java
f037a6caa5618d1877a91a48e965eea3e0f2aea7
[ "EPL-1.0", "Classpath-exception-2.0", "LicenseRef-scancode-unicode", "BSD-3-Clause", "LicenseRef-scancode-generic-cla", "LicenseRef-scancode-free-unknown", "GCC-exception-3.1", "LGPL-2.0-or-later", "CDDL-1.0", "MIT", "CC-BY-SA-3.0", "NAIST-2003", "LGPL-2.1-only", "LicenseRef-scancode-other-copyleft", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-other-permissive", "GPL-2.0-only", "Apache-2.0", "LicenseRef-scancode-public-domain", "CPL-1.0", "CC-PDDC", "EPL-2.0", "CDDL-1.1", "BSD-2-Clause", "CC0-1.0", "Python-2.0", "LicenseRef-scancode-unknown" ]
permissive
PowersYang/spark-cn
76c407d774e35d18feb52297c68c65889a75a002
06a0459999131ee14864a69a15746c900e815a14
refs/heads/master
2022-12-11T20:18:37.376098
2020-03-30T09:48:22
2020-03-30T09:48:22
219,248,341
0
0
Apache-2.0
2022-12-05T23:46:17
2019-11-03T03:55:17
HTML
UTF-8
Java
false
false
1,961
java
package org.apache.spark.sql.catalyst.expressions.aggregate; public class CountIf extends org.apache.spark.sql.catalyst.expressions.aggregate.DeclarativeAggregate implements org.apache.spark.sql.catalyst.expressions.UnevaluableAggregate, org.apache.spark.sql.catalyst.expressions.ImplicitCastInputTypes, scala.Product, scala.Serializable { static public abstract R apply (T1 v1) ; static public java.lang.String toString () { throw new RuntimeException(); } public scala.runtime.Nothing$ aggBufferAttributes () { throw new RuntimeException(); } public scala.collection.Seq<org.apache.spark.sql.catalyst.expressions.Expression> initialValues () { throw new RuntimeException(); } public scala.collection.Seq<org.apache.spark.sql.catalyst.expressions.Expression> updateExpressions () { throw new RuntimeException(); } public scala.collection.Seq<org.apache.spark.sql.catalyst.expressions.Expression> mergeExpressions () { throw new RuntimeException(); } public org.apache.spark.sql.catalyst.expressions.Expression evaluateExpression () { throw new RuntimeException(); } public org.apache.spark.sql.catalyst.expressions.Expression predicate () { throw new RuntimeException(); } // not preceding public CountIf (org.apache.spark.sql.catalyst.expressions.Expression predicate) { throw new RuntimeException(); } public java.lang.String prettyName () { throw new RuntimeException(); } public scala.collection.Seq<org.apache.spark.sql.catalyst.expressions.Expression> children () { throw new RuntimeException(); } public boolean nullable () { throw new RuntimeException(); } public org.apache.spark.sql.types.DataType dataType () { throw new RuntimeException(); } public scala.collection.Seq<org.apache.spark.sql.types.AbstractDataType> inputTypes () { throw new RuntimeException(); } public org.apache.spark.sql.catalyst.analysis.TypeCheckResult checkInputDataTypes () { throw new RuntimeException(); } }
[ "577790911@qq.com" ]
577790911@qq.com
3650dedfb27023556c8ec8d51d4e60ba0e2b987c
afd572566a045184ec6af501ef2af11266a64704
/app/src/main/java/com/application/boxmadikv1/dao/tipoDocumento/TipoDocumentoDaoImpl.java
7451fcea2c42cb473c91a31f3d34729036051b47
[]
no_license
luisrojash/BoxMadikApp
393dd60c26e84a77a3eca00467c225f56f028a8d
cfb6b98bf57456ef5926d6bff00cc1772fe38de1
refs/heads/master
2022-11-23T12:41:35.067982
2020-07-03T15:42:36
2020-07-03T15:42:36
276,934,247
1
1
null
null
null
null
UTF-8
Java
false
false
1,667
java
package com.application.boxmadikv1.dao.tipoDocumento; import com.application.boxmadikv1.dao.BaseDao; import com.application.boxmadikv1.dao.BaseDaoImpl; import com.application.boxmadikv1.modelo.TipoDocumento; import com.application.boxmadikv1.modelo.TipoDocumento_Table; import com.raizlabs.android.dbflow.sql.language.SQLite; import java.util.List; public class TipoDocumentoDaoImpl extends BaseDaoImpl<TipoDocumento, TipoDocumento_Table> implements TipoDocumentoDao { private static TipoDocumentoDaoImpl mInstance = null; public static final TipoDocumentoDaoImpl getmInstance() { if (mInstance == null) { mInstance = new TipoDocumentoDaoImpl(); } return mInstance; } @Override protected Class<TipoDocumento> getEntityClass() { return TipoDocumento.class; } @Override protected Class<TipoDocumento_Table> getTableclass() { return TipoDocumento_Table.class; } @Override public TipoDocumento obtenerTipoDocumento(int codigoTipoDocumento) { TipoDocumento tipoDocumento = SQLite.select() .from(TipoDocumento.class) .where(TipoDocumento_Table.TDoc_Codigo.is(codigoTipoDocumento)) .querySingle(); return tipoDocumento; } @Override public List<TipoDocumento> obtenerListaTipoDocumentoPorPais(String paisCodigo, String documentoEstado) { return SQLite.select() .from(TipoDocumento.class) .where(TipoDocumento_Table.Pais_Codigo.is(paisCodigo)) .and(TipoDocumento_Table.TDoc_Estado.is(documentoEstado)) .queryList(); } }
[ "lerojas@farmaciasperuanas.pe" ]
lerojas@farmaciasperuanas.pe
d71c247aa70e84964682a5d70d65bde3542e470c
ec7cdb58fa20e255c23bc855738d842ee573858f
/java/defpackage/ws$4.java
1f2f5b9bf275bf0aa7624d7c907a7439cdc0c539
[]
no_license
BeCandid/JaDX
591e0abee58764b0f58d1883de9324bf43b52c56
9a3fa0e7c14a35bc528d0b019f850b190a054c3f
refs/heads/master
2021-01-13T11:23:00.068480
2016-12-24T10:39:48
2016-12-24T10:39:48
77,222,067
1
0
null
null
null
null
UTF-8
Java
false
false
358
java
package defpackage; import com.facebook.share.widget.LikeView.ObjectType; /* compiled from: LikeActionController */ /* synthetic */ class ws$4 { static final /* synthetic */ int[] a = new int[ObjectType.values().length]; static { try { a[ObjectType.PAGE.ordinal()] = 1; } catch (NoSuchFieldError e) { } } }
[ "admin@timo.de.vc" ]
admin@timo.de.vc
cad5d85df7b272d509cc2f23761b04cc95a6b28b
11c3cf624e29e9a0830437dd16d4ed1d67a91282
/core/src/main/java/com/github/gl8080/metagrid/core/domain/upload/PassedTime.java
3340a25aa79a662cd77d32bdf0e632b2ba29db1d
[ "MIT" ]
permissive
opengl-8080/metagrid
e8ac219714d9cdc1aced7ff6713cf908c897d37f
d20ff4179376eb1f0714141ae8068bc87971b231
refs/heads/master
2021-01-10T06:03:36.598719
2016-03-03T15:11:43
2016-03-03T15:11:43
49,817,612
0
0
null
null
null
null
UTF-8
Java
false
false
1,125
java
package com.github.gl8080.metagrid.core.domain.upload; import com.github.gl8080.metagrid.core.util.StopWatch; public class PassedTime { private long time; private StopWatch stopWatch = new StopWatch(); private boolean isBegan; public PassedTime() {} public PassedTime(long time) { if (time < 0) { throw new IllegalArgumentException("経過時間に負数は指定できません。"); } this.time = time; } public long getTime() { return this.time; } public void begin() { if (this.isBegan) { throw new IllegalStateException("計測がすでに開始しています。"); } this.stopWatch.start(); this.isBegan = true; } public void end() { if (!this.isBegan) { throw new IllegalStateException("計測が開始されていません。"); } this.stopWatch.stop(); this.time += this.stopWatch.getTime(); this.isBegan = false; this.stopWatch.clear(); } }
[ "tomcat.port.8080+github@gmail.com" ]
tomcat.port.8080+github@gmail.com
85dcf2b4f8da80aad2770a5d9550ebfd9e283064
979629f0eee7423df3e27a8c8aafebc88b6abaa9
/day16/src/auonymous/basic02/Computer.java
752e25c3c9765b8585d866eefcf957c5ca8fc302
[]
no_license
minseon-oh/java
4e9b651be6927972769147bf81d1e8c8cf492702
4058228c858a27b33104ab174e1c1305a77ed71d
refs/heads/master
2023-08-17T05:54:22.876643
2020-06-03T06:53:21
2020-06-03T06:53:21
269,011,696
0
0
null
null
null
null
UTF-8
Java
false
false
818
java
package auonymous.basic02; public class Computer { //멤버변수 private int sound; private RemoteControl remote; //생성자 public Computer() { remote = new RemoteControl() { @Override public void volumeUp() { sound++; System.out.println("컴퓨터의 볼륨:" + sound); } @Override public void volumeDown() { sound--; System.out.println("컴퓨터의 볼륨:" + sound); } @Override public void turnOn() { System.out.println("컴퓨터를 켭니다."); } @Override public void turnOff() { System.out.println("컴퓨터를 끕니다."); } }; } //remote의 게터 메서드 public RemoteControl getRemote() { return remote; } public void SetRemote(RemoteControl remote) { this.remote = remote; } }
[ "aszx8983@naver.com" ]
aszx8983@naver.com
4ef1386b877709dc6e14c2e99dc9d9d369306f21
e6a2c1eec9b80f1f58d49a9738bb11b386ad0278
/src/test/java/pl/java/scalatech/exercise/lazy/JpaLazyConfig.java
2f851c7c1d8cf22a990e0b12145e7841a717011e
[ "MIT" ]
permissive
kurmivivek295/springJpaKata
2e528b38c6cf08f910c098027695ac2c90be0c8d
8d2790707a0ca3c2cce3b732d066393d06d2c5e8
refs/heads/master
2021-05-31T12:57:41.414871
2016-07-13T14:22:18
2016-07-13T14:22:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,185
java
package pl.java.scalatech.exercise.lazy; import org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration; import org.springframework.boot.autoconfigure.dao.PersistenceExceptionTranslationAutoConfiguration; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration; import org.springframework.boot.orm.jpa.EntityScan; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.context.annotation.Profile; import org.springframework.data.jpa.repository.config.EnableJpaRepositories; import pl.java.scalatech.config.hikari.HikariCPConfiguration; @EntityScan(basePackages = "pl.java.scalatech.domain.lazy") @EnableJpaRepositories(basePackages = "pl.java.scalatech.repository.lazy") @Import({ DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class, PersistenceExceptionTranslationAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class,HikariCPConfiguration.class }) @Profile(value={"lazy","dev"}) @Configuration public class JpaLazyConfig { }
[ "przodownik@tlen.pl" ]
przodownik@tlen.pl
8d8fa2618f705236a9209e23928c5dc80a100264
39f2dc7f250cf6d9e132cda8a328e62f1ebd61fd
/offer_book_reading/src/main/java/cn/offer2020/pbj/book_reading/cartoon_algorithm/chapter4/MaopaoSort.java
9abb2354a7e3a560615543ea96d67e73d1b5aa69
[ "Apache-2.0" ]
permissive
peng4444/offer2020
0c51a93202383ef8063cc624d96ab0b26ddc8189
372f8d072698acbb03e1bb569a20e6cda957e1af
refs/heads/master
2021-05-17T07:33:28.950090
2020-11-17T13:21:14
2020-11-17T13:21:14
250,697,652
7
0
Apache-2.0
2021-03-31T21:57:55
2020-03-28T02:32:57
Java
UTF-8
Java
false
false
4,492
java
package cn.offer2020.pbj.book_reading.cartoon_algorithm.chapter4; import java.util.Arrays; /** * @ClassName: MaopaoSort * @Author: pbj * @Date: 2019/9/18 23:12 * @Description: TODO 冒泡排序 稳定排序 平均时间复杂度是O(n^2) 空间复杂度:只使用了一个临时变量,所以为O(1); * 按照冒泡排序的思想,我们要把相邻的元素两两比较,当一个元素大于右侧相邻元素时,交换它们的位置; * 当一个元素小于或等于右侧相邻元素时,位置不变。 * [如何优化冒泡排序?](https://www.cnblogs.com/9dragon/p/10705097.html) */ public class MaopaoSort { //冒泡排序 public static void MaopaoSort(int[] array) { if (null == array || array.length == 0) { throw new RuntimeException("数组为null或长度为0"); } //外循环是趟数,每一趟都会将未排序中最大的数放到尾端 for (int i = 0; i < array.length - 1; i++) { //内循环是从第一个元素开始,依次比较相邻元素, // 比较次数随着趟数减少,因为每一趟都排好了一个元素 for (int j = 0; j < array.length - i - 1; j++) { int temp = 0; if (array[j] > array[j + 1]) { temp = array[j]; array[j] = array[j + 1]; array[j + 1] = temp; } } } } //优化1:在最后一次交换开始之前,已经有序,就提前终止循环排序 public static void MaopaoSort2(int array[]) { if (null == array || array.length == 0) { throw new RuntimeException("数组为null或长度为0"); } for (int i = 0; i < array.length; i++) { //有序标记,每一轮的初始值都是true,假设每一趟开始前都假设已经有序 boolean sortFlag = true; for (int j = 0; j < array.length - i - 1; j++) { int temp = 0; if (array[j] > array[j + 1]) { temp = array[j]; array[j] = array[j + 1]; array[j + 1] = temp; //因为有元素进行交换,所以不是有序的,标记为false sortFlag = false; } } if (sortFlag) { break;//如果某一轮有序标记为true,说明当前已有序,可以终止循环 } } } //优化2:我们可以在每一轮排序后,记录下来最后一次元素交换的位置,该位置即为有序无序数列的边界,再往后就是有序区了 public static void MaopaoSort3(int array[]) { if (null == array || array.length == 0) { throw new RuntimeException("数组为null或长度为0"); } //记录最后一次交换的位置 int lastExchangeIndex = 0; //当前趟无序数列的边界,每次比较只需要比到这里为止 int sortBorder = array.length - 1; for (int i = 0; i < array.length; i++) { //有序标记,每一轮的初始值都是true,假设每一趟开始前都假设已经有序 boolean sortFlag = true; for (int j = 0; j < array.length - i - 1; j++) { int temp = 0; if (array[j] > array[j + 1]) { temp = array[j]; array[j] = array[j + 1]; array[j + 1] = temp; //因为有元素进行交换,所以不是有序的,标记为false sortFlag = false; lastExchangeIndex = j; } } sortBorder = lastExchangeIndex; if (sortFlag) { break;//如果某一轮有序标记为true,说明当前已有序,可以终止循环 } } // 还可以进一步优化, 有兴趣的可以去看看鸡尾酒排序 } public static void main(String[] args) { int[] array = new int[]{5, 8, 6, 3, 9, 2, 1, 7}; MaopaoSort(array); System.out.println(Arrays.toString(array)); int[] array1 = new int[]{5, 8, 6, 3, 9, 2, 1, 7}; MaopaoSort2(array1); System.out.println(Arrays.toString(array1)); int[] array2 = new int[]{5, 8, 6, 3, 9, 2, 1, 7}; MaopaoSort3(array2); System.out.println(Arrays.toString(array2)); } }
[ "pbj@qq.com" ]
pbj@qq.com
3423150f4923e63a7e064b2693f47c2cf443f923
b94397fa7462c5861f85facd575aae543749daf5
/src/com/jitong/anquanjiancha/domain/Meitiantixing.java
af11b9a4a1751619830f4ce0823fad599d059d12
[]
no_license
sunmh207/TrainMap_JN
4fcf0d6b705024774a2e38a4898734647f58e545
124afab9fae2a3264f10d5fb776862784fc2ae43
refs/heads/master
2020-04-14T10:20:35.836600
2014-03-22T13:50:37
2014-03-22T13:50:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,105
java
package com.jitong.anquanjiancha.domain; import com.jitong.common.domain.TimedSMSProducer; import com.jitong.common.form.JTField; public class Meitiantixing extends TimedSMSProducer{ private String creatorId; private String unitName; @Override @JTField(chineseName="日期",order=1) public String getSendTime() { return super.getSendTime(); } @Override @JTField(chineseName="提醒人员",order=4) public String getSendToNames() { return super.getSendToNames(); } @Override @JTField(chineseName="提醒内容",order=3) public String getContent() { return super.getContent(); } @JTField(chineseName="主题",order=2) public String getTitle() { return super.getTitle(); } @Override public String getSchedule() { return "每年"; } @Override public String getBusinessType() { return "MEITIANTIXING"; } public String getCreatorId() { return creatorId; } public void setCreatorId(String creatorId) { this.creatorId = creatorId; } public String getUnitName() { return unitName; } public void setUnitName(String unitName) { this.unitName = unitName; } }
[ "stanley.java@gmail.com" ]
stanley.java@gmail.com
f5c5d13331d6cba1eaf1a31f9ef9b14c4b5b5f77
88c841a7e3433b0afbefa4d95f8d06f38484fbbf
/lecshop_base_modules/lecshop_marketing/src/main/java/com/lecshop/marketing/service/impl/PanicBuyServiceImpl.java
ec8f68f7aaaaf4a969b50d6b153d61a48b47e978
[]
no_license
chocoai/Shop_V2
751ebe841b979260d5f2a4718d06be86f04543bd
c2d8b2fb17727539e4bcaf5d1dfce15716197ba5
refs/heads/master
2020-04-14T19:29:51.673436
2017-11-01T04:25:10
2017-11-01T04:38:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,248
java
package com.lecshop.marketing.service.impl; import com.lecshop.marketing.bean.Marketing; import com.lecshop.marketing.mapper.PanicBuyMapper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.Objects; /** * Created by dujinkai on 17/6/8. * 抢购服务接口实现 */ @Service("panicBuyService") public class PanicBuyServiceImpl extends MarketingTemplate { /** * 调试日志 */ private Logger logger = LoggerFactory.getLogger(PanicBuyServiceImpl.class); /** * 注入抢购数据库接口 */ @Autowired private PanicBuyMapper panicBuyMapper; @Override public int addMarketingDetail(Marketing marketing) { logger.debug("addMarketingDetail and marketing:{}", marketing); if (!validateParams(marketing)) { logger.error("addMarketingDetail fail due to param is error...."); return 0; } return panicBuyMapper.addPanicBuy(marketing.getPanicBuy()); } @Override public int updateMarketingDetail(Marketing marketing) { logger.debug("updateMarketingDetail and marketing:{}", marketing); if (!validateParams(marketing)) { logger.error("updateMarketingDetail fail due to params is error..."); return 0; } return panicBuyMapper.updatePanicBuy(marketing.getPanicBuy()); } @Override public void setMarketingDetail(Marketing marketing) { logger.debug("setMarketingDetail and marketing:{}", marketing); if (Objects.isNull(marketing) || !marketing.isPanicBuyMarketing()) { logger.error("setMarketingDetail fail due to params is error...."); return; } marketing.setPanicBuy(panicBuyMapper.queryByMarketingId(marketing.getId())); } /** * 校验当前促销是否正确 * * @param marketing 促销信息 * @return 正确返回true 不正确返回false */ private boolean validateParams(Marketing marketing) { return Objects.nonNull(marketing) && Objects.nonNull(marketing.getPanicBuy()) && marketing.isPanicBuyMarketing(); } }
[ "Sun_Masily@163.com" ]
Sun_Masily@163.com
56a66c6e0254237355b2f9b383162677be3fa723
6c0d4f3828966746d72471b2131f68a05b4036bf
/src/java/platform/com/topvision/platform/dao/mybatis/RepositoryDaoImpl.java
6743fb3e70b1c70bec1208aa0aafc77aff7ad9e5
[]
no_license
kevinXiao2016/topvision-server
b5b97de7436edcae94ad2648bce8a34759f7cf0b
b5934149c50f22661162ac2b8903b61a50bc63e9
refs/heads/master
2020-04-12T00:54:33.351152
2018-12-18T02:16:14
2018-12-18T02:16:14
162,215,931
0
1
null
null
null
null
UTF-8
Java
false
false
828
java
/*********************************************************************** * $Id: RepositoryDaoImpl.java,v 1.1 Jun 28, 2008 11:56:34 AM kelers Exp $ * * @author: kelers * * (c)Copyright 2011 Topoview All rights reserved. ***********************************************************************/ package com.topvision.platform.dao.mybatis; import com.topvision.framework.dao.mybatis.MyBatisDaoSupport; import com.topvision.platform.dao.RepositoryDao; import com.topvision.platform.domain.Repository; /** * @author kelers * @Create Date Jun 28, 2008 11:56:34 AM */ @org.springframework.stereotype.Repository("repositoryDao") public class RepositoryDaoImpl extends MyBatisDaoSupport<Repository> implements RepositoryDao { @Override public String getDomainName() { return Repository.class.getName(); } }
[ "785554043@qq.com" ]
785554043@qq.com
48b45f20ff574278af3cd2adba8e59231d6c8c87
7016cec54fb7140fd93ed805514b74201f721ccd
/src/java/com/echothree/control/user/returnpolicy/common/result/CreateReturnKindResult.java
b9d1b9434ed15b1c8b938734ca79a0e07c2365f2
[ "MIT", "Apache-1.1", "Apache-2.0" ]
permissive
echothreellc/echothree
62fa6e88ef6449406d3035de7642ed92ffb2831b
bfe6152b1a40075ec65af0880dda135350a50eaf
refs/heads/master
2023-09-01T08:58:01.429249
2023-08-21T11:44:08
2023-08-21T11:44:08
154,900,256
5
1
null
null
null
null
UTF-8
Java
false
false
1,212
java
// -------------------------------------------------------------------------------- // Copyright 2002-2023 Echo Three, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // -------------------------------------------------------------------------------- package com.echothree.control.user.returnpolicy.common.result; import com.echothree.control.user.core.common.spec.EntityRefSpec; import com.echothree.control.user.returnpolicy.common.spec.ReturnKindSpec; import com.echothree.util.common.command.BaseResult; public interface CreateReturnKindResult extends ReturnKindSpec, EntityRefSpec, BaseResult { // Nothing additional beyond ReturnKindSpec, EntityRefSpec, BaseResult }
[ "rich@echothree.com" ]
rich@echothree.com
905ffb69d4dce5fed30f10f8dcf5848107681ffc
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/grade/c9d718f379a877bd04e4544ee830a1c4c256bb4f104f214afd1ccaf81e7b25dea689895678bb1e6f817d8b0939eb175f8e847130f30a9a22e980d38125933516/002/mutations/9/grade_c9d718f3_002.java
de85e2a6bd4cc256fa658c47f9d9befc38bebf4e
[]
no_license
ozzydong/CapGen
356746618848065cce4e253e5d3c381baa85044a
0ba0321b6b1191443276021f1997833342f02515
refs/heads/master
2023-03-18T20:12:02.923428
2020-08-21T03:08:28
2020-08-21T03:08:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,536
java
package introclassJava; class IntObj { public int value; public IntObj () { } public IntObj (int i) { value = i; } } class FloatObj { public float value; public FloatObj () { } public FloatObj (float i) { value = i; } } class LongObj { public long value; public LongObj () { } public LongObj (long i) { value = i; } } class DoubleObj { public double value; public DoubleObj () { } public DoubleObj (double i) { value = i; } } class CharObj { public char value; public CharObj () { } public CharObj (char i) { value = i; } } public class grade_c9d718f3_002 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { grade_c9d718f3_002 mainClass = new grade_c9d718f3_002 (); String output; if (args.length > 0) { mainClass.scanner = new java.util.Scanner (args[0]); } else { mainClass.scanner = new java.util.Scanner (System.in); } mainClass.exec (); System.out.println (mainClass.output); } public void exec () throws Exception { FloatObj grade = new FloatObj (), per1 = new FloatObj (), per2 = new FloatObj (), per3 = new FloatObj (), per4 = new FloatObj (); output += (String.format ("Enter thresholds for A, B, C, D\n")); output += (String.format ("in that order, decreasing percentages > ")); per1.value = scanner.nextFloat (); per2.value = scanner.nextFloat (); per3.value = scanner.nextFloat (); per4.value = scanner.nextFloat (); output += (String.format ("Thank you. Now enter student score (percent) >")); grade.value = scanner.nextFloat (); if (grade.value >= per1.value) { output += (String.format ("Student has an A grade\n")); } else if (grade.value >= per2.value && grade.value < per1.value) { output += (String.format ("Student has an B grade\n")); } else if (grade.value >= per3.value && true) { output += (String.format ("Studnet has an C grade\n")); } else if (grade.value >= per4.value && grade.value < per3.value) { output += (String.format ("Student has an D grade\n")); } else if (grade.value < per4.value) { output += (String.format ("Studnet has failed the course\n")); } if (true) return;; } }
[ "justinwm@163.com" ]
justinwm@163.com
98998d740fe47ba6c51875304a8b2af41a86ef1d
cacd87f8831b02e254d65c5e86d48264c7493d78
/pc/backstage/src/com/manji/backstage/dto/login/UserRoleDto.java
a61171fe153f5be98149e1ca895e9bf5ef5a9db6
[]
no_license
lichaoqian1992/beautifulDay
1a5a30947db08d170968611068673d2f0b626eb2
44e000ecd47099dc5342ab8a208edea73602760b
refs/heads/master
2021-07-24T22:48:33.067359
2017-11-03T09:06:15
2017-11-03T09:06:15
108,791,908
0
3
null
null
null
null
UTF-8
Java
false
false
809
java
package com.manji.backstage.dto.login; public class UserRoleDto { int user_id; String user_name; int role_id; String role_name; int status; public int getUser_id() { return user_id; } public void setUser_id(int user_id) { this.user_id = user_id; } public String getUser_name() { return user_name; } public void setUser_name(String user_name) { this.user_name = user_name; } public int getRole_id() { return role_id; } public void setRole_id(int role_id) { this.role_id = role_id; } public String getRole_name() { return role_name; } public void setRole_name(String role_name) { this.role_name = role_name; } public int getStatus() { return status; } public void setStatus(int status) { this.status = status; } }
[ "1015598423@qq.com" ]
1015598423@qq.com
e125945c135b793f62a8cb7b6dd13c9d8f124801
402fd2cb77fe5e4f77a8c8ffe12c2debae552fad
/app/src/main/java/com/louis/agricultural/ui/view/ISearchView.java
393f24804eb1dc01688c75b12764b06f665e3c5a
[]
no_license
himon/FengYouAgricultural
eea55f74cc1bb341e23ded90c3b217f789f85767
9fb0656d2fb7e8fca0709f4d2383c0efd7768fb7
refs/heads/master
2021-01-21T00:53:01.334403
2016-08-23T02:11:23
2016-08-23T02:11:23
50,173,076
0
0
null
null
null
null
UTF-8
Java
false
false
213
java
package com.louis.agricultural.ui.view; import com.louis.agricultural.model.entities.ProductEntity; /** * Created by lc on 16/3/8. */ public interface ISearchView { void setProducts(ProductEntity data); }
[ "258798596@qq.com" ]
258798596@qq.com
f21dd2bca6b6936ef56fc58ede6570b34f634ac7
1ebb1c57359da58dc95ec2696b7a9bbf90b8a4ed
/src/main/java/com/andres_k/components/graphicComponents/userInterface/elementGUI/GuiElementsManager.java
80d39f5025e8b82a678c2863d4c09ad897952e9e
[]
no_license
Draym/DragonBallArena
cde8d2b23eb8615b00b69d2ffaac9e713e8fba1d
ecbe2f5de1ee71abec780e5150ab18414604d2b6
refs/heads/master
2023-05-04T04:56:00.832882
2023-04-19T01:02:40
2023-04-19T01:02:40
38,845,891
6
3
null
2017-08-08T16:59:58
2015-07-09T21:19:55
Java
UTF-8
Java
false
false
837
java
package com.andres_k.components.graphicComponents.userInterface.elementGUI; import java.util.HashMap; import java.util.Map; /** * Created by andres_k on 16/02/2016. */ public class GuiElementsManager { private Map<String, GuiElement> elements; private GuiElementsManager () { this.elements = new HashMap<>(); } private static class SingletonHolder { private final static GuiElementsManager instance = new GuiElementsManager(); } public static GuiElementsManager get() { return SingletonHolder.instance; } public void add(String id, GuiElement element) { this.elements.put(id, element); } public GuiElement getElement(String id) { if (this.elements.containsKey(id)) { return this.elements.get(id); } return null; } }
[ "kevin.andres@epitech.eu" ]
kevin.andres@epitech.eu
38c066710811d47bae23e0bd042febac453b14de
716b231c89805b3e1217c6fc0a4ff9fbcdcdb688
/trainQunarWeb/src/com/l9e/transaction/job/PassengerJob.java
8266b817703ff68311d899e7d14c6b1a1289b8b7
[]
no_license
d0l1u/train_ticket
32b831e441e3df73d55559bc416446276d7580be
c385cb36908f0a6e9e4a6ebb9b3ad737edb664d7
refs/heads/master
2020-06-14T09:00:34.760326
2019-07-03T00:30:46
2019-07-03T00:30:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,483
java
package com.l9e.transaction.job; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.annotation.Resource; import net.sf.json.JSONArray; import net.sf.json.JSONObject; import org.apache.commons.codec.digest.DigestUtils; import org.apache.commons.lang.StringUtils; import org.apache.log4j.Logger; import org.codehaus.jackson.map.ObjectMapper; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; import com.l9e.transaction.service.OrderService; import com.l9e.transaction.vo.InterAccount; import com.l9e.transaction.vo.QunarResult; import com.l9e.transaction.vo.SysConfig; import com.l9e.util.HttpUtil; import com.l9e.util.TrainPropUtil; import com.l9e.util.UrlFormatUtil; /** * 代理商乘车人数据实时更新----去哪儿白名单增加删除接口 **/ @Component("passengerJob") public class PassengerJob { private static Logger logger=Logger.getLogger(PassengerJob.class); @Resource private OrderService orderService; @Value("#{propertiesReader[qunarReqUrl]}") private String qunarReqUrl;//Qunar请求地址 //去哪儿白名单增加删除接口 public void queryPassengers() throws Exception{ /**获取各账号下的数据**/ for(InterAccount account : SysConfig.accountContainer){ queryPassengersInfo(account); } } /** * 所有渠道的出票成功\失败乘客信息实时更新 * */ public void queryPassengersInfo(InterAccount account){ try{ //获取qunar订单来源账号----start String md5Key = account.getMd5Key(); String merchantCode = account.getMerchantCode(); String order_source = account.getName(); String logPre = "【去哪儿白名单增加删除接口<"+order_source+">】"; //获取qunar订单来源账号----end //前20分钟的时间 Calendar theCa = Calendar.getInstance(); theCa.setTime(new Date()); theCa.add(Calendar.MINUTE, -2); Date date = theCa.getTime(); DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm"); String querydate = df.format(date); Map<String, Object> param=new HashMap<String, Object>(); param.put("begin_time", querydate.concat(":00")); param.put("end_time", querydate.concat(":59")); Integer orderCount = orderService.queryOrderCount(param); logger.info(logPre+" orderCount="+orderCount); if(orderCount>0){ int size = 10;//每次查询的数量 int pageCount = orderCount%size==0 ? orderCount/size : orderCount/size+1; for(int m=0; m<pageCount; m++){ param.put("everyPagefrom", size*m); param.put("pageSize", size); List<Map<String, String>> orderList = orderService.queryOrderList(param);//order_id和acc_username\order_status\channel\error_info JSONArray jsonArray = new JSONArray(); logger.info(logPre+" start~~~count="+orderList.size()); for(Map<String, String> map : orderList){ JSONObject json = new JSONObject(); json.put("account", map.get("acc_username")); if("0".equals(map.get("contact_status"))){//出票成功 json.put("flag", 2);//2-只增加帐号部分核验通过的乘车人;不删除之前映射 }else{ json.put("flag", 3);//3-删除该帐号乘车人映射,如该账号乘车人为空,删除该帐号全部映射,如果不为空,则只删passengers和帐号的映射 } map.put("begin_time", querydate.concat(":00")); map.put("end_time", querydate.concat(":59")); List<Map<String, String>> passList = orderService.queryPassengerList(map); JSONArray passArray = new JSONArray(); for(Map<String, String> passMap : passList){ JSONObject passJson = new JSONObject(); passJson.put("name", passMap.get("contact_name")); passJson.put("cardNo", passMap.get("cert_no")); // passJson.put("certType", TrainPropUtil.getQunarIdsType(passMap.get("cert_type")));//转换成qunar证件类型 passJson.put("certType", passMap.get("cert_type"));//转换成qunar证件类型 passArray.add(passJson); } json.put("passengers", passArray); jsonArray.add(json); } Map<String,String> map = new HashMap<String,String>(); map.put("merchantCode", merchantCode); map.put("mappings", jsonArray.toString()); String hMac = DigestUtils.md5Hex(md5Key + merchantCode + jsonArray.toString()).toUpperCase(); map.put("HMAC", hMac); logger.info(logPre+"通知param"+map.toString()); String reqParams = UrlFormatUtil.CreateUrl("", map, "", "UTF-8"); StringBuffer reqUrl = new StringBuffer(); reqUrl.append(qunarReqUrl).append("AccountMapping.do"); String jsonRs = HttpUtil.sendByPost(reqUrl.toString(), reqParams, "UTF-8"); logger.info(logPre+"通知返回:"+jsonRs); if(StringUtils.isNotEmpty(jsonRs) && jsonRs!=null && !"".equals(jsonRs)){ ObjectMapper mapper = new ObjectMapper(); QunarResult rs = mapper.readValue(jsonRs, QunarResult.class); if(rs.isRet()){ logger.info(logPre+"通知qunar成功"); }else{ logger.info(logPre+"通知qunar失败,errCode:"+rs.getErrCode() + ",errMsg:"+rs.getErrMsg()); } }else{ logger.info(logPre+"通知qunar失败返回:"+jsonRs); } logger.info(logPre+" end~~~"); } } }catch(Exception e){ e.printStackTrace(); } } }
[ "meizs" ]
meizs
3e99e725beab5519167e12d89ec9f4e37307706c
32d70784dedff6e1738d3a498c315a1b6fefde82
/springdemo/src/main/java/com/art2cat/dev/soundsystem/SoundSystemConfig.java
9417ff0a9526ae943886025bb7db5298ed3aafca
[]
no_license
UncleTian/JavaDemo
125fb9ad6709ddfe55c00de97a4bdcf8a77402c7
1cfb26e6b5c5df8ddb90a24f628b49d6987ffdfa
refs/heads/master
2020-03-24T17:19:56.713230
2018-07-18T09:54:47
2018-07-18T09:54:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
343
java
package com.art2cat.dev.soundsystem; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; @Configuration @Import({CDPlayerConfig.class, CDConfig.class}) //@ImportResource("classpath:/Volumes/Navis.A&C/SpingDemo/src/main/resources/spring.xml") public class SoundSystemConfig { }
[ "yiming.whz@gmail.com" ]
yiming.whz@gmail.com
476c4339ccbc7c8f9b41876c0258ad1555b7fea5
d24de9be4c3993d9dc726e9a3c74d9662c470226
/reverse/Rocketbank_All_3.12.4_source_from_JADX/sources/com/bumptech/glide/gifencoder/LZWEncoder.java
cc1adbb636b51e40362b83e9badbb5356e2ef748
[]
no_license
MEJIOMAH17/rocketbank-api
b18808ee4a2fdddd8b3045cd16655b0d82e0b13b
fc4eb0cbb4a8f52277fdb09a3b26b4cceef6ff79
refs/heads/master
2022-07-17T20:24:29.721131
2019-07-26T18:55:21
2019-07-26T18:55:21
198,698,231
4
0
null
2022-06-20T22:43:15
2019-07-24T19:31:49
Smali
UTF-8
Java
false
false
6,630
java
package com.bumptech.glide.gifencoder; import android.support.v4.app.FrameMetricsAggregator; import java.io.IOException; import java.io.OutputStream; import ru.rocketbank.r2d2.root.chat.ChatFragment; final class LZWEncoder { int ClearCode; int EOFCode; int a_count; byte[] accum = new byte[256]; boolean clear_flg = false; int[] codetab = new int[5003]; private int curPixel; int cur_accum = 0; int cur_bits = 0; int free_ent = 0; int g_init_bits; int hsize = 5003; int[] htab = new int[5003]; private int imgH; private int imgW; private int initCodeSize; int[] masks = new int[]{0, 1, 3, 7, 15, 31, 63, 127, 255, FrameMetricsAggregator.EVERY_DURATION, 1023, 2047, 4095, 8191, 16383, 32767, ChatFragment.TYPE_MESSAGE_TYPING}; int maxbits = 12; int maxcode; int maxmaxcode = 4096; int n_bits; private byte[] pixAry; private int remaining; LZWEncoder(int i, int i2, byte[] bArr, int i3) { this.imgW = i; this.imgH = i2; this.pixAry = bArr; this.initCodeSize = Math.max(2, i3); } private void char_out(byte b, OutputStream outputStream) throws IOException { byte[] bArr = this.accum; int i = this.a_count; this.a_count = i + 1; bArr[i] = b; if (this.a_count >= (byte) -2) { flush_char(outputStream); } } final void encode(OutputStream outputStream) throws IOException { int i; int i2; outputStream.write(this.initCodeSize); this.remaining = this.imgW * this.imgH; this.curPixel = 0; int i3 = this.initCodeSize + 1; this.g_init_bits = i3; this.clear_flg = false; this.n_bits = this.g_init_bits; this.maxcode = (1 << this.n_bits) - 1; this.ClearCode = 1 << (i3 - 1); this.EOFCode = this.ClearCode + 1; this.free_ent = this.ClearCode + 2; this.a_count = 0; i3 = nextPixel(); int i4 = 0; for (i = this.hsize; i < 65536; i <<= 1) { i4++; } i = 8 - i4; i4 = this.hsize; for (i2 = 0; i2 < i4; i2++) { this.htab[i2] = -1; } output(this.ClearCode, outputStream); while (true) { i2 = nextPixel(); if (i2 != -1) { int i5 = (i2 << this.maxbits) + i3; int i6 = (i2 << i) ^ i3; if (this.htab[i6] == i5) { i3 = this.codetab[i6]; } else if (this.htab[i6] >= 0) { r9 = i4 - i6; if (i6 == 0) { r9 = 1; } do { i6 -= r9; if (i6 < 0) { i6 += i4; } if (this.htab[i6] == i5) { i3 = this.codetab[i6]; break; } } while (this.htab[i6] >= 0); output(i3, outputStream); if (this.free_ent >= this.maxmaxcode) { r1 = this.codetab; r9 = this.free_ent; this.free_ent = r9 + 1; r1[i6] = r9; this.htab[i6] = i5; } else { i3 = this.hsize; for (i5 = 0; i5 < i3; i5++) { this.htab[i5] = -1; } this.free_ent = this.ClearCode + 2; this.clear_flg = true; output(this.ClearCode, outputStream); } i3 = i2; } else { output(i3, outputStream); if (this.free_ent >= this.maxmaxcode) { i3 = this.hsize; for (i5 = 0; i5 < i3; i5++) { this.htab[i5] = -1; } this.free_ent = this.ClearCode + 2; this.clear_flg = true; output(this.ClearCode, outputStream); } else { r1 = this.codetab; r9 = this.free_ent; this.free_ent = r9 + 1; r1[i6] = r9; this.htab[i6] = i5; } i3 = i2; } } else { output(i3, outputStream); output(this.EOFCode, outputStream); outputStream.write(0); return; } } } private void flush_char(OutputStream outputStream) throws IOException { if (this.a_count > 0) { outputStream.write(this.a_count); outputStream.write(this.accum, 0, this.a_count); this.a_count = 0; } } private int nextPixel() { if (this.remaining == 0) { return -1; } this.remaining--; byte[] bArr = this.pixAry; int i = this.curPixel; this.curPixel = i + 1; return bArr[i] & 255; } private void output(int i, OutputStream outputStream) throws IOException { this.cur_accum &= this.masks[this.cur_bits]; if (this.cur_bits > 0) { this.cur_accum |= i << this.cur_bits; } else { this.cur_accum = i; } this.cur_bits += this.n_bits; while (this.cur_bits >= 8) { char_out((byte) this.cur_accum, outputStream); this.cur_accum >>= 8; this.cur_bits -= 8; } if (this.free_ent > this.maxcode || this.clear_flg) { if (this.clear_flg) { int i2 = this.g_init_bits; this.n_bits = i2; this.maxcode = (1 << i2) - 1; this.clear_flg = false; } else { this.n_bits++; if (this.n_bits == this.maxbits) { this.maxcode = this.maxmaxcode; } else { this.maxcode = (1 << this.n_bits) - 1; } } } if (i == this.EOFCode) { while (this.cur_bits > 0) { char_out((byte) this.cur_accum, outputStream); this.cur_accum >>= 8; this.cur_bits -= 8; } flush_char(outputStream); } } }
[ "mekosichkin.ru" ]
mekosichkin.ru
30c7e4d5f108991d1159d69895d10f037eaa300d
09cf080c8d9689b6567ee14c0bba7cfce4846d99
/baza-bzb-app-android/app/src/main/java/com/baza/android/bzw/dao/MessageDao.java
1a6f880374ae26a420cebae0e48c22cf4521dc28
[]
no_license
wangxiaofan/new_baza
ab233d452c02f142ab22ecf9c9d8bbcd0540516c
f079a1d5d2d20e17ef00504cc4b550263009ff45
refs/heads/master
2022-10-13T23:59:02.542833
2020-06-12T08:40:12
2020-06-12T08:40:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,293
java
package com.baza.android.bzw.dao; import android.database.Cursor; import android.text.TextUtils; import com.baza.android.bzw.bean.message.MessageProcessLocalTagBean; import com.slib.storage.database.DBWorker; import com.slib.storage.database.core.DataBaseManager; import com.slib.storage.database.core.DbClassUtil; import com.slib.storage.database.handler.IDBControllerHandler; import com.slib.storage.database.listener.IDBReplyListener; import java.util.HashSet; /** * Created by Vincent.Lei on 2018/4/27. * Title: * Note: */ public class MessageDao { public static void markPassiveShareHasProcessed(MessageProcessLocalTagBean tagBean) { if (tagBean == null) return; DBWorker.saveSingle(tagBean, null); } public static void readPassiveShareHasProcessedTags(final String unionId, final String neteasyId, IDBReplyListener<HashSet<String>> replyListener) { if (TextUtils.isEmpty(unionId) || TextUtils.isEmpty(neteasyId)) return; DBWorker.customerDBTask(null, new IDBControllerHandler<Void, HashSet<String>>() { @Override public HashSet<String> operateDataBaseAsync(DataBaseManager mDBManager, Void input) { String tableName = DbClassUtil.getTableNameByAnnotationClass(MessageProcessLocalTagBean.class); Cursor cursor = null; HashSet<String> tags = null; try { cursor = mDBManager.query(tableName, new String[]{"messageId"}, "unionId = ? and neteasyId =?", new String[]{unionId, neteasyId}, null, null, null); if (cursor != null && cursor.getCount() > 0) { tags = new HashSet<>(); while (cursor.moveToNext()) tags.add(cursor.getString(cursor.getColumnIndex("messageId"))); } } catch (Exception e) { //ignore } finally { if (cursor != null) cursor.close(); } return tags; } @Override public Class<?>[] getDependModeClass() { return new Class[]{MessageProcessLocalTagBean.class}; } }, replyListener, true); } }
[ "123456" ]
123456
0a9a911bdab7f7452d4028e97fb2f9e8192053cf
8ec2cbabd6125ceeb00e0c6192c3ce84477bdde6
/com.alcatel.as.calloutagent/src/com/nextenso/agent/desc/Dummy.java
3af9c6fa7d869e35bc574d07602a1dd429c36656
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
nokia/osgi-microfeatures
2cc2b007454ec82212237e012290425114eb55e6
50120f20cf929a966364550ca5829ef348d82670
refs/heads/main
2023-08-28T12:13:52.381483
2021-11-12T20:51:05
2021-11-12T20:51:05
378,852,173
1
1
null
null
null
null
UTF-8
Java
false
false
263
java
// Copyright 2000-2021 Nokia // // Licensed under the Apache License 2.0 // SPDX-License-Identifier: Apache-2.0 // package com.nextenso.agent.desc; // temporary empty class used as a work around (because of an issue during obr update) public class Dummy { }
[ "pierre.de_rop@nokia.com" ]
pierre.de_rop@nokia.com
9fd4f71f8a4a774eb4662724d80395a871f2d502
34cf7a41d0c7dc2485146852e700129497b68c8d
/result/MethodsFromMahout/traditional_mutants/double_computeWeight(double,double,double,double)/AOIS_377/MethodsFromMahout.java
707e9fc935f8f6c175ab8cb431529901c33aac58
[]
no_license
CruorVolt/mu
59c3ea8937561a86cf17beb8ae0e0e93d41de307
49a181ba80121640d908c14bc1361a72b6da052f
refs/heads/master
2021-03-12T23:25:45.815280
2015-09-22T18:44:58
2015-09-22T18:44:58
41,647,205
0
0
null
null
null
null
UTF-8
Java
false
false
6,087
java
// This is a mutant program. // Author : ysma package Test; import com.google.common.base.Preconditions; import java.util.List; import java.util.Random; import com.google.common.collect.Lists; public class MethodsFromMahout { public static double cosineDistance( double[] p1, double[] p2 ) { double dotProduct = 0.0; double lengthSquaredp1 = 0.0; double lengthSquaredp2 = 0.0; for (int i = 0; i < p1.length; i++) { lengthSquaredp1 += p1[i] * p1[i]; lengthSquaredp2 += p2[i] * p2[i]; dotProduct += p1[i] * p2[i]; } double denominator = Math.sqrt( lengthSquaredp1 ) * Math.sqrt( lengthSquaredp2 ); if (denominator < dotProduct) { denominator = dotProduct; } if (denominator == 0 && dotProduct == 0) { return 0; } return 1.0 - dotProduct / denominator; } public static double manhattanDistance( double[] p1, double[] p2 ) { double result = 0.0; for (int i = 0; i < p1.length; i++) { result += Math.abs( p2[i] - p1[i] ); } return result; } public static double chebyshevDistance( double[] p1, double[] p2 ) { if (p1.length != p2.length) { System.out.println( "Error!" ); return -1; } double maxDiff = Math.abs( p1[0] - p2[0] ); for (int i = 1; i < p1.length; i++) { double diff = Math.abs( p1[i] - p2[i] ); if (maxDiff < diff) { maxDiff = diff; } } return maxDiff; } public static double tanimotoDistance( double[] p1, double[] p2 ) { double ab = 0; double aSq = 0; double bSq = 0; for (int i = 0; i < p1.length; i++) { ab += p1[i] * p2[i]; aSq += p1[i] * p1[i]; bSq += p2[i] * p2[i]; } double denominator = aSq + bSq - ab; if (denominator < ab) { denominator = ab; } if (denominator > 0) { return 1.0 - ab / denominator; } else { return 0.0; } } public static int sum( int[] values ) { int sum = 0; for (int value: values) { sum += value; } return sum; } public static int[] add( int[] array1, int[] array2 ) { Preconditions.checkArgument( array1.length == array2.length, "array1.length != array2.length" ); for (int index = 0; index < array1.length; index++) { array1[index] += array2[index]; } return array1; } public static int[] dec( int[] array1, int[] array2 ) { Preconditions.checkArgument( array1.length == array2.length, "array1.length != array2.length" ); for (int index = 0; index < array1.length; index++) { array1[index] -= array2[index]; } return array1; } public static double[] givens( double a, double b, double[] csOut ) { if (b == 0) { csOut[0] = 1; csOut[1] = 0; return csOut; } if (Math.abs( b ) > Math.abs( a )) { double tau = -a / b; csOut[1] = 1 / Math.sqrt( 1 + tau * tau ); csOut[0] = csOut[1] * tau; } else { double tau = -b / a; csOut[0] = 1 / Math.sqrt( 1 + tau * tau ); csOut[1] = csOut[0] * tau; } return csOut; } public static double link( double r ) { if (r < 0.0) { double s = Math.exp( r ); return s / (1.0 + s); } else { double s = Math.exp( -r ); return 1.0 / (1.0 + s); } } public static int nbTrees( int numMaps, int numTrees, int partition ) { int nbTrees = numTrees / numMaps; if (partition == 0) { nbTrees += numTrees - nbTrees * numMaps; } return nbTrees; } public static int stepSize( int recordNumber, double multiplier ) { int[] bumps = { 1, 2, 5 }; double log = Math.floor( multiplier * Math.log10( recordNumber ) ); int bump = bumps[(int) log % bumps.length]; int scale = (int) Math.pow( 10, Math.floor( log / bumps.length ) ); return bump * scale; } public static double choose2( double n ) { return n * (n - 1) / 2; } public static double computeWeight( double featureLabelWeight, double labelWeight, double alphaI, double numFeatures ) { double numerator = featureLabelWeight + alphaI; double denominator = labelWeight + ++alphaI * numFeatures; return Math.log( numerator / denominator ); } public static double computeWeight( double featureWeight, double featureLabelWeight, double totalWeight, double labelWeight, double alphaI, double numFeatures ) { double numerator = featureWeight - featureLabelWeight + alphaI; double denominator = totalWeight - labelWeight + alphaI * numFeatures; return -Math.log( numerator / denominator ); } public static double errorRate( double[] labels, double[] predictions ) { double nberrors = 0; double datasize = 0; for (int index = 0; index < labels.length; index++) { if (predictions[index] == -1) { continue; } if (predictions[index] != labels[index]) { nberrors++; } datasize++; } return nberrors / datasize; } public static double[] fromRho( double rho, double[] csOut ) { if (rho == 1) { csOut[0] = 0; csOut[1] = 1; return csOut; } if (Math.abs( rho ) < 1) { csOut[1] = 2 * rho; csOut[0] = Math.sqrt( 1 - csOut[1] * csOut[1] ); return csOut; } csOut[0] = 2 / rho; csOut[1] = Math.sqrt( 1 - csOut[0] * csOut[0] ); return csOut; } }
[ "lundgren.am@gmail.com" ]
lundgren.am@gmail.com
0c353d0d6cfc992bb9682c72d8a269d21955bdf4
63f142347bbd63a41c0c69a646f10747ea9edede
/src/main/java/com/crfeb/tbmpt/zsjk/xmb/service/ZsJkXmbDmCjJcXxService.java
7cf10a9c3d33f706088fcab995ede2672e5e0987
[]
no_license
guoxuhui/Tbmpt_Web
c842e500797bc843968a7f683fadeda4047a2031
131380902383dc51e6a29a53ddd0f78c74400233
refs/heads/master
2021-07-10T05:53:02.856913
2017-10-10T11:08:21
2017-10-10T11:08:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,426
java
package com.crfeb.tbmpt.zsjk.xmb.service; import java.util.List; import com.baomidou.framework.service.ICommonService; import com.crfeb.tbmpt.sys.model.User; import com.crfeb.tbmpt.commons.utils.PageInfo; import com.crfeb.tbmpt.zsjk.xmb.model.dto.ZsJkXmbDmCjJcXxDto; import com.crfeb.tbmpt.zsjk.xmb.model.ZsJkXmbDmCjJcXx; /** * <p>项目部角度 地面沉降情况(默认取当前里程的前后50米)Service接口</p> * <p>系统:展示界面接口</p> * <p>模块:项目部角度模块</p> * <p>日期:2017-01-09</p> * @version 1.0 * @author YangYJ */ public interface ZsJkXmbDmCjJcXxService extends ICommonService<ZsJkXmbDmCjJcXx>{ void selectDataGrid(PageInfo pageInfo) throws Exception; /** * 新增项目部角度 地面沉降情况(默认取当前里程的前后50米) * @param zsJkXmbDmCjJcXx 要保存的实体 */ String save(ZsJkXmbDmCjJcXxDto zsJkXmbDmCjJcXxDto,User user) throws Exception; /** * 通过集合删除项目部角度 地面沉降情况(默认取当前里程的前后50米) * @param ids String字符串,中间用“,”间隔开 */ String del(String[] ids,User user) throws Exception; /** * 修改项目部角度 地面沉降情况(默认取当前里程的前后50米) * @param zsJkXmbDmCjJcXx 要修改的实体 */ String update(ZsJkXmbDmCjJcXxDto zsJkXmbDmCjJcXxDto,User user) throws Exception; /** * 通过ID查找项目部角度 地面沉降情况(默认取当前里程的前后50米) * @param id 数据ID */ ZsJkXmbDmCjJcXx findById(String id) throws Exception; /** * 校验当前字段是否已存在 * @param zsJkXmbDmCjJcXx 实体信息 * @param clumName 需校验的字段 * @return 若为null则不重复,若不为null则重复 */ String checkClumIfexits(ZsJkXmbDmCjJcXxDto zsJkXmbDmCjJcXxDto, String[] clumNames) throws Exception; /** * 方法说明:获取地面沉降情况(默认取当前里程的前后50米) * @param xlId 线路ID * @param startLic 起止里程 * @param dianbh 点位编号 * @param fazhi 阈值(大于等于) * @return * @throws Exception * @author:YangYj * @Time: 2017年1月10日 上午11:51:33 */ public List<ZsJkXmbDmCjJcXxDto> cjjc(String xlId,String startLic,String dianbh,String fazhi) throws Exception; }
[ "wpisen@163.com" ]
wpisen@163.com
f42718dc68dff44b1e362075725097184e605b4f
e72267e4c674dc3857dc91db556572534ecf6d29
/mybatis-3-master/src/test/java/org/apache/ibatis/submitted/named_constructor_args/UseActualNameMapper.java
56758784144a94ee22e03201908ca6da81833261
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0", "BSD-3-Clause" ]
permissive
lydon-GH/mybatis-study
4be7f279529a33ead3efa9cd79d60cd44d2184a9
a8a89940bfa6bb790e78e1c28b0c7c0a5d69e491
refs/heads/main
2023-07-29T06:55:56.549751
2021-09-04T09:08:25
2021-09-04T09:08:25
403,011,812
0
0
null
null
null
null
UTF-8
Java
false
false
1,223
java
/* * Copyright ${license.git.copyrightYears} the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ibatis.submitted.named_constructor_args; import org.apache.ibatis.annotations.Arg; import org.apache.ibatis.annotations.ConstructorArgs; import org.apache.ibatis.annotations.Select; public interface UseActualNameMapper { @ConstructorArgs({ @Arg(column = "name", name = "name"), @Arg(id = true, column = "id", name = "userId", javaType = Integer.class) }) @Select("select * from users where id = #{id}") User mapConstructorWithoutParamAnnos(Integer id); User mapConstructorWithoutParamAnnosXml(Integer id); }
[ "447172979@qq.com" ]
447172979@qq.com