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
4b4a1d29912ed2572bb594bd7d702310ae667b52
567909720b1d72923bdf3237b50f087923a32337
/src/Eclipse-IDE/org.robotframework.ide.eclipse.main.plugin/src/org/robotframework/ide/eclipse/main/plugin/assist/RedNewVariableProposal.java
49b4a8affd04a1b776d3f8844a6fbc8d9768820d
[ "Apache-2.0" ]
permissive
basilevs/RED
83629224748d9341e7dc03b0d41f20a7e447ce41
eee55160bd5888704486e32a54f117ec59cf34dd
refs/heads/master
2022-11-07T07:22:40.160556
2020-04-28T10:42:19
2020-04-28T11:16:50
273,161,761
0
0
NOASSERTION
2020-06-18T06:42:02
2020-06-18T06:42:02
null
UTF-8
Java
false
false
2,131
java
/* * Copyright 2016 Nokia Solutions and Networks * Licensed under the Apache License, Version 2.0, * see license.txt file for details. */ package org.robotframework.ide.eclipse.main.plugin.assist; import java.util.EnumSet; import java.util.List; import org.eclipse.jface.resource.ImageDescriptor; import org.rf.ide.core.testdata.model.table.variables.AVariable.VariableType; import org.robotframework.ide.eclipse.main.plugin.views.documentation.inputs.DocumentationViewInput; import org.robotframework.ide.eclipse.main.plugin.views.documentation.inputs.SingleParagraphInput; import com.google.common.base.Preconditions; public class RedNewVariableProposal extends BaseAssistProposal { private final VariableType type; private final List<String> arguments; private final ImageDescriptor image; private final String label; private final String description; RedNewVariableProposal(final String content, final VariableType type, final List<String> arguments, final ImageDescriptor image, final String label, final String description) { super(content, ProposalMatch.EMPTY); Preconditions.checkArgument( EnumSet.of(VariableType.SCALAR, VariableType.LIST, VariableType.DICTIONARY).contains(type)); this.type = type; this.arguments = arguments; this.image = image; this.label = label; this.description = description; } public VariableType getType() { return type; } @Override public List<String> getArguments() { return arguments; } @Override public ImageDescriptor getImage() { return image; } @Override public String getLabel() { return label; } @Override public boolean isDocumented() { return true; } @Override public String getDescription() { return description; } @Override public DocumentationViewInput getDocumentationInput() { return new SingleParagraphInput(this::getDescription); } }
[ "michalanglart@users.noreply.github.com" ]
michalanglart@users.noreply.github.com
f11523ab05c87ad39c71d297e5e23c30d921a27b
d4e21881b569f6fe1c1781f7c933369909dac2e5
/java-programming-samples/functional/007-factory/src/main/java/org/joolzminer/examples/functional/domain/Stock.java
64ccf274c71215773a99696b657eb44716a60e23
[]
no_license
sergiofgonzalez/Java-Programming-Repo
985640c7d26cfb7e46afbc8babd8004f3098d13e
837d9f8365a594d2f766fcff76b5b98a06065bce
refs/heads/master
2021-01-21T22:26:12.158608
2015-05-04T07:12:08
2015-05-04T07:12:08
17,510,341
0
0
null
null
null
null
UTF-8
Java
false
false
132
java
package org.joolzminer.examples.functional.domain; public class Stock extends Product { public Stock() { super("stock"); } }
[ "sergio.f.gonzalez@gmail.com" ]
sergio.f.gonzalez@gmail.com
f303b886bda7d0b0b2cc02aef1bc1b9bb7fc3c65
c975ce10279b32864ca43c5046a7b596e496d04f
/app/src/main/java/liuliu/dkdjfordeliver/ui/TabEntity.java
d3856acf2c22fcd84d5e9083d7a3c87add21fc05
[]
no_license
Finderchangchang/DKDJForDeliver-master
bdb9a31b42f878b79ac6808417457d625be16327
b9f9e1b225e8d6529aadc3aea693cf83f2d53a9d
refs/heads/master
2021-09-16T04:21:59.441260
2018-06-16T10:12:52
2018-06-16T10:12:52
116,692,188
0
0
null
null
null
null
UTF-8
Java
false
false
683
java
package liuliu.dkdjfordeliver.ui; import com.flyco.tablayout.listener.CustomTabEntity; public class TabEntity implements CustomTabEntity { public String title; public int selectedIcon; public int unSelectedIcon; public TabEntity(String title, int selectedIcon, int unSelectedIcon) { this.title = title; this.selectedIcon = selectedIcon; this.unSelectedIcon = unSelectedIcon; } @Override public String getTabTitle() { return title; } @Override public int getTabSelectedIcon() { return selectedIcon; } @Override public int getTabUnselectedIcon() { return unSelectedIcon; } }
[ "1031066280@qq.com" ]
1031066280@qq.com
011d8c34113762dee960d68372891e9eed8f5594
2bc2eadc9b0f70d6d1286ef474902466988a880f
/tags/mule-2.0.0-M1/core/src/main/java/org/mule/umo/UMOEncryptionStrategy.java
ed6a2856c33343a1bc1d2a212c7c11ab928705eb
[]
no_license
OrgSmells/codehaus-mule-git
085434a4b7781a5def2b9b4e37396081eaeba394
f8584627c7acb13efdf3276396015439ea6a0721
refs/heads/master
2022-12-24T07:33:30.190368
2020-02-27T19:10:29
2020-02-27T19:10:29
243,593,543
0
0
null
2022-12-15T23:30:00
2020-02-27T18:56:48
null
UTF-8
Java
false
false
1,094
java
/* * $Id$ * -------------------------------------------------------------------------------------- * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com * * The software in this package is published under the terms of the MuleSource MPL * license, a copy of which has been included with this distribution in the * LICENSE.txt file. */ package org.mule.umo; import org.mule.umo.lifecycle.Initialisable; import org.mule.umo.security.CryptoFailureException; /** * <code>UMOEncryptionStrategy</code> can be used to provide different types of * Encryption strategy objects. These can be configured with different information * relivant with the encryption method being used. for example for Password Based * Encryption (PBE) a password, salt, iteration count and algorithm may be set on the * strategy. */ public interface UMOEncryptionStrategy extends Initialisable { public String getName(); byte[] encrypt(byte[] data, Object info) throws CryptoFailureException; byte[] decrypt(byte[] data, Object info) throws CryptoFailureException; }
[ "tcarlson@bf997673-6b11-0410-b953-e057580c5b09" ]
tcarlson@bf997673-6b11-0410-b953-e057580c5b09
c6728b3f28bc83dfedea96112dd650ea3e7f792a
8977f8b41a4b2ac1e773249a51d260c76da57292
/src/main/java/com/hyva/restopos/rest/entities/SubModule.java
d0b6611a608b0fd0fbc447a4963067a9bd893a90
[]
no_license
ksourav796/Antheysthi
012983f41e40737e501de14cb71288f41d39850f
0b38f04f7824c5f8b2e0a82be6595081e9b86edb
refs/heads/master
2022-07-09T19:21:07.822851
2020-03-22T15:20:15
2020-03-22T15:20:15
249,203,916
0
0
null
2022-07-07T23:17:56
2020-03-22T14:43:53
JavaScript
UTF-8
Java
false
false
1,212
java
package com.hyva.restopos.rest.entities; import lombok.Data; import org.hibernate.annotations.GenericGenerator; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import java.io.Serializable; @Data @Entity public class SubModule implements Serializable { @Id @GenericGenerator(name = "native", strategy = "native") @GeneratedValue(strategy = GenerationType.AUTO,generator = "native") private Long id; private String subModuleName; private String status; private String moduleName; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getSubModuleName() { return subModuleName; } public void setSubModuleName(String subModuleName) { this.subModuleName = subModuleName; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public String getModuleName() { return moduleName; } public void setModuleName(String moduleName) { this.moduleName = moduleName; } }
[ "ksourav796.sk@gmail.com" ]
ksourav796.sk@gmail.com
8d21896012ba07360b3b3323745a94f4e610e8cd
74ae24d049cfcab4f477dde92367094890aec688
/components/client_invoice_entities_dao/src/java/main/com/topcoder/clients/invoices/dao/GenericDAO.java
ba0d193fe8d3c885567efd2d4201f7631023e3e6
[]
no_license
appirio-tech/direct-app
8fa562f769db792eb244948f0d375604ac853ef1
002aa5e67064a85ed9752d651d86403b1268cf38
refs/heads/dev
2023-08-09T20:01:29.514463
2022-12-21T01:19:53
2022-12-21T01:19:53
23,885,120
21
78
null
2022-12-21T01:41:11
2014-09-10T17:49:11
Java
UTF-8
Java
false
false
2,863
java
/* * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. */ package com.topcoder.clients.invoices.dao; import java.util.List; import com.topcoder.clients.invoices.model.IdentifiableEntity; /** * <p>This interface represents a generic DAO for managing entities in persistence. It defines methods for creating, * updating, deleting and retrieving entities to/from persistence.</p> * * <p><strong>Thread safety:</strong> Implementations of this interface must be thread safe when entities passed to them * are used by the caller in thread safe manner.</p> * * @author flexme * @version 1.0 * @param <T> the type of the entity to be managed by this DAO */ public interface GenericDAO<T extends IdentifiableEntity> { /** * <p>Creates the given entity in the persistence.</p> * * @param entity the entity to be created in the persistence * * @return the generated entity ID * * @throws IllegalArgumentException if entity is null * @throws InvoiceDAOException if some other error occurred */ long create(T entity) throws InvoiceDAOException; /** * <p>Updates the given entity in the persistence.</p> * * @param entity the entity to be updated in the persistence * * @throws IllegalArgumentException if entity is null or entity.getId() <= 0 * @throws EntityNotFoundException if entity with the same ID cannot be found in the persistence * @throws InvoiceDAOException if some other error occurred */ void update(T entity) throws InvoiceDAOException; /** * <p>Deletes an entity with the given ID from the persistence.</p> * * @param entityId the ID of the entity to be deleted * * @throws IllegalArgumentException if entityId <= 0 * @throws EntityNotFoundException if entity with the given ID doesn't exist in the persistence * @throws InvoiceDAOException if some other error occurred */ void delete(long entityId) throws InvoiceDAOException; /** * <p>Retrieves an entity from persistence by its ID. Returns null if entity with the given ID is not found.</p> * * @param entityId the ID of the entity to be retrieved * * @return the entity with the specified ID retrieved from the persistence or null if not found * * @throws IllegalArgumentException if entityId <= 0 * @throws InvoiceDAOException if some other error occurred */ T retrieve(long entityId) throws InvoiceDAOException; /** * <p>Retrieves all entities from the persistence. Returns an empty list if no entities are found.</p> * * @return the list of entities found in the persistence (not null, doesn't contain null) * * @throws InvoiceDAOException if any error occurred */ List<T> retrieveAll() throws InvoiceDAOException; }
[ "hohosky@gmail.com" ]
hohosky@gmail.com
e6c02b4c92ad9a3802fa384bb51d0e8777ab3780
d56aab67eb85c7dd99f83c94d2e38a15673429c9
/mymeishi/src/main/java/com/shanjing/mymeishi/bean/AddShopBean.java
13382d4a74dc2295969648b75fb454778461a85a
[]
no_license
cuiwenju2017/rdgzh-hotspot
b2e732433027f45475b09ed986688f37a0a9ec34
f9f9aa3db7961e3e37ca661bbb92ac1b45e2dae8
refs/heads/master
2020-08-26T15:23:59.265857
2019-10-23T12:43:56
2019-10-23T12:43:56
217,053,159
0
0
null
null
null
null
UTF-8
Java
false
false
229
java
package com.shanjing.mymeishi.bean; public class AddShopBean { private String isAdd; public String getIsAdd() { return isAdd; } public void setIsAdd(String isAdd) { this.isAdd = isAdd; } }
[ "1755140651@qq.com" ]
1755140651@qq.com
dfec03acc031230481da23fe3d3118dd0e7ed472
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_345/Testnull_34478.java
524d35287472a8d8f5ef15db9e1e3355ae70acf7
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
308
java
package org.gradle.test.performancenull_345; import static org.junit.Assert.*; public class Testnull_34478 { private final Productionnull_34478 production = new Productionnull_34478("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
ead0f9c7ad8dd32db562a47c6567e164ea2eca96
082e26b011e30dc62a62fae95f375e4f87d9e99c
/docs/weixin_7.0.4_source/反编译源码/反混淆后/src/main/java/com/tencent/p177mm/plugin/facedetect/model/C11810f.java
866f2312760915d64ff0f9231fefc4d215aec50c
[]
no_license
xsren/AndroidReverseNotes
9631a5aabc031006e795a112b7ac756a8edd4385
9202c276fe9f04a978e4e08b08e42645d97ca94b
refs/heads/master
2021-04-07T22:50:51.072197
2019-07-16T02:24:43
2019-07-16T02:24:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,536
java
package com.tencent.p177mm.plugin.facedetect.model; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.os.Bundle; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.p177mm.kernel.C1720g; import com.tencent.p177mm.plugin.facedetect.FaceProNative; import com.tencent.p177mm.plugin.facedetect.p403ui.FaceDetectPrepareUI; import com.tencent.p177mm.plugin.facedetect.service.FaceDetectProcessService; import com.tencent.p177mm.plugin.zero.p757b.C7234a; import com.tencent.p177mm.sdk.platformtools.C4990ab; import com.tencent.p177mm.sdk.platformtools.C4996ah; import com.tencent.p177mm.sdk.platformtools.C5004al; import com.tencent.p177mm.sdk.platformtools.C5046bo; import com.tencent.p177mm.sdk.platformtools.C7306ak; /* renamed from: com.tencent.mm.plugin.facedetect.model.f */ public enum C11810f { ; private static C5004al lTN; public FaceDetectProcessService lTM; private C11810f(String str) { this.lTM = null; } static { lTN = new C5004al("face_process"); AppMethodBeat.m2505o(213); } /* renamed from: V */ public static void m19659V(Runnable runnable) { AppMethodBeat.m2504i(202); lTN.mo10302aa(runnable); AppMethodBeat.m2505o(202); } public static void bsz() { AppMethodBeat.m2504i(203); lTN.doN().removeCallbacksAndMessages(null); AppMethodBeat.m2505o(203); } public static C7306ak bsA() { AppMethodBeat.m2504i(204); C7306ak doN = lTN.doN(); AppMethodBeat.m2505o(204); return doN; } /* renamed from: ha */ public static boolean m19662ha(boolean z) { AppMethodBeat.m2504i(205); C4990ab.m7417i("MicroMsg.FaceDetectManager", "alvinluo: face detect isCheckDynCfg: %b", Boolean.valueOf(z)); boolean dL = C11810f.m19661dL(C4996ah.getContext()); boolean bsN = C43036p.bsN(); if (z) { boolean z2; if (C5046bo.getInt(((C7234a) C1720g.m3528K(C7234a.class)).mo15608Nu().getValue("BioSigFaceEntry"), 0) == 1) { z2 = true; } else { z2 = false; } C4990ab.m7417i("MicroMsg.FaceDetectManager", "hy: face config support: %b, hardware support: %b, isModelFileValid: %b", Boolean.valueOf(z2), Boolean.valueOf(dL), Boolean.valueOf(bsN)); if (!z2 || (dL & bsN) == 0) { AppMethodBeat.m2505o(205); return false; } AppMethodBeat.m2505o(205); return true; } C4990ab.m7417i("MicroMsg.FaceDetectManager", "hy: hardware support: %b, isModelFileValid: %b", Boolean.valueOf(dL), Boolean.valueOf(bsN)); if (bsN && dL) { AppMethodBeat.m2505o(205); return true; } AppMethodBeat.m2505o(205); return false; } public static boolean bsB() { AppMethodBeat.m2504i(138982); boolean bsN = C43036p.bsN(); AppMethodBeat.m2505o(138982); return bsN; } /* renamed from: dL */ static boolean m19661dL(Context context) { AppMethodBeat.m2504i(207); boolean hasSystemFeature = context.getPackageManager().hasSystemFeature("android.hardware.camera.front"); AppMethodBeat.m2505o(207); return hasSystemFeature; } /* renamed from: a */ public static boolean m19660a(Context context, Bundle bundle, int i) { AppMethodBeat.m2504i(208); C4990ab.m7416i("MicroMsg.FaceDetectManager", "start wx internal face verify"); if (context == null || bundle == null) { AppMethodBeat.m2505o(208); return false; } Intent intent = new Intent(context, FaceDetectPrepareUI.class); intent.putExtras(bundle); ((Activity) context).startActivityForResult(intent, i); AppMethodBeat.m2505o(208); return true; } public final int bsC() { AppMethodBeat.m2504i(209); C43032g c43032g = this.lTM.lVR; if (c43032g.lTP == null) { C4990ab.m7412e("MicroMsg.FaceDetectNativeManager", "hy: init motion no instance"); AppMethodBeat.m2505o(209); return -3; } int engineReleaseCurrMotion = c43032g.lTP.engineReleaseCurrMotion(); AppMethodBeat.m2505o(209); return engineReleaseCurrMotion; } public final int bsD() { AppMethodBeat.m2504i(210); C43032g c43032g = this.lTM.lVR; if (c43032g.lTP == null) { C4990ab.m7412e("MicroMsg.FaceDetectNativeManager", "hy: getCurrentMotion not init"); AppMethodBeat.m2505o(210); return -1; } int engineGetCurrMotion = c43032g.lTP.engineGetCurrMotion(); AppMethodBeat.m2505o(210); return engineGetCurrMotion; } public final int bsF() { AppMethodBeat.m2504i(212); C43032g c43032g = this.lTM.lVR; if (c43032g.lTP == null) { C4990ab.m7412e("MicroMsg.FaceDetectNativeManager", "hy: startRecord not init"); AppMethodBeat.m2505o(212); return -1; } int engineGroupChange = c43032g.lTP.engineGroupChange(); AppMethodBeat.m2505o(212); return engineGroupChange; } public static int bsE() { AppMethodBeat.m2504i(211); int engineVersion = FaceProNative.engineVersion(); AppMethodBeat.m2505o(211); return engineVersion; } }
[ "alwangsisi@163.com" ]
alwangsisi@163.com
42d68b966d14c6972b1746e97848d7e9af6fdab2
e682fa3667adce9277ecdedb40d4d01a785b3912
/internal/fischer/mangf/A106708.java
9b45e2baba5f6af5cbbe70c08638a9f7b5d66579
[ "Apache-2.0" ]
permissive
gfis/joeis-lite
859158cb8fc3608febf39ba71ab5e72360b32cb4
7185a0b62d54735dc3d43d8fb5be677734f99101
refs/heads/master
2023-08-31T00:23:51.216295
2023-08-29T21:11:31
2023-08-29T21:11:31
179,938,034
4
1
Apache-2.0
2022-06-25T22:47:19
2019-04-07T08:35:01
Roff
UTF-8
Java
false
false
682
java
package irvine.oeis.a106; // manually anopan 1,1 import irvine.math.z.Z; import irvine.factor.factor.Jaguar; import irvine.math.z.Z; import irvine.oeis.Sequence1; /** * A106708 a(n) is the concatenation of its nontrivial divisors. * @author Georg Fischer */ public class A106708 extends Sequence1 { private Z mN = Z.ZERO; @Override public Z next() { mN = mN.add(1); if (Z.ONE.equals(mN) || mN.isProbablePrime()) { return Z.ZERO; } final StringBuilder sb = new StringBuilder(); for (final Z d : Jaguar.factor(mN).divisorsSorted()) { if (!Z.ONE.equals(d) && !mN.equals(d)) { sb.append(d); } } return new Z(sb); } }
[ "dr.Georg.Fischer@gmail.com" ]
dr.Georg.Fischer@gmail.com
05ed0ac01631f34d1efd4d077dad763074cb824c
a59c242afce0e7c7c5d356dbab13b376036c879b
/javanco/src/ch/epfl/javancox/experiments/builder/SubExperimentCockpitExample.java
a97cdb0f798c5f109038f6237719d2e93ed663ff
[]
no_license
ShijiaYan/PhoenixSim
1dbf2c5bf0c1ca00828dfea0104f7077d6221ed5
2b9248e690c43b5bebd80a8de9af2034c89b0822
refs/heads/master
2022-12-13T11:56:12.332556
2020-06-18T04:32:47
2020-06-18T04:32:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,128
java
package ch.epfl.javancox.experiments.builder; import java.io.File; import ch.epfl.general_libraries.experiment_aut.Experiment; import ch.epfl.general_libraries.experiment_aut.WrongExperimentException; import ch.epfl.general_libraries.logging.Logger; import ch.epfl.general_libraries.results.AbstractResultsDisplayer; import ch.epfl.general_libraries.results.AbstractResultsManager; public class SubExperimentCockpitExample { private static final long serialVersionUID = 1L; @SuppressWarnings("unchecked") public static void main(String[] args) { try { String pre = null; String log4jFile = null; String defaultFile = null; if (args.length > 0) { if (args[0].equals("-help") || args[0].equals("help") || args[0].equals("-h") || args[0].equals("usage")) { printUsage(); } for (int i = 0 ; i < args.length ; i++) { if (args[i].equals("-p")) { pre = args[i+1]; } if (args[i].equals("-l")) { log4jFile = args[i+1]; } if (args[i].equals("-default")) { defaultFile = args[i+1]; } } } if (log4jFile != null) { Logger.initLogger(new File(log4jFile)); } ExperimentConfigurationCockpit co; if (pre != null) { co = new ExperimentConfigurationCockpit(ExampleSubExperiment.class, pre.split(";")); } else { co = new ExperimentConfigurationCockpit(ExampleSubExperiment.class); } if (defaultFile != null) { co.show(defaultFile); } else { co.show(); } } catch(Exception e) { e.printStackTrace(); } } private static void printUsage() { System.out.println("Usage : [-p <prefixes, ;-separated>][-l <log4j config file>]"); System.exit(0); } public static class Example implements ExampleSubExperiment { private int i; public Example(int i) { this.i = i; } @Override public void run(AbstractResultsManager man, AbstractResultsDisplayer dis) throws WrongExperimentException { System.out.println(i); } } } interface ExampleSubExperiment extends Experiment {}
[ "45582332+ShijiaYan@users.noreply.github.com" ]
45582332+ShijiaYan@users.noreply.github.com
37c02e56621fcb26cc3ba9e4ecde279fc83de9e5
75ae6cfc80546fcef4d95e47854f0d3c5fff216a
/RecursionAndBackTracking/StringPermutationAlgorithm/StringPermutationCombination.java
43002154aa4b6691ad248b73bed72b4cd99f4295
[]
no_license
rrrituraj/Data-Structure
76e15a10b18c0c34483dc07c40d8ddaa942ceb81
31caa71a66083da55d4e7f39340c70a6a62efd29
refs/heads/master
2022-09-08T06:29:33.278603
2021-10-17T09:21:36
2021-10-17T09:21:36
87,195,325
0
0
null
2021-10-17T09:21:37
2017-04-04T14:16:47
Java
UTF-8
Java
false
false
3,155
java
package RecursionAndBackTracking.StringPermutationAlgorithm; import java.util.Map; import java.util.TreeMap; public class StringPermutationCombination { public void permute(char input[]) { Map<Character, Integer> countMap = new TreeMap<>(); for (char ch : input) { countMap.compute( ch, (k, v) -> { if (v == null) { return 1; } else { return v + 1; } }); } char str[] = new char[countMap.size()]; int count[] = new int[countMap.size()]; int index = 0; for (Map.Entry<Character, Integer> entry : countMap.entrySet()) { str[index] = entry.getKey(); count[index] = entry.getValue(); index++; } char result[] = new char[input.length]; permuteUtil(str, count, result, 0); // combination(str, count, 0, result, 0); } public void combination(char input[]) { Map<Character, Integer> countMap = new TreeMap<>(); for (char ch : input) { countMap.compute( ch, (k, v) -> { if (v == null) { return 1; } else { return v + 1; } }); } char str[] = new char[countMap.size()]; int count[] = new int[countMap.size()]; int index = 0; for (Map.Entry<Character, Integer> entry : countMap.entrySet()) { str[index] = entry.getKey(); count[index] = entry.getValue(); index++; } char result[] = new char[input.length]; // permuteUtil(str, count, result, 0); combination(str, count, 0, result, 0); } private void combination(char[] str, int[] count, int pos, char[] result, int len) { print(result, len); for (int i = pos; i < str.length; i++) { if (count[i] == 0) { continue; } result[len] = str[i]; count[i]--; combination(str, count, i, result, len + 1); count[i]++; } } private void permuteUtil(char[] str, int[] count, char[] result, int level) { if (level == result.length) { printArray(result); return; } for (int i = 0; i < str.length; i++) { if (count[i] == 0) { continue; } result[level] = str[i]; count[i]--; permuteUtil(str, count, result, level + 1); count[i]++; } } private void printArray(char[] result) { for (char ch : result) { System.out.print(ch + " "); } System.out.println(); } private void print(char[] result, int position) { for (int i = 0; i < position; i++) { System.out.print(result[i] + " "); } System.out.println(); } }
[ "you@example.com" ]
you@example.com
cf4df238a6738eda236f11ed16b290ab5bdc4786
693c7da6bdffc80090419a249ffd4989139875cf
/src/main/java/lt/bt/messager/messanger/entity/UserEntity.java
c915ed739e98a0daa819ebd96010a44dafaf89d4
[]
no_license
mpetroska/webservice-messager
9fea93ed968c70e1be0e0d5ea5c7d15aa44e2146
0f531b8f10ea9c2e0b1bc902f538fdc2790f4d73
refs/heads/master
2020-03-30T00:55:14.279929
2018-09-27T07:56:13
2018-09-27T07:56:13
150,550,347
0
0
null
null
null
null
UTF-8
Java
false
false
1,828
java
package lt.bt.messager.messanger.entity; import com.fasterxml.jackson.annotation.JsonIgnore; import javax.persistence.*; import java.util.HashSet; import java.util.Set; @Entity(name = "users") public class UserEntity { @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "user_id") private Long userId; private String firstname; private String lastname; private String username; private String password; private Boolean enabled; @JsonIgnore @ManyToMany(fetch = FetchType.EAGER) @JoinTable(name = "users_roles", joinColumns = { @JoinColumn(name = "user_id") }, inverseJoinColumns = { @JoinColumn(name = "role_id") }) private Set<Role> roles = new HashSet<Role>(); public UserEntity() { } public Long getUserId() { return userId; } public void setUserId(Long userId) { this.userId = userId; } public String getFirstname() { return firstname; } public void setFirstname(String firstname) { this.firstname = firstname; } public String getLastname() { return lastname; } public void setLastname(String lastname) { this.lastname = lastname; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public Boolean getEnabled() { return enabled; } public void setEnabled(Boolean enabled) { this.enabled = enabled; } public Set<Role> getRoles() { return roles; } public void setRoles(Set<Role> roles) { this.roles = roles; } }
[ "none" ]
none
f79b9a651b649f0f9922701bc39a3b1e67211967
37f59922a5c37b7856fc3ee35927d6052e84c9a7
/kubernetes/src/main/java/io/kubernetes/client/models/V1DaemonSetSpec.java
556f86a52cfc85fc36d35b0cf7fd5ad962838bc6
[ "Apache-2.0" ]
permissive
stu-jenkins-demos/java
0fd4dbd37e1c9537d4aeffe7a49383062b71a31a
ba3b1cd738ff0105bd6e69cb80e6644378bfd035
refs/heads/master
2020-04-27T12:35:32.938187
2019-03-08T08:22:38
2019-03-08T08:22:38
174,336,708
0
1
Apache-2.0
2019-03-08T07:39:38
2019-03-07T12:05:38
Java
UTF-8
Java
false
false
7,220
java
/* * Kubernetes * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * OpenAPI spec version: v1.12.2 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package io.kubernetes.client.models; import java.util.Objects; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.kubernetes.client.models.V1DaemonSetUpdateStrategy; import io.kubernetes.client.models.V1LabelSelector; import io.kubernetes.client.models.V1PodTemplateSpec; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; /** * DaemonSetSpec is the specification of a daemon set. */ @ApiModel(description = "DaemonSetSpec is the specification of a daemon set.") public class V1DaemonSetSpec { @SerializedName("minReadySeconds") private Integer minReadySeconds = null; @SerializedName("revisionHistoryLimit") private Integer revisionHistoryLimit = null; @SerializedName("selector") private V1LabelSelector selector = null; @SerializedName("template") private V1PodTemplateSpec template = null; @SerializedName("updateStrategy") private V1DaemonSetUpdateStrategy updateStrategy = null; public V1DaemonSetSpec minReadySeconds(Integer minReadySeconds) { this.minReadySeconds = minReadySeconds; return this; } /** * The minimum number of seconds for which a newly created DaemonSet pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready). * @return minReadySeconds **/ @ApiModelProperty(value = "The minimum number of seconds for which a newly created DaemonSet pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready).") public Integer getMinReadySeconds() { return minReadySeconds; } public void setMinReadySeconds(Integer minReadySeconds) { this.minReadySeconds = minReadySeconds; } public V1DaemonSetSpec revisionHistoryLimit(Integer revisionHistoryLimit) { this.revisionHistoryLimit = revisionHistoryLimit; return this; } /** * The number of old history to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10. * @return revisionHistoryLimit **/ @ApiModelProperty(value = "The number of old history to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.") public Integer getRevisionHistoryLimit() { return revisionHistoryLimit; } public void setRevisionHistoryLimit(Integer revisionHistoryLimit) { this.revisionHistoryLimit = revisionHistoryLimit; } public V1DaemonSetSpec selector(V1LabelSelector selector) { this.selector = selector; return this; } /** * A label query over pods that are managed by the daemon set. Must match in order to be controlled. It must match the pod template&#39;s labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors * @return selector **/ @ApiModelProperty(required = true, value = "A label query over pods that are managed by the daemon set. Must match in order to be controlled. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors") public V1LabelSelector getSelector() { return selector; } public void setSelector(V1LabelSelector selector) { this.selector = selector; } public V1DaemonSetSpec template(V1PodTemplateSpec template) { this.template = template; return this; } /** * An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template&#39;s node selector (or on every node if no node selector is specified). More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template * @return template **/ @ApiModelProperty(required = true, value = "An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template") public V1PodTemplateSpec getTemplate() { return template; } public void setTemplate(V1PodTemplateSpec template) { this.template = template; } public V1DaemonSetSpec updateStrategy(V1DaemonSetUpdateStrategy updateStrategy) { this.updateStrategy = updateStrategy; return this; } /** * An update strategy to replace existing DaemonSet pods with new pods. * @return updateStrategy **/ @ApiModelProperty(value = "An update strategy to replace existing DaemonSet pods with new pods.") public V1DaemonSetUpdateStrategy getUpdateStrategy() { return updateStrategy; } public void setUpdateStrategy(V1DaemonSetUpdateStrategy updateStrategy) { this.updateStrategy = updateStrategy; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } V1DaemonSetSpec v1DaemonSetSpec = (V1DaemonSetSpec) o; return Objects.equals(this.minReadySeconds, v1DaemonSetSpec.minReadySeconds) && Objects.equals(this.revisionHistoryLimit, v1DaemonSetSpec.revisionHistoryLimit) && Objects.equals(this.selector, v1DaemonSetSpec.selector) && Objects.equals(this.template, v1DaemonSetSpec.template) && Objects.equals(this.updateStrategy, v1DaemonSetSpec.updateStrategy); } @Override public int hashCode() { return Objects.hash(minReadySeconds, revisionHistoryLimit, selector, template, updateStrategy); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class V1DaemonSetSpec {\n"); sb.append(" minReadySeconds: ").append(toIndentedString(minReadySeconds)).append("\n"); sb.append(" revisionHistoryLimit: ").append(toIndentedString(revisionHistoryLimit)).append("\n"); sb.append(" selector: ").append(toIndentedString(selector)).append("\n"); sb.append(" template: ").append(toIndentedString(template)).append("\n"); sb.append(" updateStrategy: ").append(toIndentedString(updateStrategy)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "bburns@microsoft.com" ]
bburns@microsoft.com
9ad897422bf9a7ba8f480947170eed40a6e2656d
a695eac710fe15bb64c86869dcedfb8e402a5001
/fluent-mybatis-test/src/test/java/cn/org/atool/fluent/mybatis/test/free/customized/MyCustomerInterfaceTest.java
1b0984643402da3c9a27a9c894dff68199e8d0d7
[ "Apache-2.0" ]
permissive
atool/fluent-mybatis
33e6eb3dccac0db264fcb3c531005d7a28ab7d20
500522573c82d470d33a1f347903597edad4808d
refs/heads/master
2023-06-22T13:50:12.298938
2022-12-22T11:04:06
2022-12-22T11:04:06
218,672,433
789
84
Apache-2.0
2023-06-15T09:18:27
2019-10-31T02:57:34
Java
UTF-8
Java
false
false
867
java
package cn.org.atool.fluent.mybatis.test.free.customized; import cn.org.atool.fluent.mybatis.generator.shared2.mapper.HomeAddressMapper; import cn.org.atool.fluent.mybatis.generator.shared2.wrapper.HomeAddressUpdate; import cn.org.atool.fluent.mybatis.test.BaseTest; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; class MyCustomerInterfaceTest extends BaseTest { @Autowired HomeAddressMapper mapper; @Test void test() { HomeAddressUpdate.updater() .set.city().is("ccc").end() .where.id().eq(1L).end() .of(mapper).updateBy(); db.sqlList().wantFirstSql().eq("" + "UPDATE `home_address` " + "SET `gmt_modified` = now(), `address` = ?, `city` = ? " + "WHERE `is_deleted` = ? AND `env` = ? AND `id` = ?"); } }
[ "darui.wu@163.com" ]
darui.wu@163.com
a1b80d3980bf929cba77290d6eeccbae7f5434d9
98503f4fef67ed9d01ce54ecac0267bf48adfa75
/Practices/src/free/InD5.java
a69d4a0dce422ff6caa8fe086e89d4c73ce2233d
[]
no_license
kiribeam/practices
9a35bf01e93bf152a8371c9094c5606642242e0b
e60de9cb6c7d23d919403aabe3e415c04764f7cf
refs/heads/master
2020-06-26T11:19:13.125241
2019-07-30T09:28:40
2019-07-30T09:28:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,314
java
import java.util.*; public class InD5{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); String s = sc.next(); int[] counts = new int[26]; int length = s.length(); for(int i=0; i<length; i++){ counts[s.charAt(i) - 'a'] ++; } int max = 0; for(int i : counts){ if(length%2 == 0 && i>length/2){ System.out.println("-1"); return; }else if(length%2 !=0 && i>(length/2+1)){ System.out.println("-1"); return; } max = max>i ? max : i; } StringBuilder sb= new StringBuilder(""); String result = sort(sb, counts, -1, max); System.out.println(result); } public static String sort(StringBuilder s, int[] counts, int ignore, int max){ for(int i=0; i<counts.length; i++){ if(counts[i] != 0 && i !=ignore){ //System.out.println("now ignore is" + ignore + " : " + s); s = s.append((char)('a' + i) + ""); counts[i] --; return sort(s, counts, i, max); } } if(counts[ignore] > 0) { int exist = max - counts[ignore]; while(counts[ignore] > 0){ s.insert(s.length()-2*exist, (char) (ignore + 'a')); exist ++; counts[ignore] --; } return s.toString(); }else return s.toString(); } }
[ "kiribeam@outlook.com" ]
kiribeam@outlook.com
370e2388108177a30bcd6ef5e88720451561052f
d4880ab76f3ec23930eff43fb37cd659bdeb4c1f
/aliyun-java-sdk-idrsservice/src/main/java/com/aliyuncs/idrsservice/model/v20200630/GetUserRequest.java
6b1d3d0fb0c05778996f0c5f031cf1c84e2c7d64
[ "Apache-2.0" ]
permissive
kentzh/aliyun-openapi-java-sdk
8337aa40b881beb411532978253310f540baaf74
b73c11ed753aa90325e3f41eaec7bcd55a55494e
refs/heads/master
2022-12-04T16:36:16.771365
2020-08-18T06:56:40
2020-08-18T06:56:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,214
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.idrsservice.model.v20200630; import com.aliyuncs.RpcAcsRequest; import com.aliyuncs.http.MethodType; /** * @author auto create * @version */ public class GetUserRequest extends RpcAcsRequest<GetUserResponse> { private String id; public GetUserRequest() { super("idrsservice", "2020-06-30", "GetUser", "idrsservice"); setMethod(MethodType.POST); } public String getId() { return this.id; } public void setId(String id) { this.id = id; if(id != null){ putQueryParameter("Id", id); } } @Override public Class<GetUserResponse> getResponseClass() { return GetUserResponse.class; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
4874d07988b1684ad4b6695cbb70a6aa42be91dd
0e65f01a122f4590430d387c0495bcc5c0d1e173
/src/main/java/cn/edu/nju/nowcode/vo/UserInfoVO.java
3439f76f4f6adefd059477f4589d5f15be77cba8
[]
no_license
congye6/nowcode
96e157dc0d1da4e73521c85ae273d15b902afce3
9ac539eb47a09813bdecdabc0faad90768d65f98
refs/heads/master
2020-03-17T00:51:55.906481
2018-07-13T14:00:17
2018-07-13T14:00:17
133,132,856
0
0
null
null
null
null
UTF-8
Java
false
false
1,305
java
package cn.edu.nju.nowcode.vo; /** * 关注的人或粉丝的基本信息 */ public class UserInfoVO { /** * 用户名称 */ private String userId; /** * 粉丝数量 */ private Integer fansCount; /** * 关注的人数量 */ private Integer followerCount; /** * 发布的问题数量 */ private Integer questionCount; /** * 被赞数量 */ private Integer likeCount; public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } public Integer getFansCount() { return fansCount; } public void setFansCount(Integer fansCount) { this.fansCount = fansCount; } public Integer getFollowerCount() { return followerCount; } public void setFollowerCount(Integer followerCount) { this.followerCount = followerCount; } public Integer getQuestionCount() { return questionCount; } public void setQuestionCount(Integer questionCount) { this.questionCount = questionCount; } public Integer getLikeCount() { return likeCount; } public void setLikeCount(Integer likeCount) { this.likeCount = likeCount; } }
[ "244053679@qq.com" ]
244053679@qq.com
ea36e0aad0219f9c4683cfa87513dd8d36ed93d8
ca93de9d15504d495bac121fc3599e88b51eb61d
/src/main/java/io/github/phantamanta44/libnine/util/collection/BitField.java
d57b8a729cf8aaa86fdec96daab2d715d0f9c8a4
[ "MIT" ]
permissive
phantamanta44/libnine
2d40a5c7aac1bbbbc9a409a6a57b445dd3708379
721b1bb300e3edd49efb9093757f70b4601b29ff
refs/heads/1.12.2
2021-12-22T04:10:04.126254
2021-10-29T22:22:02
2021-10-29T22:22:02
138,251,637
2
2
MIT
2021-11-28T22:09:15
2018-06-22T03:45:24
Java
UTF-8
Java
false
false
1,073
java
package io.github.phantamanta44.libnine.util.collection; public class BitField { private final int length; private final byte[] field; public BitField(int length) { this.length = length; this.field = new byte[(int)Math.ceil(length / 8F)]; } public byte[] getBackingByteArray() { return field; } public boolean get(int index) { checkIndex(index); return (field[index / 8] & (1 << (index % 8))) != 0; } public void set(int index, boolean value) { checkIndex(index); if (value) { field[index / 8] |= 1 << (index % 8); } else { field[index / 8] &= ~(1 << (index % 8)); } } public void flip(int index) { checkIndex(index); field[index / 8] ^= 1 << (index % 8); } private void checkIndex(int index) { if (index < 0 || index >= length) { throw new IndexOutOfBoundsException( String.format("Index %d outside bitfield length of %d!", index, length)); } } }
[ "evandalong@gmail.com" ]
evandalong@gmail.com
5b0a6c278a2f4ca1ed571f65b8eec0d6531c32f8
8e67fdab6f3a030f38fa127a79050b8667259d01
/JavaStudyHalUk/src/MENTORING/oop/inheritance_2/employees/PartTimeEmployee.java
42adc69e282d6fc0fdb27cebcb531bd6f61bc9f3
[]
no_license
mosmant/JavaStudyHalUk
07e38ade6c7a31d923519a267a63318263c5910f
a41e16cb91ef307b50cfc497535126aa1e4035e5
refs/heads/master
2023-07-27T13:31:11.004490
2021-09-12T14:59:25
2021-09-12T14:59:25
405,671,965
0
0
null
null
null
null
UTF-8
Java
false
false
464
java
package MENTORING.oop.inheritance_2.employees; public class PartTimeEmployee extends Employee { private int hourlyRate; public PartTimeEmployee(int id, String name) { super(id, name); } //i can assign salary in constructor or create a setter method public void setHourlyRate(int hourlyRate) { this.hourlyRate = hourlyRate; } @Override public double payIncrement() { return hourlyRate * 0.1; } }
[ "mottnr@gmail.com" ]
mottnr@gmail.com
a3121bb8d4905a185de134ce338a787ee14db3b1
8d2ecb3cba702d505c77318007b1a096ec6057a3
/aCis_gameserver/java/net/sf/l2j/gameserver/network/gameserverpackets/ServerStatus.java
fc864b405cfb3638bab8f95f4453655517c3a74c
[]
no_license
thevinou/ProjectL
b054ce30311f4a89c0ec93d4cbf86717b229cfaf
f0dfb9298b6ae1d0f00bd9b249120f90cbfc1c83
refs/heads/master
2016-09-05T17:25:29.161384
2015-01-30T08:52:57
2015-01-30T08:52:57
29,908,866
1
0
null
null
null
null
UTF-8
Java
false
false
2,269
java
/* * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * this program. If not, see <http://www.gnu.org/licenses/>. */ package net.sf.l2j.gameserver.network.gameserverpackets; import java.util.ArrayList; import java.util.List; /** * @author -Wooden- */ public class ServerStatus extends GameServerBasePacket { private final List<Attribute> _attributes; public static final String[] STATUS_STRING = { "Auto", "Good", "Normal", "Full", "Down", "Gm Only" }; public static final int SERVER_LIST_STATUS = 0x01; public static final int SERVER_LIST_CLOCK = 0x02; public static final int SERVER_LIST_SQUARE_BRACKET = 0x03; public static final int MAX_PLAYERS = 0x04; public static final int TEST_SERVER = 0x05; public static final int STATUS_AUTO = 0x00; public static final int STATUS_GOOD = 0x01; public static final int STATUS_NORMAL = 0x02; public static final int STATUS_FULL = 0x03; public static final int STATUS_DOWN = 0x04; public static final int STATUS_GM_ONLY = 0x05; public static final int ON = 0x01; public static final int OFF = 0x00; class Attribute { public int id; public int value; Attribute(int pId, int pValue) { id = pId; value = pValue; } } public ServerStatus() { _attributes = new ArrayList<>(); } public void addAttribute(int id, int value) { _attributes.add(new Attribute(id, value)); } @Override public byte[] getContent() { writeC(0x06); writeD(_attributes.size()); for (int i = 0; i < _attributes.size(); i++) { Attribute temp = _attributes.get(i); writeD(temp.id); writeD(temp.value); } return getBytes(); } }
[ "thevinou@gmail.com" ]
thevinou@gmail.com
47504bf835ad2aaa4c7b2789077a6d33cce56895
f404f7198c91a0f91ed6d6dd0a1cda9adf3edbb1
/com/planet_ink/coffee_mud/MOBS/Goblin.java
3286884545c4260563f82979be25e01276655cf2
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
bbailey/ewok
1f1d35b219a6ebd33fd3ad3d245383d075ef457d
b4fcf4ba90c7460b19d0af56a3ecabbc88470f6f
refs/heads/master
2020-04-05T08:27:05.904034
2017-02-01T04:14:19
2017-02-01T04:14:19
656,100
0
0
null
null
null
null
UTF-8
Java
false
false
5,755
java
package com.planet_ink.coffee_mud.MOBS; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.planet_ink.coffee_mud.Behaviors.interfaces.*; import com.planet_ink.coffee_mud.CharClasses.interfaces.*; import com.planet_ink.coffee_mud.Commands.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.*; import com.planet_ink.coffee_mud.Exits.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.*; import com.planet_ink.coffee_mud.Libraries.interfaces.*; import com.planet_ink.coffee_mud.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; import java.util.*; /* Copyright 2000-2016 Lee H. Fox 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. */ public class Goblin extends StdMOB { @Override public String ID() { return "Goblin"; } Random randomizer = new Random(System.currentTimeMillis()); int birthType=0; public Goblin() { super(); final int goblinType = Math.abs(randomizer.nextInt() % 1000); setMOBSpecifics(goblinType); baseCharStats().setMyRace(CMClass.getRace("Goblin")); baseCharStats().getMyRace().startRacing(this,false); recoverMaxState(); resetToMaxState(); recoverPhyStats(); recoverCharStats(); } @Override public boolean tick(Tickable ticking, int tickID) { if(tickID==Tickable.TICKID_MOB) { if(birthType!=basePhyStats().ability()) setMOBSpecifics(basePhyStats().ability()); } return super.tick(ticking,tickID); } public void setMOBSpecifics(int goblinType) { if(!CMProps.getBoolVar(CMProps.Bool.MUDSTARTED)) return; if (goblinType < 0) goblinType *= -1; delAllItems(false); birthType=goblinType; setMoney(randomizer.nextInt() % 15); setWimpHitPoint(0); basePhyStats.setWeight(40 + Math.abs(randomizer.nextInt() % 30)); CMLib.factions().setAlignment(this,Faction.Align.EVIL); baseCharStats().setStat(CharStats.STAT_INTELLIGENCE,5 + Math.abs(randomizer.nextInt() % 6)); baseCharStats().setStat(CharStats.STAT_CHARISMA,2 + Math.abs(randomizer.nextInt() % 3)); basePhyStats().setArmor(75 + Math.abs(randomizer.nextInt() % 20)); basePhyStats().setLevel(1 + Math.abs(randomizer.nextInt() % 3)); basePhyStats().setAbility(goblinType); baseState.setHitPoints(CMLib.dice().roll(basePhyStats().level(),20,basePhyStats().level())); Weapon m=null; Armor c=null; if (goblinType >= 0 && goblinType <= 99) { username="a nasty Goblin"; setDescription("He\\`s dirty, cranky, and very smelly."); setDisplayText("A nasty goblin marches around."); m=CMClass.getWeapon("Mace"); } else if (goblinType >= 100 && goblinType <= 199) { username="a Goblin"; setDescription("He\\`s smelly and has red skin."); setDisplayText("A nasty goblin scuttles about."); m=CMClass.getWeapon("Mace"); } else if (goblinType >= 200 && goblinType <= 299) { username="an ugly Goblin"; setDescription("He\\`s dirty, cranky, and very smelly."); setDisplayText("A nasty goblin scurries nearby."); m=CMClass.getWeapon("Mace"); } else if (goblinType >= 300 && goblinType <= 399) { username="a Goblin female"; setDescription("She\\`s ugly and very smelly."); setDisplayText("A female goblin sits nearby."); } else if (goblinType >= 400 && goblinType <= 499) { username="a mean Goblin"; setDescription("He appears to be bigger...and smellier than most goblins."); setDisplayText("A mean goblin glares at you."); m=CMClass.getWeapon("Shortsword"); c = CMClass.getArmor("ChainMailArmor"); } else if (goblinType >= 500 && goblinType <= 599) { username="a smelly Goblin"; setDescription("He\\`s dirty, cranky, and very smelly."); setDisplayText("A nasty goblin sits nearby."); m=CMClass.getWeapon("Mace"); } else if (goblinType >= 600 && goblinType <= 699) { username="a Goblin"; setDescription("He\\`s dirty, cranky, and very smelly."); setDisplayText("A very smelly goblin stands near you."); m=CMClass.getWeapon("Mace"); } else if (goblinType >= 700 && goblinType <= 799) { username="a Goblin"; setDescription("He\\`s dirty, cranky, and very smelly."); setDisplayText("A nasty goblin glares are you with lemon colored eyes."); m=CMClass.getWeapon("Mace"); } else if (goblinType >= 800 && goblinType <= 899) { username="a Goblin"; setDescription("He\\`s dirty, cranky, and very smelly."); setDisplayText("A goblin stares are you with red eyes."); m=CMClass.getWeapon("Mace"); } else { username="an armed Goblin"; setDescription("He\\`s wielding a sword."); setDisplayText("A nasty goblin marches around."); m=CMClass.getWeapon("Shortsword"); } if(m!=null) { m.wearAt(Wearable.WORN_WIELD); addItem(m); } if(c!=null) { c.wearAt(Wearable.WORN_TORSO); addItem(c); } } }
[ "nosanity79@gmail.com" ]
nosanity79@gmail.com
335bcc2a83034facfc31516c52c3766d92c92cc7
f15889af407de46a94fd05f6226c66182c6085d0
/smartsis/src/main/java/com/oreon/smartsis/attendance/Attendance.java
f98a0eb12ca20aeda3d7112f6d18f45ed3fcbc72
[]
no_license
oreon/sfcode-full
231149f07c5b0b9b77982d26096fc88116759e5b
bea6dba23b7824de871d2b45d2a51036b88d4720
refs/heads/master
2021-01-10T06:03:27.674236
2015-04-27T10:23:10
2015-04-27T10:23:10
55,370,912
0
0
null
null
null
null
UTF-8
Java
false
false
4,347
java
package com.oreon.smartsis.attendance; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.Date; import javax.ws.rs.core.Response; import javax.persistence.*; import org.hibernate.validator.*; import org.apache.solr.analysis.LowerCaseFilterFactory; import org.apache.solr.analysis.SnowballPorterFilterFactory; import org.apache.solr.analysis.StandardTokenizerFactory; import org.hibernate.annotations.Cache; import org.hibernate.annotations.Formula; import org.hibernate.annotations.CacheConcurrencyStrategy; import org.hibernate.annotations.Filter; import org.hibernate.annotations.Cascade; import org.hibernate.search.annotations.AnalyzerDef; import org.hibernate.search.annotations.Analyzer; import org.hibernate.search.annotations.Field; import org.hibernate.search.annotations.Boost; import org.hibernate.search.annotations.Index; import org.hibernate.search.annotations.Indexed; import org.hibernate.search.annotations.Parameter; import org.hibernate.search.annotations.TokenFilterDef; import org.hibernate.search.annotations.TokenizerDef; import org.hibernate.search.annotations.ContainedIn; import org.hibernate.search.annotations.IndexedEmbedded; import org.hibernate.annotations.Filter; import org.hibernate.validator.Length; import org.hibernate.validator.NotNull; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlTransient; import org.jboss.seam.annotations.Name; import org.witchcraft.base.entity.BusinessEntity; import org.witchcraft.model.support.audit.Auditable; import org.witchcraft.base.entity.FileAttachment; import org.witchcraft.utils.*; import com.oreon.smartsis.ProjectUtils; @Entity @Table(name = "attendance") @Filter(name = "archiveFilterDef") @Name("attendance") @Indexed @Cache(usage = CacheConcurrencyStrategy.NONE) @Analyzer(definition = "entityAnalyzer") @XmlRootElement public class Attendance extends BusinessEntity implements java.io.Serializable { private static final long serialVersionUID = -1453129684L; @ManyToOne(optional = false, fetch = FetchType.LAZY, cascade = CascadeType.ALL) @JoinColumn(name = "student_id", nullable = false, updatable = true) @ContainedIn protected com.oreon.smartsis.domain.Student student ; @ManyToOne(optional = false, fetch = FetchType.LAZY, cascade = CascadeType.ALL) @JoinColumn(name = "gradeAttendance_id", nullable = false, updatable = true) @ContainedIn protected GradeAttendance gradeAttendance ; @Column(unique = false) protected AbsenceCode absenceCode ; public void setStudent(com.oreon.smartsis.domain.Student student) { this.student = student; } public com.oreon.smartsis.domain.Student getStudent() { return student; } public void setGradeAttendance(GradeAttendance gradeAttendance) { this.gradeAttendance = gradeAttendance; } public GradeAttendance getGradeAttendance() { return gradeAttendance; } public void setAbsenceCode(AbsenceCode absenceCode) { this.absenceCode = absenceCode; } public AbsenceCode getAbsenceCode() { return absenceCode; } @Transient public String getDisplayName() { try { return student + ""; } catch (Exception e) { return "Exception - " + e.getMessage(); } } //Empty setter , needed for richfaces autocomplete to work public void setDisplayName(String name) { } /** This method is used by hibernate full text search - override to add additional fields * @see org.witchcraft.model.support.BusinessEntity#retrieveSearchableFieldsArray() */ @Override public List<String> listSearchableFields() { List<String> listSearchableFields = new ArrayList<String>(); listSearchableFields.addAll(super.listSearchableFields()); return listSearchableFields; } @Field(index = Index.TOKENIZED, name = "searchData") @Analyzer(definition = "entityAnalyzer") public String getSearchData() { StringBuilder builder = new StringBuilder(); if (getStudent() != null) builder.append("student:" + getStudent().getDisplayName() + " "); if (getGradeAttendance() != null) builder.append("gradeAttendance:" + getGradeAttendance().getDisplayName() + " "); return builder.toString(); } }
[ "singhj@38423737-2f20-0410-893e-9c0ab9ae497d" ]
singhj@38423737-2f20-0410-893e-9c0ab9ae497d
0d1fbcc1039b7223e1c0def89f32b6597eaf6d87
fd712c1a289ac0b65701d4d3946f485f450e8050
/Quiz/app/src/main/java/com/example/ari/quiz/q17.java
87034be9da4883f2fc3ac62bd4a380f72c802221
[]
no_license
aplikasi-ta/Ta_campuran
0df6905322e20b032448f2869205826ea7656aaf
a9be1444f619704903c6666fae9d4f59f82e2f16
refs/heads/master
2020-05-02T20:24:02.366841
2019-03-28T11:38:14
2019-03-28T11:38:14
178,190,121
0
0
null
null
null
null
UTF-8
Java
false
false
323
java
package com.example.ari.quiz; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; public class q17 extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_q17); } }
[ "ari.curnia.one@gmail.com" ]
ari.curnia.one@gmail.com
47333edf3516840c42255167c9da39bc08b9eb62
ccc65ce1c729f0b3d62c67b513d340bf6a19179c
/src/main/java/com/ar/mangerspital/service/dto/AdminUserDTO.java
d9621f0e2216e24d3af11601c87ac17e6cd040c8
[]
no_license
asrx98/managerSpitalApp
45e840523c2617304063c9752c3c3796feb7e316
9da6b5b8fdee13658ec119c0aac0fa1eb85657c4
refs/heads/main
2023-04-23T10:23:09.856368
2021-05-18T09:30:11
2021-05-18T09:30:11
368,472,792
0
0
null
2021-05-18T09:30:12
2021-05-18T09:28:25
Java
UTF-8
Java
false
false
4,551
java
package com.ar.mangerspital.service.dto; import com.ar.mangerspital.config.Constants; import com.ar.mangerspital.domain.Authority; import com.ar.mangerspital.domain.User; import java.time.Instant; import java.util.Set; import java.util.stream.Collectors; import javax.validation.constraints.*; /** * A DTO representing a user, with his authorities. */ public class AdminUserDTO { private Long id; @NotBlank @Pattern(regexp = Constants.LOGIN_REGEX) @Size(min = 1, max = 50) private String login; @Size(max = 50) private String firstName; @Size(max = 50) private String lastName; @Email @Size(min = 5, max = 254) private String email; @Size(max = 256) private String imageUrl; private boolean activated = false; @Size(min = 2, max = 10) private String langKey; private String createdBy; private Instant createdDate; private String lastModifiedBy; private Instant lastModifiedDate; private Set<String> authorities; public AdminUserDTO() { // Empty constructor needed for Jackson. } public AdminUserDTO(User user) { this.id = user.getId(); this.login = user.getLogin(); this.firstName = user.getFirstName(); this.lastName = user.getLastName(); this.email = user.getEmail(); this.activated = user.isActivated(); this.imageUrl = user.getImageUrl(); this.langKey = user.getLangKey(); this.createdBy = user.getCreatedBy(); this.createdDate = user.getCreatedDate(); this.lastModifiedBy = user.getLastModifiedBy(); this.lastModifiedDate = user.getLastModifiedDate(); this.authorities = user.getAuthorities().stream().map(Authority::getName).collect(Collectors.toSet()); } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getLogin() { return login; } public void setLogin(String login) { this.login = login; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getImageUrl() { return imageUrl; } public void setImageUrl(String imageUrl) { this.imageUrl = imageUrl; } public boolean isActivated() { return activated; } public void setActivated(boolean activated) { this.activated = activated; } public String getLangKey() { return langKey; } public void setLangKey(String langKey) { this.langKey = langKey; } public String getCreatedBy() { return createdBy; } public void setCreatedBy(String createdBy) { this.createdBy = createdBy; } public Instant getCreatedDate() { return createdDate; } public void setCreatedDate(Instant createdDate) { this.createdDate = createdDate; } public String getLastModifiedBy() { return lastModifiedBy; } public void setLastModifiedBy(String lastModifiedBy) { this.lastModifiedBy = lastModifiedBy; } public Instant getLastModifiedDate() { return lastModifiedDate; } public void setLastModifiedDate(Instant lastModifiedDate) { this.lastModifiedDate = lastModifiedDate; } public Set<String> getAuthorities() { return authorities; } public void setAuthorities(Set<String> authorities) { this.authorities = authorities; } // prettier-ignore @Override public String toString() { return "AdminUserDTO{" + "login='" + login + '\'' + ", firstName='" + firstName + '\'' + ", lastName='" + lastName + '\'' + ", email='" + email + '\'' + ", imageUrl='" + imageUrl + '\'' + ", activated=" + activated + ", langKey='" + langKey + '\'' + ", createdBy=" + createdBy + ", createdDate=" + createdDate + ", lastModifiedBy='" + lastModifiedBy + '\'' + ", lastModifiedDate=" + lastModifiedDate + ", authorities=" + authorities + "}"; } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
1c94538ee735b3f65dd9e97d47c8408dba12a117
36542e78f1db7bfaee1f5a1f07b88051f0a5e1f7
/nuxeo-runtime/nuxeo-stream/src/main/java/org/nuxeo/lib/stream/tools/renderer/Renderer.java
7384db0ddf7c6b5cf6ca52a4b624f7a88e404972
[ "Apache-2.0" ]
permissive
michaelgena/nuxeo
0b922e9c44cfb810a0ae28a0a1041f244f811f3a
3431c2227e5bd1ffd83323d117a38d9a5f02aaad
refs/heads/master
2021-04-03T06:12:34.472530
2018-03-10T09:38:16
2018-03-10T09:38:16
124,744,225
1
0
null
2018-03-11T10:09:01
2018-03-11T10:09:00
null
UTF-8
Java
false
false
2,085
java
/* * (C) Copyright 2017 Nuxeo SA (http://nuxeo.com/) and others. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Contributors: * bdelbosc */ package org.nuxeo.lib.stream.tools.renderer; import static java.lang.Math.min; import java.io.UnsupportedEncodingException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.function.Consumer; import org.nuxeo.lib.stream.computation.Record; import org.nuxeo.lib.stream.computation.Watermark; import org.nuxeo.lib.stream.log.LogRecord; /** * @since 9.3 */ public abstract class Renderer implements Consumer<LogRecord<Record>> { public abstract void header(); public abstract void footer(); protected String watermarkString(long watermark) { if (watermark == 0) { return "0"; } SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); Watermark wm = Watermark.ofValue(watermark); return String.format("%s:%d %s", dateFormat.format(new Date(wm.getTimestamp())), wm.getSequence(), wm.isCompleted() ? "completed" : "uncompleted"); } protected String binaryString(byte[] data) { String overview = ""; if (data != null) { try { overview += new String(data, "UTF-8").substring(0, min(data.length, 512)) + '"'; } catch (UnsupportedEncodingException e) { overview = "unsupported encoding"; } overview = overview.replaceAll("[^\\x20-\\x7e]", "."); } return overview; } }
[ "bdelbosc@nuxeo.com" ]
bdelbosc@nuxeo.com
eac5955b6f16e32ec67bc56901253d7172af523a
09cf080c8d9689b6567ee14c0bba7cfce4846d99
/baza-bzb-app-android/app/src/main/java/com/baza/android/bzw/businesscontroller/message/IMSearchWBAdapter.java
f4e8a54544e3797560c30ef6a790905e46ca37bf
[]
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,827
java
package com.baza.android.bzw.businesscontroller.message; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.ImageView; import android.widget.TextView; import com.bumptech.glide.Glide; import com.bznet.android.rcbox.R; import com.tencent.qcloud.tim.uikit.URLConst; import com.tencent.qcloud.tim.uikit.bean.IMSearchBean; import com.tencent.qcloud.tim.uikit.component.picture.imageEngine.impl.GlideEngine; import java.util.List; public class IMSearchWBAdapter extends BaseAdapter { private Context context; private List<IMSearchBean.DataBeanX.OuterMemberInfosBean> beanList; public boolean isMore;//默认两条,isMore为true展示全部 public IMSearchWBAdapter(Context context, List<IMSearchBean.DataBeanX.OuterMemberInfosBean> beanList, boolean isMore) { this.context = context; this.beanList = beanList; this.isMore = isMore; } @Override public int getCount() { if (isMore) { return beanList.size(); } else { if (beanList.size() > 2) { return 2; } else { return beanList.size(); } } } @Override public Object getItem(int i) { return beanList.get(i); } @Override public long getItemId(int i) { return i; } @Override public View getView(int i, View view, ViewGroup viewGroup) { ViewHolder viewHolder; if (view == null) { view = LayoutInflater.from(context).inflate(R.layout.adapter_search, viewGroup, false); viewHolder = new ViewHolder(); viewHolder.adapter_search_img = view.findViewById(R.id.adapter_search_img); viewHolder.adapter_search_name = view.findViewById(R.id.adapter_search_name); viewHolder.adapter_search_last = view.findViewById(R.id.adapter_search_last); view.setTag(viewHolder); } else { viewHolder = (ViewHolder) view.getTag(); } Glide.with(context).load(URLConst.URL_ICON + beanList.get(i).getUnionId()).circleCrop().into(viewHolder.adapter_search_img); //GlideEngine.loadCornerImage(viewHolder.adapter_search_img, URLConst.URL_ICON + beanList.get(i).getUnionId(), null, 100); viewHolder.adapter_search_name.setText(beanList.get(i).getUserName()); viewHolder.adapter_search_last.setText(beanList.get(i).getCompany() + " | " + beanList.get(i).getTitle()); return view; } class ViewHolder { private ImageView adapter_search_img; private TextView adapter_search_name, adapter_search_last; } }
[ "123456" ]
123456
58afd7a0365563acc51ff5d27a8e30d20b074cd3
22c96541b7677ecd60f84afadbe95e88209c081e
/dpay-common/src/main/java/com/mi/dpay/constants/HbConstants.java
512b0b49fbda0fd21581c4a22df5b588012a1383
[]
no_license
levin80/dpay
6c954bf52f67dc39604b5e8b901c2dd859018aff
4c35416e9aa6553ddbc25293a8b2cb0a769c8125
refs/heads/master
2021-01-21T21:10:34.879866
2017-05-24T17:24:25
2017-05-24T17:24:25
92,317,016
0
1
null
null
null
null
UTF-8
Java
false
false
1,148
java
package com.mi.dpay.constants; public final class HbConstants { /** * 前缀用于将来多的话做区分 */ public final static String PREFF=""; public final static String USER_KEY=PREFF+"user"; public final static String VERIFY_SESSION_KEY=PREFF+"verify_code"; /** * 登录类型_移动用户 */ public static final int LOGIN_TYPE_MOBILE = 1; /** * 登录类型_普通用户 */ public static final int LOGIN_TYPE_NORMAL = 2; /** * 密码类型_服务密码 */ public static final int PASS_TYPE_SERVICE = 1; /** * 密码类型_随机短信 */ public static final int PASS_TYPE_RANDOM = 2; /** * 现金账本 */ public static final String ACC_TYPE_CASH = "CASH"; /** *优惠账本 */ public static final String ACC_TYPE_FAVOUR = "FAVOUR"; /** * 前台充值 */ public final static String WAY_PORTAL_CHARGE = "3"; /** * 前台缴费 */ public final static String WAY_PORTAL_PAY = "2"; /*类型*/ public final static int TYPE_RECHARGE = 1; //1 -充值 public final static int TYPE_PAYFEE = 2; //2 -扣费 public final static int TYPE_REFUND = 3; //3 -冲正 }
[ "111111" ]
111111
a234819f01f9b36fd4d7a93845f58faeb075c184
d0370050c3e3347064632c9cf0fa6c9e453e10c6
/src/Patterns/ChainOfResponsibility/Example_01/Main.java
0c45a26fcef90b43a2fb8ccf03eb375343b71645
[]
no_license
demotivirus/CodeFinder
ecdfcdcc09a2d8be8235da3daa0e8e11c38591e9
8cf7ec82d0549fe1d4f8600caa354a1c2de06106
refs/heads/master
2021-07-14T05:14:33.506327
2021-06-28T10:03:05
2021-06-28T10:03:05
220,710,293
1
0
null
null
null
null
UTF-8
Java
false
false
823
java
package Patterns.ChainOfResponsibility.Example_01; public class Main { public static void main(String[] args) { Notifier simpleReport = new SimpleReportNotifier(Priority.ALL); Notifier email = new EmailNotifier(Priority.ERROR); Notifier sms = new SMSNotifier(Priority.FATAL); //CHAIN OF RESPONSIBILITY simpleReport.setNextNotifier(email); email.setNextNotifier(sms); simpleReport.manager("Everything is OK ", Priority.ALL); System.out.println("============================="); simpleReport.manager("Something error", Priority.ERROR); System.out.println("============================="); simpleReport.manager("System crash and burn out O_o", Priority.FATAL ); System.out.println("============================="); } }
[ "demotivirus@gmail.com" ]
demotivirus@gmail.com
ed93708582688a81f94f4e899fb139910460026c
45f20bf4597b5f89e5293c35e223204159310956
/quickfixj-core/src/main/java/quickfix/field/NoUnderlyings.java
73ccda5a348c5dfca2a8de77e33f5bc0fe27bb40
[ "BSD-2-Clause", "LicenseRef-scancode-public-domain" ]
permissive
lloydchan/quickfixj
9d42924c8e9d4cc0a96821faa4006fcd4b0d21c4
e26446c775b3f63d93bb4e8d6f02fde8a22d73fc
refs/heads/master
2020-07-31T21:20:20.178481
2019-09-26T14:40:49
2019-09-26T14:40:49
210,757,360
0
0
null
2019-09-25T04:46:02
2019-09-25T04:46:01
null
UTF-8
Java
false
false
1,128
java
/* Generated Java Source File */ /******************************************************************************* * Copyright (c) quickfixengine.org All rights reserved. * * This file is part of the QuickFIX FIX Engine * * This file may be distributed under the terms of the quickfixengine.org * license as defined by quickfixengine.org and appearing in the file * LICENSE included in the packaging of this file. * * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING * THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. * * See http://www.quickfixengine.org/LICENSE for licensing information. * * Contact ask@quickfixengine.org if any conditions of this licensing * are not clear to you. ******************************************************************************/ package quickfix.field; import quickfix.IntField; public class NoUnderlyings extends IntField { static final long serialVersionUID = 20050617; public static final int FIELD = 711; public NoUnderlyings() { super(711); } public NoUnderlyings(int data) { super(711, data); } }
[ "lloyd.khc.chan@gmail.com" ]
lloyd.khc.chan@gmail.com
534903ecf159103b28718d36e939a6c2807ebefa
8b31844bc6f5788c7b59c5b0bcc0ba079a3afa0b
/jOOQ-meta/src/main/java/org/jooq/util/jaxb/Property.java
4ecad84ac1ac401423845220350b9bac50f29c02
[ "Apache-2.0" ]
permissive
bitbrain/jOOQ
5a1801f8bd9f79434362299c25f4ce82b755fa0e
75c87a485268682582337d6c01fa37d46f68aa74
refs/heads/master
2020-12-30T14:34:12.051852
2017-05-12T23:19:09
2017-05-12T23:19:09
91,068,299
0
0
null
2017-05-12T08:18:50
2017-05-12T08:18:50
null
UTF-8
Java
false
false
2,490
java
package org.jooq.util.jaxb; import java.io.Serializable; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import org.jooq.util.jaxb.tools.StringAdapter; /** * <p>Java-Klasse für Property complex type. * * <p>Das folgende Schemafragment gibt den erwarteten Content an, der in dieser Klasse enthalten ist. * * <pre> * &lt;complexType name="Property"&gt; * &lt;complexContent&gt; * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; * &lt;all&gt; * &lt;element name="key" type="{http://www.w3.org/2001/XMLSchema}string"/&gt; * &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string"/&gt; * &lt;/all&gt; * &lt;/restriction&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Property", propOrder = { }) @SuppressWarnings({ "all" }) public class Property implements Serializable { private final static long serialVersionUID = 31000L; @XmlElement(required = true) @XmlJavaTypeAdapter(StringAdapter.class) protected String key; @XmlElement(required = true) @XmlJavaTypeAdapter(StringAdapter.class) protected String value; /** * Ruft den Wert der key-Eigenschaft ab. * * @return * possible object is * {@link String } * */ public String getKey() { return key; } /** * Legt den Wert der key-Eigenschaft fest. * * @param value * allowed object is * {@link String } * */ public void setKey(String value) { this.key = value; } /** * Ruft den Wert der value-Eigenschaft ab. * * @return * possible object is * {@link String } * */ public String getValue() { return value; } /** * Legt den Wert der value-Eigenschaft fest. * * @param value * allowed object is * {@link String } * */ public void setValue(String value) { this.value = value; } public Property withKey(String value) { setKey(value); return this; } public Property withValue(String value) { setValue(value); return this; } }
[ "lukas.eder@gmail.com" ]
lukas.eder@gmail.com
caae8572b8c582392a5dbbd80a50e21c92a5025d
612b1b7f5201f3ff1a550b09c96218053e195519
/modules/core/test/com/haulmont/cuba/testmodel/number_id/NumberIdSeqNameSecond.java
a17f709abdcb3a5d2ff01140f636f359c323f8b4
[ "Apache-2.0" ]
permissive
cuba-platform/cuba
ffb83fe0b089056e8da11d96a40c596d8871d832
36e0c73d4e3b06f700173c4bc49c113838c1690b
refs/heads/master
2023-06-24T02:03:12.525885
2023-06-19T14:13:06
2023-06-19T14:13:06
54,624,511
1,434
303
Apache-2.0
2023-08-31T18:57:38
2016-03-24T07:55:56
Java
UTF-8
Java
false
false
1,319
java
/* * Copyright (c) 2008-2018 Haulmont. * * 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.haulmont.cuba.testmodel.number_id; import com.haulmont.cuba.core.entity.BaseLongIdEntity; import com.haulmont.cuba.core.entity.annotation.IdSequence; import javax.persistence.Column; import javax.persistence.DiscriminatorValue; import javax.persistence.Entity; import javax.persistence.Table; @DiscriminatorValue("R") @Table(name = "TEST_NUMBER_ID_SEQ_NAME_SECOND") @Entity(name = "test$NumberIdSeqNameSecond") @IdSequence(name = "seq_number_id_name") public class NumberIdSeqNameSecond extends BaseLongIdEntity { @Column(name = "NAME") protected String name; public String getName() { return name; } public void setName(String name) { this.name = name; } }
[ "subbotin@haulmont.com" ]
subbotin@haulmont.com
fc21d896791d210de5c6908c03e809594a104058
f662526b79170f8eeee8a78840dd454b1ea8048c
/bns.java
5040436c9f769e5d632eab8eda31dbb13eb5c37d
[]
no_license
jason920612/Minecraft
5d3cd1eb90726efda60a61e8ff9e057059f9a484
5bd5fb4dac36e23a2c16576118da15c4890a2dff
refs/heads/master
2023-01-12T17:04:25.208957
2020-11-26T08:51:21
2020-11-26T08:51:21
316,170,984
0
0
null
null
null
null
UTF-8
Java
false
false
2,333
java
/* */ import it.unimi.dsi.fastutil.shorts.ShortList; /* */ import it.unimi.dsi.fastutil.shorts.ShortListIterator; /* */ import java.util.function.Function; /* */ import java.util.function.Predicate; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public class bns<T> /* */ implements ayo<T> /* */ { /* */ protected final Predicate<T> a; /* */ protected final Function<T, pc> b; /* */ protected final Function<pc, T> c; /* */ private final axm d; /* 20 */ private final ShortList[] e = new ShortList[16]; /* */ /* */ public bns(Predicate<T> ☃, Function<T, pc> function, Function<pc, T> function1, axm axm1) { /* 23 */ this.a = ☃; /* 24 */ this.b = function; /* 25 */ this.c = function1; /* 26 */ this.d = axm1; /* */ } /* */ /* */ public he a() { /* 30 */ return bnv.a(this.e); /* */ } /* */ /* */ public void a(he ☃) { /* 34 */ for (int i = 0; i < ☃.size(); i++) { /* 35 */ he he1 = ☃.f(i); /* 36 */ for (int j = 0; j < he1.size(); j++) { /* 37 */ bnr.a(this.e, i).add(he1.g(j)); /* */ } /* */ } /* */ } /* */ /* */ public void a(ayo<T> ☃, Function<el, T> function) { /* 43 */ for (int i = 0; i < this.e.length; i++) { /* 44 */ if (this.e[i] != null) { /* 45 */ for (ShortListIterator<Short> shortListIterator = this.e[i].iterator(); shortListIterator.hasNext(); ) { Short short_ = shortListIterator.next(); /* 46 */ el el = bnr.a(short_.shortValue(), i, this.d); /* 47 */ ☃.a(el, function.apply(el), 0); } /* */ /* 49 */ this.e[i].clear(); /* */ } /* */ } /* */ } /* */ /* */ /* */ public boolean a(el ☃, T t) { /* 56 */ return false; /* */ } /* */ /* */ /* */ public void a(el ☃, T t, int i, ayq ayq1) { /* 61 */ bnr.a(this.e, ☃.p() >> 4).add(bnr.i(☃)); /* */ } /* */ /* */ /* */ public boolean b(el ☃, T t) { /* 66 */ return false; /* */ } /* */ } /* Location: F:\dw\server.jar!\bns.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */
[ "jasonya2206@gmail.com" ]
jasonya2206@gmail.com
69f49b69df64815a610f0bde2b9b77e876fdb5d9
98ba07aa78e59e758f96cb2636623a0a2643c2f6
/tests/src/test/java/org/apache/camel/kafkaconnector/source/aws/s3/TestS3Configuration.java
05779ff3988a6e2551848ea1447db103d6a4de69
[ "Apache-2.0" ]
permissive
hbelkhir-cision/camel-kafka-connector
df4f69b4916f1b96f0413067843358a9ba6ced82
e60179f45c326ed8461799b30de54d7d14de8038
refs/heads/master
2021-02-10T17:59:15.778885
2020-02-07T19:55:51
2020-02-07T19:55:51
244,406,025
0
1
Apache-2.0
2020-03-02T15:30:03
2020-03-02T15:30:02
null
UTF-8
Java
false
false
3,216
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.camel.kafkaconnector.source.aws.s3; import com.amazonaws.ClientConfiguration; import com.amazonaws.Protocol; import com.amazonaws.auth.AWSCredentials; import com.amazonaws.auth.AWSCredentialsProvider; import com.amazonaws.client.builder.AwsClientBuilder; import com.amazonaws.regions.Regions; import com.amazonaws.services.s3.AmazonS3; import com.amazonaws.services.s3.AmazonS3ClientBuilder; import org.apache.camel.component.aws.s3.S3Configuration; import org.apache.camel.kafkaconnector.AWSConfigs; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class TestS3Configuration extends S3Configuration { private static final Logger LOG = LoggerFactory.getLogger(TestS3Configuration.class); private final String amazonHost; private final String region; private AmazonS3 amazonS3; private class TestAWSCredentialsProvider implements AWSCredentialsProvider { @Override public AWSCredentials getCredentials() { return new AWSCredentials() { @Override public String getAWSAccessKeyId() { return System.getProperty(AWSConfigs.ACCESS_KEY); } @Override public String getAWSSecretKey() { return System.getProperty(AWSConfigs.SECRET_KEY); } }; } @Override public void refresh() { } } public TestS3Configuration() { amazonHost = System.getProperty(AWSConfigs.AMAZON_AWS_HOST); region = Regions.valueOf(System.getProperty(AWSConfigs.REGION)).getName(); } private AmazonS3 buildClient() { LOG.debug("Creating a new S3 client"); ClientConfiguration clientConfiguration = new ClientConfiguration(); clientConfiguration.setProtocol(Protocol.HTTP); return AmazonS3ClientBuilder .standard() .withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration(amazonHost, region)) .withCredentials(new TestAWSCredentialsProvider()) .withClientConfiguration(clientConfiguration) .withPathStyleAccessEnabled(true) .build(); } @Override public AmazonS3 getAmazonS3Client() { if (amazonS3 == null) { amazonS3 = buildClient(); } return amazonS3; } }
[ "ancosen@gmail.com" ]
ancosen@gmail.com
ff42f805726f8fc4c1cef5af900e393d92586e6c
0e06e096a9f95ab094b8078ea2cd310759af008b
/classes35-dex2jar/com/google/android/gms/internal/drive/zzcp.java
8d4c3320fe1089336133d82bdadf06ea1671d54a
[]
no_license
Manifold0/adcom_decompile
4bc2907a057c73703cf141dc0749ed4c014ebe55
fce3d59b59480abe91f90ba05b0df4eaadd849f7
refs/heads/master
2020-05-21T02:01:59.787840
2019-05-10T00:36:27
2019-05-10T00:36:27
185,856,424
1
2
null
2019-05-10T00:36:28
2019-05-09T19:04:28
Java
UTF-8
Java
false
false
796
java
// // Decompiled by Procyon v0.5.34 // package com.google.android.gms.internal.drive; import android.os.RemoteException; import com.google.android.gms.tasks.TaskCompletionSource; import com.google.android.gms.common.api.Api$AnyClient; import com.google.android.gms.common.api.internal.ListenerHolder; import com.google.android.gms.drive.DriveResource; import com.google.android.gms.common.api.internal.RegisterListenerMethod; final class zzcp extends RegisterListenerMethod<zzaw, zzdi> { private final /* synthetic */ DriveResource zzfo; private final /* synthetic */ zzdi zzfp; zzcp(final zzch zzch, final ListenerHolder listenerHolder, final DriveResource zzfo, final zzdi zzfp) { this.zzfo = zzfo; this.zzfp = zzfp; super(listenerHolder); } }
[ "querky1231@gmail.com" ]
querky1231@gmail.com
dab23c97eac1e0bb3bba56b3082699a6c3010c31
5683544d8cca4cfd7897aafaa0a66b1e8fd704e4
/WrapPortal-1/src/test/java/TestScript/Report_QuarterlyEnrollmenteportOld_TC.java
f0b25840bd819a47475297984e69051a841bcf4b
[]
no_license
automationrepoMaster/jenkins-Master-
cd4855922913b1e76ea183547f7cfe5172e51f56
3e9456e73387977b206bbf0977cc34962167fbbc
refs/heads/master
2023-04-22T22:04:29.750690
2021-05-08T13:26:20
2021-05-08T13:26:20
364,281,879
0
0
null
null
null
null
UTF-8
Java
false
false
5,870
java
package TestScript; import org.testng.Assert; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; import com.relevantcodes.extentreports.LogStatus; import CommonLibrary.WebDriverCommonLib; import GenericLibrary.BaseClass; import GenericLibrary.ExcelDataConfig; import GenericLibrary.FileUtils1; import ModulerLibrary.WPO_LoginActionClientWise; import ObjectRepository.HomePage; import ObjectRepository.ReportModule; import ObjectRepository.Report_EnrollmentListReportOld; import ObjectRepository.Report_QuarterlyEnrollmenteportOld; public class Report_QuarterlyEnrollmenteportOld_TC extends BaseClass { WebDriverCommonLib wb = new WebDriverCommonLib(); String selectReportName = "Quarterly Enrollment Report"; @Test(dataProvider = "excelData") public void testQuarterlyEnrollmenteportOld(String ProgramName, String Division, String Projects, String userName, String password, String ProjectNAME1, String ProjectNAME2) throws InterruptedException { try { // WPO_LoginActionClientWise.logInOswald(driver); WPO_LoginActionClientWise.logInCommon(driver, userName, password); HomePage.controlMenuReports(driver).click(); test.log(LogStatus.INFO, "Clicked on Report Module Icon"); Thread.sleep(2000); wb.selectSingleValue(ReportModule.selectProgramDropdown(driver), ProgramName); test.log(LogStatus.INFO, "Respective Program Select Form Dropdown"); Thread.sleep(5000); Report_QuarterlyEnrollmenteportOld.selectReport(driver, selectReportName).click(); test.log(LogStatus.PASS, selectReportName + " Report is Selected"); wb.getWindowIDs(); driver.switchTo().window(wb.map.get("childID")); driver.switchTo().frame(0); /* * wb.selectSingleValue(Report_QuarterlyEnrollmenteportOld. * selectDivision(driver), Division); test.log(LogStatus.PASS, * " Divisions Selected Successfully"); Thread.sleep(3000); */ // wb.selectSingleValueByIndex(Report_QuarterlyEnrollmenteportOld.selectProjects(driver), // 1); wb.selectSingleValue(Report_QuarterlyEnrollmenteportOld.selectProjects(driver), Projects); test.log(LogStatus.PASS, " Project Selected Successfully"); Thread.sleep(3000); wb.selectSingleValue(Report_QuarterlyEnrollmenteportOld.selectContractors(driver), "All Contractors"); test.log(LogStatus.PASS, " Contractor Selected Successfully"); Thread.sleep(3000); Report_QuarterlyEnrollmenteportOld.btnBuildReport(driver).click(); test.log(LogStatus.INFO, " Clicked On Build Report Button"); Thread.sleep(3000); test.log(LogStatus.PASS, "Report Generated" + test.addScreenCapture(FileUtils1.getScreenshot(driver))); } catch (Throwable e) { System.out.println(e); test.log(LogStatus.FAIL, e + " Something Went Wrong"); test.log(LogStatus.PASS, "Something Went Wrong" + test.addScreenCapture(FileUtils1.getScreenshot(driver))); } try { driver.switchTo().defaultContent(); driver.switchTo().frame(1); System.out.println(Report_QuarterlyEnrollmenteportOld.reportHeaderReportName(driver).getText()); Assert.assertEquals(Report_QuarterlyEnrollmenteportOld.reportHeaderReportName(driver).getText(), "Quarterly Enrollment Report"); System.out.println("Report Name is Matched"); test.log(LogStatus.PASS, "Report Header Name Matched"); test.log(LogStatus.PASS, "Report Generated Successfully"); // driver.switchTo().defaultContent(); } catch (Throwable e) { System.out.println("report name not matched"); test.log(LogStatus.FAIL, e + "Report Header Name Not Matched"); test.log(LogStatus.PASS, "Something Went Wrong" + test.addScreenCapture(FileUtils1.getScreenshot(driver))); } /* * // Check for pdf is generated or not take screenshot * Report_EnrollmentListReportOld.linkExportToPDF(driver).click(); * wb.getWindowID3(); * driver.switchTo().window(wb.map.get("subchildID")); * Thread.sleep(7000); test.log(LogStatus.PASS, "Pdf Generated " + * test.addScreenCapture(FileUtils1.getScreenshot(driver))); * Thread.sleep(5000); driver.close(); * driver.switchTo().window(wb.map.get("childID")); */ // Excel file driver.switchTo().defaultContent(); driver.switchTo().frame(1); Report_EnrollmentListReportOld.linkExportToExcel(driver).click(); Thread.sleep(10000); if (wb.isFileDownloaded("Non-Compliance_Report.xls") == true) { System.out.println("Excel file Downloaded Successfully"); test.log(LogStatus.PASS, "Excel file Downloaded Successfully"); } else { System.out.println("Excel file is not Downloaded Successfully"); test.log(LogStatus.FAIL, "Excel file is not Downloaded Successfully"); } wb.getWindowID3(); driver.switchTo().window(wb.map.get("subchildID")); Thread.sleep(6000); driver.close(); driver.switchTo().window(wb.map.get("childID")); Thread.sleep(5000); driver.switchTo().defaultContent(); driver.close(); driver.switchTo().window(wb.map.get("parentID")); } @DataProvider(name = "excelData") public Object[][] passdata() { //String filePath = "E:\\kp workspace selenium\\Wrap Portal\\testData\\clientWiseReportTestData.xlsx"; // Excel sheet as on 14-04-2021 String filePath ="D:\\NOURTEK\\Wrap Portal-2\\testData\\clientWiseReportTestData.xlsx"; ExcelDataConfig config = new ExcelDataConfig(filePath);// put all excel int row = config.getRowCount(0);// get exact row count from sheet int col = config.getColCount(0); System.out.println(col); System.out.println(row); Object[][] data = new Object[row - 1][col];// store all row and column for (int i = 1; i < row; i++) { for (int j = 0; j < col; j++) { data[i - 1][j] = config.getExcelData("Sheet1", i, j); } } return data;// return data to test } }
[ "User@User-PC" ]
User@User-PC
6698ff0174a62464e2aebeb3b59ab71abdee004f
324f6c696c6d0ff8e3df7a89c431c65bc19950ae
/src/main/java/org/onvif/ver10/doorcontrol/wsdl/BlockDoorResponse.java
3e7234ed6f7246c322f6df67a21ea4710b69bf11
[]
no_license
nightdeveloper/WebCamera
731ebd81341bc43a20740b10b39651ab5f1c9110
be69873691c669da8a1f7e0edd35cc6d985a7a86
refs/heads/master
2021-01-01T20:42:59.190684
2017-07-31T18:16:02
2017-07-31T18:16:02
98,915,806
2
1
null
null
null
null
UTF-8
Java
false
false
819
java
package org.onvif.ver10.doorcontrol.wsdl; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType&gt; * &lt;complexContent&gt; * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt; * &lt;sequence&gt; * &lt;/sequence&gt; * &lt;/restriction&gt; * &lt;/complexContent&gt; * &lt;/complexType&gt; * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "") @XmlRootElement(name = "BlockDoorResponse") public class BlockDoorResponse { }
[ "pri@vate.localhost" ]
pri@vate.localhost
d29a3dd952db0579e4b23128bd1620e2b9a48357
26e7e063514f4d31cc044891be35779fdf66f0e6
/app/src/main/java/com/technology/yuyi/bean/FirstPageUserDataBean/BloodpressureList.java
6a3af45908c37c36d43edc070db5c2c059dde896
[]
no_license
liuhaidong123/YUYI
e438d04ddbda87e6d67f0c520435151d058b3017
b9981b1fb7b0c3ebb76528263d8d13917267f5a8
refs/heads/master
2020-04-06T04:42:10.314755
2018-10-30T09:00:11
2018-10-30T09:00:14
82,871,371
0
0
null
null
null
null
UTF-8
Java
false
false
1,305
java
package com.technology.yuyi.bean.FirstPageUserDataBean; /** * Created by liuhaidong on 2017/3/23. */ public class BloodpressureList { private String createTimeString; private int diastolic; private int systolic; private String updateTimeString; private int humeuserId; private int id; public void setCreateTimeString(String createTimeString){ this.createTimeString = createTimeString; } public String getCreateTimeString(){ return this.createTimeString; } public void setDiastolic(int diastolic){ this.diastolic = diastolic; } public int getDiastolic(){ return this.diastolic; } public void setSystolic(int systolic){ this.systolic = systolic; } public int getSystolic(){ return this.systolic; } public void setUpdateTimeString(String updateTimeString){ this.updateTimeString = updateTimeString; } public String getUpdateTimeString(){ return this.updateTimeString; } public void setHumeuserId(int humeuserId){ this.humeuserId = humeuserId; } public int getHumeuserId(){ return this.humeuserId; } public void setId(int id){ this.id = id; } public int getId(){ return this.id; } }
[ "1197248097@qq.com" ]
1197248097@qq.com
f9d9d3e750950315c0c659acfe959c70d6fe5402
e2a223891bceb2d5bc73c3de9f729285a61eef3d
/app/src/main/java/com/kk/solution/dev/androideatmaster/Remote/IGeoCoordinates.java
078c83762704c39f9b2f05f1d10c0c0d20063490
[]
no_license
UncagedMist/AndroidEatMaster
816032881e46a80b4cb40a65a0b408c346a478ca
bb5a817f02274ada0899c4755cbc14567baca0a4
refs/heads/master
2020-03-20T12:48:37.651749
2018-06-15T04:30:49
2018-06-15T04:30:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
454
java
package com.kk.solution.dev.androideatmaster.Remote; import retrofit2.Call; import retrofit2.http.GET; import retrofit2.http.Query; /** * Created by kundan on 12/18/2017. */ public interface IGeoCoordinates { @GET("maps/api/geocode/json") Call<String> geoCode(@Query("address") String address); @GET("maps/api/directions/json") Call<String> getDirections(@Query("origin") String origin,@Query("destination") String destination); }
[ "Kundan_kk52@outlook.com" ]
Kundan_kk52@outlook.com
7276e6f27245d6b8cc9743ebdfa7637a2340f2ff
1ebd71e2179be8a2baec90ff3f326a3f19b03a54
/hybris/bin/modules/commerce-services/commerceservices/src/de/hybris/platform/commerceservices/search/solrfacetsearch/provider/impl/CategoryNameValueProvider.java
31376a5430fc348028f32763c392f591a1d05349
[]
no_license
shaikshakeeb785/hybrisNew
c753ac45c6ae264373e8224842dfc2c40a397eb9
228100b58d788d6f3203333058fd4e358621aba1
refs/heads/master
2023-08-15T06:31:59.469432
2021-09-03T09:02:04
2021-09-03T09:02:04
402,680,399
0
0
null
null
null
null
UTF-8
Java
false
false
474
java
/* * Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. */ package de.hybris.platform.commerceservices.search.solrfacetsearch.provider.impl; /** * Category name value provider. Value provider that generates field values for localized category names. */ public class CategoryNameValueProvider extends CategoryCodeValueProvider { @Override protected Object getPropertyValue(final Object model) { return getPropertyValue(model, "name"); } }
[ "sauravkr82711@gmail.com" ]
sauravkr82711@gmail.com
0b8062ec0edf21d031cfc895a836ed8fadd3cf19
11c721abff1c38dbfcdc050dc11e9e62d7ed3662
/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ArgLinePropertiesIT.java
cf1074ede0b9e26ce655895ee5447dc16b4bc3aa
[ "Apache-2.0" ]
permissive
DaGeRe/maven-surefire
4106549e59d8bd154ce0872726cc73a7585e8edb
45de58b12413df54d3dc7cd313f117930964504e
refs/heads/master
2022-03-09T15:41:34.644027
2017-10-11T15:29:09
2017-10-11T22:46:54
106,571,653
1
2
null
2017-10-11T15:20:17
2017-10-11T15:20:17
null
UTF-8
Java
false
false
1,349
java
package org.apache.maven.surefire.its; /* * 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. */ import org.apache.maven.surefire.its.fixture.SurefireJUnit4IntegrationTestCase; import org.junit.Test; /** * Test passing an argLine parameter * * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a> * @author <a href="mailto:krosenvold@apache.org">Kristian Rosenvold</a> */ public class ArgLinePropertiesIT extends SurefireJUnit4IntegrationTestCase { @Test public void argLine() { unpack( "/argLine-properties" ).executeTest().verifyErrorFree( 4 ); } }
[ "henning@schmiedehausen.org" ]
henning@schmiedehausen.org
a627716814d292cf89de45a8403ff2d214dd5c8a
5eae683a6df0c4b97ab1ebcd4724a4bf062c1889
/bin/ext-commerce/chinesetaxinvoicefacades/src/de/hybris/platform/chinesetaxinvoicefacades/populators/TaxInvoiceReversePopulator.java
91d074e19d4172aad0779d62839ca8d62ad9e2a7
[]
no_license
sujanrimal/GiftCardProject
1c5e8fe494e5c59cca58bbc76a755b1b0c0333bb
e0398eec9f4ec436d20764898a0255f32aac3d0c
refs/heads/master
2020-12-11T18:05:17.413472
2020-01-17T18:23:44
2020-01-17T18:23:44
233,911,127
0
0
null
2020-06-18T15:26:11
2020-01-14T18:44:18
null
UTF-8
Java
false
false
1,601
java
/* * [y] hybris Platform * * Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. * * This software is the confidential and proprietary information of SAP * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with SAP. */ package de.hybris.platform.chinesetaxinvoicefacades.populators; import de.hybris.platform.chinesetaxinvoicefacades.data.TaxInvoiceData; import de.hybris.platform.chinesetaxinvoiceservices.enums.InvoiceCategory; import de.hybris.platform.chinesetaxinvoiceservices.enums.InvoiceRecipientType; import de.hybris.platform.chinesetaxinvoiceservices.model.TaxInvoiceModel; import de.hybris.platform.converters.Populator; import org.apache.commons.lang.StringUtils; import org.springframework.stereotype.Component; @Component("taxInvoiceReversePopulator") public class TaxInvoiceReversePopulator implements Populator<TaxInvoiceData, TaxInvoiceModel> { @Override public void populate(final TaxInvoiceData source, final TaxInvoiceModel target) { if (StringUtils.isNotBlank(source.getCategory())) { target.setCategory(InvoiceCategory.valueOf(source.getCategory())); } else { target.setCategory(InvoiceCategory.GENERAL); } if (StringUtils.isNotBlank(source.getRecipientType())) { target.setRecipientType(InvoiceRecipientType.valueOf(source.getRecipientType())); } else { target.setRecipientType(InvoiceRecipientType.INDIVIDUAL); } target.setRecipient(source.getRecipient()); } }
[ "travis.d.crawford@accenture.com" ]
travis.d.crawford@accenture.com
72ae92ae3272482feed74114150d08d6df6fd145
a0dc6d239311f16455f0ed738bb3b7d63bf90ccb
/framework-workspace2/springmvc14-board/src/main/java/org/kosta/springmvc14/model/MemberDAO.java
c96d565bcd25d02820146ab6576b456d0cf454f7
[]
no_license
8story8/java
e433ed74d251859baa30038b2ad8f57f424f9db5
2f59794f50cee6241fed182cedcf2a3d49c8d125
refs/heads/master
2021-04-03T09:22:28.516512
2018-07-09T08:21:47
2018-07-09T08:21:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
273
java
package org.kosta.springmvc14.model; public interface MemberDAO { public MemberVO findMemberById(String id); public MemberVO login(MemberVO vo); public void updateMember(MemberVO vo); public void registerMember(MemberVO vo) ; public int idcheck(String id) ; }
[ "8story8@naver.com" ]
8story8@naver.com
f57ffb4c2af18604a76c56331de56e30f34f7487
08798b2882b5876a6630076477f5718d2ecc6116
/kronos-core-cloud/src/main/java/com/arrow/kronos/data/AzureIntegrationProperties.java
2133637ba044cbca2da0c4abb578ac8cdb23d157
[ "Apache-2.0" ]
permissive
konexios/moonstone
8c5d4dc035c586204bc996582f0f176b50e64919
47f7b874e68833e19314dd9bc5fdf1755a82a42f
refs/heads/master
2023-01-20T18:41:36.646922
2019-11-12T20:44:59
2019-11-12T20:44:59
195,619,626
4
1
Apache-2.0
2023-01-12T11:50:07
2019-07-07T06:50:12
Java
UTF-8
Java
false
false
1,729
java
package com.arrow.kronos.data; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import javax.validation.constraints.NotBlank; import org.springframework.data.annotation.Transient; import com.fasterxml.jackson.annotation.JsonIgnore; public class AzureIntegrationProperties implements Serializable { private static final long serialVersionUID = -7635416155278580667L; private String accessPolicyName; @NotBlank private String hostName; @NotBlank private String accessKeyName; @NotBlank private String accessKey; private List<String> gatewayIds = new ArrayList<>(); @Transient @JsonIgnore private SocialEventRegistration refSocialEventRegistration; public String getAccessPolicyName() { return accessPolicyName; } public void setAccessPolicyName(String accessPolicyName) { this.accessPolicyName = accessPolicyName; } public List<String> getGatewayIds() { return gatewayIds; } public void setGatewayIds(List<String> gatewayIds) { this.gatewayIds = gatewayIds; } public String getHostName() { return hostName; } public void setHostName(String hostName) { this.hostName = hostName; } public String getAccessKeyName() { return accessKeyName; } public void setAccessKeyName(String accessKeyName) { this.accessKeyName = accessKeyName; } public String getAccessKey() { return accessKey; } public void setAccessKey(String accessKey) { this.accessKey = accessKey; } public SocialEventRegistration getRefSocialEventRegistration() { return refSocialEventRegistration; } public void setRefSocialEventRegistration(SocialEventRegistration refSocialEventRegistration) { this.refSocialEventRegistration = refSocialEventRegistration; } }
[ "tam.nguyen1@arrow.com" ]
tam.nguyen1@arrow.com
21507f7c23d94eaec419662a51061049981dfc32
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/24/24_39ac55a3817ad7331989ef7a77da21c59a21a268/WY_IDBased/24_39ac55a3817ad7331989ef7a77da21c59a21a268_WY_IDBased_s.java
2d67c85acaf32973464f310db48f254834432d78
[]
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,082
java
package markehme.factionsplus.config; import markehme.factionsplus.extras.*; public abstract class WY_IDBased extends WYItem { private String id; public WY_IDBased( int lineNumber, String identifier){//, WYSection _parent, WYItem _prev ) { super( lineNumber);//, _parent, _prev ); id = identifier; assert Q.nn( id ); } public String getId() { return id; } protected void setId( String string ) { id = string; } public String getInAbsoluteDottedForm() { return getInAbsoluteDottedForm( null ); } /** * @param upToAndExcluding * can be null * @return ie. extras.lwc.disableSomething */ public String getInAbsoluteDottedForm( WYSection upToAndExcluding ) { String df = ""; WYSection p = getParent(); if ( ( null != p ) && ( !p.equals( upToAndExcluding ) ) ) { df = p.getInAbsoluteDottedForm( upToAndExcluding ) + Config.DOT; } return df + this.getId(); } @Override public String toString() { return getId() + WannabeYaml.IDVALUE_SEPARATOR; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
ea7e57d145a7e4a76641eaee2ab42055707a208f
f8305b2beb183dcf70ed2eac8286ed3c8bab5c71
/staff/src/main/java/com/ljl/staff/entity/Unit.java
59eaaa607efa734dea6279c9e3d2d735baeecafd
[]
no_license
Dylan666666/SCMS-SpringCloud
4a0fc9be04b7013d0433c35ff3b97c7a276a0e2e
5f12280e3bdc6028ab2c3520675eae16dcd377ac
refs/heads/main
2023-02-15T16:34:01.209288
2021-01-17T08:45:44
2021-01-17T08:45:44
329,216,960
2
0
null
null
null
null
UTF-8
Java
false
false
609
java
package com.ljl.staff.entity; import java.io.Serializable; /** * 销售单位类 * * @Author: Mr_OO * @Date: 2020/11/18 10:15 */ public class Unit implements Serializable { private static final long serialVersionUID = 6125632518553529676L; private Integer unitId; private String unitName; public Integer getUnitId() { return unitId; } public void setUnitId(Integer unitId) { this.unitId = unitId; } public String getUnitName() { return unitName; } public void setUnitName(String unitName) { this.unitName = unitName; } }
[ "1439620614@qq.com" ]
1439620614@qq.com
6256219e01187de49c24061291dfd181f0d97323
e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3
/src/chosun/ciis/mt/commatr/rec/MT_COMMATR_7510_LCURLIST1Record.java
a294304a1d2149ffd913f155c7f36c2885189b30
[]
no_license
nosmoon/misdevteam
4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60
1829d5bd489eb6dd307ca244f0e183a31a1de773
refs/heads/master
2020-04-15T15:57:05.480056
2019-01-10T01:12:01
2019-01-10T01:12:01
164,812,547
1
0
null
null
null
null
UHC
Java
false
false
2,077
java
/*************************************************************************************************** * 파일명 : .java * 기능 : 독자우대-구독신청 * 작성일자 : 2007-05-22 * 작성자 : 김대섭 ***************************************************************************************************/ /*************************************************************************************************** * 수정내역 : * 수정자 : * 수정일자 : * 백업 : ***************************************************************************************************/ package chosun.ciis.mt.commatr.rec; import java.sql.*; import chosun.ciis.mt.commatr.dm.*; import chosun.ciis.mt.commatr.ds.*; /** * */ public class MT_COMMATR_7510_LCURLIST1Record extends java.lang.Object implements java.io.Serializable{ public String jejisa; public String paper_cmpy; public String wgt_tot; public String per_tot; public String std_rate; public String diff_rate; public String amt; public MT_COMMATR_7510_LCURLIST1Record(){} public void setJejisa(String jejisa){ this.jejisa = jejisa; } public void setPaper_cmpy(String paper_cmpy){ this.paper_cmpy = paper_cmpy; } public void setWgt_tot(String wgt_tot){ this.wgt_tot = wgt_tot; } public void setPer_tot(String per_tot){ this.per_tot = per_tot; } public void setStd_rate(String std_rate){ this.std_rate = std_rate; } public void setDiff_rate(String diff_rate){ this.diff_rate = diff_rate; } public void setAmt(String amt){ this.amt = amt; } public String getJejisa(){ return this.jejisa; } public String getPaper_cmpy(){ return this.paper_cmpy; } public String getWgt_tot(){ return this.wgt_tot; } public String getPer_tot(){ return this.per_tot; } public String getStd_rate(){ return this.std_rate; } public String getDiff_rate(){ return this.diff_rate; } public String getAmt(){ return this.amt; } } /* 작성시간 : Fri Dec 04 14:52:34 KST 2015 */
[ "DLCOM000@172.16.30.11" ]
DLCOM000@172.16.30.11
0312616bc8c5b2b44f67d18740f8dec86ca39c4c
a05e1a01a49a59129cdd71c1fe843c910a35ed8c
/aws-java-sdk-kms/src/main/java/com/amazonaws/services/kms/model/transform/ListKeysRequestMarshaller.java
111d90391a31b459f064c831ee22adbd49af175b
[ "Apache-2.0", "JSON" ]
permissive
lenadkn/java-sdk-test-2
cd36997e44cd3926831218b2da7c71deda8c2b26
28375541f8a4ae27417419772190a8de2b68fc32
refs/heads/master
2021-01-20T20:36:53.719764
2014-12-19T00:38:57
2014-12-19T00:38:57
65,262,893
1
0
null
null
null
null
UTF-8
Java
false
false
3,121
java
/* * Copyright 2010-2014 Amazon.com, Inc. or its affiliates. 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. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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.amazonaws.services.kms.model.transform; import static com.amazonaws.util.StringUtils.UTF8; import static com.amazonaws.util.StringUtils.COMMA_SEPARATOR; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.OutputStreamWriter; import java.io.StringWriter; import java.io.Writer; import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.List; import java.util.regex.Pattern; import com.amazonaws.AmazonClientException; import com.amazonaws.Request; import com.amazonaws.DefaultRequest; import com.amazonaws.http.HttpMethodName; import com.amazonaws.services.kms.model.*; import com.amazonaws.transform.Marshaller; import com.amazonaws.util.BinaryUtils; import com.amazonaws.util.StringUtils; import com.amazonaws.util.StringInputStream; import com.amazonaws.util.json.*; /** * List Keys Request Marshaller */ public class ListKeysRequestMarshaller implements Marshaller<Request<ListKeysRequest>, ListKeysRequest> { public Request<ListKeysRequest> marshall(ListKeysRequest listKeysRequest) { if (listKeysRequest == null) { throw new AmazonClientException("Invalid argument passed to marshall(...)"); } Request<ListKeysRequest> request = new DefaultRequest<ListKeysRequest>(listKeysRequest, "AWSKMS"); String target = "TrentService.ListKeys"; request.addHeader("X-Amz-Target", target); request.setHttpMethod(HttpMethodName.POST); request.setResourcePath(""); try { StringWriter stringWriter = new StringWriter(); JSONWriter jsonWriter = new JSONWriter(stringWriter); jsonWriter.object(); if (listKeysRequest.getLimit() != null) { jsonWriter.key("Limit").value(listKeysRequest.getLimit()); } if (listKeysRequest.getMarker() != null) { jsonWriter.key("Marker").value(listKeysRequest.getMarker()); } jsonWriter.endObject(); String snippet = stringWriter.toString(); byte[] content = snippet.getBytes(UTF8); request.setContent(new StringInputStream(snippet)); request.addHeader("Content-Length", Integer.toString(content.length)); request.addHeader("Content-Type", "application/x-amz-json-1.1"); } catch(Throwable t) { throw new AmazonClientException("Unable to marshall request to JSON: " + t.getMessage(), t); } return request; } }
[ "aws@amazon.com" ]
aws@amazon.com
55906b8130080d89ff7e1f2b79621d8c2d640291
3a65b8241586fda0c2fee4256d38918d8ee5ee8f
/java-basic/examples/Test11_11.java
e360f9950a8718355061c9395b330bf31344a3fa
[]
no_license
KIMMIAE/bitcamp
1319f49df3cc3c4e8c5af6655b554d116d9c8678
ea9d17c38a889ad79b5eae2529457a259bcb4e14
refs/heads/master
2021-10-21T17:52:06.080521
2019-03-05T12:58:09
2019-03-05T12:58:09
104,423,475
0
0
null
null
null
null
UTF-8
Java
false
false
383
java
package bitcamp.java100; public class Test11_11 { public static void main (String[] args) { //논리 값의 표현 System.out.println(true); //소문자만 가능 System.out.println(false); //System.out.println(True); //System.out.println(0 == false); } }
[ "kma613@naver.com" ]
kma613@naver.com
40ae1ce92357b5f4026b00434e63a0ccdc9800fc
e9cd46cba26799e18ce2aa7da1dd73047f65c09b
/src/test/java/com/hendisantika/springbootcamunda/SpringbootCamundaApplicationTests.java
5494c39d1c0676f3c88340a4317e3c87da681faa
[]
no_license
hendisantika/springboot-camunda
140dc85e85e6c29ced86534334b4846d31f235fd
00a9cd59a343c092b2263426b163d5783682d4c3
refs/heads/master
2022-07-30T15:32:20.118927
2022-07-17T23:10:39
2022-07-17T23:10:39
232,432,592
1
0
null
null
null
null
UTF-8
Java
false
false
246
java
package com.hendisantika.springbootcamunda; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest class SpringbootCamundaApplicationTests { @Test void contextLoads() { } }
[ "hendisantika@gmail.com" ]
hendisantika@gmail.com
e20c0a656b770a8edf0f9d81b623671279c5793c
e74d1cf6a85fe566408499832dbb95467eac0875
/src/main/java/integral/RectangleMethod.java
0e660cba7f0a2daf821200d1bdbba10ae55cbebb
[]
no_license
flaxazbest/Interpolation
15933830f2fdc9f26e66094bf0cf68e72195022c
d80f96e0007c1ac3775036d2a380b88c50e34277
refs/heads/master
2021-08-31T23:25:49.443298
2017-12-23T12:36:57
2017-12-23T12:36:57
109,454,161
2
0
null
null
null
null
UTF-8
Java
false
false
3,895
java
package integral; import addons.F; import addons.Interval; import addons.Window; import javafx.geometry.Point2D; import javafx.scene.canvas.GraphicsContext; import javafx.scene.paint.Color; import static addons.Parameters.EPS; public class RectangleMethod { private final int multiplier = 2; private F antiderivative; private F f; private Interval interval; public RectangleMethod(F f, F antiderivative, Interval interval) { this.antiderivative = antiderivative; this.f = f; this.interval = interval; } private double integrate(int parts, Method method) { double h = interval.length() / parts; double a = interval.a; double s = 0.0; while (a < interval.b) { switch (method) { case LEFT: s += f.getY(a) * h; break; case RIGHT: s += f.getY(a+h) * h; break; case MIDDLE: s += f.getY(a+h/2.0) * h; break; } a += h; } return s; } public double accuranceValue() { return antiderivative.getY(interval.b) - antiderivative.getY(interval.a); } public IntegratedResult integrate(Method method) { IntegratedResult res = new IntegratedResult(); res.accuranceValue = accuranceValue(); int parts = 2; double r = integrate(parts, method); double old = 0.0; int iteration = 0; do { res.d.add(Math.abs(res.accuranceValue - r)); old = r; iteration++; parts *= multiplier; r = integrate(parts, method); } while (Math.abs(r - old) > EPS); res.iteration = iteration; res.delta = Math.abs(r - res.accuranceValue); res.value = r; // System.err.println("Iteration = " + iteration); return res; } public static void main(String[] args) { F f = new F() { @Override public double getY(double x) { return Math.sqrt(2*x - x*x); } }; F antiD = new F() { @Override public double getY(double x) { return (x-1) * Math.sqrt(2*x - x*x) + 0.5*Math.asin(x-1); } }; RectangleMethod rm = new RectangleMethod(f, antiD, new Interval(0.0, 2.0)); double lv = rm.integrate(Method.LEFT).value; System.out.println("I = " + lv); System.out.println("Accurace value = " + rm.accuranceValue()); System.out.println("D = " + Math.abs(lv - rm.accuranceValue())); } public void draw(GraphicsContext gc, Window w, Method method, int parts) { gc.setFill(Color.DARKGRAY); gc.setLineWidth(2); gc.clearRect(0,0, w.getW(), w.getH()); gc.fillRect(0,0,w.getW(), w.getH()); f.draw(gc, w, interval.a-0.1, interval.b+0.1); gc.setStroke(Color.AQUAMARINE); double a = interval.a; double h = interval.length() / parts; gc.beginPath(); while (a < interval.b) { Point2D lP = new Point2D(a, 0); Point2D rP = null; switch (method) { case LEFT: rP = new Point2D(a+h, f.getY(a)); break; case RIGHT: rP = new Point2D(a+h, f.getY(a+h)); break; case MIDDLE: rP = new Point2D(a+h, f.getY(a+h/2.0)); break; } Point2D elP = w.realToScreen(lP); Point2D erP = w.realToScreen(rP); gc.rect(elP.getX(), elP.getY(), (erP.getX()-elP.getX()), (erP.getY()-elP.getY())); a += h; } gc.closePath(); gc.stroke(); } }
[ "flaxazbest@gmail.com" ]
flaxazbest@gmail.com
3176e8be056c5d01108dbeb5e2c6aef53dd6503f
66b0b2dbdf000affc0411a8019d64dda8990d6c3
/kakin_ex/Chapter04/Chapter04/app/src/main/java/jp/co/se/androidkakin/Chapter04/Utils.java
9d83a5838b4e8408c88de22549f2ddd89aacd197
[]
no_license
takagotch/and
e6bf811e194f47d7e2b30079c308380f7d118929
dfba108b0a1eb965a71ee2c559ac1666a7a6af57
refs/heads/master
2021-09-15T20:02:34.048548
2018-06-09T18:43:20
2018-06-09T18:43:20
109,402,630
0
0
null
null
null
null
UTF-8
Java
false
false
1,465
java
package jp.co.se.androidkakin.Chapter04; public class Utils { final static int RACKET_WIDTH = 100; final static int RACKET_HEIGHT = 20; final static int RACKET_INIT_POS_Y = 100; final static int BALL_INIT_POS_Y = -10; final static float BALL_DX = 5; final static float BALL_DY = 5; final static float BALL_RADIUS = 15; final static int BALL_DIRECTION_RIGHT = 0; final static int BALL_DIRECTION_LEFT = 1; final static int BALL_DIRECTION_TOP = 2; final static int BALL_DIRECTION_BOTTOM = 3; final static int BALL_COLOR_A = 255; final static int BALL_COLOR_R = 255; final static int BALL_COLOR_G = 0; final static int BALL_COLOR_B = 0; final static int BALL_STATUS_STOP = 0; final static int BALL_STATUS_START = 1; final static int RACKET_COLOR_A = 255; final static int RACKET_COLOR_R = 0; final static int RACKET_COLOR_G = 0; final static int RACKET_COLOR_B = 255; final static int BLOCK_COLOR_A = 255; final static int BLOCK_COLOR_R = 0; final static int BLOCK_COLOR_G = 0; final static int BLOCK_COLOR_B = 255; final static int CANVAS_COLOR_A = 255; final static int CANVAS_COLOR_R = 127; final static int CANVAS_COLOR_G = 127; final static int CANVAS_COLOR_B = 127; final static int MAX_BALL_NUM = 5; final static int GAMEOVER_PLAYERS_NUM = 0; final static int GAMEOVER_BORDER_LINE = 30; final static int BLOCK_COL_NUM = 5; final static int BLOCK_ROW_NUM = 3; final static float BALL_SPEED_TIMES = 2.0f; }
[ "dyaccb@gmail.com" ]
dyaccb@gmail.com
f9bc347fb828ab0b1ed44b4f84396624edcb8b3c
8315c1de6e03a9fdf96fcdd8fdad0712503e7b77
/zuihou-backend/zuihou-authority/zuihou-authority-entity/src/main/java/com/github/zuihou/authority/entity/core/CAuthRoleOrg.java
98bab2d5f427566f7ef6809ae8c208f6e0f5eac1
[ "Apache-2.0" ]
permissive
lkemin/zuihou-admin-cloud
a0324e50e9bf6eb3038fef3fcf72f7784a58ad2c
59b0d51b89dc146f2f4d1cd08eae7519aac3c966
refs/heads/master
2020-06-17T21:21:57.228025
2019-07-09T07:38:40
2019-07-09T07:38:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,484
java
package com.github.zuihou.authority.entity.core; import java.time.LocalDateTime; import com.baomidou.mybatisplus.annotation.TableField; import com.github.zuihou.base.entity.Entity; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.ToString; import lombok.experimental.Accessors; /** * <p> * 实体类 * 角色部门关系 * </p> * * @author zuihou * @since 2019-07-03 */ @Data @NoArgsConstructor @AllArgsConstructor @ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) @Accessors(chain = true) @ApiModel(value = "CAuthRoleOrg", description = "角色部门关系") public class CAuthRoleOrg extends Entity<Long> { private static final long serialVersionUID = 1L; /** * 角色ID * #c_auth_role */ @ApiModelProperty(value = "角色ID") @TableField("role_id") private Long roleId; /** * 部门ID * #c_core_org */ @ApiModelProperty(value = "部门ID") @TableField("org_id") private Long orgId; @Builder public CAuthRoleOrg(Long id, LocalDateTime createTime, Long createUser, Long roleId, Long orgId) { this.id = id; this.createTime = createTime; this.createUser = createUser; this.roleId = roleId; this.orgId = orgId; } }
[ "244387066@qq.com" ]
244387066@qq.com
68d4af6fa366ddd5782b7f45cc52c0f570073c71
075e4751cc3acce5b316abba1898bf105e0ae42d
/src/main/java/com/github/relucent/base/common/time/TemporalUtil.java
f067bc12c60811551c85e17d44450939fac101fc
[ "Apache-2.0" ]
permissive
Relucent/yyl-base-lib
0e590f82d9ccb7a459f943a31484120c8d8ba499
d4b0221ac9b06b38d342199a0d369ba1079b8d8f
refs/heads/master
2023-08-17T05:09:10.722858
2023-08-09T08:05:27
2023-08-09T08:05:27
162,826,074
2
1
Apache-2.0
2019-09-26T03:01:16
2018-12-22T16:26:13
Java
UTF-8
Java
false
false
4,482
java
package com.github.relucent.base.common.time; import java.time.DayOfWeek; import java.time.Duration; import java.time.temporal.ChronoUnit; import java.time.temporal.Temporal; import java.time.temporal.TemporalAdjusters; import java.time.temporal.TemporalUnit; import java.util.concurrent.TimeUnit; /** * {@link Temporal} 工具类封装 */ public class TemporalUtil { /** * 获取两个日期的差,如果结束时间早于开始时间,获取结果为负。 <br> * @param startTime 起始时刻(包括在内) * @param endTime 结束时间(不包含) * @return 时间差 {@link Duration}对象 */ public static Duration between(Temporal startTime, Temporal endTime) { return Duration.between(startTime, endTime); } /** * 获取两个日期的差,如果结束时间早于开始时间,获取结果为负。 * @param startTime 起始时刻(包括在内) * @param endTime 结束时间(不包含) * @param unit 计时单位 * @return 时间差 */ public static long between(Temporal startTime, Temporal endTime, ChronoUnit unit) { return unit.between(startTime, endTime); } /** * 时间偏移 * @param <T> 时间对象类型,如{@code LocalDate}或{@code LocalDateTime} * @param time {@link Temporal} 时间对象 * @param amountToAdd 偏移量,正数为向后偏移,负数为向前偏移 * @param unit 偏移单位,见{@link ChronoUnit},不能为null * @return 偏移后的时间对象 */ @SuppressWarnings("unchecked") public static <T extends Temporal> T offset(T time, long amountToAdd, TemporalUnit unit) { if (null == time) { return null; } return (T) time.plus(amountToAdd, unit); } /** * 偏移到指定的周几 * @param temporal 日期或者日期时间 * @param dayOfWeek 周几 * @param <T> 时间对象类型,如{@code LocalDate}或{@code LocalDateTime} * @param isPrevious 偏移方向,{@code true}向前偏移,{@code false}向后偏移。 * @return 偏移后的时间对象 */ @SuppressWarnings("unchecked") public <T extends Temporal> T offset(T temporal, DayOfWeek dayOfWeek, boolean isPrevious) { return (T) temporal.with(isPrevious ? TemporalAdjusters.previous(dayOfWeek) : TemporalAdjusters.next(dayOfWeek)); } /** * 将 {@link TimeUnit} 转换为 {@link ChronoUnit}. * @param unit 被转换的{@link TimeUnit}单位,如果为{@code null}返回{@code null} * @return {@link ChronoUnit} */ public static ChronoUnit toChronoUnit(TimeUnit unit) throws IllegalArgumentException { if (unit == null) { return null; } switch (unit) { case DAYS: return ChronoUnit.DAYS; case HOURS: return ChronoUnit.HOURS; case MINUTES: return ChronoUnit.MINUTES; case SECONDS: return ChronoUnit.SECONDS; case MILLISECONDS: return ChronoUnit.MILLIS; case MICROSECONDS: return ChronoUnit.MICROS; case NANOSECONDS: return ChronoUnit.NANOS; default: throw new IllegalArgumentException("TimeUnit cannot be converted to ChronoUnit: " + unit); } } /** * 转换 {@link ChronoUnit} 到 {@link TimeUnit}. * @param unit {@link ChronoUnit},如果为{@code null}返回{@code null} * @return {@link TimeUnit} * @throws IllegalArgumentException 如果{@link TimeUnit}没有对应单位抛出 */ public static TimeUnit toTimeUnit(ChronoUnit unit) throws IllegalArgumentException { if (unit == null) { return null; } switch (unit) { case DAYS: return TimeUnit.DAYS; case HOURS: return TimeUnit.HOURS; case MINUTES: return TimeUnit.MINUTES; case SECONDS: return TimeUnit.SECONDS; case MILLIS: return TimeUnit.MILLISECONDS; case MICROS: return TimeUnit.MICROSECONDS; case NANOS: return TimeUnit.NANOSECONDS; default: throw new IllegalArgumentException("ChronoUnit cannot be converted to TimeUnit: " + unit); } } }
[ "relucent@163.com" ]
relucent@163.com
c04d41f22d03841755959be03bef51d8f48b533f
f76b8b13a10f9ab55eb02d6371de02f35dacd37e
/src/leetcode/graphAndSearch/backTracking/FactorCombinations.java
f6c8842582a632f1972111f161dbf5dcb8494498
[]
no_license
henryisyoung/leetcode
3b813f77826a2b59cb53a85f2c73db1b36f157da
86455172bfda26eaa3f58890f94adb0aceb8b59a
refs/heads/master
2022-08-26T20:47:53.670588
2022-08-24T20:11:51
2022-08-24T20:11:51
166,873,299
1
3
null
null
null
null
UTF-8
Java
false
false
1,156
java
package leetcode.graphAndSearch.backTracking; import java.util.ArrayList; import java.util.List; public class FactorCombinations { public List<List<Integer>> getFactors(int n) { List<List<Integer>> result = new ArrayList<>(); List<Integer> list = new ArrayList<>(); if (n == 1) { return result; } dfsSearchAll(n, result, list, 2); return result; } private void dfsSearchAll(int cur, List<List<Integer>> result, List<Integer> list, int start) { if (cur == 1) { if(list.size() > 1) result.add(new ArrayList<>(list)); return; } for (int i = start; i <= cur; i++) { if (cur % i == 0) { list.add(i); dfsSearchAll(cur / i, result, list, i); list.remove(list.size() - 1); } } } public static void main(String[] args) { FactorCombinations solver = new FactorCombinations(); List<List<Integer>> result = solver.getFactors(8); for (List<Integer> list : result) { System.out.println(list.toString()); } } }
[ "zyun3939@gmail.com" ]
zyun3939@gmail.com
c9fd069a824c91afb6b147117653f861bbfa486a
36032d1bb8f40a4dd7329186628f6f79836eca07
/aliyun-java-sdk-ecd/src/main/java/com/aliyuncs/ecd/model/v20200930/DeleteOfficeSitesRequest.java
002e9ee6a803d3cf1eacf33b38bc10b301a9be8b
[ "Apache-2.0" ]
permissive
aiical/aliyun-openapi-java-sdk
5cd7d509f8df43823bcd826b1b61b419c462c4c5
71e7a7a55f48019bc9f2c6115081cb0d13801205
refs/heads/master
2023-07-07T23:27:20.196222
2021-08-20T06:57:29
2021-08-20T06:57:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,782
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.ecd.model.v20200930; import com.aliyuncs.RpcAcsRequest; import java.util.List; import com.aliyuncs.http.MethodType; import com.aliyuncs.ecd.Endpoint; /** * @author auto create * @version */ public class DeleteOfficeSitesRequest extends RpcAcsRequest<DeleteOfficeSitesResponse> { private List<String> officeSiteIds; public DeleteOfficeSitesRequest() { super("ecd", "2020-09-30", "DeleteOfficeSites", "gwsecd"); setMethod(MethodType.POST); try { com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap); com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType); } catch (Exception e) {} } public List<String> getOfficeSiteIds() { return this.officeSiteIds; } public void setOfficeSiteIds(List<String> officeSiteIds) { this.officeSiteIds = officeSiteIds; if (officeSiteIds != null) { for (int i = 0; i < officeSiteIds.size(); i++) { putQueryParameter("OfficeSiteId." + (i + 1) , officeSiteIds.get(i)); } } } @Override public Class<DeleteOfficeSitesResponse> getResponseClass() { return DeleteOfficeSitesResponse.class; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
fe6de84d6742b04fd6074585e20a413bddc8df5c
eacdd648e04abfb09855bc5e737cda0f47685011
/src/test/java/org/cugos/geometry/ws/HilbertCurveControllerTest.java
20faaaeb66808eff5a98f4eb84f1ded6baa5fe53
[]
no_license
jericks/geometry-ws
283ba132eebab4439b6fb9e3624c7c39de1219cb
3c3ab41380051efd554d2fe459d77670b6229037
refs/heads/master
2022-05-01T02:49:29.441171
2022-03-23T23:29:47
2022-03-23T23:29:47
182,345,973
3
0
null
2020-07-24T01:52:24
2019-04-20T01:37:48
Java
UTF-8
Java
false
false
2,702
java
package org.cugos.geometry.ws; import io.micronaut.http.HttpRequest; import io.micronaut.http.MediaType; import org.junit.jupiter.api.Test; import org.locationtech.jts.geom.Geometry; import java.net.URLEncoder; import static org.junit.jupiter.api.Assertions.assertEquals; public class HilbertCurveControllerTest extends AbstractControllerTest { private final String polygon = "POLYGON ((-126.91406249999999 44.08758502824516, -116.3671875 44.08758502824516, -116.3671875 50.736455137010665, -126.91406249999999 50.736455137010665, -126.91406249999999 44.08758502824516))"; @Test public void get() throws Exception { HttpRequest request = HttpRequest.GET("/hilbertCurve/wkt/wkt?number=10&geom=" + URLEncoder.encode(polygon, "UTF-8")); String geometryStr = client.toBlocking().retrieve(request); assertEquals("LINESTRING (-124.96506005438275 44.08758502824516, -122.74877001812759 44.08758502824516, " + "-122.74877001812759 46.303875064500325, -124.96506005438275 46.303875064500325, " + "-124.96506005438275 48.520165100755484, -124.96506005438275 50.73645513701065, " + "-122.74877001812759 50.73645513701065, -122.74877001812759 48.520165100755484, " + "-120.53247998187241 48.520165100755484, -120.53247998187241 50.73645513701065, " + "-118.31618994561725 50.73645513701065, -118.31618994561725 48.520165100755484, " + "-118.31618994561725 46.303875064500325, -120.53247998187241 46.303875064500325, " + "-120.53247998187241 44.08758502824516, -118.31618994561725 44.08758502824516)", geometryStr); } @Test public void post() throws Exception { HttpRequest request = HttpRequest.POST("/hilbertCurve/wkt/wkt?number=10", polygon).contentType(MediaType.TEXT_PLAIN_TYPE); String geometryStr = client.toBlocking().retrieve(request); assertEquals("LINESTRING (-124.96506005438275 44.08758502824516, -122.74877001812759 44.08758502824516, " + "-122.74877001812759 46.303875064500325, -124.96506005438275 46.303875064500325, " + "-124.96506005438275 48.520165100755484, -124.96506005438275 50.73645513701065, " + "-122.74877001812759 50.73645513701065, -122.74877001812759 48.520165100755484, " + "-120.53247998187241 48.520165100755484, -120.53247998187241 50.73645513701065, " + "-118.31618994561725 50.73645513701065, -118.31618994561725 48.520165100755484, " + "-118.31618994561725 46.303875064500325, -120.53247998187241 46.303875064500325, " + "-120.53247998187241 44.08758502824516, -118.31618994561725 44.08758502824516)", geometryStr); } }
[ "jared.erickson@gmail.com" ]
jared.erickson@gmail.com
7d556f36ef1984107ef962fb357ef54de9b9e1bb
5fd3d2d20539d4e160f8ac293e0d4f1566a98a2c
/hz-fine-master/src/main/java/com/hz/fine/master/core/common/utils/DesCipher.java
abe1b865eba62c67617045373ab1d2beaf0254e0
[]
no_license
hzhuazhi/hz-fine
eeac8ba3b7eecebf1934abab5a4610d3f7e0cd6f
addc43d2fe849e01ebd5b78300aae6fdf2171719
refs/heads/master
2022-12-14T12:24:59.982673
2020-09-05T11:02:02
2020-09-05T11:02:02
262,562,132
1
0
null
null
null
null
UTF-8
Java
false
false
4,971
java
package com.hz.fine.master.core.common.utils; import org.apache.commons.codec.binary.Base64; import javax.crypto.Cipher; import javax.crypto.SecretKey; import javax.crypto.SecretKeyFactory; import javax.crypto.spec.DESKeySpec; import java.security.SecureRandom; /** * @Description: 将数据使用DES算法加密,方便进行网络传输,支持中文 * @author yoko * @date 2019/11/22 15:45 */ public class DesCipher { private final static String ALGORITHM = "DES"; private final static String PWD = "gvTyY9PfGqdlxfZhHMxij6iJVIlAkEAv"; private final static String ENCODING = "UTF-8"; /** * @Description: 普通DES加密 * <p>如果转换成字符串,则会在解密的时候报错</p> * @param data - 要加密的数据 * @return byte * @author yoko * @date 2019/11/22 15:45 */ public static byte[] encrypt(String data) throws Exception { SecureRandom random = new SecureRandom(); DESKeySpec desKey = new DESKeySpec(PWD.getBytes()); // 创建一个密匙工厂,然后用它把DESKeySpec转换成 SecretKeyFactory keyFactory = SecretKeyFactory.getInstance(ALGORITHM); SecretKey securekey = keyFactory.generateSecret(desKey); // Cipher对象实际完成加密操作 Cipher cipher = Cipher.getInstance(ALGORITHM); // 用密匙初始化Cipher对象 cipher.init(Cipher.ENCRYPT_MODE, securekey, random); // 现在,获取数据并加密 // 正式执行加密操作 byte[] datasource = data.getBytes(ENCODING); return cipher.doFinal(datasource); } /** * @Description: DES加密-base64 * <p>如果转换成字符串,则会在解密的时候报错;所以在代码最后进行base64加密返回数据</p> * @param data - 要加密的数据 * @return String * @author yoko * @date 2019/11/22 15:45 */ public static String encryptData(String data) throws Exception { SecureRandom random = new SecureRandom(); DESKeySpec desKey = new DESKeySpec(PWD.getBytes()); // 创建一个密匙工厂,然后用它把DESKeySpec转换成 SecretKeyFactory keyFactory = SecretKeyFactory.getInstance(ALGORITHM); SecretKey securekey = keyFactory.generateSecret(desKey); // Cipher对象实际完成加密操作 Cipher cipher = Cipher.getInstance(ALGORITHM); // 用密匙初始化Cipher对象 cipher.init(Cipher.ENCRYPT_MODE, securekey, random); // 现在,获取数据并加密 // 正式执行加密操作 byte[] datasource = data.getBytes(ENCODING); // base64加密 String res = Base64.encodeBase64String(cipher.doFinal(datasource)); return res; } /** * @Description: 普通DES解密 * <p>如果转换成字符串,则会在解密的时候报错</p> * @param src - 要解密的数据 * @return byte * @author yoko * @date 2019/11/22 15:45 */ public static String decrypt(byte[] src) throws Exception { // DES算法要求有一个可信任的随机数源 SecureRandom random = new SecureRandom(); // 创建一个DESKeySpec对象 DESKeySpec desKey = new DESKeySpec(PWD.getBytes()); // 创建一个密匙工厂 SecretKeyFactory keyFactory = SecretKeyFactory.getInstance(ALGORITHM); // 将DESKeySpec对象转换成SecretKey对象 SecretKey securekey = keyFactory.generateSecret(desKey); // Cipher对象实际完成解密操作 Cipher cipher = Cipher.getInstance(ALGORITHM); // 用密匙初始化Cipher对象 cipher.init(Cipher.DECRYPT_MODE, securekey, random); // 真正开始解密操作 return new String(cipher.doFinal(src), ENCODING); } /** * @Description: DES解密-base64 * <p>如果转换成字符串,则会在解密的时候报错;所以在解密的最后进行base64解码</p> * @param data - 要解密的数据 * @return byte * @author yoko * @date 2019/11/22 15:45 */ public static String decryptData(String data) throws Exception { // DES算法要求有一个可信任的随机数源 SecureRandom random = new SecureRandom(); // 创建一个DESKeySpec对象 DESKeySpec desKey = new DESKeySpec(PWD.getBytes()); // 创建一个密匙工厂 SecretKeyFactory keyFactory = SecretKeyFactory.getInstance(ALGORITHM); // 将DESKeySpec对象转换成SecretKey对象 SecretKey securekey = keyFactory.generateSecret(desKey); // Cipher对象实际完成解密操作 Cipher cipher = Cipher.getInstance(ALGORITHM); // 用密匙初始化Cipher对象 cipher.init(Cipher.DECRYPT_MODE, securekey, random); // 真正开始解密操作 return new String(cipher.doFinal(Base64.decodeBase64(data)), ENCODING); } public static void main(String[] args) throws Exception{ String data = "{\"fixedNum\":13717505293,\"ctime\":201911071802959,\"cctime\":201911071802959,\"sign\":\"abcdefg\",\"token\":\"小五哥1111111122a哈哈\"}"; // String data = "{\"fixedNum\":13717505293,\"ctime\":201911071802959,\"cctime\":201911071802959,\"sign\":\"abcdefg\",\"token\":\"adcdef\"}"; String resData = encryptData(data); String result = decryptData(resData); System.out.println("----result:" + result); } }
[ "duanfeng_1712@qq.com" ]
duanfeng_1712@qq.com
f4ca60871e8624eeb2a7268c690b571081a37e4c
fefcc8330bec94c86e4dca441d3907c436ce34b7
/src/main/java/govind/incubator/launcher/ChildProcAppHandle.java
5d0938019eeafe374aeb747331fd6366e0742c81
[]
no_license
gaocn/govind-incubator
da842364dfbaf3ff4635752b97cba1b981e11cac
543530e7716acfce76561dca829aae5b36f69a3f
refs/heads/master
2022-07-12T20:52:59.359388
2019-11-13T07:10:04
2019-11-13T07:10:04
203,985,065
0
0
null
2022-07-01T17:42:25
2019-08-23T11:24:17
Java
UTF-8
Java
false
false
3,641
java
package govind.incubator.launcher; import govind.incubator.launcher.LauncherProtocol.StopMessage; import govind.incubator.launcher.util.NamedThreadFactory; import govind.incubator.launcher.util.OutputRedirector; import lombok.extern.slf4j.Slf4j; import java.io.IOException; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.List; import java.util.concurrent.ThreadFactory; import static govind.incubator.launcher.util.CommandBuilderUtils.checkState; /** * @Author: 高文文 * Project Name: govind-incubator * Date: 2019-11-11 * * Handle implementation for monitoring apps started as a child process * */ @Slf4j public class ChildProcAppHandle implements GovindAppHandle{ /** 用于处理子进程输出流的线程工厂 */ static final ThreadFactory REDIRECT_FACTORY = new NamedThreadFactory("launcher-proc-%d"); final String secrect; final LauncherServer server; private Process childProc; private boolean disposed; private LauncherConnection connection; private List<Listener> listeners; private State state; private String appId; private OutputRedirector redirector; public ChildProcAppHandle(String secrect, LauncherServer server) { this.secrect = secrect; this.server = server; this.state = State.UNKNOWN; } @Override public synchronized void addListener(Listener listener) { if (this.listeners == null) { this.listeners = new ArrayList<>(); } listeners.add(listener); } @Override public State getState() { return state; } @Override public String getAppId() { return appId; } @Override public void stop() { checkState(connection != null, "app尚未连接到LauncherServer"); try { connection.send(new StopMessage()); } catch (IOException e) { throw new RuntimeException(e); } } @Override public synchronized void kill() { if (!disposed) { disconnect(); } if (childProc != null) { try { childProc.exitValue(); } catch (IllegalThreadStateException e) { // Child is still alive. Try to use Java 8's "destroyForcibly()" // if available, fall back to the old API if it's not there. try { Method destory = childProc.getClass().getMethod("destroyForcibly"); destory.invoke(childProc); } catch (Exception inner) { childProc.destroy(); } } finally { childProc = null; } } } @Override public synchronized void disconnect() { if (!disposed) { disposed = true; if (connection != null) { try { connection.close(); } catch (IOException e) { //NOP } } server.unregister(this); if (redirector != null) { redirector.stop(); } } } public String getSecrect() { return secrect; } public void setChildProc(Process childProc, String loggerName) { this.childProc = childProc; this.redirector = new OutputRedirector(childProc.getInputStream(), loggerName, REDIRECT_FACTORY); } public void setConnection(LauncherConnection connection) { this.connection = connection; } public LauncherServer getServer() { return server; } public LauncherConnection getConnection() { return connection; } public void setAppId(String appId) { this.appId = appId; fireEvent(true); } public void setState(State s) { if (!state.isFinal()) { this.state = s; fireEvent(false); } else { log.warn("Backend requested transition from final state {} to {}", state, s); } } private synchronized void fireEvent(boolean isInfoChanged) { if (listeners != null) { for (Listener l : listeners) { if (isInfoChanged) { l.infoChanged(this); } else { l.stateChanged(this); } } } } }
[ "gaowenwencn@163.com" ]
gaowenwencn@163.com
f0392da71590b15b1bdfa0c4ad4243655c6963fb
0ca9a0873d99f0d69b78ed20292180f513a20d22
/saved/sources/com/google/android/gms/common/api/internal/zzaf.java
71e7f2c3787598d1d1979a569a743bd556e3522a
[]
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
3,879
java
package com.google.android.gms.common.api.internal; import com.google.android.gms.common.api.ApiException; import com.google.android.gms.common.api.Result; import com.google.android.gms.common.api.Status; import com.google.android.gms.tasks.TaskCompletionSource; import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.WeakHashMap; /* compiled from: ConnectionlessInProgressCalls */ public final class zzaf { /* access modifiers changed from: private */ public final Map<BasePendingResult<?>, Boolean> zza = Collections.synchronizedMap(new WeakHashMap()); /* access modifiers changed from: private */ public final Map<TaskCompletionSource<?>, Boolean> zzb = Collections.synchronizedMap(new WeakHashMap()); /* access modifiers changed from: package-private */ public final void zza(BasePendingResult<? extends Result> basePendingResult, boolean z) { this.zza.put(basePendingResult, Boolean.valueOf(z)); basePendingResult.zza(new zzag(this, basePendingResult)); } /* access modifiers changed from: package-private */ public final <TResult> void zza(TaskCompletionSource<TResult> taskCompletionSource, boolean z) { this.zzb.put(taskCompletionSource, Boolean.valueOf(z)); taskCompletionSource.getTask().addOnCompleteListener(new zzah(this, taskCompletionSource)); } /* access modifiers changed from: package-private */ public final boolean zza() { return !this.zza.isEmpty() || !this.zzb.isEmpty(); } /* JADX DEBUG: Failed to find minimal casts for resolve overloaded methods, cast all args instead method: com.google.android.gms.common.api.internal.zzaf.zza(boolean, com.google.android.gms.common.api.Status):void arg types: [int, com.google.android.gms.common.api.Status] candidates: com.google.android.gms.common.api.internal.zzaf.zza(com.google.android.gms.common.api.internal.BasePendingResult<? extends com.google.android.gms.common.api.Result>, boolean):void com.google.android.gms.common.api.internal.zzaf.zza(com.google.android.gms.tasks.TaskCompletionSource, boolean):void com.google.android.gms.common.api.internal.zzaf.zza(boolean, com.google.android.gms.common.api.Status):void */ public final void zzb() { zza(false, zzbn.zza); } /* JADX DEBUG: Failed to find minimal casts for resolve overloaded methods, cast all args instead method: com.google.android.gms.common.api.internal.zzaf.zza(boolean, com.google.android.gms.common.api.Status):void arg types: [int, com.google.android.gms.common.api.Status] candidates: com.google.android.gms.common.api.internal.zzaf.zza(com.google.android.gms.common.api.internal.BasePendingResult<? extends com.google.android.gms.common.api.Result>, boolean):void com.google.android.gms.common.api.internal.zzaf.zza(com.google.android.gms.tasks.TaskCompletionSource, boolean):void com.google.android.gms.common.api.internal.zzaf.zza(boolean, com.google.android.gms.common.api.Status):void */ public final void zzc() { zza(true, zzdr.zza); } private final void zza(boolean z, Status status) { HashMap hashMap; HashMap hashMap2; synchronized (this.zza) { hashMap = new HashMap(this.zza); } synchronized (this.zzb) { hashMap2 = new HashMap(this.zzb); } for (Map.Entry entry : hashMap.entrySet()) { if (z || ((Boolean) entry.getValue()).booleanValue()) { ((BasePendingResult) entry.getKey()).zzd(status); } } for (Map.Entry entry2 : hashMap2.entrySet()) { if (z || ((Boolean) entry2.getValue()).booleanValue()) { ((TaskCompletionSource) entry2.getKey()).trySetException(new ApiException(status)); } } } }
[ "eliminater74@gmail.com" ]
eliminater74@gmail.com
c7a7cc3dccf250bc8aef8ee4a2e02210ae0147f7
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/11/11_c6d00caed52b5459ad27bf68b56d432a0ab87363/ScriptingUIActivator/11_c6d00caed52b5459ad27bf68b56d432a0ab87363_ScriptingUIActivator_t.java
bc732aa8850317098b93e613be6b9b216664246d
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,575
java
package org.kompiro.jamcircle.scripting.ui; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.jface.resource.ImageRegistry; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.plugin.AbstractUIPlugin; import org.kompiro.jamcircle.scripting.util.ScriptingSecurityHelper; import org.kompiro.jamcircle.scripting.util.ScriptingSecurityManager; import org.osgi.framework.BundleContext; /** * The activator class controls the plug-in life cycle */ public class ScriptingUIActivator extends AbstractUIPlugin { // The plug-in ID public static final String PLUGIN_ID = "org.kompiro.jamcircle.scripting.ui"; //$NON-NLS-1$ // The shared instance private static ScriptingUIActivator plugin; /** * The constructor */ public ScriptingUIActivator() { } public void start(BundleContext context) throws Exception { super.start(context); ScriptingSecurityManager.setScriptingExitHelper(new ScriptingSecurityHelper() { public void throwSecurityException() throws SecurityException { if (PlatformUI.isWorkbenchRunning()) { throw new SecurityException(); } } }); plugin = this; } private void initializeColorRegistry() { for (ScriptingColorEnum e : ScriptingColorEnum.values()) { e.initialize(); } } public void stop(BundleContext context) throws Exception { plugin = null; super.stop(context); } public static ScriptingUIActivator getDefault() { return plugin; } @Override public ImageRegistry getImageRegistry() { final ImageRegistry[] imageRegistry = new ImageRegistry[1]; PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { public void run() { imageRegistry[0] = ScriptingUIActivator.super.getImageRegistry(); } }); return imageRegistry[0]; } @Override protected void initializeImageRegistry(ImageRegistry reg) { for (ScriptingImageEnum e : ScriptingImageEnum.values()) { initializeImage(reg, e); } initializeColorRegistry(); } private void initializeImage(ImageRegistry reg, ScriptingImageEnum constants) { String PLUGIN_ID = getBundle().getSymbolicName(); reg.put(constants.toString(), imageDescriptorFromPlugin(PLUGIN_ID, constants.getPath())); } public static IStatus createErrorStatus(Throwable e) { return new Status(IStatus.ERROR, PLUGIN_ID, Messages.ScriptingUIActivator_error_message, e); } public static void logError(Throwable e) { IStatus status = createErrorStatus(e); getDefault().getLog().log(status); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
fea5ac0f2b3ae11fd4ba148cf301a1b1c50a0352
072216667ef59e11cf4994220ea1594538db10a0
/googleplay/com/google/android/libraries/bind/experimental/card/CardEditPlaceHolder.java
a7cbd9904fc5615b8bf9d00ae881d5778c0d41b5
[]
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
832
java
package com.google.android.libraries.bind.experimental.card; import android.content.Context; import android.util.AttributeSet; import com.google.android.libraries.bind.R; import com.google.android.libraries.bind.widget.BindingFrameLayout; public class CardEditPlaceHolder extends BindingFrameLayout { public static final int[] EQUALITY_FIELDS; public static final int LAYOUT; static { LAYOUT = R.layout.bind__card_edit_placeholder; EQUALITY_FIELDS = new int[0]; } public CardEditPlaceHolder(Context context) { this(context, null, 0); } public CardEditPlaceHolder(Context context, AttributeSet attrs) { this(context, attrs, 0); } public CardEditPlaceHolder(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } }
[ "songjd@putao.com" ]
songjd@putao.com
8196f8c88854907fbe998520869ca7f0b8a10cb6
d7662b46a49009b4c7172625749db1d5c31c1919
/PcmEvent/src/fr/cactuscata/pcmevent/command/nosimplecmd/delayhit/DelayHitCmd.java
af17434aa136d46b8aba5c4160bc698ad7eeb903
[]
no_license
CactusCata/PcmEvent
7fc8e4b4d280a250460235fc52966932edae8475
fbb1a7bd4a34d9002af7e5de978350c8480812a3
refs/heads/master
2020-05-04T17:36:29.614096
2019-04-03T15:37:20
2019-04-03T15:37:20
179,318,195
0
0
null
null
null
null
ISO-8859-1
Java
false
false
1,184
java
package fr.cactuscata.pcmevent.command.nosimplecmd.delayhit; import fr.cactuscata.pcmevent.command.NotSimpleCommand; /** * Classe qui permet d'executer la commande /hitdelay, cette dernière permet de * mettre un delais (en tick) sur un cible, celle-ci ne pourra recevoir un coup * qu'après le nombre indiqué (toujours en tick). La classe met a disposition * quatres arguments qui sont [add/set/remove/reset]. * * @author CactusCata * @version 2.5.1 * @since 2.2.0 * @see DelayHitCmdAdd DelayHitCmdRemove DelayHitCmdReset DelayHitCmdSet */ public final class DelayHitCmd extends NotSimpleCommand { /** * Instancie les objets {@link DelayHitCmdAdd}, {@link DelayHitCmdRemove}, * {@link DelayHitCmdReset} et {@link DelayHitCmdSet}. */ public DelayHitCmd() { super(new DelayHitCmdAdd(), new DelayHitCmdRemove(), new DelayHitCmdSet(), new DelayHitCmdReset()); } @Override protected final String getTutorialCommand() { return "Grace à cette commande vous pourrez modifier le delais entre lequel les gens ne pourront plus me de dégats au joueur préciser. Fonctionne avec les sous-arguments [add/set/remove/reset]."; } }
[ "adam.chareyre.1999@gmail.com" ]
adam.chareyre.1999@gmail.com
22a52a60db45c7b856b9160adf6b7d880618430b
aaa17f8233980b699ef5dae6010c01232cb9fce9
/Java/735.AsteroidCollision/Solution.java
40d2e692d0bf063d5c16405a7bf14419f5f61498
[]
no_license
mud2man/LeetCode
6aa329a66c4785ecfe550b52b04b5fededdfb814
7f97f9fc0ff1d57d35b67d9d240ac990d66ac5aa
refs/heads/master
2021-12-12T01:40:43.208616
2021-11-21T06:12:13
2021-11-21T06:12:13
63,312,728
2
1
null
null
null
null
UTF-8
Java
false
false
1,811
java
/* Stack: Time:O(n), Space:O(n) * 1. Have a list remainAsteroids to keep the remaining asteriod * 2. If asteroids[i] > 0, add it to the end * 3. Otherwise, start crush operations */ import java.util.*; public class Solution{ public int[] asteroidCollision(int[] asteroids) { Deque<Integer> monotonousStack = new LinkedList<>(); for(int asteroid: asteroids){ if(asteroid > 0){ monotonousStack.add(asteroid); }else{ boolean crashed = false; while(!monotonousStack.isEmpty()){ if(monotonousStack.peekLast() < 0){ break; }else{ if(monotonousStack.peekLast() > -asteroid){ crashed = true; break; }else if(monotonousStack.peekLast() == -asteroid){ monotonousStack.pollLast(); crashed = true; break; }else{ monotonousStack.pollLast(); } } } if(!crashed){ monotonousStack.add(asteroid); } } } int[] ret = new int[monotonousStack.size()]; for(int i = 0; i < ret.length; ++i){ ret[i] = monotonousStack.pollFirst(); } return ret; } public static void main(String[] args){ int[] asteroids = {5, 10, -5}; Solution sol = new Solution(); System.out.println("asteroids: " + Arrays.toString(asteroids)); System.out.println("remaining: " + Arrays.toString(sol.asteroidCollision(asteroids))); } }
[ "chih-hung.lu@columbia.edu" ]
chih-hung.lu@columbia.edu
9c46249923192d23fa207bbff6314b0c96bb83be
bd729ef9fcd96ea62e82bb684c831d9917017d0e
/StatusStatistics/src/com/ctfo/trackservice/service/VehicleMileageService.java
92601070a350b0ca1708103012c7a2cba8f66919
[]
no_license
shanghaif/workspace-kepler
849c7de67b1f3ee5e7da55199c05c737f036780c
ac1644be26a21f11a3a4a00319c450eb590c1176
refs/heads/master
2023-03-22T03:38:55.103692
2018-03-24T02:39:41
2018-03-24T02:39:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,262
java
package com.ctfo.trackservice.service; import com.ctfo.trackservice.model.VehicleMessageBean; import com.ctfo.trackservice.model.VehicleStatus; import com.ctfo.trackservice.util.DateTools; /** * 文件名:VehicleStatusService.java * 功能: * * @author huangjincheng * 2014-9-25上午9:45:27 * */ public class VehicleMileageService { //private static final Logger logger = LoggerFactory.getLogger(VehicleMileageService.class); /** * 完成以下指标计算 * STAT_DATE NUMBER(15) N 日期utc,填写中午12点 VID NUMBER(15) N 车辆编号 ONLINE_TIMES NUMBER(10) Y 车辆上线次数(终端成功鉴权次数) ONLINE_TIME NUMBER(10) Y 在线时长(通过车辆上下线记录表计算)单位:秒 ENGINE_ROTATE_TIME NUMBER(10) Y 发动机运行时长(终端上报)单位:1bit=0.05h 0=0h MILEAGE NUMBER(10) Y 行驶里程数 单位:1/10Km OIL_WEAR NUMBER(17,2) Y 当日油耗 单位:1bit=0.5L 0=0L SPEEDING_OIL NUMBER(10) Y 本日超速下油耗 单位:1bit=0.5L 0=0L SPEEDING_MILEAGE NUMBER(10) Y 本日超速下行驶里程 单位:1/10Km SPEED_MAX NUMBER(10) Y 本日最高车速 单位:1/10Km/h RPM_MAX NUMBER(10) Y 本日最高转速 单位:1bit=0.125Rpm 0=0Rpm VCL_GPS_AMOUNT NUMBER(10) Y 定位量 VCL_GPS_INVALID_AMOUNT NUMBER(10) Y 定位无效数量 VCL_GPS_TIMEINVALID_AMOUNT NUMBER(10) Y GPS时间无效数量(上传时间跟当前时间相差三个月) VCL_GPS_LONINVALID_AMOUNT NUMBER(10) Y 经纬度无效数量 IDLING_TIME NUMBER(10) Y 怠速时间 单位:秒 PRECISE_OIL NUMBER(15) Y 精准总油耗 单位为:1bit=0.01L 0=0L POINT_MILEAGE NUMBER(15) Y 最后一点减第一个点计算里程 POINT_OIL NUMBER(15) Y 最后一点减第一个点计算油耗 GIS_MILEAGE NUMBER(15) Y GIS计算里程 MET_IDLING_OIL_WEAR NUMBER(15) Y 精准怠速下油耗(unit:0.01L) MET_RUNNING_OIL_WEAR NUMBER(15) Y 精准行车油耗(unit:0.01L) ECU_OIL_WEAR NUMBER(15) Y ECU总油耗(unit:0.5L) ECU_IDLING_OIL_WEAR NUMBER(15) Y ECU怠速下油耗(unit:0.5L) ECU_RUNNING_OIL_WEAR NUMBER(15) Y ECU行车油耗(unit:0.5L) * */ private VehicleStatus vehicleStatus = new VehicleStatus(); Long dayFirstMileage = 0L; Long dayLastMileage = 0L; boolean isflag = false; private long utc; private String vid; private VehicleMessageBean lastLocBean=null; private Long tmpLastMileage=-1L; public VehicleMileageService(long utc,String vid){ this.utc = utc; this.vid = vid; vehicleStatus.setStatDate(this.utc+12*60*60*1000); vehicleStatus.setVid(this.vid); } public void executeAnalyser(VehicleMessageBean trackBean,boolean isLastRow){ Long gpsTime = trackBean.getUtc(); Long mileage = trackBean.getMileage(); //备份值 if (lastLocBean==null){ lastLocBean = trackBean; } Long lastGpsTime = lastLocBean.getUtc(); Long lastMileage = lastLocBean.getMileage(); //处理里程油耗:排除里程油耗在内部为-1的情况 if (mileage>-1){ tmpLastMileage = mileage; } if (tmpLastMileage>-1){ if (mileage == -1){ mileage = tmpLastMileage; } if (lastMileage == -1){ lastMileage = tmpLastMileage; } } //存放里程油耗差值 long mg = 0; // 记录当日开始行驶里程总数 if(mileage>0 && dayFirstMileage == 0){ dayFirstMileage = mileage; } if(mileage>0){ dayLastMileage = mileage; } //过滤突增数据 mg = mileage - lastMileage; /***** * 过滤异常数据,包括里程和油耗, * 里程为异常数据则本次里程负值为0, */ if(mg >= 0 && mg <= DateTools.accountTimeIntervalVale(gpsTime,lastGpsTime,5,10f)){ // 不做处理 }else{ mg = 0; } // 根据起步停车累加计算整日里程 vehicleStatus.addMileage(mg); if (isLastRow){//当到达最后一行时 //System.out.println("日统计mile:"+vehicleStatus.getMileage()); vehicleStatus.addPoint_milege(dayLastMileage - dayFirstMileage); // 当日行驶里程数公里 vehicleStatus.setTotalMileage(dayLastMileage); } lastLocBean = trackBean; } public VehicleStatus getVehicleStatus() { return vehicleStatus; } }
[ "zhangjunfang0505@163.com" ]
zhangjunfang0505@163.com
83e1d76c6fd22995d0bf4309a1fe511fb082deb4
678a3d58c110afd1e9ce195d2f20b2531d45a2e0
/sources/okhttp3/FormBody.java
44fc835f6d8e6c736d145eebbd12348c7fd193c8
[]
no_license
jasonnth/AirCode
d1c37fb9ba3d8087efcdd9fa2103fb85d13735d5
d37db1baa493fca56f390c4205faf5c9bbe36604
refs/heads/master
2020-07-03T08:35:24.902940
2019-08-12T03:34:56
2019-08-12T03:34:56
201,842,970
0
2
null
null
null
null
UTF-8
Java
false
false
2,540
java
package okhttp3; import java.io.IOException; import java.util.ArrayList; import java.util.List; import okhttp3.internal.Util; import okio.Buffer; import okio.BufferedSink; public final class FormBody extends RequestBody { private static final MediaType CONTENT_TYPE = MediaType.parse("application/x-www-form-urlencoded"); private final List<String> encodedNames; private final List<String> encodedValues; public static final class Builder { private final List<String> names = new ArrayList(); private final List<String> values = new ArrayList(); public Builder add(String name, String value) { this.names.add(HttpUrl.canonicalize(name, " \"':;<=>@[]^`{}|/\\?#&!$(),~", false, false, true, true)); this.values.add(HttpUrl.canonicalize(value, " \"':;<=>@[]^`{}|/\\?#&!$(),~", false, false, true, true)); return this; } public Builder addEncoded(String name, String value) { this.names.add(HttpUrl.canonicalize(name, " \"':;<=>@[]^`{}|/\\?#&!$(),~", true, false, true, true)); this.values.add(HttpUrl.canonicalize(value, " \"':;<=>@[]^`{}|/\\?#&!$(),~", true, false, true, true)); return this; } public FormBody build() { return new FormBody(this.names, this.values); } } FormBody(List<String> encodedNames2, List<String> encodedValues2) { this.encodedNames = Util.immutableList(encodedNames2); this.encodedValues = Util.immutableList(encodedValues2); } public MediaType contentType() { return CONTENT_TYPE; } public long contentLength() { return writeOrCountBytes(null, true); } public void writeTo(BufferedSink sink) throws IOException { writeOrCountBytes(sink, false); } private long writeOrCountBytes(BufferedSink sink, boolean countBytes) { Buffer buffer; if (countBytes) { buffer = new Buffer(); } else { buffer = sink.buffer(); } int size = this.encodedNames.size(); for (int i = 0; i < size; i++) { if (i > 0) { buffer.writeByte(38); } buffer.writeUtf8((String) this.encodedNames.get(i)); buffer.writeByte(61); buffer.writeUtf8((String) this.encodedValues.get(i)); } if (!countBytes) { return 0; } long byteCount = buffer.size(); buffer.clear(); return byteCount; } }
[ "thanhhuu2apc@gmail.com" ]
thanhhuu2apc@gmail.com
06ebf4181baace72a1e28d62b3fc86ba52d9b050
c2fb6846d5b932928854cfd194d95c79c723f04c
/java_backup/my java/codmw3/date2.java
dcfcd0b1207bd0c8d8188b85e4602612c4dad909
[ "MIT" ]
permissive
Jimut123/code-backup
ef90ccec9fb6483bb6dae0aa6a1f1cc2b8802d59
8d4c16b9e960d352a7775786ea60290b29b30143
refs/heads/master
2022-12-07T04:10:59.604922
2021-04-28T10:22:19
2021-04-28T10:22:19
156,666,404
9
5
MIT
2022-12-02T20:27:22
2018-11-08T07:22:48
Jupyter Notebook
UTF-8
Java
false
false
439
java
import java.util.*; public class date2 { int y,m,d; void input() { Scanner sc=new Scanner(System.in); System.out.println("Enter year"); y=sc.nextInt(); System.out.println("Enter month"); m=sc.nextInt(); System.out.println("Enter day"); d=sc.nextInt(); } void display() { System.out.println("The date is:"+d+":"+m+":"+y); } }
[ "jimutbahanpal@yahoo.com" ]
jimutbahanpal@yahoo.com
b7dac6018e290f111cc2f9c19ec627ecd5f1788f
a85d2dccd5eab048b22b2d66a0c9b8a3fba4d6c2
/rebellion_h5_realm/data/scripts/quests/_286_FabulousFeathers.java
a01ad197e42b7bff6c177bea062c7cddccc03eed
[]
no_license
netvirus/reb_h5_storm
96d29bf16c9068f4d65311f3d93c8794737d4f4e
861f7845e1851eb3c22d2a48135ee88f3dd36f5c
refs/heads/master
2023-04-11T18:23:59.957180
2021-04-18T02:53:10
2021-04-18T02:53:10
252,070,605
0
0
null
2021-04-18T02:53:11
2020-04-01T04:19:39
HTML
UTF-8
Java
false
false
2,871
java
package quests; import l2r.commons.util.Rnd; import l2r.gameserver.model.instances.NpcInstance; import l2r.gameserver.model.quest.Quest; import l2r.gameserver.model.quest.QuestState; import l2r.gameserver.scripts.ScriptFile; public class _286_FabulousFeathers extends Quest implements ScriptFile { //NPCs private static int ERINU = 32164; //Mobs private static int Shady_Muertos_Captain = 22251; private static int Shady_Muertos_Warrior = 22253; private static int Shady_Muertos_Archer = 22254; private static int Shady_Muertos_Commander = 22255; private static int Shady_Muertos_Wizard = 22256; //Quest Items private static int Commanders_Feather = 9746; //Chances private static int Commanders_Feather_Chance = 66; public _286_FabulousFeathers() { super(false); addStartNpc(ERINU); addKillId(Shady_Muertos_Captain); addKillId(Shady_Muertos_Warrior); addKillId(Shady_Muertos_Archer); addKillId(Shady_Muertos_Commander); addKillId(Shady_Muertos_Wizard); addQuestItem(Commanders_Feather); } @Override public String onEvent(String event, QuestState st, NpcInstance npc) { int _state = st.getState(); if(event.equalsIgnoreCase("trader_erinu_q0286_0103.htm") && _state == CREATED) { st.setState(STARTED); st.setCond(1); st.playSound(SOUND_ACCEPT); } else if(event.equalsIgnoreCase("trader_erinu_q0286_0201.htm") && _state == STARTED) { st.takeItems(Commanders_Feather, -1); st.giveItems(ADENA_ID, 4160); st.playSound(SOUND_FINISH); st.exitCurrentQuest(true); } return event; } @Override public String onTalk(NpcInstance npc, QuestState st) { String htmltext = "noquest"; if(npc.getNpcId() != ERINU) return htmltext; int _state = st.getState(); if(_state == CREATED) { if(st.getPlayer().getLevel() >= 17) { htmltext = "trader_erinu_q0286_0101.htm"; st.setCond(0); } else { htmltext = "trader_erinu_q0286_0102.htm"; st.exitCurrentQuest(true); } } else if(_state == STARTED) htmltext = st.getQuestItemsCount(Commanders_Feather) >= 80 ? "trader_erinu_q0286_0105.htm" : "trader_erinu_q0286_0106.htm"; return htmltext; } @Override public String onKill(NpcInstance npc, QuestState qs) { if(qs.getState() != STARTED) return null; long Commanders_Feather_count = qs.getQuestItemsCount(Commanders_Feather); if(Commanders_Feather_count < 80 && Rnd.chance(Commanders_Feather_Chance)) { qs.giveItems(Commanders_Feather, 1); if(Commanders_Feather_count >= 79) { qs.setCond(2); qs.playSound(SOUND_MIDDLE); } else qs.playSound(SOUND_ITEMGET); } return null; } @Override public void onLoad() { } @Override public void onReload() { } @Override public void onShutdown() { } }
[ "l2agedev@gmail.com" ]
l2agedev@gmail.com
0c20b1da4d73929254218c40c81541e30ebd14d1
8cc48c116ef4cc7fe91efec0606e3c667e150edc
/robot/src/org/nutzx/robot/site/Robot.java
d3b9c4edf78d4bdf2815f2bc44c184890d23ddaa
[]
no_license
chengjf0526/nutzlib
d70e67791819544196c9b19ca219b09fd4a317e6
ca891069f81feba7bfbac7a2ff651649aa465302
refs/heads/master
2020-12-27T00:19:51.691696
2011-03-08T13:32:07
2011-03-08T13:32:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
329
java
package org.nutzx.robot.site; import java.io.File; import org.nutz.lang.Files; public class Robot { public static void main(String[] args) throws Exception { File src = Files.findFile(args[0]); File dest = Files.findFile(args[1]); SiteRobot robot = new SiteRobot(); robot.transform(src, dest); } }
[ "zozohtnt@gmail.com" ]
zozohtnt@gmail.com
d09c285878edf77f61c97215ba7b1166c9bc5e74
cb322dee38f32caf8ee5d2e7f68f6281c5b0352c
/Tests/org.emftext.language.java.test/src-input/resolving_new/methodParameters_4/LocalCalls.java
8d39505e0d318169a722584763d0eef35ebde311
[]
no_license
DevBoost/JaMoPP
b83458ea74d0ead50f8879d8d9fdcae914686b13
8bc07e8407993e463323a5e0325540bed839502a
refs/heads/master
2022-09-23T19:12:43.803464
2019-06-09T20:54:34
2019-06-09T20:54:34
5,324,796
13
13
null
2022-09-05T10:47:42
2012-08-07T07:25:32
Java
UTF-8
Java
false
false
1,169
java
/******************************************************************************* * Copyright (c) 2006-2012 * Software Technology Group, Dresden University of Technology * DevBoost GmbH, Berlin, Amtsgericht Charlottenburg, HRB 140026 * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Software Technology Group - TU Dresden, Germany; * DevBoost GmbH - Berlin, Germany * - initial API and implementation ******************************************************************************/ package resolving_new.methodParameters_4; public class LocalCalls { public void m // target:1 () {} public void m // target:2 (int a) {} public void m // target:3 (int a, int b) {} public void m // target:4 (Object a) {} public void call() { // source:1:target m(); // source:2:target m(1); // source:3:target m(1, 2); // source:4:target m(new LocalCalls()); } }
[ "jendrik.johannes@devboost.de" ]
jendrik.johannes@devboost.de
599a162fd30b9d42be7afec63b5556517b1e342c
3e76cf1624b832742a93804ab70f88acb1c3bcc1
/src/main/java/io/blocko/myrealtutor/web/rest/AccountResource.java
7db8aa899684965c715c439d5c5c2c30e9749628
[]
no_license
whlee21/MyRealTutor
8b9c99725734aa3d6e709357b0b8221cb9617622
4cc3b323d0b5e6adb998ee1b12d17410b5c27509
refs/heads/master
2020-03-31T11:26:22.796589
2018-10-09T01:51:32
2018-10-09T01:51:32
152,176,675
0
0
null
null
null
null
UTF-8
Java
false
false
7,327
java
package io.blocko.myrealtutor.web.rest; import com.codahale.metrics.annotation.Timed; import io.blocko.myrealtutor.domain.User; import io.blocko.myrealtutor.repository.UserRepository; import io.blocko.myrealtutor.security.SecurityUtils; import io.blocko.myrealtutor.service.MailService; import io.blocko.myrealtutor.service.UserService; import io.blocko.myrealtutor.service.dto.PasswordChangeDTO; import io.blocko.myrealtutor.service.dto.UserDTO; import io.blocko.myrealtutor.web.rest.errors.*; import io.blocko.myrealtutor.web.rest.vm.KeyAndPasswordVM; import io.blocko.myrealtutor.web.rest.vm.ManagedUserVM; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; import javax.validation.Valid; import java.util.*; /** * REST controller for managing the current user's account. */ @RestController @RequestMapping("/api") public class AccountResource { private final Logger log = LoggerFactory.getLogger(AccountResource.class); private final UserRepository userRepository; private final UserService userService; private final MailService mailService; public AccountResource(UserRepository userRepository, UserService userService, MailService mailService) { this.userRepository = userRepository; this.userService = userService; this.mailService = mailService; } /** * POST /register : register the user. * * @param managedUserVM the managed user View Model * @throws InvalidPasswordException 400 (Bad Request) if the password is incorrect * @throws EmailAlreadyUsedException 400 (Bad Request) if the email is already used * @throws LoginAlreadyUsedException 400 (Bad Request) if the login is already used */ @PostMapping("/register") @Timed @ResponseStatus(HttpStatus.CREATED) public void registerAccount(@Valid @RequestBody ManagedUserVM managedUserVM) { if (!checkPasswordLength(managedUserVM.getPassword())) { throw new InvalidPasswordException(); } User user = userService.registerUser(managedUserVM, managedUserVM.getPassword()); mailService.sendActivationEmail(user); } /** * GET /activate : activate the registered user. * * @param key the activation key * @throws RuntimeException 500 (Internal Server Error) if the user couldn't be activated */ @GetMapping("/activate") @Timed public void activateAccount(@RequestParam(value = "key") String key) { Optional<User> user = userService.activateRegistration(key); if (!user.isPresent()) { throw new InternalServerErrorException("No user was found for this activation key"); } } /** * GET /authenticate : check if the user is authenticated, and return its login. * * @param request the HTTP request * @return the login if the user is authenticated */ @GetMapping("/authenticate") @Timed public String isAuthenticated(HttpServletRequest request) { log.debug("REST request to check if the current user is authenticated"); return request.getRemoteUser(); } /** * GET /account : get the current user. * * @return the current user * @throws RuntimeException 500 (Internal Server Error) if the user couldn't be returned */ @GetMapping("/account") @Timed public UserDTO getAccount() { return userService.getUserWithAuthorities() .map(UserDTO::new) .orElseThrow(() -> new InternalServerErrorException("User could not be found")); } /** * POST /account : update the current user information. * * @param userDTO the current user information * @throws EmailAlreadyUsedException 400 (Bad Request) if the email is already used * @throws RuntimeException 500 (Internal Server Error) if the user login wasn't found */ @PostMapping("/account") @Timed public void saveAccount(@Valid @RequestBody UserDTO userDTO) { final String userLogin = SecurityUtils.getCurrentUserLogin().orElseThrow(() -> new InternalServerErrorException("Current user login not found")); Optional<User> existingUser = userRepository.findOneByEmailIgnoreCase(userDTO.getEmail()); if (existingUser.isPresent() && (!existingUser.get().getLogin().equalsIgnoreCase(userLogin))) { throw new EmailAlreadyUsedException(); } Optional<User> user = userRepository.findOneByLogin(userLogin); if (!user.isPresent()) { throw new InternalServerErrorException("User could not be found"); } userService.updateUser(userDTO.getFirstName(), userDTO.getLastName(), userDTO.getEmail(), userDTO.getLangKey(), userDTO.getImageUrl()); } /** * POST /account/change-password : changes the current user's password * * @param passwordChangeDto current and new password * @throws InvalidPasswordException 400 (Bad Request) if the new password is incorrect */ @PostMapping(path = "/account/change-password") @Timed public void changePassword(@RequestBody PasswordChangeDTO passwordChangeDto) { if (!checkPasswordLength(passwordChangeDto.getNewPassword())) { throw new InvalidPasswordException(); } userService.changePassword(passwordChangeDto.getCurrentPassword(), passwordChangeDto.getNewPassword()); } /** * POST /account/reset-password/init : Send an email to reset the password of the user * * @param mail the mail of the user * @throws EmailNotFoundException 400 (Bad Request) if the email address is not registered */ @PostMapping(path = "/account/reset-password/init") @Timed public void requestPasswordReset(@RequestBody String mail) { mailService.sendPasswordResetMail( userService.requestPasswordReset(mail) .orElseThrow(EmailNotFoundException::new) ); } /** * POST /account/reset-password/finish : Finish to reset the password of the user * * @param keyAndPassword the generated key and the new password * @throws InvalidPasswordException 400 (Bad Request) if the password is incorrect * @throws RuntimeException 500 (Internal Server Error) if the password could not be reset */ @PostMapping(path = "/account/reset-password/finish") @Timed public void finishPasswordReset(@RequestBody KeyAndPasswordVM keyAndPassword) { if (!checkPasswordLength(keyAndPassword.getNewPassword())) { throw new InvalidPasswordException(); } Optional<User> user = userService.completePasswordReset(keyAndPassword.getNewPassword(), keyAndPassword.getKey()); if (!user.isPresent()) { throw new InternalServerErrorException("No user was found for this reset key"); } } private static boolean checkPasswordLength(String password) { return !StringUtils.isEmpty(password) && password.length() >= ManagedUserVM.PASSWORD_MIN_LENGTH && password.length() <= ManagedUserVM.PASSWORD_MAX_LENGTH; } }
[ "whlee21@gmail.com" ]
whlee21@gmail.com
4688940e74e2de2d1d1f3b42968ab1a54a39ec67
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
/eclipsejdt_cluster/14888/src_0.java
0812d12b13364c462352342191e4aa9581747ced
[]
no_license
martinezmatias/GenPat-data-C3
63cfe27efee2946831139747e6c20cf952f1d6f6
b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4
refs/heads/master
2022-04-25T17:59:03.905613
2020-04-15T14:41:34
2020-04-15T14:41:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,008
java
/******************************************************************************* * Copyright (c) 2000, 2001, 2002 International Business Machines Corp. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v0.5 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/cpl-v05.html * * Contributors: * IBM Corporation - initial API and implementation ******************************************************************************/ package org.eclipse.jdt.internal.compiler.problem; import java.util.Locale; import java.util.MissingResourceException; import java.util.ResourceBundle; import org.eclipse.jdt.core.compiler.IProblem; import org.eclipse.jdt.internal.compiler.IProblemFactory; import org.eclipse.jdt.internal.compiler.util.CharOperation; public class DefaultProblemFactory implements IProblemFactory { public String[] messageTemplates; private Locale locale; private static String[] DEFAULT_LOCALE_TEMPLATES; private final static char[] DOUBLE_QUOTES = "''".toCharArray(); //$NON-NLS-1$ private final static char[] SINGLE_QUOTE = "'".toCharArray(); //$NON-NLS-1$ /** * @param loc the locale used to get the right message */ public DefaultProblemFactory(Locale loc) { this.locale = loc; if (Locale.getDefault().equals(loc)){ if (DEFAULT_LOCALE_TEMPLATES == null){ DEFAULT_LOCALE_TEMPLATES = loadMessageTemplates(loc); } this.messageTemplates = DEFAULT_LOCALE_TEMPLATES; } else { this.messageTemplates = loadMessageTemplates(loc); } } /** * Answer a new IProblem created according to the parameters value * <ul> * <li>originatingFileName the name of the file name from which the problem is originated * <li>problemId the problem id * <li>arguments the arguments needed to set the error message * <li>severity the severity of the problem * <li>startPosition the starting position of the problem * <li>endPosition the end position of the problem * <li>lineNumber the line on which the problem occured * </ul> * @param originatingFileName char[] * @param problemId int * @param arguments String[] * @param severity int * @param startPosition int * @param endPosition int * @param lineNumber int * @return org.eclipse.jdt.internal.compiler.IProblem */ public IProblem createProblem( char[] originatingFileName, int problemId, String[] arguments, int severity, int startPosition, int endPosition, int lineNumber) { return new DefaultProblem( originatingFileName, this.getLocalizedMessage(problemId, arguments), problemId, arguments, severity, startPosition, endPosition, lineNumber); } /** * Answer the locale used to retrieve the error messages * @return java.util.Locale */ public Locale getLocale() { return locale; } public final String getLocalizedMessage(int id, String[] problemArguments) { StringBuffer output = new StringBuffer(80); String message = messageTemplates[(id & IProblem.IgnoreCategoriesMask)]; if (message == null) { return "Unable to retrieve the error message for problem id: " //$NON-NLS-1$ + id + ". Check compiler resources."; //$NON-NLS-1$ } // for compatibility with MessageFormat which eliminates double quotes in original message char[] messageWithNoDoubleQuotes = CharOperation.replace(message.toCharArray(), DOUBLE_QUOTES, SINGLE_QUOTE); message = new String(messageWithNoDoubleQuotes); // dequalify problem arguments, using following heuristic: // - if no segment is uppercased, then keep it all // - if one segment is uppercased, then only preserve the trailing portion, starting from this segment // e.g. java.lang.Object --> Object // int --> int // java.lang --> java.lang // p.X.Y --> X.Y for (int i = 0; i < problemArguments.length; i++){ String problemArgument = problemArguments[i]; int length = problemArgument.length(); if (length > 0 && Character.isLowerCase(problemArgument.charAt(0))) { int start = 0; while (start < length) { int index = problemArgument.indexOf('.', start); if (index == -1) break; if (index < length && Character.isUpperCase(problemArgument.charAt(index+1))){ problemArguments[i] = problemArgument.substring(index+1); } start = index+1; } } } int length = message.length(); int start = -1, end = length; while (true) { if ((end = message.indexOf('{', start)) > -1) { output.append(message.substring(start + 1, end)); if ((start = message.indexOf('}', end)) > -1) { try { output.append( problemArguments[Integer.parseInt(message.substring(end + 1, start))]); } catch (NumberFormatException nfe) { output.append(message.substring(end + 1, start + 1)); } catch (ArrayIndexOutOfBoundsException e) { return "Corrupted compiler resources for problem id: " //$NON-NLS-1$ + (id & IProblem.IgnoreCategoriesMask) + ". Check compiler resources."; //$NON-NLS-1$ } } else { output.append(message.substring(end, length)); break; } } else { output.append(message.substring(start + 1, length)); break; } } return output.toString(); } /** * @param problem org.eclipse.jdt.internal.compiler.IProblem * @return String */ public final String localizedMessage(IProblem problem) { return getLocalizedMessage(problem.getID(), problem.getArguments()); } /** * This method initializes the MessageTemplates class variable according * to the current Locale. */ public static String[] loadMessageTemplates(Locale loc) { ResourceBundle bundle = ResourceBundle.getBundle("org.eclipse.jdt.internal.compiler.problem.messages", loc); //$NON-NLS-1$ String[] templates = new String[500]; for (int i = 0, max = templates.length; i < max; i++) { try { templates[i] = bundle.getString(String.valueOf(i)); } catch (MissingResourceException e) { // available ID } } return templates; } public DefaultProblemFactory() { this(Locale.getDefault()); } }
[ "375833274@qq.com" ]
375833274@qq.com
0050d2ccb05104f7984f95f74e9c94ef3adada38
95c49f466673952b465e19a5ee3ae6eff76bee00
/src/main/java/com/huawei/hms/update/p586a/ThreadWrapper.java
bdefd60fe7fee86f541ca9909d481ff17f8fa51a
[]
no_license
Phantoms007/zhihuAPK
58889c399ae56b16a9160a5f48b807e02c87797e
dcdbd103436a187f9c8b4be8f71bdf7813b6d201
refs/heads/main
2023-01-24T01:34:18.716323
2020-11-25T17:14:55
2020-11-25T17:14:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,780
java
package com.huawei.hms.update.p586a; import android.content.Context; import com.huawei.hms.p575c.Checker; import com.huawei.hms.update.p586a.p587a.IOtaUpdate; import com.huawei.hms.update.p586a.p587a.IUpdateCallback; import com.huawei.hms.update.p586a.p587a.UpdateInfo; import com.zhihu.android.p966ae.p968b.RulerExecutors; import java.util.concurrent.Executor; /* renamed from: com.huawei.hms.update.a.i */ /* compiled from: ThreadWrapper */ public class ThreadWrapper implements IOtaUpdate { /* renamed from: b */ private static final Executor f22442b = RulerExecutors.m54961a("com/huawei/hms/update/a/i#newSingleThreadExecutor"); /* renamed from: a */ private final IOtaUpdate f22443a; public ThreadWrapper(IOtaUpdate aVar) { Checker.m31904a(aVar, "update must not be null."); this.f22443a = aVar; } @Override // com.huawei.hms.update.p586a.p587a.IOtaUpdate /* renamed from: b */ public Context mo37869b() { return this.f22443a.mo37869b(); } @Override // com.huawei.hms.update.p586a.p587a.IOtaUpdate /* renamed from: a */ public void mo37866a() { this.f22443a.mo37866a(); } @Override // com.huawei.hms.update.p586a.p587a.IOtaUpdate /* renamed from: a */ public void mo37867a(IUpdateCallback bVar) { f22442b.execute(new RunnableC5048j(this, bVar)); } @Override // com.huawei.hms.update.p586a.p587a.IOtaUpdate /* renamed from: a */ public void mo37868a(IUpdateCallback bVar, UpdateInfo cVar) { f22442b.execute(new RunnableC5049k(this, bVar, cVar)); } /* access modifiers changed from: private */ /* renamed from: c */ public static IUpdateCallback m32150c(IUpdateCallback bVar) { return new C5050l(bVar); } }
[ "seasonpplp@qq.com" ]
seasonpplp@qq.com
71fbc88cfa0d2626835b2549557df7230048f2eb
c3cd782ba5f9057bc27b679277083a6cfd228622
/gen/main/java/uif/domain/B_declaracionjuradaDa_def_delete_b_declaracionjuradaInput.java
ef27c36d9a9d058782d12ebf264466c9efc36dbd
[]
no_license
BCTS/gta
dcdf6bb4e112d20aca77656ba07017b659913ae1
4567e1187c00484cf1494d2084e95970fe743cd0
refs/heads/master
2020-05-21T01:02:22.113194
2013-10-23T19:57:35
2013-10-23T19:57:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,565
java
package uif.domain; import com.emc.xcp.persistence.annotation.CustomAttribute; import com.emc.xcp.persistence.annotation.PersistentAttribute; import com.emc.xcp.persistence.annotation.PersistentId; import com.emc.xcp.persistence.annotation.PersistentObject; import com.emc.xcp.services.core.annotation.Linked; import com.emc.xcp.services.framework.domain.LinkSource; import java.util.List; import java.util.Map; import org.codehaus.jackson.annotate.JsonIgnore; import org.codehaus.jackson.annotate.JsonProperty; import org.codehaus.jackson.annotate.JsonPropertyOrder; @PersistentObject(type = "uif_b_declaracionjurada") @Linked(template = "/application/uif_b_declaracionjuradas") @JsonPropertyOrder(alphabetic = true) public class B_declaracionjuradaDa_def_delete_b_declaracionjuradaInput { @PersistentId @PersistentAttribute(name = "r_object_id") @Linked private String id; @CustomAttribute(id = "effectivePermissionsHandler") private List<String> effectivePermissions; public String getId(){ return id; } public void setId(String id){ this.id = id; } public List<String> getEffectivePermissions(){ return effectivePermissions; } public void setEffectivePermissions(List<String> effectivePermissions){ this.effectivePermissions = effectivePermissions; } @JsonProperty public Map<String, java.lang.Object> getLinks(){ return LinkSource.getLinks(this); } @JsonIgnore public void setLinks(Map<String, java.lang.Object> linkSource){ } }
[ "juan.trelles@bctsconsulting.com" ]
juan.trelles@bctsconsulting.com
a047773373231264b9cd18f1f4279f743ed1f2b5
2a86cc5a14d2facf6e0a3b8472aab3bd259ed5ce
/openTCS-Kernel/src/main/java/org/opentcs/kernel/peripherals/DefaultPeripheralControllerPool.java
07e04a79af19f3ba077a93dd8b819d4fafd86033
[ "MIT", "CC-BY-4.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
jiangtaojiang/opentcs
8d0e0ecf71e87e912b82f139671107c26c75364a
96eceed8ea95f4aa9f5e5f09c0c96abc5bce6504
refs/heads/master
2023-08-03T22:37:33.838443
2021-10-06T16:09:08
2021-10-06T16:09:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,796
java
/** * Copyright (c) The openTCS Authors. * * This program is free software and subject to the MIT license. (For details, * see the licensing information (LICENSE.txt) you should have received with * this copy of the software.) */ package org.opentcs.kernel.peripherals; import java.util.HashMap; import java.util.Map; import static java.util.Objects.requireNonNull; import javax.inject.Inject; import org.opentcs.components.kernel.services.TCSObjectService; import org.opentcs.data.model.Location; import org.opentcs.data.model.TCSResourceReference; import org.opentcs.drivers.peripherals.PeripheralCommAdapter; import org.opentcs.drivers.peripherals.PeripheralController; import static org.opentcs.util.Assertions.checkArgument; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Maintains associations of {@link Location}, {@link PeripheralController} and * {@link PeripheralCommAdapter}. * * @author Martin Grzenia (Fraunhofer IML) */ public class DefaultPeripheralControllerPool implements LocalPeripheralControllerPool { /** * This class's logger. */ private static final Logger LOG = LoggerFactory.getLogger(DefaultPeripheralControllerPool.class); /** * The object service to use. */ private final TCSObjectService objectService; /** * A factory for peripheral controllers. */ private final PeripheralControllerFactory controllerFactory; /** * The entries of this pool mapped to the corresponding locations. */ private final Map<TCSResourceReference<Location>, PoolEntry> poolEntries = new HashMap<>(); /** * Indicates whether this component is initialized. */ private boolean initialized; @Inject public DefaultPeripheralControllerPool(TCSObjectService objectService, PeripheralControllerFactory controllerFactory) { this.objectService = requireNonNull(objectService, "objectService"); this.controllerFactory = requireNonNull(controllerFactory, "controllerFactory"); } @Override public void initialize() { if (isInitialized()) { LOG.debug("Already initialized, doing nothing."); return; } initialized = true; } @Override public boolean isInitialized() { return initialized; } @Override public void terminate() { if (!isInitialized()) { LOG.debug("Not initialized, doing nothing."); return; } // Detach all peripherals. for (PoolEntry curEntry : poolEntries.values()) { curEntry.controller.terminate(); } poolEntries.clear(); initialized = false; } @Override public PeripheralController getPeripheralController(TCSResourceReference<Location> locationRef) throws IllegalArgumentException { requireNonNull(locationRef, "locationRef"); checkArgument(poolEntries.containsKey(locationRef), "No controller present for %s", locationRef.getName()); return poolEntries.get(locationRef).getController(); } @Override public void attachPeripheralController(TCSResourceReference<Location> locationRef, PeripheralCommAdapter commAdapter) throws IllegalArgumentException { requireNonNull(locationRef, "locationRef"); requireNonNull(commAdapter, "commAdapter"); if (poolEntries.containsKey(locationRef)) { LOG.warn("{}: Peripheral controller already attached, doing nothing.", locationRef.getName()); return; } Location location = objectService.fetchObject(Location.class, locationRef); checkArgument(location != null, "No such location: %s", locationRef.getName()); LOG.debug("{}: Attaching controller...", locationRef.getName()); PeripheralController controller = controllerFactory.createVehicleController(locationRef, commAdapter); poolEntries.put(locationRef, new PoolEntry(locationRef, controller, commAdapter)); controller.initialize(); } @Override public void detachPeripheralController(TCSResourceReference<Location> locationRef) { requireNonNull(locationRef, "locationRef"); if (!poolEntries.containsKey(locationRef)) { LOG.warn("{}: No peripheral controller attached, doing nothing.", locationRef.getName()); return; } LOG.debug("{}: Detaching controller...", locationRef.getName()); poolEntries.remove(locationRef).getController().terminate(); } /** * An entry in this controller pool. */ private static class PoolEntry { /** * The location. */ private final TCSResourceReference<Location> location; /** * The peripheral controller associated with the location. */ private final PeripheralController controller; /** * The comm adapter associated with the location. */ private final PeripheralCommAdapter commAdapter; /** * Creates a new pool entry. * * @param location The location. * @param controller The peripheral controller associated with the location. * @param cmmmAdapter The comm adapter associated with the location. */ private PoolEntry(TCSResourceReference<Location> location, PeripheralController controller, PeripheralCommAdapter cmmmAdapter) { this.location = requireNonNull(location, "location"); this.controller = requireNonNull(controller, "controller"); this.commAdapter = requireNonNull(cmmmAdapter, "cmmmAdapter"); } public TCSResourceReference<Location> getLocation() { return location; } public PeripheralController getController() { return controller; } public PeripheralCommAdapter getCommAdapter() { return commAdapter; } } }
[ "stefan.walter@iml.fraunhofer.de" ]
stefan.walter@iml.fraunhofer.de
93bd00eebd64eb3a18bbb3c1f18254144bfe3c11
7093888cdc63414fd45fc2354a115ff99ce4b624
/Head_11-Proxy/gumball_proxy/WinnerState.java
235dcc164e68025a3086c7801c6700b7c2e79f01
[]
no_license
dimaSkalora/HeadFirstDesignPatterns
51b291facf7180516713d135f3fa82f8c5c760ee
770f2ed1ee7a46dcd6b0e0a602b1ce5475916611
refs/heads/master
2021-01-01T05:55:29.803712
2017-07-31T11:20:54
2017-07-31T11:20:54
97,261,201
0
0
null
null
null
null
UTF-8
Java
false
false
1,260
java
package gumball_proxy; public class WinnerState implements State { GumballMachine gumballMachine; public WinnerState(GumballMachine gumballMachine) { this.gumballMachine = gumballMachine; } public void insertQuarter() { System.out.println("Please wait, we're already giving you a Gumball"); } public void ejectQuarter() { System.out.println("Please wait, we're already giving you a Gumball"); } public void turnCrank() { System.out.println("Turning again doesn't get you another gumball!"); } public void dispense() { System.out.println("YOU'RE A WINNER! You get two gumballs for your quarter"); try { gumballMachine.releaseBall(); if (gumballMachine.getCount() == 0) { gumballMachine.setState(gumballMachine.getSoldOutState()); } else { gumballMachine.releaseBall(); if (gumballMachine.getCount() > 0) { gumballMachine.setState(gumballMachine.getNoQuarterState()); } else { System.out.println("Oops, out of gumballs!"); gumballMachine.setState(gumballMachine.getSoldOutState()); } } } catch (Exception e) { e.printStackTrace(); } } public String toString() { return "despensing two gumballs for your quarter, because YOU'RE A WINNER!"; } }
[ "timon2@ukr.net" ]
timon2@ukr.net
60f097e511b71437d53470bd39d8945166ce0666
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
/project_1_2/src/f/e/g/Calc_1_2_5461.java
c958cb310232267e884cdcc334edaba52f21c026
[]
no_license
chalstrick/bigRepo1
ac7fd5785d475b3c38f1328e370ba9a85a751cff
dad1852eef66fcec200df10083959c674fdcc55d
refs/heads/master
2016-08-11T17:59:16.079541
2015-12-18T14:26:49
2015-12-18T14:26:49
48,244,030
0
0
null
null
null
null
UTF-8
Java
false
false
131
java
package f.e.g; public class Calc_1_2_5461 { /** @return the sum of a and b */ public int add(int a, int b) { return a+b; } }
[ "christian.halstrick@sap.com" ]
christian.halstrick@sap.com
85df55d0ea3dfa8675f07c8298e302cfec03377d
6943c7defef1d7d7a2bbed83bc203a59dbd58502
/lesson03/_02_stringbuffer/StringBuffE.java
59d34da7a169007317c9f67b781e38bd0f5b06cf
[]
no_license
mfasta/mfasta
4759d96b258c0a06685ad9d4dda5b42b35954eea
f697878f1f9b5284527c894f8e0e543a7d93e9e2
refs/heads/master
2023-05-09T01:53:31.811761
2021-06-03T17:14:40
2021-06-03T17:14:40
373,586,290
0
0
null
null
null
null
UTF-8
Java
false
false
323
java
package lesson03._02_stringbuffer; // метод reverse() меняет текущую строку на обратное. public class StringBuffE { public static void main(String[] args){ StringBuffer sb = new StringBuffer("Апельсин"); sb.reverse(); System.out.println(sb); } }
[ "123" ]
123
52819ab959aaed82919e1f09c54e6386540951d3
10c05d8a5676b37b3a703c5839a31d80a759077f
/src/main/java/collections/sets/TreeSetDemo.java
27b9138dd884fc9944d49ed7664a497e0ad7b821
[]
no_license
JAVApoz29/JavaZaawansowana
900e5510d2da3becebdc4c1e9de603e588647490
8e36f3cecf540a3323aa067baf29663889480892
refs/heads/main
2023-02-25T13:04:46.802780
2021-02-06T14:56:09
2021-02-06T14:56:09
334,359,793
0
5
null
null
null
null
UTF-8
Java
false
false
469
java
package collections.sets; import collections.maps.TreeMapKey; import java.util.TreeSet; public class TreeSetDemo { public static void main(String[] args) { TreeSet<TreeMapKey> treeMap = new TreeSet<>(); treeMap.add(new TreeMapKey(1)); treeMap.add(new TreeMapKey(23)); treeMap.add(new TreeMapKey(70)); treeMap.add(new TreeMapKey(4)); treeMap.add(new TreeMapKey(2)); System.out.println(treeMap); } }
[ "marcin.szupke.sda@gmail.com" ]
marcin.szupke.sda@gmail.com
4220f0c268d7088f91878297ff9aa5728a56aea9
dd80a584130ef1a0333429ba76c1cee0eb40df73
/packages/apps/Gallery2/src/com/android/gallery3d/data/Path.java
fcae65e6654d81911fa191df0cfcf4ca866b18d1
[ "MIT" ]
permissive
karunmatharu/Android-4.4-Pay-by-Data
466f4e169ede13c5835424c78e8c30ce58f885c1
fcb778e92d4aad525ef7a995660580f948d40bc9
refs/heads/master
2021-03-24T13:33:01.721868
2017-02-18T17:48:49
2017-02-18T17:48:49
81,847,777
0
2
MIT
2020-03-09T00:02:12
2017-02-13T16:47:00
null
UTF-8
Java
false
false
7,421
java
/* * Copyright (C) 2010 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.gallery3d.data; import com.android.gallery3d.common.Utils; import com.android.gallery3d.util.IdentityCache; import java.lang.ref.WeakReference; import java.util.ArrayList; public class Path { private static final String TAG = "Path"; private static Path sRoot = new Path(null, "ROOT"); private final Path mParent; private final String mSegment; private WeakReference<MediaObject> mObject; private IdentityCache<String, Path> mChildren; private Path(Path parent, String segment) { mParent = parent; mSegment = segment; } public Path getChild(String segment) { synchronized (Path.class) { if (mChildren == null) { mChildren = new IdentityCache<String, Path>(); } else { Path p = mChildren.get(segment); if (p != null) return p; } Path p = new Path(this, segment); mChildren.put(segment, p); return p; } } public Path getParent() { synchronized (Path.class) { return mParent; } } public Path getChild(int segment) { return getChild(String.valueOf(segment)); } public Path getChild(long segment) { return getChild(String.valueOf(segment)); } public void setObject(MediaObject object) { synchronized (Path.class) { Utils.assertTrue(mObject == null || mObject.get() == null); mObject = new WeakReference<MediaObject>(object); } } MediaObject getObject() { synchronized (Path.class) { return (mObject == null) ? null : mObject.get(); } } @Override // TODO: toString() should be more efficient, will fix it later public String toString() { synchronized (Path.class) { StringBuilder sb = new StringBuilder(); String[] segments = split(); for (int i = 0; i < segments.length; i++) { sb.append("/"); sb.append(segments[i]); } return sb.toString(); } } public boolean equalsIgnoreCase (String p) { String path = toString(); return path.equalsIgnoreCase(p); } public static Path fromString(String s) { synchronized (Path.class) { String[] segments = split(s); Path current = sRoot; for (int i = 0; i < segments.length; i++) { current = current.getChild(segments[i]); } return current; } } public String[] split() { synchronized (Path.class) { int n = 0; for (Path p = this; p != sRoot; p = p.mParent) { n++; } String[] segments = new String[n]; int i = n - 1; for (Path p = this; p != sRoot; p = p.mParent) { segments[i--] = p.mSegment; } return segments; } } public static String[] split(String s) { int n = s.length(); if (n == 0) return new String[0]; if (s.charAt(0) != '/') { throw new RuntimeException("malformed path:" + s); } ArrayList<String> segments = new ArrayList<String>(); int i = 1; while (i < n) { int brace = 0; int j; for (j = i; j < n; j++) { char c = s.charAt(j); if (c == '{') ++brace; else if (c == '}') --brace; else if (brace == 0 && c == '/') break; } if (brace != 0) { throw new RuntimeException("unbalanced brace in path:" + s); } segments.add(s.substring(i, j)); i = j + 1; } String[] result = new String[segments.size()]; segments.toArray(result); return result; } // Splits a string to an array of strings. // For example, "{foo,bar,baz}" -> {"foo","bar","baz"}. public static String[] splitSequence(String s) { int n = s.length(); if (s.charAt(0) != '{' || s.charAt(n-1) != '}') { throw new RuntimeException("bad sequence: " + s); } ArrayList<String> segments = new ArrayList<String>(); int i = 1; while (i < n - 1) { int brace = 0; int j; for (j = i; j < n - 1; j++) { char c = s.charAt(j); if (c == '{') ++brace; else if (c == '}') --brace; else if (brace == 0 && c == ',') break; } if (brace != 0) { throw new RuntimeException("unbalanced brace in path:" + s); } segments.add(s.substring(i, j)); i = j + 1; } String[] result = new String[segments.size()]; segments.toArray(result); return result; } public String getPrefix() { if (this == sRoot) return ""; return getPrefixPath().mSegment; } public Path getPrefixPath() { synchronized (Path.class) { Path current = this; if (current == sRoot) { throw new IllegalStateException(); } while (current.mParent != sRoot) { current = current.mParent; } return current; } } public String getSuffix() { // We don't need lock because mSegment is final. return mSegment; } // Below are for testing/debugging only static void clearAll() { synchronized (Path.class) { sRoot = new Path(null, ""); } } static void dumpAll() { dumpAll(sRoot, "", ""); } static void dumpAll(Path p, String prefix1, String prefix2) { synchronized (Path.class) { MediaObject obj = p.getObject(); Log.d(TAG, prefix1 + p.mSegment + ":" + (obj == null ? "null" : obj.getClass().getSimpleName())); if (p.mChildren != null) { ArrayList<String> childrenKeys = p.mChildren.keys(); int i = 0, n = childrenKeys.size(); for (String key : childrenKeys) { Path child = p.mChildren.get(key); if (child == null) { ++i; continue; } Log.d(TAG, prefix2 + "|"); if (++i < n) { dumpAll(child, prefix2 + "+-- ", prefix2 + "| "); } else { dumpAll(child, prefix2 + "+-- ", prefix2 + " "); } } } } } }
[ "karun.matharu@gmail.com" ]
karun.matharu@gmail.com
babf68159b190b05c19297f47635ccfc93db8f63
97ddf16bd3ef5739279a430a53d28f391c49804e
/src/main/java/com/qunar/superoa/dto/UserRoleDto.java
f5ecfd5cbc4a8c8b118c7f4cdf8db84b632760eb
[ "MIT" ]
permissive
qunarcorp/superoa
40acb07a2ca9feabd573aef0cc050ee8e36bc814
57896bb2ff8e7f2c006ffa3f28805df21a3c8542
refs/heads/master
2022-11-28T09:37:47.141823
2021-12-26T19:00:55
2021-12-26T19:00:55
211,114,868
19
12
MIT
2022-11-21T22:40:21
2019-09-26T14:54:14
Java
UTF-8
Java
false
false
736
java
package com.qunar.superoa.dto; import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * @Author: yang.du * @Description: * @Date: Created in 16:04 2018/9/7 */ @Data public class UserRoleDto { @ApiModelProperty("用户名称") private String username; @ApiModelProperty("角色") private String role; @ApiModelProperty("角色名称") private String roleName; public UserRoleDto(String username, String role) { super(); this.username = username; this.role = role; } public UserRoleDto(String username, String role, String roleName) { super(); this.username = username; this.role = role; this.roleName = roleName; } public UserRoleDto() { super(); } }
[ "20832776@qunar.com" ]
20832776@qunar.com
5c4f19a08ff6316bcc9fd11a077589dc219e24af
fe0b6d0d4c14965808a4b38aa91d0c5cef1f69f6
/languages/activitydiagram/org.gemoc.activitydiagram.sequential.xactivitydiagram.grammar/src-gen/org/gemoc/activitydiagram/sequential/xactivitydiagram/serializer/ActivityDiagramSyntacticSequencer.java
94ebae022302b0318f28875c532702ef91d8331d
[]
no_license
tetrabox/examples-behavioral-interface
f05b9bf1d3a8414ffc5eef3560f72f3719e09f28
3a5df4b8ec4ed13a39712269487f07d09479ec99
refs/heads/master
2020-12-02T16:23:03.869890
2019-10-22T08:59:20
2019-10-22T08:59:20
96,529,344
0
1
null
null
null
null
UTF-8
Java
false
false
1,546
java
/* * generated by Xtext 2.10.0 */ package org.gemoc.activitydiagram.sequential.xactivitydiagram.serializer; import com.google.inject.Inject; import java.util.List; import org.eclipse.emf.ecore.EObject; import org.eclipse.xtext.IGrammarAccess; import org.eclipse.xtext.RuleCall; import org.eclipse.xtext.nodemodel.INode; import org.eclipse.xtext.serializer.analysis.GrammarAlias.AbstractElementAlias; import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynTransition; import org.eclipse.xtext.serializer.sequencer.AbstractSyntacticSequencer; import org.gemoc.activitydiagram.sequential.xactivitydiagram.services.ActivityDiagramGrammarAccess; @SuppressWarnings("all") public class ActivityDiagramSyntacticSequencer extends AbstractSyntacticSequencer { protected ActivityDiagramGrammarAccess grammarAccess; @Inject protected void init(IGrammarAccess access) { grammarAccess = (ActivityDiagramGrammarAccess) access; } @Override protected String getUnassignedRuleCallToken(EObject semanticObject, RuleCall ruleCall, INode node) { return ""; } @Override protected void emitUnassignedTokens(EObject semanticObject, ISynTransition transition, INode fromNode, INode toNode) { if (transition.getAmbiguousSyntaxes().isEmpty()) return; List<INode> transitionNodes = collectNodes(fromNode, toNode); for (AbstractElementAlias syntax : transition.getAmbiguousSyntaxes()) { List<INode> syntaxNodes = getNodesFor(transitionNodes, syntax); acceptNodes(getLastNavigableState(), syntaxNodes); } } }
[ "dorian.leroy@irisa.fr" ]
dorian.leroy@irisa.fr
f783f0dadd6d0c17b8bdbb49ffbe3ab71ccf922d
bcaa1a733700b8be816982c239d9079fa8c334b7
/eu.openanalytics.phaedra.app/src/eu/openanalytics/phaedra/app/Application.java
685baf01ad1cab251640819dd8f961801e34f213
[]
no_license
openanalytics/phaedra
dfb16cc300d0d90ca9eab233068207452d458040
2b0b79000bfcac311072b91f31eb196b08d294fe
refs/heads/master
2020-12-31T07:01:38.108586
2020-12-16T12:30:35
2020-12-16T12:30:35
58,546,934
16
4
null
null
null
null
UTF-8
Java
false
false
1,591
java
package eu.openanalytics.phaedra.app; import org.eclipse.equinox.app.IApplication; import org.eclipse.equinox.app.IApplicationContext; import org.eclipse.swt.widgets.Display; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.PlatformUI; import eu.openanalytics.phaedra.base.cache.CacheService; import eu.openanalytics.phaedra.base.environment.Screening; import eu.openanalytics.phaedra.base.pref.store.GlobalPrefenceAccessor; import eu.openanalytics.phaedra.base.util.io.FileUtils; public class Application implements IApplication { @Override public Object start(IApplicationContext context) throws Exception { Display display = PlatformUI.createDisplay(); try { OpenURLProcessor openURLProcessor = new OpenURLProcessor(display); int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor(openURLProcessor)); if (returnCode == PlatformUI.RETURN_RESTART) return IApplication.EXIT_RESTART; else return IApplication.EXIT_OK; } finally { onExit(); display.dispose(); } } /* (non-Javadoc) * @see org.eclipse.equinox.app.IApplication#stop() */ @Override public void stop() { onExit(); if (!PlatformUI.isWorkbenchRunning()) return; final IWorkbench workbench = PlatformUI.getWorkbench(); final Display display = workbench.getDisplay(); display.syncExec(() -> { if (!display.isDisposed()) workbench.close(); }); } private void onExit() { FileUtils.clearTempFolder(); GlobalPrefenceAccessor.savePreferences(); Screening.getEnvironment().disconnect(); CacheService.getInstance().shutdown(); } }
[ "tobias.verbeke@openanalytics.eu" ]
tobias.verbeke@openanalytics.eu
fa58f81bb850be102d4c053ab3fcfaeac37dca53
d34003c086b2793312b8a896e7428474f25dcc13
/src/java191122/ObjectEx04.java
05bfd13edd7cc20a5b5d0c046d818e8f2f517a6c
[]
no_license
bbodo69/java_beginner
16052d0705c45445138ddaa032e0432b7879fb56
3e51fa08288fcda5aa505ca996b9e2d9aa2f7074
refs/heads/master
2021-01-26T15:59:19.701623
2020-03-12T09:17:47
2020-03-12T09:17:47
243,455,741
0
0
null
null
null
null
UHC
Java
false
false
1,280
java
package java191122; class Point{ Point(){ } int x, y; public Point(int x, int y) { this.x = x; this.y = y; } //Object 클래스의 equals()를 좌표값 x, y가 동일한지 //비교하는 메서드로 오버라이딩 하겠다. @Override public boolean equals(Object obj) { boolean result = false; if(obj instanceof Point) { // 실제 obj가 가르키는 객체가 Point 타입인지 재확인 Point p = (Point)obj; if(x == p.x && y == p.y) result = true; } return result; } public boolean a(Point p1) { boolean result1 = false; p1 = new Point(); if(x ==p1.x && y == p1.y) { result1 = true; } return result1; } } public class ObjectEx04 { public static void main(String[] args) { // TODO Auto-generated method stub Point a = new Point(2, 5); Point b = new Point(2, 5); Point c = new Point(3, 10); if(a.equals(b)) System.out.println("a is equals to b"); if(a.equals(c)) System.out.println("a is equals to c"); if(a.equals(c)) System.out.println("b is equals to c"); if(a.a(b)) System.out.println("a is equals to b"); if(a.a(c)) System.out.println("a is equals to c"); if(a.a(c)) System.out.println("b is equals to c"); } }
[ "pc@pc-PC" ]
pc@pc-PC
1c0bf65f2d88367218f682f0edf4bb87be5011a0
6c35446feb5baaadf1901a083442e14dc423fc0b
/TestCommon/src/main/java/com/cqx/common/model/filter/action/IDataFilterAction.java
5d92bfcc7eb91d7085c081deba0e77211a08e0df
[ "Apache-2.0" ]
permissive
chenqixu/TestSelf
8e533d2f653828f9f92564c3918041d733505a30
7488d83ffd20734ab5ca431d13fa3c5946493c11
refs/heads/master
2023-09-01T06:18:59.417999
2023-08-21T06:16:55
2023-08-21T06:16:55
75,791,787
3
1
Apache-2.0
2022-03-02T06:47:48
2016-12-07T02:36:58
Java
UTF-8
Java
false
false
1,218
java
package com.cqx.common.model.filter.action; import com.cqx.common.bean.model.IDataFilterBean; import com.cqx.common.model.filter.IDataFilterCall; import java.io.Closeable; import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.concurrent.atomic.AtomicLong; /** * IDataFilterAction * * @author chenqixu */ public interface IDataFilterAction<T extends IDataFilterBean> extends Closeable { void init(Map<String, ?> param, IDataFilterCall<T> iDataFilterCall, Class<T> tClass); void put(T dataBean, long dataBean_seconds) throws Exception; void dealData(long first, String firstValue); long getWaterLine(); void setWaterLine(AtomicLong waterLine); long queryMinWaterLine(); boolean dataUpdateTimeIsNull(); long getDataUpdateTimeFirstKey(); long getDataUpdateTimeLastKey(); String getDataUpdateTimeFirstVale(); String getDataUpdateTimeLastVale(); int getDataUpdateTimeSize(); List<T> poll(long timeOut); @Override void close(); class MapKeyComparator implements Comparator<Long> { @Override public int compare(Long l1, Long l2) { return l1.compareTo(l2); } } }
[ "13509323824@139.com" ]
13509323824@139.com
d3a1ff269efb17d7e2fdc9496ea2e2a88a6a78a9
552ca07808ca65e21eaa6058c9e891624a2d10b1
/app/src/main/java/com/sendshare/movecopydata/wififiletransfer/media/GetDocumentFiles2.java
61f39b54f9a32cd2e5cfc84da7d950a5abf75e09
[]
no_license
mittko/Share-Files-Between-Android-Devices
7620196d049213b01e08278c0316e71a714a35b3
c0e770c0788bfa276e854cf21664ff4a0bc8ebea
refs/heads/main
2023-08-04T21:16:41.590310
2021-09-20T12:55:25
2021-09-20T13:01:14
408,444,622
0
0
null
null
null
null
UTF-8
Java
false
false
5,336
java
/* package com.sendshare.movecopydata.wififiletransfer.media; import android.content.Context; import android.database.Cursor; import android.net.Uri; import android.os.AsyncTask; import android.provider.MediaStore; import android.view.View; import android.webkit.MimeTypeMap; import android.widget.ProgressBar; import com.sendshare.movecopydata.wififiletransfer.activities.MainActivity; import com.sendshare.movecopydata.wififiletransfer.interfaces.ListRefresher; import com.sendshare.movecopydata.wififiletransfer.utilities.MyConsole; import com.wifi.mitko.sharewifiles3.R; import java.io.File; import java.lang.ref.WeakReference; import java.util.ArrayList; public class GetDocumentFiles2 extends AsyncTask<Void,Void, ArrayList<String>> { private ArrayList<String> documents = new ArrayList<>(); private WeakReference<Context> weakReference; private int from; private String pdf = MimeTypeMap.getSingleton().getMimeTypeFromExtension("pdf"); private String doc = MimeTypeMap.getSingleton().getMimeTypeFromExtension("doc"); private String docx = MimeTypeMap.getSingleton().getMimeTypeFromExtension("docx"); private String xls = MimeTypeMap.getSingleton().getMimeTypeFromExtension("xls"); private String xlsx = MimeTypeMap.getSingleton().getMimeTypeFromExtension("xlsx"); private String ppt = MimeTypeMap.getSingleton().getMimeTypeFromExtension("ppt"); private String pptx = MimeTypeMap.getSingleton().getMimeTypeFromExtension("pptx"); private String txt = MimeTypeMap.getSingleton().getMimeTypeFromExtension("txt"); private String rtx = MimeTypeMap.getSingleton().getMimeTypeFromExtension("rtx"); private String rtf = MimeTypeMap.getSingleton().getMimeTypeFromExtension("rtf"); private String html = MimeTypeMap.getSingleton().getMimeTypeFromExtension("html"); private ListRefresher listRefresher; public GetDocumentFiles2(int from, WeakReference<Context> weakReference,ListRefresher listRefresher) { this.weakReference = weakReference; this.from = from; this.listRefresher = listRefresher; } @Override protected void onPreExecute() { super.onPreExecute(); ProgressBar progressBar = ( (MainActivity)weakReference.get()).findViewById(R.id.progressbar); if(progressBar != null) { progressBar.setVisibility(View.VISIBLE); } } @Override protected ArrayList<String> doInBackground(Void... voids) { Uri uri = MediaStore.Files.getContentUri("external"); uri = uri.buildUpon().appendQueryParameter("limit",from+",20").build(); //Column String[] column = {MediaStore.Files.FileColumns.DATA}; //Where String where = MediaStore.Files.FileColumns.MIME_TYPE + "=?" +" OR " +MediaStore.Files.FileColumns.MIME_TYPE + "=?" +" OR " +MediaStore.Files.FileColumns.MIME_TYPE + "=?" +" OR " +MediaStore.Files.FileColumns.MIME_TYPE + "=?" +" OR " +MediaStore.Files.FileColumns.MIME_TYPE + "=?" +" OR " +MediaStore.Files.FileColumns.MIME_TYPE + "=?" +" OR " +MediaStore.Files.FileColumns.MIME_TYPE + "=?" +" OR " +MediaStore.Files.FileColumns.MIME_TYPE + "=?" +" OR " +MediaStore.Files.FileColumns.MIME_TYPE + "=?" +" OR " +MediaStore.Files.FileColumns.MIME_TYPE + "=?" +" OR " +MediaStore.Files.FileColumns.MIME_TYPE + "=?"; //args String[] args = new String[]{pdf,doc,docx,xls,xlsx,ppt,pptx,txt,rtx,rtf,html}; Cursor videocursor = weakReference.get().getContentResolver(). query(uri, column, where, args, MediaStore.Files.FileColumns.DATE_MODIFIED+" desc");// "_id DESC"); if(videocursor != null) { videocursor.moveToFirst(); do { if(videocursor.getCount() > 0) { int index = 0; try { */ /* This happens when the user deletes an image file from an file manager, and if the file manager does not movecopydata proper broadcasts to notify the media scanner, then the thumbnail info of this image would still exist in the provider.*//* String filePath = videocursor.getString(index); File file = new File(filePath); if(file.exists() && file.length() > 0) { documents.add(filePath); } }catch (IndexOutOfBoundsException e) { MyConsole.println("from GetDocumentFiles "+e.getMessage()); } } }while (videocursor.moveToNext()); videocursor.close(); } return documents; } @Override protected void onPostExecute(ArrayList<String> documents) { super.onPostExecute(documents); listRefresher.updateList(documents); ProgressBar progressBar = ( (MainActivity)weakReference.get()).findViewById(R.id.progressbar); if(progressBar != null) { progressBar.setVisibility(View.GONE); } } } */
[ "you@example.com" ]
you@example.com
c57853c9f023d2f44c7f8dff80c6012b76a60ff1
0fe59b1dfb5cf2454cef805da2804b2d3e52f742
/bee-platform-system/platform-user-api/src/main/java/com/bee/platform/user/authority/dto/AuthPlatformUserPullDownDto.java
c77dcf595ff84efe2f36f0e203ba5bf9439db577
[]
no_license
wensheng930729/platform
f75026113a841e8541017c364d30b80e94d6ad5c
49c57f1f59b1e2e2bcc2529fdf6cb515d38ab55c
refs/heads/master
2020-12-11T13:58:59.772611
2019-12-16T06:02:40
2019-12-16T06:02:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
837
java
package com.bee.platform.user.authority.dto; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; import java.io.Serializable; import java.util.Date; import java.util.List; /** * @Classname AuthPlatformUserDto * @Description 平台用户列表 返回数据 * @Date 2019/5/21 9:28 * @Author xin.huang */ @Data @NoArgsConstructor @Accessors(chain = true) @ApiModel(value = "用户下拉列表") public class AuthPlatformUserPullDownDto implements Serializable { private static final long serialVersionUID = 4874732867182112182L; @ApiModelProperty("用户id") private Integer id; @ApiModelProperty("姓名") private String name; }
[ "414608036@qq.com" ]
414608036@qq.com
d6a53f5101a017fba5830ed702dd230a34224296
85986e4d862e6fd257eb1c3db6f6b9c82bc6c4d5
/prjClienteSIC/src/main/java/ec/com/smx/sic/cliente/mdl/dto/id/ClasificacionID.java
df2539d6748c1a06134baddeffb674e640b5e845
[]
no_license
SebasBenalcazarS/RepoAngularJS
1d60d0dec454fe4f1b1a8c434b656d55166f066f
5c3e1d5bb4a624e30cba0d518ff0b0cda14aa92c
refs/heads/master
2016-08-03T23:21:26.639859
2015-08-19T16:05:00
2015-08-19T16:05:00
40,517,374
1
0
null
null
null
null
UTF-8
Java
false
false
1,610
java
/* * Creado el 19/04/2006 * * TODO Para cambiar la plantilla de este archivo generado, vaya a * Ventana - Preferencias - Java - Estilo de c�digo - Plantillas de c�digo */ package ec.com.smx.sic.cliente.mdl.dto.id; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.Embeddable; import ec.com.smx.sic.cliente.common.SICConstantes; /** * @author bmontesdeoca * */ @Embeddable @SuppressWarnings("serial") public class ClasificacionID implements Serializable { @Column(name = "CODIGOCOMPANIA", nullable = false) private Integer codigoCompania; @Column(name = "CODIGOCLASIFICACION", nullable = false) private String codigoClasificacion; public ClasificacionID() {} public ClasificacionID(Boolean initID) { if(initID){ codigoCompania = Integer.valueOf(SICConstantes.getInstancia().VALOR_INICIAL_ID); codigoClasificacion = SICConstantes.getInstancia().VALOR_INICIAL_ID; } } /** * @return Devuelve codigoCompania. */ public Integer getCodigoCompania() { return codigoCompania; } /** * @param codigoCompania El codigoCompania a establecer. */ public void setCodigoCompania(Integer codigoCompania) { this.codigoCompania = codigoCompania; } /** * @return Devuelve codigoClasificacion. */ public String getCodigoClasificacion() { return codigoClasificacion; } /** * @param codigoClasificacion El codigoClasificacion a establecer. */ public void setCodigoClasificacion(String codigoClasificacion) { this.codigoClasificacion = codigoClasificacion; } }
[ "nbenalcazar@kruger.com.ec" ]
nbenalcazar@kruger.com.ec
ecc1e6973190eea4911b6e299ba957f83934e205
f42034f97d5da7454a63dd0a4c2f598dd9906cc3
/import-utils/src/main/java/gov/va/oia/terminology/converters/sharedUtils/umlsUtils/ValuePropertyPairWithAttributes.java
12ccfce1ffd915466270748735c07b6ea7543204
[ "Apache-2.0" ]
permissive
sotty/ISAAC
b1ffa2e0617bccaa7638aac79257e29a7d8556da
2c95a2ddb07d877c50fb069160722c4e64a3f603
refs/heads/master
2021-01-14T11:20:01.522519
2016-04-11T21:24:11
2016-04-11T21:24:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,471
java
package gov.va.oia.terminology.converters.sharedUtils.umlsUtils; import java.util.ArrayList; import java.util.HashMap; import java.util.UUID; import gov.va.oia.terminology.converters.sharedUtils.propertyTypes.Property; import gov.va.oia.terminology.converters.sharedUtils.propertyTypes.ValuePropertyPair; public class ValuePropertyPairWithAttributes extends ValuePropertyPair { protected HashMap<UUID, ArrayList<String>> stringAttributes = new HashMap<>(); protected HashMap<UUID, ArrayList<UUID>> uuidAttributes = new HashMap<>(); protected ArrayList<UUID> refsetMembership = new ArrayList<>(); public ValuePropertyPairWithAttributes(String value, Property property) { super(value, property); } public void addStringAttribute(UUID type, String value) { ArrayList<String> values = stringAttributes.get(type); if (values == null) { values = new ArrayList<>(); stringAttributes.put(type, values); } values.add(value); } public ArrayList<String> getStringAttribute(UUID type) { return stringAttributes.get(type); } public void addUUIDAttribute(UUID type, UUID value) { ArrayList<UUID> values = uuidAttributes.get(type); if (values == null) { values = new ArrayList<>(); uuidAttributes.put(type, values); } values.add(value); } public void addRefsetMembership(UUID refsetConcept) { refsetMembership.add(refsetConcept); } // public static void processAttributes(EConceptUtility eConceptUtility, List<? extends ValuePropertyPairWithAttributes> descriptionSource, List<TtkDescriptionChronicle> descriptions) // { // for (int i = 0; i < descriptionSource.size(); i++) // { // for (Entry<UUID, ArrayList<String>> attributes : descriptionSource.get(i).stringAttributes.entrySet()) // { // for (String value : attributes.getValue()) // { // eConceptUtility.addStringAnnotation(descriptions.get(i), value, attributes.getKey(), Status.ACTIVE); // } // } // // for (Entry<UUID, ArrayList<UUID>> attributes : descriptionSource.get(i).uuidAttributes.entrySet()) // { // for (UUID value : attributes.getValue()) // { // eConceptUtility.addUuidAnnotation(descriptions.get(i), value, attributes.getKey()); // } // } // // for (TtkConceptChronicle refsetConcept : descriptionSource.get(i).refsetMembership) // { // eConceptUtility.addDynamicRefsetMember(refsetConcept, descriptions.get(i).getPrimordialComponentUuid(), null, Status.ACTIVE, null); // } // } // } }
[ "daniel.armbrust.list@gmail.com" ]
daniel.armbrust.list@gmail.com
0b2be8ee9e91fa8ea863c7039ed94a3af644d4f9
b4dc914651bce35c7ffa51b6652943564d568975
/app/src/main/java/com/james/coolweather/gson/HourlyForecast.java
90ea6c10542b3e6780e4b75659fa788c769ee4ed
[ "Apache-2.0" ]
permissive
gitzhan/coolweather
79c487426e9f7ea7137a461b61610925bc3f325e
8a181cbf48aaad450d754195965806b7dd25de80
refs/heads/master
2021-01-17T10:53:13.877166
2017-03-06T13:57:11
2017-03-06T13:57:11
84,023,481
0
0
null
null
null
null
UTF-8
Java
false
false
494
java
package com.james.coolweather.gson; /** * Created by James on 2017/3/6. */ public class HourlyForecast { public Cond cond; public String date; public String hum; public String pop; public String pres; public String tmp; public Wind wind; public class Cond{ public String code; public String txt; } public class Wind{ public String deg; public String dir; public String sc; public String spd; } }
[ "james@gmail.com" ]
james@gmail.com
3c2632c50936b8265d1ec6d49d2317d2455398c1
2f842d88272f23e7de1f201cce46b7991ebed356
/user/src/main/java/com/coldchain/service/impl/AuthenticationFacade.java
79d5adf514ac21d881b5b152c9be855adfd7f7eb
[]
no_license
luolxb/coldChain
9ddfa2716760c9776035b0de01d0982f27af23c2
e82cb7bdac3d0eb53bf696329c050e07eb621e8e
refs/heads/master
2023-01-07T10:13:50.314346
2020-11-04T07:53:46
2020-11-04T07:53:46
309,877,016
1
1
null
null
null
null
UTF-8
Java
false
false
1,652
java
package com.coldchain.service.impl; import com.alibaba.fastjson.JSON; import com.coldchain.service.IAuthenticationFacade; import com.common.dto.SellerDto; import com.common.dto.UserDto; import com.common.exception.ShopException; import lombok.extern.slf4j.Slf4j; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.oauth2.provider.OAuth2Authentication; import org.springframework.stereotype.Component; import java.util.Map; @Slf4j @Component public class AuthenticationFacade implements IAuthenticationFacade { @Override public Authentication getAuthentication() { return SecurityContextHolder.getContext().getAuthentication(); } public <T> T getPrincipal(Class<T> clazz) { Object o = ((OAuth2Authentication) getAuthentication()).getUserAuthentication().getDetails(); return JSON.parseObject(JSON.toJSONString(JSON.parseObject(JSON.toJSONString(o), Map.class).get("principal")), clazz); } public SellerDto getSeller(){ Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal(); SellerDto seller = null; if (!"anonymousUser".equals(principal)) { seller = getPrincipal(SellerDto.class); } return seller; } public UserDto getUser(){ Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal(); if ("anonymousUser".equals(principal)) { throw new ShopException(-1,"请登录"); } return getPrincipal(UserDto.class); } }
[ "18687269789@163.com" ]
18687269789@163.com
239742bf07655966b3c37d55f18191ee1dbc4058
bae4675d3d26c671cce219891c2a840cacbb51d8
/src/main/java/net/enver/customerdemo/CustomerDemoApplication.java
84ceb851c4037e9ec7d92d4249893762462bf0d9
[]
no_license
AbseliamovEnver/Simple-REST-API-application
d224fd6e21ac1adcb9f4a951bdbba498883b4fc3
a27cdd75ed957b576599e1d305ccff11731b24cc
refs/heads/master
2020-09-28T09:07:05.424677
2019-12-08T22:43:24
2019-12-08T22:43:24
226,742,674
0
0
null
null
null
null
UTF-8
Java
false
false
403
java
package net.enver.customerdemo; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; /** * @author Enver on 08.12.2019 22:48. * @project CustomerDemo */ @SpringBootApplication public class CustomerDemoApplication { public static void main(String[] args) { SpringApplication.run(CustomerDemoApplication.class); } }
[ "a.enver.com@gmail.com" ]
a.enver.com@gmail.com
1f5373564283ab77fcf3126af02a58385bf4fe44
f4b1534db460f96cc4c71bf9355dda320ad0672f
/src/main/java/com/company/ch11OpenSource/item143/section1/Client.java
53eb4ee5e4fb615d36e3af4eb180948aa96a722e
[]
no_license
zhzhouq9/item
be4f012c1a8f2f3d8a33039d3fde5f3e4e2eb814
053307fa5f825c044b7569c9662f9d6c31c702cc
refs/heads/master
2022-10-26T05:13:57.826196
2020-06-14T09:52:56
2020-06-14T09:52:56
272,170,896
0
0
null
2020-06-14T09:29:57
2020-06-14T09:29:56
null
UTF-8
Java
false
false
863
java
package com.company.ch11OpenSource.item143.section1; import it.unimi.dsi.fastutil.BigList; import it.unimi.dsi.fastutil.ints.Int2ObjectMap; import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; import it.unimi.dsi.fastutil.ints.IntArrayList; import it.unimi.dsi.fastutil.objects.ObjectBigArrayBigList; public class Client { public static void main(String[] args) { // 超大容量的List,注意调整JVM的Heap内存 BigList<Integer> bigList = new ObjectBigArrayBigList<Integer>( 1L + Integer.MAX_VALUE); // 基本类型的集合,不再使用包装类型 IntArrayList arrayList = new IntArrayList(); // 明确键类型的Map Int2ObjectMap<String> map = new Int2ObjectOpenHashMap<String>(); map.put(100, "A"); System.out.println(map.get(100)); } }
[ "mosoft521@gmail.com" ]
mosoft521@gmail.com
f4fecc656910306a5ed8051152e1573cb3671b68
bb476d733fd606bcdc2ea2d3962fb57654cb92ba
/kickstart-platform/src/main/java/platform/helper/HelperFactory.java
cec59402d82ed52c40b19605fd767d2b49239ea2
[]
no_license
FullStackNet/kickstart
9e2a5ec795e86f4db9089d2dee84abc4d3b1ab19
eea95dcef054db66e620e98a079fa1a6aab802f5
refs/heads/master
2021-05-16T17:32:37.594867
2018-01-10T17:52:11
2018-01-10T17:52:11
100,499,456
1
0
null
null
null
null
UTF-8
Java
false
false
1,939
java
package platform.helper; import platform.db.DbManager; public class HelperFactory { public static String HELPER_APPLIANCE = "appliance"; public static String HELPER_APPLIANCE_MAKE = "appliance_make"; public static String HELPER_APPLIANCE_MODEL = "appliance_model"; public static String HELPER_ROUTE = "route"; public static String HELPER_DEVICE = "device"; public static String HELPER_SENSOR= "sensor"; public static String HELPER_CONTROLLER = "sensor"; public static String HELPER_CUSTOMER = "customer"; public static String HELPER_DRIVER = "driver"; public static String HELPER_STOPAGE = "stopage"; public static String HELPER_SCHOOL = "school"; public static String HELPER_GATEWAY = "gateway"; public static String HELPER_SUBJECT = "subject"; public static String HELPER_C4T_OBJECT = "c4t_object"; public static String HELPER_LOCATION = "location"; public static HelperFactory instance; HelperFactory() { DbManager.getInstance().register(ApplianceHelper.getInstance()); DbManager.getInstance().register(Appliance_makeHelper.getInstance()); DbManager.getInstance().register(Appliance_modelHelper.getInstance()); DbManager.getInstance().register(DeviceHelper.getInstance()); DbManager.getInstance().register(ControllerHelper.getInstance()); DbManager.getInstance().register(SensorHelper.getInstance()); DbManager.getInstance().register(CustomerHelper.getInstance()); DbManager.getInstance().register(UserHelper.getInstance()); DbManager.getInstance().register(C4t_objectHelper.getInstance()); DbManager.getInstance().register(LocationHelper.getInstance()); } public void register(BaseHelper helper) { DbManager.getInstance().register(helper); } public BaseHelper getHelper(String resource) { return DbManager.getInstance().getHelper(resource); } public static HelperFactory getInstance() { if (instance == null) instance = new HelperFactory(); return instance; } }
[ "im.aditya0689@gmail.com" ]
im.aditya0689@gmail.com
23ca03a10c74763353249bedd2ac364715047257
f2e297ec31af0ff8fed9ee5bfd714f35dd3c602b
/org.idempiere.test.assertj/src/org/idempiere/test/assertj/AbstractM_DistributionRunLineAssert.java
8e3600e9dfd41de1368722ac8b76533f73e533f1
[]
no_license
kriegfrj/idempiere-test
c6382226d3a8f3b511edf59fc1cecc62b869d5fd
9730ac505607eddcc0727687797ba57f5c614c7c
refs/heads/master
2022-11-28T15:59:12.092607
2020-08-17T07:02:22
2020-08-17T07:02:22
275,079,977
0
0
null
2020-08-17T07:02:23
2020-06-26T05:21:40
Java
UTF-8
Java
false
false
4,888
java
/****************************************************************************** * Product: iDempiere ERP & CRM Smart Business Solution * * Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. * * This program is free software, you can redistribute it and/or modify it * * under the terms version 2 of the GNU General Public License as published * * by the Free Software Foundation. This program is distributed in the hope * * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * * with this program, if not, write to the Free Software Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * * For the text or an alternative of this public license, you may reach us * * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * * or via info@compiere.org or http://www.compiere.org/license.html * *****************************************************************************/ /** Generated Assertion Class - DO NOT CHANGE */ package org.idempiere.test.assertj; import java.util.Objects; import javax.annotation.Generated; import org.compiere.model.X_M_DistributionRunLine; /** Generated assertion class for M_DistributionRunLine * @author idempiere-test (generated) * @version Release 6.2 - $Id$ */ @Generated("class org.idempiere.test.generator.ModelAssertionGenerator") public abstract class AbstractM_DistributionRunLineAssert<SELF extends AbstractM_DistributionRunLineAssert<SELF, ACTUAL>, ACTUAL extends X_M_DistributionRunLine> extends AbstractPOAssert<SELF, ACTUAL> { /** Standard Constructor */ public AbstractM_DistributionRunLineAssert (ACTUAL actual, Class<SELF> selfType) { super (actual, selfType); } public SELF hasDescription(String expected) { isNotNull(); String actualField = actual.getDescription(); if (!Objects.equals(expected, actualField)) { failWithActualExpectedAndMessage(actualField, expected, "\nExpecting PO: \n <%s>\n to have Description: <%s>\nbut it was: <%s>", getPODescription(), expected, actualField); } return myself; } public SELF hasLine(int expected) { isNotNull(); int actualField = actual.getLine(); if (expected != actualField) { failWithActualExpectedAndMessage(actualField, expected, "\nExpecting PO: \n <%s>\n to have Line: <%s>\nbut it was: <%s>", getPODescription(), expected, actualField); } return myself; } public SELF hasM_DistributionList_ID(int expected) { isNotNull(); int actualField = actual.getM_DistributionList_ID(); if (expected != actualField) { failWithActualExpectedAndMessage(actualField, expected, "\nExpecting PO: \n <%s>\n to have M_DistributionList_ID: <%s>\nbut it was: <%s>", getPODescription(), expected, actualField); } return myself; } public SELF hasM_DistributionRun_ID(int expected) { isNotNull(); int actualField = actual.getM_DistributionRun_ID(); if (expected != actualField) { failWithActualExpectedAndMessage(actualField, expected, "\nExpecting PO: \n <%s>\n to have M_DistributionRun_ID: <%s>\nbut it was: <%s>", getPODescription(), expected, actualField); } return myself; } public SELF hasM_DistributionRunLine_ID(int expected) { isNotNull(); int actualField = actual.getM_DistributionRunLine_ID(); if (expected != actualField) { failWithActualExpectedAndMessage(actualField, expected, "\nExpecting PO: \n <%s>\n to have M_DistributionRunLine_ID: <%s>\nbut it was: <%s>", getPODescription(), expected, actualField); } return myself; } public SELF hasM_DistributionRunLine_UU(String expected) { isNotNull(); String actualField = actual.getM_DistributionRunLine_UU(); if (!Objects.equals(expected, actualField)) { failWithActualExpectedAndMessage(actualField, expected, "\nExpecting PO: \n <%s>\n to have M_DistributionRunLine_UU: <%s>\nbut it was: <%s>", getPODescription(), expected, actualField); } return myself; } public SELF hasM_Product_ID(int expected) { isNotNull(); int actualField = actual.getM_Product_ID(); if (expected != actualField) { failWithActualExpectedAndMessage(actualField, expected, "\nExpecting PO: \n <%s>\n to have M_Product_ID: <%s>\nbut it was: <%s>", getPODescription(), expected, actualField); } return myself; } public SELF hasMinQty(Object expected) { isNotNull(); bdAssert("MinQty", actual.getMinQty(), expected); return myself; } public SELF hasTotalQty(Object expected) { isNotNull(); bdAssert("TotalQty", actual.getTotalQty(), expected); return myself; } }
[ "fr.jkrieg@greekwelfaresa.org.au" ]
fr.jkrieg@greekwelfaresa.org.au
86abfcde1b9b20d0dfc47542b391b211725becd7
dc81649732414dee4d552a240b25cb3d055799b1
/src/test/java/org/assertj/core/api/chararray/CharArrayAssert_containsOnlyOnce_Test.java
99bcbc3e115160890b712535fae97a8c37bbc77a
[ "Apache-2.0" ]
permissive
darkliang/assertj-core
e40de697a5ac19db7a652178963a523dfe6f89ff
4a25dab7b99f292d158dc8118ac84dc7b4933731
refs/heads/integration
2021-05-16T23:22:49.013854
2020-05-31T12:36:31
2020-05-31T12:36:31
250,513,505
1
0
Apache-2.0
2020-06-02T09:25:54
2020-03-27T11:11:36
Java
UTF-8
Java
false
false
1,336
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * * Copyright 2012-2020 the original author or authors. */ package org.assertj.core.api.chararray; import static org.assertj.core.test.CharArrays.arrayOf; import org.assertj.core.api.CharArrayAssert; import org.assertj.core.api.CharArrayAssertBaseTest; import static org.mockito.Mockito.verify; /** * Tests for <code>{@link CharArrayAssert#containsOnlyOnce(char...)}</code>. * * @author William Delanoue */ public class CharArrayAssert_containsOnlyOnce_Test extends CharArrayAssertBaseTest { @Override protected CharArrayAssert invoke_api_method() { return assertions.containsOnlyOnce('a', 'b'); } @Override protected void verify_internal_effects() { verify(arrays).assertContainsOnlyOnce(getInfo(assertions), getActual(assertions), arrayOf('a', 'b')); } }
[ "joel.costigliola@gmail.com" ]
joel.costigliola@gmail.com
f96fe294b29ac6bc6dd746693e2b226de1796e67
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/49/182.java
52a6b381fbe77e38267bb421094f06d11db12554
[ "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
944
java
import java.util.*; package <missing>; public class GlobalMembers { public static char[][] b = new char[10000][501]; public static int Main() { String a = new String(new char[501]); int i; int j; int k; int l; int n; int m; int o = 0; a = new Scanner(System.in).nextLine(); n = a.length(); for (i = 0; i < n - 1; i++) { for (j = i + 1; j < n; j++) { int flag = 1; if (a.charAt(i) == a.charAt(j)) { k = i; l = j; for (; k < l; k++, l--) { if (a.charAt(k) != a.charAt(l)) { flag = 0; break; } } if (flag == 1) { for (m = i; m <= j; m++) { b[o][m - i] = a.charAt(m); } o++; } } } } for (i = 2; i <= 500; i++) { for (j = 0; j <= o; j++) { if (String.valueOf(b[j]).length() == i) { System.out.print(b[j]); System.out.print("\n"); } } } return 0; } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
84bfaeb9e98dc2aabc87ebaa3c5ede8639f98d97
66d3122f8f031d6e8b27e8ead7aa5ae0d7e33b45
/net/minecraft/datafixers/schemas/Schema703.java
c53bf7b2a772a4d7b950f60271600b3a95ce1558
[]
no_license
gurachan/minecraft1.14-dp
c10059787555028f87a4c8183ff74e6e1cfbf056
34daddc03be27d5a0ee2ab9bc8b1deb050277208
refs/heads/master
2022-01-07T01:43:52.836604
2019-05-08T17:18:13
2019-05-08T17:18:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,611
java
package net.minecraft.datafixers.schemas; import com.mojang.datafixers.DSL; import net.minecraft.datafixers.TypeReferences; import com.mojang.datafixers.types.templates.TypeTemplate; import java.util.function.Supplier; import java.util.Map; import com.mojang.datafixers.schemas.Schema; public class Schema703 extends Schema { public Schema703(final int integer, final Schema schema) { super(integer, schema); } public Map<String, Supplier<TypeTemplate>> registerEntities(final Schema schema) { final Map<String, Supplier<TypeTemplate>> map2 = (Map<String, Supplier<TypeTemplate>>)super.registerEntities(schema); map2.remove("EntityHorse"); schema.register((Map)map2, "Horse", () -> DSL.optionalFields("ArmorItem", TypeReferences.ITEM_STACK.in(schema), "SaddleItem", TypeReferences.ITEM_STACK.in(schema), Schema100.a(schema))); schema.register((Map)map2, "Donkey", () -> DSL.optionalFields("Items", DSL.list(TypeReferences.ITEM_STACK.in(schema)), "SaddleItem", TypeReferences.ITEM_STACK.in(schema), Schema100.a(schema))); schema.register((Map)map2, "Mule", () -> DSL.optionalFields("Items", DSL.list(TypeReferences.ITEM_STACK.in(schema)), "SaddleItem", TypeReferences.ITEM_STACK.in(schema), Schema100.a(schema))); schema.register((Map)map2, "ZombieHorse", () -> DSL.optionalFields("SaddleItem", TypeReferences.ITEM_STACK.in(schema), Schema100.a(schema))); schema.register((Map)map2, "SkeletonHorse", () -> DSL.optionalFields("SaddleItem", TypeReferences.ITEM_STACK.in(schema), Schema100.a(schema))); return map2; } }
[ "879139909@qq.com" ]
879139909@qq.com
37b401a94adc8ea0bb942e7d635f0ee6c880da73
8aad24d9e734657dedad5a90f35707d0b1271acb
/src/eleven/demo/TransformCommand.java
f93463fc3d4abc28fa0d5013994817c86deb9f94
[ "Apache-2.0" ]
permissive
weiwenqiang/Java_AndroidDesignMode
20b3235df32f2dd0e4b3c6409f032010d79dde0b
0edd7be0de326bf69ef93792678690485836d5cc
refs/heads/master
2021-05-08T00:00:50.209015
2017-10-30T01:04:57
2017-10-30T01:04:57
107,613,886
0
0
null
null
null
null
UTF-8
Java
false
false
287
java
package eleven.demo; public class TransformCommand implements Command { private TetrisMachine machine; public TransformCommand(TetrisMachine machine){ this.machine = machine; } @Override public void execute() { // TODO Auto-generated method stub machine.transform(); } }
[ "wwqweiwenqiang@qq.com" ]
wwqweiwenqiang@qq.com
597c344501bb5f6b40b8cee560e88e1434ca8d38
45ee32435c345790cae1f10111e37f860395f1ea
/art-extension/opttests/src/OptimizationTests/AUR/MonitorOperation_03/Main.java
01e78ac8f67b732d89b26b68b60c5b0c561b8b48
[ "Apache-2.0", "NCSA", "LicenseRef-scancode-unknown-license-reference" ]
permissive
android-art-intel/Nougat
b93eb0bc947088ba55d03e62324af88d332c5e93
ea41b6bfe5c6b62a3163437438b21568cc783a24
refs/heads/master
2020-07-05T18:53:19.370466
2016-12-16T04:23:40
2016-12-16T04:23:40
73,984,816
9
1
null
null
null
null
UTF-8
Java
false
false
3,461
java
/* * Copyright (C) 2016 Intel Corporation * * 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 OptimizationTests.AUR.MonitorOperation_03; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.*; import java.io.*; import OptimizationTests.AUR.shared.*; public class Main { public int field = 5; private int getSum(int arg) { return arg + 20; } volatile int vol = -10; // simple AUR example for MonitorOperation synchronized public int runTest (int n, Main other) { if (n > 10) { return --other.vol; } return other.vol; } // wrapper method for runTest public int test(int n) { Main other = new Main(); return runTest(n, other); } // wrapper method for runTest with GC stress threads running public String testWithGCStress(int n) { String res = ""; Thread t = new Thread(new Runnable(){ public void run() { new StressGC().stressGC(); } }); t.start(); try { res += test(n); } catch (Throwable e) { res += e; } try { t.join(); } catch (InterruptedException ie) { } return res; } public void runTests() { Class c = new Main().getClass(); Method[] methods = c.getDeclaredMethods(); Method tempMethod; for (int i = 1; i < methods.length; i++) { int j = i; while (j > 0 && methods[j-1].getName().compareTo(methods[j].getName()) > 0) { tempMethod = methods[j]; methods[j] = methods[j-1]; methods[j-1] = tempMethod; j = j - 1; } } Object[] arr = {null}; for (Method m: methods){ if (m.getName().startsWith("test")){ try { String names[] = c.getPackage().getName().split("\\."); String testName = names[names.length-1]; System.out.println("Test "+testName+"; Subtest "+m.getName()+"; Result: "+ m.invoke(this, 10)); } catch (IllegalArgumentException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (InvocationTargetException e) { StringWriter sw = new StringWriter(); StackTraceElement[] ste = e.getCause().getStackTrace(); System.out.println(e.getCause()); for (int i = 0; i < ((ste.length < 2)?ste.length:2); i++) { System.out.println(ste[i]); } } } } } public static void main(String[] args) { new Main().runTests(); } }
[ "aleksey.v.ignatenko@intel.com" ]
aleksey.v.ignatenko@intel.com