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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
912042b275fd7159bd3f8f49b4e0da7acfc52a4d | f297d18c802d39fc2e2b593451a807b8630eeff1 | /functionalj-core/src/main/java/functionalj/lens/lenses/OptionalAccess.java | 29937293b8e223a2c71fadbc3aae675f6320001e | [
"MIT"
] | permissive | pczapski/FunctionalJ | 34bc82869a24399bb08110abf6bcfeb75c6d202b | 02e1eb65e555339cc61b8af92dc6c82469c9f2af | refs/heads/master | 2020-04-20T06:28:33.679905 | 2019-01-31T18:53:44 | 2019-01-31T18:53:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,150 | java | package functionalj.lens.lenses;
import java.util.Optional;
import java.util.function.Function;
import java.util.function.Supplier;
import functionalj.lens.core.AccessParameterized;
import lombok.val;
@SuppressWarnings("javadoc")
@FunctionalInterface
public interface OptionalAccess<HOST, TYPE, SUBACCESS extends AnyAccess<HOST, TYPE>>
extends
ObjectAccess<HOST, Optional<TYPE>>,
AccessParameterized<HOST, Optional<TYPE>, TYPE, SUBACCESS> {
public AccessParameterized<HOST, Optional<TYPE>, TYPE, SUBACCESS> accessWithSub();
@Override
public default Optional<TYPE> applyUnsafe(HOST host) throws Exception {
return accessWithSub().apply(host);
}
@Override
public default SUBACCESS createSubAccessFromHost(Function<HOST, TYPE> accessToSub) {
return accessWithSub().createSubAccessFromHost(accessToSub);
}
public default SUBACCESS get() {
return OptionalAccess.this.accessWithSub().createSubAccess((Optional<TYPE> optional) -> {
return optional.get();
});
}
public default <TARGET>
OptionalAccess<HOST, TARGET, AnyAccess<HOST, TARGET>> map(Function<TYPE, TARGET> mapper) {
val accessWithSub = new AccessParameterized<HOST, Optional<TARGET>, TARGET, AnyAccess<HOST,TARGET>>() {
@Override
public Optional<TARGET> applyUnsafe(HOST host) throws Exception {
Optional<TYPE> optional = OptionalAccess.this.apply(host);
if (optional == null) optional = Optional.empty();
return optional.map(mapper);
}
@Override
public AnyAccess<HOST, TARGET> createSubAccessFromHost(Function<HOST, TARGET> accessToParameter) {
return accessToParameter::apply;
}
};
return new OptionalAccess<HOST, TARGET, AnyAccess<HOST,TARGET>>() {
@Override
public AccessParameterized<HOST, Optional<TARGET>, TARGET, AnyAccess<HOST, TARGET>> accessWithSub() {
return accessWithSub;
}
};
}
public default <TARGET>
OptionalAccess<HOST, TARGET, AnyAccess<HOST, TARGET>> flatMap(Function<TYPE, Optional<TARGET>> mapper) {
val accessWithSub = new AccessParameterized<HOST, Optional<TARGET>, TARGET, AnyAccess<HOST,TARGET>>() {
@Override
public Optional<TARGET> applyUnsafe(HOST host) throws Exception {
return OptionalAccess.this.apply(host).flatMap(mapper);
}
@Override
public AnyAccess<HOST, TARGET> createSubAccessFromHost(Function<HOST, TARGET> accessToParameter) {
return accessToParameter::apply;
}
};
return new OptionalAccess<HOST, TARGET, AnyAccess<HOST,TARGET>>() {
@Override
public AccessParameterized<HOST, Optional<TARGET>, TARGET, AnyAccess<HOST, TARGET>> accessWithSub() {
return accessWithSub;
}
};
}
public default BooleanAccess<HOST> isPresent() {
return host -> {
return OptionalAccess.this.apply(host).isPresent();
};
}
public default SUBACCESS orElse(TYPE fallbackValue) {
return OptionalAccess.this.accessWithSub().createSubAccess((Optional<TYPE> optional) -> {
return optional.orElse(fallbackValue);
});
}
public default SUBACCESS orElseGet(Supplier<TYPE> fallbackValueSupplier) {
return orGet(fallbackValueSupplier);
}
public default SUBACCESS orGet(Supplier<TYPE> fallbackValueSupplier) {
return OptionalAccess.this.accessWithSub().createSubAccess((Optional<TYPE> optional) -> {
return optional.orElseGet(fallbackValueSupplier);
});
}
public default <EXCEPTION extends RuntimeException> SUBACCESS orElseThrow(Supplier<EXCEPTION> exceptionSupplier) {
return OptionalAccess.this.accessWithSub().createSubAccess((Optional<TYPE> optional) -> {
return optional.orElseThrow(exceptionSupplier);
});
}
}
| [
"nawa@nawaman.net"
] | nawa@nawaman.net |
703462949d7c5f684b911536759494f400faca43 | 647eef4da03aaaac9872c8b210e4fc24485e49dc | /TestMemory/wandoujia/src/main/java/com/wandoujia/jupiter/homepage/q.java | f9bb8cf5eb413d42cce6efd8a6db2f2e740f1ec7 | [] | no_license | AlbertSnow/git_workspace | f2d3c68a7b6e62f41c1edcd7744f110e2bf7f021 | a0b2cd83cfa6576182f440a44d957a9b9a6bda2e | refs/heads/master | 2021-01-22T17:57:16.169136 | 2016-12-05T15:59:46 | 2016-12-05T15:59:46 | 28,154,580 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,080 | java | package com.wandoujia.jupiter.homepage;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.view.ViewTreeObserver;
import android.widget.LinearLayout.LayoutParams;
import com.wandoujia.image.view.AsyncImageView;
import com.wandoujia.image.view.j;
import com.wandoujia.jupiter.homepage.splashwindow.k;
final class q
implements j
{
q(HomePageFragment paramHomePageFragment)
{
}
public final void a(Bitmap paramBitmap)
{
LinearLayout.LayoutParams localLayoutParams = (LinearLayout.LayoutParams)HomePageFragment.q(this.a).getLayoutParams();
localLayoutParams.height = k.a(paramBitmap, (int)HomePageFragment.q(this.a).getContext().getResources().getDimension(2131427743));
HomePageFragment.q(this.a).setLayoutParams(localLayoutParams);
HomePageFragment.q(this.a).getViewTreeObserver().addOnPreDrawListener(new r(this));
}
}
/* Location: C:\WorkSpace\WandDouJiaNotificationBar\WanDou1.jar
* Qualified Name: com.wandoujia.jupiter.homepage.q
* JD-Core Version: 0.6.0
*/ | [
"zhaojialiang@conew.com"
] | zhaojialiang@conew.com |
b1e9e8bd7099f93a939718332edfe3e3b3b5ec72 | e0ae3743f37d4e2add83239accd26bb3b209f0fe | /src/objectPool/sample2/Main.java | 46d9ff05b0442acf4ef3d6e466795783c4d2af09 | [
"MIT",
"LicenseRef-scancode-proprietary-license"
] | permissive | DyvakYA/java-design-patterns | 04dc3eb82cc48a99c58d05855861f5daa7ba8ea9 | 5e536cd785c58c681c98bc5c632e05a338e755f4 | refs/heads/master | 2022-12-26T14:31:59.630090 | 2019-09-10T06:34:40 | 2019-09-10T06:34:40 | 74,051,625 | 0 | 0 | MIT | 2020-10-13T15:55:22 | 2016-11-17T17:38:08 | Java | UTF-8 | Java | false | false | 599 | java | package creational.objectPool.sample2;
public class Main {
public static void main(String[] args) {
ConnectionPool pool = new ConnectionPool("url", "login", "password");
Connection conn1 = pool.get();
Connection conn2 = pool.get();
Connection conn3 = pool.get();
System.out.println(pool);
// Pool available=0, inUse=3
pool.put(conn1);
System.out.println(pool);
// Pool available=1, inUse=2
pool.put(conn2);
pool.put(conn3);
System.out.println(pool);
// Pool available=3, inUse=0
}
}
| [
"dyvakyurii@gmail.com"
] | dyvakyurii@gmail.com |
d786903a6d2464d8e9646a9156c22851409c5d79 | a306f79281c4eb154fbbddedea126f333ab698da | /kotlin/jvm/JvmWildcard.java | 95d6c38b55f590d847f5688301d33bc79c8fa941 | [] | no_license | pkcsecurity/decompiled-lightbulb | 50828637420b9e93e9a6b2a7d500d2a9a412d193 | 314bb20a383b42495c04531106c48fd871115702 | refs/heads/master | 2022-01-26T18:38:38.489549 | 2019-05-11T04:27:09 | 2019-05-11T04:27:09 | 186,070,402 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 424 | java | package kotlin.jvm;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import kotlin.Metadata;
import kotlin.annotation.MustBeDocumented;
@Documented
@Retention(RetentionPolicy.CLASS)
@Target({})
@Metadata
@MustBeDocumented
@kotlin.annotation.Retention
@kotlin.annotation.Target
public @interface JvmWildcard {
}
| [
"josh@pkcsecurity.com"
] | josh@pkcsecurity.com |
8476c1331d39f58a77e29e4003955c07bfc2a194 | 431d8362e87e61ee568d79c57e13c4a0b0e02d2e | /lara/sep-4th batch/java/44.Enum/part-1/src/Y.java | 8ed55d3397bba65730e42ea6214b030161265111 | [] | no_license | svsaikumar/lara | 09b3fa9fb2fcee70840d02bdce56148f3a3bf259 | ed0bfbdfa0a0e668c6ffdd720d80551e03bb93db | refs/heads/master | 2020-03-27T08:53:34.246569 | 2018-08-27T13:56:22 | 2018-08-27T13:56:22 | 146,295,997 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 487 | java | class Y
{
enum A
{
CON1, CON2, CON3(10), CON4("ABC");//for every enum constant there should be a corresponding constructer
A()
{
System.out.println("A()");
}
A(int i)
{
System.out.println("A(int):" + i);
}
A(String s)
{
System.out.println("A(String):" + s);
}
}
public static void main(String[] args)
{
A a1 = A.CON4;
System.out.println("========");
System.out.println(a1);
}
}
//we can't use enum without entire enum available in the memory | [
"saikumarsv77@gmail.com"
] | saikumarsv77@gmail.com |
8d6e150bc9d801bed0d117a87455670c838ea283 | d2f73939973b73dab61cd5c0a807ede3607e5a65 | /week7/9012_brackets/Hunjin.java | d449e027aefafc1b58635dbf9348589fccf43333 | [] | no_license | CrushAlgo/WeeklyAlgo | 40d200faa9a3262765b98857335954b71a21e422 | 61168005d124d391f6a9f120dec2159d4cd28cae | refs/heads/master | 2020-04-16T14:01:26.147148 | 2019-04-09T06:15:38 | 2019-04-09T06:15:38 | 165,651,955 | 1 | 3 | null | 2019-06-10T16:57:41 | 2019-01-14T11:45:25 | C++ | UTF-8 | Java | false | false | 1,239 | java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine(), 10);
while (n-- > 0) {
String s = br.readLine();
if(s.length()%2==1) {
System.out.println("NO");
continue;
}
List<Integer> list = new ArrayList<>();
boolean isOK = true;
for (int i = 0; i < s.length(); i++) {
if(s.charAt(i) == '(') {
list.add(1);
} else {
if(list.size() == 0) {
isOK = false;
break;
}
list.remove(list.size()-1);
}
}
if(list.size() != 0) {
isOK = false;
}
if(isOK) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
}
| [
"ysg01129@naver.com"
] | ysg01129@naver.com |
a6b5d52a50cc132e58c9351e325a35cebe644f13 | 4141721ba300b733a66432fd3907604364d378d2 | /sipin-sales-cloud-backend-order-pojo/src/main/java/cn/sipin/sales/cloud/order/response/SalesOrderDiscountResponse.java | 7ad696667fa99db672a4941632fc429dd48b9922 | [] | no_license | zhouxhhn/order | 4c5d9ff1d6077d5b93f6152d14457e2964e23e3f | badbdb5b17dfc3edc60537474b577eeb976ebb88 | refs/heads/master | 2020-04-05T10:21:59.852563 | 2018-11-09T02:03:51 | 2018-11-09T02:03:51 | 156,795,908 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 886 | java | /*
* (C) Copyright 2018 Siyue Holding Group.
*/
package cn.sipin.sales.cloud.order.response;
import java.math.BigDecimal;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(value = "SalesOrderDiscountResponse")
public class SalesOrderDiscountResponse {
/**
* 优惠折扣类型,0:优惠券-满减 1:优惠券-满折 2: 积分折算金额 3: 整单优惠 4:抹零
*/
@ApiModelProperty(value = "优惠折扣类型")
private Byte typeId;
/**
* 优惠券作用的订单号
*/
@ApiModelProperty(value = "优惠券作用的订单号")
private Long orderId;
/**
* 优惠券
*/
@ApiModelProperty(value = "优惠券")
private String code;
/**
* 优惠券面值/折扣
*/
@ApiModelProperty(value = "优惠券面值/折扣")
private BigDecimal discountValue;
}
| [
"joey.zhou@siyue.cn"
] | joey.zhou@siyue.cn |
af17aabd9245e178c6d8d9b13842d35f83906b77 | e5196e904faa4dc65eb94436f62e261fac10c1c5 | /library/src/main/java/com/dtc/fhir/gwt/LocationModeList.java | 64b939a6aa002377fb3664c366306706167d37dc | [] | no_license | DatacomRD/dtc-fhir | 902006510c8bea81d849387a7d437cc5ea6dc0cc | 33f687b29ccc90365e43b6ad09b67292e1240726 | refs/heads/master | 2020-04-12T06:40:33.642415 | 2017-07-21T07:52:29 | 2017-07-21T07:52:29 | 60,606,422 | 3 | 4 | null | 2017-07-21T07:52:30 | 2016-06-07T10:59:46 | Java | UTF-8 | Java | false | false | 1,857 | java | //
// 此檔案是由 JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 所產生
// 請參閱 <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// 一旦重新編譯來源綱要, 對此檔案所做的任何修改都將會遺失.
// 產生時間: 2016.08.31 於 11:09:06 PM CST
//
package com.dtc.fhir.gwt;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
/**
* <p>LocationMode-list 的 Java 類別.
*
* <p>下列綱要片段會指定此類別中包含的預期內容.
* <p>
* <pre>
* <simpleType name="LocationMode-list">
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="instance"/>
* <enumeration value="kind"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "LocationMode-list")
@XmlEnum
public enum LocationModeList {
/**
* The Location resource represents a specific instance of a location (e.g. Operating Theatre 1A).
*
*/
@XmlEnumValue("instance")
INSTANCE("instance"),
/**
* The Location represents a class of locations (e.g. Any Operating Theatre) although this class of locations could be constrained within a specific boundary (such as organization, or parent location, address etc.).
*
*/
@XmlEnumValue("kind")
KIND("kind");
private final String value;
LocationModeList(String v) {
value = v;
}
public String value() {
return value;
}
public static LocationModeList fromValue(String v) {
for (LocationModeList c: LocationModeList.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}
| [
"foxb1249@gmail.com"
] | foxb1249@gmail.com |
d0553cc7714f83c2a2a91c425b7245d2f3ad93e1 | 447520f40e82a060368a0802a391697bc00be96f | /apks/playstore_apps/com_idamob_tinkoff_android/source/io/reactivex/d/g/m.java | 735e4c09ec8d2b07137b0a6ef53c1fe932283132 | [
"Apache-2.0"
] | permissive | iantal/AndroidPermissions | 7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465 | d623b732734243590b5f004d167e542e2e2ae249 | refs/heads/master | 2023-07-19T01:29:26.689186 | 2019-09-30T19:01:42 | 2019-09-30T19:01:42 | 107,239,248 | 0 | 0 | Apache-2.0 | 2023-07-16T07:41:38 | 2017-10-17T08:22:57 | null | UTF-8 | Java | false | false | 4,821 | java | package io.reactivex.d.g;
import io.reactivex.b.b;
import io.reactivex.d.a.d;
import io.reactivex.x;
import io.reactivex.x.c;
import java.util.concurrent.Callable;
import java.util.concurrent.Executors;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
public final class m
extends x
{
static final h d = new h("RxSingleScheduler", Math.max(1, Math.min(10, Integer.getInteger("rx2.single-priority", 5).intValue())), true);
static final ScheduledExecutorService e;
final ThreadFactory b;
final AtomicReference<ScheduledExecutorService> c = new AtomicReference();
static
{
ScheduledExecutorService localScheduledExecutorService = Executors.newScheduledThreadPool(0);
e = localScheduledExecutorService;
localScheduledExecutorService.shutdown();
}
public m()
{
this(d);
}
private m(ThreadFactory paramThreadFactory)
{
this.b = paramThreadFactory;
this.c.lazySet(l.a(paramThreadFactory));
}
public final b a(Runnable paramRunnable, long paramLong1, long paramLong2, TimeUnit paramTimeUnit)
{
Object localObject = io.reactivex.g.a.a(paramRunnable);
if (paramLong2 <= 0L)
{
paramRunnable = (ScheduledExecutorService)this.c.get();
localObject = new c((Runnable)localObject, paramRunnable);
if (paramLong1 <= 0L) {}
for (;;)
{
try
{
paramRunnable = paramRunnable.submit((Callable)localObject);
((c)localObject).a(paramRunnable);
return localObject;
}
catch (RejectedExecutionException paramRunnable)
{
io.reactivex.g.a.a(paramRunnable);
return d.a;
}
paramRunnable = paramRunnable.schedule((Callable)localObject, paramLong1, paramTimeUnit);
}
}
paramRunnable = new i((Runnable)localObject);
try
{
paramRunnable.a(((ScheduledExecutorService)this.c.get()).scheduleAtFixedRate(paramRunnable, paramLong1, paramLong2, paramTimeUnit));
return paramRunnable;
}
catch (RejectedExecutionException paramRunnable)
{
io.reactivex.g.a.a(paramRunnable);
}
return d.a;
}
public final b a(Runnable paramRunnable, long paramLong, TimeUnit paramTimeUnit)
{
j localJ = new j(io.reactivex.g.a.a(paramRunnable));
if (paramLong <= 0L) {}
for (;;)
{
try
{
paramRunnable = ((ScheduledExecutorService)this.c.get()).submit(localJ);
localJ.a(paramRunnable);
return localJ;
}
catch (RejectedExecutionException paramRunnable)
{
io.reactivex.g.a.a(paramRunnable);
}
paramRunnable = ((ScheduledExecutorService)this.c.get()).schedule(localJ, paramLong, paramTimeUnit);
}
return d.a;
}
public final x.c a()
{
return new a((ScheduledExecutorService)this.c.get());
}
public final void b()
{
Object localObject1 = null;
ScheduledExecutorService localScheduledExecutorService;
Object localObject2;
do
{
localScheduledExecutorService = (ScheduledExecutorService)this.c.get();
if (localScheduledExecutorService != e)
{
if (localObject1 != null) {
localObject1.shutdown();
}
return;
}
localObject2 = localObject1;
if (localObject1 == null) {
localObject2 = l.a(this.b);
}
localObject1 = localObject2;
} while (!this.c.compareAndSet(localScheduledExecutorService, localObject2));
}
static final class a
extends x.c
{
final ScheduledExecutorService a;
final io.reactivex.b.a b;
volatile boolean c;
a(ScheduledExecutorService paramScheduledExecutorService)
{
this.a = paramScheduledExecutorService;
this.b = new io.reactivex.b.a();
}
public final b a(Runnable paramRunnable, long paramLong, TimeUnit paramTimeUnit)
{
if (this.c) {
return d.a;
}
k localK = new k(io.reactivex.g.a.a(paramRunnable), this.b);
this.b.a(localK);
if (paramLong <= 0L) {}
for (;;)
{
try
{
paramRunnable = this.a.submit(localK);
localK.a(paramRunnable);
return localK;
}
catch (RejectedExecutionException paramRunnable)
{
b();
io.reactivex.g.a.a(paramRunnable);
return d.a;
}
paramRunnable = this.a.schedule(localK, paramLong, paramTimeUnit);
}
}
public final void b()
{
if (!this.c)
{
this.c = true;
this.b.b();
}
}
public final boolean c()
{
return this.c;
}
}
}
| [
"antal.micky@yahoo.com"
] | antal.micky@yahoo.com |
993b5b28e75b85693789bc40cd151a1e3b2406e3 | 122ee0415fd2275634d2c342af8720d991e57430 | /blossom-modules/blossom-module-articles/src/main/java/fr/blossom/module/article/Article.java | 0db15910b8d40a62fa58536c10702d7d91ecdd0e | [
"Apache-2.0"
] | permissive | hcarrelbilliard/blossom | 37b57551b0cf041cfd1e1158c439125d866d5515 | fb3b1afc5056f60b790af57bc61a5af7de334be3 | refs/heads/master | 2021-05-12T06:33:08.184610 | 2018-01-11T17:03:22 | 2018-01-11T17:03:22 | 117,221,184 | 0 | 0 | null | 2018-01-12T09:26:26 | 2018-01-12T09:26:25 | null | UTF-8 | Java | false | false | 459 | java |
package fr.blossom.module.article;
import fr.blossom.core.common.entity.AbstractEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
@Entity
@Table(name = "blossom_article")
public class Article extends AbstractEntity {
@Column(name = "name", nullable = false)
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
| [
"mael.gargadennec@gmail.com"
] | mael.gargadennec@gmail.com |
ac6f12e2086a49950d90a3fb821b33432bc610c0 | 3f9965e1af3d12b3523dc6cde50f826a9c5b7840 | /src/main/java/com/std/account/api/impl/XN802100.java | d9cef2c180d97d31f505d0b909af03eff57fe470 | [] | no_license | yiwocao2017/dztstdaccount | b610b7d8fc68abc5ba1edc127dcba3f6e19f272f | d636f7f5805c30bc7874840181ea4d98b74d2b4f | refs/heads/master | 2022-06-24T04:26:17.253794 | 2019-07-01T06:36:38 | 2019-07-01T06:36:38 | 194,613,983 | 0 | 0 | null | 2022-06-17T02:16:59 | 2019-07-01T06:36:37 | Java | UTF-8 | Java | false | false | 2,192 | java | package com.std.account.api.impl;
import com.std.account.ao.ICompanyChannelAO;
import com.std.account.api.AProcessor;
import com.std.account.common.JsonUtil;
import com.std.account.core.StringValidater;
import com.std.account.domain.CompanyChannel;
import com.std.account.dto.req.XN802100Req;
import com.std.account.dto.res.BooleanRes;
import com.std.account.exception.BizException;
import com.std.account.exception.ParaException;
import com.std.account.spring.SpringContextHolder;
/**
* 新增公司渠道
* @author: xieyj
* @since: 2016年11月11日 下午3:18:19
* @history:
*/
public class XN802100 extends AProcessor {
private ICompanyChannelAO companyChannelAO = SpringContextHolder
.getBean(ICompanyChannelAO.class);
private XN802100Req req = null;
/**
* @see com.xnjr.base.api.IProcessor#doBusiness()
*/
@Override
public Object doBusiness() throws BizException {
CompanyChannel data = new CompanyChannel();
data.setCompanyCode(req.getCompanyCode());
data.setCompanyName(req.getCompanyName());
data.setChannelType(req.getChannelType());
data.setStatus(req.getStatus());
data.setChannelCompany(req.getPaycompany());
data.setPrivateKey1(req.getPrivatekey());
data.setPageUrl(req.getPageUrl());
data.setErrorUrl(req.getErrorUrl());
data.setBackUrl(req.getBackUrl());
data.setFee(StringValidater.toLong(req.getFee()));
data.setRemark(req.getRemark());
data.setSystemCode(req.getSystemCode());
companyChannelAO.addCompanyChannel(data);
return new BooleanRes(true);
}
/**
* @see com.xnjr.base.api.IProcessor#doCheck(java.lang.String)
*/
@Override
public void doCheck(String inputparams) throws ParaException {
req = JsonUtil.json2Bean(inputparams, XN802100Req.class);
StringValidater.validateBlank(req.getCompanyCode(),
req.getCompanyName(), req.getChannelType(), req.getStatus(),
req.getPaycompany(), req.getPrivatekey(), req.getPageUrl(),
req.getErrorUrl(), req.getBackUrl());
StringValidater.validateAmount(req.getFee());
}
}
| [
"admin@yiwocao.com"
] | admin@yiwocao.com |
f42b6102ecf88d333c6339fdc48131bda1981a05 | 805b2a791ec842e5afdd33bb47ac677b67741f78 | /Mage.Sets/src/mage/sets/magicplayerrewards/Blightning.java | a058617c386b5eba2497b153315d1beee3d28e66 | [] | no_license | klayhamn/mage | 0d2d3e33f909b4052b0dfa58ce857fbe2fad680a | 5444b2a53beca160db2dfdda0fad50e03a7f5b12 | refs/heads/master | 2021-01-12T19:19:48.247505 | 2015-08-04T20:25:16 | 2015-08-04T20:25:16 | 39,703,242 | 2 | 0 | null | 2015-07-25T21:17:43 | 2015-07-25T21:17:42 | null | UTF-8 | Java | false | false | 2,188 | java | /*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.magicplayerrewards;
import java.util.UUID;
import mage.constants.Rarity;
/**
*
* @author fireshoes
*/
public class Blightning extends mage.sets.shardsofalara.Blightning {
public Blightning(UUID ownerId) {
super(ownerId);
this.cardNumber = 36;
this.expansionSetCode = "MPRP";
this.rarity = Rarity.SPECIAL;
}
public Blightning(final Blightning card) {
super(card);
}
@Override
public Blightning copy() {
return new Blightning(this);
}
}
| [
"fireshoes@fireshoes-PC"
] | fireshoes@fireshoes-PC |
560b98e2d32ad904b2e7a9cc82ea7ecaae48e0de | 7773ea6f465ffecfd4f9821aad56ee1eab90d97a | /plugins/gradle/jps-plugin/src/org/jetbrains/jps/gradle/model/impl/GradleResourceRootDescriptor.java | a1ae6e23db76ed9fcd67d8180a99cebff55ba02f | [
"Apache-2.0"
] | permissive | aghasyedbilal/intellij-community | 5fa14a8bb62a037c0d2764fb172e8109a3db471f | fa602b2874ea4eb59442f9937b952dcb55910b6e | refs/heads/master | 2023-04-10T20:55:27.988445 | 2020-05-03T22:00:26 | 2020-05-03T22:26:23 | 261,074,802 | 2 | 0 | Apache-2.0 | 2020-05-04T03:48:36 | 2020-05-04T03:48:35 | null | UTF-8 | Java | false | false | 2,284 | java | /*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.jps.gradle.model.impl;
import com.intellij.openapi.util.io.FileUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.jps.builders.BuildRootDescriptor;
import java.io.File;
import java.io.FileFilter;
/**
* @author Vladislav.Soroka
*/
public class GradleResourceRootDescriptor extends BuildRootDescriptor {
private final GradleResourcesTarget myTarget;
private final ResourceRootConfiguration myConfig;
private final File myFile;
private final String myId;
private final boolean myOverwrite;
private final int myIndexInPom;
public GradleResourceRootDescriptor(@NotNull GradleResourcesTarget target,
ResourceRootConfiguration config,
int indexInPom,
boolean overwrite) {
myTarget = target;
myConfig = config;
final String path = FileUtil.toCanonicalPath(config.directory);
myFile = new File(path);
myId = path;
myIndexInPom = indexInPom;
myOverwrite = overwrite;
}
public ResourceRootConfiguration getConfiguration() {
return myConfig;
}
@Override
public String getRootId() {
return myId;
}
@Override
public File getRootFile() {
return myFile;
}
@Override
public GradleResourcesTarget getTarget() {
return myTarget;
}
@NotNull
@Override
public FileFilter createFileFilter() {
return new GradleResourceFileFilter(myFile, myConfig);
}
@Override
public boolean canUseFileCache() {
return true;
}
public int getIndexInPom() {
return myIndexInPom;
}
public boolean isOverwrite() {
return myOverwrite;
}
}
| [
"Vladislav.Soroka@jetbrains.com"
] | Vladislav.Soroka@jetbrains.com |
db3c6bb2d835dd5deadb618db64c24aff0f71883 | 8cbf4e2df0cc4ad5f2118ff5ae9e5665184300a9 | /src/com/hp/hpl/jena/ontology/impl/ObjectPropertyImpl.java | 7c80340455abd6f0e4ec161f45d00c9bb3070dbe | [] | no_license | ptaranti/Dominium | 68abf2ce282f169b4c5feaa2d8ab12e3ccf6e269 | 178084e37767246ed7389a6329cbc9a5895c74d4 | refs/heads/master | 2020-03-18T05:25:01.501094 | 2018-05-24T15:58:14 | 2018-05-24T15:58:14 | 134,341,468 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,424 | java | /*****************************************************************************
* Source code information
* -----------------------
* Original author Ian Dickinson, HP Labs Bristol
* Author email Ian.Dickinson@hp.com
* Package Jena 2
* Web http://sourceforge.net/projects/jena/
* Created 01-Apr-2003
* Filename $RCSfile: ObjectPropertyImpl.java,v $
* Revision $Revision: 1.11 $
* Release status $State: Exp $
*
* Last modified on $Date: 2007/01/02 11:49:48 $
* by $Author: andy_seaborne $
*
* (c) Copyright 2002, 2003, 2004, 2005, 2006, 2007 Hewlett-Packard Development Company, LP
* (see footer for full conditions)
*****************************************************************************/
// Package
///////////////
package com.hp.hpl.jena.ontology.impl;
// Imports
///////////////
import com.hp.hpl.jena.enhanced.*;
import com.hp.hpl.jena.graph.*;
import com.hp.hpl.jena.ontology.*;
import com.hp.hpl.jena.util.iterator.ExtendedIterator;
/**
* <p>
* Implementation of the object property abstraction
* </p>
*
* @author Ian Dickinson, HP Labs
* (<a href="mailto:Ian.Dickinson@hp.com" >email</a>)
* @version CVS $Id: ObjectPropertyImpl.java,v 1.11 2007/01/02 11:49:48 andy_seaborne Exp $
*/
public class ObjectPropertyImpl
extends OntPropertyImpl
implements ObjectProperty
{
// Constants
//////////////////////////////////
// Static variables
//////////////////////////////////
/**
* A factory for generating ObjectProperty facets from nodes in enhanced graphs.
* Note: should not be invoked directly by user code: use
* {@link com.hp.hpl.jena.rdf.model.RDFNode#as as()} instead.
*/
public static Implementation factory = new Implementation() {
public EnhNode wrap( Node n, EnhGraph eg ) {
if (canWrap( n, eg )) {
return new ObjectPropertyImpl( n, eg );
}
else {
throw new ConversionException( "Cannot convert node " + n + " to ObjectProperty");
}
}
public boolean canWrap( Node node, EnhGraph eg ) {
// node will support being an ObjectProperty facet if it has rdf:type owl:ObjectProperty or equivalent
Profile profile = (eg instanceof OntModel) ? ((OntModel) eg).getProfile() : null;
return (profile != null) && profile.isSupported( node, eg, ObjectProperty.class );
}
};
// Instance variables
//////////////////////////////////
// Constructors
//////////////////////////////////
/**
* <p>
* Construct a functional property node represented by the given node in the given graph.
* </p>
*
* @param n The node that represents the resource
* @param g The enh graph that contains n
*/
public ObjectPropertyImpl( Node n, EnhGraph g ) {
super( n, g );
}
// External signature methods
//////////////////////////////////
/**
* <p>Answer a property that is an inverse of this property, ensuring that it
* presents the ObjectProperty facet.</p>
* @return A property inverse to this property
* @exception OntProfileException If the {@link Profile#INVERSE_OF()} property is not supported in the current language profile.
*/
public OntProperty getInverseOf() {
return super.getInverseOf().asObjectProperty();
}
/**
* <p>Answer an iterator over all of the properties that are declared to be inverse properties of
* this property, esnuring that each presents the objectProperty facet.</p>
* @return An iterator over the properties inverse to this property.
* @exception OntProfileException If the {@link Profile#INVERSE_OF()} property is not supported in the current language profile.
*/
public ExtendedIterator listInverseOf() {
return super.listInverseOf().mapWith( new AsMapper( ObjectProperty.class ));
}
/**
* <p>Answer the property that is the inverse of this property, ensuring that it presents
* the object property facet.</p>
* @return The property that is the inverse of this property, or null.
*/
public OntProperty getInverse() {
OntProperty inv = super.getInverse();
return (inv != null) ? inv.asObjectProperty() : null;
}
// Internal implementation methods
//////////////////////////////////
//==============================================================================
// Inner class definitions
//==============================================================================
}
/*
(c) Copyright 2002, 2003, 2004, 2005, 2006, 2007 Hewlett-Packard Development Company, LP
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
| [
"ptaranti@gmail.com"
] | ptaranti@gmail.com |
47f719849f1b82625f8857e8dd99c2c80de97024 | 963212f9ece3f4e13a4f0213e7984dab1df376f5 | /qardio_source/cfr_dec/com/google/android/gms/wearable/internal/zzgz.java | 46f9ac2147ebc61f12bba31e55c813a6055f193e | [] | no_license | weitat95/mastersDissertation | 2648638bee64ea50cc93344708a58800a0f2af14 | d465bb52b543dea05c799d1972374e877957a80c | refs/heads/master | 2020-06-08T17:31:51.767796 | 2019-12-15T19:09:41 | 2019-12-15T19:09:41 | 193,271,681 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 308 | java | /*
* Decompiled with CFR 0.147.
*/
package com.google.android.gms.wearable.internal;
import com.google.android.gms.common.api.Status;
import com.google.android.gms.wearable.internal.zza;
final class zzgz
extends zza {
zzgz() {
}
@Override
public final void zza(Status status) {
}
}
| [
"weitat95@live.com"
] | weitat95@live.com |
e90ca29888c7234c0468a4e06bf09d5d50c10513 | 293365c8d91fdea849cdf4f0e246c0a34ff1bb28 | /src/main/xjc/java/ch/ehi/oereb/schemas/gml/_3_2/AbstractMetaDataTypeType.java | b44bd391f2f575db9dd9f52cd7241c4fa3e86069 | [
"MIT"
] | permissive | edigonzales-dumpster/oereb-xml-validator | 81c15db0c3969202d108a15ec47737c2f04ed68a | 2160f6e20c5c9a0884d2ae06c3585366489249d2 | refs/heads/main | 2023-01-01T13:00:13.560398 | 2020-10-17T14:33:00 | 2020-10-17T14:33:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,231 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.07.28 at 05:34:43 PM CEST
//
package ch.ehi.oereb.schemas.gml._3_2;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlID;
import javax.xml.bind.annotation.XmlMixed;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
/**
* <p>Java class for AbstractMetaDataType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="AbstractMetaDataType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* </sequence>
* <attribute ref="{http://www.opengis.net/gml/3.2}id"/>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "AbstractMetaDataType", propOrder = {
"content"
})
@XmlSeeAlso({
GenericMetaDataTypeType.class
})
public abstract class AbstractMetaDataTypeType implements Serializable
{
private final static long serialVersionUID = 1L;
@XmlMixed
protected List<String> content;
@XmlAttribute(name = "id", namespace = "http://www.opengis.net/gml/3.2")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlID
@XmlSchemaType(name = "ID")
protected String id;
/**
* Gets the value of the content property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the content property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getContent().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link String }
*
*
*/
public List<String> getContent() {
if (content == null) {
content = new ArrayList<String>();
}
return this.content;
}
/**
* Gets the value of the id property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setId(String value) {
this.id = value;
}
}
| [
"edi.gonzales@gmail.com"
] | edi.gonzales@gmail.com |
da4b0a1901b4dc2ea3a0e2629594cb5705cb8f36 | 7ffcc541ef0d0fad018105fb19c80421e02ebbaf | /app/src/main/java/com/example/administrator/irrigationworks/Ui/activity/LocationsignInActivity.java | c98b812c07384b9686851f8d76d35738b24ff2ea | [] | no_license | yzbbanban/Irrigationworks | f186002bc48546a0ac6a486e85ea6854d93dc9f8 | a931fab51394f2fb2babbbe6ab1026a61594dfc4 | refs/heads/master | 2021-07-04T23:35:08.485889 | 2017-09-28T18:38:21 | 2017-09-28T18:38:21 | 105,185,504 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 5,472 | java | package com.example.administrator.irrigationworks.Ui.activity;
import android.os.Bundle;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.amap.api.location.AMapLocation;
import com.amap.api.location.AMapLocationListener;
import com.amap.api.maps.AMap;
import com.amap.api.maps.LocationSource;
import com.amap.api.maps.MapView;
import com.example.administrator.irrigationworks.R;
import com.example.administrator.irrigationworks.Ui.BaseAppCompatActivity;
import butterknife.Bind;
import butterknife.ButterKnife;
/**
* Created by Administrator on 2017/8/9.
*/
public class LocationsignInActivity extends BaseAppCompatActivity implements LocationSource,
AMapLocationListener,RadioGroup.OnCheckedChangeListener {
@Bind(R.id.tv_curdate)
TextView tvCurdate;
@Bind(R.id.tv_curlocal)
TextView tvCurlocal;
@Bind(R.id.tv_location_update)
TextView tvLocationUpdate;
@Bind(R.id.rl_update)
RelativeLayout rlUpdate;
@Bind(R.id.map)
MapView map;
@Bind(R.id.gps_locate_button)
RadioButton gpsLocateButton;
@Bind(R.id.gps_follow_button)
RadioButton gpsFollowButton;
@Bind(R.id.gps_rotate_button)
RadioButton gpsRotateButton;
@Bind(R.id.gps_radio_group)
RadioGroup gpsRadioGroup;
@Bind(R.id.tv_s)
TextView tvS;
@Bind(R.id.tv_curtime)
TextView tvCurtime;
@Bind(R.id.rl_signed)
RelativeLayout rlSigned;
private AMap aMap;
private MapView mapView;
private LocationSource.OnLocationChangedListener mListener;
private RadioGroup mGPSModeGroup;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ButterKnife.bind(this);
/*
* 设置离线地图存储目录,在下载离线地图或初始化地图设置;
* 使用过程中可自行设置, 若自行设置了离线地图存储的路径,
* 则需要在离线地图下载和使用地图页面都进行路径设置
* */
//Demo中为了其他界面可以使用下载的离线地图,使用默认位置存储,屏蔽了自定义设置
// MapsInitializer.sdcardDir =OffLineMapUtils.getSdCacheDir(this);
mapView = (MapView) findViewById(R.id.map);
mapView.onCreate(savedInstanceState);// 此方法必须重写
init();
}
private void init() {
if (aMap == null) {
aMap = mapView.getMap();
setUpMap();
}
mGPSModeGroup=(RadioGroup) findViewById(R.id.gps_radio_group);
mGPSModeGroup.setOnCheckedChangeListener(this);
}
/**
* 设置一些amap的属性
*/
private void setUpMap() {
aMap.setLocationSource(this);// 设置定位监听
aMap.getUiSettings().setMyLocationButtonEnabled(true);// 设置默认定位按钮是否显示
aMap.setMyLocationEnabled(true);// 设置为true表示显示定位层并可触发定位,false表示隐藏定位层并不可触发定位,默认是false
//设置定位的类型为定位模式 ,可以由定位、跟随或地图根据面向方向旋转几种
aMap.setMyLocationType(AMap.LOCATION_TYPE_LOCATE);
}
@Override
protected int getLayoutId() {
return R.layout.activity_locationsin_in;
}
@Override
public void onCheckedChanged(RadioGroup group, int checkedId) {
switch(checkedId){
case R.id.gps_locate_button:
//设置定位的类型为定位模式
aMap.setMyLocationType(AMap.LOCATION_TYPE_LOCATE);
break;
case R.id.gps_follow_button:
//设置定位的类型为 跟随模式
aMap.setMyLocationType(AMap.LOCATION_TYPE_MAP_FOLLOW);
break;
case R.id.gps_rotate_button:
//设置定位的类型为根据地图面向方向旋转
aMap.setMyLocationType(AMap.LOCATION_TYPE_MAP_ROTATE);
break;
}
}
/**
* 方法必须重写
*/
@Override
protected void onResume() {
super.onResume();
mapView.onResume();
}
/**
* 方法必须重写
*/
@Override
protected void onPause() {
super.onPause();
mapView.onPause();
deactivate();
}
/**
* 方法必须重写
*/
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
mapView.onSaveInstanceState(outState);
}
/**
* 方法必须重写
*/
@Override
protected void onDestroy() {
super.onDestroy();
mapView.onDestroy();
ButterKnife.unbind(this);
}
/**
* 定位成功后回调函数
*/
@Override
public void onLocationChanged(AMapLocation aLocation) {
if (mListener != null && aLocation != null) {
mListener.onLocationChanged(aLocation);// 显示系统小蓝点
}
}
/**
* 激活定位
*/
@Override
public void activate(OnLocationChangedListener listener) {
}
/**
* 停止定位
*/
@Override
public void deactivate() {
}
}
| [
"yzbbanban@live.com"
] | yzbbanban@live.com |
c8d82aa13839fa1d45c0988347697be54f7c8d85 | 7721407d859fb513d0dec265887ed1cf661a3273 | /framework/src/main/java/com/jinhe/tss/framework/persistence/IDao.java | 2ac3bda787aa4c8b1ca2a7fdecb9df048927c1ff | [] | no_license | search-cloud/jinhe-tss | 03ccc70bb7a2b8ba47f0c230b339d8b7b90c7696 | 1fdd31bf0410fe385667b6ae0a51216369681b32 | refs/heads/master | 2021-05-26T21:08:49.393299 | 2013-12-05T12:25:38 | 2013-12-05T12:25:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,470 | java | package com.jinhe.tss.framework.persistence;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;
/**
* DAO的一些基本方法
*
* @param <T>
*/
public interface IDao<T extends IEntity> {
Class<T> getType();
/** 使PO成为游离状态,即非托管状态 (detached entity) */
void evict(Object o);
/** 刷新缓存,将一级缓存的托管实体(attached entity)更新到数据库 */
void flush();
/**
* 保存对象:新增或者修改
* @param obj
* @return
*/
T create(T obj);
T createWithoutFlush(T entity);
Object createObject(Object entity);
Object createObjectWithoutFlush(Object entity);
/**
* 更新实体,merge
* @param entity
*/
Object update(Object entity);
Object updateWithoutFlush(Object entity);
/**
* 根据主键值删除对象记录
* @param clazz
* @param id
*/
Object delete(Class<?> clazz, Serializable id);
T deleteById(Serializable id);
Object delete(Object entity);
void deleteAll(Collection<?> c);
/**
* 根据主键值获取对象,延迟方式
* @param clazz
* @param id
* @return
*/
IEntity loadEntity(Class<?> clazz, Serializable id);
/**
* 根据主键值获取对象
* @param clazz
* @param id
* @return
*/
IEntity getEntity(Class<?> clazz, Serializable id);
T getEntity(Serializable id);
/**
* 根据HQL语句和参数值获取对象列表
* @param hql
* @return List,never return null
*/
List<?> getEntities(String hql, Object...conditionValues);
List<?> getEntities(String hql, Object[] conditionNames, Object[] conditionValues);
/**
* 根据原生SQL查询
*
* @param nativeSql
* @param entityClazz
* @param params
* @return
*/
List<?> getEntitiesByNativeSql(String nativeSql, Class<?> entityClazz, Object...params);
List<?> getEntitiesByNativeSql(String nativeSql, Object...params);
/**
* 根据查询条件和分页信息查询对象列表
* 注:
* 如果是多表查询,则子类中需要重写 Object[] getEntities(...)
* @param condition
* @param className
* @param currentPageNum
* @param pagesize
* @return
*/
Object[] getEntities(QueryCondition condition, String className);
Object[] getEntities(QueryCondition condition, String className, String others);
/**
* 执行HQL语句,一般为delete、update类型
* @param hql
*/
void executeHQL(String hql, Object...params);
void executeHQL(String hql, String[] argNames, Object[] params);
/**
* 执行SQL语句,一般为delete、update类型
* @param hql
*/
void executeSQL(String sql, Object...params);
void executeSQL(String sql, String[] argNames, Object[] params);
/**
* 将ID列表插入临时表,以用于查询时候关联使用。用于替代 IN 查询。
*/
void insertIds2TempTable(List<?> list);
void insertIds2TempTable(List<? extends Object[]> list, int idIndex);
void insertIds2TempTable(Object[] idArray);
void insertEntityIds2TempTable(List<? extends IEntity> list);
void clearTempTable();
}
| [
"jinpujun@gmail.com"
] | jinpujun@gmail.com |
8cc085ab5dc4d682d6700afe808e6d6b1a0d45bf | 590cebae4483121569983808da1f91563254efed | /Router/schemas-src/eps-fts-schemas/src/main/java/ru/acs/fts/schemas/aud/aud_checkdocumentsignaturerequest/AUDCheckDocumentSignatureRequestType.java | 7c2a4b2edbeabc7f7aa1760389e6b3b2c2ce9871 | [] | no_license | ke-kontur/eps | 8b00f9c7a5f92edeaac2f04146bf0676a3a78e27 | 7f0580cd82022d36d99fb846c4025e5950b0c103 | refs/heads/master | 2020-05-16T23:53:03.163443 | 2014-11-26T07:00:34 | 2014-11-26T07:01:51 | null | 0 | 0 | null | null | null | null | WINDOWS-1251 | Java | false | false | 1,545 | java |
package ru.acs.fts.schemas.aud.aud_checkdocumentsignaturerequest;
import ru.acs.fts.schemas.aud.audcommonaggregatetypescust.AUDBaseEnvelopeType;
/**
* Запрос на проверку ЭЦП на документ.
*/
public class AUDCheckDocumentSignatureRequestType extends AUDBaseEnvelopeType
{
private String archiveDocumentId;
private String documentModeID;
/**
* Get the 'ArchiveDocumentId' element value. Архивный идентификатор документа.
*
* @return value
*/
public String getArchiveDocumentId() {
return archiveDocumentId;
}
/**
* Set the 'ArchiveDocumentId' element value. Архивный идентификатор документа.
*
* @param archiveDocumentId
*/
public void setArchiveDocumentId(String archiveDocumentId) {
this.archiveDocumentId = archiveDocumentId;
}
/**
* Get the 'DocumentModeID' attribute value. Идентификатор вида технологического документа (запроса, ответа)
*
* @return value
*/
public String getDocumentModeID() {
return documentModeID;
}
/**
* Set the 'DocumentModeID' attribute value. Идентификатор вида технологического документа (запроса, ответа)
*
* @param documentModeID
*/
public void setDocumentModeID(String documentModeID) {
this.documentModeID = documentModeID;
}
}
| [
"m@brel.me"
] | m@brel.me |
a71fd369793a5c857b4d06b2db8a1d1437745e8a | edf4f46f7b473ce341ba292f84e3d1760218ebd1 | /third_party/android/platform-libcore/android-platform-libcore/luni/src/test/java/tests/api/java/util/concurrent/AtomicReferenceTest.java | 5046ee828ee9750a6d5f4b16b0321c1ec0f79197 | [
"MIT",
"ICU",
"W3C",
"CPL-1.0",
"W3C-19980720",
"LicenseRef-scancode-newlib-historical",
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-unicode",
"LicenseRef-scancode-proprietary-license"
] | permissive | openweave/openweave-core | 7e7e6f6c089e2e8015a8281f74fbdcaf4aca5d2a | e3c8ca3d416a2e1687d6f5b7cec0b7d0bf1e590e | refs/heads/master | 2022-11-01T17:21:59.964473 | 2022-08-10T16:36:19 | 2022-08-10T16:36:19 | 101,915,019 | 263 | 125 | Apache-2.0 | 2022-10-17T18:48:30 | 2017-08-30T18:22:10 | C++ | UTF-8 | Java | false | false | 4,379 | java | /*
* Written by Doug Lea with assistance from members of JCP JSR-166
* Expert Group and released to the public domain, as explained at
* http://creativecommons.org/licenses/publicdomain
* Other contributors include Andrew Wright, Jeffrey Hayes,
* Pat Fisher, Mike Judd.
*/
package tests.api.java.util.concurrent; // android-added
import junit.framework.*;
import java.util.concurrent.atomic.*;
import java.io.*;
public class AtomicReferenceTest extends JSR166TestCase {
public static Test suite() {
return new TestSuite(AtomicReferenceTest.class);
}
/**
* constructor initializes to given value
*/
public void testConstructor() {
AtomicReference ai = new AtomicReference(one);
assertSame(one,ai.get());
}
/**
* default constructed initializes to null
*/
public void testConstructor2() {
AtomicReference ai = new AtomicReference();
assertNull(ai.get());
}
/**
* get returns the last value set
*/
public void testGetSet() {
AtomicReference ai = new AtomicReference(one);
assertSame(one,ai.get());
ai.set(two);
assertSame(two,ai.get());
ai.set(m3);
assertSame(m3,ai.get());
}
/**
* get returns the last value lazySet in same thread
*/
public void testGetLazySet() {
AtomicReference ai = new AtomicReference(one);
assertSame(one,ai.get());
ai.lazySet(two);
assertSame(two,ai.get());
ai.lazySet(m3);
assertSame(m3,ai.get());
}
/**
* compareAndSet succeeds in changing value if equal to expected else fails
*/
public void testCompareAndSet() {
AtomicReference ai = new AtomicReference(one);
assertTrue(ai.compareAndSet(one,two));
assertTrue(ai.compareAndSet(two,m4));
assertSame(m4,ai.get());
assertFalse(ai.compareAndSet(m5,seven));
assertSame(m4,ai.get());
assertTrue(ai.compareAndSet(m4,seven));
assertSame(seven,ai.get());
}
/**
* compareAndSet in one thread enables another waiting for value
* to succeed
*/
public void testCompareAndSetInMultipleThreads() throws Exception {
final AtomicReference ai = new AtomicReference(one);
Thread t = new Thread(new CheckedRunnable() {
public void realRun() {
while (!ai.compareAndSet(two, three))
Thread.yield();
}});
t.start();
assertTrue(ai.compareAndSet(one, two));
t.join(LONG_DELAY_MS);
assertFalse(t.isAlive());
assertSame(ai.get(), three);
}
/**
* repeated weakCompareAndSet succeeds in changing value when equal
* to expected
*/
public void testWeakCompareAndSet() {
AtomicReference ai = new AtomicReference(one);
while (!ai.weakCompareAndSet(one,two));
while (!ai.weakCompareAndSet(two,m4));
assertSame(m4,ai.get());
while (!ai.weakCompareAndSet(m4,seven));
assertSame(seven,ai.get());
}
/**
* getAndSet returns previous value and sets to given value
*/
public void testGetAndSet() {
AtomicReference ai = new AtomicReference(one);
assertSame(one,ai.getAndSet(zero));
assertSame(zero,ai.getAndSet(m10));
assertSame(m10,ai.getAndSet(one));
}
/**
* a deserialized serialized atomic holds same value
*/
public void testSerialization() throws Exception {
AtomicReference l = new AtomicReference();
l.set(one);
ByteArrayOutputStream bout = new ByteArrayOutputStream(10000);
ObjectOutputStream out = new ObjectOutputStream(new BufferedOutputStream(bout));
out.writeObject(l);
out.close();
ByteArrayInputStream bin = new ByteArrayInputStream(bout.toByteArray());
ObjectInputStream in = new ObjectInputStream(new BufferedInputStream(bin));
AtomicReference r = (AtomicReference) in.readObject();
assertEquals(l.get(), r.get());
}
/**
* toString returns current value.
*/
public void testToString() {
AtomicReference<Integer> ai = new AtomicReference<Integer>(one);
assertEquals(ai.toString(), one.toString());
ai.set(two);
assertEquals(ai.toString(), two.toString());
}
}
| [
"rszewczyk@nestlabs.com"
] | rszewczyk@nestlabs.com |
9968e30f880e8f49205af440a8b246ad413927a9 | fbf27d453d933352a2c8ef76e0445f59e6b5d304 | /server/src/com/fy/engineserver/message/DAY_PACKAGE_OF_RMB_REQ.java | dbd69f0dd95640dc43b3b765056b56d7650bbbb8 | [] | no_license | JoyPanda/wangxian_server | 0996a03d86fa12a5a884a4c792100b04980d3445 | d4a526ecb29dc1babffaf607859b2ed6947480bb | refs/heads/main | 2023-06-29T05:33:57.988077 | 2021-04-06T07:29:03 | 2021-04-06T07:29:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,846 | java | package com.fy.engineserver.message;
import com.xuanzhi.tools.transport.*;
import java.nio.ByteBuffer;
/**
* 网络数据包,此数据包是由MessageComplier自动生成,请不要手动修改。<br>
* 版本号:null<br>
* 每日礼包<br>
* 数据包的格式如下:<br><br>
* <table border="0" cellpadding="0" cellspacing="1" width="100%" bgcolor="#000000" align="center">
* <tr bgcolor="#00FFFF" align="center"><td>字段名</td><td>数据类型</td><td>长度(字节数)</td><td>说明</td></tr> * <tr bgcolor="#FFFFFF" align="center"><td>length</td><td>int</td><td>getNumOfByteForMessageLength()个字节</td><td>包的整体长度,包头的一部分</td></tr>
* <tr bgcolor="#FAFAFA" align="center"><td>type</td><td>int</td><td>4个字节</td><td>包的类型,包头的一部分</td></tr>
* <tr bgcolor="#FFFFFF" align="center"><td>seqNum</td><td>int</td><td>4个字节</td><td>包的序列号,包头的一部分</td></tr>
* <tr bgcolor="#FAFAFA" align="center"><td>channelName.length</td><td>short</td><td>2个字节</td><td>字符串实际长度</td></tr>
* <tr bgcolor="#FFFFFF" align="center"><td>channelName</td><td>String</td><td>channelName.length</td><td>字符串对应的byte数组</td></tr>
* </table>
*/
public class DAY_PACKAGE_OF_RMB_REQ implements RequestMessage{
static GameMessageFactory mf = GameMessageFactory.getInstance();
long seqNum;
String channelName;
public DAY_PACKAGE_OF_RMB_REQ(){
}
public DAY_PACKAGE_OF_RMB_REQ(long seqNum,String channelName){
this.seqNum = seqNum;
this.channelName = channelName;
}
public DAY_PACKAGE_OF_RMB_REQ(long seqNum,byte[] content,int offset,int size) throws Exception{
this.seqNum = seqNum;
int len = 0;
len = (int)mf.byteArrayToNumber(content,offset,2);
offset += 2;
if(len < 0 || len > 16384) throw new Exception("string length ["+len+"] big than the max length [16384]");
channelName = new String(content,offset,len,"UTF-8");
offset += len;
}
public int getType() {
return 0x00FFF142;
}
public String getTypeDescription() {
return "DAY_PACKAGE_OF_RMB_REQ";
}
public String getSequenceNumAsString() {
return String.valueOf(seqNum);
}
public long getSequnceNum(){
return seqNum;
}
private int packet_length = 0;
public int getLength() {
if(packet_length > 0) return packet_length;
int len = mf.getNumOfByteForMessageLength() + 4 + 4;
len += 2;
try{
len +=channelName.getBytes("UTF-8").length;
}catch(java.io.UnsupportedEncodingException e){
e.printStackTrace();
throw new RuntimeException("unsupported encoding [UTF-8]",e);
}
packet_length = len;
return len;
}
public int writeTo(ByteBuffer buffer) {
int messageLength = getLength();
if(buffer.remaining() < messageLength) return 0;
int oldPos = buffer.position();
buffer.mark();
try{
buffer.put(mf.numberToByteArray(messageLength,mf.getNumOfByteForMessageLength()));
buffer.putInt(getType());
buffer.putInt((int)seqNum);
byte[] tmpBytes1;
try{
tmpBytes1 = channelName.getBytes("UTF-8");
}catch(java.io.UnsupportedEncodingException e){
e.printStackTrace();
throw new RuntimeException("unsupported encoding [UTF-8]",e);
}
buffer.putShort((short)tmpBytes1.length);
buffer.put(tmpBytes1);
}catch(Exception e){
e.printStackTrace();
buffer.reset();
throw new RuntimeException("in writeTo method catch exception :",e);
}
int newPos = buffer.position();
buffer.position(oldPos);
buffer.put(mf.numberToByteArray(newPos-oldPos,mf.getNumOfByteForMessageLength()));
buffer.position(newPos);
return newPos-oldPos;
}
/**
* 获取属性:
* 渠道
*/
public String getChannelName(){
return channelName;
}
/**
* 设置属性:
* 渠道
*/
public void setChannelName(String channelName){
this.channelName = channelName;
}
} | [
"1414464063@qq.com"
] | 1414464063@qq.com |
a5606982731ebf89838ea3e93f87287c861e741e | 55821b09861478c6db214d808f12f493f54ff82a | /trunk/java.prj/sv6.5/src/COM/dragonflow/Page/xmlApiPage.java | 87bee71347be244a84d3e6e2d51cd9141540ed9d | [] | no_license | SiteView/ECC8.13 | ede526a869cf0cb076cd9695dbc16075a1cf9716 | bced98372138b09140dc108b33bb63f33ef769fe | refs/heads/master | 2016-09-05T13:57:21.282048 | 2012-06-12T08:54:40 | 2012-06-12T08:54:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,548 | java | /*
*
* Created on 2005-3-9 22:12:36
*
* .java
*
* History:
*
*/
package COM.dragonflow.Page;
import COM.dragonflow.XmlApi.XmlApiRequestXML;
// Referenced classes of package COM.dragonflow.Page:
// CGI
public class xmlApiPage extends COM.dragonflow.Page.CGI {
public xmlApiPage() {
}
public void printBody() {
java.lang.String s = request.getValue("_login");
java.lang.String s1 = request.getValue("_password");
java.lang.String s2 = request.getValue("account");
jgl.HashMap hashmap = COM.dragonflow.SiteView.MasterConfig
.getMasterConfig();
java.lang.String s3 = "";
java.lang.String s6 = null;
if (COM.dragonflow.Utils.I18N.isI18N) {
try {
s6 = COM.dragonflow.Utils.I18N.toNullEncoding(new String(request
.getValue("xml").getBytes("Cp437"), "UTF-8"));
} catch (java.io.UnsupportedEncodingException unsupportedencodingexception) {
}
if (s6 == null) {
s6 = request.getValue("xml");
}
} else {
s6 = request.getValue("xml");
}
java.lang.Boolean boolean1 = new Boolean(request
.getValue("licenseExpired"));
java.lang.System.out.println("APIRequest: \r\n" + s6);
COM.dragonflow.XmlApi.XmlApiRequestXML xmlapirequestxml = new XmlApiRequestXML(
s6);
COM.dragonflow.XmlApi.XmlApiObject xmlapiobject = (COM.dragonflow.XmlApi.XmlApiObject) xmlapirequestxml
.getAPIRequest();
java.util.Enumeration enumeration = xmlapiobject.elements();
COM.dragonflow.XmlApi.XmlApiObject xmlapiobject1 = (COM.dragonflow.XmlApi.XmlApiObject) enumeration
.nextElement();
java.lang.String s7 = xmlapiobject1.getName();
if (!boolean1.booleanValue() || s7.equals("updateLicense")) {
if (s2.length() == 0) {
s2 = "administrator";
}
COM.dragonflow.SiteView.User user = COM.dragonflow.SiteView.User
.getUserForAccount(s2);
if (user != null) {
if (user.getProperty("_login").equalsIgnoreCase(s)
&& user.getProperty("_password").equals(s1)) {
if (user.getProperty("_disabled").length() > 0) {
if (COM.dragonflow.Utils.TextUtils.getValue(hashmap,
"_loginDisabledMessage").length() > 0) {
s3 = COM.dragonflow.Utils.TextUtils.getValue(
hashmap, "_loginDisabledMessage");
}
if (s3.length() == 0) {
s3 = "This account has been disabled.";
}
xmlapiobject.setProperty("errortype", "operational",
false);
xmlapiobject
.setProperty(
"errorcode",
(new Long(
COM.dragonflow.Resource.SiteViewErrorCodes.ERR_OP_SS_ACCOUNT_DISABLED))
.toString(), false);
xmlapiobject.setProperty("error", s3, false);
} else {
xmlapirequestxml.doRequests();
}
} else {
if (COM.dragonflow.Utils.TextUtils.getValue(hashmap,
"_loginIncorrectMessage").length() > 0) {
s3 = COM.dragonflow.Utils.TextUtils.getValue(hashmap,
"_loginIncorrectMessage");
}
if (s3.length() == 0) {
s3 = "Login incorrect for account: " + s2;
}
xmlapiobject.setProperty("errortype", "operational", false);
xmlapiobject
.setProperty(
"errorcode",
(new Long(
COM.dragonflow.Resource.SiteViewErrorCodes.ERR_OP_SS_LOGIN_INCORRECT))
.toString(), false);
xmlapiobject.setProperty("error", s3, false);
}
} else {
java.lang.String s4 = COM.dragonflow.Resource.SiteViewResource
.getFormattedString(
(new Long(
COM.dragonflow.Resource.SiteViewErrorCodes.ERR_OP_SS_ACCOUNT_DOES_NOT_EXIST))
.toString(), new java.lang.String[0]);
xmlapiobject.setProperty("errortype", "operational", false);
xmlapiobject
.setProperty(
"errorcode",
(new Long(
COM.dragonflow.Resource.SiteViewErrorCodes.ERR_OP_SS_ACCOUNT_DOES_NOT_EXIST))
.toString(), false);
xmlapiobject.setProperty("error", s4, false);
}
} else {
java.lang.String s5 = COM.dragonflow.Resource.SiteViewResource
.getFormattedString(
(new Long(
COM.dragonflow.Resource.SiteViewErrorCodes.ERR_OP_SS_LICENSE_EXPIRED))
.toString(), new java.lang.String[0]);
xmlapiobject.setProperty("errortype", "operational", false);
xmlapiobject
.setProperty(
"errorcode",
(new Long(
COM.dragonflow.Resource.SiteViewErrorCodes.ERR_OP_SS_LICENSE_EXPIRED))
.toString(), false);
xmlapiobject.setProperty("error", s5, false);
}
xmlapirequestxml.setAPIRequest(xmlapiobject);
java.lang.String s8 = (java.lang.String) xmlapirequestxml
.getResponse(false);
java.lang.System.out.println("APIResponse: \r\n" + s8);
outputStream.println(s8);
}
}
| [
"136122085@163.com"
] | 136122085@163.com |
e2596fc009f4addd36f5c0c326e13b5ec3e7804e | 3bd697c75ab493227c2e84572955352db24805e0 | /ZX2000TvFileExploer/app/src/main/java/com/zx/zx2000tvfileexploer/interfaces/IOperationProgressListener.java | ddf610218a7e78923d7934ef49811b98abe6e69a | [] | no_license | ShelleyXiao/ZXTV | 9870029865b156865be242f03c5260bbd79c0b0e | c8dca6ef33bfce7ff7b78b75d314b01c00283ebb | refs/heads/master | 2020-04-06T07:09:59.703746 | 2017-05-25T07:34:53 | 2017-05-25T07:34:53 | 65,435,866 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 185 | java | package com.zx.zx2000tvfileexploer.interfaces;
public interface IOperationProgressListener {
void onOperationFinish(boolean success);
void onFileChanged(String path);
}
| [
"xiao244164200@qq.com"
] | xiao244164200@qq.com |
476962c6e92f9c424c9387bc764ad108e626a6f3 | 69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e | /methods/Method_48782.java | 0fb5096c331779223b0796a630c59c6ea5d33a11 | [] | no_license | P79N6A/icse_20_user_study | 5b9c42c6384502fdc9588430899f257761f1f506 | 8a3676bc96059ea2c4f6d209016f5088a5628f3c | refs/heads/master | 2020-06-24T08:25:22.606717 | 2019-07-25T15:31:16 | 2019-07-25T15:31:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 755 | java | /**
* Get Configuration according to supplied graphName mapped to a specific {@link Graph}; if does not exist, return null.
* @return Map<String, Object>
*/
public Map<String,Object> getConfiguration(final String configName){
final List<Map<Object,Object>> graphConfiguration=graph.traversal().V().has(PROPERTY_GRAPH_NAME,configName).valueMap().toList();
if (graphConfiguration.isEmpty()) return null;
else if (graphConfiguration.size() > 1) {
log.warn("Your configuration management graph is an a bad state. Please " + "ensure you have just one configuration per graph. The behavior " + "of the class' APIs are henceforth unpredictable until this is fixed.");
}
return deserializeVertexProperties(graphConfiguration.get(0));
}
| [
"sonnguyen@utdallas.edu"
] | sonnguyen@utdallas.edu |
de9f843b262ce4b6e37f81f64c8bd8fea562ad89 | 31b7d2067274728a252574b2452e617e45a1c8fb | /icom-bean/icom/EntityAddress.java | ec1fb786377e39958d685675822cb1c2a87a0a09 | [] | no_license | ericschan/open-icom | c83ae2fa11dafb92c3210a32184deb5e110a5305 | c4b15a2246d1b672a8225cbb21b75fdec7f66f22 | refs/heads/master | 2020-12-30T12:22:48.783144 | 2017-05-28T00:51:44 | 2017-05-28T00:51:44 | 91,422,338 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,636 | java | /*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
*
* Copyright (c) 2010, Oracle Corporation All Rights Reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
* and Distribution License ("CDDL") (collectively, the "License"). You
* may not use this file except in compliance with the License. You can obtain
* a copy of the License at http://openjdk.java.net/legal/gplv2+ce.html.
* See the License for the specific language governing permission and
* limitations under the License.
*
* When distributing the software, include this License Header Notice in each
* file and include the License file at openICOM/bootstrap/legal/LICENSE.txt.
* Oracle designates this particular file as subject to the "Classpath" exception
* as provided by Oracle in the GPL Version 2 section of the License file that
* accompanied this code. If applicable, add the following below the License
* Header, with the fields enclosed by brackets [ ] replaced by your own
* identifying information: "Portions Copyrighted [year]
* [name of copyright owner].
*
* Contributor(s): Oracle Corporation
*
* If you wish your version of this file to be governed by only the CDDL or
* only the GPL Version 2, indicate your decision by adding "[Contributor]
* elects to include this software in this distribution under the [CDDL or GPL
* Version 2] license." If you don't indicate a single choice of license, a
* recipient has the option to distribute your version of this file under
* either the CDDL, the GPL Version 2 or to extend the choice of license to
* its licensees as provided above. However, if you add GPL Version 2 code
* and therefore, elected the GPL Version 2 license, then the option applies
* only if the new code is made subject to such option by the copyright
* holder.
*/
package icom;
import java.net.URI;
import java.net.URISyntaxException;
import javax.persistence.PersistenceException;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
@javax.persistence.Embeddable
@XmlType(name="EntityAddress", namespace="http://docs.oasis-open.org/ns/icom/core/201008")
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(namespace="http://docs.oasis-open.org/ns/icom/core/201008")
public class EntityAddress {
static final long serialVersionUID = 1L;
String addressType;
URI address;
public EntityAddress() {
super();
}
public String getAddressType() {
return addressType;
}
public void setAddressType(String addressType) {
this.addressType = addressType;
}
public void setAddress(AddressScheme addressScheme, String schemeSpecificAddressPart, String fragment) throws URISyntaxException {
URI address = new URI(addressScheme.name(), schemeSpecificAddressPart, fragment);
setAddress(address);
}
public URI getAddress() {
return address;
}
public void setAddress(URI address) {
this.address = address;
}
public EntityAddress clone() {
EntityAddress clone;
try {
clone = (EntityAddress) this.getClass().newInstance();
} catch (IllegalAccessException ex) {
throw new PersistenceException("illegal access exception of identifiable class", ex);
} catch (InstantiationException ex) {
throw new PersistenceException("instantiation exception of identifiable class", ex);
}
clone.address = address;
clone.addressType = addressType;
return clone;
}
}
| [
"eric.sn.chan@gmail.com"
] | eric.sn.chan@gmail.com |
ff1dce50c405d325e03270acdc5e4afe61d5acdd | ebd10a29b96e9e79888aef1293011e245e2c9302 | /front-pages/yppt-mobile-api/src/main/java/com/ctfo/sinoiov/mobile/webapi/base/plugin/impl/WebapiLogServiceImpl.java | 80767378c57fc1e3eaaff52475cb0c7e9af96ae5 | [] | no_license | sym695989697/yppt | f59f8ea55d6c25083aead7c3da63734c6e44a06d | b1eadc24aaab686cc0f690aa942f5a43d8bcdf8e | refs/heads/master | 2021-01-12T08:18:10.658937 | 2016-08-24T12:51:11 | 2016-08-24T12:51:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,766 | java | package com.ctfo.sinoiov.mobile.webapi.base.plugin.impl;
import java.util.List;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ctfo.file.boss.IMongoService;
import com.ctfo.sinoiov.mobile.webapi.base.plugin.WebapiLogService;
import com.ctfo.sinoiov.mobile.webapi.base.plugin.WebApiServiceLog;
import com.ctfo.sinoiov.mobile.webapi.base.plugin.Page;
import com.google.code.morphia.query.Query;
@Service
public class WebapiLogServiceImpl implements WebapiLogService {
protected static final Log log = LogFactory.getLog(WebapiLogServiceImpl.class);
@Autowired(required =false)
private IMongoService mongoService;
@Override
public Page<WebApiServiceLog> findList(String servCode, String statusType,int page,int pageSize) {
Page<WebApiServiceLog> p = new Page<WebApiServiceLog>();
mongoService.setDatasource("LOGS");
try {
Query<WebApiServiceLog> query = mongoService.getQuery(WebApiServiceLog.class);
if(StringUtils.isNotBlank(servCode)){
query.field("action").contains(servCode);
}
if(StringUtils.isNotBlank(statusType)){
query.field("state").contains(statusType);
}
query.order("-handleTime");
query.offset((page - 1) * pageSize);
query.limit(pageSize);
List<WebApiServiceLog> listMongo = mongoService.query(WebApiServiceLog.class, query);
p.setList(listMongo);
p.setTotal(mongoService.getCount());
} catch (Exception e) {
// TODO: handle exception
log.error("查询外部应用调用日志发生错误:", e);
}
return p;
}
}
| [
"mlq6789@163.com"
] | mlq6789@163.com |
f2307aeeec5cbc991dc4e3cb23aebacf47fb8c83 | a90b4259c9f1713bd009e66a55b2c445fc21ac50 | /test-freemarker/src/main/java/com/xuecheng/test/mq/Provider.java | 335abaf0de308c0d5bdacbec6b93772f0b18a5c4 | [] | no_license | ChenYilei2016/StudyOnLine | fabb5dd2aa9bf3319003226828fb4fafe43bcf83 | 41e84e2eb3a6345feaf95bb55c9f8ce4acafe97a | refs/heads/master | 2020-04-22T20:07:26.650271 | 2019-03-19T10:35:04 | 2019-03-19T10:35:04 | 170,631,008 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,054 | java | package com.xuecheng.test.mq;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.ConnectionFactory;
/**
* --添加相关注释--
*
* @author chenyilei
* @date 2019/02/20- 11:17
*/
public class Provider {
public static void main(String[] args) throws Exception{
ConnectionFactory connectionFactory = new ConnectionFactory();
connectionFactory.setHost("132.232.117.84");
connectionFactory.setUsername("root");
connectionFactory.setPassword("root");
connectionFactory.setVirtualHost("/leyou");
Connection connection = connectionFactory.newConnection();
Channel channel = connection.createChannel();
// * 不能为空
// # 可以为空且多个值
// xc.#.sms.#
// xc.#.email.#
// xc.sms.email 可以匹配以上2种情况
channel.basicPublish("ly.item.exchange","test",null,"1+1".getBytes());
// channel.basicConsume()
channel.close();
connection.close();
}
}
| [
"705029004@qq.com"
] | 705029004@qq.com |
a2574e4df0666bd217825f4bfd25ba96e88352c9 | fbf27d453d933352a2c8ef76e0445f59e6b5d304 | /server/src/com/fy/engineserver/menu/Option_TradeConfirm4ReleaseRB.java | ac42ea83edf10f43efe9e6675bbe33af35057fb2 | [] | no_license | JoyPanda/wangxian_server | 0996a03d86fa12a5a884a4c792100b04980d3445 | d4a526ecb29dc1babffaf607859b2ed6947480bb | refs/heads/main | 2023-06-29T05:33:57.988077 | 2021-04-06T07:29:03 | 2021-04-06T07:29:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,006 | java | package com.fy.engineserver.menu;
import com.fy.engineserver.core.Game;
import com.fy.engineserver.sprite.Player;
import com.fy.engineserver.trade.requestbuy.RequestBuyRule;
import com.fy.engineserver.trade.requestbuy.service.RequestBuyManager;
public class Option_TradeConfirm4ReleaseRB extends Option {
private long perPrice;
private int num;
private RequestBuyRule buyRule;
public Option_TradeConfirm4ReleaseRB(RequestBuyRule buyRule, int num, long perPrice) {
this.perPrice = perPrice;
this.num = num;
this.buyRule = buyRule;
}
@Override
public void doSelect(Game game, Player player) {
try {
RequestBuyManager manager = RequestBuyManager.getInstance();
manager.relReleaseRequestBuy(player, buyRule, num, perPrice);
} catch (Exception e) {
if(RequestBuyManager.logger.isWarnEnabled())
RequestBuyManager.logger.warn("点了按钮",e);
}
}
@Override
public byte getOType() {
// TODO Auto-generated method stub
return Option.OPTION_TYPE_SERVER_FUNCTION;
}
}
| [
"1414464063@qq.com"
] | 1414464063@qq.com |
c7525a18df809044ae9f917b1dce4fb774cae052 | 6e5c37409a53c882bf41ba5bbbf49975d6c1c9aa | /src/org/hl7/v3/AcknowledgementDetailType.java | 375a0d248fa8607d31a640e4f623d7f859900a59 | [] | no_license | hosflow/fwtopsysdatasus | 46fdf8f12ce1fd5628a04a2145757798b622ee9f | 2d9a835fcc7fd902bc7fb0b19527075c1260e043 | refs/heads/master | 2021-09-03T14:39:52.008357 | 2018-01-09T20:34:19 | 2018-01-09T20:34:19 | 116,867,672 | 0 | 0 | null | null | null | null | IBM852 | Java | false | false | 822 | java |
package org.hl7.v3;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Classe Java de AcknowledgementDetailType.
*
* <p>O seguinte fragmento do esquema especifica o conte˙do esperado contido dentro desta classe.
* <p>
* <pre>
* <simpleType name="AcknowledgementDetailType">
* <restriction base="{urn:hl7-org:v3}cs">
* <enumeration value="E"/>
* <enumeration value="I"/>
* <enumeration value="W"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "AcknowledgementDetailType")
@XmlEnum
public enum AcknowledgementDetailType {
E,
I,
W;
public String value() {
return name();
}
public static AcknowledgementDetailType fromValue(String v) {
return valueOf(v);
}
}
| [
"andre.topazio@gmail.com"
] | andre.topazio@gmail.com |
a9a1e904e983646469b12672c4837a9605cf576a | a770e95028afb71f3b161d43648c347642819740 | /sources/org/telegram/ui/CountrySelectActivity$CountryAdapter$$ExternalSyntheticLambda0.java | 01ca5eae30c2c7b63b0155dd29d24942cedafd10 | [] | no_license | Edicksonjga/TGDecompiledBeta | d7aa48a2b39bbaefd4752299620ff7b72b515c83 | d1db6a445d5bed43c1dc8213fb8dbefd96f6c51b | refs/heads/master | 2023-08-25T04:12:15.592281 | 2021-10-28T20:24:07 | 2021-10-28T20:24:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 689 | java | package org.telegram.ui;
import java.util.Comparator;
import org.telegram.ui.CountrySelectActivity;
public final /* synthetic */ class CountrySelectActivity$CountryAdapter$$ExternalSyntheticLambda0 implements Comparator {
public static final /* synthetic */ CountrySelectActivity$CountryAdapter$$ExternalSyntheticLambda0 INSTANCE = new CountrySelectActivity$CountryAdapter$$ExternalSyntheticLambda0();
private /* synthetic */ CountrySelectActivity$CountryAdapter$$ExternalSyntheticLambda0() {
}
public final int compare(Object obj, Object obj2) {
return ((CountrySelectActivity.Country) obj).name.compareTo(((CountrySelectActivity.Country) obj2).name);
}
}
| [
"fabian_pastor@msn.com"
] | fabian_pastor@msn.com |
49fb4299d7706bb7a25a3b61a7b41aee9acb0ea9 | 9b662298963bac27c607b3a580709c2f5370cb9c | /spring-statemachine-samples/web/src/main/java/demo/web/WebSocketConfig.java | 2e3b3b69d7e7cc06a1ad89677c1d58f069c3fd38 | [
"Apache-2.0"
] | permissive | spring-projects/spring-statemachine | 0be59593b76a83ef288326c01f4120ef304912a6 | 6bddecd3f282cc6caad0feb9bce362883f3b2a4f | refs/heads/main | 2023-09-03T21:39:43.935492 | 2023-06-19T09:52:03 | 2023-06-19T09:52:03 | 30,310,864 | 1,496 | 683 | null | 2023-09-03T05:42:29 | 2015-02-04T17:15:36 | Java | UTF-8 | Java | false | false | 1,850 | java | /*
* Copyright 2015-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://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 demo.web;
import java.util.concurrent.ConcurrentHashMap;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.messaging.simp.config.MessageBrokerRegistry;
import org.springframework.session.MapSession;
import org.springframework.session.MapSessionRepository;
import org.springframework.session.web.socket.config.annotation.AbstractSessionWebSocketMessageBrokerConfigurer;
import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker;
import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
@Configuration
@EnableWebSocketMessageBroker
public class WebSocketConfig extends AbstractSessionWebSocketMessageBrokerConfigurer<MapSession> {
@Override
protected void configureStompEndpoints(StompEndpointRegistry registry) {
registry.addEndpoint("/ws").withSockJS();
}
@Override
public void configureMessageBroker(MessageBrokerRegistry registry) {
registry.enableSimpleBroker("/queue/", "/topic/");
registry.setApplicationDestinationPrefixes("/app");
}
@Bean
public MapSessionRepository mapSessionRepository() {
return new MapSessionRepository(new ConcurrentHashMap<>());
}
} | [
"janne.valkealahti@gmail.com"
] | janne.valkealahti@gmail.com |
677379e6c08112d902542699fe0246fcd4c7f924 | f633bbc1a8936b780676e9ac8b099c9d3c32ea50 | /src/ch09_InnerClasses/Lesson/L22_MultiInterfaces.java | 2c4c86e7e34566eb9adfdbec650038dcf5b36f0d | [] | no_license | zjn0505/Think-in-Java | 4cc203409c886a849819c8d53a3f92089efd6944 | 61d6fd303ea05d1ba047b10cb7f9167eb94814fb | refs/heads/master | 2021-01-17T02:13:21.002319 | 2017-09-19T14:50:33 | 2017-09-19T14:50:33 | 31,588,332 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 555 | java | package ch09_InnerClasses.Lesson;
/**
* Created by Jienan on 2016/11/14.
*/
// Two ways that a class can implement multiple interfaces.
interface A {}
interface B {}
class X implements A, B {}
class Y implements A {
B makeB() {
return new B() {};
}
}
public class L22_MultiInterfaces {
static void takesA(A a) {}
static void takesB(B b) {}
public static void main(String[] args) {
X x = new X();
Y y = new Y();
takesA(x);
takesA(y);
takesB(x);
takesB(y.makeB());
}
}
| [
"zjn0505@hotmail.com"
] | zjn0505@hotmail.com |
6e73b6a6550c5c4ae2eeec164ece97ed32553f03 | 6e57bdc0a6cd18f9f546559875256c4570256c45 | /packages/services/BuiltInPrintService/src/com/android/bips/util/WifiMonitor.java | d2fad7ff449e47d83af96432475fb70d2c5d1574 | [] | no_license | dongdong331/test | 969d6e945f7f21a5819cd1d5f536d12c552e825c | 2ba7bcea4f9d9715cbb1c4e69271f7b185a0786e | refs/heads/master | 2023-03-07T06:56:55.210503 | 2020-12-07T04:15:33 | 2020-12-07T04:15:33 | 134,398,935 | 2 | 1 | null | 2022-11-21T07:53:41 | 2018-05-22T10:26:42 | null | UTF-8 | Java | false | false | 3,039 | java | /*
* Copyright (C) 2016 The Android Open Source Project
* Copyright (C) 2016 Mopria Alliance, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.bips.util;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.util.Log;
import com.android.bips.BuiltInPrintService;
/** Reliably reports on changes to Wi-Fi connectivity state */
public class WifiMonitor {
private static final String TAG = WifiMonitor.class.getSimpleName();
private static final boolean DEBUG = false;
private BroadcastMonitor mBroadcasts;
private Listener mListener;
/** Current connectivity state or null if not known yet */
private Boolean mConnected;
/**
* Begin listening for connectivity changes, supplying the connectivity state to the listener
* until stopped.
*/
public WifiMonitor(BuiltInPrintService service, Listener listener) {
if (DEBUG) Log.d(TAG, "WifiMonitor()");
ConnectivityManager connectivityManager =
(ConnectivityManager) service.getSystemService(Context.CONNECTIVITY_SERVICE);
if (connectivityManager == null) {
return;
}
mListener = listener;
mBroadcasts = service.receiveBroadcasts(new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
if (ConnectivityManager.CONNECTIVITY_ACTION.equals(intent.getAction())) {
NetworkInfo info = connectivityManager.getActiveNetworkInfo();
boolean isConnected = info != null && info.isConnected();
if (mListener != null && (mConnected == null || mConnected != isConnected)) {
mConnected = isConnected;
mListener.onConnectionStateChanged(mConnected);
}
}
}
}, ConnectivityManager.CONNECTIVITY_ACTION);
}
/** Cease monitoring Wi-Fi connectivity status */
public void close() {
if (DEBUG) Log.d(TAG, "close()");
if (mBroadcasts != null) {
mBroadcasts.close();
}
mListener = null;
}
/** Communicate changes to the Wi-Fi connection state */
public interface Listener {
/** Called when the Wi-Fi connection state changes */
void onConnectionStateChanged(boolean isConnected);
}
}
| [
"dongdong331@163.com"
] | dongdong331@163.com |
6d620bae83dee45beebedcc0b2d5d7f9dea5c6e8 | bcd546155fb4a21f61fb75da09e1602a7f8ae687 | /app/src/main/java/com/Ajagoc/awt/Dimension.java | fe2bb4d69257930bebc69644e4045ad1253a9969 | [] | no_license | sakachin2/Ajagot1w | c4f42d949cd1744aa2fe15636c34e443eb99966d | 33817fbcb2f3efb8cb0640bed75ce6741c71fdd6 | refs/heads/master | 2021-06-20T04:13:34.762091 | 2017-08-15T07:32:41 | 2017-08-15T07:32:41 | 100,338,373 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,438 | java | package com.Ajagoc.awt; //~1112I~
public class Dimension //~1117R~
{ //~1112I~
public int height=0,width=0; //~1117R~
public Dimension() //~1117I~//+1120R~
{ //~1117I~
} //~1117I~
public Dimension(int Pw,int Ph) //+1120I~
{ //+1120I~
height=Ph; //+1120I~
width=Pw; //+1120I~
} //+1120I~
public void setSize(int Pw,int Ph) //~1117I~
{ //~1117I~
height=Ph; //~1117I~
width=Pw; //~1117I~
} //~1117I~
//~1117I~
}//class //~1112I~
| [
"sakachin2@yahoo.co.jp"
] | sakachin2@yahoo.co.jp |
afc695b03916263062b05e03855c7feb26a81017 | d1c35b77ced39d225473d6737f27699b3e7d8db1 | /src/thread/redhat/com/Phaser1.java | d40f272573eaaa32a063ca8a3134f4024b80feb7 | [] | no_license | kenzhaoyihui/javase_L | f5ec3635f99a41c75da9d6a89299507f03df65b6 | 1dd7dee3486c0cb9dadd41ae6f2e178848bb69a3 | refs/heads/master | 2020-03-16T00:27:24.139875 | 2018-07-30T17:04:12 | 2018-07-30T17:04:12 | 132,417,067 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,197 | java | package thread.redhat.com;
import java.util.Random;
import java.util.concurrent.Phaser;
class StartTogetherTask extends Thread {
private Phaser phaser;
private String taskName;
private static Random rand = new Random();
public StartTogetherTask(String taskName, Phaser phaser) {
this.taskName = taskName;
this.phaser = phaser;
}
@Override
public void run() {
System.out.println(taskName + ":Initializing...");
int sleepTime = rand.nextInt(5) + 1;
try {
Thread.sleep(sleepTime * 1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
System.out.println(taskName + ":Initialized...");
phaser.arriveAndAwaitAdvance();
System.out.println(taskName + ":Started...");
}
}
public class Phaser1 {
public static void main(String[] args) {
Phaser phaser = new Phaser(1);
for (int i = 1; i <= 3; i++) {
phaser.register();
String taskName = "Task #" + i;
StartTogetherTask task = new StartTogetherTask(taskName, phaser);
task.start();
}
phaser.arriveAndDeregister();
}
} | [
"yzhao@redhat.com"
] | yzhao@redhat.com |
626257b491c232af0ba6714c66c94dc975193a65 | 72386d62b21766e3bf7c7625489b14189ca26118 | /src/main/java/lambdasinaction/chap13/Square.java | db59ac52ef9185c29c91827f75fbb54d53ee0a5e | [] | no_license | DevotionZhu/Java8-in-Action | 71d6e1bd1b59d8a791440bb9fea0ba0dfc71f59e | d791df51979e21e12502e593e882f9585abf53e0 | refs/heads/master | 2023-07-17T16:41:43.714214 | 2021-09-05T14:58:35 | 2021-09-05T14:58:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 469 | java | package lambdasinaction.chap13;
/**
* Created by raoul-gabrielurma on 15/01/2014.
*/
public class Square implements Resizable {
@Override
public int getWidth() {
return 0;
}
@Override
public int getHeight() {
return 0;
}
@Override
public void setWidth(int width) {
}
@Override
public void setHeight(int height) {
}
@Override
public void setAbsoluteSize(int width, int height) {
}
@Override
public void draw() {
}
}
| [
"525782303@qq.com"
] | 525782303@qq.com |
194aa1b77fe8ce2167c5f01ca61f8c0f6f1d1ca0 | 1b2685ff6a251c85e38b6701f2540a30eba96322 | /src/main/java/com/liangxunwang/unimanager/model/LxAttribute.java | 4bfa3096997dd4755ed1eb25e5292e478f5152d3 | [] | no_license | eryiyi/HuiminJsManager | 6284edb145c13f7c54c4af7d868aa1015d04beea | 65ed166e5e910bc8b6db0953d47fb705317aff3b | refs/heads/master | 2021-06-28T17:14:50.647917 | 2017-09-18T04:01:35 | 2017-09-18T04:01:35 | 101,830,920 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,230 | java | package com.liangxunwang.unimanager.model;
/**
* Created by zhl on 2016/10/4.
* 三级分销的等级 三个等级划分
*/
public class LxAttribute {
private String lx_attribute_id;//等级Id
private String lx_attribute_name;//等级名称 不可改
private String lx_attribute_nick;//0普通会员 1县长 2市长 3 省长 4店长
private String lx_attribute_rate;//返利百分比
public String getLx_attribute_rate() {
return lx_attribute_rate;
}
public void setLx_attribute_rate(String lx_attribute_rate) {
this.lx_attribute_rate = lx_attribute_rate;
}
public String getLx_attribute_id() {
return lx_attribute_id;
}
public void setLx_attribute_id(String lx_attribute_id) {
this.lx_attribute_id = lx_attribute_id;
}
public String getLx_attribute_name() {
return lx_attribute_name;
}
public void setLx_attribute_name(String lx_attribute_name) {
this.lx_attribute_name = lx_attribute_name;
}
public String getLx_attribute_nick() {
return lx_attribute_nick;
}
public void setLx_attribute_nick(String lx_attribute_nick) {
this.lx_attribute_nick = lx_attribute_nick;
}
}
| [
"826321978@qq.com"
] | 826321978@qq.com |
88368c126271717d4c5ca91fbf9a92244530e524 | a1e035b37dca560f0018c1cfb0af938fef273f39 | /gate-server/src/main/java/com/ppdai/stargate/vo/GroupLogVO.java | 26a974ae64ff7258df9ed30e8816f911f43f9aa4 | [
"Apache-2.0"
] | permissive | IceRedTea/stargate | b80b6f0111d04fbad5b8d026eccb1f0130596ccc | a4ae2540f512f374af149ea5b94303dc1db8a484 | refs/heads/master | 2023-03-08T13:12:26.978566 | 2021-03-01T05:48:55 | 2021-03-01T05:48:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 138 | java | package com.ppdai.stargate.vo;
import lombok.Data;
@Data
public class GroupLogVO {
private String group;
private String logs;
}
| [
"zhangyicong@ppdai.com"
] | zhangyicong@ppdai.com |
a09f7e10e8032b076ea7f41d085d3598f2d12b7c | 8f3cd2b98b5d868d0b02c6eddecac85697f4632d | /src/com/massivecraft/massivecore/ps/PSFormatHumanComma.java | 22d87df3343b5dc40728f96a023d890c6b245a1b | [] | no_license | eduardo-mior/MambaMassiveCore | be95b87471237aafc32289656276e0ca011f081a | ef7570acfd20464e927f906399a4b042b615ad20 | refs/heads/master | 2020-03-15T13:50:43.167197 | 2018-12-28T13:01:26 | 2018-12-28T13:01:26 | 132,176,543 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 899 | java | package com.massivecraft.massivecore.ps;
import com.massivecraft.massivecore.util.Txt;
public class PSFormatHumanComma extends PSFormatAbstract
{
// -------------------------------------------- //
// INSTANCE & CONSTRUCT
// -------------------------------------------- //
private static PSFormatHumanComma i = new PSFormatHumanComma();
public static PSFormatHumanComma get() { return i; }
private PSFormatHumanComma()
{
super(
Txt.parse("<silver><em>NULL"),
Txt.parse(""),
true,
false,
Txt.parse("<v>%s"),
Txt.parse("<v>%d"),
Txt.parse("<v>%d"),
Txt.parse("<v>%d"),
Txt.parse("<v>%.2f"),
Txt.parse("<v>%.2f"),
Txt.parse("<v>%.2f"),
Txt.parse("<v>%d"),
Txt.parse("<v>%d"),
Txt.parse("<v>%.2f"),
Txt.parse("<v>%.2f"),
Txt.parse("<v>%.2f"),
Txt.parse("<v>%.2f"),
Txt.parse("<v>%.2f"),
Txt.parse("<i>, "),
Txt.parse("")
);
}
}
| [
"eduardo-mior@hotmail.com"
] | eduardo-mior@hotmail.com |
5842ccae35a668abde8d0167d0e4ed1abea3090d | e6108ceccf2dec8ef2407717bdcd9026196ed00a | /Control 4/src/cl/curso/java/control_cuatro/svera/Programa2.java | 226bd3c539f06af7af51c20d1f260a1d168df207 | [] | no_license | simonvera/workspace | c990ed3acc7739da1844686a50dc6e1d73754ae8 | d1974e6835829eab9bb8aa62a5491869fa5fe934 | refs/heads/master | 2021-01-20T18:24:06.437638 | 2016-06-10T14:29:23 | 2016-06-10T14:29:23 | 60,852,619 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 288 | java | package cl.curso.java.control_cuatro.svera;
/**
*
* @author Simon_Vera
*
*/
public class Programa2 {
public static void main(String[] args) {
Auto auto=new Auto("Toyota","xd",2016,0);
try {
auto.venderAuto();
} catch (Exception e) {
// TODO: handle exception
}
}
}
| [
"usuario"
] | usuario |
011cae66fe3524fdc81aee57b6c266e27e8c5ed7 | 302cc26a9ddbfd27a149cbabec49b60ac327099a | /battle-models/src/main/java/com/battle/domain/BattleDanUserPk.java | e58be20a48edddf5179fcd27fbe26f9dd6ace8fe | [] | no_license | wangyuchuan12/battle2.0 | 48a44e89608bd4be86abec0dc46f68f21ea04136 | b9dfce9ed6f636d4ca4297931ce2a5a2fbcaf948 | refs/heads/master | 2020-03-16T05:33:24.413475 | 2018-05-28T11:24:26 | 2018-05-28T11:24:26 | 132,534,637 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,467 | java | package com.battle.domain;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import org.hibernate.annotations.Type;
import org.joda.time.DateTime;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.wyc.annotation.IdAnnotation;
import com.wyc.annotation.ParamAnnotation;
import com.wyc.annotation.ParamEntityAnnotation;
@ParamEntityAnnotation
@Entity
@Table(name="battle_dan_user_item")
public class BattleDanUserPk {
@Id
@IdAnnotation
private String id;
@ParamAnnotation
@Column(name="battle_dan_user_id")
private String battleDanUserId;
@ParamAnnotation
@Column(name="user_id")
private String userId;
@ParamAnnotation
@Column(name="battle_id")
private String battleId;
@ParamAnnotation
@Column(name="period_id")
private String periodId;
@ParamAnnotation
@Column(name="room_id")
private String roomId;
@ParamAnnotation
@Column
private Integer score;
@ParamAnnotation
@Column(name = "create_at")
@Type(type="org.jadira.usertype.dateandtime.joda.PersistentDateTime")
@JsonIgnore
private DateTime createAt;
@ParamAnnotation
@Column(name = "update_at")
@Type(type="org.jadira.usertype.dateandtime.joda.PersistentDateTime")
@JsonIgnore
private DateTime updateAt;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getBattleDanUserId() {
return battleDanUserId;
}
public void setBattleDanUserId(String battleDanUserId) {
this.battleDanUserId = battleDanUserId;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getBattleId() {
return battleId;
}
public void setBattleId(String battleId) {
this.battleId = battleId;
}
public String getPeriodId() {
return periodId;
}
public void setPeriodId(String periodId) {
this.periodId = periodId;
}
public String getRoomId() {
return roomId;
}
public void setRoomId(String roomId) {
this.roomId = roomId;
}
public Integer getScore() {
return score;
}
public void setScore(Integer score) {
this.score = score;
}
public DateTime getCreateAt() {
return createAt;
}
public void setCreateAt(DateTime createAt) {
this.createAt = createAt;
}
public DateTime getUpdateAt() {
return updateAt;
}
public void setUpdateAt(DateTime updateAt) {
this.updateAt = updateAt;
}
}
| [
"root@dawang.local"
] | root@dawang.local |
1f6a8d29a20a513a0ba109e068b5e3c4304c73f9 | 065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be | /drjava_cluster/20638/tar_0.java | 37a77698c9d9b5317f2379fbab12ad2f66670849 | [] | 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 | 4,234 | java | /*BEGIN_COPYRIGHT_BLOCK
*
* This file is a part of DrJava. Current versions of this project are available
* at http://sourceforge.net/projects/drjava
*
* Copyright (C) 2001-2002 JavaPLT group at Rice University (javaplt@rice.edu)
*
* DrJava is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrJava 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
* or see http://www.gnu.org/licenses/gpl.html
*
* In addition, as a special exception, the JavaPLT group at Rice University
* (javaplt@rice.edu) gives permission to link the code of DrJava with
* the classes in the gj.util package, even if they are provided in binary-only
* form, and distribute linked combinations including the DrJava and the
* gj.util package. You must obey the GNU General Public License in all
* respects for all of the code used other than these classes in the gj.util
* package: Dictionary, HashtableEntry, ValueEnumerator, Enumeration,
* KeyEnumerator, Vector, Hashtable, Stack, VectorEnumerator.
*
* If you modify this file, you may extend this exception to your version of the
* file, but you are not obligated to do so. If you do not wish to
* do so, delete this exception statement from your version. (However, the
* present version of DrJava depends on these classes, so you'd want to
* remove the dependency first!)
*
END_COPYRIGHT_BLOCK*/
package edu.rice.cs.drjava.model;
import java.util.HashMap;
import java.io.File;
import java.io.IOException;
import javax.swing.text.BadLocationException;
import edu.rice.cs.util.UnexpectedException;
import edu.rice.cs.drjava.model.definitions.DefinitionsDocument;
/**
* Test implementation of IGetDocuments interface.
*/
public class TestDocGetter extends DummyGetDocuments {
/**
* Storage for documents and File keys.
*/
HashMap<File, OpenDefinitionsDocument> docs;
/**
* Convenience constructor for no-documents case.
*/
public TestDocGetter() {
this(new File[0], new String[0]);
}
/**
* Primary constructor, builds OpenDefDocs from Strings.
* @param files the keys to use when getting OpenDefDocs
* @param texts the text to put in the OpenDefDocs
*/
public TestDocGetter(File[] files, String[] texts) {
if (files.length != texts.length) {
throw new IllegalArgumentException("Argument arrays must match in size.");
}
docs = new HashMap<File, OpenDefinitionsDocument>(texts.length * 2);
GlobalEventNotifier en = new GlobalEventNotifier();
for (int i = 0; i < texts.length; i++) {
DefinitionsDocument doc = new DefinitionsDocument(en);
doc.setFile(files[i]);
try {
doc.insertString(0, texts[i], null);
}
catch (BadLocationException e) {
throw new UnexpectedException(e);
}
docs.put(files[i], new TestOpenDoc(doc));
}
}
public OpenDefinitionsDocument getDocumentForFile(File file)
throws IOException {
// Try to find the key in docs.
if (docs.containsKey(file)) {
return docs.get(file);
}
else {
throw new IllegalStateException("TestDocGetter can't open new files!");
}
}
/**
* Test implementation of OpenDefinitionsDocument interface.
*/
private static class TestOpenDoc extends DummyOpenDefDoc {
DefinitionsDocument _doc;
TestOpenDoc(DefinitionsDocument doc) {
_doc = doc;
}
/**
* This is the only method that we care about.
*/
public DefinitionsDocument getDocument() {
return _doc;
}
/**
* Okay, I lied. We need this one, too.
*/
public File getFile() throws IllegalStateException, FileMovedException {
return _doc.getFile();
}
}
}
| [
"375833274@qq.com"
] | 375833274@qq.com |
bbfa678d0845c50e2681fb17fd061b49c26f5b91 | 22361430ab12e5a7c1eba4664293fc4a39051d9b | /QMRServer/src/com/game/data/container/Q_restwContainer.java | b334af13f8b0033bcb98bb22bea7beb0497826e0 | [] | no_license | liuziangexit/QMR | ab93a66623e670a7f276683d94188d1b627db853 | 91ea3bd35ee3a1ebf994fb3fd6ffdbaa6fbf4d22 | refs/heads/master | 2020-03-30T00:22:31.028514 | 2017-12-20T05:41:17 | 2017-12-20T05:41:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 855 | java | package com.game.data.container;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import com.game.data.bean.Q_restwBean;
import com.game.data.dao.Q_restwDao;
/**
* @author ExcelUtil Auto Maker
*
* @version 1.0.0
*
* Q_restw数据容器
*/
public class Q_restwContainer {
private List<Q_restwBean> list;
private HashMap<Integer, Q_restwBean> map = new HashMap<Integer, Q_restwBean>();
private Q_restwDao dao = new Q_restwDao();
public void load(){
list = dao.select();
Iterator<Q_restwBean> iter = list.iterator();
while (iter.hasNext()) {
Q_restwBean bean = (Q_restwBean) iter
.next();
map.put(bean.getQ_id(), bean);
}
}
public List<Q_restwBean> getList(){
return list;
}
public HashMap<Integer, Q_restwBean> getMap(){
return map;
}
} | [
"ctl70000@163.com"
] | ctl70000@163.com |
41c193b8dfda46bed9f1972e4e1d79448522b804 | 4aa2715c896fe8da26d40f00a9b08c7d0d8fca43 | /java-demo/src/main/java/com/example/java/test/Test.java | 2022fbd552366610ce2e39b386fdeb9ae080d563 | [] | no_license | yang1992816/java-project | 83e17f6c7ca200cf138b776aadba4d05a1e6b64e | 330fc830c04b11df0c3e0996085d687e16582f9a | refs/heads/master | 2020-03-22T09:24:31.162806 | 2017-12-07T15:59:23 | 2017-12-07T15:59:23 | 139,835,268 | 1 | 0 | null | 2018-07-05T10:44:33 | 2018-07-05T10:44:33 | null | UTF-8 | Java | false | false | 4,005 | java | package com.example.java.test;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.concurrent.TimeUnit;
/**
* Created by Administrator on 2016/10/29.
*/
public class Test {
public static int i=0;
public static int testtest(){
try {
i=10;
System.out.println("try");
return i;
}finally {
i=100;
System.out.println("finally: " + i);
}
}
@org.junit.Test
public void test1(){
System.out.println("test:"+ testtest());
System.out.println(i);
}
public static class Fruit{
}
public static class Apple extends Fruit{
}
public static void main(String[] args) {
List<Fruit> list = new ArrayList<>();
list.add(new Apple());
}
/**
* 测试 start()方法和 run()方法
*/
@org.junit.Test
public void array(){
System.out.println("thread1");
Thread my = new Thread(new Runnable() {
@Override
public void run() {
try {
TimeUnit.MICROSECONDS.sleep(20);
} catch (InterruptedException e) {
e.printStackTrace();
}
System.out.println("thread3");
}
});
my.run();
System.out.println("thread2");
}
/**
* 测试 start()方法和 run()方法
*/
@org.junit.Test
public void tttt(){
System.out.println("thread1");
Thread my = new Thread(new Runnable() {
@Override
public void run() {
try {
TimeUnit.MICROSECONDS.sleep(20);
} catch (InterruptedException e) {
e.printStackTrace();
}
System.out.println("thread3");
}
});
my.start();
System.out.println("thread2");
}
@org.junit.Test
public void main(){
int[] a1 = new int[22];
List<String> list = new ArrayList<>();
String str1 = "11111";
String str2 = "11111";
if(str1==str2){
System.out.println(str1.hashCode());
}
str2="22222" ;
System.out.println(str1.equals(str2));
}
/**
* 测试transient关键字
*/
@org.junit.Test
public void mainnnn() {
Obj o = new Obj();
o.setDate(new Date());
o.setClassValue(11);
o.setTe(333);
Obj.staticValue=20;
try {
ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(new File("hello")));
out.writeObject(o);
out.close();
} catch (IOException e) {
e.printStackTrace();
}
Obj o1=null;
try {
ObjectInputStream in = new ObjectInputStream(new FileInputStream(new File("hello")));
o1 = (Obj)in.readObject();
in.close();
} catch (Exception e) {
e.printStackTrace();
}
System.out.println(o1.classValue);
System.out.println(o1.getTe());
System.out.println((o1.date == null ? "date is null"
: "date is not null"));
}
@org.junit.Test
public void test0(){
System.out.println(Runtime.getRuntime().availableProcessors());
}
@org.junit.Test
public void testClass() throws ClassNotFoundException {
System.out.println(Test.class.getName());
Class test = Class.forName("test.Test");
System.out.println(test.getName());
}
}
| [
"1849491904@qq.com"
] | 1849491904@qq.com |
1d50121c0c7247802fb2c76f8c9db18118458b2c | d3a52e06c80d9bd6f43c6771f24d2e83cfb23e60 | /Project Code/Spring_AOP/src/com/jason/a_scope/Test_Scope.java | eba206d46acf72e56d45fd852dcefbd8da7ded20 | [] | no_license | MyCookie513/Study-Notes | 19bb656ab7842b736a25306e33057cbbc79581f5 | e60862b1b1da6bcb2e85756df00530410a4122fd | refs/heads/master | 2022-12-22T05:53:00.256934 | 2019-07-14T13:21:49 | 2019-07-14T13:22:24 | 182,103,173 | 1 | 0 | null | 2022-12-16T05:55:15 | 2019-04-18T14:30:07 | CSS | GB18030 | Java | false | false | 1,084 | java | package com.jason.a_scope;
import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class Test_Scope {
/*singleton
* 默认为单实例模式,只创建一次
* com.jason.a_scope.UserService_实现类@4386f16
* com.jason.a_scope.UserService_实现类@4386f16
*
* prototype多实例模式
* com.jason.a_scope.UserService_实现类@3c22fc4c
* com.jason.a_scope.UserService_实现类@460d0a57
*/
@Test
void demo01() {
//从spring容器中获得
//1.获得容器
String xmlpath="com/jason/a_scope/Beans.xml";
ApplicationContext applicationcontext =new ClassPathXmlApplicationContext(xmlpath);
//2.获得内容---不需要自己new都是从spring容器中获得
UserService_实现类 user=(UserService_实现类) applicationcontext.getBean("userServiceID");
UserService_实现类 user0=(UserService_实现类) applicationcontext.getBean("userServiceID");
System.out.println(user);
System.out.println(user0);
}
}
| [
"893943814@qq.com"
] | 893943814@qq.com |
2d2dda38d0406550a3fb2e6a54879ba436da8040 | e9211c893c32526467d64495ba5eae2cf83cd457 | /core/src/debug/java/org/softwarefm/eclipse/composite/ClassAndMethodCompositeUnit.java | fc7920d2f96d3202fcd557b12a9582eef66b510b | [] | no_license | phil-rice/SoftwareFm | bdb3041d2af3ca56728c931dc922528757d6e0f7 | 995be93cb64cea50f4d7b40068488a4c3e655310 | refs/heads/master | 2021-01-11T07:37:35.940434 | 2013-03-26T08:48:39 | 2013-03-26T08:48:39 | 2,391,087 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 757 | java | package org.softwarefm.core.composite;
import java.util.Map;
import org.eclipse.swt.widgets.Composite;
import org.softwarefm.core.SoftwareFmContainer;
import org.softwarefm.utilities.functions.IFunction2;
public class ClassAndMethodCompositeUnit<C extends SoftwareFmComposite> {
@SuppressWarnings("unused")
public static void main(String[] args) {
new SoftwareFmCompositeUnit<ClassAndMethodComposite>(ClassAndMethodComposite.class.getSimpleName(), new IFunction2<Composite, SoftwareFmContainer<Map<String, Object>>, ClassAndMethodComposite>() {
public ClassAndMethodComposite apply(Composite parent, SoftwareFmContainer<Map<String, Object>> container) throws Exception {
return new ClassAndMethodComposite(parent, container);
}
});
}
}
| [
"phil.rice@iee.org"
] | phil.rice@iee.org |
9441ab699f8730233cd98f40e4113147f55ba258 | 7e41614c9e3ddf095e57ae55ae3a84e2bdcc2844 | /development/workspace(helios)/repository/src/com/gentleware/poseidon/dsldeltaengine/gen/DslGenActivationProfileDEFeaturedComponent.java | b23c7e0ee8acf0db01322d96309c9c262f86c9f3 | [] | no_license | ygarba/mde4wsn | 4aaba2fe410563f291312ffeb40837041fb143ff | a05188b316cc05923bf9dee9acdde15534a4961a | refs/heads/master | 2021-08-14T09:52:35.948868 | 2017-11-15T08:02:31 | 2017-11-15T08:02:31 | 109,995,809 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,486 | java | package com.gentleware.poseidon.dsldeltaengine.gen;
import java.util.HashMap;
import java.util.Map;
import com.gentleware.poseidon.deltaengine.base.Deltas;
import com.gentleware.poseidon.deltaengine.base.IDeltas;
import org.eclipse.emf.ecore.EObject;
import com.gentleware.poseidon.dsl.wsn.*;
import com.gentleware.poseidon.dsldeltaengine.AbstractDEComponent;
import com.gentleware.poseidon.repository.SemanticElementManager;
import com.gentleware.poseidon.diagrams.gen.base.DslGenElementRoles;
/*
* This code is generated. All the hand-written changes will be lost.
*/
public class DslGenActivationProfileDEFeaturedComponent extends
AbstractDEComponent {
private Map<String, Map<String, Deltas>> featuresOfType = new HashMap<String, Map<String, Deltas>>();
public DslGenActivationProfileDEFeaturedComponent(EObject subject) {
super(subject);
}
public IDeltas getDeltas(String ownerRole, String childRole) {
super.getDeltas(ownerRole, childRole);
Map<String, Deltas> featuresForGivenOwner = featuresOfType
.get(ownerRole);
if (featuresForGivenOwner != null) {
Deltas deltas = featuresForGivenOwner.get(childRole);
if (deltas != null) {
return deltas;
}
}
return super.getDeltas(ownerRole, childRole);
}
public void initialiseDeltas() {
}
@Override
public boolean isNamespace() {
if (getSubject() != null) {
return SemanticElementManager.getInstance().isElementANamespace(
getSubject());
}
return super.isNamespace();
}
}
| [
"ygarba@gmail.com"
] | ygarba@gmail.com |
d3be9be3b7e9f0c3bfa822714d8975a512a9ed32 | 4a8d38b862cb0e9b40a816bfedefed8e1f524c05 | /app/src/main/java/anuson/komkid/permitgeographypro/Menu_farmer_3.java | 59d3f3e951177c7ff1dfafe95f790d9a7e5951ac | [] | no_license | masterUNG/PGP | 4064a144cf3bf41f2688787515a3dcf62a301911 | 8826f199a7efc2247edc9be22c94a9a2c37f6b3a | refs/heads/master | 2021-01-12T11:03:38.911093 | 2016-11-04T03:48:26 | 2016-11-04T03:48:26 | 72,807,689 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 308 | java | package anuson.komkid.permitgeographypro;
import android.app.Activity;
import android.os.Bundle;
public class Menu_farmer_3 extends Activity{
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.menu_farmer_3);
}
}
| [
"phrombutr@gmail.com"
] | phrombutr@gmail.com |
787bb3ca8e865644dd89c181b7fe1ca6b5e883fb | 78e340dda73697b4c7e32ac346f116b61c981226 | /src/org/dmd/dmt/shared/generated/types/adapters/DmtMultiValuedRequiredPartPrimitiveMVAdapter.java | ab5a19310c1fdbd8e345d4ce784ed8b109d1b178 | [] | no_license | dark-matter-org/dark-matter-data | 451e7b9da3ae34d94deb4084d462b887d1624da9 | b2e9bc79a6a8162651672871e2c7ccdf47a642e7 | refs/heads/master | 2023-05-25T00:47:44.782732 | 2023-05-19T17:15:06 | 2023-05-19T17:15:06 | 46,194,282 | 4 | 0 | null | 2023-05-19T17:15:07 | 2015-11-14T22:17:39 | Java | UTF-8 | Java | false | false | 1,685 | java | package org.dmd.dmt.shared.generated.types.adapters;
import org.dmd.dmc.presentation.DmcAdapterIF;
import org.dmd.dmc.DmcAttribute;
import org.dmd.dmc.DmcAttributeInfo;
import org.dmd.dms.generated.types.DmcTypeModifierMV;
import org.dmd.dmt.shared.generated.types.DmcTypeDmtMultiValuedRequiredPartPrimitiveMV;
@SuppressWarnings("serial")
// org.dmd.dms.util.AdapterFormatter.dumpAdapter(AdapterFormatter.java:59)
// Called from: org.dmd.dms.util.AdapterFormatter.dumpAdapterMV(AdapterFormatter.java:16)
public class DmtMultiValuedRequiredPartPrimitiveMVAdapter extends DmcTypeDmtMultiValuedRequiredPartPrimitiveMV implements DmcAdapterIF {
transient DmcTypeDmtMultiValuedRequiredPartPrimitiveMV existingValue;
public DmtMultiValuedRequiredPartPrimitiveMVAdapter(DmcAttributeInfo ai){
super(ai);
}
public void setEmpty(){
value = null;
}
public boolean hasValue(){
if (value == null)
return(false);
return(true);
}
public void resetToExisting() {
if (existingValue == null)
value = null;
else
value = existingValue.getMVCopy();
}
public void setExisting(DmcAttribute<?> attr) {
existingValue = (DmcTypeDmtMultiValuedRequiredPartPrimitiveMV) attr;
if (existingValue != null)
value = existingValue.getMVCopy();
}
public boolean valueChanged(){
return(valueChangedMV(existingValue, this));
}
public void addMods(DmcTypeModifierMV mods){
addModsMV(mods, existingValue, this);
}
public DmcAttribute<?> getExisting() {
return(existingValue);
}
public Object getValue() {
return(value);
}
}
| [
"pstrong99@gmail.com"
] | pstrong99@gmail.com |
e9559eea3e0c8dcb48afefac74f469273d8a3bc9 | 2dd9189a6b381d874688df29c7fce0e2e370034d | /java/squeek/earliestofgames/filters/IFilter.java | b0d10189aea820214609e70bebf6a6801154d803 | [
"Unlicense"
] | permissive | squeek502/EarliestOfGames | 8ab1722baa1e5558a18d3c749eec5b0af60d08d2 | 4d2c4864f3d0cd8fa184e5287cbdca5f0c91cb3a | refs/heads/master | 2021-01-15T17:40:59.645246 | 2014-06-21T07:18:43 | 2014-06-21T07:18:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 831 | java | package squeek.earliestofgames.filters;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.Fluid;
import squeek.earliestofgames.helpers.FluidHelper;
public abstract class IFilter
{
public boolean passesFilter(ItemStack item)
{
if (item == null)
return false;
if (Block.getBlockFromItem(item.getItem()).getMaterial().isLiquid())
return passesFilter(FluidHelper.getFluidTypeOfBlock(Block.getBlockFromItem(item.getItem())));
return false;
}
public boolean passesFilter(Fluid fluid)
{
return true;
}
public boolean passesFilter(Entity entity)
{
if (entity instanceof EntityItem)
return passesFilter(((EntityItem) entity).getEntityItem());
return false;
}
}
| [
"squeek502@hotmail.com"
] | squeek502@hotmail.com |
80f609823c048062b6567b082524257149e776cc | 8114043b58416a6852fb54b355e689b6970c654b | /api/src/main/java/org/picketlink/idm/spi/IdentityStoreConfiguration.java | 12b6c9548ee58926f96b38cee8a3c469db53307c | [] | no_license | picketlink/picketlink-idm-restored | 4121c9310fe5ef728618cf263f4739e80bad3197 | f841edbeaf1ed52f34d7670d8b3605d03b78a1e0 | refs/heads/master | 2021-01-16T20:37:09.770523 | 2012-10-24T18:36:36 | 2012-10-24T18:36:36 | 6,076,169 | 0 | 0 | null | 2016-05-11T11:59:45 | 2012-10-04T14:03:27 | Java | UTF-8 | Java | false | false | 1,222 | java | /*
* JBoss, Home of Professional Open Source.
* Copyright 2012, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.picketlink.idm.spi;
/**
* Represents a configuration for {@link IdentityStore}
*
* @author anil saldhana
* @since Sep 6, 2012
*/
public abstract class IdentityStoreConfiguration {
} | [
"pigor.craveiro@gmail.com"
] | pigor.craveiro@gmail.com |
52e04a6c45299f78d66e789076a895effcb34062 | b45673f501ca7c891c8109a714cdf01cde455430 | /AOOP/src/lab03_DecoratorPattern_7/DisplayDecorator.java | 825389f4a333de3a27118b69b8dd55c1cd827cab | [] | no_license | kmdngmn/DesignPattern | 1e9afed125d412727b2a85470fcd7e5b2380ffda | 03bcf957eb10022d6c525d80eb1d0e2bebb5c660 | refs/heads/master | 2020-11-25T20:09:59.117899 | 2019-12-23T02:24:50 | 2019-12-23T02:24:50 | 228,822,817 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 217 | java | package lab03_DecoratorPattern_7;
import javax.swing.*;
public abstract class DisplayDecorator extends Display {
DisplayDecorator(Display display, int width, int height) {
super(width, height);
}
}
| [
"enfkdla@gmail.com"
] | enfkdla@gmail.com |
740a3337bb70d307d6b47074312b4eb2564282fc | 606ec2bc78c77038b229dca63f708520ae4d32e0 | /src/main/java/com/github/abigail830/ecommerce/ordercontext/domain/order/InventoryProxy.java | 59a5362bb1da74ee2b5dee2b1be994caee4db444 | [] | no_license | abigail830/order-service | 07315bdad34bfc5ff33631f0a9d7cf2ce81be089 | c2f4b03f0c2760bada4dafe5b16e82e266d5a1e8 | refs/heads/master | 2023-06-22T23:59:11.877078 | 2020-10-02T03:44:47 | 2020-10-02T03:44:47 | 272,586,655 | 2 | 1 | null | 2023-06-14T22:30:06 | 2020-06-16T02:02:31 | Java | UTF-8 | Java | false | false | 268 | java | package com.github.abigail830.ecommerce.ordercontext.domain.order;
import com.github.abigail830.ecommerce.ordercontext.domain.order.model.OrderItem;
import java.util.List;
public interface InventoryProxy {
void reduceProductInventory(List<OrderItem> items);
}
| [
"abigail830@163.com"
] | abigail830@163.com |
b1eccf3f6b465590d8d15c350c9327ff4106373f | eebe7ea49de7cccdb44b6ec1d56e79d4ec3726e3 | /2019.06/2019.06.16 - AtCoder Beginner Contest 130/DEnoughArray.java | ef3f48b814132d7b73f96d125b71157a5e5d46f5 | [] | no_license | m1kit/cc-archive | 6dfbe702680230240491a7af4e7ad63f372df312 | 66ba7fb9e5b1c61af4a016f800d6c90f6f594ed2 | refs/heads/master | 2021-06-28T21:54:02.658741 | 2020-09-08T09:38:58 | 2020-09-08T09:38:58 | 150,690,803 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 871 | java | package dev.mikit.atcoder;
import dev.mikit.atcoder.lib.io.LightScanner;
import dev.mikit.atcoder.lib.io.LightWriter;
import dev.mikit.atcoder.lib.debug.Debug;
public class DEnoughArray {
private static final int MOD = (int) 1e9 + 7;
public void solve(int testNumber, LightScanner in, LightWriter out) {
// out.setBoolLabel(LightWriter.BoolLabel.YES_NO_FIRST_UP);
int n = in.ints();
long k = in.longs();
long[] a = in.longs(n);
int r = 0;
long sum = 0;
long ans = 0;
for (int l = 0; l < n; l++) {
if (l > 0) sum -= a[l - 1];
while (r < n && sum < k) {
sum += a[r++];
}
//System.out.println("l="+l + " r="+r + " sum="+sum);
if (sum < k) break;
ans += n - r + 1;
}
out.ans(ans).ln();
}
}
| [
"mikihito0906@gmail.com"
] | mikihito0906@gmail.com |
060568e3bb1c4966271bae03111cbf22a1dc5018 | 00d0086829b1017a440f1e5001994c9bb031ca26 | /app/src/main/java/com/datalife/datalife/model/LoginModel.java | 3c5bb0689503c5c7b475029f4b6948b0891704e9 | [] | no_license | lilinkun/DataLife | ac9a33ec9ee60029539b1f02071a584b15f17281 | 6ddf4c0303921f1efc47e9b82d219dd3e043ab33 | refs/heads/master | 2022-09-17T01:25:35.183761 | 2020-05-29T06:58:23 | 2020-05-29T06:58:23 | 267,791,912 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,690 | java | package com.datalife.datalife.model;
import android.content.Context;
import android.content.Intent;
import com.datalife.datalife.app.ProApplication;
import com.datalife.datalife.activity.RegisterActivity;
import com.datalife.datalife.base.BaseModel;
import com.datalife.datalife.bean.LoginBean;
import com.datalife.datalife.exception.ApiException;
import com.datalife.datalife.subscriber.CommonSubscriber;
import com.datalife.datalife.transformer.CommonTransformer;
/**
* Created by LG on 2018/1/15.
*/
public class LoginModel extends BaseModel {
private boolean isLogin = false;
public boolean login(String account, String pwd,String SessionId, final InfoHint infoHint){
if (infoHint == null)
throw new RuntimeException("InfoHint不能为空");
/*httpService.login(account,pwd).compose(new CommonTransformer<LoginBean>()).subscribe(new CommonSubscriber<LoginBean>(ProApplication.getmContext()) {
@Override
public void onNext(LoginBean loginBean) {
isLogin = true;
infoHint.successInfo(loginBean.getToken());
}
protected void onError(ApiException e) {
super.onError(e);
isLogin = false;
infoHint.failInfo(e.message);
}
});*/
return isLogin;
}
public void register(Context context){
Intent intent = new Intent();
intent.setClass(context, RegisterActivity.class);
context.startActivity(intent);
}
//通过接口产生信息回调
public interface InfoHint {
void successInfo(String str);
void failInfo(String str);
}
}
| [
"294561531@qq.com"
] | 294561531@qq.com |
5695c25bd86285f9700042968911d3a842e7596e | d28e8dfeb459816fa2afd4180442e2e05e36a603 | /src/main/java/sam/bookmark/app/BookmarkTree.java | 160c33eb228015d5f6330790ba71b51bd746d6a8 | [] | no_license | naaspati-practicing/StorURLHelper | d8a84466304554a7ea53774d16bdad64d93f0708 | 6d51b1d89b0185d7fcf612badc7261b85249fa48 | refs/heads/master | 2020-05-15T23:10:54.461160 | 2019-04-21T17:20:15 | 2019-04-21T17:20:15 | 182,545,870 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,328 | java | package sam.bookmark.app;
import javax.inject.Inject;
import javax.inject.Provider;
import javax.inject.Singleton;
import javafx.application.Platform;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.scene.control.TreeItem;
import javafx.scene.control.TreeView;
import sam.bookmark.model.Category;
import sam.bookmark.view.right.UrlsView;
import sam.nopkg.EnsureSingleton;
import sam.sql.sqlite.SQLiteDB;
import sam.thread.DelayedActionThread;
@Singleton
public class BookmarkTree extends TreeView<String> implements ChangeListener<TreeItem<String>> {
private static final EnsureSingleton singleton = new EnsureSingleton();
{ singleton.init(); }
private final UrlsView urls;
private final DelayedActionThread<TreeItem<String>> delay = new DelayedActionThread<>(300, d -> change(d));
@Inject
public BookmarkTree(UrlsView urls) {
this.urls = urls;
setShowRoot(false);
getSelectionModel().selectedItemProperty().addListener(this);
}
private void change(TreeItem<String> d) {
Platform.runLater(() -> {
urls.set((Category) d);
System.out.println("selected: "+d);
});
}
@Override
public void changed(ObservableValue<? extends TreeItem<String>> observable, TreeItem<String> oldValue,
TreeItem<String> newValue) {
delay.queue(newValue);
}
}
| [
"naaspati@gmail.com"
] | naaspati@gmail.com |
0d4ca84d82c331d628e12d88b63b69df9cc02c87 | 2237284b360d62863cb0c6c7059801488e3c9ecd | /library/src/main/java/com/tlw/swing/MSearchExample.java | ec3f46c65e6a5560c5cdba190b65873627af97be | [] | no_license | tlw-ray/j2se | d7f044244f684a19c6efc9183eafcbb606ef0e70 | 5b58a7f834ed769fc39cf444df133ced58a10dbe | refs/heads/master | 2021-01-19T06:41:01.840398 | 2020-11-03T05:44:58 | 2020-11-03T05:44:58 | 15,003,680 | 7 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,963 | java | package com.tlw.swing;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.BoxLayout;
import javax.swing.JCheckBox;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JSpinner;
import javax.swing.SpinnerNumberModel;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
/*******************************
Author:唐力伟
E-Mail:tlw_ray@163.com
Date:2008-10-27
Description:MSearch的所有功能的例子
********************************/
public class MSearchExample extends JPanel {
private static final long serialVersionUID = 1L;
public static void main(String[] args) {
MSearchExample comp=new MSearchExample();
JFrame f=new JFrame();
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.getContentPane().add(comp,"Center");
f.setLocationRelativeTo(null);
f.pack();
f.setVisible(true);
}
MSearch ms=new MSearch();
JCheckBox jckDropDownMode=new JCheckBox("【弹出|固定】模式");
JCheckBox jckFilterMode=new JCheckBox("【过滤|导航】模式");
SpinnerNumberModel jspinModel=new SpinnerNumberModel(8,3,15,1);
JSpinner jspinnerRows=new JSpinner(jspinModel);
public MSearchExample(){
ms.setItems(new String[]{"aaa","aab","aac","W3.UNIT1.E0003","W3.UNIT1.E0004","W3.UNIT1.E0005"});
//当按回车时,输出当前文本框内的内容。
ms.setActionPerform(new ActionListener(){
public void actionPerformed(ActionEvent e) {
JOptionPane.showMessageDialog(null, ms.getText());
System.out.println(ms.getText());
}
});
//设置是否下拉模式
jckDropDownMode.setSelected(ms.getIsDropDown());
jckDropDownMode.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
ms.setIsDropDownModel(jckDropDownMode.isSelected());
}
});
//设置过滤模式或者索引模式
jckFilterMode.setSelected(ms.getIsFilterMode());
jckFilterMode.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
ms.setIsFilter(jckFilterMode.isSelected());
}
});
//设置下拉行数
jspinnerRows.setPreferredSize(new Dimension(20,20));
jspinnerRows.setMaximumSize(new Dimension(150,20));
jspinnerRows.setToolTipText("drop down item count.");
jspinnerRows.addChangeListener(new ChangeListener(){
public void stateChanged(ChangeEvent e) {
int rowCount=jspinModel.getNumber().intValue();
ms.setRows(rowCount);
}
});
//初始化界面
JPanel paneLeft=new JPanel();
Dimension leftSize=new Dimension(200,100);
paneLeft.setPreferredSize(leftSize);
BoxLayout lm=new BoxLayout(paneLeft,BoxLayout.Y_AXIS);
paneLeft.setLayout(lm);
paneLeft.add(jckDropDownMode);
paneLeft.add(jckFilterMode);
paneLeft.add(jspinnerRows);
setLayout(new BorderLayout());
add(ms,"Center");
add(paneLeft,"West");
}
}
| [
"tlw_ray@163.com"
] | tlw_ray@163.com |
3967328f87ae7e53213eb9e4ff0e57122c3d26b9 | 2ea250da5ffc6d8d30ea1717ea9ac4da456a3afa | /kodilla-exception/src/main/java/com/kodilla/exception/test/FirstChallenge.java | ada55d50f16a1bb634ab987dbdb2c0b7c85b70de | [] | no_license | psobow/patryk-sobow-kodilla-java | 3711941b40b8b1878ce5a4ef369a8fc91dbaaf8a | ab59f2993b55a5cea85905377bdf5be25cbd0d77 | refs/heads/master | 2020-03-24T21:27:05.623267 | 2019-06-08T14:46:49 | 2019-06-30T00:27:17 | 143,033,125 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 779 | java | package com.kodilla.exception.test;
public class FirstChallenge {
public double divide(double a, double b) throws ArithmeticException {
if(b == 0){
throw new ArithmeticException();
}
return a / b;
}
/**
* This main can throw an ArithmeticException!!!
* @param args
*/
public static void main(String[] args) {
FirstChallenge firstChallenge = new FirstChallenge();
try {
double result = firstChallenge.divide(3, 0);
System.out.println(result);
} catch (ArithmeticException e) {
System.out.println(" Can not divide by zero: " + e);
} finally {
System.out.println(" This message will display in each case. ");
}
}
} | [
"patryk.sobow95@gmail.com"
] | patryk.sobow95@gmail.com |
9882a2c70e2df81cc40dade992d6609068c144f9 | 8afa4e982384b9a85bcf4fbe716c8db9c0be14d7 | /performance/us/kbase/workspace/performance/shockclient/SaveAndGetFromShock.java | 5fe3f7359a101e2031c39f352d51e0cdcd060b85 | [
"MIT"
] | permissive | Tianhao-Gu/workspace_deluxe | ca90557a3ff025f44ac89b3332fef7f9ad0b7f4a | 02217e4d63da8442d9eed6611aaa790f173de58e | refs/heads/master | 2020-03-24T19:45:35.405174 | 2019-08-20T19:00:11 | 2019-08-20T19:00:11 | 142,943,539 | 0 | 0 | MIT | 2018-07-31T00:53:18 | 2018-07-31T00:53:18 | null | UTF-8 | Java | false | false | 1,890 | java | package us.kbase.workspace.performance.shockclient;
import static us.kbase.workspace.performance.utils.Utils.makeString;
import static us.kbase.workspace.performance.utils.Utils.printElapse;
import java.io.ByteArrayInputStream;
import java.net.URL;
import java.util.LinkedList;
import java.util.List;
import org.apache.commons.io.output.NullOutputStream;
import us.kbase.auth.AuthService;
import us.kbase.auth.AuthToken;
import us.kbase.shock.client.BasicShockClient;
import us.kbase.shock.client.ShockNode;
import us.kbase.shock.client.ShockNodeId;
public class SaveAndGetFromShock {
// public static final String SHOCK_URL = "http://localhost:7044";
// public static final String SHOCK_URL = "https://ci.kbase.us/services/shock-api";
public static final String SHOCK_URL = "https://kbase.us/services/shock-api";
public static final int COUNT = 1000;
public static final int FILE_SIZE = 400;
public static void main(String[] args) throws Exception {
final String strtoken = args[0];
final String contents = makeString(FILE_SIZE);
final AuthToken token = AuthService.validateToken(strtoken);
final BasicShockClient bsc = new BasicShockClient(new URL(SHOCK_URL), token);
final byte[] conbytes = contents.getBytes();
final List<String> ids = new LinkedList<>();
final long presave = System.nanoTime();
for (int i = 0; i < COUNT; i++) {
final ByteArrayInputStream bais = new ByteArrayInputStream(conbytes);
final ShockNode node = bsc.addNode(bais, "foo", "text");
ids.add(node.getId().getId());
}
double elapsed = printElapse("shock load", presave);
System.out.println((elapsed / COUNT) + " sec / node");
final long preget = System.nanoTime();
for (final String id: ids) {
bsc.getFile(new ShockNodeId(id), new NullOutputStream());
}
elapsed = printElapse("shock get", preget);
System.out.println((elapsed / COUNT) + " sec / node");
}
}
| [
"gaprice@lbl.gov"
] | gaprice@lbl.gov |
b4bf203eee7cd4bf8538cb41bb611f3122ebddee | ed3cb95dcc590e98d09117ea0b4768df18e8f99e | /project_1_2/src/b/d/b/g/Calc_1_2_13161.java | d9036f75fab59cf9b6266a625f1c8b161de336e5 | [] | 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 | 134 | java | package b.d.b.g;
public class Calc_1_2_13161 {
/** @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 |
cfc9b29d62c08d6a06f6e7a2ea755287cdd47d9d | 6ec9caf8b818619a72554cc2be378d65d6c5f876 | /yzxf-core/src/main/java/com/zq/kyb/core/dao/LockService.java | d3a349fc1bbe7b07c9fe20e8814113d1af9a1b28 | [] | no_license | gaoChaoSS/shanrenshiji | 6dc511c322fa8ebb2346df72057fad859e2c9210 | d78019a1726bc9244620e01b3e88791a51e1cd14 | refs/heads/master | 2022-10-16T12:49:32.826615 | 2019-12-18T02:23:42 | 2019-12-18T02:23:42 | 228,738,871 | 0 | 0 | null | 2022-10-04T23:55:58 | 2019-12-18T02:14:05 | Java | UTF-8 | Java | false | false | 549 | java | package com.zq.kyb.core.dao;
/**
* 用于通数据锁服务,保证写数据时避免脏数据
*/
public interface LockService {
/**
* 获取锁
*
* @param key
* @return
*/
boolean getLock(String key);
/**
* 阻塞当前线程的方式获取锁
*
* @param key
* @param timeOutSeconds 超时时间
*/
void whileGetLock(String key, int timeOutSeconds) throws InterruptedException, Exception;
/**
* 释放锁
*
* @param key
*/
void unLock(String key);
}
| [
"1198940389@qq.com"
] | 1198940389@qq.com |
91b1039822a236890b69ab957aaed22632fb4152 | 3f42d48aca25d2f011d8f68e575006138ab086bd | /csccrt-system/src/main/java/com/qx/ipa/domain/IpaTask.java | df04d4214d677cce212bb046c552757b3b30d036 | [] | no_license | xsdo/shrz | fc6e2128b28d2fa0880a8e43b90383e75dc2bc04 | e0c0ac25713b4704a8170a23402b20ab99a69dfc | refs/heads/master | 2023-06-29T09:23:44.703733 | 2021-08-05T07:11:50 | 2021-08-05T07:11:50 | 391,006,464 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,805 | java | package com.qx.ipa.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.qx.common.annotation.Excel;
import com.qx.common.core.domain.BaseEntity;
/**
* 智能化心身调节任务对象 ipa_task
*
* @author qx
* @date 2021-07-05
*/
public class IpaTask extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 任务ID */
private Long taskId;
/** 测评人ID */
@Excel(name = "测评人ID")
private Long userId;
/** 测评人姓名 */
@Excel(name = "测评人姓名")
private String userName;
/** 患者ID */
@Excel(name = "患者ID")
private Long patientId;
/** 患者名称 */
@Excel(name = "患者名称")
private String patientName;
/** 工作站 */
@Excel(name = "工作站")
private String workstation;
/** 测试编码 */
@Excel(name = "测试编码")
private String testCoding;
/** 测评任务 */
@Excel(name = "测评任务")
private String typeids;
/** 任务状态(1未开始,2进行中,3已结束) */
@Excel(name = "任务状态(1未开始,2进行中,3已结束)")
private String taskStatus;
/** 是否删除(0存在,1删除) */
private String delFlag;
/** 已完成量表 */
@Excel(name = "已完成量表")
private String scaleId;
/** 任务所属系统(0新冠 1量表) **/
@Excel(name = "任务所属类型")
private String typeFlag;
/** 查询任务名称字段 **/
private String typeNames;
/** 测评任务天数 */
private String day;
public String getDay() {
return day;
}
public void setDay(String day) {
this.day = day;
}
public String getTypeNames() {
return typeNames;
}
public void setTypeNames(String typeNames) {
this.typeNames = typeNames;
}
public void setTaskId(Long taskId)
{
this.taskId = taskId;
}
public Long getTaskId()
{
return taskId;
}
public void setUserId(Long userId)
{
this.userId = userId;
}
public Long getUserId()
{
return userId;
}
public void setUserName(String userName)
{
this.userName = userName;
}
public String getUserName()
{
return userName;
}
public void setPatientId(Long patientId)
{
this.patientId = patientId;
}
public Long getPatientId()
{
return patientId;
}
public void setPatientName(String patientName)
{
this.patientName = patientName;
}
public String getPatientName()
{
return patientName;
}
public void setWorkstation(String workstation)
{
this.workstation = workstation;
}
public String getWorkstation()
{
return workstation;
}
public void setTestCoding(String testCoding)
{
this.testCoding = testCoding;
}
public String getTestCoding()
{
return testCoding;
}
public void setTypeids(String typeids)
{
this.typeids = typeids;
}
public String getTypeids()
{
return typeids;
}
public void setTaskStatus(String taskStatus)
{
this.taskStatus = taskStatus;
}
public String getTaskStatus()
{
return taskStatus;
}
public void setDelFlag(String delFlag)
{
this.delFlag = delFlag;
}
public String getDelFlag()
{
return delFlag;
}
public void setScaleId(String scaleId)
{
this.scaleId = scaleId;
}
public String getScaleId()
{
return scaleId;
}
public void setTypeFlag(String typeFlag)
{
this.typeFlag = typeFlag;
}
public String getTypeFlag()
{
return typeFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("taskId", getTaskId())
.append("userId", getUserId())
.append("userName", getUserName())
.append("patientId", getPatientId())
.append("patientName", getPatientName())
.append("workstation", getWorkstation())
.append("testCoding", getTestCoding())
.append("typeids", getTypeids())
.append("taskStatus", getTaskStatus())
.append("delFlag", getDelFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("scaleId", getScaleId())
.append("typeFlag", getTypeFlag())
.toString();
}
}
| [
"31725552@qq.com"
] | 31725552@qq.com |
5f40e385bcb1cc5413409d4901fbdf2968697af8 | b9c6b0c5a34d55ffe9e43e2a1275b09b3b1ed9d8 | /src-gen/main/java/net/opengis/citygml/texturedsurface/_2/TexturedSurfaceType.java | 2961b0da0ef346012c5e6e1caa99e10c72153e08 | [
"LGPL-3.0-only",
"Apache-2.0"
] | permissive | nls-jajuko/citygml4j | c0d2051218ab9eca97915668901cd7435d4aefc3 | ebbd22846e4ab36140b72fe76500af2cc9901b9e | refs/heads/master | 2021-11-19T16:00:00.899899 | 2021-09-25T15:52:28 | 2021-09-25T15:52:28 | 235,549,623 | 0 | 0 | Apache-2.0 | 2020-01-22T10:28:25 | 2020-01-22T10:28:24 | null | UTF-8 | Java | false | false | 3,592 | java | //
// Diese Datei wurde mit der JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.2 generiert
// Siehe <a href="https://javaee.github.io/jaxb-v2/">https://javaee.github.io/jaxb-v2/</a>
// Änderungen an dieser Datei gehen bei einer Neukompilierung des Quellschemas verloren.
// Generiert: 2019.02.03 um 11:14:53 PM CET
//
package net.opengis.citygml.texturedsurface._2;
import java.util.ArrayList;
import java.util.List;
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 net.opengis.gml.OrientableSurfaceType;
/**
* Deprecated since CityGML version 0.4.0. Use the concepts of the CityGML Appearance module instead. The
* concept of positioning textures on surfaces complies with the standard X3D. Because there has been no appropriate
* texturing concept in GML3, CityGML adds the class TexturedSurface to the geometry model of GML 3. A texture is specified
* as a raster image referenced by an URI, and can be an arbitrary resource, even in the internet. Textures are positioned by
* employing the concept of texture coordinates, i.e. each texture coordinate matches with exactly one 3D coordinate of the
* TexturedSurface. The use of texture coordinates allows an exact positioning and trimming of the texture on the surface
* geometry. Each surface may be assigned one or more appearances, each refering to one side of the surface.
*
*
* <p>Java-Klasse für TexturedSurfaceType complex type.
*
* <p>Das folgende Schemafragment gibt den erwarteten Content an, der in dieser Klasse enthalten ist.
*
* <pre>
* <complexType name="TexturedSurfaceType">
* <complexContent>
* <extension base="{http://www.opengis.net/gml}OrientableSurfaceType">
* <sequence>
* <element ref="{http://www.opengis.net/citygml/texturedsurface/2.0}appearance" maxOccurs="unbounded"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "TexturedSurfaceType", propOrder = {
"appearance"
})
public class TexturedSurfaceType
extends OrientableSurfaceType
{
@XmlElement(required = true)
protected List<AppearancePropertyType> appearance;
/**
* Gets the value of the appearance property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the appearance property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAppearance().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link AppearancePropertyType }
*
*
*/
public List<AppearancePropertyType> getAppearance() {
if (appearance == null) {
appearance = new ArrayList<AppearancePropertyType>();
}
return this.appearance;
}
public boolean isSetAppearance() {
return ((this.appearance!= null)&&(!this.appearance.isEmpty()));
}
public void unsetAppearance() {
this.appearance = null;
}
public void setAppearance(List<AppearancePropertyType> value) {
this.appearance = value;
}
}
| [
"cnagel@virtualcitysystems.de"
] | cnagel@virtualcitysystems.de |
37b8e98452aad37fa1780c36ffe61ebe5077b7cb | 6c9fbb7e83b671671a2f951371c06aa3694cdcc3 | /adscms/src/main/java/org/broadleafcommerce/cms/file/domain/StaticAssetStorage.java | f3a0319d680f617edc40ca4aab027235b89a6c1e | [] | no_license | buchiramreddy/ActiveDiscounts | 19aeca79cfdc8902d1a58d48b24f5591d68a8d95 | d71f900ded641ab7404df9a19241f60b03ae58bf | refs/heads/master | 2021-05-27T10:16:54.107132 | 2013-11-06T19:12:04 | 2013-11-06T19:12:04 | 11,724,930 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,277 | java | /*
* Copyright 2008-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.broadleafcommerce.cms.file.domain;
import java.sql.Blob;
/**
* Created by IntelliJ IDEA. User: jfischer Date: 9/8/11 Time: 8:15 PM To change this template use File | Settings |
* File Templates.
*
* @author $author$
* @version $Revision$, $Date$
*/
public interface StaticAssetStorage {
//~ Methods ----------------------------------------------------------------------------------------------------------
/**
* DOCUMENT ME!
*
* @return DOCUMENT ME!
*/
Long getStaticAssetId();
//~ ------------------------------------------------------------------------------------------------------------------
/**
* DOCUMENT ME!
*
* @param staticAssetId DOCUMENT ME!
*/
void setStaticAssetId(Long staticAssetId);
//~ ------------------------------------------------------------------------------------------------------------------
/**
* DOCUMENT ME!
*
* @return DOCUMENT ME!
*/
Blob getFileData();
//~ ------------------------------------------------------------------------------------------------------------------
/**
* DOCUMENT ME!
*
* @return DOCUMENT ME!
*/
Long getId();
//~ ------------------------------------------------------------------------------------------------------------------
/**
* DOCUMENT ME!
*
* @param fileData DOCUMENT ME!
*/
void setFileData(Blob fileData);
//~ ------------------------------------------------------------------------------------------------------------------
/**
* DOCUMENT ME!
*
* @param id DOCUMENT ME!
*/
void setId(Long id);
} // end interface StaticAssetStorage
| [
"bchittepu@cmcagile.com"
] | bchittepu@cmcagile.com |
bab40dc204f694d1f810ef70609a6b0f80ca5a82 | 8d8c374728cab4e7ebe3754e7793c8f10c5b473a | /src/config/TwoProfileConfig.java | d749437c83e703489b6c7530ddf47de1ce7a6ac1 | [] | no_license | ipipip1735/Spring | bb6338541796ec73ef544d1c84e56fe7609923ce | ace7831a8a1018c1a913c59859c9952b41520448 | refs/heads/master | 2021-07-12T18:27:30.815573 | 2020-09-09T21:58:09 | 2020-09-09T21:58:09 | 202,509,055 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 501 | java | package config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
/**
* Created by Administrator on 2019/9/10 17:37.
*/
@Configuration
@Profile("default")
public class TwoProfileConfig {
@Bean
public OneBean oneBean() {
System.out.println("~~" + getClass().getSimpleName() + ".oneBean~~");
System.out.println(this);
return new OneBean();
}
}
| [
"ipipip1735@163.com"
] | ipipip1735@163.com |
b949c2c33fc73a146c1c63cfdf2723e4da3dd211 | 9f262284abcd2f31d8987f3137cd023b28be5de6 | /app/src/main/java/ua/r4mstein/moviedbdemo/modules/genres/GenresPresenter.java | 3690b72bb23615c0e4b7512fa0775a1403ab9b01 | [] | no_license | r4mstein/MovieDBDemo | 4531f571d96e40e24195bdd52c83f3c7f553e917 | f15e84f745d381078cd1be3a17cb6bd6d983bb63 | refs/heads/master | 2020-04-05T14:02:49.644089 | 2017-07-04T11:22:36 | 2017-07-04T11:22:36 | 94,750,417 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,290 | java | package ua.r4mstein.moviedbdemo.modules.genres;
import ua.r4mstein.moviedbdemo.data.models.response.GenreMovieModel;
import ua.r4mstein.moviedbdemo.data.providers.GenreProvider;
import ua.r4mstein.moviedbdemo.modules.base.BaseFragmentPresenter;
import ua.r4mstein.moviedbdemo.modules.base.FragmentView;
import ua.r4mstein.moviedbdemo.modules.films.by_genre.MoviesByGenreFragment;
import ua.r4mstein.moviedbdemo.utills.Logger;
import static ua.r4mstein.moviedbdemo.utills.Constants.API_KEY;
public class GenresPresenter extends BaseFragmentPresenter<GenresPresenter.GenresView> {
private GenreProvider mGenreProvider = new GenreProvider();
@Override
public void onViewCreated() {
super.onViewCreated();
getGenres();
}
private void getGenres() {
execute(mGenreProvider.getGenreMovieList(API_KEY),
genreMovieModel -> getView().showResult(genreMovieModel),
throwable -> Logger.d(throwable.getMessage()));
}
public GenresActionListener getGenresActionListener() {
return id -> GenresPresenter.this.getRouter().replaceFragment(MoviesByGenreFragment.newInstance(id), false);
}
interface GenresView extends FragmentView {
void showResult(GenreMovieModel genreMovieModel);
}
}
| [
"r4mstein@ukr.net"
] | r4mstein@ukr.net |
2d53c80ec5c342557d83ed1449417b76a76a48f6 | 96d71f73821cfbf3653f148d8a261eceedeac882 | /external/decompiled/blackberry/bb (4)/decompiled/WhatsApp-29/com/whatsapp/client/FunXMPP$Connection$11.java | ef56b223037c684bd62a2324fe2a19d770129c48 | [] | no_license | JaapSuter/Niets | 9a9ec53f448df9b866a8c15162a5690b6bcca818 | 3cc42f8c2cefd9c3193711cbf15b5304566e08cb | refs/heads/master | 2020-04-09T19:09:40.667155 | 2012-09-28T18:11:33 | 2012-09-28T18:11:33 | 5,751,595 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,091 | java | // #######################################################
// Decompiled by : coddec
// Module : WhatsApp-16.cod
// Module version : 2.7.3204
// Class ID : 6
// ########################################################
package com.whatsapp.client;
abstract final class FunXMPP$Connection$11 extends com.whatsapp.client.FunXMPP$IqResultHandler
{
// @@@@@@@@@@@@@ Fields
private final com.whatsapp.client.FunXMPP$Connection /*module:WhatsApp-17.class#0*/ field_56324 ; // ofs = 56324 addr = 0)
// @@@@@@@@@@@@@ Static routines
<init>( com.whatsapp.client.FunXMPP$Connection$11, module:WhatsApp-17.class#0 ); // address: 0
{
enter_narrow
aload_0
invokespecial_lib .routine_10568 // pc=1
aload_0
aload_1
putfield .field_0_ // get_name_1: .field_0_ // get_name_2: .field_0_ // get_Name: .field_0_ // getName->1: null // getName->2: null // getName->N: null // ofs = -1 ord = 0 addr = 0
return
}
// @@@@@@@@@@@@@ Virtual routines
public final parse( com.whatsapp.client.FunXMPP$Connection$11, module:WhatsApp-18.class#3, java.lang.String ); // address: 0
{
enter
aload_1
iconst_0
invokenonvirtual_lib .routine_3076 // pc=2
astore_3
aload_3
ldc literal_632:"dirty"
invokestatic_lib module:WhatsApp-18.class#3.routine_3392( ) // class#3
aload_0_getfield .field_0_ // get_name_1: .field_0_ // get_name_2: .field_0_ // get_Name: .field_0_ // getName->1: null // getName->2: null // getName->N: null // ofs = -1 ord = 0 addr = 0
aload_3
invokespecial_lib .routine_8554 // pc=2
astore_4
aload_0_getfield .field_0_ // get_name_1: .field_0_ // get_name_2: .field_0_ // get_Name: .field_0_ // getName->1: null // getName->2: null // getName->N: null // ofs = -1 ord = 0 addr = 0
getfield .field_6_6 // get_name_1: .field_6_6 // get_name_2: .field_6_6 // get_Name: .field_6_6 // getName->1: null // getName->2: null // getName->N: null // ofs = -1 ord = 0 addr = 6
aload_4
invokeinterface interfacemethodref_96 // pc=2 guess=1
return
}
}
| [
"git@jaapsuter.com"
] | git@jaapsuter.com |
1f9eb5cd735ad18c9327915685bfcec57b18a4e7 | 866d73b0913835c201da71cc3f615ba9655996c8 | /src/com/orte/pluralsight/javagenerics/LegacyCode.java | ebf46cfb4aa6821d26f7f028681e2af76317c4d9 | [] | no_license | Orte82/JastApp | 471e633611df3c66c5b95df8c6b71bb285f82422 | 2d40932b692af9b6b122fd4733cf644971cfd222 | refs/heads/master | 2020-07-29T09:48:58.058765 | 2019-09-20T09:16:25 | 2019-09-20T09:16:25 | 209,751,648 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 694 | java | package com.orte.pluralsight.javagenerics;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class LegacyCode {
public static void main(String[] args) {
// backward compatibility is ensured in Java
// Raw type => usage a generic types without generic parameters
// introduce runtime errors and unsafe scenarios in code
List list = new ArrayList<>();
list.add("abc");
list.add(1);
list.add(new Object());
Iterator iterator = list.iterator();
while (iterator.hasNext()){
final Object element = iterator.next();
System.out.println(element);
}
}
}
| [
"kortes29@gmail.com"
] | kortes29@gmail.com |
f44b8b179f386f2de16c4b5d9dd628d3c8f28e5b | dafdbbb0234b1f423970776259c985e6b571401f | /allbinary_src/ViewsJavaLibraryM/src/main/java/views/generic/order/history/OrderHistoryView.java | 07d070736d2dd36a1f5b521bfaea50acdac881e0 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | biddyweb/AllBinary-Platform | 3581664e8613592b64f20fc3f688dc1515d646ae | 9b61bc529b0a5e2c647aa1b7ba59b6386f7900ad | refs/heads/master | 2020-12-03T10:38:18.654527 | 2013-11-17T11:17:35 | 2013-11-17T11:17:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,350 | java | /*
* AllBinary Open License Version 1
* Copyright (c) 2011 AllBinary
*
* By agreeing to this license you and any business entity you represent are
* legally bound to the AllBinary Open License Version 1 legal agreement.
*
* You may obtain the AllBinary Open License Version 1 legal agreement from
* AllBinary or the root directory of AllBinary's AllBinary Platform repository.
*
* Created By: Travis Berthelot
*
*/
package views.generic.order.history;
import abcs.logic.communication.log.LogFactory;
import java.util.Iterator;
import java.util.Vector;
import javax.servlet.http.HttpServletRequest;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import abcs.logic.communication.log.LogUtil;
import allbinary.data.tree.dom.ModDomHelper;
import allbinary.data.tables.user.commerce.inventory.order.OrderHistoryEntity;
import allbinary.globals.GLOBALS;
import allbinary.business.user.commerce.inventory.order.OrderData;
import allbinary.business.user.commerce.inventory.order.OrderHistory;
import allbinary.business.user.commerce.inventory.order.OrderHistoryData;
import allbinary.data.tree.dom.DomNodeInterface;
import allbinary.logic.visual.transform.info.TransformInfoInterface;
import views.business.context.modules.storefront.HttpStoreComponentView;
public class OrderHistoryView
extends HttpStoreComponentView
implements DomNodeInterface
{
private HttpServletRequest request;
private String shipped;
private String partiallyShipped;
private String processing;
private String preprocessing;
private String cancelled;
public OrderHistoryView(TransformInfoInterface transformInfoInterface) throws Exception
{
super(transformInfoInterface);
this.request = (HttpServletRequest) this.getPageContext().getRequest();
this.preprocessing = request.getParameter(OrderHistoryData.PREPROCESSINGNAME);
this.shipped = request.getParameter(OrderHistoryData.SHIPPEDNAME);
this.partiallyShipped = request.getParameter(OrderHistoryData.PARTIALLYSHIPPEDNAME);
this.processing = request.getParameter(OrderHistoryData.PROCESSINGNAME);
this.cancelled = request.getParameter(OrderHistoryData.CANCELLEDNAME);
}
public Node toXmlNode(Document document) throws Exception
{
try
{
Node node = document.createElement(OrderData.ORDERS);
OrderHistoryEntity orderHistoryEntity = new OrderHistoryEntity();
//Note all generic views should be removed from admin pages because a user
//could pass in false hidden data
Vector orderReviewVector =
orderHistoryEntity.getOrders(
this.getWeblisketSession().getUserName());
Iterator iter = orderReviewVector.iterator();
while(iter.hasNext())
{
OrderHistory orderHistory = (OrderHistory) iter.next();
Node orderHistoryNode = orderHistory.toXmlNode(document);
Node orderNode = document.createElement(orderHistory.getPaymentMethod());
node.appendChild(orderHistory.toXmlNode(document));
}
if(abcs.logic.communication.log.config.type.LogConfigTypes.LOGGING.contains(abcs.logic.communication.log.config.type.LogConfigType.VIEW))
{
LogUtil.put(LogFactory.getInstance("Attempt to View a users order history",this,"view"));
}
node.appendChild(ModDomHelper.createNameValueNodes(document,
OrderHistoryData.PREPROCESSINGNAME,
OrderHistoryData.PREPROCESSING));
node.appendChild(ModDomHelper.createNameValueNodes(document,
OrderHistoryData.PROCESSINGNAME,
OrderHistoryData.PROCESSING));
node.appendChild(ModDomHelper.createNameValueNodes(document,
OrderHistoryData.CANCELLEDNAME,
OrderHistoryData.CANCELLED));
node.appendChild(ModDomHelper.createNameValueNodes(document,
OrderHistoryData.PARTIALLYSHIPPEDNAME,
OrderHistoryData.PARTIALLYSHIPPED));
node.appendChild(ModDomHelper.createNameValueNodes(document,
OrderHistoryData.SHIPPEDNAME,
OrderHistoryData.SHIPPED));
node.appendChild(ModDomHelper.createNameValueNodes(document,
GLOBALS.VIEWNAME,
GLOBALS.VIEW));
return node;
}
catch(Exception e)
{
if(abcs.logic.communication.log.config.type.LogConfigTypes.LOGGING.contains(
abcs.logic.communication.log.config.type.LogConfigType.XSLLOGGINGERROR))
{
LogUtil.put(LogFactory.getInstance("Command Failed",this,"toXmlNode",e));
}
throw e;
}
}
public void addDomNodeInterfaces()
{
this.addDomNodeInterface((DomNodeInterface) this);
}
public String view() throws Exception
{
try
{
this.addDomNodeInterfaces();
return super.view();
}
catch(Exception e)
{
String error = "Failed to view Order History";
if(abcs.logic.communication.log.config.type.LogConfigTypes.LOGGING.contains(abcs.logic.communication.log.config.type.LogConfigType.TAGHELPERERROR))
{
LogUtil.put(LogFactory.getInstance(error,this,"view()",e));
}
throw e;
}
}
}
| [
"travisberthelot@hotmail.com"
] | travisberthelot@hotmail.com |
b9c59a081986d0823a709bbc14f51526fa9d4366 | d072cdf8b1d1c3987e8591641f1e2a1fe22a7114 | /springmail/src/main/java/com/example/springmail/controller/MailController.java | e501795976211a362c9046bb8b2047c629121c7e | [] | no_license | Lysenko96/SimpleExamples | a9f4ff972dfca11974556e1b1e471d3faab88c64 | 1caaae6854780edfe058afe5a531ffa2629b5c98 | refs/heads/master | 2023-09-01T00:17:10.403681 | 2023-08-31T14:52:59 | 2023-08-31T14:52:59 | 249,872,187 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 639 | java | package com.example.springmail.controller;
import com.example.springmail.service.MailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
@Controller
public class MailController {
private MailService mailService;
@Autowired
public MailController(MailService mailService) {
this.mailService = mailService;
}
@GetMapping("/email")
public String sendMail(){
mailService.sendMailMessage("anton.lysenko.info@gmail.com", "subject", "text");
return "send";
}
}
| [
"anton.lys96@gmail.com"
] | anton.lys96@gmail.com |
e51827c0d002ef500c377bc93ecde07c800b5d19 | b327a374de29f80d9b2b3841db73f3a6a30e5f0d | /out/host/linux-x86/obj/EXECUTABLES/vm-tests_intermediates/main_files/dot/junit/opcodes/iput_char/Main_testN2.java | 996643e1802ca90f37313b93e36077198a35f369 | [] | no_license | nikoltu/aosp | 6409c386ed6d94c15d985dd5be2c522fefea6267 | f99d40c9d13bda30231fb1ac03258b6b6267c496 | refs/heads/master | 2021-01-22T09:26:24.152070 | 2011-09-27T15:10:30 | 2011-09-27T15:10:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 414 | java | //autogenerated by util.build.BuildDalvikSuite, do not change
package dot.junit.opcodes.iput_char;
import dot.junit.opcodes.iput_char.d.*;
import dot.junit.*;
public class Main_testN2 extends DxAbstractMain {
public static void main(String[] args) throws Exception {
T_iput_char_12 t = new T_iput_char_12();
assertEquals(0, t.st_i1);
t.run();
assertEquals(77, t.st_i1);
}
}
| [
"fred.faust@gmail.com"
] | fred.faust@gmail.com |
b0771723fb12bdfc264c23cfe2fc279d47a7f480 | de3c2d89f623527b35cc5dd936773f32946025d2 | /src/main/java/com/jiayouya/travel/databinding/DialogResurgenceBindingImpl.java | b0650ac9672612ee3522a121e603cf1a299e352d | [] | no_license | ren19890419/lvxing | 5f89f7b118df59fd1da06aaba43bd9b41b5da1e6 | 239875461cb39e58183ac54e93565ec5f7f28ddb | refs/heads/master | 2023-04-15T08:56:25.048806 | 2020-06-05T10:46:05 | 2020-06-05T10:46:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,082 | java | package com.jiayouya.travel.databinding;
import android.util.SparseIntArray;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import androidx.databinding.DataBindingComponent;
import com.jiayouya.travel.R;
import ezy.p653ui.widget.round.RoundText;
public class DialogResurgenceBindingImpl extends DialogResurgenceBinding {
/* renamed from: c */
private static final IncludedLayouts f10612c = null;
/* renamed from: d */
private static final SparseIntArray f10613d = new SparseIntArray();
/* renamed from: e */
private final LinearLayout f10614e;
/* renamed from: f */
private long f10615f;
/* access modifiers changed from: protected */
public boolean onFieldChange(int i, Object obj, int i2) {
return false;
}
public boolean setVariable(int i, Object obj) {
return true;
}
static {
f10613d.put(R.id.btn, 1);
f10613d.put(R.id.iv_close, 2);
}
public DialogResurgenceBindingImpl(DataBindingComponent dataBindingComponent, View view) {
this(dataBindingComponent, view, mapBindings(dataBindingComponent, view, 3, f10612c, f10613d));
}
private DialogResurgenceBindingImpl(DataBindingComponent dataBindingComponent, View view, Object[] objArr) {
super(dataBindingComponent, view, 0, (RoundText) objArr[1], (ImageView) objArr[2]);
this.f10615f = -1;
this.f10614e = objArr[0];
this.f10614e.setTag(null);
setRootTag(view);
invalidateAll();
}
public void invalidateAll() {
synchronized (this) {
this.f10615f = 1;
}
requestRebind();
}
public boolean hasPendingBindings() {
synchronized (this) {
if (this.f10615f != 0) {
return true;
}
return false;
}
}
/* access modifiers changed from: protected */
public void executeBindings() {
synchronized (this) {
long j = this.f10615f;
this.f10615f = 0;
}
}
}
| [
"593746220@qq.com"
] | 593746220@qq.com |
044cdd17b8e80508544209ff4da4df5a2548e2b4 | 0197e9c4d93cf32f961abcdfedd8ad1239a2ce66 | /app/src/main/java/com/lefuorgn/widget/tree/adapter/TreeListViewAdapter.java | dc324103da959f0425b2909eeceebacbcf0037b2 | [] | no_license | afailer/lefuOrg | fbcd37cfa42ac02875907458c6ac032be52fe12d | 8facb4d4f87164356da26c61babe118f36b0e836 | refs/heads/master | 2020-05-15T11:08:09.445145 | 2019-04-19T06:17:10 | 2019-04-19T06:17:10 | 182,212,171 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,085 | java | package com.lefuorgn.widget.tree.adapter;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.lefuorgn.AppContext;
import com.lefuorgn.widget.tree.bean.Node;
import com.lefuorgn.widget.tree.util.TreeHelper;
import java.util.ArrayList;
import java.util.List;
public abstract class TreeListViewAdapter<T> extends BaseQuickAdapter<Node> {
/**
* 存储所有的Node
*/
protected List<Node> mAllNodes;
/**
* 点击的回调接口
*/
private OnTreeNodeClickListener onTreeNodeClickListener;
public interface OnTreeNodeClickListener {
void onClick(Node node, View view, int position);
}
public void setOnTreeNodeClickListener(
OnTreeNodeClickListener onTreeNodeClickListener) {
this.onTreeNodeClickListener = onTreeNodeClickListener;
}
/**
*
* @param mTree
* @param datas
* @param defaultExpandLevel
* 默认展开几级树
* @throws IllegalArgumentException
* @throws IllegalAccessException
*/
public TreeListViewAdapter(int layoutResId, RecyclerView mTree, List<T> datas,
int defaultExpandLevel) throws IllegalArgumentException,
IllegalAccessException {
super(layoutResId, new ArrayList<Node>());
/**
* 对所有的Node进行排序
*/
mAllNodes = TreeHelper.getSortedNodes(datas, defaultExpandLevel);
/**
* 过滤出可见的Node
*/
mTree.setLayoutManager(new LinearLayoutManager(AppContext.getInstance()));
mTree.setAdapter(this);
/**
* 设置节点点击时,可以展开以及关闭;并且将ItemClick事件继续往外公布
*/
setOnRecyclerViewItemClickListener(new OnRecyclerViewItemClickListener() {
@Override
public void onItemClick(View view, int position) {
Node node = (Node) getData().get(position);
expandOrCollapse(node);
if (onTreeNodeClickListener != null) {
onTreeNodeClickListener.onClick(node, view, position);
}
}
});
setNewData(TreeHelper.filterVisibleNode(mAllNodes));
}
/**
* 相应ListView的点击事件 展开或关闭某节点
*/
public void expandOrCollapse(Node node) {
if (!node.isLeaf()) {
node.setExpand(!node.isExpand());
setNewData(TreeHelper.filterVisibleNode(mAllNodes));
}
}
/**
* 获取所有的节点信息
* @return
*/
protected List<Node> getAllNodes() {
if(mAllNodes == null) {
new ArrayList<Node>();
}
return mAllNodes;
}
@Override
protected void convert(BaseViewHolder baseViewHolder, Node node) {
View convertView = baseViewHolder.getConvertView();
// 设置内边距
convertView.setPadding(node.getLevel() * 30, 3, 3, 3);
setConvertView(baseViewHolder, node);
}
protected abstract void setConvertView(BaseViewHolder holder, Node node);
}
| [
"liuting@chuangxin.com"
] | liuting@chuangxin.com |
e80570a7323e85ca0b9e3985524254e70410742e | 5b18912685a4638f3363ce3333dd2722170b90c8 | /src/hashing/medium/FibonacciSubSequence.java | 8d5b56092b62f5c6e1864c125cf2cc60f1bc99ae | [] | no_license | Poorvankbhatia/Leetcode | adfa7f8ff787cafd8cb43f87b043b272229c95f1 | dbe2fe65a69cda182d3b759565f8077fe3de27a0 | refs/heads/master | 2022-12-18T14:45:23.911905 | 2022-12-12T09:03:59 | 2022-12-12T09:03:59 | 66,108,432 | 12 | 6 | null | null | null | null | UTF-8 | Java | false | false | 1,825 | java | /*
A sequence X_1, X_2, ..., X_n is fibonacci-like if:
n >= 3
X_i + X_{i+1} = X_{i+2} for all i + 2 <= n
Given a strictly increasing array A of positive integers forming a sequence, find the length of the longest fibonacci-like
subsequence of A. If one does not exist, return 0.
(Recall that a subsequence is derived from another sequence A by deleting any number of elements (including none) from A,
without changing the order of the remaining elements. For example, [3, 5, 8] is a subsequence of [3, 4, 5, 6, 7, 8].)
Example 1:
Input: [1,2,3,4,5,6,7,8]
Output: 5
Explanation:
The longest subsequence that is fibonacci-like: [1,2,3,5,8].
Example 2:
Input: [1,3,7,11,12,14,18]
Output: 3
Explanation:
The longest subsequence that is fibonacci-like:
[1,11,12], [3,11,14] or [7,11,18].
*/
package hashing.medium;
import java.util.HashSet;
import java.util.Set;
/**
* Created by poorvank.b on 22/07/18.
*/
public class FibonacciSubSequence {
public int lenLongestFibSubseq(int[] A) {
int n = A.length;
Set<Integer> set = new HashSet<>();
for (int a : A) {
set.add(a);
}
int res=0;
for(int i=0;i<n;i++) {
for(int j=i+1;j<n;j++) {
int a = A[i];
int b = A[j];
int ans=2;
while (set.contains(a+b)) {
int temp = b;
b=a+b;
a=temp;
ans++;
}
res = Math.max(res,ans);
}
}
return res==2?0:res;
}
}
/*
Time Complexity: O(N^2 log M) where N is the length of A, and M is the maximum value of A.
Since the values grow exponentially,
the amount of numbers needed to accommodate a sequence
that ends in a number M is at most log(M).
*/
| [
"puravbhatia9@gmail.com"
] | puravbhatia9@gmail.com |
845f06bf32f90b7c3e6b74bc0c578f0ac9c381ee | fce1e3fe1e35dee4482b07198fb08033b9c32ef6 | /com/google/android/gms/maps/model/C0330a.java | 18a7026a164b7026ffe92ab9c71d7d20b416dd75 | [] | no_license | Ravinther/andriodprojecttodolist | cae041a692ab2ac0ffae6461921b151803313754 | 34a35ea0c72e69c070e9e565c2d8988b098b8019 | refs/heads/master | 2021-01-09T20:19:54.676431 | 2016-08-07T08:06:04 | 2016-08-07T08:06:04 | 65,122,650 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 668 | java | package com.google.android.gms.maps.model;
import android.os.Parcel;
import com.google.android.gms.common.internal.safeparcel.C0153b;
/* renamed from: com.google.android.gms.maps.model.a */
public class C0330a {
static void m1153a(CameraPosition cameraPosition, Parcel parcel, int i) {
int p = C0153b.m244p(parcel);
C0153b.m242c(parcel, 1, cameraPosition.getVersionCode());
C0153b.m230a(parcel, 2, cameraPosition.target, i, false);
C0153b.m225a(parcel, 3, cameraPosition.zoom);
C0153b.m225a(parcel, 4, cameraPosition.tilt);
C0153b.m225a(parcel, 5, cameraPosition.bearing);
C0153b.m222D(parcel, p);
}
}
| [
"m.ravinther@yahoo.com"
] | m.ravinther@yahoo.com |
e1ca14434a2b98e2d3b083320f8c8715585328ba | ef49256a2847b4ffcf399c52c137c82ea0d425d2 | /src/main/java/br/com/votacao/api/v1/controller/PautaController.java | f9a170dae730278662961a097ebf6decd10ff83a | [] | no_license | lucasbarrossantos/votacao | ca3e5f82bbcaa9845784322537045c2db5a25f33 | bc9d64005c644eff73f438f6ef915a0a1432f210 | refs/heads/main | 2023-02-17T19:14:45.129077 | 2021-01-18T03:22:08 | 2021-01-18T03:22:08 | 330,525,438 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,394 | java | package br.com.votacao.api.v1.controller;
import br.com.votacao.api.v1.mapper.PautaMapper;
import br.com.votacao.api.v1.model.PautaDTO;
import br.com.votacao.domain.model.Pauta;
import br.com.votacao.domain.service.PautaService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
@RestController
@RequestMapping(path = "/v1/pautas", produces = MediaType.APPLICATION_JSON_VALUE)
@Api(value = "PautaController")
public class PautaController {
@Autowired
private PautaMapper pautaMapper;
@Autowired
private PautaService pautaService;
@ApiOperation(value = "Salvar uma pauta")
@ResponseStatus(HttpStatus.CREATED)
@PostMapping
public PautaDTO salvar(@RequestBody @Valid PautaDTO pautaDTO) {
Pauta pautaSsalva = pautaService.salvar(pautaMapper.toPauta(pautaDTO));
return pautaMapper.toPautaDTO(pautaSsalva);
}
@ApiOperation(value = "Abrir sessão para uma nova votação")
@ResponseStatus(HttpStatus.CREATED)
@PostMapping("/{pautaId}/abrir-sessao")
public void abrirSessao(@PathVariable("pautaId") Long pautaId) {
pautaService.abrirSessao(pautaId);
}
}
| [
"lucas-barros28@hotmail.com"
] | lucas-barros28@hotmail.com |
afba00a79347610341df75a53c8839f7a14b612a | 84fbc1625824ba75a02d1777116fe300456842e5 | /Engagement_Challenges/Engagement_2/snapbuddy_1/source/com/jhlabs/image/GaussianFilter.java | f8e8f553ffdc967f735eb9cd1f4f697d90effca1 | [
"Apache-2.0"
] | permissive | unshorn-forks/STAC | bd41dee06c3ab124177476dcb14a7652c3ddd7b3 | 6919d7cc84dbe050cef29ccced15676f24bb96de | refs/heads/master | 2023-03-18T06:37:11.922606 | 2018-04-18T17:01:03 | 2018-04-18T17:01:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,808 | java | /*
Copyright 2006 Jerry Huxtable
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.jhlabs.image;
import java.awt.image.*;
/**
* A filter which applies Gaussian blur to an image. This is a subclass of ConvolveFilter
* which simply creates a kernel with a Gaussian distribution for blurring.
* @author Jerry Huxtable
*/
public class GaussianFilter extends ConvolveFilter {
/**
* The blur radius.
*/
protected float radius;
/**
* The convolution kernel.
*/
protected Kernel kernel;
/**
* Construct a Gaussian filter.
*/
public GaussianFilter() {
this(2);
}
/**
* Construct a Gaussian filter.
* @param radius blur radius in pixels
*/
public GaussianFilter(float radius) {
setRadius(radius);
}
/**
* Set the radius of the kernel, and hence the amount of blur. The bigger the radius, the longer this filter will take.
* @param radius the radius of the blur in pixels.
* @min-value 0
* @max-value 100+
* @see #getRadius
*/
public void setRadius(float radius) {
this.radius = radius;
kernel = makeKernel(radius);
}
/**
* Get the radius of the kernel.
* @return the radius
* @see #setRadius
*/
public float getRadius() {
return radius;
}
public BufferedImage filter(BufferedImage src, BufferedImage dst) {
int width = src.getWidth();
int height = src.getHeight();
if (dst == null)
dst = createCompatibleDestImage(src, null);
int[] inPixels = new int[width * height];
int[] outPixels = new int[width * height];
src.getRGB(0, 0, width, height, inPixels, 0, width);
int conditionObj0 = 0;
if (radius > conditionObj0) {
convolveAndTranspose(kernel, inPixels, outPixels, width, height, alpha, alpha && premultiplyAlpha, false, CLAMP_EDGES);
convolveAndTranspose(kernel, outPixels, inPixels, height, width, alpha, false, alpha && premultiplyAlpha, CLAMP_EDGES);
}
dst.setRGB(0, 0, width, height, inPixels, 0, width);
return dst;
}
/**
* Blur and transpose a block of ARGB pixels.
* @param kernel the blur kernel
* @param inPixels the input pixels
* @param outPixels the output pixels
* @param width the width of the pixel array
* @param height the height of the pixel array
* @param alpha whether to blur the alpha channel
* @param edgeAction what to do at the edges
*/
public static void convolveAndTranspose(Kernel kernel, int[] inPixels, int[] outPixels, int width, int height, boolean alpha, boolean premultiply, boolean unpremultiply, int edgeAction) {
float[] matrix = kernel.getKernelData(null);
int cols = kernel.getWidth();
int cols2 = cols / 2;
int conditionObj1 = 255;
int conditionObj2 = 0;
int conditionObj3 = 0;
for (int y = 0; y < height; y++) {
int index = y;
int ioffset = y * width;
for (int x = 0; x < width; x++) {
float r = 0, g = 0, b = 0, a = 0;
int moffset = cols2;
for (int col = -cols2; col <= cols2; col++) {
float f = matrix[moffset + col];
if (f != 0) {
int ix = x + col;
if (ix < conditionObj3) {
if (edgeAction == CLAMP_EDGES)
ix = 0;
else if (edgeAction == WRAP_EDGES)
ix = (x + width) % width;
} else if (ix >= width) {
if (edgeAction == CLAMP_EDGES)
ix = width - 1;
else if (edgeAction == WRAP_EDGES)
ix = (x + width) % width;
}
int rgb = inPixels[ioffset + ix];
int pa = (rgb >> 24) & 0xff;
int pr = (rgb >> 16) & 0xff;
int pg = (rgb >> 8) & 0xff;
int pb = rgb & 0xff;
if (premultiply) {
float a255 = pa * (1.0f / 255.0f);
pr *= a255;
pg *= a255;
pb *= a255;
}
a += f * pa;
r += f * pr;
g += f * pg;
b += f * pb;
}
}
if (unpremultiply && a != conditionObj2 && a != conditionObj1) {
float f = 255.0f / a;
r *= f;
g *= f;
b *= f;
}
int ia = alpha ? PixelUtils.clamp((int) (a + 0.5)) : 0xff;
int ir = PixelUtils.clamp((int) (r + 0.5));
int ig = PixelUtils.clamp((int) (g + 0.5));
int ib = PixelUtils.clamp((int) (b + 0.5));
outPixels[index] = (ia << 24) | (ir << 16) | (ig << 8) | ib;
index += height;
}
}
}
/**
* Make a Gaussian blur kernel.
* @param radius the blur radius
* @return the kernel
*/
public static Kernel makeKernel(float radius) {
int r = (int) Math.ceil(radius);
int rows = r * 2 + 1;
float[] matrix = new float[rows];
float sigma = radius / 3;
float sigma22 = 2 * sigma * sigma;
float sigmaPi2 = 2 * ImageMath.PI * sigma;
float sqrtSigmaPi2 = (float) Math.sqrt(sigmaPi2);
float radius2 = radius * radius;
float total = 0;
int index = 0;
for (int row = -r; row <= r; row++) {
float distance = row * row;
if (distance > radius2)
matrix[index] = 0;
else
matrix[index] = (float) Math.exp(-(distance) / sigma22) / sqrtSigmaPi2;
total += matrix[index];
index++;
}
for (int i = 0; i < rows; i++) matrix[i] /= total;
return new Kernel(rows, 1, matrix);
}
public String toString() {
return "Blur/Gaussian Blur...";
}
}
| [
"jmorgan@cyberpointllc.com"
] | jmorgan@cyberpointllc.com |
aa712acd91bf830005c094bef0f57c02f64ed90b | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/21/21_0ea6e489918581c599e2a73a55d79275b78a8ba4/Runner/21_0ea6e489918581c599e2a73a55d79275b78a8ba4_Runner_s.java | bdc6b0d8129fc6da30eb410da02362b4db95420d | [] | 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 | 530 | java | package com.epam.kharkiv.cdp.oleshchuk.calc;
import com.epam.kharkiv.cdp.oleshchuk.calc.algorithm.ShuntingYard;
import com.epam.kharkiv.cdp.oleshchuk.calc.util.StringUtil;
public class Runner {
public static void main(String[] args) {
try{
String inputString = StringUtil.prepareInputString(args[0]);
Double result = ShuntingYard.calculate(inputString);
System.out.println(result);
} catch (Exception e) {
System.out.println("FAIL");
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
6635dbaac6ea160969170e302d1ff151a6f1d888 | 4b1a45f212b5988ebad3ba60631ecb2812e32824 | /src/test/java/org/fundacionjala/coding/ana/DnaStrandTest.java | eacb2382b254b7c2c6b3fb0e5798eb1b6415a954 | [] | no_license | AT-07/coding | f8def53865bbf499e9f7a1f66a0fa5ea05176d56 | 467868ac1b457ff54164fda0d2a6b612b43f5a1f | refs/heads/develop | 2020-03-19T18:58:51.640333 | 2018-07-10T20:15:17 | 2018-07-10T20:15:17 | 136,834,518 | 1 | 0 | null | 2018-07-10T20:15:19 | 2018-06-10T18:30:00 | Java | UTF-8 | Java | false | false | 978 | java | package org.fundacionjala.coding.ana;
import static org.junit.Assert.assertEquals;
import org.junit.Before;
import org.junit.Test;
/**
* TEST DNA.
*
* @author Ana Maria Mamani Zenteno.
*/
public class DnaStrandTest {
private DnaStrand dnaStrand;
/**
* call of the class DNA.
*/
@Before
public void setUp() {
dnaStrand = new DnaStrand();
}
/**
* test for verify of the complement.
*/
@Test
public void testDnaStrandMakeComplementOnly() {
assertEquals("TTTT", dnaStrand.makeComplement("AAAA"));
}
/**
* test for verify the complement convert.
*/
@Test
public void testDnaStrandMakeComplementConvert() {
assertEquals("TAACG", dnaStrand.makeComplement("ATTGC"));
}
/**
* test for verify with distinct.
*/
@Test
public void testDnaStrandMakeComplementVerifyDistinct() {
assertEquals("CATA", dnaStrand.makeComplement("GTAT"));
}
}
| [
"carledriss@gmail.com"
] | carledriss@gmail.com |
29fdc4b4912195d215d1c0eadba6fcd34d44d10b | ed3cb95dcc590e98d09117ea0b4768df18e8f99e | /project_1_3/src/b/b/f/e/Calc_1_3_11545.java | 1e958234b9d98358ae29cfc12cd5726d1348806c | [] | 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 | 134 | java | package b.b.f.e;
public class Calc_1_3_11545 {
/** @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 |
b1ef3e43fa54e344de08a2b836e7487c4c62acef | 13ef9799e34f6f0e10477a9ac290bcd7e65c1dd9 | /src/net/ruready/common/math/real/RealConstants.java | 5662fa5344fc8847b9e391de5768d2c3086d4a06 | [] | no_license | Shantanu28/rucommon | 9b7c4cae5f8e6e9d5165024091d89a3bd1aaa3cc | 74e22a6242f0030ad282f87c59c612b98e979368 | refs/heads/master | 2021-03-27T11:07:20.858529 | 2016-02-02T07:30:02 | 2016-02-02T07:30:02 | 50,816,376 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,506 | java | /*******************************************************
* Source File: RealConstants.java
*******************************************************/
package net.ruready.common.math.real;
import net.ruready.common.math.highprec.BigRealConstant;
import net.ruready.common.misc.Auxiliary;
import net.ruready.common.misc.Utility;
/**
* Contains useful references to real-valued constants.
*
* @author Nava L. Livne <i><nlivne@aoce.utah.edu></i> Academic Outreach and
* Continuing Education (AOCE) 1901 East South Campus Dr., Room 2197-E
* University of Utah, Salt Lake City, UT 84112
* @author Oren E. Livne <i><olivne@aoce.utah.edu></i> AOCE, Room 2197-E,
* University of Utah University of Utah, Salt Lake City, UT 84112
* (c) 2006-07 Continuing Education , University of Utah . All copyrights reserved. U.S. Patent Pending DOCKET NO. 00846 25702.PROV
* @version Jun 11, 2007
*/
public interface RealConstants extends Auxiliary, Utility
{
// ========================= CONSTANTS =================================
static final double HALF = BigRealConstant.HALF.doubleValue();
static final double THIRD = BigRealConstant.THIRD.doubleValue();
static final double ONE = BigRealConstant.ONE.doubleValue();
static final double MINUS_ONE = BigRealConstant.MINUS_ONE.doubleValue();
static final int[] PRIME = new int[] { 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37 };
static final double TWO = BigRealConstant.TWO.doubleValue();
static final double ZERO = BigRealConstant.ZERO.doubleValue();
static final double REAL_GAMMA = BigRealConstant.BIG_GAMMA.doubleValue();
static final double REAL_E = BigRealConstant.BIG_E.doubleValue();
static final double REAL_PI = BigRealConstant.BIG_PI.doubleValue();
/**
* Square root of 2.
*/
final static double SQRT2 = 1.4142135623730950488016887242096980785696718753769;
/**
* Two times <img border="0" alt="pi" src="doc-files/pi.gif">.
*
* @planetmath Pi
*/
final static double TWO_PI = 6.2831853071795864769252867665590057683943387987502;
/**
* Square root of 2<img border="0" alt="pi" src="doc-files/pi.gif">.
*/
final static double SQRT2PI = 2.5066282746310005024157652848110452530069867406099;
/**
* Natural logarithm of 10.
*/
final static double LOG10 = 2.30258509299404568401799145468436420760110148862877;
/**
* Golden ratio.
*
* @planetmath GoldenRatio
*/
final static double GOLDEN_RATIO = 1.6180339887498948482045868343656381177203091798058;
}
| [
"gurindersingh@xebia.com"
] | gurindersingh@xebia.com |
77fca7e350a04f21d7f45bdcc67d676f0c0e52cd | 6baf1fe00541560788e78de5244ae17a7a2b375a | /hollywood/com.oculus.browser-base/sources/defpackage/C4505r2.java | 60b90a5b44085f26f494e46409b488f96858329d | [] | no_license | phwd/quest-tracker | 286e605644fc05f00f4904e51f73d77444a78003 | 3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba | refs/heads/main | 2023-03-29T20:33:10.959529 | 2021-04-10T22:14:11 | 2021-04-10T22:14:11 | 357,185,040 | 4 | 2 | null | 2021-04-12T12:28:09 | 2021-04-12T12:28:08 | null | UTF-8 | Java | false | false | 1,061 | java | package defpackage;
import java.util.Objects;
/* renamed from: r2 reason: default package and case insensitive filesystem */
/* compiled from: chromium-OculusBrowser.apk-stable-281887347 */
public class C4505r2 implements AbstractC1886bj0 {
public final /* synthetic */ C4676s2 F;
public C4505r2(C4676s2 s2Var) {
this.F = s2Var;
}
@Override // defpackage.AbstractC1886bj0
public void a(C4616ri0 ri0, boolean z) {
if (ri0 instanceof SubMenuC4510r31) {
ri0.k().c(false);
}
AbstractC1886bj0 bj0 = this.F.f11246J;
if (bj0 != null) {
bj0.a(ri0, z);
}
}
@Override // defpackage.AbstractC1886bj0
public boolean b(C4616ri0 ri0) {
if (ri0 == null) {
return false;
}
C4676s2 s2Var = this.F;
int i = ((SubMenuC4510r31) ri0).A.f8568a;
Objects.requireNonNull(s2Var);
AbstractC1886bj0 bj0 = this.F.f11246J;
if (bj0 != null) {
return bj0.b(ri0);
}
return false;
}
}
| [
"cyuubiapps@gmail.com"
] | cyuubiapps@gmail.com |
914fcf9b1902fd1a97156138d8e6cd3991ab4bc6 | 95e944448000c08dd3d6915abb468767c9f29d3c | /sources/com/google/common/base/C17430i.java | fb4c59cba5222a7396f0ed60a64d130c02aa0578 | [] | no_license | xrealm/tiktok-src | 261b1faaf7b39d64bb7cb4106dc1a35963bd6868 | 90f305b5f981d39cfb313d75ab231326c9fca597 | refs/heads/master | 2022-11-12T06:43:07.401661 | 2020-07-04T20:21:12 | 2020-07-04T20:21:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,866 | java | package com.google.common.base;
import java.util.Arrays;
/* renamed from: com.google.common.base.i */
public final class C17430i {
/* renamed from: com.google.common.base.i$a */
public static final class C17432a {
/* renamed from: a */
private final String f48391a;
/* renamed from: b */
private final C17433a f48392b;
/* renamed from: c */
private C17433a f48393c;
/* renamed from: d */
private boolean f48394d;
/* renamed from: com.google.common.base.i$a$a */
static final class C17433a {
/* renamed from: a */
String f48395a;
/* renamed from: b */
Object f48396b;
/* renamed from: c */
C17433a f48397c;
private C17433a() {
}
}
/* renamed from: a */
private C17433a m57946a() {
C17433a aVar = new C17433a();
this.f48393c.f48397c = aVar;
this.f48393c = aVar;
return aVar;
}
public final String toString() {
boolean z = this.f48394d;
String str = "";
StringBuilder sb = new StringBuilder(32);
sb.append(this.f48391a);
sb.append('{');
for (C17433a aVar = this.f48392b.f48397c; aVar != null; aVar = aVar.f48397c) {
Object obj = aVar.f48396b;
if (!z || obj != null) {
sb.append(str);
str = ", ";
if (aVar.f48395a != null) {
sb.append(aVar.f48395a);
sb.append('=');
}
if (obj == null || !obj.getClass().isArray()) {
sb.append(obj);
} else {
String deepToString = Arrays.deepToString(new Object[]{obj});
sb.append(deepToString, 1, deepToString.length() - 1);
}
}
}
sb.append('}');
return sb.toString();
}
/* renamed from: b */
private C17432a m57947b(Object obj) {
m57946a().f48396b = obj;
return this;
}
/* renamed from: a */
public final C17432a mo44919a(Object obj) {
return m57947b(obj);
}
private C17432a(String str) {
this.f48392b = new C17433a();
this.f48393c = this.f48392b;
this.f48394d = false;
this.f48391a = (String) C17439m.m57962a(str);
}
/* renamed from: b */
private C17432a m57948b(String str, Object obj) {
C17433a a = m57946a();
a.f48396b = obj;
a.f48395a = (String) C17439m.m57962a(str);
return this;
}
/* renamed from: a */
public final C17432a mo44920a(String str, double d) {
return m57948b(str, String.valueOf(d));
}
/* renamed from: a */
public final C17432a mo44921a(String str, int i) {
return m57948b(str, String.valueOf(i));
}
/* renamed from: a */
public final C17432a mo44922a(String str, long j) {
return m57948b(str, String.valueOf(j));
}
/* renamed from: a */
public final C17432a mo44923a(String str, Object obj) {
return m57948b(str, obj);
}
}
/* renamed from: a */
public static C17432a m57944a(Object obj) {
return new C17432a(obj.getClass().getSimpleName());
}
/* renamed from: a */
public static <T> T m57945a(T t, T t2) {
if (t != null) {
return t;
}
if (t2 != null) {
return t2;
}
throw new NullPointerException("Both parameters are null");
}
}
| [
"65450641+Xyzdesk@users.noreply.github.com"
] | 65450641+Xyzdesk@users.noreply.github.com |
2ca61bd7300c521c9ac4fff4e9148eaf058e71cd | dea04aa4c94afd38796e395b3707d7e98b05b609 | /Participant results/P9/Interaction-0/ArrayIntList_ES_0_Test.java | d2f442a00b188fa06a7c8f15b868ca4d350038a4 | [] | no_license | PdedP/InterEvo-TR | aaa44ef0a4606061ba4263239bafdf0134bb11a1 | 77878f3e74ee5de510e37f211e907547674ee602 | refs/heads/master | 2023-04-11T11:51:37.222629 | 2023-01-09T17:37:02 | 2023-01-09T17:37:02 | 486,658,497 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 987 | java | /*
* This file was automatically generated by EvoSuite
* Tue Dec 14 12:04:39 GMT 2021
*/
package com.org.apache.commons.collections.primitives;
import org.junit.Test;
import static org.junit.Assert.*;
import com.org.apache.commons.collections.primitives.ArrayIntList;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true)
public class ArrayIntList_ES_0_Test extends ArrayIntList_ES_0_Test_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
ArrayIntList arrayIntList0 = new ArrayIntList();
arrayIntList0.add(0, 1631);
arrayIntList0.add(0, 1631);
int int0 = arrayIntList0.removeElementAt(0);
assertEquals(1, arrayIntList0.size());
assertEquals(1631, int0);
}
}
| [
"pedro@uca.es"
] | pedro@uca.es |
05ef9c40873446ab1c361aa91c00b7aac936e406 | 27af35647ca8a90e9eb26a38f6cee054a9a6e23d | /yun_kuangjia2019/biz3/biz3slbappshouye/src/main/java/com/example/biz3slbappshouye/view/SCategoryView.java | b7c73ac2dbc5b76371873050e95aa77f1eb4bea8 | [] | no_license | geeklx/myappkuangjia20190806 | 6007614bd8e45c53ddc5fcebd47e9f1499236c69 | 8fbfdd0223af16cdc5cfb5434c49b26c41d3958a | refs/heads/master | 2020-06-30T07:37:28.804826 | 2019-08-20T07:09:45 | 2019-08-20T07:09:45 | 200,767,192 | 9 | 2 | null | null | null | null | UTF-8 | Java | false | false | 472 | java | package com.example.biz3slbappshouye.view;
import com.example.biz3slbappshouye.bean.SCategoryBean;
import com.example.biz3slbappshouye.bean.SCategoryBean1;
import com.example.biz3slbappshouye.bean.SListCommBean;
import com.haier.cellarette.libmvp.mvp.IView;
import java.util.List;
public interface SCategoryView extends IView {
void OnCategorySuccess(SCategoryBean bean, String TAG);
void OnCategoryNodata(String bean);
void OnCategoryFail(String msg);
}
| [
"liangxiao@smart-haier.com"
] | liangxiao@smart-haier.com |
d12366be55fd10d0d1df61cf14395eb9f3abd90b | bee5e8d4c3a62f3f3e8e098a2cc5982bafed68f8 | /src/ReplTasks/Repl136.java | d742f146e2deb04ce176e108267c8e0d51549b8a | [] | no_license | raksanao/FirstProject1 | cbb52f58ec4e745ec2602675af2608dd61d3172c | 5e8dceb3cabb231dc5bca569e38d345fcdf38199 | refs/heads/master | 2021-01-14T04:24:16.241248 | 2019-12-22T20:18:51 | 2019-12-22T20:18:51 | 242,596,941 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 552 | java | package ReplTasks;
import java.util.Scanner;
public class Repl136 {
public static void main(String[] args) {
// Given an array of ints, print true
// if the array contains a 5 next to a 5 anywhere
// in the array. If no consecutive 5s or no 5s are
// detected in your code then print false.
Scanner input = new Scanner(System.in);
int[] nums = {input.nextInt(),input.nextInt(),input.nextInt(),input.nextInt(),input.nextInt()};
for (int i = 0; i <nums.length ; i++) {
}
}
}
| [
"rukhshona87@gmail.com"
] | rukhshona87@gmail.com |
201708f5bd18aa0d09ef44095dba6086c9d92d98 | 20eb62855cb3962c2d36fda4377dfd47d82eb777 | /IntroClassJava/dataset/median/93f87bf20be12abd3b52e14015efb6d78b6038d2022e0ab5889979f9c6b6c8c757d6b5a59feae9f8415158057992ae837da76609dc156ea76b5cca7a43a4678b/010/mutations/181/median_93f87bf2_010.java | f5038011e5e80065980705450f0c191601374752 | [] | no_license | ozzydong/CapGen | 356746618848065cce4e253e5d3c381baa85044a | 0ba0321b6b1191443276021f1997833342f02515 | refs/heads/master | 2023-03-18T20:12:02.923428 | 2020-08-21T03:08:28 | 2020-08-21T03:08:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,270 | java | package introclassJava;
class IntObj {
public int value;
public IntObj () {
} public IntObj (int i) {
value = i;
}
}
class FloatObj {
public float value;
public FloatObj () {
} public FloatObj (float i) {
value = i;
}
}
class LongObj {
public long value;
public LongObj () {
} public LongObj (long i) {
value = i;
}
}
class DoubleObj {
public double value;
public DoubleObj () {
} public DoubleObj (double i) {
value = i;
}
}
class CharObj {
public char value;
public CharObj () {
} public CharObj (char i) {
value = i;
}
}
public class median_93f87bf2_010 {
public java.util.Scanner scanner;
public String output = "";
public static void main (String[]args) throws Exception {
median_93f87bf2_010 mainClass = new median_93f87bf2_010 ();
String output;
if (args.length > 0) {
mainClass.scanner = new java.util.Scanner (args[0]);
} else {
mainClass.scanner = new java.util.Scanner (System.in);
}
mainClass.exec ();
System.out.println (mainClass.output);
}
public void exec () throws Exception {
IntObj int1 = new IntObj (), int2 = new IntObj (), int3 = new IntObj ();
output +=
(String.format ("Please enter 3 numbers separated by spaces > "));
int1.value = scanner.nextInt ();
int2.value = scanner.nextInt ();
int3.value = scanner.nextInt ();
if (((int1.value < int2.value) && (int3.value) < (int2.value))
|| ((int1.value < int2.value) && (int1.value > int3.value))) {
output += (String.format ("%d is the median\n", int1.value));
} else if ((((int2.value < int1.value)) && (int2.value > int3.value))
|| ((int2.value < int3.value) && (int2.value > int1.value))) {
output += (String.format ("%d is the median\n", int2.value));
} else if (((int3.value < int1.value) && (int3.value > int2.value))
|| ((int3.value < int2.value) && (int3.value > int1.value))) {
output += (String.format ("%d is the median\n", int3.value));
}
if (true)
return;;
}
}
| [
"justinwm@163.com"
] | justinwm@163.com |
41822708fcde7c8f5879945f2b1b231cb82fd1ee | 35300a9e1a48e5caead1529c34300a99705fba0d | /app/src/main/java/com/cmazxiaoma/mvp/base/BaseOrdinaryActivity.java | 45a7e885d477f95c67622dc4efd8b429f22c85d2 | [] | no_license | cmazxiaoma/mvp | eb73bdf9df282c185c984b83c5144b39e50e801d | c8b240c68c19f30b080f5695ce17614f54b3a182 | refs/heads/master | 2021-01-20T13:03:07.443289 | 2018-05-09T11:51:48 | 2018-05-09T11:51:48 | 90,440,059 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,608 | java | package com.cmazxiaoma.mvp.base;
import android.content.Intent;
import android.graphics.PixelFormat;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.Button;
import com.cmazxiaoma.mvp.R;
/**
* Description: 沉梦昂志
* Data:2017/5/10-15:44
* Author: xiaoma
*/
public abstract class BaseOrdinaryActivity extends AppCompatActivity{
private Button rightArrow,share;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(getLayoutId());
initData();
getWindow().setFormat(PixelFormat.RGBA_8888);
initContentView(savedInstanceState);
if(getSupportActionBar()!=null){
getSupportActionBar().setElevation(0);
getSupportActionBar().hide();
if(isShowCustomActionBar()){
getSupportActionBar().setDisplayShowTitleEnabled(false);
getSupportActionBar().setDisplayShowCustomEnabled(true);
View view=getLayoutInflater().inflate(R.layout.actionbar_share,null);
initActionBarView(view);
getSupportActionBar().setCustomView(view,new ActionBar.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
ActionBar.LayoutParams lp= (ActionBar.LayoutParams) view.getLayoutParams();
lp.gravity= Gravity.HORIZONTAL_GRAVITY_MASK|Gravity.CENTER_HORIZONTAL;
getSupportActionBar().setCustomView(view,lp);
getSupportActionBar().show();
}
}
}
public void startActivity(Class<?> clz,Bundle bundle){
Intent intent=new Intent(this,clz);
intent.putExtras(bundle);
startActivity(intent);
}
public void initActionBarView(View view){
rightArrow= (Button) view.findViewById(R.id.actionbar_share_leftArrow);
share= (Button) view.findViewById(R.id.actionbar_share_share);
rightArrow.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
}
public abstract boolean isShowCustomActionBar();
public abstract void initContentView(Bundle savedInstanceState);
public abstract int getLayoutId();
public abstract void initData();
}
| [
"1363739582@qq.com"
] | 1363739582@qq.com |
b4290c34f2b4f998d3544a2ade770bb12e33d211 | 7cf0f3983be3f98300128ee9aa927d4ef530eca6 | /src/main/java/br/com/swconsultoria/cte/schema_300/cteModalDutoviario/Duto.java | 963778ac81519ecacc376b4f547bb2eafcbe16d5 | [
"MIT"
] | permissive | Samuel-Oliveira/Java_CTe | 9394ed7692c9f504aa891265831da29f2e643735 | 51e95b15a94d0796457f1a0620f37b167096bb76 | refs/heads/master | 2023-09-04T12:35:59.598280 | 2023-08-29T20:28:00 | 2023-08-29T20:28:00 | 82,298,784 | 64 | 42 | MIT | 2023-08-29T20:24:14 | 2017-02-17T13:13:34 | Java | UTF-8 | Java | false | false | 3,216 | java | //
// Este arquivo foi gerado pela Arquitetura JavaTM para Implementação de Referência (JAXB) de Bind XML, v2.2.8-b130911.1802
// Consulte <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Todas as modificações neste arquivo serão perdidas após a recompilação do esquema de origem.
// Gerado em: 2019.09.22 às 07:42:26 PM BRT
//
package br.com.swconsultoria.cte.schema_300.cteModalDutoviario;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Classe Java de anonymous complex type.
*
* <p>O seguinte fragmento do esquema especifica o conteúdo esperado contido dentro desta classe.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="vTar" type="{http://www.portalfiscal.inf.br/cte}TDec_0906Opc" minOccurs="0"/>
* <element name="dIni" type="{http://www.portalfiscal.inf.br/cte}TData"/>
* <element name="dFim" type="{http://www.portalfiscal.inf.br/cte}TData"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"vTar",
"dIni",
"dFim"
})
@XmlRootElement(name = "duto", namespace = "http://www.portalfiscal.inf.br/cte")
public class Duto {
@XmlElement(namespace = "http://www.portalfiscal.inf.br/cte")
protected String vTar;
@XmlElement(namespace = "http://www.portalfiscal.inf.br/cte", required = true)
protected String dIni;
@XmlElement(namespace = "http://www.portalfiscal.inf.br/cte", required = true)
protected String dFim;
/**
* Obtém o valor da propriedade vTar.
*
* @return
* possible object is
* {@link String }
*
*/
public String getVTar() {
return vTar;
}
/**
* Define o valor da propriedade vTar.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setVTar(String value) {
this.vTar = value;
}
/**
* Obtém o valor da propriedade dIni.
*
* @return
* possible object is
* {@link String }
*
*/
public String getDIni() {
return dIni;
}
/**
* Define o valor da propriedade dIni.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setDIni(String value) {
this.dIni = value;
}
/**
* Obtém o valor da propriedade dFim.
*
* @return
* possible object is
* {@link String }
*
*/
public String getDFim() {
return dFim;
}
/**
* Define o valor da propriedade dFim.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setDFim(String value) {
this.dFim = value;
}
}
| [
"samuk.exe@hotmail.com"
] | samuk.exe@hotmail.com |
48ed4758fbfe209637f18d59805c97dbf4a0ade4 | a41b76082aceb1b777c6139dc01ad91e7b165473 | /src/util/XmlWriterTest.java | 9660d6f0c9748fd88bb84d6a201f265cdbb521b3 | [] | no_license | solsila/Fitnesse | 6b424870c931f31f4e4c09a7fa65d210f07f2e62 | cc1e4f0b04fc9da85e900719b924485e373aa92e | refs/heads/master | 2020-06-04T02:11:54.386363 | 2013-10-25T13:25:20 | 2013-10-25T13:25:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,031 | java | // Copyright (C) 2003-2009 by Object Mentor, Inc. All rights reserved.
// Released under the terms of the CPL Common Public License version 1.0.
package util;
import org.w3c.dom.Document;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.PrintWriter;
public class XmlWriterTest extends RegexTestCase {
private ByteArrayOutputStream output;
private Document doc;
static final String sampleXml;
static {
ByteArrayOutputStream out = new ByteArrayOutputStream();
PrintWriter writer = new PrintWriter(out);
writer.println("<?xml version=\"1.0\"?>");
writer.println("<rootElement version=\"2.0\">");
writer.println("\t<emptytElement dire=\"straights\" strawberry=\"alarmclock\"/>");
writer.println("\t<fullElement>");
writer.println("\t\t<childElement/>");
writer.println("\t</fullElement>");
writer.println("\t<text>some text</text>");
writer.println("\t<cdata><![CDATA[<>&;]]></cdata>");
writer.println("</rootElement>");
writer.flush();
sampleXml = new String(out.toByteArray());
}
public void setUp() throws Exception {
DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
doc = builder.parse(new ByteArrayInputStream(sampleXml.getBytes()));
output = new ByteArrayOutputStream();
}
public void tearDown() throws Exception {
}
public void testAll() throws Exception {
String results = writeXml(doc);
assertEquals(sampleXml, results);
}
private String writeXml(Document doc) throws Exception {
XmlWriter writer = new XmlWriter(output);
writer.write(doc);
writer.flush();
writer.close();
String results = new String(output.toByteArray());
return results;
}
}
| [
"solsila@gmail.com"
] | solsila@gmail.com |
d520c3f6e7d2f294645472c1748e711567ebdd44 | 04f503868d44a1083cda0b03c90260b2f480c65c | /app/src/main/java/activity/RegisterActivity.java | ea5d30ccbfb399bc32623a2f9dfad4c943bbd7e4 | [] | no_license | Helen403/HelenTT | af1609dcdae1c0a7d3d126f0f3946ca66cee2cbb | 7e1e457e9f9b6029698873a4177fbde3243bb6e7 | refs/heads/master | 2021-01-25T06:30:39.661396 | 2017-06-07T03:24:28 | 2017-06-07T03:24:28 | 93,588,164 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,890 | java | package activity;
import android.text.TextUtils;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import com.blankj.utilcode.util.DeviceUtils;
import com.blankj.utilcode.util.PhoneUtils;
import com.example.snoy.helen.R;
import java.util.HashMap;
import HConstants.HConstants;
import Utils.ControlUtils;
import Utils.DButils;
import base.HBaseActivity;
import bean.MessageEvent;
import bean.ResultBean;
import bean.UserBean;
/**
* Created by Helen on 2017/6/3.
*/
public class RegisterActivity extends HBaseActivity {
private ImageView registerPhoneIcon1;
private EditText registerPhone;
private ImageView registerPhoneIcon2;
private EditText registerVim;
private TextView registerCount;
private ImageView registerPhoneIcon3;
private EditText registerName;
private ImageView registerPhoneIcon4;
private EditText registerPwd;
private TextView registerRegister;
private ImageView registerClose;
String pwd;
String phone;
@Override
public int getContentView() {
return R.layout.activity_register;
}
@Override
public void findViews() {
registerPhoneIcon1 = (ImageView) contentView.findViewById(R.id.register_phone_icon_1);
registerPhone = (EditText) contentView.findViewById(R.id.register_phone);
registerPhoneIcon2 = (ImageView) contentView.findViewById(R.id.register_phone_icon_2);
registerVim = (EditText) contentView.findViewById(R.id.register_vim);
registerCount = (TextView) contentView.findViewById(R.id.register_count);
registerPhoneIcon3 = (ImageView) contentView.findViewById(R.id.register_phone_icon_3);
registerName = (EditText) contentView.findViewById(R.id.register_name);
registerPhoneIcon4 = (ImageView) contentView.findViewById(R.id.register_phone_icon_4);
registerPwd = (EditText) contentView.findViewById(R.id.register_pwd);
registerRegister = (TextView) contentView.findViewById(R.id.register_register);
registerClose = (ImageView) contentView.findViewById(R.id.register_close);
}
@Override
public void initData() {
}
@Override
public void setListeners() {
setOnListeners(registerRegister, registerClose);
setOnClick(new onClick() {
@Override
public void onClick(View v, int id) {
switch (id) {
case R.id.register_register:
register();
break;
case R.id.register_close:
close();
break;
}
}
});
}
private void close() {
finish();
}
private void register() {
final String name = registerName.getText().toString();
phone = registerPhone.getText().toString();
pwd = registerPwd.getText().toString();
if (TextUtils.isEmpty(phone)) {
T("手机号不能为空");
return;
}
if (TextUtils.isEmpty(name)) {
T("昵称不能为空");
return;
}
if (TextUtils.isEmpty(pwd)) {
T("密码不能为空");
return;
}
//设置为不能点击状态
registerRegister.setBackgroundResource(R.drawable.shape_bg_register_press);
registerRegister.setEnabled(false);
HashMap<String, String> map = new HashMap<>();
map.put("userTelphone", phone);
map.put("userPassword", pwd);
map.put("phoneDeviceCode", PhoneUtils.getIMEI());
map.put("phoneDeviceName", DeviceUtils.getManufacturer() + " " + DeviceUtils.getModel());
map.put("isThreeLogin", "0");
map.put("userNickName", name);
ControlUtils.getsEveryTime(HConstants.URL.Register, map, ResultBean.class, new ControlUtils.OnControlUtils<ResultBean>() {
@Override
public void onSuccess(String url, ResultBean resultBean, String result) {
registerRegister.setBackgroundResource(R.drawable.shape_bg_register_nomal);
registerRegister.setEnabled(true);
L(result);
if (resultBean.result.equals("1")) {
T("注册成功");
DButils.put(HConstants.KEY.userCode, resultBean.userCode);
login();
} else {
T("注册失败");
}
}
@Override
public void onFailure(String url) {
registerRegister.setBackgroundResource(R.drawable.shape_bg_register_nomal);
registerRegister.setEnabled(true);
}
});
}
private void login() {
HashMap<String, String> map = new HashMap<>();
map.put("userName", phone);
map.put("password", pwd);
ControlUtils.getsEveryTime(HConstants.URL.LOGIN, map, UserBean.class, new ControlUtils.OnControlUtils<UserBean>() {
@Override
public void onSuccess(String url, UserBean userBean, String result) {
L(result);
T("登录成功");
if (userBean.getIsCheck() == 1) {
String nickName = userBean.getUserNickName();
String userCode = userBean.getUserCode()+"";
String useHead = userBean.getUserHead();
String phone = userBean.getUserTelphone();
String email = userBean.getUserEmail();
DButils.put(HConstants.KEY.userCode, userCode);
DButils.put(HConstants.KEY.nickName, nickName);
if (!TextUtils.isEmpty(useHead)){
DButils.put(HConstants.KEY.figureurl, useHead);
}else {
DButils.put(HConstants.KEY.figureurl, "");
}
DButils.put(HConstants.KEY.loginStatus,"1");
DButils.put(HConstants.KEY.phone,phone);
DButils.put(HConstants.KEY.Email,email);
//发一个消息给HomeFragment 替换 名字
onSendMessage(new MessageEvent(HConstants.EVENT.HOMEREFRESH, null));
onSendMessage(new MessageEvent(HConstants.EVENT.NAME_REFRESH, null));
//发一个消息关闭上一个Activity
onSendMessage(new MessageEvent(HConstants.EVENT.LOGINACTIVITY_CLOSE, ""));
finish();
} else {
T("登录失败");
finish();
}
}
@Override
public void onFailure(String url) {
T("网络异常");
finish();
}
});
}
}
| [
"852568775@qq.com"
] | 852568775@qq.com |
8b5d8257f343d3264637d4b0c68ab74818facfda | 6af3d75db773f28b4ad122a77bdf646e688e073c | /app/src/main/java/com/mauwahid/bakingapp/utils/TextUtils.java | 1ac14090f0fd30b30a34a05d7a528dc837043532 | [] | no_license | mauwahid/BakingApp | 20e2bd0c3955b35664df710364372577fca8b309 | 7b31d652324205b60c83a3c035519e60a2650b4c | refs/heads/master | 2021-07-20T20:36:55.681336 | 2017-10-29T10:05:27 | 2017-10-29T10:05:27 | 108,722,127 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,612 | java | /*
* Copyright 2017. Irfan Khoirul Muhlishin
*
* 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.mauwahid.bakingapp.utils;
public class TextUtils {
public static String capitalizeEachWords(String text) {
String[] stringArray = text.split(" ");
StringBuilder stringBuilder = new StringBuilder();
for (String s : stringArray) {
String cap = s.substring(0, 1).toUpperCase() + s.substring(1);
stringBuilder.append(cap).append(" ");
}
return stringBuilder.toString();
}
public static String removeTrailingZero(String stringNumber) {
return !stringNumber.contains(".") ? stringNumber :
stringNumber.replaceAll("0*$", "").replaceAll("\\.$", "");
}
public static String getExtension(String string) {
if (string.length() == 3) {
return string;
} else if (string.length() > 3) {
return string.substring(string.length() - 3);
} else {
throw new IllegalArgumentException("Word has less than 3 characters!");
}
}
}
| [
"mau.wahid@gmail.com"
] | mau.wahid@gmail.com |
6ed5d4e4c3f3f509525bbd4f4e4621def4cd98ce | d433e93db30bb44874ef97215e7d5bc3da6eec10 | /Java_012_ReLoad/src/com/callor/reload/service/PrimeServiceV6.java | 9251925b3e8e49ad6c944681c81e90a0ab4c9d6d | [] | no_license | num5268/Biz_403_2021_03_Java | 9cf9ea067f52c0a1e79b17af108da8a2397a7aa7 | f63b3f0db0565f018fe145523e9cf866cc1d366f | refs/heads/master | 2023-04-13T12:19:06.121263 | 2021-04-27T07:30:31 | 2021-04-27T07:30:31 | 348,207,331 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,206 | java | package com.callor.reload.service;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
public class PrimeServiceV6 {
protected Random rnd;
protected List<Integer> primeList;
public PrimeServiceV6() {
rnd = new Random();
primeList = new ArrayList<Integer>();
}
public void primeNum() {
for(int i = 0; i < 50; i++) {
int rndNum = rnd.nextInt(51)+50;
if( this.isPrime(rndNum)) {
primeList.add(rndNum);
}
}
}
// 매개변수(rndNum)로 전달받은 정수가
// 소수인지(true) 아닌지(false)를 return하는 method
// return 값이 true이거나 false인 method
// isPrime() : Prime이 맞냐?
private boolean isPrime(int rndNum) {
for(int i = 2 ; i<rndNum;i++) {
if(rndNum % i==0) {
return false;
}
}
return true;
}
public void printPrime () {
int nSize = primeList.size();
System.out.println("=".repeat(50));
System.out.println("소수개수 : "+nSize);
System.out.println("-".repeat(50));
for(int i = 0; i<nSize ; i++) {
System.out.print(primeList.get(i)+"\t");
if( (i+1)%5 ==0) {
System.out.println();
}
}
System.out.println();
System.out.println("=".repeat(50));
}
}
| [
"num5268@gmail.com"
] | num5268@gmail.com |
bf63d5d8c1e9bb13ac5eb5c0319315f90a272fcd | 124edd7cc5d53e4db98b8a8d69ed12beb5d99ac0 | /RetrofitMVPSample/app/src/main/java/bbfeechen/gmail/com/retrofitmvpsample/DetailActivity.java | faeadc6475b3c06d5b6548bfa7909316ae037624 | [] | no_license | bbfeechen/AndroidLibrary | 116898b01c77cf0c3ebc350766bb79f4bf3eed41 | 8fafdeee2c10443647aff45e6fb01071b2651d26 | refs/heads/master | 2016-08-11T22:00:53.583835 | 2016-03-02T06:28:09 | 2016-03-02T06:28:09 | 52,344,404 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,518 | java | package bbfeechen.gmail.com.retrofitmvpsample;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.ListView;
import android.widget.TextView;
import bbfeechen.gmail.com.retrofitmvpsample.adapters.CommentsAdapter;
import bbfeechen.gmail.com.retrofitmvpsample.models.Comment;
import bbfeechen.gmail.com.retrofitmvpsample.models.Post;
import bbfeechen.gmail.com.retrofitmvpsample.presenters.DetailPresenter;
import bbfeechen.gmail.com.retrofitmvpsample.services.ForumService;
import butterknife.ButterKnife;
import butterknife.InjectView;
import java.util.ArrayList;
import java.util.List;
public class DetailActivity extends AppCompatActivity {
@InjectView(R.id.textViewTitle) TextView mTextViewTitle;
@InjectView(R.id.textViewBody)
TextView mTextViewBody;
@InjectView(R.id.listViewComments) ListView mListViewComments;
CommentsAdapter mCommentsAdapter;
DetailPresenter mDetailPresenter;
ForumService mForumService;
protected int mPostId;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_detail);
ButterKnife.inject(this);
mPostId = getIntent().getIntExtra("postId", 0);
ArrayList<Comment> dummyComments = new ArrayList<Comment>();
mCommentsAdapter = new CommentsAdapter(this, dummyComments);
mListViewComments.setAdapter(mCommentsAdapter);
mForumService = new ForumService();
mDetailPresenter = new DetailPresenter(this, mForumService);
mDetailPresenter.loadComments();
mDetailPresenter.loadPost();
}
public int getPostId() {
return mPostId;
}
public void displayComments(List<Comment> comments) {
mCommentsAdapter.clear();
mCommentsAdapter.addAll(comments);
mCommentsAdapter.notifyDataSetInvalidated();
}
public void displayPost(Post post) {
mTextViewTitle.setText(post.title);
mTextViewBody.setText(post.body);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_list, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
}
| [
"bbfeechen@gmail.com"
] | bbfeechen@gmail.com |
e752c20732350c162783627ec6569530a847d7d9 | b55b5aab98514c1e40e08697f636d2da41aa7d61 | /src/main/java/com/dayi35/framework/controller/BaseController.java | 9d5e02baa27ab61dd882fee9a289fc2ff21193a2 | [] | no_license | AnnJAVA/act-eagle | 2a9a3428367015627dd1a25982affeb03c743361 | 590f52a57635354f5f49b054fcddd33aee960bf6 | refs/heads/master | 2021-08-15T01:00:17.974369 | 2017-11-17T03:48:36 | 2017-11-17T03:48:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,014 | java | package com.dayi35.framework.controller;
import act.app.ActionContext;
import act.controller.Controller;
import act.event.EventBus;
import act.view.RenderAny;
import javax.inject.Inject;
/**
* Controller 基类
* Created by leeton on 9/25/17.
*/
public class BaseController extends Controller.Util{
@Inject
protected ActionContext context;
@Inject
protected EventBus eventBus;
/**
* 调用模板啦
* @param args
* @return
*/
public RenderAny tpl(Object... args){
return renderTemplate(args);
}
/**
* 调用模板啦
*/
public RenderAny tpl(String path){
context.templatePath(path);
return renderTemplate();
}
/**
* 调用模板啦
*/
public RenderAny tpl(String path, Object... args){
context.templatePath(path);
return renderTemplate(args);
}
/**
* 统一跳转页面
*/
public void to(String url){
throw Controller.Util.redirect(url);
}
}
| [
"123456"
] | 123456 |
32dcdc81186daca58d1680ac4ea3f5fa08569319 | af0c4995d4bf5f76a6ca283fc55dfdca4e52ca3a | /playerui/src/main/java/com/whaley/biz/playerui/component/common/networkcompute/NetworkComputeComponent.java | 3ad5b1d23ff3a052ed58baf06c2c4f93218ced0f | [] | no_license | portal-io/portal-android | da60c4a7d54fb56fbc983c635bb1d2c4d542f78e | 623757fbb4d7979745b4c8ee34cebbf395cbd249 | refs/heads/master | 2020-03-20T07:58:08.196164 | 2019-03-16T02:30:48 | 2019-03-16T02:30:48 | 137,295,692 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 553 | java | package com.whaley.biz.playerui.component.common.networkcompute;
import com.whaley.biz.playerui.component.BaseComponent;
import com.whaley.biz.playerui.component.BaseController;
import com.whaley.biz.playerui.component.BaseUIAdapter;
/**
* Created by YangZhi on 2017/8/3 21:23.
*/
public class NetworkComputeComponent extends BaseComponent{
@Override
protected BaseController onCreateController() {
return new NetworkController();
}
@Override
protected BaseUIAdapter onCreateUIAdapter() {
return null;
}
}
| [
"lizs@snailvr.com"
] | lizs@snailvr.com |
8b51a0231d6644322ddbde42fbd922cf0af7349e | 8e5584f51543d2122fe2c565eb96f4f61aed1af6 | /Pattern/src/com/xj/proxy/staticProxy/ProxyStar.java | b4ef41b7daff9bc80a4f6e0b66f29dd679e8d1e1 | [] | no_license | Wall-Xj/JavaStudy | 8bf8c149b75582eca1e52fc06bffbbb06c3bd528 | 0fe70d8d869b9360b09e9ce27efecd7329d42f8c | refs/heads/master | 2021-01-15T22:46:22.591778 | 2018-03-05T13:23:10 | 2018-03-05T13:23:10 | 99,911,643 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 588 | java | package com.xj.proxy.staticProxy;
public class ProxyStar implements Star {
private Star star;
public ProxyStar(Star star) {
super();
this.star = star;
}
@Override
public void confer() {
System.out.println("ProxyStar.confer()");
}
@Override
public void singContract() {
System.out.println("ProxyStar.singContract()");
}
@Override
public void bookTicket() {
System.out.println("ProxyStar.bookTicket()");
}
@Override
public void sing() {
star.sing();
}
@Override
public void collectMoney() {
System.out.println("ProxyStar.collectMoney()");
}
}
| [
"592942092@qq.com"
] | 592942092@qq.com |
628b19f39ffce400ed6c0e8eabc3c4a5088fa329 | 2e8811b252118b9efb16487205fa581b1a7aab9a | /albedo-boot-web/albedo-boot-web-base/src/main/java/com/albedo/java/web/rest/base/GeneralResource.java | 61a31f6ed77304d8fa331b003c7f0bad14b9d881 | [
"Apache-2.0"
] | permissive | somowhere/albedo-boot-1v | e0bf2cfa9ebbc9f92c4994048d39557a216b614b | 00c1229e83eb78b980e637694cb37bb446865b80 | refs/heads/master | 2022-10-06T00:53:54.986633 | 2019-09-07T01:59:03 | 2019-09-07T01:59:03 | 201,226,444 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,139 | java | package com.albedo.java.web.rest.base;
import com.albedo.java.util.DateUtil;
import com.albedo.java.util.Json;
import com.albedo.java.util.exception.RuntimeMsgException;
import org.apache.commons.lang3.StringEscapeUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.ModelAttribute;
import javax.annotation.Resource;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import javax.validation.Validator;
import java.beans.PropertyEditorSupport;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.Date;
/**
* Created by somewhere on 2017/3/23.
*/
public class GeneralResource {
/*** 返回消息状态头 type */
public static final String MSG_TYPE = "status";
/*** 返回消息内容头 msg */
public static final String MSG = "message";
/*** 返回消息内容头 msg */
public static final String DATA = "data";
protected static Logger logger = LoggerFactory.getLogger(GeneralResource.class);
protected static final String RESPONSE_JSON = "application/json;charset=UTF-8";
protected final String ENCODING_UTF8 = "UTF-8";
/**
* 日志对象
*/
protected Logger log = LoggerFactory.getLogger(getClass());
/**
* 1 管理基础路径
*/
@Value("${albedo.adminPath}")
protected String adminPath;
/**
* 前端基础路径
*/
@Value("${albedo.frontPath}")
protected String frontPath;
/**
* 前端URL后缀
*/
@Value("${albedo.urlSuffix}")
protected String urlSuffix;
/**
* 验证Bean实例对象
*/
@Resource
protected Validator validator;
/**
* ThreadLocal确保高并发下每个请求的request,response都是独立的
*/
private static ThreadLocal<ServletRequest> currentRequest = new ThreadLocal<ServletRequest>();
private static ThreadLocal<ServletResponse> currentResponse = new ThreadLocal<ServletResponse>();
public static final void writeStringHttpResponse(String str, HttpServletResponse response) {
if (str == null) {
throw new RuntimeMsgException("WRITE_STRING_RESPONSE_NULL");
}
response.reset();
response.setContentType("text/html;charset=UTF-8");
response.setCharacterEncoding("UTF-8");
try {
response.getWriter().write(str);
} catch (IOException e) {
e.printStackTrace();
throw new RuntimeException(e);
}
}
public static final void writeJsonHttpResponse(Object object, HttpServletResponse response) {
if (object == null) {
throw new RuntimeMsgException("WRITE_JSON_RESPONSE_NULL");
}
try {
response.setContentType(RESPONSE_JSON);
response.setCharacterEncoding("UTF-8");
String str = object instanceof String ? (String) object : Json.toJsonString(object);
logger.info("write {}", str);
response.getWriter().write(str);
} catch (IOException e) {
e.printStackTrace();
throw new RuntimeException(e);
}
}
/**
* 线程安全初始化reque,respose对象
*
* @param request
* @param response
*/
@ModelAttribute
public void initReqAndRep(HttpServletRequest request, HttpServletResponse response) {
currentRequest.set(request);
currentResponse.set(response);
}
/**
* 线程安全
*
* @return
*/
public HttpServletRequest request() {
return (HttpServletRequest) currentRequest.get();
}
/**
* 线程安全
*
* @return
*/
public HttpServletResponse response() {
return (HttpServletResponse) currentResponse.get();
}
/**
* 初始化数据绑定 1. 将所有传递进来的String进行HTML编码,防止XSS攻击 2. 将字段中Date类型转换为String类型
*/
@InitBinder
protected void initBinder(WebDataBinder binder) {
// String类型转换,将所有传递进来的String进行HTML编码,防止XSS攻击
binder.registerCustomEditor(String.class, new PropertyEditorSupport() {
@Override
public void setAsText(String text) {
setValue(text == null ? null : StringEscapeUtils.escapeHtml4(text.trim()));
}
@Override
public String getAsText() {
Object value = getValue();
return value != null ? value.toString() : "";
}
});
// Date 类型转换
binder.registerCustomEditor(Date.class, new PropertyEditorSupport() {
public void setAsText(String text) {
setValue(DateUtil.parseDate(text));
}
});
}
}
| [
"somewhere0813@gmail.com"
] | somewhere0813@gmail.com |
5b35d0d07045c0fa503c6b32cd60523d36276a67 | 653bd81e4886bd75bb672dadc60c9c998f3c1ab1 | /takin-web-biz-service/src/main/java/io/shulie/takin/web/biz/pojo/output/statistics/PressureListTotalOutput.java | b93a525faec10619c078cf657365a2230af4cb97 | [] | no_license | shulieTech/Takin-web | f7fc06b4e5bcab366a60f64934cc3de495b9917e | f00bcd31e6fea795d8d718e59011b0c05fd6daf7 | refs/heads/main | 2023-08-31T07:38:15.352626 | 2023-07-03T03:03:47 | 2023-07-03T03:03:47 | 398,989,630 | 18 | 60 | null | 2023-08-22T09:50:23 | 2021-08-23T05:58:15 | Java | UTF-8 | Java | false | false | 398 | java | package io.shulie.takin.web.biz.pojo.output.statistics;
import lombok.Data;
/**
* @author 无涯
* @date 2020/11/30 9:23 下午
*/
@Data
public class PressureListTotalOutput {
private Long id;
private String name;
private String label;
private String gmtCreate;
private String createName;
private Integer count;
private Integer success;
private Integer fail;
}
| [
"hezhongqi@shulie.io"
] | hezhongqi@shulie.io |
5da8c37ae7f917bc937fb12ebf9f23e020b17c99 | e54587d52adda87cfd42fba78c3e6b21b4f23f5c | /app/src/main/java/com/cyplay/atproj/asperteam/ui/customview/ProfileTextItemView.java | 40557bb3efb799fa24ff6790f806f9e7dbabe7ad | [] | no_license | altkachuk/asperteam | 2d0e067ba6cc0a2c365d528f8dd73ce9dc9efdc8 | ae8446b27ca77932efdf309d601b24fb74c765ff | refs/heads/master | 2020-03-29T16:00:20.151174 | 2019-01-22T13:38:45 | 2019-01-22T13:38:45 | 150,092,202 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 939 | java | package com.cyplay.atproj.asperteam.ui.customview;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.widget.TextView;
import com.cyplay.atproj.asperteam.R;
import com.cyplay.atproj.asperteam.ui.customview.base.BaseResourceView;
import butterknife.BindView;
/**
* Created by andre on 11-May-18.
*/
public class ProfileTextItemView extends BaseResourceView {
@BindView(R.id.titleText)
TextView titleText;
@BindView(R.id.valueText)
TextView valueText;
public ProfileTextItemView(Context context, AttributeSet attrs) {
super(context, attrs);
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.MyFragment);
int titleRes = a.getResourceId(R.styleable.MyFragment_title_res, -1);
titleText.setText(titleRes);
}
public void setValue(String value) {
valueText.setText(value);
}
}
| [
"andreyltkachuk@gmail.com"
] | andreyltkachuk@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.