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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
453700f58aeab02c95c757b6afb2e6d4977e74b6 | 6b9588d36a20f37323724d39cf196feb31dc3103 | /skycloset_malware/src/okhttp3/internal/http/BridgeInterceptor.java | 3d37e6ce8f03e04c50d2e86ed1ae9176f0446000 | [] | no_license | won21kr/Malware_Project_Skycloset | f7728bef47c0b231528fdf002e3da4fea797e466 | 1ad90be1a68a4e9782a81ef1490f107489429c32 | refs/heads/master | 2022-12-07T11:27:48.119778 | 2019-12-16T21:39:19 | 2019-12-16T21:39:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,020 | java | package okhttp3.internal.http;
import b.j;
import b.l;
import java.util.List;
import okhttp3.Cookie;
import okhttp3.CookieJar;
import okhttp3.Interceptor;
import okhttp3.MediaType;
import okhttp3.Request;
import okhttp3.RequestBody;
import okhttp3.Response;
import okhttp3.internal.Util;
import okhttp3.internal.Version;
public final class BridgeInterceptor implements Interceptor {
private final CookieJar cookieJar;
public BridgeInterceptor(CookieJar paramCookieJar) { this.cookieJar = paramCookieJar; }
private String cookieHeader(List<Cookie> paramList) {
StringBuilder stringBuilder = new StringBuilder();
int i = paramList.size();
for (byte b = 0; b < i; b++) {
if (b)
stringBuilder.append("; ");
Cookie cookie = (Cookie)paramList.get(b);
stringBuilder.append(cookie.name());
stringBuilder.append('=');
stringBuilder.append(cookie.value());
}
return stringBuilder.toString();
}
public Response intercept(Interceptor.Chain paramChain) {
Request request = paramChain.request();
Request.Builder builder1 = request.newBuilder();
RequestBody requestBody = request.body();
if (requestBody != null) {
String str1;
MediaType mediaType = requestBody.contentType();
if (mediaType != null)
builder1.header("Content-Type", mediaType.toString());
long l = requestBody.contentLength();
if (l != -1L) {
builder1.header("Content-Length", Long.toString(l));
str1 = "Transfer-Encoding";
} else {
builder1.header("Transfer-Encoding", "chunked");
str1 = "Content-Length";
}
builder1.removeHeader(str1);
}
String str = request.header("Host");
byte b2 = 0;
if (str == null)
builder1.header("Host", Util.hostHeader(request.url(), false));
if (request.header("Connection") == null)
builder1.header("Connection", "Keep-Alive");
byte b1 = b2;
if (request.header("Accept-Encoding") == null) {
b1 = b2;
if (request.header("Range") == null) {
b1 = 1;
builder1.header("Accept-Encoding", "gzip");
}
}
List list = this.cookieJar.loadForRequest(request.url());
if (!list.isEmpty())
builder1.header("Cookie", cookieHeader(list));
if (request.header("User-Agent") == null)
builder1.header("User-Agent", Version.userAgent());
Response response = paramChain.proceed(builder1.build());
HttpHeaders.receiveHeaders(this.cookieJar, request.url(), response.headers());
Response.Builder builder = response.newBuilder().request(request);
if (b1 != 0 && "gzip".equalsIgnoreCase(response.header("Content-Encoding")) && HttpHeaders.hasBody(response)) {
j j = new j(response.body().source());
builder.headers(response.headers().newBuilder().removeAll("Content-Encoding").removeAll("Content-Length").build());
builder.body(new RealResponseBody(response.header("Content-Type"), -1L, l.a(j)));
}
return builder.build();
}
}
| [
"root@localhost.localdomain"
] | root@localhost.localdomain |
506a08f1fdd1627b54756e2efdb66405f439c820 | 3a5985651d77a31437cfdac25e594087c27e93d6 | /ojc-core/encodersl/encoder-coco/src/com/sun/encoder/coco/model/CobolSourceSequenceArea.java | 59de8dd244cdaa72e0856e4fcc97ba97be47ac06 | [] | no_license | vitalif/openesb-components | a37d62133d81edb3fdc091abd5c1d72dbe2fc736 | 560910d2a1fdf31879e3d76825edf079f76812c7 | refs/heads/master | 2023-09-04T14:40:55.665415 | 2016-01-25T13:12:22 | 2016-01-25T13:12:33 | 48,222,841 | 0 | 5 | null | null | null | null | UTF-8 | Java | false | false | 1,630 | java | /*
* BEGIN_HEADER - DO NOT EDIT
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the "License"). You may not use this file except
* in compliance with the License.
*
* You can obtain a copy of the license at
* https://open-jbi-components.dev.java.net/public/CDDLv1.0.html.
* See the License for the specific language governing
* permissions and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* HEADER in each file and include the License file at
* https://open-jbi-components.dev.java.net/public/CDDLv1.0.html.
* If applicable add the following below this CDDL HEADER,
* with the fields enclosed by brackets "[]" replaced with
* your own identifying information: Portions Copyright
* [year] [name of copyright owner]
*/
/*
* @(#)CocoSourceSequenceArea.java
*
* Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
*
* END_HEADER - DO NOT EDIT
*/
package com.sun.encoder.coco.model;
/**
* Represents the Sequence Area, columns 1-6 of the Cobol source line.
*
* @author Noel Ang
* @version $Revision: 1.1 $
*/
public class CobolSourceSequenceArea extends CobolSourceArea {
private static CobolSourceArea mMe;
protected CobolSourceSequenceArea() {
super("Sequence Area", 1, 6);
}
/**
* Obtain a reference to the CobolSourceSequenceArea.
* @return CobolSourceArea object
*/
public static CobolSourceArea getArea() {
if (mMe == null) {
mMe = new CobolSourceSequenceArea();
}
return mMe;
}
}
| [
"bitbucket@bitbucket02.private.bitbucket.org"
] | bitbucket@bitbucket02.private.bitbucket.org |
00746ea12293d00d5c09e715d9c860f41e8171cb | 4e9c06ff59fe91f0f69cb3dd80a128f466885aea | /src/o/dw.java | cf45f59f07cce96b33bed4fa4684dc77599aff3e | [] | no_license | reverseengineeringer/com.eclipsim.gpsstatus2 | 5ab9959cc3280d2dc96f2247c1263d14c893fc93 | 800552a53c11742c6889836a25b688d43ae68c2e | refs/heads/master | 2021-01-17T07:26:14.357187 | 2016-07-21T03:33:07 | 2016-07-21T03:33:07 | 63,834,134 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,270 | java | package o;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.app.Dialog;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.res.Resources;
import android.view.View;
import android.widget.ProgressBar;
public final class dw
extends hd
{
private static final dw abh = new dw();
public static AlertDialog ˊ(Activity paramActivity, ace paramace)
{
Object localObject2 = new ProgressBar(paramActivity, null, 16842874);
((ProgressBar)localObject2).setIndeterminate(true);
((ProgressBar)localObject2).setVisibility(0);
Object localObject1 = new AlertDialog.Builder(paramActivity);
((AlertDialog.Builder)localObject1).setView((View)localObject2);
localObject2 = dz.zzbv(paramActivity);
((AlertDialog.Builder)localObject1).setMessage(paramActivity.getResources().getString(ৰ.ˊ.common_google_play_services_updating_text, new Object[] { localObject2 }));
((AlertDialog.Builder)localObject1).setTitle(ৰ.ˊ.common_google_play_services_updating_title);
((AlertDialog.Builder)localObject1).setPositiveButton("", null);
localObject1 = ((AlertDialog.Builder)localObject1).create();
dz.zza(paramActivity, paramace, "GooglePlayServicesUpdatingDialog", (Dialog)localObject1);
return (AlertDialog)localObject1;
}
public static adc ˊ(Context paramContext, adc.if paramif)
{
IntentFilter localIntentFilter = new IntentFilter("android.intent.action.PACKAGE_ADDED");
localIntentFilter.addDataScheme("package");
adc localadc = new adc(paramif);
paramContext.registerReceiver(localadc, localIntentFilter);
mContext = paramContext;
if (!hh.ʿ(paramContext, "com.google.android.gms"))
{
paramif.ᕄ();
localadc.unregister();
return null;
}
return localadc;
}
public static boolean ˊ(ed paramed1, int paramInt, ed paramed2)
{
return dz.showErrorDialogFragment(paramInt, paramed1, 2, paramed2);
}
public static dw ᴫ()
{
return abh;
}
public final int isGooglePlayServicesAvailable(Context paramContext)
{
return super.isGooglePlayServicesAvailable(paramContext);
}
public final int zzbn(Context paramContext)
{
return super.zzbn(paramContext);
}
public final boolean zzc(Context paramContext, int paramInt)
{
return super.zzc(paramContext, paramInt);
}
public final PendingIntent ˊ(Context paramContext, int paramInt1, int paramInt2)
{
return super.ˊ(paramContext, paramInt1, paramInt2);
}
public final PendingIntent ˊ(Context paramContext, int paramInt1, int paramInt2, String paramString)
{
return super.ˊ(paramContext, paramInt1, paramInt2, paramString);
}
public final Intent ˊ(Context paramContext, int paramInt, String paramString)
{
return super.ˊ(paramContext, paramInt, paramString);
}
public final boolean Ⅰ(int paramInt)
{
return super.Ⅰ(paramInt);
}
@Deprecated
public final Intent ⅰ(int paramInt)
{
return super.ⅰ(paramInt);
}
}
/* Location:
* Qualified Name: o.dw
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"reverseengineeringer@hackeradmin.com"
] | reverseengineeringer@hackeradmin.com |
1c37bd4f104347288701eed5f64bea2e5096eb22 | 72c2bced1d63ec23c6888c5d4e032604a2db30ce | /sibua-client-controller-entities/src/main/java/org/cyk/system/sibua/client/controller/entities/user/UserActivityMapper.java | ec41cf2a30743faf6bce971915652b9746f70307 | [] | no_license | devlopper/org.cyk.system.sibua.client | b05ceb162f73a894b5a94304184df44f1d9933f9 | bf58c39f97465a26697f8e538b9b25962cae3957 | refs/heads/master | 2022-07-09T10:50:20.654105 | 2020-06-08T10:45:28 | 2020-06-08T10:45:28 | 235,031,984 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 451 | java | package org.cyk.system.sibua.client.controller.entities.user;
import org.cyk.system.sibua.server.representation.entities.user.UserActivityDto;
import org.cyk.utility.__kernel__.representation.AbstractMapperSourceDestinationImpl;
import org.mapstruct.Mapper;
@Mapper
public abstract class UserActivityMapper extends AbstractMapperSourceDestinationImpl<UserActivity, UserActivityDto> {
private static final long serialVersionUID = 1L;
} | [
"kycdev@gmail.com"
] | kycdev@gmail.com |
91132614253773b2594a1c95f3bff5ad3d4a86f1 | 8a28ac0e901443620e25338f42eb2f6383dc326b | /IvanovKostia/sender/src/sender/connection/NetListener.java | 57211c0f07803e05142bcd5c9308100acb1b9703 | [] | no_license | ifmo-ctd-2012-networks/labs | 9dfe64215097be2dd42d1275ed28ab92d84a74c8 | 0a2d52f72f6547ecfc6204958e2e641b6d145e68 | refs/heads/master | 2016-09-06T16:24:00.068121 | 2015-11-11T18:31:48 | 2015-11-11T18:31:48 | 42,375,519 | 1 | 2 | null | 2015-09-18T22:32:32 | 2015-09-12T22:31:27 | Java | UTF-8 | Java | false | false | 1,645 | java | package sender.connection;
import java.io.IOException;
import java.util.function.Consumer;
public abstract class NetListener<S extends AutoCloseable> implements Runnable {
public static final int RESTORE_ATTEMPTS_DELAY = 1000;
private final int port;
private S socket;
private final Consumer<byte[]> dataConsumer;
public NetListener(int port, Consumer<byte[]> dataConsumer) throws IOException {
this.port = port;
socket = createSocket(port);
this.dataConsumer = dataConsumer;
}
@Override
public void run() {
try {
while (!Thread.currentThread().isInterrupted()) {
try {
byte[] data = receive(socket);
dataConsumer.accept(data);
} catch (IOException e) {
restore();
}
}
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
}
protected abstract byte[] receive(S socket) throws IOException;
protected abstract S createSocket(int port) throws IOException;
private void restore() throws InterruptedException {
while (!Thread.currentThread().isInterrupted()) {
try {
try {
socket.close();
} catch (Throwable ignored) {
}
socket = createSocket(port);
} catch (IOException e) {
Thread.sleep(RESTORE_ATTEMPTS_DELAY);
}
}
throw new InterruptedException();
}
protected S getSocket() {
return socket;
}
}
| [
"Martoon_00@mail.ru"
] | Martoon_00@mail.ru |
036dd60c3898338487cb7847f4be294e461f5aff | 24525ebc414e22380e2639876d36e6673dff9657 | /cmpp-core/src/test/java/com/zx/sms/codec/AbstractTestMessageCodec.java | 92ebc1bda819c31c200743ee5c660b916da43a9f | [
"Apache-2.0"
] | permissive | yyf736057729/sms | a3b172b7b818411a22ccb7baeaeff1647c7cd106 | 02a72c7bbd712782888c3c897d5494d4052f4cc8 | refs/heads/master | 2020-04-22T14:19:39.377203 | 2019-02-13T04:30:02 | 2019-02-13T04:30:02 | 170,440,034 | 1 | 3 | null | null | null | null | UTF-8 | Java | false | false | 1,679 | java | package com.zx.sms.codec;
import com.zx.sms.connect.manager.cmpp.CMPPCodecChannelInitializer;
import com.zx.sms.handler.cmpp.CMPPDeliverLongMessageHandler;
import com.zx.sms.handler.cmpp.CMPPSubmitLongMessageHandler;
import io.netty.buffer.ByteBuf;
import io.netty.channel.Channel;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.embedded.EmbeddedChannel;
import io.netty.handler.logging.LogLevel;
import io.netty.handler.logging.LoggingHandler;
import io.netty.util.ResourceLeakDetector;
import io.netty.util.ResourceLeakDetector.Level;
public abstract class AbstractTestMessageCodec<T> {
private static int version = 0x20;
protected EmbeddedChannel ch = new EmbeddedChannel(new ChannelInitializer<Channel>() {
@Override
protected void initChannel(Channel ch) throws Exception {
ResourceLeakDetector.setLevel(Level.ADVANCED);
ChannelPipeline pipeline = ch.pipeline();
CMPPCodecChannelInitializer codec = new CMPPCodecChannelInitializer(getVersion());
pipeline.addLast("serverLog", new LoggingHandler(LogLevel.DEBUG));
pipeline.addLast(codec.pipeName(), codec);
pipeline.addLast( "CMPPDeliverLongMessageHandler", new CMPPDeliverLongMessageHandler(null));
pipeline.addLast("CMPPSubmitLongMessageHandler", new CMPPSubmitLongMessageHandler(null));
}
});
protected int getVersion(){
return this.version;
}
protected ByteBuf encode(T msg){
ch.writeOutbound(msg);
ByteBuf buf = (ByteBuf)ch.readOutbound();
return buf;
}
protected EmbeddedChannel channel(){
return ch;
}
protected T decode(ByteBuf buf){
ch.writeInbound(buf);
return (T) ch.readInbound();
}
}
| [
"13282810305@163.com"
] | 13282810305@163.com |
39918f3ad63fb007196971b86f99203464253135 | 0f45964f3c1f8a3ddc5e49c3898d234b1bc984b5 | /deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/annotation/ConfigProperty.java | 967841c5859d4b88e6833da01aad091757fdf5d5 | [
"Apache-2.0"
] | permissive | srleberic/incubator-deltaspike | 5c18f83d6428bf057c7b63a28e8078aceac7baf3 | 4b81872a0dc869ed5137e72721581b4b7501604f | refs/heads/master | 2021-01-16T23:02:22.203936 | 2012-06-03T10:52:27 | 2012-06-03T10:52:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,399 | java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.deltaspike.core.api.config.annotation;
import org.apache.deltaspike.core.api.converter.Converter;
import javax.enterprise.util.Nonbinding;
import javax.inject.Qualifier;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.CONSTRUCTOR;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
@Target({ PARAMETER, FIELD, METHOD, CONSTRUCTOR, ANNOTATION_TYPE })
@Retention(RUNTIME)
@Documented
@Qualifier
public @interface ConfigProperty
{
/**
* Name/key of the property
* @return name of the property
*/
String name();
/**
* Custom converter
* @return custom converter or default marker
*/
@Nonbinding
Class<? extends Converter> converter() default Converter.class;
/**
* Per default all properties are validated during the bootstrapping process of the CDI container.
* If it can't be resolved, the bootstrapping will fail.
*
* Set it to true if the property will be set dynamically e.g. during the bootstrapping process and
* it will be stored in a dynamic data-store like data-base.
*
* @return true if the property has to be available from the very beginning, false otherwise
*/
@Nonbinding
boolean eager() default true;
}
| [
"gpetracek@apache.org"
] | gpetracek@apache.org |
18f4647b07a8c0421ceb3bc0aa528d66c04ed7e3 | 67909e3deb320481606994f25b6a61df180c3970 | /swagger-dubbo/src/main/java/com/deepoove/swagger/dubbo/reader/ReaderContext.java | e34bb2bfae1d16b543cc5c5a6a70ce8a8e6b2866 | [
"Apache-2.0"
] | permissive | yaojf/swagger-dubbo | 7e0848881eae1fe2e46462ad6cf22567e7a1f1bc | 38a40961daa8ec3d908e1b2bdd35a25e9dd22fac | refs/heads/master | 2020-04-17T17:33:51.437534 | 2019-03-14T09:35:13 | 2019-03-14T09:35:13 | 166,787,429 | 1 | 1 | Apache-2.0 | 2019-01-21T09:40:26 | 2019-01-21T09:40:26 | null | UTF-8 | Java | false | false | 2,829 | java | package com.deepoove.swagger.dubbo.reader;
import java.util.List;
import io.swagger.models.Swagger;
import io.swagger.models.parameters.Parameter;
/**
* The <code>ReaderContext</code> class is wrapper for the <code>Reader</code>
* parameters.
*/
public class ReaderContext {
private Swagger swagger;
private Class<?> refCls;
private Class<?> interfaceCls;
private String parentPath;
private String parentHttpMethod;
private boolean readHidden;
private List<String> parentConsumes;
private List<String> parentProduces;
private List<String> parentTags;
private List<Parameter> parentParameters;
public ReaderContext(Swagger swagger, Class<?> refCls, Class<?> interfaceCls, String parentPath,
String parentHttpMethod, boolean readHidden, List<String> parentConsumes,
List<String> parentProduces, List<String> parentTags,
List<Parameter> parentParameters) {
setSwagger(swagger);
setRefCls(refCls);
setInterfaceCls(interfaceCls);
setParentPath(parentPath);
setParentHttpMethod(parentHttpMethod);
setReadHidden(readHidden);
setParentConsumes(parentConsumes);
setParentProduces(parentProduces);
setParentTags(parentTags);
setParentParameters(parentParameters);
}
public Swagger getSwagger() {
return swagger;
}
public void setSwagger(Swagger swagger) {
this.swagger = swagger;
}
public Class<?> getRefCls() {
return refCls;
}
public void setRefCls(Class<?> cls) {
this.refCls = cls;
}
public Class<?> getInterfaceCls() {
return interfaceCls;
}
public Class<?> getCls() {
return refCls;
}
public void setInterfaceCls(Class<?> interfaceCls) {
this.interfaceCls = interfaceCls;
}
public String getParentPath() {
return parentPath;
}
public void setParentPath(String parentPath) {
this.parentPath = parentPath;
}
public String getParentHttpMethod() {
return parentHttpMethod;
}
public void setParentHttpMethod(String parentHttpMethod) {
this.parentHttpMethod = parentHttpMethod;
}
public boolean isReadHidden() {
return readHidden;
}
public void setReadHidden(boolean readHidden) {
this.readHidden = readHidden;
}
public List<String> getParentConsumes() {
return parentConsumes;
}
public void setParentConsumes(List<String> parentConsumes) {
this.parentConsumes = parentConsumes;
}
public List<String> getParentProduces() {
return parentProduces;
}
public void setParentProduces(List<String> parentProduces) {
this.parentProduces = parentProduces;
}
public List<String> getParentTags() {
return parentTags;
}
public void setParentTags(List<String> parentTags) {
this.parentTags = parentTags;
}
public List<Parameter> getParentParameters() {
return parentParameters;
}
public void setParentParameters(List<Parameter> parentParameters) {
this.parentParameters = parentParameters;
}
}
| [
"adasai90@gmail.com"
] | adasai90@gmail.com |
a69a26708d3be95b2c3cdcbe49f8a032212f005d | a5d01febfd8d45a61f815b6f5ed447e25fad4959 | /Source Code/5.5.1/sources/com/iqoption/service/o.java | fc897f262d04e3570b881db3e05cf15a1e8ce59d | [] | no_license | kkagill/Decompiler-IQ-Option | 7fe5911f90ed2490687f5d216cb2940f07b57194 | c2a9dbbe79a959aa1ab8bb7a89c735e8f9dbc5a6 | refs/heads/master | 2020-09-14T20:44:49.115289 | 2019-11-04T06:58:55 | 2019-11-04T06:58:55 | 223,236,327 | 1 | 0 | null | 2019-11-21T18:17:17 | 2019-11-21T18:17:16 | null | UTF-8 | Java | false | false | 236 | java | package com.iqoption.service;
final /* synthetic */ class o implements Runnable {
private final String alY;
o(String str) {
this.alY = str;
}
public void run() {
WebSocketHandler.jI(this.alY);
}
}
| [
"yihsun1992@gmail.com"
] | yihsun1992@gmail.com |
5dcfef6cbdeea3bd1b4f7d7aedc8551f1562127b | 50aa57792cfc186ff96356ab59c342251ba47fb1 | /codes/mvc/src/test/java/me/chongfeng/spring/mvc/fileupload/FileUploadControllerTests.java | 6cc02a81a37961eac596baa4f0d92366fe4c3d70 | [
"Apache-2.0"
] | permissive | Neinciker/spring-notes | a8383420eb6614146152dc596946932067ba7cec | 61ed71582dc45e8a61b288944d6dbdca82537a57 | refs/heads/master | 2021-06-24T16:56:56.883342 | 2017-09-15T03:21:51 | 2017-09-15T03:21:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,011 | java | package me.chongfeng.spring.mvc.fileupload;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.fileUpload;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.model;
import static org.springframework.test.web.servlet.setup.MockMvcBuilders.webAppContextSetup;
import me.chongfeng.spring.mvc.AbstractContextControllerTests;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.mock.web.MockMultipartFile;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@RunWith(SpringJUnit4ClassRunner.class)
public class FileUploadControllerTests extends AbstractContextControllerTests {
@Test
public void readString() throws Exception {
MockMultipartFile file = new MockMultipartFile("file", "orig", null, "bar".getBytes());
webAppContextSetup(this.wac).build()
.perform(fileUpload("/fileupload").file(file))
.andExpect(model().attribute("message", "File 'orig' uploaded successfully"));
}
}
| [
"atlantis1024@163.com"
] | atlantis1024@163.com |
1b2487d9a8f48dbf9ced6fe4f3005669336668c5 | 651cfec1a9b96587206afcf65746e32040d51611 | /Network/src/http/exam02/HttpMultipartClient.java | 4a072e37178134c1324923a94b87a0b8359eea50 | [] | no_license | Jdongju/TestRepository | 143967fc13e70cf3e69dc0ba31ddc4577fb1f664 | f659ba3b39d044b7addbc7ac3ea258ed9ab528e2 | refs/heads/master | 2021-01-20T00:47:25.514692 | 2017-07-20T01:17:49 | 2017-07-20T01:17:49 | 89,189,022 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,406 | java | package http.exam02;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.Charset;
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.mime.HttpMultipartMode;
import org.apache.http.entity.mime.MultipartEntityBuilder;
import org.apache.http.entity.mime.content.FileBody;
import org.apache.http.entity.mime.content.StringBody;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.json.JSONObject;
public class HttpMultipartClient {
public static void main(String[] args) throws IOException {
String title="제목";
StringBody titleBody= new StringBody(title, ContentType.create("text/plain", Charset.forName("UTF-8")));
String content="내용";
StringBody contentBody= new StringBody(content, ContentType.create("text/plain", Charset.forName("UTF-8")));
File attach = new File("C:/Temp/사막.jpg");
FileBody attachBody= new FileBody(attach);
HttpPost httpPost = new HttpPost("http://192.168.3.164:8080/IoTWebProgramming/http/exam02");
MultipartEntityBuilder multipartEntityBuilder= MultipartEntityBuilder.create();
//문자파트
multipartEntityBuilder.addPart("title", titleBody);
multipartEntityBuilder.addPart("content", contentBody);
//파일 파트
multipartEntityBuilder.setCharset(Charset.forName("UTF-8")); //파일이름에 한글이 포함되어있을경우 UTF-8로한다.
multipartEntityBuilder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE); //브라우저가 파일을 보내는 방식과 동일하게
multipartEntityBuilder.addPart("attach", attachBody);
//멀티파트 인코딩된 본문 얻기
HttpEntity reqEntity= multipartEntityBuilder.build();
httpPost.setEntity(reqEntity);
CloseableHttpClient httpClient = HttpClients.createDefault();
try{
CloseableHttpResponse response = httpClient.execute(httpPost);
try {
HttpEntity resEntity = response.getEntity();
if (resEntity != null) {
InputStream is = resEntity.getContent();
try {
InputStreamReader isr= new InputStreamReader(is);
BufferedReader br= new BufferedReader(isr);
String json= "";
while(true){
String data= br.readLine();
if(data==null) break;
json+=data;
}
JSONObject jSONObject= new JSONObject(json);
String resTitle=jSONObject.getString("title");
String resContent=jSONObject.getString("content");
String originalfilename=jSONObject.getString("originalfilename");
String savedfilename=jSONObject.getString("savedfilename");
String filecontenttype=jSONObject.getString("filecontenttype");
System.out.println("title: "+resTitle);
System.out.println("content: "+resContent);
System.out.println("originalfilename: "+originalfilename);
System.out.println("savedfilename: "+ savedfilename);
System.out.println("filecontenttype"+filecontenttype);
} catch (Exception e) {
e.printStackTrace();
} finally {
is.close();
}
}
} finally {
response.close();
}
} catch(Exception e) {
e.printStackTrace();
} finally {
httpClient.close();
}
}
}
| [
"dj9110@naver.com"
] | dj9110@naver.com |
dc2c86db87306a7423120c192606000b1474b3bd | 5089eff419f2a229fda44c9f8b05685e8349d465 | /panda/src/main/java/org/panda_lang/panda/language/structure/prototype/structure/method/invoker/MethodInvokerParserHandler.java | 30955904dd42fe0a20da0d16cd3886e01646483c | [
"Apache-2.0"
] | permissive | Andarn/FunnyGuildsScript | 29d503631b329375f9b19810729b2ce0d7a0a952 | f4487617d59c0a05dda01619c66ac2404889051c | refs/heads/master | 2021-03-16T10:00:27.501628 | 2018-01-11T17:39:27 | 2018-01-11T17:39:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,397 | java | /*
* Copyright (c) 2015-2018 Dzikoysk
*
* 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.panda_lang.panda.language.structure.prototype.structure.method.invoker;
import org.panda_lang.panda.framework.implementation.interpreter.token.reader.PandaTokenReader;
import org.panda_lang.panda.framework.language.interpreter.parser.pipeline.ParserHandler;
import org.panda_lang.panda.framework.language.interpreter.token.extractor.Extractor;
import org.panda_lang.panda.framework.language.interpreter.token.reader.TokenReader;
public class MethodInvokerParserHandler implements ParserHandler {
@Override
public boolean handle(TokenReader tokenReader) {
TokenReader copyOfTokenReader = new PandaTokenReader(tokenReader);
Extractor extractor = MethodInvokerParser.PATTERN.extractor();
return extractor.extract(copyOfTokenReader) != null;
}
}
| [
"dzikoysk@dzikoysk.net"
] | dzikoysk@dzikoysk.net |
777e356fb0bbf63a2e5a2601b8a550ef6e981b25 | be3e6a9b998ad4db98d6f080fb87958f2ba16f1c | /src/main/java/com/perion/real_spring/spring_patterns/never_use_switch/SmsMessageSender.java | 4e6c55d227217ff9c0ac6e6f0589c355402c82e8 | [] | no_license | Jeka1978/perion-spring-beginning | 5d45817e75bdb4e1b146a9dd70fa368298b7e8ee | ee4cc5b8990a0ef01cfc459b8e5c9dc65a1f15f2 | refs/heads/master | 2023-06-17T09:00:57.098346 | 2021-07-14T09:27:57 | 2021-07-14T09:27:57 | 380,978,750 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 406 | java | package com.perion.real_spring.spring_patterns.never_use_switch;
import org.springframework.stereotype.Component;
/**
* @author Evgeny Borisov
*/
@Component
public class SmsMessageSender implements MessageSender {
@Override
public void send(Message message) {
System.out.println(message+" was sent by sms");
}
@Override
public String myType() {
return SMS;
}
}
| [
"kit2009"
] | kit2009 |
3ba33f1bbcd8505697f9ca8c1d6f3074e163bd98 | ea65710a42cfd1a0d4c4141ac5ba297c5e6287aa | /FoodSpoty/FoodSpoty/src/com/google/android/gms/wearable/internal/w.java | efbd69b8f33b75e98ca42029bec51d3308606a67 | [] | no_license | kanwarbirsingh/ANDROID | bc27197234c4c3295d658d73086ada47a0833d07 | f84b29f0f6bd483d791983d5eeae75555e997c36 | refs/heads/master | 2020-03-18T02:26:55.720337 | 2018-05-23T18:05:47 | 2018-05-23T18:05:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,481 | java | // Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.google.android.gms.wearable.internal;
import android.os.Parcel;
import com.google.android.gms.common.internal.safeparcel.a;
import com.google.android.gms.common.internal.safeparcel.b;
// Referenced classes of package com.google.android.gms.wearable.internal:
// v, al
public class w
implements android.os.Parcelable.Creator
{
public w()
{
}
static void a(v v1, Parcel parcel, int i)
{
i = b.H(parcel);
b.c(parcel, 1, v1.versionCode);
b.c(parcel, 2, v1.statusCode);
b.c(parcel, 3, v1.axL, false);
b.H(parcel, i);
}
public Object createFromParcel(Parcel parcel)
{
return eu(parcel);
}
public v eu(Parcel parcel)
{
int j = 0;
int k = com.google.android.gms.common.internal.safeparcel.a.G(parcel);
java.util.ArrayList arraylist = null;
int i = 0;
do
{
if (parcel.dataPosition() < k)
{
int l = com.google.android.gms.common.internal.safeparcel.a.F(parcel);
switch (com.google.android.gms.common.internal.safeparcel.a.aH(l))
{
default:
com.google.android.gms.common.internal.safeparcel.a.b(parcel, l);
break;
case 1: // '\001'
i = com.google.android.gms.common.internal.safeparcel.a.g(parcel, l);
break;
case 2: // '\002'
j = com.google.android.gms.common.internal.safeparcel.a.g(parcel, l);
break;
case 3: // '\003'
arraylist = com.google.android.gms.common.internal.safeparcel.a.c(parcel, l, al.CREATOR);
break;
}
} else
if (parcel.dataPosition() != k)
{
throw new com.google.android.gms.common.internal.safeparcel.a.a((new StringBuilder()).append("Overread allowed size end=").append(k).toString(), parcel);
} else
{
return new v(i, j, arraylist);
}
} while (true);
}
public v[] gD(int i)
{
return new v[i];
}
public Object[] newArray(int i)
{
return gD(i);
}
}
| [
"singhkanwar235@gmail.com"
] | singhkanwar235@gmail.com |
340804826449945637aca0a359e1a4b24c15ef27 | a67000deb8efbe45304c6071bba5182fff747d56 | /src/i_poo/e_polimorphisme/Ville.java | c78368b4136e783aae82171bd10a53b032efe626 | [] | no_license | jorgelfant/javaCourse | c406dce78f3ce1ca4c52eb194cec04830e1ffe2f | 493707bc3f3728e92ae73f264afaed8895a377a1 | refs/heads/master | 2022-12-06T05:59:08.671126 | 2020-09-07T17:48:16 | 2020-09-07T17:48:16 | 254,644,862 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,626 | java | package i_poo.e_polimorphisme;
//Une méthode publique peut être appelée depuis n'importe quel endroi du programme
//PRIVATE indique que la méthode(ou variable) ne pourra être appelée que depuis l'intérieur de la classe dans laquelle elle se trouve
//Les méthodes déclarées private correspondent souvent à des mécanismes internes à une classe que les développeurs souhaitent
// « cacher » ou simplement ne pas rendre accessibles de l'extérieur de la classe…
public class Ville {//el nombre de la class debe comenzar con mayuscula ejemplo Ville
//******************************************************************************************************************
// Variables d'instance en private pour pas qu'ils soient accessibles de l'extérieur
// *****************************************************************************************************************
//Variables publiques qui comptent les instances
public static int nbreInstances = 0;
//Variable privée qui comptera aussi les instances
protected static int nbreInstancesBis = 0;//il faudra un getter car il est en private
protected String nomVille;
protected String nomPays;
protected int nbreHabitants;
protected char categorie;
//CAMBIAMOS PRIVATE POR PROTECTED Y CON ESTO LO UNICO QUE CAMBIA ES QUE LAS CLASES HIJAS PODRAN ACCEDER A ESTAS VARIABLES
//Les autres variables n'ont pas changé
/*il y a trois grands types de variables dans une classe objet :
1 Les variables d'instance : ce sont elles qui définiront les caractéristiques de notre objet.
2 Les variables de classe : celles-ci sont communes à toutes les instances de votre classe.
3 Les variables locales : ce sont des variables que nous utiliserons pour travailler dans notre objet. */
//Une fois les variables définies on va créer notre objet à l'aide de constructeurs
//qui est une méthode d'instance qui va se charger de créer l'objet
//******************************************************************************************************************
// CONSTRUCTEURS
// *****************************************************************************************************************
public Ville() {//constructeur 1 sans paramètres
/*Un constructeur est une méthode d'instance qui va se charger de créer un objet et, le cas échéant, d'initialiser
ses variables de classe !*/
System.out.println("Création d'une ville");
nomVille = "Inconnu";
nomPays = "Inconnu";
nbreHabitants = 0;
this.setCategorie();
//On incrémente nos variables à chaque appel aux constructeurs
nbreInstances++;
nbreInstancesBis++;
//Le reste ne change pas.
}
//UN OJET PEUT AVOIR PLUSIEURS CONSTRUCTEURS --Il s'agit de la même méthode mais SURCHARGEE
public Ville(String pNom, String pPays, int pNbre) {
System.out.println("Création d'une ville avec paramètres");
nomVille = pNom;
nomPays = pPays;
nbreHabitants = pNbre;
this.setCategorie();
//On incrémente nos variables à chaque appel aux constructeurs
nbreInstances++;
nbreInstancesBis++;
//Le reste ne change pas
}
//NOUS DEVONS POUVOIR ACCEDER DE L'EXTERIEUR QUAND MEME A NOS VARIABLES PRIVATE EN LECTURE
//SETTERS pour accéder aux variables de nos objets en lecture et le modifier
//GETTERS pour faire le même mais en écriture LES 2 EN PUBLIQUE pour y accéder depuis une autre clsse (le MAIN par ex)
//******************************************************************************************************************
// SETTERS AND GETTERS
// *****************************************************************************************************************
//***************************************cuenta el numero de objetos creados***************************************
public static int getNombreInstancesBis()//la metode getter de una variable static es tambien static C'EST UNE REGLE
{//Par contre ce n’est plus une méthode de classe si celle-ci utilise des variables d'instance en plus de variables de classe…
return nbreInstancesBis;
}
//***************************************définir et retourner nom de la ville***************************************
public void setNomVille(String pNom) {
nomVille = pNom;
}
public String getNomVille() {
return nomVille;
}
//******************************************définir et retourner nom du pays****************************************
public void setNomPays(String pPays) {
nomPays = pPays;
}
public String getNomPays() {
return nomPays;
}
//****************************************définir et retourner nombre d'habitants***********************************
public void setNbreHabitants(int pNbre) {
nbreHabitants = pNbre;
this.setCategorie();//CUANDO DE EL NOMBRE DE HABITANTES ESTO LLAMARA A LA OTRA FUNCION this.setCategorie() QUE DARA LA CATEGORIA
} //Elle détermine dans quelle tranche se trouve la ville grâce au nombre d'habitants
// de l'objet appelant , obtenu au moyen du mot cléthis
public int getNbreHabitants() {
return nbreHabitants;
}
//******************************************************************************************************************
// Definir categoria de la ville
//******************************************************************************************************************
private void setCategorie() {//private porque este calculo se va a hacer internamente cuando yo pongo el nbr de habitantes
int[] bornesSuperieures = {0, 1000, 10000, 100000, 500000, 1000000, 5000000, 10000000};//al ingresar el parametro
char[] categories = {'?', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H'};//nbr de habitantes esto llamara a la funcion setCategorie.
int i = 0;
while (i < bornesSuperieures.length && nbreHabitants > bornesSuperieures[i]) {
i++;//esto renvoi a la siguiente posicion del categories[i] ya que al salir del while i aumenta de 1
}
this.categorie = categories[i];//recupera el valor (i++)
}
public char getCategorie() {
return categorie;
}
//***************************funcion para Retornar una descripcion de la ville**************************************
public String decrisToi() {
return "\t" + this.nomVille + " est une ville située au/en " + this.nomPays + " et quicomporte " +
this.nbreHabitants + " habitants, elle est donc de catégorie " + this.categorie + "\n";
}
//***************************Retourne une chaîne de caractères en fonction du résultat de la comparaison************
public String comparer(i_poo.a_ville_heritage_capital.Ville ville) {
String str;//OU String str = new String() pero es redundanteporque el str lo lleno en el if y else
if (ville.getNbreHabitants() > this.nbreHabitants) {
str = ville.getNomVille() + " est une ville plus peuple que " + this.nomVille;
} else {
str = this.nomVille + " est une ville plus peuple que " + ville.getNomVille();
}
return str;//esto me permite enviar uno ou otro lo que no podria hacer con System.out.println()
}
}
| [
"jorgel_fant@yahoo.com"
] | jorgel_fant@yahoo.com |
da7e60777d8eb3d45db799174115910c4230d9ee | 2385a87e1c64100233e5995fcafa4fead2da5527 | /support-uaa/src/main/java/com/ssaw/support/uaa/interceptor/UserContextInterceptor.java | 3e06d4f4fe1bf6a17530740bcb980fa0d393279d | [] | no_license | j2eety/ssaw | 4ddfe37e086db4628a3d55178eb3dfc41fdb851e | 298aed834a9e8aaa2e58ba37cd1bc101d802516d | refs/heads/master | 2020-05-27T22:28:28.110735 | 2019-05-12T03:44:18 | 2019-05-12T03:44:18 | 188,805,877 | 1 | 0 | null | 2019-05-27T08:44:15 | 2019-05-27T08:44:15 | null | UTF-8 | Java | false | false | 1,677 | java | package com.ssaw.support.uaa.interceptor;
import com.alibaba.fastjson.JSON;
import com.ssaw.support.uaa.holder.UserContextHolder;
import com.ssaw.support.uaa.model.User;
import com.ssaw.support.uaa.util.UserPermissionUtil;
import org.springframework.web.servlet.HandlerInterceptor;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* @author HuSen
* @date 2019/4/27 14:59
*/
public class UserContextInterceptor implements HandlerInterceptor {
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
User user = getUser(request);
UserPermissionUtil.permission(user);
if (!UserPermissionUtil.verify(user, request)) {
response.setHeader("Content-Type", "application/json");
String jsonString = JSON.toJSONString("no permission access service, please check");
response.getWriter().write(jsonString);
response.getWriter().flush();
response.getWriter().close();
throw new RuntimeException("no permission access service, please check");
}
UserContextHolder.set(user);
return true;
}
private User getUser(HttpServletRequest request) {
User user = new User();
user.setId(Integer.valueOf(request.getHeader("x-user-id")));
user.setUsername(request.getHeader("x-user-name"));
return user;
}
@Override
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {
UserContextHolder.shutdown();
}
} | [
"1178515826@qq.com"
] | 1178515826@qq.com |
5769968699c7169e9662bf02ce294c548070716d | 929b37e05bf1aa2b5b88b07a820ba56a7e00701f | /bonaparte-core/src/main/java/de/jpaw/bonaparte/core/BufferedMessageWriter.java | f92aaaba28918b82f00f3c4c20d846feeb73f8de | [
"Apache-2.0"
] | permissive | jpaw/bonaparte-java | f882984cb78059d20cce7c602ede2a7b6977fc51 | 8f0fc09d07a9b394ecbd0dade69829ec219caf9b | refs/heads/master | 2023-04-28T23:45:52.309194 | 2022-06-03T17:32:01 | 2022-06-03T17:32:01 | 5,228,646 | 2 | 4 | Apache-2.0 | 2023-04-14T20:42:22 | 2012-07-30T05:23:07 | Java | UTF-8 | Java | false | false | 525 | java | package de.jpaw.bonaparte.core;
/** Client facing part of an interface for MessageComposers working on memory buffers. */
public interface BufferedMessageWriter<E extends Exception> extends MessageWriter<E> {
// generic methods
public void reset(); // restart the output
public int getLength(); // obtain the number of written bytes (composer)
public byte[] getBuffer(); // get the buffer (byte array of maybe too big size
public byte[] getBytes(); // get exact byte array of produced output
}
| [
"jpaw@online.de"
] | jpaw@online.de |
0e39a0a7c923349cafc232203dcba9c9b51c4c64 | ca5c2bc318bc10ffad1c36bdc5467437f0e0048c | /src/main/java/top/zzh/mapper/UserMapper.java | 3a8298e5a12057192b75dfa4c99e6e8321ad8856 | [] | no_license | GZzzhsmart/Springboot | b5d10accda6e01caf8c0c52eea13a307c14a5691 | 3236a899d22a9552328778617bf6bc4aaa3847af | refs/heads/master | 2020-03-07T20:11:24.301334 | 2018-04-02T02:20:41 | 2018-04-02T02:20:41 | 127,691,046 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 456 | java | package top.zzh.mapper;
import org.springframework.stereotype.Repository;
import top.zzh.model.User;
import java.util.List;
@Repository
public interface UserMapper {
int deleteByPrimaryKey(Integer userId);
int insert(User record);
int insertSelective(User record);
User selectByPrimaryKey(Integer userId);
int updateByPrimaryKeySelective(User record);
int updateByPrimaryKey(User record);
List<User> selectAllUser();
} | [
"1729340612@qq.com"
] | 1729340612@qq.com |
ac6dfd13ceb246e2f647937162a7d40f67b03bdb | 642323b88f6a3f9050d3ce297b80c02715ba08db | /Algorithms/Dynamic-Programming/src/moveDownRightSum/Main.java | 374e563f42a8b13d48b4261f6e5caee0ebe28170 | [] | no_license | VenelinBakalov/javaAdvanced | 5a9e418c6666f85fe8a8d1e65d587a863af367b9 | d890a84fa56af2e24669e60f48f6d776cf55e9ef | refs/heads/master | 2021-01-11T21:07:45.912758 | 2017-12-03T15:39:27 | 2017-12-03T15:39:27 | 79,252,307 | 8 | 8 | null | null | null | null | UTF-8 | Java | false | false | 2,770 | java | package moveDownRightSum;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
* Created by Venelin on 12.5.2017 г..
*/
public class Main {
public static void main(String[] args) {
int[][] cells = {
{2, 6, 1, 8, 9, 4, 2},
{1, 8, 0, 3, 5, 6, 7},
{3, 4, 8, 7, 2, 1, 8},
{0, 9, 2, 8, 1, 7, 9},
{2, 7, 1, 9, 7, 8, 2},
{4, 5, 6, 1, 2, 5, 6},
{9, 3, 5, 2, 8, 1, 9},
{2, 3, 4, 1, 7, 2, 8}
};
int rowsCount = cells.length;
int colsCount = cells[0].length;
int[][] sums = new int[rowsCount][colsCount];
sums[0][0] = cells[0][0];
// Set best paths in 0th column
for (int row = 1; row < sums.length; row++) {
sums[row][0] = sums[row - 1][0] + cells[row][0];
}
// Set best paths in 0th row
for (int col = 1; col < sums[0].length; col++) {
sums[0][col] = sums[0][col - 1] + cells[0][col];
}
for (int row = 1; row < sums.length; row++) {
for (int col = 1; col < sums[row].length; col++) {
sums[row][col] = Math.max(sums[row - 1][col], sums[row][col - 1]) + cells[row][col];
}
}
// Get the best path
List<int[]> path = reconstructPath(sums);
// Print the sums
for (int row = 0; row < sums.length; row++) {
for (int col = 0; col < sums[row].length; col++) {
if (path.contains(new int[]{row, col})) {
System.out.print("*" + sums[row][col] + "* ");
} else {
System.out.print(sums[row][col] + " ");
}
}
System.out.println();
}
System.out.println();
for (int i = path.size() - 1; i >= 0; i--) {
int[] coords = path.get(i);
System.out.print(cells[coords[0]][coords[1]] + " ");
}
}
private static List<int[]> reconstructPath(int[][] sums) {
List<int[]> path = new ArrayList<>();
int r = sums.length - 1;
int c = sums[sums.length - 1].length - 1;
path.add(new int[] { r, c });
while (r > 0 && c > 0) {
if (sums[r - 1][c] > sums[r][c - 1]) {
path.add(new int[]{r - 1, c});
r--;
} else {
path.add(new int[]{r, c - 1});
c--;
}
}
while (r > 0) {
path.add(new int[]{r - 1, c});
r--;
}
while (c > 0) {
path.add(new int[]{r, c - 1});
c--;
}
return path;
}
}
| [
"venelin_bakalov@abv.bg"
] | venelin_bakalov@abv.bg |
fc679ecb8b82f8a64d2c54b000b797067c03c1f3 | 4e8d52f594b89fa356e8278265b5c17f22db1210 | /WebServiceArtifacts/WeatherService/org/tempuri/GetWeatherDataResponse.java | 61c11c2b62a6bffd0fc06f2744fa3bbd096ff577 | [] | no_license | ouniali/WSantipatterns | dc2e5b653d943199872ea0e34bcc3be6ed74c82e | d406c67efd0baa95990d5ee6a6a9d48ef93c7d32 | refs/heads/master | 2021-01-10T05:22:19.631231 | 2015-05-26T06:27:52 | 2015-05-26T06:27:52 | 36,153,404 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,649 | java |
package org.tempuri;
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>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="GetWeatherDataResult" type="{http://tempuri.org/}ArrayOfWeather" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"getWeatherDataResult"
})
@XmlRootElement(name = "GetWeatherDataResponse")
public class GetWeatherDataResponse {
@XmlElement(name = "GetWeatherDataResult")
protected ArrayOfWeather getWeatherDataResult;
/**
* Gets the value of the getWeatherDataResult property.
*
* @return
* possible object is
* {@link ArrayOfWeather }
*
*/
public ArrayOfWeather getGetWeatherDataResult() {
return getWeatherDataResult;
}
/**
* Sets the value of the getWeatherDataResult property.
*
* @param value
* allowed object is
* {@link ArrayOfWeather }
*
*/
public void setGetWeatherDataResult(ArrayOfWeather value) {
this.getWeatherDataResult = value;
}
}
| [
"ouni_ali@yahoo.fr"
] | ouni_ali@yahoo.fr |
4a06cb7ce88ee797afd228f42e29b17596bec76f | 53d677a55e4ece8883526738f1c9d00fa6560ff7 | /com/tencent/mm/plugin/collect/reward/ui/QrRewardMainUI$3.java | 6462b04b797f0ff5e185dcb5875584250f07b292 | [] | no_license | 0jinxing/wechat-apk-source | 544c2d79bfc10261eb36389c1edfdf553d8f312a | f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d | refs/heads/master | 2020-06-07T20:06:03.580028 | 2019-06-21T09:17:26 | 2019-06-21T09:17:26 | 193,069,132 | 9 | 4 | null | null | null | null | UTF-8 | Java | false | false | 1,224 | java | package com.tencent.mm.plugin.collect.reward.ui;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.ai.m;
import com.tencent.mm.kernel.e;
import com.tencent.mm.kernel.g;
import com.tencent.mm.plugin.collect.reward.a.a.a;
import com.tencent.mm.plugin.collect.reward.a.h;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.storage.ac.a;
import com.tencent.mm.storage.z;
import com.tencent.mm.ui.widget.MMEditText;
final class QrRewardMainUI$3
implements a.a
{
QrRewardMainUI$3(QrRewardMainUI paramQrRewardMainUI, h paramh)
{
}
public final void j(m paramm)
{
AppMethodBeat.i(41085);
ab.i("MicroMsg.QrRewardMainUI", "set succ: %s, %s", new Object[] { this.kED.jMS, QrRewardMainUI.m(this.kEC).getText() });
if (this.kED.jMS.equals(QrRewardMainUI.n(this.kEC)))
{
g.RP().Ry().set(ac.a.xTx, QrRewardMainUI.n(this.kEC));
QrRewardMainUI.j(this.kEC);
}
AppMethodBeat.o(41085);
}
}
/* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes2-dex2jar.jar
* Qualified Name: com.tencent.mm.plugin.collect.reward.ui.QrRewardMainUI.3
* JD-Core Version: 0.6.2
*/ | [
"172601673@qq.com"
] | 172601673@qq.com |
790026b64e6b0ffdaa395b09e8d221c630418859 | 96d06bfbeff740f661e7ef409183f348f551a414 | /nobug/nobug-csrf/src/main/java/io/leopard/web4j/nobug/csrf/CsrfTokenInvalidException.java | c835bf88e4162b1a1cef46f3f42c4e9888817e34 | [
"Apache-2.0"
] | permissive | cuidd2018/leopard | 135648152202f00b405af1f0039f3dd95ee1689c | bcc6c394d5a7246384c666f94ac3c5e494e777a3 | refs/heads/master | 2021-09-22T11:11:37.093267 | 2018-09-09T05:24:19 | 2018-09-09T05:24:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 251 | java | package io.leopard.web4j.nobug.csrf;
public class CsrfTokenInvalidException extends IllegalArgumentException {
private static final long serialVersionUID = 1L;
public CsrfTokenInvalidException(String message) {
super(message);
}
}
| [
"tanhaichao@gmail.com"
] | tanhaichao@gmail.com |
93f0d6a2ae4394decf3b92503896bceb83a7b3bb | 7b12f67da8c10785efaebe313547a15543a39c77 | /jjg-common-db/src/main/java/com/jjg/system/model/form/EsParameterGroupForm.java | 43aa61035116299b41733e3e12dc9eb9ed8e6ac3 | [] | no_license | liujinguo1994/xdl-jjg | 071eaa5a8fb566db6b47dbe046daf85dd2b9bcd8 | 051da0a0dba18e6e5021ecb4ef3debca16b01a93 | refs/heads/master | 2023-01-06T09:11:30.487559 | 2020-11-06T14:42:45 | 2020-11-06T14:42:45 | 299,525,315 | 1 | 3 | null | null | null | null | UTF-8 | Java | false | false | 900 | java | package com.jjg.system.model.form;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* <p>
* 参数组
* </p>
*
* @author rm 2817512105@qq.com
* @since 2019-06-05 17:30:01
*/
@Data
@ApiModel
public class EsParameterGroupForm implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 参数组名称
*/
@ApiModelProperty(required = true, value = "参数组名称")
@NotBlank(message = "参数组名称不能为空")
private String groupName;
/**
* 关联分类id
*/
@ApiModelProperty(required = true, value = "关联分类id", example = "1")
@NotNull(message = "关联分类id不能为空")
private Long categoryId;
}
| [
"344009799@qq.com"
] | 344009799@qq.com |
b1160d54b43983042a894a48dbc21af1c806e2e4 | 11e3d4a5fd26ca53e0d974527b53aee48d849a26 | /src/main/java/com/navercorp/pinpoint/web/controller/XHostsController.java | 6a8810943fed031d5aa4b230e4dec502b5a74530 | [] | no_license | Aires1208/Kernel | 24f56bf4b71400512c35a1259fadf031bc50b14c | 698155c4532fd2f683ee22335cb50891f1c39693 | refs/heads/master | 2021-01-18T07:56:33.415387 | 2017-07-27T06:39:22 | 2017-07-27T06:39:22 | 84,297,968 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,236 | java | package com.navercorp.pinpoint.web.controller;
import com.navercorp.pinpoint.web.service.XHostService;
import com.navercorp.pinpoint.web.service.XHostsService;
import com.navercorp.pinpoint.web.view.HostStat;
import com.navercorp.pinpoint.web.view.XHostDashBoard;
import com.navercorp.pinpoint.web.view.XHostList;
import com.navercorp.pinpoint.web.view.XHostsDashBoard;
import com.navercorp.pinpoint.web.vo.Range;
import com.navercorp.pinpoint.web.vo.XHost;
import com.navercorp.pinpoint.web.vo.XHostDetail;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Set;
@Controller
public class XHostsController {
private final Logger logger = LoggerFactory.getLogger(this.getClass());
@Autowired
private XHostsService xHostsService;
@Autowired
private XHostService xHostService;
@RequestMapping(value = "/serverstats", method = RequestMethod.GET)
@ResponseBody
public XHostsDashBoard getXHostDashBoard(@RequestParam("from") long from,
@RequestParam("to") long to) {
List<HostStat> hostStats = xHostsService.getHostsDashBoard(new Range(from, to));
logger.debug("/serverstats, ", new Range(from, to));
return new XHostsDashBoard(hostStats);
}
@RequestMapping(value = "/serverstats/{hostid}", method = RequestMethod.GET)
@ResponseBody
public XHostDashBoard getXHostDashBoard(@PathVariable("hostid") String hostId,
@RequestParam("from") long from,
@RequestParam("to") long to) {
XHostDetail xHostDetail = xHostService.getHostDetail(hostId, new Range(from, to));
logger.debug("/serverstats, ", new Range(from, to));
return new XHostDashBoard(xHostDetail);
}
@RequestMapping(value = "/serverlist", method = RequestMethod.GET)
@ResponseBody
public XHostList getHostList() {
Set<XHost> serverIds = xHostsService.getXHosts();
return new XHostList(serverIds);
}
}
| [
"zhang.pei162@zte.com.cn"
] | zhang.pei162@zte.com.cn |
95a65d66b5a4d765f76f26857e7768b24b4b1e98 | a14e11f4e84ca2e571a09384c5a91856d19ea94f | /src/java/org/jsimpledb/cli/cmd/AbstractRaftCommand.java | b0f677626d843877113868ae5b37f1715e7beeb1 | [
"Apache-2.0"
] | permissive | tempbottle/jsimpledb | 1484364e6b229a5e8e6da449dbd2a7d16f440e52 | 1656bb282ff0a24e5fdc33c133cc4df9a43ae2b8 | refs/heads/master | 2020-12-13T22:00:18.573235 | 2015-09-01T15:30:43 | 2015-09-01T15:30:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 889 | java |
/*
* Copyright (C) 2015 Archie L. Cobbs. All rights reserved.
*/
package org.jsimpledb.cli.cmd;
import org.jsimpledb.cli.CliSession;
import org.jsimpledb.kv.KVTransaction;
import org.jsimpledb.kv.raft.RaftKVTransaction;
public abstract class AbstractRaftCommand extends AbstractCommand {
protected AbstractRaftCommand(String spec) {
super(spec);
}
protected abstract class RaftAction implements CliSession.Action {
@Override
public final void run(CliSession session) throws Exception {
final KVTransaction kvt = session.getKVTransaction();
if (!(kvt instanceof RaftKVTransaction))
throw new Exception("key/value store is not Raft");
this.run(session, (RaftKVTransaction)kvt);
}
protected abstract void run(CliSession session, RaftKVTransaction tx) throws Exception;
}
}
| [
"archie.cobbs@gmail.com"
] | archie.cobbs@gmail.com |
fd16b9ac59cd3b1a4d270cfca9dcd5265c2d14c6 | 150fc06016bc1da4cdc462c4a16422f87da0048b | /architecture-user/src/main/java/architecture/user/AbstractGroupManager.java | 29bb22446eca09deef0c3da5357256ef9f691010 | [] | no_license | donghyuck/legacy-architecture-project | 4bc634298924dc02e880f13ee7e270ca5ee64d6d | 16f63be80737192b69f786c667f590007a7b6f7a | refs/heads/master | 2023-04-15T05:59:42.255296 | 2016-08-17T06:49:19 | 2016-08-17T06:49:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,120 | java | package architecture.user;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import architecture.common.event.api.EventPublisher;
import architecture.common.event.api.EventSource;
import architecture.common.user.Group;
import architecture.ee.component.admin.AdminHelper;
import net.sf.ehcache.Cache;
import net.sf.ehcache.Element;
/**
* @author donghyuck
*/
public abstract class AbstractGroupManager implements GroupManager, EventSource {
protected Log log = LogFactory.getLog(getClass());
protected EventPublisher eventPublisher;
protected boolean caseInsensitiveGroupNameMatch;
protected Cache groupCache;
protected Cache groupIdCache;
public AbstractGroupManager() {
this.caseInsensitiveGroupNameMatch = true;
this.groupCache = AdminHelper.getCache("groupCache");
this.groupIdCache = AdminHelper.getCache("groupIdCache");
// this.groupIdCache = AdminHelper.getCache("groupDomainCache");
}
public void setGroupCache(Cache groupCache) {
this.groupCache = groupCache;
}
public void setGroupIdCache(Cache groupIdCache) {
this.groupIdCache = groupIdCache;
}
/**
* @param caseInsensitiveGroupNameMatch
*/
public void setCaseInsensitiveGroupNameMatch(boolean caseInsensitiveGroupNameMatch) {
this.caseInsensitiveGroupNameMatch = caseInsensitiveGroupNameMatch;
}
/**
* @param eventPublisher
*/
public void setEventPublisher(EventPublisher eventPublisher) {
this.eventPublisher = eventPublisher;
}
public Group getGroup(String name) throws GroupNotFoundException {
String nameToUse = caseGroupName(name);
if (groupIdCache.get(nameToUse) != null) {
log.debug(groupIdCache.get(nameToUse));
Long groupId = (Long) groupIdCache.get(nameToUse).getValue();
return getGroup(groupId);
} else {
Group g = lookupGroup(nameToUse);
groupIdCache.put(new Element(nameToUse, g.getGroupId()));
return getGroup(g.getGroupId());
}
}
public Group getGroup(long groupId) throws GroupNotFoundException {
Group group = getGroupInCache(groupId);
if (group == null) {
group = lookupGroup(groupId);
groupCache.put(new Element(groupId, group));
}
return group;
}
protected Group getGroupInCache(long groupId) {
if (groupCache.get(groupId) != null)
return (Group) groupCache.get(groupId).getValue();
else
return null;
}
protected String caseGroupName(String name) {
return caseInsensitiveGroupNameMatch ? name.toLowerCase() : name;
}
protected abstract Group lookupGroup(String name) throws GroupNotFoundException;
protected abstract Group lookupGroup(long groupId) throws GroupNotFoundException;
protected boolean nameEquals(Group g1, Group g2) {
return g1.getName() != null && g2.getName() != null
&& caseGroupName(g1.getName()).equals(caseGroupName(g2.getName()));
}
protected void groupNameUpdated(String oldGroupName) {
groupIdCache.remove(caseGroupName(oldGroupName));
}
protected void clearGroupFromCache(Group group) {
groupCache.remove(group.getGroupId());
}
}
| [
"andang.son@gmail.com"
] | andang.son@gmail.com |
1c654a98b1a82cac5200e535cdd994c03ca3936b | ce1a693343bda16dc75fd64f1688bbfa5d27ac07 | /testsuite/src/main/org/jboss/test/bootstrapdependencies/jbas5349/ejb3/DummyMessageBean.java | f15e740477419d99bb57f3940114a125b810c26c | [] | no_license | JavaQualitasCorpus/jboss-5.1.0 | 641c412b1e4f5f75bb650cecdbb2a56de2f6a321 | 9307e841b1edc37cc97c732e4b87125530d8ae49 | refs/heads/master | 2023-08-12T08:39:55.319337 | 2020-06-02T17:48:09 | 2020-06-02T17:48:09 | 167,004,817 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,879 | java | /*
* JBoss, Home of Professional Open Source.
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.test.bootstrapdependencies.jbas5349.ejb3;
import javax.annotation.Resource;
import javax.ejb.MessageDriven;
import javax.ejb.ActivationConfigProperty;
import javax.ejb.MessageDrivenContext;
import javax.jms.Message;
import javax.jms.MessageListener;
/**
* A dummy (empty) EJB3 message bean.
*
* @author <a href="istudens@redhat.com">Ivo Studensky</a>
* @version $Revision: 85945 $
*/
@MessageDriven(activationConfig =
{
@ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
@ActivationConfigProperty(propertyName="destination", propertyValue="queue/testingqueue")
})
public class DummyMessageBean implements MessageListener
{
@Resource
private MessageDrivenContext mdc;
public DummyMessageBean() {}
public void onMessage(Message message)
{
}
}
| [
"taibi@sonar-scheduler.rd.tut.fi"
] | taibi@sonar-scheduler.rd.tut.fi |
8cf25916819b9b7f197e8dbfa3ff94463273aca4 | a4f94f4701a59cafc7407aed2d525b2dff985c95 | /workbench/source/codeOrchestra/air/run/configuration/AIRRunConfiguration.java | 99fd53600f1ef59b0659b6d0cbc209fd3050fbc2 | [] | no_license | jamice/code-orchestra-core | ffda62860f5b117386aa6455f4fdf61661abbe9e | b2bbf8362be2e2173864c294c635badb2e27ecc6 | refs/heads/master | 2021-01-15T13:24:53.517854 | 2013-05-09T21:39:28 | 2013-05-09T21:39:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,033 | java | package codeOrchestra.air.run.configuration;
import codeOrchestra.run.CodeOrchestraRunConfiguration;
/**
* @author Alexander Eliseyev
*/
public class AIRRunConfiguration implements CodeOrchestraRunConfiguration {
private String moduleName;
private String launcherOptions;
private String programParameters;
// Custom AIR app descriptor params
private String descriptorPath;
private String rootDirectory;
private int launcherType = AIRLauncherType.DEFAULT_MODULE_OUTPUT.ordinal();
public AIRRunConfiguration(String moduleName, String launcherOptions, String programParameters, String descriptorPath, String rootDirectory) {
this.moduleName = moduleName;
this.launcherOptions = launcherOptions;
this.programParameters = programParameters;
this.descriptorPath = descriptorPath;
this.rootDirectory = rootDirectory;
}
public String getModuleName() {
return moduleName;
}
public String getLauncherOptions() {
return launcherOptions;
}
public String getProgramParameters() {
return programParameters;
}
public String getDescriptorPath() {
return descriptorPath;
}
public String getRootDirectory() {
return rootDirectory;
}
public AIRLauncherType getLauncherType() {
return AIRLauncherType.byIndex(launcherType);
}
public void setLauncherType(AIRLauncherType launcherType) {
this.launcherType = launcherType.ordinal();
}
public void setModuleName(String moduleName) {
this.moduleName = moduleName;
}
public void setLauncherOptions(String launcherOptions) {
this.launcherOptions = launcherOptions;
}
public void setProgramParameters(String programParameters) {
this.programParameters = programParameters;
}
public void setDescriptorPath(String descriptorPath) {
this.descriptorPath = descriptorPath;
}
public void setRootDirectory(String rootDirectory) {
this.rootDirectory = rootDirectory;
}
public void setLauncherType(int launcherType) {
this.launcherType = launcherType;
}
}
| [
"a.a.eliseyev@gmail.com"
] | a.a.eliseyev@gmail.com |
264d9f96bdda3c437e190e09bdecf0fc203fb4aa | 7c1430c53b4d66ad0e96dd9fc7465a5826fdfb77 | /uims-support/src/cn/edu/sdu/uims/filter/UComboBoxFilter.java | 002e7226e99c941422b8db717f4b400c687eb398 | [] | no_license | wang3624270/online-learning-server | ef97fb676485f2bfdd4b479235b05a95ad62f841 | 2d81920fef594a2d0ac482efd76669c8d95561f1 | refs/heads/master | 2020-03-20T04:33:38.305236 | 2019-05-22T06:31:05 | 2019-05-22T06:31:05 | 137,187,026 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,345 | java | package cn.edu.sdu.uims.filter;
import java.util.List;
import cn.edu.sdu.uims.util.UimsUtils;
public class UComboBoxFilter extends UFilter {
protected boolean addSelectItem = true;
protected boolean addAllItem = false;
public void init(String parameter){
if(parameter != null && parameter.length() != 0) {
addSelectItem = false;
addAllItem = false;
int index = parameter.indexOf(";");
if(index < 0) {
if(parameter.equals("select"))
addSelectItem = true;
else
addAllItem = true;
}else {
addSelectItem = true;
addAllItem = true;
}
}
}
public void addAddedItem(){
if(arrayObject == null || arrayObject.length <= 1)
return;
int count = 0;
if(addSelectItem)
count ++;
if(addAllItem)
count ++;
if(count == 0)
return;
Object []p = arrayObject;
arrayObject = new Object[p.length+count];
count=0;
if(addSelectItem){
arrayObject[count++] = UimsUtils.getPleaseSelectInfo();
}
if (addAllItem){
arrayObject[count++] =UimsUtils.getSelectAllInfo("-2");
}
for(int i = 0; i < p.length;i++) {
arrayObject[count+i]= p[i];
}
}
public void setAddedData(Object[] a) {
arrayObject = a;
addAddedItem();
}
public void setAddedData(List a) {
if (a != null) {
arrayObject = a.toArray();
} else {
arrayObject = null;
}
addAddedItem();
}
}
| [
"3624270@qq.com"
] | 3624270@qq.com |
f2c3e8c083134323e4f351a69edf6a2b1e7dec84 | 889877dd2129c9717bafc77a84408f287fbbdbc3 | /src/main/java/bjl/application/scoretable/IScoreTableAppService.java | 4d05f44d85168376c569d80f51679e454eefe409 | [] | no_license | zhouxhhn/voto | 3cf1405045e81230398cb273cfeaf9ee95b86ac5 | 66fc84c1b6b536be51b84895aa2be316618d3d49 | refs/heads/master | 2020-03-26T23:08:11.746765 | 2018-08-21T05:54:02 | 2018-08-21T05:54:02 | 145,513,289 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 409 | java | package bjl.application.scoretable;
import bjl.websocket.command.WSMessage;
import java.util.List;
import java.util.Map;
/**
* Created by zhangjin on 2018/4/28
*/
public interface IScoreTableAppService {
void create(Integer hallType, Integer boots, Integer games, Map<String,WSMessage> map);
List<Object[]> get(Integer hallType, Integer boots, Integer games, String dateStr);
}
| [
"joey.zhou@siyue.cn"
] | joey.zhou@siyue.cn |
407aa2060adf30be4a999d5336ae9193f6fdd1bf | 463e346d259bda4bcfcddb62dd9476d4d15b8a31 | /src/main/java/com/beamofsoul/rabbit/management/security/AuthenticationUserDetailsService.java | 4bf64aae8c52d0d7ad0b558c395ed7405d8970bf | [] | no_license | beamofsoul/rabbit | ba6ae5a5b402fe953cced8fb10b67142ebf8f83b | a889946009d6bc32db2f19c0c1645f202f9839f7 | refs/heads/master | 2021-09-07T21:52:19.542983 | 2018-03-01T15:12:30 | 2018-03-01T15:12:30 | 104,691,538 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,448 | java | package com.beamofsoul.rabbit.management.security;
import java.util.HashSet;
import java.util.Set;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Component;
import com.beamofsoul.rabbit.primary.entity.Role;
import com.beamofsoul.rabbit.primary.entity.User;
import com.beamofsoul.rabbit.primary.entity.dto.UserExtension;
import com.beamofsoul.rabbit.primary.service.UserService;
/**
* @ClassName AuthenticationUserDetailsService
* @Description {@link org.springframework.security.core.userdetails.UserDetailsService} implementation that customizes the way of loading user by username inputed.
* @author MingshuJian
* @Date 2017年1月19日 下午4:28:32
* @version 1.0.0
*/
@Component
public class AuthenticationUserDetailsService implements UserDetailsService {
@Autowired
private UserService userService;
/*
* (非 Javadoc)
* <p>Title: loadUserByUsername</p>
* <p>Description: load user by user-name from DB, then package it to an {@link com.beamofsoul.rabbit.primary.entity.dto.UserExtension} object instance, return it finally.</p>
* @param username
* @return UserExtension
* @throws UsernameNotFoundException
* @see org.springframework.security.core.userdetails.UserDetailsService#loadUserByUsername(java.lang.String)
*/
@Override
public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
User user = getUser(username);
return convertToUserExtension(user);
}
protected static UserExtension convertToUserExtension(final User user) {
UserExtension userExtension = new UserExtension(
user.getId(), user.getUsername(), user.getPassword(), user.getNickname(), user.getPhotoString(),
true, // if enable is true, otherwise false.
true, // if accountNonExpired is true, otherwise false.
true, // if credentialsNonExpired is true, otherwise false.
true, // if accountNonLocked is true, otherwise false.
getAuthorities(user));
return userExtension;
}
private User getUser(final String username) {
if (StringUtils.isBlank(username))
throw new UsernameNotFoundException("Username is null");
User user = getUser0(username);
if (user == null)
throw new UsernameNotFoundException("User cannot found");
if (user.getStatus().equals(User.Status.LOCKED))
throw new UsernameNotFoundException("User has been locked");
if (user.getRoles() == null || user.getRoles().size() == 0)
throw new UsernameNotFoundException("User has not been allotted any roles");
return user;
}
protected User getUser0(final String username) {
return userService.get(username);
}
protected static Set<GrantedAuthority> getAuthorities(User user) {
Set<GrantedAuthority> authorities = new HashSet<GrantedAuthority>();
for (Role role : user.getRoles())
authorities.add(new SimpleGrantedAuthority("ROLE_" + role.getName().toUpperCase()));
return authorities;
}
}
| [
"beamofsoul@sina.com"
] | beamofsoul@sina.com |
4459a8d6bfbeebce18581cedbc6f5fd6667924b8 | c688ef041d2b655d259f5d3f6964e1db70fa5ca8 | /hasor-dataql/src/main/java/net/hasor/dataql/runtime/inset/AbstractReturn.java | 5605a72b19e3d62a8aaf603340a0ba1695401ce3 | [
"Apache-2.0"
] | permissive | huangcheng1977/hasor | e236157d8c1790a4ea5204790342e6cd9bf6da3c | 42e71beb65e29cf1a39c34332e2d11879c89f6cb | refs/heads/master | 2021-05-08T03:28:08.448460 | 2017-10-17T12:47:51 | 2017-10-17T12:47:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,811 | java | /*
* Copyright 2008-2009 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 net.hasor.dataql.runtime.inset;
import net.hasor.dataql.result.LambdaModel;
import net.hasor.dataql.runtime.InsetProcess;
import net.hasor.dataql.runtime.InstSequence;
import net.hasor.dataql.runtime.LambdaCallProxy;
import net.hasor.dataql.runtime.ProcessContet;
import net.hasor.dataql.runtime.mem.MemStack;
import net.hasor.dataql.runtime.mem.StackStruts;
import net.hasor.dataql.runtime.struts.LambdaCallStruts;
/**
* 特殊处理结果,兼容 return 、throw、exit 时返回一个 lambda 的情况。
* @see net.hasor.dataql.runtime.inset.ERR
* @see net.hasor.dataql.runtime.inset.EXIT
* @author 赵永春(zyc@hasor.net)
* @version : 2017-07-19
*/
abstract class AbstractReturn implements InsetProcess {
protected Object specialProcess(InstSequence sequence, MemStack memStack, StackStruts local, ProcessContet context, Object result) {
if (result instanceof LambdaCallStruts) {
int callAddress = ((LambdaCallStruts) result).getMethod();
InstSequence methodSeq = sequence.methodSet(callAddress);
result = new LambdaModel(new LambdaCallProxy(methodSeq, memStack, local, context));
}
return result;
}
} | [
"zyc@hasor.net"
] | zyc@hasor.net |
1d3414137c3cb2a47a30d5dca07439f6575205a3 | 82a63450170301f08cdc5e2ba4daa172300c1a75 | /hc-sd-service/src/main/java/com/hc/scm/sd/service/BlCoService.java | 5c36e31170699a6bd6765f562cbebbee529ea671 | [] | no_license | lijinxi/hc-sd | 349837af9b1d962268ec23e34bfae757d9c65b09 | 3a511fd2e4ffdab872b76e7c4af92a9f5b14609d | refs/heads/master | 2021-01-10T08:42:58.242246 | 2015-12-17T07:36:04 | 2015-12-17T07:36:04 | 47,670,955 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 383 | java | package com.hc.scm.sd.service;
import com.hc.scm.common.base.service.BaseCrudService;
/**
* Description: ��������;
* All rights Reserved, Designed Byhc* Copyright: Copyright(C) 2014-2015
* Company: Wonhigh.
* @author: user
* @date: 2015-03-27 14:58:13
* @version 1.0.0
*/
public interface BlCoService extends BaseCrudService {
} | [
"1767270730@qq.com"
] | 1767270730@qq.com |
6e140cdd6920084b077f4d6a5cfbb66cc79a6a97 | 4692a13a5cf139cb89549e7791337c6e7568fdd5 | /KAMP-Nightly/de.uka.ipd.sdq.pcm.fieldofactivityannotations.edit/src/de/uka/ipd/sdq/fieldOfActivityAnnotations/provider/SourceFileAggregationItemProvider.java | 1bb70c0dfb3386b1176ea85fb6a8de1586679124 | [] | no_license | SQuAT-Team/kamp-test | 95b87067d03c3e2ed36912f898a3130e9de40dd9 | 8285478066a760fcd2ed1972b799c6895493d256 | refs/heads/master | 2022-06-26T21:29:19.209964 | 2019-04-01T11:53:59 | 2019-04-01T11:53:59 | 56,880,344 | 0 | 1 | null | 2021-06-03T19:33:40 | 2016-04-22T19:31:42 | Java | UTF-8 | Java | false | false | 5,769 | java | /**
*/
package de.uka.ipd.sdq.fieldOfActivityAnnotations.provider;
import de.uka.ipd.sdq.fieldOfActivityAnnotations.FieldOfActivityAnnotationsPackage;
import de.uka.ipd.sdq.fieldOfActivityAnnotations.SourceFileAggregation;
import de.uka.ipd.sdq.identifier.provider.IdentifierItemProvider;
import java.util.Collection;
import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
/**
* This is the item provider adapter for a {@link de.uka.ipd.sdq.fieldOfActivityAnnotations.SourceFileAggregation} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class SourceFileAggregationItemProvider
extends IdentifierItemProvider
implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
IItemLabelProvider,
IItemPropertySource { /**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public SourceFileAggregationItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
addNumberOfSourceFilesPropertyDescriptor(object);
addComponentPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
* This adds a property descriptor for the Number Of Source Files feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addNumberOfSourceFilesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SourceFileAggregation_numberOfSourceFiles_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SourceFileAggregation_numberOfSourceFiles_feature", "_UI_SourceFileAggregation_type"),
FieldOfActivityAnnotationsPackage.Literals.SOURCE_FILE_AGGREGATION__NUMBER_OF_SOURCE_FILES,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
/**
* This adds a property descriptor for the Component feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addComponentPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SourceFileAggregation_component_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SourceFileAggregation_component_feature", "_UI_SourceFileAggregation_type"),
FieldOfActivityAnnotationsPackage.Literals.SOURCE_FILE_AGGREGATION__COMPONENT,
true,
false,
true,
null,
null,
null));
}
/**
* This returns SourceFileAggregation.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/SourceFileAggregation"));
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
String label = ((SourceFileAggregation)object).getId();
return label == null || label.length() == 0 ?
getString("_UI_SourceFileAggregation_type") :
getString("_UI_SourceFileAggregation_type") + " " + label;
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(SourceFileAggregation.class)) {
case FieldOfActivityAnnotationsPackage.SOURCE_FILE_AGGREGATION__NUMBER_OF_SOURCE_FILES:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
super.notifyChanged(notification);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
}
/**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public ResourceLocator getResourceLocator() {
return FieldOfActivityAnnotationsEditPlugin.INSTANCE;
}
}
| [
"alejandrorago@MacBook-Pro.local"
] | alejandrorago@MacBook-Pro.local |
643e76a26a863a53fc183f587087dc128f81124b | 7ea86bd555d7daaf0d5c55c5b6186f38ef7fd79e | /src/main/java/nl/topicus/jdbc/statement/AbstractTablePartWorker.java | 7711b86fba69ae30555dfd00ae489d6335d27177 | [
"MIT"
] | permissive | Decoydoll/spanner-jdbc | d69589ed5a8793f4383428e96f442936975adbf1 | 89d687933beebb548d054cc16356f3ba1850f811 | refs/heads/master | 2020-03-11T06:30:50.637498 | 2018-04-15T12:02:17 | 2018-04-15T12:02:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,742 | java | package nl.topicus.jdbc.statement;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.util.List;
import java.util.concurrent.Callable;
import com.google.cloud.spanner.SpannerException;
import com.google.rpc.Code;
import net.sf.jsqlparser.schema.Table;
import net.sf.jsqlparser.statement.select.Select;
import nl.topicus.jdbc.CloudSpannerConnection;
import nl.topicus.jdbc.CloudSpannerDriver;
import nl.topicus.jdbc.exception.CloudSpannerSQLException;
public abstract class AbstractTablePartWorker implements Callable<ConversionResult>
{
private enum Mode
{
UNKNOWN, NORMAL, EXTENDED;
}
enum DMLOperation
{
INSERT, ONDUPLICATEKEYUPDATE, UPDATE, DELETE;
}
protected final CloudSpannerConnection connection;
protected final Select select;
/**
* This flag indicates whether the worker should go into 'extended' mode if
* the number of records/mutations is expected to exceed the limitations of
* Cloud Spanner. Extended mode means that a separate connection will be
* opened and that the inserts will be performed on that connection. These
* inserts will also be committed automatically, and there is no guarantee
* that the entire insert operation will succeed (the insert is not
* performed atomically)
*/
private boolean allowExtendedMode;
private Mode mode = Mode.UNKNOWN;
protected final DMLOperation operation;
private final ParameterStore parameters;
private long estimatedRecordCount = -1;
private long recordCount = 0;
AbstractTablePartWorker(CloudSpannerConnection connection, Select select, ParameterStore parameters,
boolean allowExtendedMode, DMLOperation operation)
{
this.connection = connection;
this.select = select;
this.parameters = parameters;
this.allowExtendedMode = allowExtendedMode;
this.operation = operation;
}
@Override
public ConversionResult call()
{
Exception exception = null;
long startTime = System.currentTimeMillis();
try
{
genericRun();
}
catch (Exception e)
{
exception = e;
}
long endTime = System.currentTimeMillis();
return new ConversionResult(recordCount, 0, startTime, endTime, exception);
}
protected void genericRun() throws SQLException
{
String unquotedTableName = CloudSpannerDriver.unquoteIdentifier(getTable().getName());
List<String> columnNamesList = getColumnNames();
long batchSize = ConverterUtils.calculateActualBatchSize(columnNamesList.size(), connection, null, null,
unquotedTableName);
boolean isExtendedMode = isExtendedMode(batchSize);
boolean wasAutocommit = connection.getAutoCommit();
if (!isExtendedMode && wasAutocommit)
{
connection.setAutoCommit(false);
}
try (Connection destination = isExtendedMode ? connection.createCopyConnection() : null)
{
if (destination != null)
{
destination.setAutoCommit(false);
}
String sql = createSQL();
try (PreparedStatement statement = destination == null ? connection.prepareStatement(sql)
: destination.prepareStatement(sql))
{
if (operation == DMLOperation.UPDATE)
{
// Set force update
((CloudSpannerPreparedStatement) statement).setForceUpdate(true);
}
CloudSpannerPreparedStatement selectStatement = connection.prepareStatement(select.toString());
for (int i = 1; i <= parameters.getHighestIndex(); i++)
{
selectStatement.setObject(i, parameters.getParameter(i));
}
try (ResultSet rs = selectStatement.executeQuery())
{
ResultSetMetaData metadata = rs.getMetaData();
while (rs.next())
{
for (int index = 1; index <= metadata.getColumnCount(); index++)
{
Object object = rs.getObject(index);
statement.setObject(index, object);
}
statement.executeUpdate();
recordCount++;
if (destination != null && recordCount % batchSize == 0)
destination.commit();
}
}
}
if (destination != null)
{
destination.commit();
}
if (wasAutocommit && !isExtendedMode)
{
connection.commit();
connection.setAutoCommit(true);
}
}
catch (SpannerException e)
{
throw new CloudSpannerSQLException(e);
}
catch (CloudSpannerSQLException e)
{
throw e;
}
catch (Exception e)
{
throw new CloudSpannerSQLException(e.getMessage(), Code.UNKNOWN, e);
}
finally
{
if (wasAutocommit && !isExtendedMode)
{
connection.rollback();
connection.setAutoCommit(true);
}
}
}
protected abstract List<String> getColumnNames() throws SQLException;
protected abstract Table getTable();
protected abstract String createSQL() throws SQLException;
protected long getEstimatedRecordCount(Select select) throws SQLException
{
if (estimatedRecordCount == -1)
{
String sql = "SELECT COUNT(*) AS C FROM (" + select.toString() + ") Q";
try (ResultSet count = connection.prepareStatement(sql).executeQuery())
{
if (count.next())
estimatedRecordCount = count.getLong(1);
}
}
return estimatedRecordCount;
}
protected boolean isExtendedMode(long batchSize) throws SQLException
{
if (mode == Mode.UNKNOWN)
{
if (!allowExtendedMode)
{
mode = Mode.NORMAL;
}
else
{
long count = getEstimatedRecordCount(select);
if (count >= batchSize)
{
mode = Mode.EXTENDED;
}
else
{
mode = Mode.NORMAL;
}
}
}
return mode == Mode.EXTENDED;
}
public long getRecordCount()
{
return recordCount;
}
}
| [
"koloite@gmail.com"
] | koloite@gmail.com |
9a6a7e71ead662668c5d156ee168add4fa40500f | 5a86421f61da5c7faf7443defb06423f18565332 | /configserver/src/main/java/com/yahoo/vespa/config/server/rpc/ConfigResponseFactory.java | 07e07fa25950b9fa11047185347f3140fcd00ba5 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | t1707/vespa | 1d62116f4345dbc5020dbfcab1fc2934e82e5d68 | 9f4859e9996ac9913ce80ed9b209f683507fe157 | refs/heads/master | 2021-04-03T06:24:10.556834 | 2018-03-08T17:02:09 | 2018-03-08T17:02:09 | 124,473,863 | 0 | 0 | Apache-2.0 | 2018-03-15T06:06:27 | 2018-03-09T02:07:53 | Java | UTF-8 | Java | false | false | 1,047 | java | // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.config.server.rpc;
import com.yahoo.config.codegen.InnerCNode;
import com.yahoo.vespa.config.ConfigPayload;
import com.yahoo.vespa.config.protocol.ConfigResponse;
/**
* Represents a component that creates config responses from a payload. Different implementations
* can do transformations of the payload such as compression.
*
* @author lulf
* @since 5.19
*/
public interface ConfigResponseFactory {
/**
* Create a {@link ConfigResponse} for a given payload and generation.
* @param payload The {@link com.yahoo.vespa.config.ConfigPayload} to put in the response.
* @param defFile The {@link com.yahoo.config.codegen.InnerCNode} def file for this config.
* @param generation The payload generation. @return A {@link ConfigResponse} that can be sent to the client.
*/
ConfigResponse createResponse(ConfigPayload payload, InnerCNode defFile, long generation);
}
| [
"bratseth@yahoo-inc.com"
] | bratseth@yahoo-inc.com |
afff25a1ada2e4077bb72e34324f29a9ade78906 | 3659875802aec87a3ab191c09388d59b63869380 | /spring_02_di/src/main/java/prob02/MemDaoImp.java | 98908540e112dd9c026493d9546d77511334b278 | [] | no_license | hongdaepyo/h1o1n1g1 | fab31dbd459dab78cb380acdec6563eb02cb2534 | 87896497a321440dff589e163cfa5a0644fad559 | refs/heads/master | 2021-06-06T17:38:46.362177 | 2016-12-20T10:47:39 | 2016-12-20T10:47:39 | 64,099,068 | 0 | 0 | null | 2021-05-07T06:13:59 | 2016-07-25T02:55:09 | Java | UTF-8 | Java | false | false | 247 | java | package prob02;
public class MemDaoImp {
public MemDaoImp() {
}
public void selectMethod(){
System.out.println("레코드 출력");
}
public void insertMethod(){
System.out.println("레코드 삽입");
}
}
| [
"h1o1n1g1@nate.com"
] | h1o1n1g1@nate.com |
42c25c89d2c9a3e1d30926503185dbd9b0a998fd | a82ffa9487703b15ed9af9d8e791129c24b3e6a2 | /1.JavaSyntax/src/com/javarush/task/task07/task0717/Solution.java | d81fbe01209b7c1e01cedbdaf3abcd08e2bd1a45 | [] | no_license | dinikoff/JavaRushTasks | 53d9b31acfdd154d847045debb410297e848ac7a | d7ecd4b0ec6acdb93c33301aa738138e4ce3ca8f | refs/heads/master | 2020-03-20T11:16:57.260238 | 2018-10-31T19:01:27 | 2018-10-31T19:01:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,031 | java | package com.javarush.task.task07.task0717;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
/*
Удваиваем слова
*/
public class Solution {
public static void main(String[] args) throws Exception {
// Считать строки с консоли и объявить ArrayList list тут
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
ArrayList<String> list = new ArrayList<>();
for (int i = 0; i < 10; i++) {
list.add(reader.readLine());
}
ArrayList<String> result = doubleValues(list);
// Вывести на экран result
for (String s : list) {
System.out.println(s);
}
}
public static ArrayList<String> doubleValues(ArrayList<String> list) {
//напишите тут ваш код
for (int i = 0; i < list.size(); i++) {
list.add(i, list.get(i++));
}
return list;
}
}
| [
"zarazablin@gmail.com"
] | zarazablin@gmail.com |
cc8ee569939b76a1068663b6a1ee7914aed325d0 | e737a537195a431fe255fa3839a1e337d806a372 | /java/src/concurrencies/high_level_concurrency_objects/executors/threadpools/ScheduledRequestHandler.java | e9af9e594408bb49fa248362359c46074ae26a4e | [] | no_license | iceleeyo/concurrency | 132e9444fe20e5c80efd5c13d477af7e5c3a5d13 | fa8a1d1ccad92330c17ae4b7e34d17c65076a7a4 | refs/heads/master | 2023-05-09T09:11:36.706861 | 2020-09-10T10:52:15 | 2020-09-10T10:52:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 969 | java | package threadpools;
import java.util.concurrent.atomic.AtomicInteger;
/**
*
*
* @author EMAIL:vuquangtin@gmail.com , tel:0377443333
* @version 1.0.0
* @see <a href="https://github.com/vuquangtin/concurrency">https://github.com/
* vuquangtin/concurrency</a>
*
*/
public class ScheduledRequestHandler implements Runnable {
String name;
AtomicInteger i;
public ScheduledRequestHandler(String name) {
this.name = name;
this.i = new AtomicInteger(1);
}
@Override
public void run() {
try {
// Bắt đầu xử lý request đến
System.out.println(Thread.currentThread().getName() + " Starting process " + name + i.get());
// cho ngủ 500 milis để ví dụ là quá trình xử lý mất 0,5 s
Thread.sleep(500);
// Kết thúc xử lý request
System.out.println(Thread.currentThread().getName() + " Finished process " + name + i.getAndIncrement());
} catch (InterruptedException e) {
e.printStackTrace();
}
}
} | [
"vuquangtin@gmail.com"
] | vuquangtin@gmail.com |
ea91ab22a4e8190f6fca7dc7a61df836a18c3a63 | 487739942e747ea005d001ceb439e53cd0d215c7 | /src/net/kagani/game/npc/familiar/impl/Adamantminotaur.java | 6bb54d140487db3639dfc9ac76bb24d0aa75f609 | [] | no_license | 99max99/PhoenixRisingServer | fbdc61eff78de3a4d29caa1eaa8c67837b73840f | 1815a47c071b7351baa1eb0178ffe6b965e8ccf4 | refs/heads/master | 2021-01-11T10:29:06.968358 | 2016-12-29T02:01:23 | 2016-12-29T02:01:23 | 76,208,559 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,212 | java | package net.kagani.game.npc.familiar.impl;
import net.kagani.game.Animation;
import net.kagani.game.Graphics;
import net.kagani.game.WorldTile;
import net.kagani.game.npc.familiar.Familiar;
import net.kagani.game.player.Player;
import net.kagani.game.player.actions.Summoning.Pouch;
public class Adamantminotaur extends Familiar {
private static final long serialVersionUID = -4657392160246588028L;
public Adamantminotaur(Player owner, Pouch pouch, WorldTile tile,
int mapAreaNameHash, boolean canBeAttackFromOutOfArea) {
super(owner, pouch, tile, mapAreaNameHash, canBeAttackFromOutOfArea);
}
@Override
public String getSpecialName() {
return "Bull Rush";
}
@Override
public String getSpecialDescription() {
return "A magical attack doing up to 40 life points of damage while stunning an opponent.";
}
@Override
public int getBOBSize() {
return 0;
}
@Override
public int getSpecialAmount() {
return 6;
}
@Override
public SpecialAttack getSpecialAttack() {
return SpecialAttack.ENTITY;
}
@Override
public boolean submitSpecial(Object object) {
getOwner().setNextGraphics(new Graphics(1316));
getOwner().setNextAnimation(new Animation(7660));
return false;
}
}
| [
"emrosswarone@gmail.com"
] | emrosswarone@gmail.com |
0baeef02f557ed6b97e86d604fbed2a0a5eadf80 | 16f31f7eca419619e04b93a39f0499aac9209419 | /projects/hm-ui/src/main/java/org/homemotion/ui/admin/calendar/ListProvider.java | bbdea5428c31cb669729c4d598a5cc54097cbbe0 | [] | no_license | basmababa/homemotion | 7570b12af052d52f4ca4fe4edf74cc0760cf9656 | 106012c0d304910867f15ac7911d60597e18c036 | refs/heads/master | 2020-12-26T03:55:01.244933 | 2013-09-05T06:33:29 | 2013-09-05T06:33:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,949 | java | package org.homemotion.ui.admin.calendar;
//
//import java.util.ArrayList;
//import java.util.List;
//
//import javax.faces.bean.ApplicationScoped;
//import javax.faces.bean.ManagedBean;
//import javax.faces.model.SelectItem;
//import javax.inject.Inject;
//
//import org.homemotion.calendar.Calendar;
//import org.homemotion.calendar.CalendarManager;
//import org.homemotion.calendar.CalendarType;
//import org.homemotion.calendar.CombinationType;
//
//@ManagedBean(name="calendarLists")
//@ApplicationScoped
//public final class ListProvider {
//
// @Inject
// private CalendarManager calendarManager;
//
// public List<SelectItem> getAllCalendars() {
// List<SelectItem> selectItems = new ArrayList<SelectItem>();
// List<Calendar> items = calendarManager.getAllItems();
// for (Calendar item : items) {
// selectItems.add(new SelectItem(item, item.getName()));
// }
// return selectItems;
// }
//
// public List<SelectItem> getAllCalendarTypes() {
// List<SelectItem> selectItems = new ArrayList<SelectItem>();
// List<Class<CalendarType>> types = calendarManager.getTypes();
// for (Class<CalendarType> type : types) {
// selectItems.add(new SelectItem(type, type.getSimpleName()));
// }
// return selectItems;
// }
//
// public List<SelectItem> getAllCalendarTypeNames() {
// List<SelectItem> selectItems = new ArrayList<SelectItem>();
// List<Class<CalendarType>> types = calendarManager.getTypes();
// for (Class<CalendarType> type : types) {
// selectItems.add(new SelectItem(type.getName(), type.getSimpleName()));
// }
// return selectItems;
// }
//
// public List<SelectItem> getAllCalendarCombinationTypes() {
// List<SelectItem> selectItems = new ArrayList<SelectItem>(CombinationType.values().length);
// for (CombinationType type : CombinationType.values()) {
// selectItems.add(new SelectItem(type));
// }
// return selectItems;
// }
//
//}
| [
"atsticks@gmail.com"
] | atsticks@gmail.com |
dd016fec7930f5e700503720238c33adfd314099 | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Chart/7/org/jfree/chart/plot/WaferMapPlot_draw_235.java | 606998913c4509a1d158fd76454e13345759f94b | [] | no_license | hvdthong/NetML | dca6cf4d34c5799b400d718e0a6cd2e0b167297d | 9bb103da21327912e5a29cbf9be9ff4d058731a5 | refs/heads/master | 2021-06-30T15:03:52.618255 | 2020-10-07T01:58:48 | 2020-10-07T01:58:48 | 150,383,588 | 1 | 1 | null | 2018-09-26T07:08:45 | 2018-09-26T07:08:44 | null | UTF-8 | Java | false | false | 1,133 | java |
org jfree chart plot
wafer map plot
wafer map plot wafermapplot plot render chang listen rendererchangelisten
draw wafermap view
param graphic devic
param area plot area
param anchor anchor point code code permit
param state plot state
param info plot render info
draw graphics2 graphics2d rectangle2 rectangle2d area point2 point2d anchor
plot state plotstat state
plot render info plotrenderinginfo info
plot area small
area width getwidth minimum width draw
area height getheight minimum height draw
record plot area
info
info set plot area setplotarea area
adjust draw area plot inset
rectangl inset rectangleinset inset inset getinset
inset trim area
draw chip grid drawchipgrid area
draw wafer edg drawwaferedg area
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
4277427d15bf4a2c6d41ce31f070e4717bf1e04f | ee54a4de8d7f958d504e95b8a791efa7bf5619bd | /demo03/book-web/src/main/java/org/agoncal/talk/msexperience/demo03/bookweb/repository/CustomAuditEventRepository.java | c3dd4478640b4c2b273581a6ac9692d9c4513749 | [] | no_license | agoncal/agoncal-talk-17msexperience | 5598eddac1ce0a22abab6a7b1bb8e0ed5c6c2a72 | ac12258b6eb840d83f4f2ef03459bb76fa0b7c44 | refs/heads/master | 2021-01-20T04:04:43.959748 | 2017-10-03T10:28:01 | 2017-10-03T10:28:01 | 101,380,349 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,749 | java | package org.agoncal.talk.msexperience.demo03.bookweb.repository;
import org.agoncal.talk.msexperience.demo03.bookweb.config.Constants;
import org.agoncal.talk.msexperience.demo03.bookweb.config.audit.AuditEventConverter;
import org.agoncal.talk.msexperience.demo03.bookweb.domain.PersistentAuditEvent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.actuate.audit.AuditEvent;
import org.springframework.boot.actuate.audit.AuditEventRepository;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* An implementation of Spring Boot's AuditEventRepository.
*/
@Repository
public class CustomAuditEventRepository implements AuditEventRepository {
private static final String AUTHORIZATION_FAILURE = "AUTHORIZATION_FAILURE";
/**
* Should be the same as in Liquibase migration.
*/
protected static final int EVENT_DATA_COLUMN_MAX_LENGTH = 255;
private final PersistenceAuditEventRepository persistenceAuditEventRepository;
private final AuditEventConverter auditEventConverter;
private final Logger log = LoggerFactory.getLogger(getClass());
public CustomAuditEventRepository(PersistenceAuditEventRepository persistenceAuditEventRepository,
AuditEventConverter auditEventConverter) {
this.persistenceAuditEventRepository = persistenceAuditEventRepository;
this.auditEventConverter = auditEventConverter;
}
@Override
public List<AuditEvent> find(Date after) {
Iterable<PersistentAuditEvent> persistentAuditEvents =
persistenceAuditEventRepository.findByAuditEventDateAfter(after.toInstant());
return auditEventConverter.convertToAuditEvent(persistentAuditEvents);
}
@Override
public List<AuditEvent> find(String principal, Date after) {
Iterable<PersistentAuditEvent> persistentAuditEvents;
if (principal == null && after == null) {
persistentAuditEvents = persistenceAuditEventRepository.findAll();
} else if (after == null) {
persistentAuditEvents = persistenceAuditEventRepository.findByPrincipal(principal);
} else {
persistentAuditEvents =
persistenceAuditEventRepository.findByPrincipalAndAuditEventDateAfter(principal, after.toInstant());
}
return auditEventConverter.convertToAuditEvent(persistentAuditEvents);
}
@Override
public List<AuditEvent> find(String principal, Date after, String type) {
Iterable<PersistentAuditEvent> persistentAuditEvents =
persistenceAuditEventRepository.findByPrincipalAndAuditEventDateAfterAndAuditEventType(principal, after.toInstant(), type);
return auditEventConverter.convertToAuditEvent(persistentAuditEvents);
}
@Override
@Transactional(propagation = Propagation.REQUIRES_NEW)
public void add(AuditEvent event) {
if (!AUTHORIZATION_FAILURE.equals(event.getType()) &&
!Constants.ANONYMOUS_USER.equals(event.getPrincipal())) {
PersistentAuditEvent persistentAuditEvent = new PersistentAuditEvent();
persistentAuditEvent.setPrincipal(event.getPrincipal());
persistentAuditEvent.setAuditEventType(event.getType());
persistentAuditEvent.setAuditEventDate(event.getTimestamp().toInstant());
Map<String, String> eventData = auditEventConverter.convertDataToStrings(event.getData());
persistentAuditEvent.setData(truncate(eventData));
persistenceAuditEventRepository.save(persistentAuditEvent);
}
}
/**
* Truncate event data that might exceed column length.
*/
private Map<String, String> truncate(Map<String, String> data) {
Map<String, String> results = new HashMap<>();
if (data != null) {
for (Map.Entry<String, String> entry : data.entrySet()) {
String value = entry.getValue();
if (value != null) {
int length = value.length();
if (length > EVENT_DATA_COLUMN_MAX_LENGTH) {
value = value.substring(0, EVENT_DATA_COLUMN_MAX_LENGTH);
log.warn("Event data for {} too long ({}) has been truncated to {}. Consider increasing column width.",
entry.getKey(), length, EVENT_DATA_COLUMN_MAX_LENGTH);
}
}
results.put(entry.getKey(), value);
}
}
return results;
}
}
| [
"antonio.goncalves@gmail.com"
] | antonio.goncalves@gmail.com |
3e2b8a28a3c64d88e70daebb237c613c47272804 | bdbe5a43b629821d04c6f27dc86bd6671a859cd5 | /src/main/java/com/yundao/customer/h5/constant/CodeConstant.java | 0e57e72e967f552a0e6d0cbf3c508c2f9d36e098 | [] | no_license | wucaiqiang/yundao-customer_h5 | dabc4f26b1f4c0c3561384044571642cc5b16010 | f27c4acae98bbd70d1587c66cac55e65532a93ab | refs/heads/master | 2021-08-30T15:03:15.191146 | 2017-12-18T11:16:00 | 2017-12-18T11:16:00 | 114,631,913 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 775 | java | package com.yundao.customer.h5.constant;
/**
* 提示编码常量
*
* @author jan
* @create 2017-07-20 PM1:51
**/
public interface CodeConstant {
/**
* 域名未授权
*/
int CODE_1300001 = 1300001;
/**
* 图片验证码类型不能为空
*/
int CODE_1300002 = 1300002;
/**
* 验证码不能为空
*/
int CODE_1300003 = 1300003;
/**
* 图片验证码有误
*/
int CODE_1300004 = 1300004;
/**
* 手机号码不能为空
*/
int CODE_1300005 = 1300005;
/**
* 未认证登录
*/
int CODE_1300006 = 1300006;
/**
* 登录已过期
*/
int CODE_1300007 = 1300007;
/**
* 用户信息不存在
*/
int CODE_1300008 = 1300008;
}
| [
"wucaiqiang@zcmall.com"
] | wucaiqiang@zcmall.com |
9c1fa25ed1d9348911edfb67cc645569695be675 | 97fd02f71b45aa235f917e79dd68b61c62b56c1c | /src/main/java/com/tencentcloudapi/cwp/v20180228/models/DescribeAssetWebLocationListResponse.java | d32cf682830261aef5fc0853cf333622c2afdfbc | [
"Apache-2.0"
] | permissive | TencentCloud/tencentcloud-sdk-java | 7df922f7c5826732e35edeab3320035e0cdfba05 | 09fa672d75e5ca33319a23fcd8b9ca3d2afab1ec | refs/heads/master | 2023-09-04T10:51:57.854153 | 2023-09-01T03:21:09 | 2023-09-01T03:21:09 | 129,837,505 | 537 | 317 | Apache-2.0 | 2023-09-13T02:42:03 | 2018-04-17T02:58:16 | Java | UTF-8 | Java | false | false | 4,250 | java | /*
* Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.tencentcloudapi.cwp.v20180228.models;
import com.tencentcloudapi.common.AbstractModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;
public class DescribeAssetWebLocationListResponse extends AbstractModel{
/**
* 记录总数
*/
@SerializedName("Total")
@Expose
private Long Total;
/**
* 站点列表
注意:此字段可能返回 null,表示取不到有效值。
*/
@SerializedName("Locations")
@Expose
private AssetWebLocationBaseInfo [] Locations;
/**
* 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
@SerializedName("RequestId")
@Expose
private String RequestId;
/**
* Get 记录总数
* @return Total 记录总数
*/
public Long getTotal() {
return this.Total;
}
/**
* Set 记录总数
* @param Total 记录总数
*/
public void setTotal(Long Total) {
this.Total = Total;
}
/**
* Get 站点列表
注意:此字段可能返回 null,表示取不到有效值。
* @return Locations 站点列表
注意:此字段可能返回 null,表示取不到有效值。
*/
public AssetWebLocationBaseInfo [] getLocations() {
return this.Locations;
}
/**
* Set 站点列表
注意:此字段可能返回 null,表示取不到有效值。
* @param Locations 站点列表
注意:此字段可能返回 null,表示取不到有效值。
*/
public void setLocations(AssetWebLocationBaseInfo [] Locations) {
this.Locations = Locations;
}
/**
* Get 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @return RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public String getRequestId() {
return this.RequestId;
}
/**
* Set 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @param RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public void setRequestId(String RequestId) {
this.RequestId = RequestId;
}
public DescribeAssetWebLocationListResponse() {
}
/**
* NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
* and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
*/
public DescribeAssetWebLocationListResponse(DescribeAssetWebLocationListResponse source) {
if (source.Total != null) {
this.Total = new Long(source.Total);
}
if (source.Locations != null) {
this.Locations = new AssetWebLocationBaseInfo[source.Locations.length];
for (int i = 0; i < source.Locations.length; i++) {
this.Locations[i] = new AssetWebLocationBaseInfo(source.Locations[i]);
}
}
if (source.RequestId != null) {
this.RequestId = new String(source.RequestId);
}
}
/**
* Internal implementation, normal users should not use it.
*/
public void toMap(HashMap<String, String> map, String prefix) {
this.setParamSimple(map, prefix + "Total", this.Total);
this.setParamArrayObj(map, prefix + "Locations.", this.Locations);
this.setParamSimple(map, prefix + "RequestId", this.RequestId);
}
}
| [
"tencentcloudapi@tencent.com"
] | tencentcloudapi@tencent.com |
80b4a965418d912af2986460cfa22a85269fc080 | 0eb6e7bebd6402ff5686ce5f3dc76c5d5a9f7f52 | /src/entity/choice/action/PreventChoiceAction.java | c280ba5da1619fd5df45486b62002c46e7503659 | [] | no_license | RedEyedMars/HavenSeekers | d4a33263999ab792eed63674795f101a1ac4fc3e | 696cd49ba76e10bb66a19ff28500df467dd97d35 | refs/heads/master | 2021-01-17T14:17:22.359289 | 2016-06-27T20:15:16 | 2016-06-27T20:15:16 | 53,218,344 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 236 | java | package entity.choice.action;
import misc.action.Action;
import entity.choice.Choice;
public class PreventChoiceAction implements Action<Choice> {
@Override
public void act(Choice subject) {
subject.addProperty("prevent");
}
}
| [
"greg_estouffey@hotmail.com"
] | greg_estouffey@hotmail.com |
5dd484aacb236c1782c2fa200b7c9b364b5735ed | 47b7aab1d865bc36b5727fb61fd6c6fa84fe6365 | /modules/rmi/src/org/apache/axis2/rmi/deploy/ClassDeployer.java | fc868520004316ebc550cdfe79969850188a9e52 | [
"Apache-2.0"
] | permissive | wso2/wso2-axis2 | a4150ad2acc0d5d26dae69983ca6b6ea80dc22ab | 8492fe63852762f51643d7520481198434aff236 | refs/heads/master | 2023-09-05T02:40:36.069413 | 2023-08-23T03:19:35 | 2023-08-23T03:19:35 | 16,400,174 | 40 | 215 | Apache-2.0 | 2023-08-23T02:48:14 | 2014-01-31T05:15:02 | Java | UTF-8 | Java | false | false | 4,360 | java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.axis2.rmi.deploy;
import org.apache.axis2.AxisFault;
import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.description.AxisOperation;
import org.apache.axis2.description.AxisService;
import org.apache.axis2.description.Parameter;
import org.apache.axis2.description.WSDL11ToAxisServiceBuilder;
import org.apache.axis2.rmi.Configurator;
import org.apache.axis2.rmi.exception.MetaDataPopulateException;
import org.apache.axis2.rmi.exception.SchemaGenerationException;
import org.apache.axis2.rmi.metadata.Operation;
import org.apache.axis2.rmi.metadata.Service;
import org.apache.axis2.rmi.receiver.RMIMessageReciever;
import org.apache.axis2.rmi.wsdl.WSDL11DefinitionBuilder;
import javax.wsdl.Definition;
import javax.xml.namespace.QName;
import java.util.Iterator;
import java.util.List;
public class ClassDeployer {
private ConfigurationContext configurationContext;
private Configurator configurator;
private ClassLoader classLoader;
public ClassDeployer(ConfigurationContext configurationContext,
ClassLoader classLoader) {
this(configurationContext, classLoader, new Configurator());
}
public ClassDeployer(ConfigurationContext configurationContext,
ClassLoader classLoader,
Configurator configurator) {
this.configurationContext = configurationContext;
this.classLoader = classLoader;
this.configurator = configurator;
}
public ClassDeployer(ConfigurationContext configurationContext) {
this(configurationContext, new Configurator());
}
public ClassDeployer(ConfigurationContext configurationContext,
Configurator configurator) {
this.configurationContext = configurationContext;
this.configurator = configurator;
}
public void deployClass(Class serviceClass) throws AxisFault {
Service service = new Service(serviceClass, this.configurator);
try {
service.populateMetaData();
service.generateSchema();
WSDL11DefinitionBuilder definitionBuilder = new WSDL11DefinitionBuilder(service);
Definition definition = definitionBuilder.generateWSDL();
WSDL11ToAxisServiceBuilder builder = new WSDL11ToAxisServiceBuilder(definition, null, null);
AxisService axisService = builder.populateService();
axisService.setClassLoader(this.classLoader);
axisService.addParameter(new Parameter("useOriginalwsdl", "true"));
axisService.addParameter(new Parameter("modifyUserWSDLPortAddress", "true"));
List operations = service.getOperations();
Operation operation = null;
QName qName = null;
AxisOperation axisOperation = null;
RMIMessageReciever messageReciever = new RMIMessageReciever(service);
for (Iterator iter = operations.iterator(); iter.hasNext();) {
operation = (Operation) iter.next();
qName = new QName(operation.getNamespace(), operation.getName());
axisOperation = axisService.getOperation(qName);
axisOperation.setMessageReceiver(messageReciever);
}
configurationContext.deployService(axisService);
} catch (MetaDataPopulateException e) {
throw AxisFault.makeFault(e);
} catch (SchemaGenerationException e) {
throw AxisFault.makeFault(e);
}
}
}
| [
"eranda@wso2.com"
] | eranda@wso2.com |
416129ff6e4c9e21dce2b886e69ee04b2b6e18ee | 2a4bb1f64ee2be519dccc6c3c1225863cca4d12a | /src/main/java/org/scijava/command/UnimplementedCommand.java | 2565239f0d58de90f25fc3924a22e88f66f110cb | [
"BSD-2-Clause"
] | permissive | gitter-badger/scijava-common | 4e630b319f08f7509e591508a1ce9a15bde072c8 | af3701dc45c618be1e2ca2332b9e9d1ae04ef186 | refs/heads/master | 2021-01-17T14:18:33.796525 | 2015-11-11T22:00:37 | 2015-11-11T22:00:37 | 46,082,799 | 0 | 0 | null | 2015-11-12T21:44:31 | 2015-11-12T21:44:31 | null | UTF-8 | Java | false | false | 1,959 | java | /*
* #%L
* SciJava Common shared library for SciJava software.
* %%
* Copyright (C) 2009 - 2015 Board of Regents of the University of
* Wisconsin-Madison, Broad Institute of MIT and Harvard, and Max Planck
* Institute of Molecular Cell Biology and Genetics.
* %%
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS 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.
* #L%
*/
package org.scijava.command;
/**
* A command that is not yet implemented. It exists so that stub commands can
* override it trivially, and act as markers of future functionality.
*
* @author Curtis Rueden
*/
public abstract class UnimplementedCommand extends ContextCommand {
@Override
public void run() {
cancel("This command is not yet implemented.");
}
}
| [
"ctrueden@wisc.edu"
] | ctrueden@wisc.edu |
08a8af1fc866a89555aaeec51ea832a0467e98e1 | ee4d77d67f2c76e3b60590d6e0efb2944fd66b3c | /01_EjemploGrupo2/src/main/java/com/salesianostriana/dam/ejemploweb/controllers/MainController.java | 3113389dc569954627d2734f8e84f5da386cf9b8 | [] | no_license | lmlopezmagana/ad-psp-springboot-20-21 | 40790ff2f0a25aeae84dbaa7e91b78efb29a0c1f | e3375d3f0dca4259bf3b881f623e03f7972cc5a9 | refs/heads/master | 2022-12-31T10:13:42.412620 | 2020-10-18T09:57:30 | 2020-10-18T09:57:30 | 297,556,791 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 623 | java | package com.salesianostriana.dam.ejemploweb.controllers;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import java.time.LocalDateTime;
@Controller
public class MainController {
@GetMapping("/")
public String welcome(Model model) {
model.addAttribute("mensaje", "Los alumnos de 2º DAM de hoy están un poco empanaos");
return "index";
}
@GetMapping("/now")
public String now(Model model) {
model.addAttribute("ahora", LocalDateTime.now());
return "lahora";
}
}
| [
"luismi.lopez@salesianos.edu"
] | luismi.lopez@salesianos.edu |
7345fdcf361104250d9dc37983dc28ea45f882e1 | 9a474ca5b0649fbfd510c3c38f344d20e07cd343 | /sports-dmp/sports-dmp-service/src/main/java/com/efida/sports/dmp/utils/SequenceUtil.java | ec623e66442b325f5b049857a8cd43b624c39ff8 | [] | no_license | lqdcanty/znty | 8c8d1468bbc7d365708c166800e1fdbef464f96b | f2175d9adc823e33b04444b32b526ce82e054273 | refs/heads/master | 2020-05-13T19:13:45.738087 | 2019-04-16T09:04:09 | 2019-04-16T09:04:09 | 181,652,152 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,367 | java | /**
* efida.com.cn Inc.
* Copyright (c) 2004-2016 All Rights Reserved.
*/
package com.efida.sports.dmp.utils;
/**
*
* @author wangyi
* @version $Id: SequenceUtil.java, v 0.1 2017年11月28日 上午10:37:56 chenyao Exp $
*/
public class SequenceUtil {
/** 商品前缀 */
private static final String PRODUCT = "PR";
/** 报价 */
public static String QUOTE = "QU";
/** 合同 */
public static String CONTRACT = "HT";
private static String base = "0123456789";
/**
*
* @param type
* @param timestamp
* @return
*/
public static String generateSequence(String type, long timestamp) {
return type + getCurrentTime(timestamp) + getRandomString(4);
}
/**
* 获取报价
* @return
*/
public static String generateQuoteSequence() {
return QUOTE + getCurrentTime() /*+ getRandomString(4)*/;
}
public static String generateHTSequence() {
return CONTRACT + getCurrentTime();
}
public static String generateProductImportSequence() {
return PRODUCT + "00000000000000";
}
/**
* 返回当前时间,按字符串返回
* 格式为:yyyyMMddHHmmss
* @return
*/
private static String getCurrentTime() {
return DateUtil.formateDate(System.currentTimeMillis(), "yyyyMMddHHmmss");
}
/**
* 返回当前时间,按字符串返回
* 格式为:yyyyMMddHHmmss
* @return
*/
private static String getCurrentTime(long timestamp) {
return DateUtil.formateDate(timestamp, "yyyyMMddHHmmss");
}
/**
* 返回指定长度随机字符串
*
* 这里 随机种子采用第一次初始化为准; 而不是每次都初始化种子 ,
* (调用者序列号前部已经按时间设置)
* @param length
* @return
*/
public static String getRandomString(int length) { //length表示生成字符串的长度
StringBuffer sb = new StringBuffer();
for (int i = 0; i < length; i++) {
int number = (int) (base.length() * Math.random());
sb.append(base.charAt(number));
}
return sb.toString();
}
public static String generateProductSequence() {
return PRODUCT + getCurrentTime() /*+ getRandomString(8)*/;
}
}
| [
"lqdcanty@163.com"
] | lqdcanty@163.com |
100b2987e19d298c491b478e8200cdfaa8f736ff | 9088666a58617364f7c7f918460008260cddc910 | /java/xnkj/backstage/src/main/java/com/liaoin/backstage/controller/RoleController.java | ea0109d268465a8856cd9708d6c5bef3bf21c0dc | [] | no_license | cqwu729/201804-xnkjxm | 2378c31d1c01004a461b64849aa435a035eb7bec | 9c85f096db2d957dde1ffae135f4a8f164671c22 | refs/heads/master | 2020-04-11T11:47:50.593901 | 2018-12-14T09:12:28 | 2018-12-14T09:12:28 | 161,759,777 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,371 | java | package com.liaoin.backstage.controller;
import com.liaoin.service.backstage.Enum.RoleStatus;
import com.liaoin.service.backstage.bean.Role;
import com.liaoin.service.backstage.service.MenuService;
import com.liaoin.service.backstage.service.impl.RoleServiceImpl;
import com.liaoin.service.base.constant.Constant;
import com.liaoin.service.base.message.PageResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import static org.springframework.http.ResponseEntity.ok;
/**
* Created by Administrator on 2017/8/4.
*/
@Controller
@RequestMapping("Role")
public class RoleController {
@Autowired
private RoleServiceImpl roleService;
@Autowired
private MenuService menuService;
/**
* 列表
*/
@RequestMapping(value = "/index",method = RequestMethod.GET)
@ResponseBody
public ModelAndView index(
@RequestParam(required = false) Integer p,
HttpServletRequest request,
ModelAndView modelAndView
){
int page = 0;
if(p != null){
page = p - 1;
}
Page<Role> educations = roleService.queryWithPage(page, Constant.PageConstant.ADMIN_PAGE_COUNT);
PageResult<Role> pageResult = new PageResult<Role>();
pageResult = pageResult.setPageUrl(request,page,Constant.PageConstant.ADMIN_PAGE_COUNT,educations);
modelAndView.addObject("pageResult", pageResult);
modelAndView.setViewName("Role/index");
return modelAndView;
}
/**
* 添加
*/
@RequestMapping(value = "/add",method = RequestMethod.GET)
@ResponseBody
public ModelAndView add(
ModelAndView modelAndView
){
modelAndView.addObject("roleStatusLists", RoleStatus.values());
modelAndView.setViewName("Role/add");
return modelAndView;
}
/**
* 提交数据
*/
@RequestMapping(value = "/post",method = RequestMethod.POST)
@ResponseBody
public ResponseEntity post(
@RequestParam(required = false) String id,
@RequestParam String name,
@RequestParam String introduce,
@RequestParam RoleStatus roleStatus
){
return ResponseEntity.ok(roleService.save(id,name,roleStatus,introduce));
}
/**
* 编辑
*/
@RequestMapping(value = "/update",method = RequestMethod.GET)
@ResponseBody
public ModelAndView update(
@RequestParam String id,
ModelAndView modelAndView
){
Role role = roleService.findById(id);
modelAndView.addObject("roleStatusLists",RoleStatus.values());
modelAndView.addObject("role",role);
modelAndView.setViewName("Role/update");
return modelAndView;
}
/**
* 删除
*/
@RequestMapping(value = "/delete",method = RequestMethod.GET)
@ResponseBody
public ResponseEntity delete(
@RequestParam String id
) throws Exception{
return ok(roleService.deleteById(id));
}
/**
* 获取权限列表
*/
@RequestMapping(value = "/power",method = RequestMethod.GET)
@ResponseBody
public ModelAndView index(
@RequestParam String roleId,
ModelAndView modelAndView
){
modelAndView.addObject("roleId",roleId);
modelAndView.addObject("menuString", menuService.queryMenus("0",roleId,0));
modelAndView.setViewName("Role/power");
return modelAndView;
}
/**
* 权限信息提交
*/
@RequestMapping(value = "/power_post",method = RequestMethod.POST)
@ResponseBody
public ResponseEntity power_post(
HttpServletRequest request
){
String roleId = request.getParameter("roleId");
String menuIds[] = request.getParameterValues("menuId");//菜单ID
return ok(roleService.setRolePowers(roleId,menuIds));
}
}
| [
"997342977@qq.com"
] | 997342977@qq.com |
29063dc1715f80fa3db62ea871d7cbf156c688e8 | 28b3a4074c919eb5fa0bc53665a977079d2d8f89 | /taxi-e/smartkab-pay/smartkab-pay-alipay/src/main/java/com/alipay/api/request/AlipayTrustUserReportGetRequest.java | 4993615300592e3e893957f19e59d7dc167db2b0 | [] | no_license | vrqin/taxi | 43e7b65c420ace1280d3621662db6db02aa268d9 | c3c1bd4739425393b2de888b716d7343af8097a4 | refs/heads/master | 2020-05-31T15:30:49.540392 | 2018-12-07T12:23:34 | 2018-12-07T12:23:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,668 | java | package com.alipay.api.request;
import com.alipay.api.AlipayRequest;
import com.alipay.api.internal.util.AlipayHashMap;
import com.alipay.api.response.AlipayTrustUserReportGetResponse;
import java.util.Map;
public class AlipayTrustUserReportGetRequest implements AlipayRequest<AlipayTrustUserReportGetResponse> {
private AlipayHashMap udfParams;
/* 18 */ private String apiVersion = "1.0";
private String scene;
private String type;
private String terminalType;
private String terminalInfo;
private String prodCode;
private String notifyUrl;
private String returnUrl;
/* 48 */ private boolean needEncrypt = false;
public String getScene() {
/* 34 */
return this.scene;
}
public void setScene(String scene) {
/* 31 */
this.scene = scene;
}
public String getType() {
/* 41 */
return this.type;
}
public void setType(String type) {
/* 38 */
this.type = type;
}
public String getNotifyUrl() {
/* 51 */
return this.notifyUrl;
}
public void setNotifyUrl(String notifyUrl) {
/* 55 */
this.notifyUrl = notifyUrl;
}
public String getReturnUrl() {
/* 59 */
return this.returnUrl;
}
public void setReturnUrl(String returnUrl) {
/* 63 */
this.returnUrl = returnUrl;
}
public String getApiVersion() {
/* 67 */
return this.apiVersion;
}
public void setApiVersion(String apiVersion) {
/* 71 */
this.apiVersion = apiVersion;
}
public String getTerminalType() {
/* 79 */
return this.terminalType;
}
public void setTerminalType(String terminalType) {
/* 75 */
this.terminalType = terminalType;
}
public String getTerminalInfo() {
/* 87 */
return this.terminalInfo;
}
public void setTerminalInfo(String terminalInfo) {
/* 83 */
this.terminalInfo = terminalInfo;
}
public String getProdCode() {
/* 95 */
return this.prodCode;
}
public void setProdCode(String prodCode) {
/* 91 */
this.prodCode = prodCode;
}
public String getApiMethodName() {
/* 99 */
return "alipay.trust.user.report.get";
}
public Map<String, String> getTextParams() {
/* 103 */
AlipayHashMap txtParams = new AlipayHashMap();
/* 104 */
txtParams.put("scene", this.scene);
/* 105 */
txtParams.put("type", this.type);
/* 106 */
if (this.udfParams != null) {
/* 107 */
txtParams.putAll(this.udfParams);
}
/* 109 */
return txtParams;
}
public void putOtherTextParam(String key, String value) {
/* 113 */
if (this.udfParams == null) {
/* 114 */
this.udfParams = new AlipayHashMap();
}
/* 116 */
this.udfParams.put(key, value);
}
public Class<AlipayTrustUserReportGetResponse> getResponseClass() {
/* 120 */
return AlipayTrustUserReportGetResponse.class;
}
public boolean isNeedEncrypt() {
/* 126 */
return this.needEncrypt;
}
public void setNeedEncrypt(boolean needEncrypt) {
/* 132 */
this.needEncrypt = needEncrypt;
}
}
/* Location: C:\Users\huangzhike\Desktop\alipay-sdk-java20160829220059\
* Qualified Name: com.alipay.api.request.AlipayTrustUserReportGetRequest
* JD-Core Version: 0.6.0
*/ | [
"heavenlystate@163.com"
] | heavenlystate@163.com |
8dbcd09f2fb406b6f01d82d13ec9dd5f7642d69e | c8c34ec8a09d19b9e9c62f4e1222845dd7659d68 | /src/test/java/org/agilewiki/jid/basics/LuckyNumber.java | 0690dc2bc0863ec37a6ce372a92ad872ccd5b858 | [] | no_license | macrohuang/JID | 41e8362ea9dda828476ea273b4b55141af176634 | 1abf7f41a222a6d5365e2916b3998f27b397d098 | refs/heads/master | 2021-01-18T07:19:52.882987 | 2012-05-05T06:00:44 | 2012-05-05T06:00:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 632 | java | package org.agilewiki.jid.basics;
import org.agilewiki.jactor.Mailbox;
import org.agilewiki.jactor.RP;
import org.agilewiki.jid.scalar.flens.integer.IntegerJid;
public class LuckyNumber extends IntegerJid implements Main {
public LuckyNumber(final Mailbox mailbox) {
super(mailbox);
}
@Override
protected void processRequest(Object request, RP rp) throws Exception {
if (request.getClass() == Proc.class) {
System.out.println("Your lucky number is " + getValue());
rp.processResponse(null);
return;
}
super.processRequest(request, rp);
}
}
| [
"laforge49@gmail.com"
] | laforge49@gmail.com |
0292e78d4d99db28751ee5b2bd9fffa0e1f6963d | 3b91ed788572b6d5ac4db1bee814a74560603578 | /com/tencent/mm/plugin/wallet/pwd/ui/WalletPasswordSettingUI$4.java | 832fa76a2a8aaafed11fad864751ed0a88cf9661 | [] | no_license | linsir6/WeChat_java | a1deee3035b555fb35a423f367eb5e3e58a17cb0 | 32e52b88c012051100315af6751111bfb6697a29 | refs/heads/master | 2020-05-31T05:40:17.161282 | 2018-08-28T02:07:02 | 2018-08-28T02:07:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 894 | java | package com.tencent.mm.plugin.wallet.pwd.ui;
import android.content.Intent;
import android.os.Bundle;
import com.tencent.mm.g.a.sz;
import com.tencent.mm.sdk.platformtools.x;
import com.tencent.mm.wallet_core.c.a;
class WalletPasswordSettingUI$4 implements a {
final /* synthetic */ WalletPasswordSettingUI pif;
WalletPasswordSettingUI$4(WalletPasswordSettingUI walletPasswordSettingUI) {
this.pif = walletPasswordSettingUI;
}
public final Intent n(int i, Bundle bundle) {
x.i("MicroMsg.WalletPasswordSettingUI", "end readname process");
sz szVar = new sz();
if (i == -1) {
szVar.cdR.scene = 17;
} else if (i == 0) {
szVar.cdR.scene = 18;
} else {
szVar.cdR.scene = 0;
}
szVar.cdS.cdN = new 1(this);
com.tencent.mm.sdk.b.a.sFg.m(szVar);
return null;
}
}
| [
"707194831@qq.com"
] | 707194831@qq.com |
792171f2bfce696ac24af35ca738742f6134ba66 | 76d6f48a56785f8b3a17a64f5b74ec69594ad247 | /src/main/java/com/javamultiplex/controller/StudentController.java | 5bb335e44098074175d39a8780ea75687688d587 | [] | no_license | javamultiplex/spring-security | 054b3642c22baa60d0263a0f0a408e325f1a180e | 3fa259929f7344681173e2f952ae95f8e35ddaee | refs/heads/master | 2023-02-14T16:55:06.573370 | 2020-11-01T10:01:52 | 2020-11-01T10:01:52 | 298,843,426 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,318 | java | package com.javamultiplex.controller;
import com.javamultiplex.model.Student;
import com.javamultiplex.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @author Rohit Agarwal on 26/09/20 11:53 pm
* @copyright www.javamultiplex.com
*/
@RestController
@RequestMapping("api/v1/students")
public class StudentController {
private final StudentService studentService;
@Autowired
public StudentController(StudentService studentService) {
this.studentService = studentService;
}
@GetMapping(path = "{studentId}")
public ResponseEntity<?> getStudent(@PathVariable Integer studentId) {
Student student;
try {
student = studentService.getStudent(studentId);
} catch (IllegalArgumentException exception) {
return new ResponseEntity<>(exception.getMessage(), HttpStatus.NOT_FOUND);
}
return new ResponseEntity<>(student, HttpStatus.OK);
}
}
| [
"programmingwithrohit@gmail.com"
] | programmingwithrohit@gmail.com |
1184df50b0c9deeee30e879775bcd06e33c84273 | 8523563143e69b9ca0326acafdaa646f1b57bb94 | /tags/plantuml-7941/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClassMultilines.java | 5431da94b333a22ce16026b9cf25a3b85aedaaa4 | [] | no_license | svn2github/plantuml | d372e8c5f4b1c5d990b190e2989cd8e5a86ed8fc | 241b60a9081a25079bf73f12c08c476e16993384 | refs/heads/master | 2023-09-03T13:20:47.638892 | 2012-11-20T22:08:10 | 2012-11-20T22:08:10 | 10,839,094 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,450 | java | /* ========================================================================
* PlantUML : a free UML diagram generator
* ========================================================================
*
* (C) Copyright 2009-2012, Arnaud Roques
*
* Project Info: http://plantuml.sourceforge.net
*
* This file is part of PlantUML.
*
* PlantUML is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlantUML distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
* License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
* USA.
*
* [Java is a trademark or registered trademark of Sun Microsystems, Inc.
* in the United States and other countries.]
*
* Original Author: Arnaud Roques
*
* Revision $Revision: 4161 $
*
*/
package net.sourceforge.plantuml.classdiagram.command;
import java.util.List;
import net.sourceforge.plantuml.FontParam;
import net.sourceforge.plantuml.StringUtils;
import net.sourceforge.plantuml.Url;
import net.sourceforge.plantuml.UrlBuilder;
import net.sourceforge.plantuml.classdiagram.ClassDiagram;
import net.sourceforge.plantuml.command.CommandExecutionResult;
import net.sourceforge.plantuml.command.CommandMultilines2;
import net.sourceforge.plantuml.command.MultilinesStrategy;
import net.sourceforge.plantuml.command.regex.RegexConcat;
import net.sourceforge.plantuml.command.regex.RegexLeaf;
import net.sourceforge.plantuml.command.regex.RegexOr;
import net.sourceforge.plantuml.command.regex.RegexResult;
import net.sourceforge.plantuml.cucadiagram.Code;
import net.sourceforge.plantuml.cucadiagram.IEntity;
import net.sourceforge.plantuml.cucadiagram.ILeaf;
import net.sourceforge.plantuml.cucadiagram.LeafType;
import net.sourceforge.plantuml.cucadiagram.Link;
import net.sourceforge.plantuml.cucadiagram.LinkDecor;
import net.sourceforge.plantuml.cucadiagram.LinkType;
import net.sourceforge.plantuml.cucadiagram.Stereotype;
import net.sourceforge.plantuml.graphic.HtmlColorUtils;
import net.sourceforge.plantuml.skin.VisibilityModifier;
public class CommandCreateClassMultilines extends CommandMultilines2<ClassDiagram> {
enum Mode {
EXTENDS, IMPLEMENTS
};
public CommandCreateClassMultilines(ClassDiagram diagram) {
super(diagram, getRegexConcat(), MultilinesStrategy.REMOVE_STARTING_QUOTE);
}
@Override
public String getPatternEnd() {
return "(?i)^\\s*\\}\\s*$";
}
private static RegexConcat getRegexConcat() {
return new RegexConcat(new RegexLeaf("^"), //
new RegexLeaf("TYPE", "(interface|enum|abstract\\s+class|abstract|class)\\s+"), //
new RegexOr(//
new RegexConcat(//
new RegexLeaf("DISPLAY1", "\"([^\"]+)\""), //
new RegexLeaf("\\s+as\\s+"), //
new RegexLeaf("CODE1", "(" + CommandCreateClass.CODE + ")")), //
new RegexConcat(//
new RegexLeaf("CODE2", "(" + CommandCreateClass.CODE + ")"), //
new RegexLeaf("\\s+as\\s+"), // //
new RegexLeaf("DISPLAY2", "\"([^\"]+)\"")), //
new RegexLeaf("CODE3", "(" + CommandCreateClass.CODE + ")"), //
new RegexLeaf("CODE4", "\"([^\"]+)\"")), //
new RegexLeaf("GENERIC", "(?:\\s*\\<(" + GenericRegexProducer.PATTERN + ")\\>)?"), //
new RegexLeaf("STEREO", "(?:\\s*(\\<\\<.+\\>\\>))?"), //
new RegexLeaf("\\s*"), //
new RegexLeaf("URL", "(" + UrlBuilder.getRegexp() + ")?"), //
new RegexLeaf("\\s*"), //
new RegexLeaf("COLOR", "(#\\w+[-\\\\|/]?\\w+)?"), //
new RegexLeaf("EXTENDS",
"(\\s+(extends|implements)\\s+((?:\\.|::)?[\\p{L}0-9_]+(?:(?:\\.|::)[\\p{L}0-9_]+)*))?"), //
new RegexLeaf("\\s*\\{\\s*$"));
}
public CommandExecutionResult executeNow(List<String> lines) {
StringUtils.trim(lines, false);
final RegexResult line0 = getStartingPattern().matcher(lines.get(0).trim());
final IEntity entity = executeArg0(line0);
if (entity == null) {
return CommandExecutionResult.error("No such entity");
}
lines = lines.subList(1, lines.size() - 1);
final Url url;
if (lines.size() > 0) {
final UrlBuilder urlBuilder = new UrlBuilder(getSystem().getSkinParam().getValue("topurl"), true);
url = urlBuilder.getUrl(lines.get(0).toString());
} else {
url = null;
}
if (url != null) {
lines = lines.subList(1, lines.size());
}
for (String s : lines) {
if (s.length() > 0 && VisibilityModifier.isVisibilityCharacter(s.charAt(0))) {
getSystem().setVisibilityModifierPresent(true);
}
entity.addFieldOrMethod(s);
}
if (url != null) {
entity.addUrl(url);
}
manageExtends(getSystem(), line0, entity);
return CommandExecutionResult.ok();
}
private static void manageExtends(ClassDiagram system, RegexResult arg, final IEntity entity) {
if (arg.get("EXTENDS", 1) != null) {
final Mode mode = arg.get("EXTENDS", 1).equalsIgnoreCase("extends") ? Mode.EXTENDS : Mode.IMPLEMENTS;
final Code other = Code.of(arg.get("EXTENDS", 2));
LeafType type2 = LeafType.CLASS;
if (mode == Mode.IMPLEMENTS) {
type2 = LeafType.INTERFACE;
}
if (mode == Mode.EXTENDS && entity.getEntityType() == LeafType.INTERFACE) {
type2 = LeafType.INTERFACE;
}
final IEntity cl2 = system.getOrCreateLeaf1(other, type2);
LinkType typeLink = new LinkType(LinkDecor.NONE, LinkDecor.EXTENDS);
if (type2 == LeafType.INTERFACE && entity.getEntityType() != LeafType.INTERFACE) {
typeLink = typeLink.getDashed();
}
final Link link = new Link(cl2, entity, typeLink, null, 2, null, null, system.getLabeldistance(),
system.getLabelangle());
system.addLink(link);
}
}
private IEntity executeArg0(RegexResult arg) {
final LeafType type = LeafType.getLeafType(arg.get("TYPE", 0).toUpperCase());
final Code code = Code.of(arg.getLazzy("CODE", 0)).eventuallyRemoveStartingAndEndingDoubleQuote();
final String display = arg.getLazzy("DISPLAY", 0);
final String stereotype = arg.get("STEREO", 0);
final String generic = arg.get("GENERIC", 0);
final ILeaf result;
if (getSystem().leafExist(code)) {
result = getSystem().getOrCreateLeaf1(code, null);
result.muteToType(type);
} else {
result = getSystem().createLeaf(code, StringUtils.getWithNewlines(display), type);
}
if (stereotype != null) {
result.setStereotype(new Stereotype(stereotype, getSystem().getSkinParam().getCircledCharacterRadius(),
getSystem().getSkinParam().getFont(FontParam.CIRCLED_CHARACTER, null)));
}
final String urlString = arg.get("URL", 0);
if (urlString != null) {
final UrlBuilder urlBuilder = new UrlBuilder(getSystem().getSkinParam().getValue("topurl"), true);
final Url url = urlBuilder.getUrl(urlString);
result.addUrl(url);
}
result.setSpecificBackcolor(HtmlColorUtils.getColorIfValid(arg.get("COLOR", 0)));
if (generic != null) {
result.setGeneric(generic);
}
return result;
}
}
| [
"arnaud_roques@28b6c6c1-be0e-40f3-8fed-77912e9d39c1"
] | arnaud_roques@28b6c6c1-be0e-40f3-8fed-77912e9d39c1 |
d37aa32e70d91f29677964e2c2b7b3cf21f50da6 | 7805cac43c94200567d328a37d5b1ea01bd4289a | /src/main/java/com/xym/myJava/JMM/StringOomMock.java | 8518d6926e04ae6f75372e7796e06cd6b41c149c | [] | no_license | xym-loveit/myJavaBaseProject | 58c6606e4102b5c2395d5ddcf3db9de7575c53e8 | dd2dd52cdd59539b37e40d4f22590b451feed2f3 | refs/heads/master | 2022-12-21T05:55:07.838905 | 2019-08-26T09:39:39 | 2019-08-26T09:39:39 | 141,161,163 | 0 | 0 | null | 2022-12-10T03:18:13 | 2018-07-16T15:55:19 | Java | UTF-8 | Java | false | false | 805 | java | package com.xym.myJava.JMM;
import java.util.ArrayList;
import java.util.List;
/**
* 字符串常量引起的内存溢出:
* <p>
* 在jdk1.6/1.7/1.8中的表现会有不同
* <p>
* 1.7/1.8
* java.lang.OutOfMemoryError: Java heap space
* <p>
* -XX:PermSize=8MB -XX:MaxPermSize=8MB
* <p>
* 1.8 元空间
* -XX:MetaspaceSize=8m -XX:MaxMetaspaceSize=8m
*
* @author xym
* @create 2018-11-30 15:_01
*/
public class StringOomMock {
static String base = "string";
public static void main(String[] args) {
//以2的指数级不断的生成新的字符串
List<String> list = new ArrayList<String>();
for (int i = 0; i < Integer.MAX_VALUE; i++) {
String str = base + base;
base = str;
list.add(str.intern());
}
}
}
| [
"xym_loveit@126.com"
] | xym_loveit@126.com |
7c374c78f3cb90b756e1a83c5f0aa570066a53b4 | 080b0ebb0e714ff6fad5ccf5851737de6ffc572b | /ymate-platform-persistence-redis/src/main/java/net/ymate/platform/persistence/redis/impl/RedisDataSourceAdapter.java | 82b453cb5e11e184dc14ce200ccdc4a0545e0f2d | [
"Apache-2.0"
] | permissive | eaglesy/ymate-platform-v2 | 20ba18a3e3f4af8342b10afef53cd12f47233a21 | e4bf93624a4b29b4651eff296b530d03a01460a8 | refs/heads/master | 2022-12-29T03:22:50.363869 | 2020-07-13T08:15:32 | 2020-07-13T08:17:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,579 | java | /*
* Copyright 2007-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
*
* 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 net.ymate.platform.persistence.redis.impl;
import net.ymate.platform.core.IConfig;
import net.ymate.platform.persistence.redis.IRedisDataSourceAdapter;
import net.ymate.platform.persistence.redis.IRedisModuleCfg;
import net.ymate.platform.persistence.redis.RedisDataSourceCfgMeta;
import redis.clients.jedis.*;
import redis.clients.util.Pool;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
* @author 刘镇 (suninformation@163.com) on 15/12/2 上午2:31
* @version 1.0
*/
public class RedisDataSourceAdapter implements IRedisDataSourceAdapter {
private RedisDataSourceCfgMeta __cfgMeta;
private Pool __pool;
private JedisCluster __cluster;
private boolean __isCluster;
@Override
public void initialize(RedisDataSourceCfgMeta cfgMeta) throws Exception {
__cfgMeta = cfgMeta;
//
switch (cfgMeta.getConnectionType()) {
case SHARD:
if (!cfgMeta.getServers().isEmpty()) {
List<JedisShardInfo> _shards = new ArrayList<JedisShardInfo>();
for (IRedisModuleCfg.ServerMeta _server : cfgMeta.getServers().values()) {
_shards.add(new JedisShardInfo(_server.getHost(), _server.getName(), _server.getPort(), _server.getTimeout(), _server.getWeight()));
}
__pool = new ShardedJedisPool(cfgMeta.getPoolConfig(), _shards);
}
break;
case SENTINEL:
if (!cfgMeta.getServers().isEmpty()) {
Set<String> _sentinel = new HashSet<String>();
for (IRedisModuleCfg.ServerMeta _server : cfgMeta.getServers().values()) {
_sentinel.add(_server.getHost() + ":" + _server.getPort());
}
IRedisModuleCfg.ServerMeta _server = cfgMeta.getMasterServerMeta();
__pool = new JedisSentinelPool(_server.getName(),
_sentinel, cfgMeta.getPoolConfig(),
_server.getTimeout(), _server.getPassword(), _server.getDatabase(), _server.getClientName());
}
break;
case CLUSTER:
Set<HostAndPort> _cluster = new HashSet<HostAndPort>();
for (IRedisModuleCfg.ServerMeta _server : cfgMeta.getServers().values()) {
_cluster.add(new HostAndPort(_server.getHost(), _server.getPort()));
}
IRedisModuleCfg.ServerMeta _server = cfgMeta.getMasterServerMeta();
__cluster = new JedisCluster(_cluster, _server.getTimeout(), _server.getSocketTimeout(), _server.getMaxAttempts(), _server.getPassword(), cfgMeta.getPoolConfig());
__isCluster = true;
break;
default:
if (cfgMeta.getServers().isEmpty()) {
__pool = new JedisPool(cfgMeta.getPoolConfig(), "localhost");
} else {
IRedisModuleCfg.ServerMeta _defaultServer = cfgMeta.getServers().get(IConfig.DEFAULT_STR);
__pool = new JedisPool(cfgMeta.getPoolConfig(),
_defaultServer.getHost(),
_defaultServer.getPort(),
_defaultServer.getTimeout(),
_defaultServer.getPassword(),
_defaultServer.getDatabase(),
_defaultServer.getClientName());
}
}
}
@Override
public JedisCommands getCommands() {
if (__isCluster) {
return __cluster;
}
return (JedisCommands) __pool.getResource();
}
@Override
public RedisDataSourceCfgMeta getDataSourceCfgMeta() {
return __cfgMeta;
}
@Override
public void destroy() {
__pool.destroy();
}
}
| [
"suninformation@163.com"
] | suninformation@163.com |
7d1f9bcf923f114d6d549875c8d3cde6f5966cd7 | 54bcbdc3250e6e8152ac1746f709ec134e798305 | /src/org/omg/CosNaming/NamingContextPackage/NotFoundReason.java | 9a2d541e0277fd83b6fa7fe7b365cc8613248784 | [] | no_license | TANGMONK-MEAT/jdk-src-demo | 78bed79d8a3819bf48d5eed399b869ac090138a4 | 4b4fa0779b67c7079b8d263ada2bb514c366a3e8 | refs/heads/master | 2023-03-02T21:35:09.758995 | 2021-02-16T07:39:26 | 2021-02-16T07:39:26 | 268,969,374 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,736 | java | package org.omg.CosNaming.NamingContextPackage;
/**
* org/omg/CosNaming/NamingContextPackage/NotFoundReason.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from c:/re/workspace/8-2-build-windows-amd64-cygwin/jdk8u231/13620/corba/src/share/classes/org/omg/CosNaming/nameservice.idl
* Saturday, October 5, 2019 3:13:31 AM PDT
*/
/**
* Indicates the reason for not able to resolve.
*/
public class NotFoundReason implements org.omg.CORBA.portable.IDLEntity
{
private int __value;
private static int __size = 3;
private static org.omg.CosNaming.NamingContextPackage.NotFoundReason[] __array = new org.omg.CosNaming.NamingContextPackage.NotFoundReason [__size];
public static final int _missing_node = 0;
public static final org.omg.CosNaming.NamingContextPackage.NotFoundReason missing_node = new org.omg.CosNaming.NamingContextPackage.NotFoundReason(_missing_node);
public static final int _not_context = 1;
public static final org.omg.CosNaming.NamingContextPackage.NotFoundReason not_context = new org.omg.CosNaming.NamingContextPackage.NotFoundReason(_not_context);
public static final int _not_object = 2;
public static final org.omg.CosNaming.NamingContextPackage.NotFoundReason not_object = new org.omg.CosNaming.NamingContextPackage.NotFoundReason(_not_object);
public int value ()
{
return __value;
}
public static org.omg.CosNaming.NamingContextPackage.NotFoundReason from_int (int value)
{
if (value >= 0 && value < __size)
return __array[value];
else
throw new org.omg.CORBA.BAD_PARAM ();
}
protected NotFoundReason (int value)
{
__value = value;
__array[__value] = this;
}
} // class NotFoundReason
| [
"58246525+tangsengrou01@users.noreply.github.com"
] | 58246525+tangsengrou01@users.noreply.github.com |
1c760534ae3853a888cef15d47f662dab86f50ba | 0ea271177f5c42920ac53cd7f01f053dba5c14e4 | /5.3.5/sources/com/google/android/gms/internal/zzcmc.java | 9c78d15204c786e1c97a0776e50d31758abf255e | [] | no_license | alireza-ebrahimi/telegram-talaeii | 367a81a77f9bc447e729b2ca339f9512a4c2860e | 68a67e6f104ab8a0888e63c605e8bbad12c4a20e | refs/heads/master | 2020-03-21T13:44:29.008002 | 2018-12-09T10:30:29 | 2018-12-09T10:30:29 | 138,622,926 | 12 | 1 | null | null | null | null | UTF-8 | Java | false | false | 411 | java | package com.google.android.gms.internal;
final class zzcmc implements Runnable {
private /* synthetic */ zzcma zzjqy;
private /* synthetic */ zzcmd zzjqz;
zzcmc(zzcma zzcma, zzcmd zzcmd) {
this.zzjqy = zzcma;
this.zzjqz = zzcmd;
}
public final void run() {
this.zzjqy.zza(this.zzjqz);
this.zzjqy.zzjqm = null;
this.zzjqy.zzayg().zza(null);
}
}
| [
"alireza.ebrahimi2006@gmail.com"
] | alireza.ebrahimi2006@gmail.com |
005f79c31de5f2fb56ec62383ef74dea401b4898 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/5/5_1b2323586f6e5687b34eda1fed454588d261444e/PluginInstaller/5_1b2323586f6e5687b34eda1fed454588d261444e_PluginInstaller_s.java | f7ca7b22f4c7bb141fbe197fa729d1a2516fe9e6 | [] | 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 | 5,245 | java | package ch9k.plugins;
import ch9k.configuration.Storage;
import java.io.File;
import java.io.FileFilter;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
import java.net.URLConnection;
import java.util.Map;
import java.util.jar.Attributes;
import java.util.jar.JarFile;
import java.util.jar.Manifest;
import org.apache.log4j.Logger;
/**
* A class that simplifies the process of installing new plugins.
*/
public class PluginInstaller extends URLClassLoader {
/**
* Logger logger logger
* Mushroom Mushroom
*/
private static final Logger logger =
Logger.getLogger(PluginInstaller.class);
/**
* Hardcoded for now. Needs to be in Configuration somewhere.
*/
private static final File INSTALL_DIRECTORY =
new File(Storage.getStorageDirectory(), "plugins");
/**
* A reference to the plugin manager.
*/
private PluginManager pluginManager;
/**
* Constructor.
*/
public PluginInstaller(PluginManager pluginManager) {
/* The superclass is an URLClassLoader with no predefined paths. */
super(new URL[0]);
/* Store a reference to the plugin manager. */
this.pluginManager = pluginManager;
/* Create the install directory if it doesn't exist yet. */
if(!INSTALL_DIRECTORY.isDirectory())
INSTALL_DIRECTORY.mkdirs();
/* Create a file filter to search for jar's. */
FileFilter jarFilter = new FileFilter() {
public boolean accept(File file) {
return file.getName().endsWith(".jar");
}
};
/* Get all jars in the plugin directory. */
File[] files = INSTALL_DIRECTORY.listFiles(jarFilter);
/* Add every jar to the classpath. */
for(File file: files) {
registerPlugin(file);
}
}
/**
* Register a plugin to the configuration and plugin manager.
* This file should be located in the application directory already,
* use installPlugin otherwise.
* @param file File to register as plugin.
*/
public void registerPlugin(File file) {
logger.info("Registering plugin: " + file);
Manifest manifest = null;
try {
JarFile jar = new JarFile(file);
manifest = jar.getManifest();
} catch (IOException exception) {
// TODO: Show relevant warning.
logger.warn(exception.toString());
}
/* Retreat, retreat! */
if(manifest == null) return;
/* Obtain the jar manifest and it's attributes. */
Attributes attributes = manifest.getMainAttributes();
/* Add the jar file to the class path. */
try {
addURL(file.toURI().toURL());
} catch (MalformedURLException exception) {
// TODO: Show relevant warning.
return;
}
/* Find the plugin name .*/
String pluginName = attributes.getValue("Plugin-Class");
/* No plugin in this jar. */
if(pluginName == null) return;
/* Register the plugin class. */
logger.info("Plugin found: " + pluginName);
pluginManager.addAvailablePlugin(pluginName);
}
/**
* Load a plugin class.
* @param name Name of the class to load.
* @return The plugin class.
*/
public Class getPluginClass(String name) throws ClassNotFoundException {
return findClass(name);
}
/**
* Install a plugin from an URL.
* @param url URL pointing to a plugin jar.
*/
public void installPlugin(URL url) {
logger.info("Installing plugin: " + url);
try {
/* We take the filename of the url and store the plugin there. */
URLConnection connection = url.openConnection();
File file = new File(url.getFile());
installPlugin(connection.getInputStream(), file.getName());
} catch (IOException exception) {
// TODO: Show relevant warning.
System.out.println(exception);
return;
}
}
/**
* Install a plugin jar from an input stream. This will close the stream
* after the read.
* @param in Stream to get the plugin from.
* @param fileName File name of the plugin.
*/
public void installPlugin(InputStream in, String fileName)
throws IOException {
/* Open the output file. */
File file = new File(INSTALL_DIRECTORY, fileName);
OutputStream out = new FileOutputStream(file);
/* Buffer and buffer length. */
byte[] buffer = new byte[1024];
int length;
/* Copy the stream. */
while((length = in.read(buffer)) > 0) out.write(buffer, 0, length);
/* Close the streams. */
in.close();
out.close();
/* Register the new plugin. */
registerPlugin(file);
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
b6eb89214a37e9ea27f881e32fcceaa61fb4e0a1 | 09d0ddd512472a10bab82c912b66cbb13113fcbf | /TestApplications/TF-BETA-THERMATK-v5.7.1/DecompiledCode/Procyon/src/main/java/com/airbnb/lottie/LottieImageAsset.java | 52398f02cf3ad8aae71258e316056720ccb92c44 | [] | no_license | sgros/activity_flow_plugin | bde2de3745d95e8097c053795c9e990c829a88f4 | 9e59f8b3adacf078946990db9c58f4965a5ccb48 | refs/heads/master | 2020-06-19T02:39:13.865609 | 2019-07-08T20:17:28 | 2019-07-08T20:17:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,038 | java | //
// Decompiled by Procyon v0.5.34
//
package com.airbnb.lottie;
import android.graphics.Bitmap;
public class LottieImageAsset
{
private Bitmap bitmap;
private final String dirName;
private final String fileName;
private final int height;
private final String id;
private final int width;
public LottieImageAsset(final int width, final int height, final String id, final String fileName, final String dirName) {
this.width = width;
this.height = height;
this.id = id;
this.fileName = fileName;
this.dirName = dirName;
}
public Bitmap getBitmap() {
return this.bitmap;
}
public String getFileName() {
return this.fileName;
}
public int getHeight() {
return this.height;
}
public String getId() {
return this.id;
}
public int getWidth() {
return this.width;
}
public void setBitmap(final Bitmap bitmap) {
this.bitmap = bitmap;
}
}
| [
"crash@home.home.hr"
] | crash@home.home.hr |
a9264b4814aee2a7b60789ba01c7f846b0b0f5e6 | b85d0ce8280cff639a80de8bf35e2ad110ac7e16 | /com/fossil/dmr.java | 986ae7d23c5cd5420a428511e339ee77001a4d38 | [] | no_license | MathiasMonstrey/fosil_decompiled | 3d90433663db67efdc93775145afc0f4a3dd150c | 667c5eea80c829164220222e8fa64bf7185c9aae | refs/heads/master | 2020-03-19T12:18:30.615455 | 2018-06-07T17:26:09 | 2018-06-07T17:26:09 | 136,509,743 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,479 | java | package com.fossil;
import com.fossil.dmo.C2967b;
import com.portfolio.platform.data.source.UserRepository;
import com.portfolio.platform.data.source.loader.SleepSummariesLoader;
import dagger.internal.MembersInjectors;
public final class dmr implements emi<dmq> {
static final /* synthetic */ boolean $assertionsDisabled = (!dmr.class.desiredAssertionStatus());
private final eru<C2967b> cGA;
private final eru<fj> cIC;
private final eru<dpf> cim;
private final eru<dmt> cji;
private final emg<dmq> cmb;
private final eru<SleepSummariesLoader> cme;
private final eru<ckc> useCaseHandlerProvider;
private final eru<UserRepository> userRepositoryProvider;
public /* synthetic */ Object get() {
return asj();
}
public dmr(emg<dmq> com_fossil_emg_com_fossil_dmq, eru<C2967b> com_fossil_eru_com_fossil_dmo_b, eru<fj> com_fossil_eru_com_fossil_fj, eru<SleepSummariesLoader> com_fossil_eru_com_portfolio_platform_data_source_loader_SleepSummariesLoader, eru<UserRepository> com_fossil_eru_com_portfolio_platform_data_source_UserRepository, eru<ckc> com_fossil_eru_com_fossil_ckc, eru<dpf> com_fossil_eru_com_fossil_dpf, eru<dmt> com_fossil_eru_com_fossil_dmt) {
if ($assertionsDisabled || com_fossil_emg_com_fossil_dmq != null) {
this.cmb = com_fossil_emg_com_fossil_dmq;
if ($assertionsDisabled || com_fossil_eru_com_fossil_dmo_b != null) {
this.cGA = com_fossil_eru_com_fossil_dmo_b;
if ($assertionsDisabled || com_fossil_eru_com_fossil_fj != null) {
this.cIC = com_fossil_eru_com_fossil_fj;
if ($assertionsDisabled || com_fossil_eru_com_portfolio_platform_data_source_loader_SleepSummariesLoader != null) {
this.cme = com_fossil_eru_com_portfolio_platform_data_source_loader_SleepSummariesLoader;
if ($assertionsDisabled || com_fossil_eru_com_portfolio_platform_data_source_UserRepository != null) {
this.userRepositoryProvider = com_fossil_eru_com_portfolio_platform_data_source_UserRepository;
if ($assertionsDisabled || com_fossil_eru_com_fossil_ckc != null) {
this.useCaseHandlerProvider = com_fossil_eru_com_fossil_ckc;
if ($assertionsDisabled || com_fossil_eru_com_fossil_dpf != null) {
this.cim = com_fossil_eru_com_fossil_dpf;
if ($assertionsDisabled || com_fossil_eru_com_fossil_dmt != null) {
this.cji = com_fossil_eru_com_fossil_dmt;
return;
}
throw new AssertionError();
}
throw new AssertionError();
}
throw new AssertionError();
}
throw new AssertionError();
}
throw new AssertionError();
}
throw new AssertionError();
}
throw new AssertionError();
}
throw new AssertionError();
}
public dmq asj() {
return (dmq) MembersInjectors.a(this.cmb, new dmq((C2967b) this.cGA.get(), (fj) this.cIC.get(), (SleepSummariesLoader) this.cme.get(), (UserRepository) this.userRepositoryProvider.get(), (ckc) this.useCaseHandlerProvider.get(), (dpf) this.cim.get(), (dmt) this.cji.get()));
}
public static emi<dmq> m9115a(emg<dmq> com_fossil_emg_com_fossil_dmq, eru<C2967b> com_fossil_eru_com_fossil_dmo_b, eru<fj> com_fossil_eru_com_fossil_fj, eru<SleepSummariesLoader> com_fossil_eru_com_portfolio_platform_data_source_loader_SleepSummariesLoader, eru<UserRepository> com_fossil_eru_com_portfolio_platform_data_source_UserRepository, eru<ckc> com_fossil_eru_com_fossil_ckc, eru<dpf> com_fossil_eru_com_fossil_dpf, eru<dmt> com_fossil_eru_com_fossil_dmt) {
return new dmr(com_fossil_emg_com_fossil_dmq, com_fossil_eru_com_fossil_dmo_b, com_fossil_eru_com_fossil_fj, com_fossil_eru_com_portfolio_platform_data_source_loader_SleepSummariesLoader, com_fossil_eru_com_portfolio_platform_data_source_UserRepository, com_fossil_eru_com_fossil_ckc, com_fossil_eru_com_fossil_dpf, com_fossil_eru_com_fossil_dmt);
}
}
| [
"me@mathiasmonstrey.be"
] | me@mathiasmonstrey.be |
fa0e4df48e11c84c1fb9ef7ae2ce9ebab71f1f50 | 63e2ca4f438bc64d2462746bc27584d6df2656da | /webapp/src/aides/nc/ccas/gasel/agents/budget/SuiviMensuelImp.java | d85c575a7f86f00aee7ebdd0085f513e55f86be1 | [] | no_license | DSI-Ville-Noumea/gasel | f091cf64d7a4726f4a7121ab8dbdcb680242b168 | b330e88acfeff167c3978ef43c1aafa92101f500 | refs/heads/master | 2020-04-17T00:15:26.231907 | 2016-07-06T22:32:43 | 2016-07-06T22:32:43 | 44,145,158 | 0 | 1 | null | 2016-01-21T03:12:59 | 2015-10-13T01:51:15 | Java | UTF-8 | Java | false | false | 620 | java | package nc.ccas.gasel.agents.budget;
import java.util.Date;
import nc.ccas.gasel.BasePageSql;
import nc.ccas.gasel.agents.budget.impl.SuiviMensuelImpImpl;
import nc.ccas.gasel.agents.budget.result.SuiviMensuelImpModel;
import nc.ccas.gasel.model.budget.Imputation;
public interface SuiviMensuelImp {
public static final SuiviMensuelImp INSTANCE = new SuiviMensuelImpImpl();
public SuiviMensuelImpModel getSuiviMensuelImp(Imputation imputation,
int mois, int annee, BasePageSql sql);
public SuiviMensuelImpModel getSuiviMensuelImp(Imputation imputation,
Date mois, BasePageSql sql);
}
| [
"mcluseau@isi.nc"
] | mcluseau@isi.nc |
fb339a67d24ce45f7b4063a135cdc3c04cd0d0a4 | 77fb90c41fd2844cc4350400d786df99e14fa4ca | /f/g/c/package_10/Optional.java | 9be8e72010186585171c20fe3c1933cd51b93df6 | [] | no_license | highnes7/umaang_decompiled | 341193b25351188d69b4413ebe7f0cde6525c8fb | bcfd90dffe81db012599278928cdcc6207632c56 | refs/heads/master | 2020-06-19T07:47:18.630455 | 2019-07-12T17:16:13 | 2019-07-12T17:16:13 | 196,615,053 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,371 | java | package f.g.c.package_10;
import f.g.c.a.b;
import java.io.Serializable;
import java.util.Set;
@b(serializable=true)
public abstract class Optional<T>
implements Serializable
{
public static final long serialVersionUID = 0L;
public Optional() {}
public static Optional absent()
{
return Absent.INSTANCE;
}
public static Iterable get(Iterable paramIterable)
{
if (paramIterable != null) {
return new Optional.1(paramIterable);
}
throw new NullPointerException();
}
public static Optional of(Object paramObject)
{
if (paramObject != null) {
return new Present(paramObject);
}
throw new NullPointerException();
}
public static Optional withType(Object paramObject)
{
if (paramObject == null) {
return Absent.INSTANCE;
}
return new Present(paramObject);
}
public abstract Set asSet();
public abstract boolean equals();
public abstract boolean equals(Object paramObject);
public abstract Object get();
public abstract Object get(Supplier paramSupplier);
public abstract int hashCode();
public abstract Optional or(Optional paramOptional);
public abstract Object or(Object paramObject);
public abstract Object orNull();
public abstract String toString();
public abstract Optional transform(Function paramFunction);
}
| [
"highnes.7@gmail.com"
] | highnes.7@gmail.com |
c3ba4ec15cfe0c9d2768061bee24c55913769170 | 2de7e5c5f3df80e8b5890e3d29a8db922af19e42 | /src/main/java/com/work/WorkProducer.java | a59715b75d5d2d19f82c4e58e0da59d0e448314a | [] | no_license | huangfusuper/mq | b9fa6df5eb1a1ceb8036d5b68ff3914892276038 | c79da1fec616ec8cea8fa8b313f84103947d88c4 | refs/heads/master | 2020-08-07T21:32:34.164362 | 2019-10-09T08:40:30 | 2019-10-09T08:40:30 | 213,590,744 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,387 | java | package com.work;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.Connection;
import com.util.MqConnection;
import java.io.IOException;
import java.util.concurrent.TimeoutException;
/**
* @author huangfu
* 工作队列 消息生产者
* 可以看到一个现象 消费者1和2 虽然处理时间不同 但是处理的数量是一样的
* 这种状态属于轮训分发 公平分发必须关闭自动应答 ACK
*
* --消费者
* =
* 生产者-----=
* =
* --消费者
*
* 如果想要让处理速度快的处理多一点 需要使用basicQos(perfeth=1)
* 每次只发送一条 只有你处理完成之后我才会给你发送下一条消息
*/
public class WorkProducer {
private static String QUEUE_NAME = "work";
public static void main(String[] args) throws IOException, TimeoutException, InterruptedException {
Connection connection = MqConnection.getConnection();
Channel channel = connection.createChannel();
channel.queueDeclare(QUEUE_NAME,false,false,false,null);
for (int i = 0; i < 50; i++) {
String msg = "醉卧沙场君莫笑"+i;
channel.basicPublish("",QUEUE_NAME,null,msg.getBytes());
System.out.println(msg);
Thread.sleep(i*10);
}
channel.close();
connection.close();
}
}
| [
"huangfusuper@163.com"
] | huangfusuper@163.com |
38a0a118234e5a96b1369a3123df8fd888111bc8 | 7f0e07c6b9c2aa586ef49b45ae5368f1fa3c2f76 | /src/com/yczuoxin/demo/Bleep.java | cc5993972efaac7b48eca4348cd9392fe2242198 | [] | no_license | ycxzuo/java10 | 53856204f0ead8feda425cf88a9082565464b5d8 | 82fddbae6f8cbec23a46a5f2621343d007e1b4dd | refs/heads/master | 2020-06-24T23:48:18.187283 | 2019-07-27T07:07:06 | 2019-07-27T07:07:06 | 199,129,595 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 682 | java | package com.yczuoxin.demo;
/**
* (a) Bleep
* (b) Blat
* (c) 程序编译错误
* (d) 以上都不是
*/
public class Bleep {
String name = "Bleep";
void setName(String name) {
this.name = name;
}
void backgroundSetName() throws InterruptedException {
//Thread t = new Thread(()->setName("Blat"));
Thread t = new Thread() {
@Override
public void run() {
setName("Blat");
}
};
t.start();
t.join();
System.out.println(name);
}
public static void main(String[] args) throws InterruptedException {
new Bleep().backgroundSetName();
}
} | [
"343720929@qq.com"
] | 343720929@qq.com |
3ba2dc164c3174efe4c777f14c96ef60cf7a79fe | e9d03c1b8b548ae33ea9ba5cd55db85fa6e1835c | /dina-loan-web/src/main/java/se/nrm/dina/loan/web/service/SolrClient.java | c3a4aff64272fc2d71902e24eb133b315686486a | [
"MIT"
] | permissive | Naturhistoriska/loan-management | 20e5868dca30d684155e5efde24e8189af52136e | 9046df8af4f68b56a3a84b1fc7295d3b06742901 | refs/heads/master | 2022-07-05T12:48:41.186177 | 2020-03-31T19:55:46 | 2020-03-31T19:55:46 | 251,210,469 | 0 | 0 | MIT | 2022-06-29T18:02:47 | 2020-03-30T05:31:00 | Java | UTF-8 | Java | false | false | 4,874 | java | package se.nrm.dina.loan.web.service;
import java.io.Serializable;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.List;
import javax.ejb.Stateless;
import lombok.extern.slf4j.Slf4j;
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.SolrServer;
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.impl.HttpSolrServer;
import org.apache.solr.client.solrj.response.QueryResponse;
import se.nrm.dina.loan.web.vo.SolrRecord;
import se.nrm.dina.mongodb.loan.vo.Sample;
/**
*
* @author idali
*/
@Stateless
@Slf4j
public class SolrClient implements Serializable {
private final static String LOCAL_SOLR_URL = "http://localhost:8983/solr/"; // local
private final static String REMOTE_SOLR_URL_LOAN = "http://dina-loans:8983/solr/"; // dina-portal
private final static String REMOTE_SOLR_URL_AS = "http://dina-db.nrm.se:8983/solr/";
private static String SOLR_URL;
private final static String EXCLUDED_COLLECTIONS = " -cln:(262144 294912 458752 491521)";
private StringBuilder sb;
private final SolrServer solrServer;
private SolrQuery solrQuery;
private String host;
public SolrClient() {
InetAddress inetAddress = null;
try {
inetAddress = InetAddress.getLocalHost();
} catch (UnknownHostException une) {
log.warn(une.getMessage());
}
if (inetAddress != null) {
host = inetAddress.getHostName();
}
if (host.toLowerCase().contains("local")) {
SOLR_URL = LOCAL_SOLR_URL;
} else if (host.toLowerCase().contains("dina-loans")) {
SOLR_URL = REMOTE_SOLR_URL_LOAN;
} else {
SOLR_URL = REMOTE_SOLR_URL_AS;
}
solrServer = new HttpSolrServer(SOLR_URL);
}
public SolrRecord searchByCatalogNumber(String catalognumber) {
String searchTaxt = "cn:" + catalognumber + EXCLUDED_COLLECTIONS;
solrQuery = new SolrQuery();
solrQuery.setQuery(searchTaxt);
try {
QueryResponse response = solrServer.query(solrQuery);
if (response.getResults().getNumFound() > 0) {
return response.getBeans(SolrRecord.class).get(0);
}
} catch (SolrServerException ex) {
log.warn(ex.getMessage());
}
return null;
}
public List<SolrRecord> searchByTaxa(Sample sample, String field, String catalogNumbers) {
log.info("searchByTaxa :{}", solrServer);
List<SolrRecord> solrRecords = new ArrayList<>();
buildSearchTextString(sample, field, catalogNumbers);
log.info("search text : {}", sb.toString().trim());
try {
solrQuery = new SolrQuery();
solrQuery.setQuery(sb.toString().trim());
solrQuery.setStart(0);
solrQuery.setRows(5000);
QueryResponse response = solrServer.query(solrQuery);
solrRecords = response.getBeans(SolrRecord.class);
} catch (SolrServerException ex) {
log.warn(ex.getMessage());
}
return solrRecords;
}
private void buildSubString(String text, String field, StringBuilder sb) {
if (text.contains("(") || text.contains(")") || text.contains(",")) {
replaceChars(text);
}
String[] strings = text.split(" ");
if (strings.length > 1) {
sb.append("+(");
for (String s : strings) {
if (!s.isEmpty()) {
sb.append("+");
sb.append(field);
sb.append(":*");
sb.append(s);
sb.append("* ");
}
}
sb.append(") ");
} else {
sb.append("+");
sb.append(field);
sb.append(":*");
sb.append(text);
sb.append("* ");
}
}
private void buildSearchTextString(Sample sample, String field, String catalogNumbers) {
log.info("sample : {} -- {}", sample.getFamily(), sample.getGenus());
sb = new StringBuilder();
if (sample.getFamily() != null && !sample.getFamily().isEmpty()) {
buildSubString(sample.getFamily(), "fm", sb);
}
switch (field) {
case "sp":
if (sample.getGenus() != null && !sample.getGenus().isEmpty()) {
buildSubString(sample.getGenus(), "gn", sb);
}
if (sample.getSpecies() != null && !sample.getSpecies().isEmpty()) {
buildSubString(sample.getSpecies(), field, sb);
}
break;
case "gn":
if (sample.getGenus() != null && !sample.getGenus().isEmpty()) {
buildSubString(sample.getGenus(), "gn", sb);
}
break;
}
sb.append("+taxarank:220");
if (catalogNumbers != null && !catalogNumbers.isEmpty()) {
sb.append(" -cn:(");
sb.append(catalogNumbers);
sb.append(")");
}
sb.append(EXCLUDED_COLLECTIONS);
}
private String replaceChars(String value) {
String s = value.replaceAll("[\\[\\](),]", " ");
return s.trim();
}
}
| [
"ida.li@nrm.se"
] | ida.li@nrm.se |
3cf41593b33be088f5e09336cc0b8d1c94a65307 | c9cfc6279726394475f59800259f194d349ea8da | /src/com/scholastic/sbam/shared/objects/ServiceInstance.java | 3acf86976d0f0adc770db01b478eea61f56607c6 | [] | no_license | VijayEluri/SBAM-Dev | ce15f813da784fa764c42f8711bc565be6251580 | 1ba017f990e633112d2bbc94e20ac190f799dee4 | refs/heads/master | 2020-05-20T11:15:01.750085 | 2012-02-25T03:19:55 | 2012-02-25T03:19:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,913 | java | package com.scholastic.sbam.shared.objects;
import java.util.Date;
import com.extjs.gxt.ui.client.data.BeanModelTag;
import com.google.gwt.user.client.rpc.IsSerializable;
public class ServiceInstance extends BetterRowEditInstance implements BeanModelTag, IsSerializable {
public final static char [] SERVICE_TYPE_CODES = {'I', 'A' };
public final static String [] SERVICE_TYPE_NAMES = {"Initial", "Add-on" };
private String serviceCode;
private String description;
private char serviceType;
private String serviceTypeName;
private String exportValue;
private String exportFile;
private char status;
private boolean active;
private Date createdDatetime;
@Override
public void markForDeletion() {
setStatus('X');
}
@Override
public boolean thisIsDeleted() {
return status == 'X';
}
@Override
public boolean thisIsValid() {
return true;
}
@Override
public String returnTriggerProperty() {
return "junk";
}
@Override
public String returnTriggerValue() {
return "junk";
}
public String getServiceCode() {
return serviceCode;
}
public void setServiceCode(String serviceCode) {
this.serviceCode = serviceCode;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public char getStatus() {
return status;
}
public void setStatus(char status) {
this.status = status;
this.active = (this.status == 'A');
}
public Date getCreatedDatetime() {
return createdDatetime;
}
public void setCreatedDatetime(Date createdDatetime) {
this.createdDatetime = createdDatetime;
}
public boolean isActive() {
return active;
}
public void setActive(boolean active) {
if (this.status == 'X')
return;
setStatus(active?'A':'I');
}
public char getServiceType() {
return serviceType;
}
public void setServiceType(char serviceType) {
this.serviceType = serviceType;
// System.out.println("Set service type to " + this.serviceType + " directly.");
setServiceTypeName(serviceType);
}
public String getExportValue() {
return exportValue;
}
public void setExportValue(String exportValue) {
this.exportValue = exportValue;
}
public String getExportFile() {
return exportFile;
}
public void setExportFile(String exportFile) {
this.exportFile = exportFile;
}
public String getServiceTypeName() {
return serviceTypeName;
}
public void setServiceTypeName(String serviceTypeName) {
this.serviceTypeName = serviceTypeName;
// System.out.println("Set service type name to " + this.serviceTypeName + " directly.");
this.serviceType = getServiceTypeCode(serviceTypeName);
// System.out.println("Forced service type to " + this.serviceType + " using " + serviceTypeName);
}
public void setServiceTypeName(char serviceType) {
this.serviceTypeName = getServiceTypeName(serviceType);
// System.out.println("Forced service type name to " + this.serviceType + " using " + serviceType);
}
public String getServiceTypeName(char serviceTypeCode) {
for (int i = 0; i < SERVICE_TYPE_CODES.length; i++)
if (serviceTypeCode == SERVICE_TYPE_CODES [i])
return SERVICE_TYPE_NAMES [i];
return "Unknown '" + serviceTypeCode + "'";
}
public char getServiceTypeCode(String serviceTypeName) {
if (serviceTypeName == null)
return '_';
for (int i = 0; i < SERVICE_TYPE_NAMES.length; i++)
if (serviceTypeName.equals(SERVICE_TYPE_NAMES [i]))
return SERVICE_TYPE_CODES [i];
return '?';
}
public static ServiceInstance getEmptyInstance() {
ServiceInstance instance = new ServiceInstance();
instance.serviceCode = "";
instance.description = "";
return instance;
}
public static ServiceInstance getUnknownInstance(String code) {
ServiceInstance instance = new ServiceInstance();
instance.serviceCode = code;
instance.description = "Unknown service " + code;
return instance;
}
}
| [
"blacatena@comcast.net"
] | blacatena@comcast.net |
5368825ca2cfce80e76a18cdabe5ac9cef5bd8b2 | e2f79d3fbf148c83a5bcff01a73902be46458bb3 | /rdw-stubs/target/generated/nl/webservices/soap/GCRCreditAdviceData.java | 81d36ce92a9efc5050099b70f81f89f40d9d694f | [] | no_license | MithileshRavindiran/rdwDemo | 26873309a8ecc64eb8b8d549208bc1524bfa18ba | 78ae3aeeb3e7776dc2c8c9e6efcc29eba2be4fe8 | refs/heads/master | 2021-01-20T14:08:18.063293 | 2017-05-07T21:36:41 | 2017-05-07T21:36:41 | 90,563,248 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,680 | java |
package nl.webservices.soap;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for GCRCreditAdviceData complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="GCRCreditAdviceData">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <all>
* <element name="including_personal_judgement" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
* <element name="credit_advice" type="{http://www.webservices.nl/soap/}GCRCreditAdvice" minOccurs="0"/>
* <element name="credit_advice_mother" type="{http://www.webservices.nl/soap/}GCRCreditAdviceMother" minOccurs="0"/>
* <element name="credit_rating" type="{http://www.webservices.nl/soap/}GCRCreditRating" minOccurs="0"/>
* </all>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "GCRCreditAdviceData", propOrder = {
})
public class GCRCreditAdviceData {
@XmlElement(name = "including_personal_judgement")
protected boolean includingPersonalJudgement;
@XmlElement(name = "credit_advice")
protected GCRCreditAdvice creditAdvice;
@XmlElement(name = "credit_advice_mother")
protected GCRCreditAdviceMother creditAdviceMother;
@XmlElement(name = "credit_rating")
protected GCRCreditRating creditRating;
/**
* Gets the value of the includingPersonalJudgement property.
*
*/
public boolean isIncludingPersonalJudgement() {
return includingPersonalJudgement;
}
/**
* Sets the value of the includingPersonalJudgement property.
*
*/
public void setIncludingPersonalJudgement(boolean value) {
this.includingPersonalJudgement = value;
}
/**
* Gets the value of the creditAdvice property.
*
* @return
* possible object is
* {@link GCRCreditAdvice }
*
*/
public GCRCreditAdvice getCreditAdvice() {
return creditAdvice;
}
/**
* Sets the value of the creditAdvice property.
*
* @param value
* allowed object is
* {@link GCRCreditAdvice }
*
*/
public void setCreditAdvice(GCRCreditAdvice value) {
this.creditAdvice = value;
}
/**
* Gets the value of the creditAdviceMother property.
*
* @return
* possible object is
* {@link GCRCreditAdviceMother }
*
*/
public GCRCreditAdviceMother getCreditAdviceMother() {
return creditAdviceMother;
}
/**
* Sets the value of the creditAdviceMother property.
*
* @param value
* allowed object is
* {@link GCRCreditAdviceMother }
*
*/
public void setCreditAdviceMother(GCRCreditAdviceMother value) {
this.creditAdviceMother = value;
}
/**
* Gets the value of the creditRating property.
*
* @return
* possible object is
* {@link GCRCreditRating }
*
*/
public GCRCreditRating getCreditRating() {
return creditRating;
}
/**
* Sets the value of the creditRating property.
*
* @param value
* allowed object is
* {@link GCRCreditRating }
*
*/
public void setCreditRating(GCRCreditRating value) {
this.creditRating = value;
}
}
| [
"Mithilesh.RavindranSevugaperumal@klm.com"
] | Mithilesh.RavindranSevugaperumal@klm.com |
e405f07e2f6e5be14d67b763175a59afd57df1e4 | 78c26d40f752ad324c8eb6c1654fdad92a85ca6d | /src/main/java/com/spring/common/exception/ServiceException.java | 1028196bcf36b608ff3672753c79699340f8257e | [] | no_license | merlinxqh/spring-boot | c8323d26e587a2da619be20cbbbf1a04b08d4651 | 6163ddda645aadcfefa5a9df459ad84e870a78be | refs/heads/master | 2021-01-23T00:15:43.398029 | 2019-05-01T16:07:24 | 2019-05-01T16:07:24 | 85,707,826 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 532 | java | package com.spring.common.exception;
/**
* 自定义异常
* @author leo
* 继承RuntimeException 是因为 spring事务处理 只会针对这个异常 做回滚
*/
public class ServiceException extends RuntimeException{
/**
*
*/
private static final long serialVersionUID = -6926247165110964054L;
private String code;
public ServiceException(String code,String msg){
super(msg);
this.code=code;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
}
| [
"merlinkael@gmail.com"
] | merlinkael@gmail.com |
920196ebb48527a933e2097e2286784cd5b1dcdd | 15bd749e24678d87542bd69c506046cbb8ad1534 | /CBox-Dev/app/src/main/java/com/cbox/dev/engine/app/media/youtube/IntentsDemoActivity.java | f210f4d33be8e3000a5e71fe7537c45d5046d2c3 | [
"MIT"
] | permissive | CBox-dev/CBox | 50ec999b88e72643a8a571f0325d326522ff3ce3 | 3b2ccf388095aa9e6f89e6e9bb9571721c4505f3 | refs/heads/master | 2022-11-03T14:59:28.227009 | 2020-06-13T17:22:15 | 2020-06-13T17:22:15 | 271,910,562 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,700 | java | package com.cbox.dev.engine.app.media.youtube;
import com.cbox.dev.R;
import com.google.android.youtube.player.YouTubeIntents;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;
import android.widget.TextView;
import java.util.ArrayList;
import java.util.List;
import com.cbox.dev.engine.app.media.youtube.adapter.DemoListViewItem;
import com.cbox.dev.engine.app.media.youtube.adapter.DemoArrayAdapter;
/**
* A sample activity which shows how to use the {@link YouTubeIntents} static methods to create
* Intents that navigate the user to Activities within the main YouTube application.
*/
public final class IntentsDemoActivity extends Activity implements OnItemClickListener {
// This is the value of Intent.EXTRA_LOCAL_ONLY for API level 11 and above.
private static final String EXTRA_LOCAL_ONLY = "android.intent.extra.LOCAL_ONLY";
private static final String VIDEO_ID = "-Uwjt32NvVA";
private static final String PLAYLIST_ID = "PLF3DFB800F05F551A";
private static final String USER_ID = "Google";
private static final int SELECT_VIDEO_REQUEST = 1000;
private List<DemoListViewItem> intentItems;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.intents_demo);
intentItems = new ArrayList<DemoListViewItem>();
intentItems.add(new IntentItem("Play Video", IntentType.PLAY_VIDEO));
intentItems.add(new IntentItem("Open Playlist", IntentType.OPEN_PLAYLIST));
intentItems.add(new IntentItem("Play Playlist", IntentType.PLAY_PLAYLIST));
intentItems.add(new IntentItem("Open User", IntentType.OPEN_USER));
intentItems.add(new IntentItem("Open Search Results", IntentType.OPEN_SEARCH));
intentItems.add(new IntentItem("Upload Video", IntentType.UPLOAD_VIDEO));
ListView listView = (ListView) findViewById(R.id.intent_list);
DemoArrayAdapter adapter =
new DemoArrayAdapter(this, R.layout.list_item, intentItems);
listView.setAdapter(adapter);
listView.setOnItemClickListener(this);
TextView youTubeVersionText = (TextView) findViewById(R.id.youtube_version_text);
String version = YouTubeIntents.getInstalledYouTubeVersionName(this);
if (version != null) {
String text = String.format(getString(R.string.youtube_currently_installed), version);
youTubeVersionText.setText(text);
} else {
youTubeVersionText.setText(getString(R.string.youtube_not_installed));
}
}
public boolean isIntentTypeEnabled(IntentType type) {
switch (type) {
case PLAY_VIDEO:
return YouTubeIntents.canResolvePlayVideoIntent(this);
case OPEN_PLAYLIST:
return YouTubeIntents.canResolveOpenPlaylistIntent(this);
case PLAY_PLAYLIST:
return YouTubeIntents.canResolvePlayPlaylistIntent(this);
case OPEN_SEARCH:
return YouTubeIntents.canResolveSearchIntent(this);
case OPEN_USER:
return YouTubeIntents.canResolveUserIntent(this);
case UPLOAD_VIDEO:
return YouTubeIntents.canResolveUploadIntent(this);
}
return false;
}
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
IntentItem clickedIntentItem = (IntentItem) intentItems.get(position);
Intent intent;
switch (clickedIntentItem.type) {
case PLAY_VIDEO:
intent = YouTubeIntents.createPlayVideoIntentWithOptions(this, VIDEO_ID, true, false);
startActivity(intent);
break;
case OPEN_PLAYLIST:
intent = YouTubeIntents.createOpenPlaylistIntent(this, PLAYLIST_ID);
startActivity(intent);
break;
case PLAY_PLAYLIST:
intent = YouTubeIntents.createPlayPlaylistIntent(this, PLAYLIST_ID);
startActivity(intent);
break;
case OPEN_SEARCH:
intent = YouTubeIntents.createSearchIntent(this, USER_ID);
startActivity(intent);
break;
case OPEN_USER:
intent = YouTubeIntents.createUserIntent(this, USER_ID);
startActivity(intent);
break;
case UPLOAD_VIDEO:
// This will load a picker view in the users' gallery.
// The upload activity is started in the function onActivityResult.
intent = new Intent(Intent.ACTION_PICK, null).setType("video/*");
intent.putExtra(EXTRA_LOCAL_ONLY, true);
startActivityForResult(intent, SELECT_VIDEO_REQUEST);
break;
}
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent returnedIntent) {
if (resultCode == RESULT_OK) {
switch (requestCode) {
case SELECT_VIDEO_REQUEST:
Intent intent = YouTubeIntents.createUploadIntent(this, returnedIntent.getData());
startActivity(intent);
break;
}
}
super.onActivityResult(requestCode, resultCode, returnedIntent);
}
private enum IntentType {
PLAY_VIDEO,
OPEN_PLAYLIST,
PLAY_PLAYLIST,
OPEN_USER,
OPEN_SEARCH,
UPLOAD_VIDEO;
}
private final class IntentItem implements DemoListViewItem {
public final String title;
public final IntentType type;
public IntentItem(String title, IntentType type) {
this.title = title;
this.type = type;
}
@Override
public String getTitle() {
return title;
}
@Override
public boolean isEnabled() {
return isIntentTypeEnabled(type);
}
@Override
public String getDisabledText() {
return getString(R.string.intent_disabled);
}
}
}
| [
"asepmo.story@gmail.com"
] | asepmo.story@gmail.com |
6c84dae324ff903ae9e7e0de5fad1e712fc47c7d | 113bdb70174f5cc04493ff5fc952677a4f4e5bbf | /src/main/java/com/cheng/repository/ProductInfoRepository.java | 2281ca020142e4dd195d2ae897b6b4071c52da64 | [] | no_license | zchengi/wechat-sell | 78835cb555db9d613721e982a8134dda0830bb6b | 2d70c07fc77503b6b2f3df6d197a8fdd3b9476df | refs/heads/master | 2020-03-15T09:43:23.328100 | 2018-05-07T04:10:08 | 2018-05-07T04:10:08 | 132,080,934 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 455 | java | package com.cheng.repository;
import com.cheng.dataobject.ProductInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;
/**
* @author cheng
* 2018/5/4 17:56
*/
public interface ProductInfoRepository extends JpaRepository<ProductInfo, String> {
/**
* 查询上架商品
*
* @param productStatus
* @return
*/
List<ProductInfo> findByProductStatus(Integer productStatus);
}
| [
"792702352@qq.com"
] | 792702352@qq.com |
51b9d44e2326b3c98bb76fc9b262f35958c810c4 | 70f1594eac39f1f9f84482882042ba4ab5c0ba7c | /app/src/main/java/com/pipit/agc/util/Converters.java | 3d4f4c61e299141a97ee427f8cf423d380bd3e52 | [] | no_license | phuongbkatp/planabusive | 83dc99f2651285ac9b5e6f10bdcef6f139dcd406 | f17a144f5f48574f157021398f47175371dabd02 | refs/heads/master | 2020-07-23T15:18:48.782629 | 2019-09-10T16:36:07 | 2019-09-10T16:36:07 | 207,609,108 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,979 | java | package com.pipit.agc.util;
/*
* GSON Joda Time Serialisers
*
* Copyright 2013-2014 Greg Kopff
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
import org.joda.time.DateMidnight;
import org.joda.time.DateTime;
import org.joda.time.Duration;
import org.joda.time.Interval;
import org.joda.time.LocalDate;
import org.joda.time.LocalDateTime;
import org.joda.time.LocalTime;
import java.lang.reflect.Type;
/**
* The {@code Converters} class contains static methods for registering Joda Time converters.
*/
public class Converters
{
/** The specific genericized type for {@code DateMidnight}. */
public static final Type DATE_MIDNIGHT_TYPE = new TypeToken<DateMidnight>(){}.getType();
/** The specific genericized type for {@code DateTime}. */
public static final Type DATE_TIME_TYPE = new TypeToken<DateTime>(){}.getType();
/** The specific genericized type for {@code LocalDate}. */
public static final Type LOCAL_DATE_TYPE = new TypeToken<LocalDate>(){}.getType();
/** The specific genericized type for {@code LocalDateTime}. */
public static final Type LOCAL_DATE_TIME_TYPE = new TypeToken<LocalDateTime>(){}.getType();
/** The specific genericized type for {@code LocalTime}. */
public static final Type LOCAL_TIME_TYPE = new TypeToken<LocalTime>(){}.getType();
/** The specific genericized type for {@code Interval}. */
public static final Type INTERVAL_TYPE = new TypeToken<Interval>(){}.getType();
/** The specific genericized type for {@code Duration}. */
public static final Type DURATION_TYPE = new TypeToken<Duration>(){}.getType();
/**
* Registers all the Joda Time converters.
* @param builder The GSON builder to register the converters with.
* @return A reference to {@code builder}.
*/
public static GsonBuilder registerAll(GsonBuilder builder)
{
if (builder == null) { throw new NullPointerException("builder cannot be null"); }
/*
registerDateMidnight(builder);
registerDateTime(builder);
registerDuration(builder);
registerLocalDate(builder);
*/
registerLocalDateTime(builder);
/*
registerLocalTime(builder);
registerInterval(builder);
*/
return builder;
}
/**
* Registers the {@link LocalDateTime} converter.
* @param builder The GSON builder to register the converter with.
* @return A reference to {@code builder}.
*/
public static GsonBuilder registerLocalDateTime(GsonBuilder builder)
{
if (builder == null) { throw new NullPointerException("builder cannot be null"); }
builder.registerTypeAdapter(LOCAL_DATE_TIME_TYPE, new LocalDateTimeConverter());
return builder;
}
} | [
"32545917+phuongbkatp@users.noreply.github.com"
] | 32545917+phuongbkatp@users.noreply.github.com |
f82c930a126218e0719ee32d163fed7d5ce2b317 | d974af1ea3a31566644e595a2f9fab3c7209ace1 | /src/programmers_level2/MakeLeast.java | bce1a680f120135aeea5b1a67a46a3e7252a3de8 | [] | no_license | banjjoknim/codingTest | 2930993db865e1c8fda18a9a8573c773d6c9b068 | b5b1da8763b4edac488d4831ed7c0730efe6b193 | refs/heads/master | 2023-06-05T21:37:27.295251 | 2021-06-22T07:31:14 | 2021-06-22T07:31:14 | 287,068,121 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,003 | java | package programmers_level2;
import java.util.Arrays;
// 01시 00분 시작 02시 15분 완료.
// 최솟값 만들기
// 1. 순열 이용하여 순서 만들기 (필요없는거였음.. 삽질)
// 2. 차례대로 곱해서 더하기 (필요없는거였음.. 삽질)
// 3. 더해서 나온 값이 최소이면 반환 (필요없는거였음.. 삽질)
// 최솟값과 최댓값을 곱한것끼리 더한것이 가장 작은 수가 된다.
// 1 * 3 + 2 * 4 , 1 * 4 + 2 * 3 -> 3 + 8 = 11, 4 + 6 = 10
public class MakeLeast {
public int solution(int[] A, int[] B) {
Arrays.sort(A);
Arrays.sort(B);
int answer = 0;
for (int i = 0; i < A.length; i++) {
answer += A[i] * B[A.length - 1 - i];
}
return answer;
}
public static void main(String[] args) {
int[] A = new int[]{1, 4, 2};
int[] B = new int[]{5, 4, 4};
MakeLeast makeLeast = new MakeLeast();
System.out.println(makeLeast.solution(A, B));
}
}
| [
"zhfxmtkachdt@daum.net"
] | zhfxmtkachdt@daum.net |
dc4b74ddc01f0d1d077c4f3c13d183c83f0266a7 | 1e2a3700115a42ce0bd71f56680d9ad550862b7f | /dist/game/data/scripts/quests/Q00105_SkirmishWithOrcs/Q00105_SkirmishWithOrcs.java | 49a0dc6653751b95fa73b8e71b238d12386f6a85 | [] | no_license | toudakos/HighFive | 5a75313d43209193ad7bec89ce0f177bd7dddb6f | e76b6a497277f5e88093204b86f004101d0dca52 | refs/heads/master | 2021-04-23T00:34:59.390728 | 2020-03-25T04:17:38 | 2020-03-25T04:17:38 | 249,884,195 | 0 | 0 | null | 2020-03-25T04:08:31 | 2020-03-25T04:08:30 | null | UTF-8 | Java | false | false | 6,125 | java | /*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package quests.Q00105_SkirmishWithOrcs;
import java.util.HashMap;
import java.util.Map;
import com.l2jmobius.Config;
import com.l2jmobius.gameserver.enums.Race;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.quest.Quest;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.model.quest.State;
import com.l2jmobius.gameserver.network.serverpackets.SocialAction;
import com.l2jmobius.gameserver.util.Util;
import quests.Q00281_HeadForTheHills.Q00281_HeadForTheHills;
/**
* Skimirish with Orcs (105)
* @author janiko
*/
public final class Q00105_SkirmishWithOrcs extends Quest
{
// NPC
private static final int KENDNELL = 30218;
// Items
private static final int KENDELLS_1ST_ORDER = 1836;
private static final int KENDELLS_2ND_ORDER = 1837;
private static final int KENDELLS_3RD_ORDER = 1838;
private static final int KENDELLS_4TH_ORDER = 1839;
private static final int KENDELLS_5TH_ORDER = 1840;
private static final int KENDELLS_6TH_ORDER = 1841;
private static final int KENDELLS_7TH_ORDER = 1842;
private static final int KENDELLS_8TH_ORDER = 1843;
private static final int KABOO_CHIEFS_1ST_TORQUE = 1844;
private static final int KABOO_CHIEFS_2ST_TORQUE = 1845;
private static final Map<Integer, Integer> MONSTER_DROP = new HashMap<>();
static
{
MONSTER_DROP.put(27059, KENDELLS_1ST_ORDER); // Uoph (Kaboo Chief)
MONSTER_DROP.put(27060, KENDELLS_2ND_ORDER); // Kracha (Kaboo Chief)
MONSTER_DROP.put(27061, KENDELLS_3RD_ORDER); // Batoh (Kaboo Chief)
MONSTER_DROP.put(27062, KENDELLS_4TH_ORDER); // Tanukia (Kaboo Chief)
MONSTER_DROP.put(27064, KENDELLS_5TH_ORDER); // Turel (Kaboo Chief)
MONSTER_DROP.put(27065, KENDELLS_6TH_ORDER); // Roko (Kaboo Chief)
MONSTER_DROP.put(27067, KENDELLS_7TH_ORDER); // Kamut (Kaboo Chief)
MONSTER_DROP.put(27068, KENDELLS_8TH_ORDER); // Murtika (Kaboo Chief)
}
private static final int[] KENDNELLS_ORDERS =
{
KENDELLS_1ST_ORDER,
KENDELLS_2ND_ORDER,
KENDELLS_3RD_ORDER,
KENDELLS_4TH_ORDER,
KENDELLS_5TH_ORDER,
KENDELLS_6TH_ORDER,
KENDELLS_7TH_ORDER,
KENDELLS_8TH_ORDER
};
// Misc
private static final int MIN_LVL = 10;
public Q00105_SkirmishWithOrcs()
{
super(105);
addStartNpc(KENDNELL);
addTalkId(KENDNELL);
addKillId(MONSTER_DROP.keySet());
registerQuestItems(KENDNELLS_ORDERS);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
final QuestState st = getQuestState(player, false);
String htmltext = null;
if (st == null)
{
return htmltext;
}
switch (event)
{
case "30218-04.html":
{
if (st.isCreated())
{
st.startQuest();
giveItems(player, KENDNELLS_ORDERS[getRandom(0, 3)], 1);
htmltext = event;
}
break;
}
case "30218-05.html":
{
htmltext = event;
break;
}
}
return htmltext;
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final QuestState st = getQuestState(killer, false);
if ((st != null) && Util.checkIfInRange(Config.ALT_PARTY_RANGE, npc, killer, true))
{
switch (npc.getId())
{
case 27059:
case 27060:
case 27061:
case 27062:
{
if (st.isCond(1) && hasQuestItems(killer, MONSTER_DROP.get(npc.getId())))
{
giveItems(killer, KABOO_CHIEFS_1ST_TORQUE, 1);
st.setCond(2, true);
}
break;
}
case 27064:
case 27065:
case 27067:
case 27068:
{
if (st.isCond(3) && hasQuestItems(killer, MONSTER_DROP.get(npc.getId())))
{
giveItems(killer, KABOO_CHIEFS_2ST_TORQUE, 1);
st.setCond(4, true);
}
break;
}
}
}
return super.onKill(npc, killer, isSummon);
}
@Override
public String onTalk(L2Npc npc, L2PcInstance talker)
{
final QuestState st = getQuestState(talker, true);
String htmltext = getNoQuestMsg(talker);
switch (st.getState())
{
case State.CREATED:
{
if (talker.getRace() == Race.ELF)
{
htmltext = (talker.getLevel() >= MIN_LVL) ? "30218-03.htm" : "30218-02.htm";
}
else
{
htmltext = "30218-01.htm";
}
break;
}
case State.STARTED:
{
if (hasAtLeastOneQuestItem(talker, KENDELLS_1ST_ORDER, KENDELLS_2ND_ORDER, KENDELLS_3RD_ORDER, KENDELLS_4TH_ORDER))
{
htmltext = "30218-06.html";
}
if (st.isCond(2) && hasQuestItems(talker, KABOO_CHIEFS_1ST_TORQUE))
{
for (int i = 0; i < 4; i++)
{
takeItems(talker, KENDNELLS_ORDERS[i], -1);
}
takeItems(talker, KABOO_CHIEFS_1ST_TORQUE, 1);
giveItems(talker, KENDNELLS_ORDERS[getRandom(4, 7)], 1);
st.setCond(3, true);
htmltext = "30218-07.html";
}
if (hasAtLeastOneQuestItem(talker, KENDELLS_5TH_ORDER, KENDELLS_6TH_ORDER, KENDELLS_7TH_ORDER, KENDELLS_8TH_ORDER))
{
htmltext = "30218-08.html";
}
if (st.isCond(4) && hasQuestItems(talker, KABOO_CHIEFS_2ST_TORQUE))
{
Q00281_HeadForTheHills.giveNewbieReward(talker);
talker.sendPacket(new SocialAction(talker.getObjectId(), 3));
giveAdena(talker, 17599, true);
addExpAndSp(talker, 41478, 3555);
st.exitQuest(false, true);
htmltext = "30218-09.html";
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(talker);
break;
}
}
return htmltext;
}
} | [
"danielbarionn@gmail.com"
] | danielbarionn@gmail.com |
f849cf9eba8a1047c2c3860842d7f49b4c846744 | 69ee0508bf15821ea7ad5139977a237d29774101 | /cmis-core/src/main/java/vmware/vim25/UpdateVAppConfigResponse.java | 0869eeb9343706bf05a6b2bfcf43733a1b41e642 | [] | no_license | bhoflack/cmis | b15bac01a30ee1d807397c9b781129786eba4ffa | 09e852120743d3d021ec728fac28510841d5e248 | refs/heads/master | 2021-01-01T05:32:17.872620 | 2014-11-17T15:00:47 | 2014-11-17T15:00:47 | 8,852,575 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 742 | java |
package vmware.vim25;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "")
@XmlRootElement(name = "UpdateVAppConfigResponse")
public class UpdateVAppConfigResponse {
}
| [
"brh@melexis.com"
] | brh@melexis.com |
caf5573831d12f0d15bdf6c0261553f943e2b59c | 723ce9e722d3753b54335438102609f1f0273d2f | /main/java/net/journey/blocks/portal/BlockSenterianPortal.java | f0697bc9130241ed50f1769cc59738660c94d938 | [] | no_license | Dizzlepop12/Journey | 72b6ee9bc2f38062cf3b3515ede1243e6591efe3 | c314bbaf411a81e61f0df0fb129037c31c4590d9 | refs/heads/master | 2021-01-11T02:47:17.027290 | 2018-07-03T03:47:54 | 2018-07-03T03:47:54 | 56,901,235 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 5,482 | java | package net.journey.blocks.portal;
import java.util.List;
import java.util.Random;
import net.journey.JourneyAchievements;
import net.journey.JourneyBlocks;
import net.journey.JourneyTabs;
import net.journey.blocks.tileentity.TileEntityJourneyChest;
import net.journey.blocks.tileentity.TileEntitySenterianPortal;
import net.journey.dimension.corba.TeleporterCorba;
import net.journey.dimension.senterian.TeleporterSenterian;
import net.journey.enums.EnumSounds;
import net.journey.util.Config;
import net.journey.util.LangRegistry;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.MapColor;
import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.Item;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntityEndPortal;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.EnumWorldBlockLayer;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import net.slayer.api.EnumMaterialTypes;
import net.slayer.api.EnumToolType;
import net.slayer.api.SlayerAPI;
import net.slayer.api.entity.tileentity.container.BlockModContainer;
public class BlockSenterianPortal extends BlockModContainer{
protected EnumMaterialTypes blockType;
protected Item drop = null;
protected Random rand;
public int boostBrightnessLow;
public int boostBrightnessHigh;
public boolean enhanceBrightness;
public String name;
protected boolean isNormalCube = true;
public BlockSenterianPortal(EnumMaterialTypes blockType, String name, String finalName, Float hardness, CreativeTabs tab) {
super(blockType, name, name, hardness, tab);
LangRegistry.addBlock(name, finalName);
this.blockType = blockType;
setHardness(2.0F);
rand = new Random();
setStepSound(blockType.getSound());
setCreativeTab(tab);
setUnlocalizedName(name);
this.name = name;
this.setCreativeTab(JourneyTabs.portalBlocks);
JourneyBlocks.blockName.add(name);
}
@Override
public Block addName(String name) {
JourneyBlocks.blockName.add(name);
return this;
}
@Override
public String getName() {
return name;
}
@Override
public TileEntity createNewTileEntity(World worldIn, int meta) {
return new TileEntitySenterianPortal();
}
@Override
public void setBlockBoundsBasedOnState(IBlockAccess worldIn, BlockPos pos) {
float f = 0.0625F;
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, f, 1.0F);
}
@SideOnly(Side.CLIENT)
@Override
public boolean shouldSideBeRendered(IBlockAccess worldIn, BlockPos pos, EnumFacing side) {
return side == EnumFacing.DOWN ? super.shouldSideBeRendered(worldIn, pos, side) : false;
}
@Override
public void addCollisionBoxesToList(World worldIn, BlockPos pos, IBlockState state, AxisAlignedBB mask, List<AxisAlignedBB> list, Entity collidingEntity) {}
@Override
public boolean isOpaqueCube() {
return false;
}
@Override
public boolean isFullCube() {
return false;
}
@Override
public int quantityDropped(Random random) {
return 0;
}
@Override
public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entity) {
if((entity.ridingEntity == null) && (entity.riddenByEntity == null) && ((entity instanceof EntityPlayerMP))) {
EntityPlayerMP thePlayer = (EntityPlayerMP)entity;
thePlayer.triggerAchievement(JourneyAchievements.achievementCorba);
int dimensionID = Config.senterian;
Block blockFrame = JourneyBlocks.corbaStone;
if(thePlayer.timeUntilPortal > 0)
thePlayer.timeUntilPortal = 10;
else if(thePlayer.dimension != dimensionID) {
thePlayer.timeUntilPortal = 10;
thePlayer.mcServer.getConfigurationManager().transferPlayerToDimension(thePlayer, dimensionID, new TeleporterSenterian(thePlayer.mcServer.worldServerForDimension(dimensionID)));
} else {
thePlayer.timeUntilPortal = 10;
thePlayer.mcServer.getConfigurationManager().transferPlayerToDimension(thePlayer, 0, new TeleporterSenterian(thePlayer.mcServer.worldServerForDimension(0)));
}
}
}
@SideOnly(Side.CLIENT)
@Override
public void randomDisplayTick(World worldIn, BlockPos pos, IBlockState state, Random rand) {
double d0 = (double)((float)pos.getX() + rand.nextFloat());
double d1 = (double)((float)pos.getY() + 0.8F);
double d2 = (double)((float)pos.getZ() + rand.nextFloat());
double d3 = 0.0D;
double d4 = 0.0D;
double d5 = 0.0D;
worldIn.spawnParticle(EnumParticleTypes.SMOKE_LARGE, d0, d1, d2, d3, d4, d5, new int[0]);
worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0, d1, d2, d3, d4, d5, new int[0]);
worldIn.spawnParticle(EnumParticleTypes.FLAME, d0, d1, d2, d3, d4, d5, new int[0]);
}
@SideOnly(Side.CLIENT)
@Override
public Item getItem(World worldIn, BlockPos pos) {
return null;
}
@Override
public MapColor getMapColor(IBlockState state) {
return MapColor.blackColor;
}
} | [
"foolishnessisnecessary@gmail.com"
] | foolishnessisnecessary@gmail.com |
6122bdef5ba1a52aebad15067d7fd0ec49449074 | 072e5e07c495afe68cf1694445c026664658b887 | /src/com/dcdzsoft/business/sc/SCSyncTBBox.java | d49910d1de3b6d56ded755c16c65dbef0ebeb41a | [] | no_license | P79N6A/work-dbs-manager | 084e8d341d5f84ca43cd1aa20f701e68206e2a6d | 932009426659ccb10f578f73879960975306d276 | refs/heads/master | 2021-09-29T13:13:23.092146 | 2018-11-24T13:29:12 | 2018-11-24T13:29:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,153 | java | package com.dcdzsoft.business.sc;
import javax.sql.RowSet;
import com.dcdzsoft.EduException;
import com.dcdzsoft.sda.db.*;
import com.dcdzsoft.util.*;
import com.dcdzsoft.dto.function.*;
import com.dcdzsoft.dto.business.*;
import com.dcdzsoft.dao.*;
import com.dcdzsoft.dao.common.*;
import com.dcdzsoft.constant.*;
import com.dcdzsoft.business.ActionBean;
/**
* <p>Title: 智能自助包裹柜系统</p>
* <p>Description: 同步箱体信息 </p>
* <p>Copyright: Copyright (c) 2004</p>
* <p>Company: dcdzsoft</p>
* @author 王中立
* @version 1.0
*/
public class SCSyncTBBox extends ActionBean
{
public java.util.List<OutParamSCSyncTBBox> doBusiness(InParamSCSyncTBBox in) throws EduException
{
utilDAO = this.getUtilDAO();
commonDAO = this.getCommonDAO();
dbSession = this.getCurrentDBSession();
//1. 验证输入参数是否有效,如果无效返回-1。
if (in.LastSyncTime == null )
throw new EduException(ErrorCode.ERR_PARMERR);
java.util.List<OutParamSCSyncTBBox> outList = new java.util.LinkedList<OutParamSCSyncTBBox>();
PreparedWhereExpression whereSQL = new PreparedWhereExpression();
whereSQL.checkAdd("LastModifyTime", ">", in.LastSyncTime);
String sql = "SELECT * FROM V_TBBox WHERE 1=1" + whereSQL.getPreparedWhereSQL() + " ORDER BY LastModifyTime DESC";
RowSet rset = dbSession.executeQuery(sql,whereSQL);
while(RowSetUtils.rowsetNext(rset)){
OutParamSCSyncTBBox outParam = new OutParamSCSyncTBBox();
outParam.terminalNo = RowSetUtils.getStringValue(rset, "TerminalNo");
outParam.terminalName = RowSetUtils.getStringValue(rset, "TerminalName");
outParam.boxNo = RowSetUtils.getStringValue(rset, "BoxNo");
outParam.boxName = RowSetUtils.getStringValue(rset, "BoxName");
outParam.bSize = RowSetUtils.getStringValue(rset, "BoxType");
outParam.status = RowSetUtils.getStringValue(rset, "BoxStatus");
outParam.createTime = RowSetUtils.getTimestampValue(rset, "CreateTime");
outParam.updateTime = RowSetUtils.getTimestampValue(rset, "LastModifyTime");
outList.add(outParam);
}
return outList;
}
}
| [
"zhengxiaoyong@hzdongcheng.com"
] | zhengxiaoyong@hzdongcheng.com |
f8f80d1800a0a2ef11bdd2d13e2af4365495c9be | 5cdfc5afc3610a171c67ce66d4020291bf5052a5 | /gwt-jfxbeans/src/main/resources/us/heptet/gwt/jfxbeans/javafx/beans/property/IntegerPropertyBase.java | fb4352bf89becf6bf26ef85558f149741b7d5dfd | [] | no_license | kaymccormick/magewars | 27a168ff67eb0b5e8a8d8c1f7ed8c85abe53d956 | 624f3d72982fde6cd591e393833d0617c1466d29 | refs/heads/master | 2021-01-11T21:32:06.931043 | 2017-01-13T00:17:32 | 2017-01-13T00:17:32 | 78,797,169 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,030 | java | /*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package javafx.beans.property;
import javafx.beans.InvalidationListener;
import javafx.beans.Observable;
import javafx.beans.binding.IntegerBinding;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import com.sun.javafx.binding.ExpressionHelper;
import java.lang.ref.WeakReference;
import javafx.beans.value.ObservableIntegerValue;
import javafx.beans.value.ObservableNumberValue;
/**
* The class {@code IntegerPropertyBase} is the base class for a property
* wrapping a {@code int} value.
*
* It provides all the functionality required for a property except for the
* {@link #getBean()} and {@link #getName()} methods, which must be implemented
* by extending classes.
*
* @see IntegerProperty
*
*
* @since JavaFX 2.0
*/
public abstract class IntegerPropertyBase extends IntegerProperty {
private int value;
private ObservableIntegerValue observable = null;;
private InvalidationListener listener = null;
private boolean valid = true;
private ExpressionHelper<Number> helper = null;
/**
* The constructor of the {@code IntegerPropertyBase}.
*/
public IntegerPropertyBase() {
}
/**
* The constructor of the {@code IntegerPropertyBase}.
*
* @param initialValue
* the initial value of the wrapped value
*/
public IntegerPropertyBase(int initialValue) {
this.value = initialValue;
}
@Override
public void addListener(InvalidationListener listener) {
helper = ExpressionHelper.addListener(helper, this, listener);
}
@Override
public void removeListener(InvalidationListener listener) {
helper = ExpressionHelper.removeListener(helper, listener);
}
@Override
public void addListener(ChangeListener<? super Number> listener) {
helper = ExpressionHelper.addListener(helper, this, listener);
}
@Override
public void removeListener(ChangeListener<? super Number> listener) {
helper = ExpressionHelper.removeListener(helper, listener);
}
/**
* Sends notifications to all attached
* {@link javafx.beans.InvalidationListener InvalidationListeners} and
* {@link javafx.beans.value.ChangeListener ChangeListeners}.
*
* This method is called when the value is changed, either manually by
* calling {@link #set(int)} or in case of a bound property, if the
* binding becomes invalid.
*/
protected void fireValueChangedEvent() {
ExpressionHelper.fireValueChangedEvent(helper);
}
private void markInvalid() {
if (valid) {
valid = false;
invalidated();
fireValueChangedEvent();
}
}
/**
* The method {@code invalidated()} can be overridden to receive
* invalidation notifications. This is the preferred option in
* {@code Objects} defining the property, because it requires less memory.
*
* The default implementation is empty.
*/
protected void invalidated() {
}
/**
* {@inheritDoc}
*/
@Override
public int get() {
valid = true;
return observable == null ? value : observable.get();
}
/**
* {@inheritDoc}
*/
@Override
public void set(int newValue) {
if (isBound()) {
throw new java.lang.RuntimeException("A bound value cannot be set.");
}
if (value != newValue) {
value = newValue;
markInvalid();
}
}
/**
* {@inheritDoc}
*/
@Override
public boolean isBound() {
return observable != null;
}
/**
* {@inheritDoc}
*/
@Override
public void bind(final ObservableValue<? extends Number> rawObservable) {
if (rawObservable == null) {
throw new NullPointerException("Cannot bind to null");
}
ObservableIntegerValue newObservable;
if (rawObservable instanceof ObservableIntegerValue) {
newObservable = (ObservableIntegerValue)rawObservable;
} else if (rawObservable instanceof ObservableNumberValue) {
final ObservableNumberValue numberValue = (ObservableNumberValue)rawObservable;
newObservable = new IntegerBinding() {
{
super.bind(rawObservable);
}
@Override
protected int computeValue() {
return numberValue.intValue();
}
};
} else {
newObservable = new IntegerBinding() {
{
super.bind(rawObservable);
}
@Override
protected int computeValue() {
final Number value = rawObservable.getValue();
return (value == null)? 0 : value.intValue();
}
};
}
if (!newObservable.equals(observable)) {
unbind();
observable = newObservable;
if (listener == null) {
listener = new Listener(this);
}
observable.addListener(listener);
markInvalid();
}
}
/**
* {@inheritDoc}
*/
@Override
public void unbind() {
if (observable != null) {
value = observable.get();
observable.removeListener(listener);
observable = null;
}
}
/**
* Returns a string representation of this {@code IntegerPropertyBase} object.
* @return a string representation of this {@code IntegerPropertyBase} object.
*/
@Override
public String toString() {
final Object bean = getBean();
final String name = getName();
final StringBuilder result = new StringBuilder("IntegerProperty [");
if (bean != null) {
result.append("bean: ").append(bean).append(", ");
}
if ((name != null) && (!name.equals(""))) {
result.append("name: ").append(name).append(", ");
}
if (isBound()) {
result.append("bound, ");
if (valid) {
result.append("value: ").append(get());
} else {
result.append("invalid");
}
} else {
result.append("value: ").append(get());
}
result.append("]");
return result.toString();
}
private static class Listener implements InvalidationListener {
private IntegerPropertyBase wref;
public Listener(IntegerPropertyBase ref) {
this.wref = ref;
}
@Override
public void invalidated(Observable observable) {
IntegerPropertyBase ref = wref;
ref.markInvalid();
}
}
}
| [
"kmthinkingrock@gmail.com"
] | kmthinkingrock@gmail.com |
f9e5f8f2fcd0250d574735e428dfceb90489a6cb | fb4e73b936ed10af52e7e971b7a0a39a805a86a9 | /src/main/java/com/angkorteam/fintech/popup/PaymentTypePopup.java | 52a8434dd71175ce86364d19e13108447d05c125 | [
"Apache-2.0"
] | permissive | Nkengnji/fintech | c82b67eea16d4fcc3d8aa6beb99b0fa6b943077d | 84131d2fdf1d9e8dd55f5d22c65da45009b11859 | refs/heads/master | 2023-04-30T16:41:59.851714 | 2018-06-06T14:03:38 | 2018-06-06T14:03:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,434 | java | package com.angkorteam.fintech.popup;
import java.util.Map;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.PropertyModel;
import com.angkorteam.fintech.ddl.AccGLAccount;
import com.angkorteam.fintech.ddl.MPaymentType;
import com.angkorteam.fintech.dto.enums.AccountType;
import com.angkorteam.fintech.dto.enums.AccountUsage;
import com.angkorteam.fintech.provider.SingleChoiceProvider;
import com.angkorteam.fintech.widget.TextFeedbackPanel;
import com.angkorteam.framework.wicket.ajax.markup.html.form.AjaxButton;
import com.angkorteam.framework.wicket.markup.html.form.Form;
import com.angkorteam.framework.wicket.markup.html.form.select2.Option;
import com.angkorteam.framework.wicket.markup.html.form.select2.Select2SingleChoice;
public class PaymentTypePopup extends PopupPanel {
protected Form<Void> form;
protected AjaxButton okayButton;
protected PropertyModel<Option> paymentValue;
protected SingleChoiceProvider paymentProvider;
protected Select2SingleChoice<Option> paymentField;
protected TextFeedbackPanel paymentFeedback;
protected PropertyModel<Option> accountValue;
protected SingleChoiceProvider accountProvider;
protected Select2SingleChoice<Option> accountField;
protected TextFeedbackPanel accountFeedback;
public PaymentTypePopup(String name, Map<String, Object> model) {
super(name, model);
}
@Override
protected void initData() {
}
@Override
protected void initComponent() {
this.form = new Form<>("form");
add(this.form);
this.okayButton = new AjaxButton("okayButton");
this.okayButton.setOnSubmit(this::okayButtonSubmit);
this.form.add(this.okayButton);
this.paymentValue = new PropertyModel<>(this.model, "paymentValue");
this.paymentProvider = new SingleChoiceProvider(MPaymentType.NAME, MPaymentType.Field.ID, MPaymentType.Field.VALUE);
this.paymentField = new Select2SingleChoice<>("paymentField", this.paymentValue, this.paymentProvider);
this.paymentField.setLabel(Model.of("Payment"));
this.form.add(this.paymentField);
this.paymentFeedback = new TextFeedbackPanel("paymentFeedback", this.paymentField);
this.form.add(this.paymentFeedback);
this.accountValue = new PropertyModel<>(this.model, "accountValue");
this.accountProvider = new SingleChoiceProvider(AccGLAccount.NAME, AccGLAccount.Field.ID, AccGLAccount.Field.NAME);
this.accountProvider.applyWhere("account_usage", AccGLAccount.Field.ACCOUNT_USAGE + " = " + AccountUsage.Detail.getLiteral());
this.accountProvider.applyWhere("classification_enum", AccGLAccount.Field.CLASSIFICATION_ENUM + " = " + AccountType.Asset.getLiteral());
this.accountField = new Select2SingleChoice<>("accountField", this.accountValue, this.accountProvider);
this.accountField.setLabel(Model.of("Account"));
this.form.add(this.accountField);
this.accountFeedback = new TextFeedbackPanel("accountFeedback", this.accountField);
this.form.add(this.accountFeedback);
}
@Override
protected void configureMetaData() {
}
protected boolean okayButtonSubmit(AjaxButton ajaxButton, AjaxRequestTarget target) {
this.window.setSignalId(ajaxButton.getId());
this.window.close(target);
return true;
}
} | [
"pkayjava@gmail.com"
] | pkayjava@gmail.com |
ac2ec549a5e914498b8165f046c3a7076d902de1 | a7f1830b8748574cdaef600e9c03d31354bf2130 | /src/main/java/me/brunosantana/codigo_apostila_curso_java/chapter02/exercicio/Principal.java | 5240324602930b603dcb0c318fb5cdaf41342cb1 | [] | no_license | brunosantanati/apostila-curso-java-codigo | 00429a2daf4ec78d9cb223adb2733b7a591bb342 | 6643468865cefa161c6f6557561879d3fd6e6673 | refs/heads/master | 2021-07-24T11:59:04.275912 | 2019-12-15T20:20:23 | 2019-12-15T20:20:23 | 225,260,655 | 1 | 0 | null | 2020-10-13T17:53:37 | 2019-12-02T01:37:45 | Java | UTF-8 | Java | false | false | 1,025 | java | package me.brunosantana.codigo_apostila_curso_java.chapter02.exercicio;
import java.util.Arrays;
import java.util.List;
public class Principal {
private Ordenador ordenador;
private List<Usuario> listaUsuarios;
public Principal(Ordenador ordenador) {
Usuario usuario1 = new Usuario("Bruno", 5000);
Usuario usuario2 = new Usuario("Anderson", 8000);
Usuario usuario3 = new Usuario("Eliza", 7500);
listaUsuarios = Arrays.asList(usuario1, usuario2, usuario3);
this.setOrdenador(ordenador);
}
public void setOrdenador(Ordenador ordenador) {
this.ordenador = ordenador;
}
public void ordenarLista() {
this.ordenador.ordenar(this.listaUsuarios);
mostrarListaOrdenada();
}
private void mostrarListaOrdenada() {
this.listaUsuarios.forEach(System.out::println);
}
public static void main(String[] args) {
Principal p = new Principal(new OrdenadorPorNome());
p.ordenarLista();
System.out.println("-------------");
p.setOrdenador(new OrdenadorPorPontos());
p.ordenarLista();
}
}
| [
"bruno.santana.ti@gmail.com"
] | bruno.santana.ti@gmail.com |
2f8b70af7ffe578aa2c1ef124f9ca151b5cc6d83 | 51d205aa1216eb18a7cf687d6730269d07e9233d | /Exercise3_06/src/Exercise3_06.java | 63fb826e61856d80ff7d3f1abaf97a97baaa29b3 | [] | no_license | 11michi11/SDJ1 | 15363a0dde1a5a6af98b16dc07a45b5ac079dc13 | 0d0265e38a3dc845eab30551857714b4b67d1878 | refs/heads/master | 2021-09-01T02:14:40.395758 | 2017-12-24T10:43:32 | 2017-12-24T10:43:32 | 106,025,331 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 560 | java | import java.util.Scanner;
public class Exercise3_06 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Give me two integers and I'll do the magic");
int a = in.nextInt(), b = in.nextInt();
System.out.print("Sorted: ");
System.out.println(a > b ? a + " " + b : b + " " + a);
System.out.println("Sum: " + (a + b));
System.out.println("Quotient: " + (a * b != 0 ? ((double) a / b) : "cannot divide by 0"));
System.out.println("Modulus: " + (a * b != 0 ? (a % b) : "cannot divide by 0"));
}
}
| [
"11michi11@gmail.com"
] | 11michi11@gmail.com |
1c760a57ca64e90d04f6744f0608a4fe71f67034 | 70b2493978c469a3e5cc1ad907d95e1ca85eb6dd | /jonix-onix3/src/main/java/com/tectonica/jonix/onix3/NumberOfCopies.java | 7cd89b1adc1605f13d29e9f8b31f8ca161ee342c | [
"Apache-2.0"
] | permissive | archi3315/jonix | 9130d06790f0e5267d911c164fb256e00826e05c | e7f59e81d3d6e3f4fa78a9406eceed97901093d0 | refs/heads/master | 2020-05-17T15:23:31.701307 | 2019-04-29T15:13:49 | 2019-04-29T15:13:49 | 183,789,334 | 0 | 0 | null | 2019-04-27T15:21:51 | 2019-04-27T15:21:51 | null | UTF-8 | Java | false | false | 4,280 | java | /*
* Copyright (C) 2012 Zach Melamed
*
* Latest version available online at https://github.com/zach-m/jonix
* Contact me at zach@tectonica.co.il
*
* 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.tectonica.jonix.onix3;
import com.tectonica.jonix.JPU;
import com.tectonica.jonix.OnixElement;
import com.tectonica.jonix.codelist.RecordSourceTypes;
import java.io.Serializable;
/*
* NOTE: THIS IS AN AUTO-GENERATED FILE, DO NOT EDIT MANUALLY
*/
/**
* <h1>Number of copies (product part)</h1><p>When product parts are listed as a specified number of copies of a single
* item, usually identified by a <ProductIdentifier>, <NumberOfCopies> must be used to specify the quantity,
* even if the number is ‘1’. It must be used when a multiple-item product or pack contains (a) a quantity of a single
* item; or (b) one of each of several different items (as in a multi-volume set); or (c) one or more of each of several
* different items (as in a dumpbin carrying copies of two different books, or a classroom pack containing a teacher’s
* text and twenty student texts). Consequently the element is mandatory, and non-repeating, in an occurrence of the
* <ProductPart> composite if <NumberOfItemsOfThisForm> is not present. It is normally accompanied by a
* <ProductIdentifier>; but in exceptional circumstances, if the sender’s system is unable to provide an
* identifier at this level, it may be sent with product form coding and without an ID.</p><table border='1'
* cellpadding='3'><tr><td>Format</td><td>Variable-length integer, maximum four digits</td></tr><tr><td>Reference
* name</td><td><NumberOfCopies></td></tr><tr><td>Short tag</td><td><x323></td></tr><tr><td>Cardinality</td><td>0…1</td></tr><tr><td>Example</td><td><x323>24</x323>
* (24 copies of a single item in eg a classroom pack of textbooks)</td></tr></table>
*/
public class NumberOfCopies implements OnixElement<Integer>, Serializable {
private static final long serialVersionUID = 1L;
public static final String refname = "NumberOfCopies";
public static final String shortname = "x323";
/////////////////////////////////////////////////////////////////////////////////
// ATTRIBUTES
/////////////////////////////////////////////////////////////////////////////////
/**
* (type: dt.DateOrDateTime)
*/
public String datestamp;
public RecordSourceTypes sourcetype;
public String sourcename;
/////////////////////////////////////////////////////////////////////////////////
// VALUE MEMBER
/////////////////////////////////////////////////////////////////////////////////
/**
* Raw Format: Variable-length integer, maximum four digits<p> (type: dt.StrictPositiveInteger)
*/
public Integer value;
/**
* Internal API, use the {@link #value} field instead
*/
@Override
public Integer _value() {
return value;
}
/////////////////////////////////////////////////////////////////////////////////
// SERVICES
/////////////////////////////////////////////////////////////////////////////////
private final boolean exists;
public static final NumberOfCopies EMPTY = new NumberOfCopies();
public NumberOfCopies() {
exists = false;
}
public NumberOfCopies(org.w3c.dom.Element element) {
exists = true;
datestamp = JPU.getAttribute(element, "datestamp");
sourcetype = RecordSourceTypes.byCode(JPU.getAttribute(element, "sourcetype"));
sourcename = JPU.getAttribute(element, "sourcename");
value = JPU.getContentAsInteger(element);
}
@Override
public boolean exists() {
return exists;
}
}
| [
"zach@tectonica.co.il"
] | zach@tectonica.co.il |
da8079e13446ba390026ab087ae7b73415fb9ff0 | 3b91ed788572b6d5ac4db1bee814a74560603578 | /com/google/android/gms/wearable/v.java | 4972c9c88a1d0e58393156663e760b0cd4df7e77 | [] | no_license | linsir6/WeChat_java | a1deee3035b555fb35a423f367eb5e3e58a17cb0 | 32e52b88c012051100315af6751111bfb6697a29 | refs/heads/master | 2020-05-31T05:40:17.161282 | 2018-08-28T02:07:02 | 2018-08-28T02:07:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,882 | java | package com.google.android.gms.wearable;
import android.net.Uri;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import com.google.android.gms.common.internal.safeparcel.a;
import com.google.android.gms.common.internal.safeparcel.a$a;
import com.google.android.gms.common.internal.safeparcel.b;
public final class v implements Creator<PutDataRequest> {
static void a(PutDataRequest putDataRequest, Parcel parcel, int i) {
int t = b.t(parcel, 20293);
b.c(parcel, 1, putDataRequest.mVersionCode);
b.a(parcel, 2, putDataRequest.aMJ, i);
b.a(parcel, 4, putDataRequest.bds);
b.a(parcel, 5, putDataRequest.bdf);
b.u(parcel, t);
}
public final /* synthetic */ Object createFromParcel(Parcel parcel) {
int c = a.c(parcel);
int i = 0;
byte[] bArr = null;
Bundle bundle = null;
Uri uri = null;
while (parcel.dataPosition() < c) {
int readInt = parcel.readInt();
switch (65535 & readInt) {
case 1:
i = a.e(parcel, readInt);
break;
case 2:
uri = (Uri) a.a(parcel, readInt, Uri.CREATOR);
break;
case 4:
bundle = a.m(parcel, readInt);
break;
case 5:
bArr = a.n(parcel, readInt);
break;
default:
a.b(parcel, readInt);
break;
}
}
if (parcel.dataPosition() == c) {
return new PutDataRequest(i, uri, bundle, bArr);
}
throw new a$a("Overread allowed size end=" + c, parcel);
}
public final /* synthetic */ Object[] newArray(int i) {
return new PutDataRequest[i];
}
}
| [
"707194831@qq.com"
] | 707194831@qq.com |
fb72f5bfc174650ab3440e578b4315e4fe392128 | a33aac97878b2cb15677be26e308cbc46e2862d2 | /data/libgdx/AtlasTmxMapLoader_loadAsync.java | 5147a85413b91fead364486e6552b26c5f9ff468 | [] | no_license | GabeOchieng/ggnn.tensorflow | f5d7d0bca52258336fc12c9de6ae38223f28f786 | 7c62c0e8427bea6c8bec2cebf157b6f1ea70a213 | refs/heads/master | 2022-05-30T11:17:42.278048 | 2020-05-02T11:33:31 | 2020-05-02T11:33:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 590 | java | @Override
public void loadAsync(AssetManager manager, String fileName, FileHandle tmxFile, AtlasTiledMapLoaderParameters parameter) {
map = null;
if (parameter != null) {
convertObjectToTileSpace = parameter.convertObjectToTileSpace;
flipY = parameter.flipY;
} else {
convertObjectToTileSpace = false;
flipY = true;
}
try {
map = loadMap(root, tmxFile, new AtlasResolver.AssetManagerAtlasResolver(manager));
} catch (Exception e) {
throw new GdxRuntimeException("Couldn't load tilemap '" + fileName + "'", e);
}
}
| [
"bdqnghi@gmail.com"
] | bdqnghi@gmail.com |
485a4e1d8803a9491d85b8d0d293e4f958b8f5f9 | 10186b7d128e5e61f6baf491e0947db76b0dadbc | /org/apache/xmlgraphics/ps/dsc/NestedDocumentHandler.java | b0bac115b8b12e1fd90893d360a01b0111a680dc | [
"SMLNJ",
"Apache-1.1",
"Apache-2.0",
"BSD-2-Clause"
] | permissive | MewX/contendo-viewer-v1.6.3 | 7aa1021e8290378315a480ede6640fd1ef5fdfd7 | 69fba3cea4f9a43e48f43148774cfa61b388e7de | refs/heads/main | 2022-07-30T04:51:40.637912 | 2021-03-28T05:06:26 | 2021-03-28T05:06:26 | 351,630,911 | 2 | 0 | Apache-2.0 | 2021-10-12T22:24:53 | 2021-03-26T01:53:24 | Java | UTF-8 | Java | false | false | 447 | java | package org.apache.xmlgraphics.ps.dsc;
import java.io.IOException;
import org.apache.xmlgraphics.ps.dsc.events.DSCEvent;
public interface NestedDocumentHandler {
void handle(DSCEvent paramDSCEvent, DSCParser paramDSCParser) throws IOException, DSCException;
}
/* Location: /mnt/r/ConTenDoViewer.jar!/org/apache/xmlgraphics/ps/dsc/NestedDocumentHandler.class
* Java compiler version: 5 (49.0)
* JD-Core Version: 1.1.3
*/ | [
"xiayuanzhong+gpg2020@gmail.com"
] | xiayuanzhong+gpg2020@gmail.com |
6a07905a516adaf8f4e91cbdf81fbefbf64ec262 | 88ae8695987ada722184307301e221e1ba3cc2fa | /chrome/android/javatests/src/org/chromium/chrome/browser/password_manager/settings/PasswordViewingTypeTest.java | f4d99c5884c7f63c05e1ca4bd1309906052506cb | [
"BSD-3-Clause"
] | permissive | iridium-browser/iridium-browser | 71d9c5ff76e014e6900b825f67389ab0ccd01329 | 5ee297f53dc7f8e70183031cff62f37b0f19d25f | refs/heads/master | 2023-08-03T16:44:16.844552 | 2023-07-20T15:17:00 | 2023-07-23T16:09:30 | 220,016,632 | 341 | 40 | BSD-3-Clause | 2021-08-13T13:54:45 | 2019-11-06T14:32:31 | null | UTF-8 | Java | false | false | 4,267 | java | // Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.password_manager.settings;
import static org.mockito.Mockito.when;
import androidx.test.filters.SmallTest;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.RuleChain;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;
import org.chromium.base.test.BaseJUnit4ClassRunner;
import org.chromium.base.test.util.Feature;
import org.chromium.chrome.browser.settings.MainSettings;
import org.chromium.chrome.browser.settings.SettingsActivityTestRule;
import org.chromium.chrome.browser.sync.SyncService;
import org.chromium.chrome.test.ChromeBrowserTestRule;
import org.chromium.components.browser_ui.settings.ChromeBasePreference;
import org.chromium.content_public.browser.test.util.TestThreadUtils;
/**
* Tests for verifying whether users are presented with the correct option of viewing
* passwords according to the user group they belong to (syncing with sync passphrase,
* syncing without sync passsphrase, non-syncing).
*/
@RunWith(BaseJUnit4ClassRunner.class)
public class PasswordViewingTypeTest {
private final ChromeBrowserTestRule mChromeBrowserTestRule = new ChromeBrowserTestRule();
private final SettingsActivityTestRule<MainSettings> mSettingsActivityTestRule =
new SettingsActivityTestRule<>(MainSettings.class);
// We need to destroy the SettingsActivity before tearing down the mock sign-in environment
// setup in ChromeBrowserTestRule to avoid code crash.
@Rule
public final RuleChain mRuleChain =
RuleChain.outerRule(mChromeBrowserTestRule).around(mSettingsActivityTestRule);
@Rule
public final MockitoRule mMockitoRule = MockitoJUnit.rule();
private ChromeBasePreference mPasswordsPref;
@Mock
private SyncService mSyncService;
@Before
public void setUp() {
mChromeBrowserTestRule.addAccount("account@example.com");
mSettingsActivityTestRule.startSettingsActivity();
MainSettings mainSettings = mSettingsActivityTestRule.getFragment();
mPasswordsPref =
(ChromeBasePreference) mainSettings.findPreference(MainSettings.PREF_PASSWORDS);
TestThreadUtils.runOnUiThreadBlocking(() -> SyncService.overrideForTests(mSyncService));
}
/**
* Verifies that sync settings are being set up correctly in the case of redirecting users.
* Checks that sync users are allowed to view passwords natively.
*/
@Test
@SmallTest
@Feature({"Sync"})
public void testUserRedirectSyncSettings() {
when(mSyncService.isSyncFeatureEnabled()).thenReturn(true);
when(mSyncService.isEngineInitialized()).thenReturn(true);
when(mSyncService.isUsingExplicitPassphrase()).thenReturn(false);
Assert.assertEquals(
PasswordSettings.class.getCanonicalName(), mPasswordsPref.getFragment());
}
/**
* Verifies that syncing users with a custom passphrase are allowed to
* natively view passwords.
*/
@Test
@SmallTest
public void testSyncingNativePasswordView() {
when(mSyncService.isSyncFeatureEnabled()).thenReturn(true);
when(mSyncService.isEngineInitialized()).thenReturn(true);
when(mSyncService.isUsingExplicitPassphrase()).thenReturn(true);
Assert.assertEquals(
PasswordSettings.class.getCanonicalName(), mPasswordsPref.getFragment());
Assert.assertNotNull(mSettingsActivityTestRule.getActivity().getIntent());
}
/**
* Verifies that non-syncing users are allowed to natively view passwords.
*/
@Test
@SmallTest
public void testNonSyncingNativePasswordView() {
when(mSyncService.isSyncFeatureEnabled()).thenReturn(false);
when(mSyncService.isEngineInitialized()).thenReturn(false);
when(mSyncService.isUsingExplicitPassphrase()).thenReturn(false);
Assert.assertEquals(
PasswordSettings.class.getCanonicalName(), mPasswordsPref.getFragment());
}
}
| [
"jengelh@inai.de"
] | jengelh@inai.de |
ef3f141316f6efaffb43c45878b04faaefccada8 | 69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e | /methods/Method_15483.java | 645abe0ce75559b11a1edede16314c42f8a12762 | [] | 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 | 350 | java | /**
* ????????? name => name; name:alias => alias
* @param fullName name ? name:alias
* @return {@link #formatKey(String,boolean,boolean,boolean,boolean)} formatColon = false, formatAt = true, formatHyphen = false, firstCase = false
*/
public static String formatOtherKey(String fullName){
return formatKey(fullName,false,true,false,false);
}
| [
"sonnguyen@utdallas.edu"
] | sonnguyen@utdallas.edu |
1767ccf588e9c97e2c30a73e15150e68442ec00c | 7469cfc6a37a6467238b1c1189f0458c59ea87e1 | /gemini-core/src/main/java/it/at7/gemini/api/Config.java | 87eb7e9fe9980605f5b196e24089d45ecfb4c98a | [
"Apache-2.0"
] | permissive | HubBucket-Team/gemini | 72a1e20e6da343aa4a75dd7c906ed507e0e0990c | e13bba5c55e7c56d6e48db37b18662bc190bc257 | refs/heads/master | 2020-06-30T18:19:31.761270 | 2019-08-06T15:39:02 | 2019-08-06T15:39:02 | 200,908,468 | 1 | 1 | null | 2019-08-06T19:01:34 | 2019-08-06T19:01:34 | null | UTF-8 | Java | false | false | 698 | java | package it.at7.gemini.api;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import java.util.List;
@Configuration
public class Config implements WebMvcConfigurer {
@Override
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
converters.add(0, new EntityRecordMessageConverter());
converters.add(1, new EntityRecordListMessageConverter());
converters.add(2, new EntityRecordApiTypeMessageConverter());
converters.add(3, new EntityRecordListApiMessageConverter());
}
}
| [
"tarquiniandreagm@gmail.com"
] | tarquiniandreagm@gmail.com |
6a524082b5391aa49436c46d7802ddfe6f9caf3c | 6225daa34f9a6385f9612716fabb0b6917f2759c | /src/automation-test/java/au/com/cgu/harvest/automation/scenario/farmmotor/ReprintEndorsementAutoClosedAcceptedScenario.java | ce87c5291ee7b39db6b099b6da28c540aee1c362 | [] | no_license | vemuvpk/test-automation-insurance | 134c398cb48f70c0be96f537534af26654565969 | bf8270fc6f9bcd4b44a81cc4420646f61aca89e0 | refs/heads/master | 2021-01-23T01:26:25.970823 | 2017-03-23T04:35:45 | 2017-03-23T04:35:45 | 85,907,516 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,618 | java | package au.com.cgu.harvest.automation.scenario.farmmotor;
import java.util.ArrayList;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import au.com.cgu.harvest.automation.ParallelScenarioRunner;
import au.com.cgu.harvest.automation.activity.farmmotor.AddWellKnownFinanceTypeAndInterestedPartyActivity;
import au.com.cgu.harvest.automation.activity.farmmotor.CreatePrivateMotorVehicleActivity;
import au.com.cgu.harvest.automation.activity.farmmotor.FinishPolicyAsNewPolicyActivity;
import au.com.cgu.harvest.automation.activity.farmmotor.FinishPolicyAsNewPolicyWithCertificateOfCurrencyActivity;
import au.com.cgu.harvest.automation.activity.farmmotor.InsuranceHistoryActivity;
import au.com.cgu.harvest.automation.activity.farmmotor.NavigateToFinishPageActivity;
import au.com.cgu.harvest.automation.activity.farmmotor.PolicyDetailsActivity;
import au.com.cgu.harvest.automation.activity.farmmotor.PrintPolicyActivity;
import au.com.cgu.harvest.automation.activity.farmmotor.SelectDocumentsToBeReprintedActivity;
import au.com.cgu.harvest.automation.activity.sunrise.AssertPolicyStateAfterAcceptanceFromSunriseActivity;
import au.com.cgu.harvest.automation.activity.sunrise.GetAcceptanceActivity;
import au.com.cgu.harvest.automation.activity.sunrise.LaunchFarmMotorActivity;
import au.com.cgu.harvest.automation.activity.sunrise.LoginToExecutiveActivity;
import au.com.cgu.harvest.automation.activity.sunrise.ModifyAndModifyRiskDetailsActivity;
import au.com.cgu.harvest.automation.scenario.AbstractScenario;
import au.com.cgu.harvest.automation.scenario.Scenario;
import au.com.cgu.harvest.pages.InsuranceHistoryPage;
import au.com.cgu.harvest.pages.PolicyDetailPage;
import au.com.cgu.harvest.pages.ReprintDocumentsPage;
import au.com.cgu.harvest.pages.farmmotor.FinishPage;
import au.com.cgu.harvest.pages.farmmotor.IPageWithInterestedParties;
import au.com.cgu.harvest.pages.farmmotor.PrivateMotorVehiclePage;
import au.com.cgu.harvest.pages.sunrise.NewBusinessPage;
import au.com.cgu.harvest.pages.sunrise.WelcomePage;
@Ignore
@RunWith( ParallelScenarioRunner.class )
@Scenario( "Reprint Documents for a Endorsement AutoClosed Accepted and check for Endorsement Schedule and Certificate of Currency Scenario" )
public class ReprintEndorsementAutoClosedAcceptedScenario extends AbstractScenario
{
// TESTING-301 Story not yet developed so test Ignored
@Test
public void execute()
{
WelcomePage welcomePage =
performActivity( new LoginToExecutiveActivity() );
PolicyDetailPage policyDetailPage =
performActivity( new LaunchFarmMotorActivity( welcomePage ) );
policyDetailPage =
performActivity( new PolicyDetailsActivity( policyDetailPage ) );
InsuranceHistoryPage insuranceHistoryPage =
performActivity( new InsuranceHistoryActivity( policyDetailPage ) );
PrivateMotorVehiclePage vehiclePage =
performActivity( new CreatePrivateMotorVehicleActivity( insuranceHistoryPage ) );
IPageWithInterestedParties popup =
performActivity( new AddWellKnownFinanceTypeAndInterestedPartyActivity( vehiclePage ) );
NewBusinessPage newBusinessPage =
performActivity( new FinishPolicyAsNewPolicyWithCertificateOfCurrencyActivity(
vehiclePage ) );
newBusinessPage =
performActivity( new GetAcceptanceActivity( newBusinessPage ) );
policyDetailPage =
performActivity( new ModifyAndModifyRiskDetailsActivity( newBusinessPage ) );
FinishPage finishPage =
performActivity( new NavigateToFinishPageActivity( policyDetailPage ) );
newBusinessPage =
performActivity( new FinishPolicyAsNewPolicyActivity(
finishPage ) );
newBusinessPage =
performActivity( new GetAcceptanceActivity( newBusinessPage ) );
newBusinessPage =
performActivity( new AssertPolicyStateAfterAcceptanceFromSunriseActivity(
newBusinessPage, "Endorsement Auto Closed Accepted" ) );
ReprintDocumentsPage printPage =
performActivity( new PrintPolicyActivity( newBusinessPage ) );
ArrayList< String > documentList = new ArrayList< String >();
documentList.add( "Endorsement Schedule" );
documentList.add( "Certificate of Currency" );
printPage =
performActivity( new SelectDocumentsToBeReprintedActivity( printPage, documentList ) );
}
}
| [
"vemuvpk@outlook.com"
] | vemuvpk@outlook.com |
66a63a1b9c7dbc0610f09a52b7907bcec1ca3185 | a2440dbe95b034784aa940ddc0ee0faae7869e76 | /modules/lwjgl/opengl/src/generated/java/org/lwjgl/opengl/EXTTextureMirrorClamp.java | c13b7ea244cd2ee2f772581ed237946436ce39df | [
"LGPL-2.0-or-later",
"BSD-3-Clause",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-khronos"
] | permissive | LWJGL/lwjgl3 | 8972338303520c5880d4a705ddeef60472a3d8e5 | 67b64ad33bdeece7c09b0f533effffb278c3ecf7 | refs/heads/master | 2023-08-26T16:21:38.090410 | 2023-08-26T16:05:52 | 2023-08-26T16:05:52 | 7,296,244 | 4,835 | 1,004 | BSD-3-Clause | 2023-09-10T12:03:24 | 2012-12-23T15:40:04 | Java | UTF-8 | Java | false | false | 1,555 | java | /*
* Copyright LWJGL. All rights reserved.
* License terms: https://www.lwjgl.org/license
* MACHINE GENERATED FILE, DO NOT EDIT
*/
package org.lwjgl.opengl;
/**
* Native bindings to the <a href="https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_mirror_clamp.txt">EXT_texture_mirror_clamp</a> extension.
*
* <p>EXT_texture_mirror_clamp extends the set of texture wrap modes to include three modes ({@link #GL_MIRROR_CLAMP_EXT MIRROR_CLAMP_EXT}, {@link #GL_MIRROR_CLAMP_TO_EDGE_EXT MIRROR_CLAMP_TO_EDGE_EXT},
* {@link #GL_MIRROR_CLAMP_TO_BORDER_EXT MIRROR_CLAMP_TO_BORDER_EXT}) that effectively use a texture map twice as large as the original image in which the additional half of the new image is
* a mirror image of the original image.</p>
*
* <p>This new mode relaxes the need to generate images whose opposite edges match by using the original image to generate a matching "mirror image". This
* mode allows the texture to be mirrored only once in the negative s, t, and r directions.</p>
*/
public final class EXTTextureMirrorClamp {
/**
* Accepted by the {@code param} parameter of TexParameteri and TexParameterf, and by the {@code params} parameter of TexParameteriv and TexParameterfv,
* when their {@code pname} parameter is TEXTURE_WRAP_S, TEXTURE_WRAP_T, or TEXTURE_WRAP_R.
*/
public static final int
GL_MIRROR_CLAMP_EXT = 0x8742,
GL_MIRROR_CLAMP_TO_EDGE_EXT = 0x8743,
GL_MIRROR_CLAMP_TO_BORDER_EXT = 0x8912;
private EXTTextureMirrorClamp() {}
} | [
"iotsakp@gmail.com"
] | iotsakp@gmail.com |
ecb3234545f55ce31014bc68583ca28190d2a2da | 08d2717c64c7e2b4b440fc3dc702e33705254c85 | /swim-core-java/swim.db/src/main/java/swim/db/QTreeValueCursor.java | 130ff857918526d39e7f2aab9ee8016360b1eb0e | [
"Apache-2.0"
] | permissive | SirCipher/swimci | 5e48b5cfbd154a270a766affc796ffec0ed5b721 | ddef2f506ddff7943e6ff2e2ab50843ec7adcb56 | refs/heads/master | 2020-09-14T02:24:47.503873 | 2019-12-12T11:12:42 | 2019-12-12T11:12:42 | 222,979,003 | 1 | 0 | null | 2019-11-28T11:56:25 | 2019-11-20T16:20:58 | Java | UTF-8 | Java | false | false | 1,951 | java | // Copyright 2015-2019 SWIM.AI 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 swim.db;
import swim.structure.Slot;
import swim.structure.Value;
import swim.util.Cursor;
final class QTreeValueCursor implements Cursor<Value> {
final Cursor<Slot> inner;
QTreeValueCursor(Cursor<Slot> inner) {
this.inner = inner;
}
@Override
public boolean isEmpty() {
return this.inner.isEmpty();
}
@Override
public Value head() {
return this.inner.head().toValue().body();
}
@Override
public void step() {
this.inner.step();
}
@Override
public void skip(long count) {
this.inner.skip(count);
}
@Override
public boolean hasNext() {
return this.inner.hasNext();
}
@Override
public long nextIndexLong() {
return this.inner.nextIndexLong();
}
@Override
public int nextIndex() {
return this.inner.nextIndex();
}
@Override
public Value next() {
return this.inner.next().toValue().body();
}
@Override
public boolean hasPrevious() {
return this.inner.hasPrevious();
}
@Override
public long previousIndexLong() {
return this.inner.previousIndexLong();
}
@Override
public int previousIndex() {
return this.inner.previousIndex();
}
@Override
public Value previous() {
return this.inner.previous().toValue().body();
}
@Override
public void load() throws InterruptedException {
this.inner.load();
}
}
| [
"tklapwijk92@gmail.com"
] | tklapwijk92@gmail.com |
0e475b8c31235fd95d430512b282b7ab1263da19 | c239c90f8e0c2bf71e1c469e0305c533168f4eb2 | /src/main/java/com/pauu/spring/beans/spel/Car.java | 70fb5d24535770159a9f1739906b3486a0bb72bc | [] | no_license | southeastpx/Spring-1 | d8c7e0ae404d1def5210bf9610ef59710b43cf27 | 2345bbc4e7415cd6f3cc263a9717209ec59780f2 | refs/heads/master | 2020-04-02T07:55:15.304342 | 2016-08-03T02:24:14 | 2016-08-03T02:24:14 | 63,758,156 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 703 | java | package com.pauu.spring.beans.spel;
public class Car {
private String brand;
private double price;
private double tyrePerimeter;//轮胎周长
public String getBrand() {
return brand;
}
public void setBrand(String brand) {
this.brand = brand;
}
public double getPrice() {
return price;
}
public void setPrice(double price) {
this.price = price;
}
public double getTyrePerimeter() {
return tyrePerimeter;
}
public void setTyrePerimeter(double tyrePerimeter) {
this.tyrePerimeter = tyrePerimeter;
}
@Override
public String toString() {
return "Car [brand=" + brand + ", price=" + price + ", tyrePerimeter=" + tyrePerimeter + "]";
}
}
| [
"southeast_px@163.com"
] | southeast_px@163.com |
4fc20ef4687ff021e77e0380a56adaf7ce0d8a6c | 225e9c2aebb7b47971c738f45775713d7cfb15f5 | /jdk/jdk1.8/src/test/com/rmxue/concurrent/base/TestClassFile.java | 2b8462f0e2b7aca42f3cf058ffbcb1fa6382a5e8 | [] | no_license | smalldoctor/source-code | 6bb53559840f138a456c160aa22d0d7bba5322a0 | c7571807e8d29d46a353148de6dfce3e52f5cfe9 | refs/heads/master | 2022-11-05T19:01:27.152507 | 2019-07-02T09:57:44 | 2019-07-02T09:57:44 | 106,514,195 | 0 | 0 | null | 2022-10-05T19:09:17 | 2017-10-11T06:27:26 | Java | UTF-8 | Java | false | false | 390 | java | package com.rmxue.concurrent.base;
public class TestClassFile {
private volatile String a;
public static void main(String[] args) {
TestClassFile testClassFile = new TestClassFile();
for (int i = 0; i < 100000; i++) {
testClassFile.test();
}
}
public void test() {
a = "test class file";
System.out.println(a);
}
}
| [
"15312408287@163.com"
] | 15312408287@163.com |
205cd87255310002dc1d49e7a892be777312f49e | c8bd99cff98113502ecece15fef0b970f8161593 | /csg/Edge.java | 28c609fc43e0339dedfff88b2d2f3f6853879466 | [] | no_license | kwan3217/java | 7aa67e8baffebd27c337adaa2601b218160342f4 | d9cecd94d5fa26dd5ae8fc4293bc23304ffeb8a3 | refs/heads/master | 2020-04-06T06:54:39.656838 | 2016-09-10T13:54:47 | 2016-09-10T13:54:47 | 63,456,241 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,606 | java | package csg;
class Edge
{
HalfEdge he1; // pointer to right half edge
HalfEdge he2; // pointer to left half edge
Edge nexte; // pointer to next edge
Edge preve; // pointer to previous edge
Solid esolid;
CSG parent; // pointer to the parent
// Constructor
Edge(CSG par, Solid s)
{
parent = par;
parent.num_edges++;
he1 = null;
he2 = null;
addList(s);
}
Edge(CSG par)
{
parent = par;
he1 = null;
he2 = null;
}
void addList(Solid s)
{
nexte = s.sedges;
if (s.sedges != null)
s.sedges.preve = this;
preve = null;
s.sedges = this;
esolid = s;
}
void delList(Solid s)
{
if(preve != null)
preve.nexte = nexte;
if(nexte != null)
nexte.preve = preve;
if(s.sedges == this)
s.sedges = nexte;
esolid = null;
}
HalfEdge addhe(Vertex v, HalfEdge where, int sign)
{
HalfEdge he;
if(where.edge == null)
he = where;
else
{
he = new HalfEdge(parent, 1);
where.prev.next = he;
he.prev = where.prev;
where.prev = he;
he.next = where;
}
he.edge = this;
he.vertex = v;
he.wloop = where.wloop;
if( sign == 0) // Plus
he1 = he;
else
he2 = he;
return(he);
}
// check the orientation of null edge e
int checknulledge()
{
HalfEdge ref, t_he;
int pos[], neg[];
pos = new int[1];
neg = new int[1];
if(he1.strutnulledge() == 0)
return(0); // not a strut
// let this = the half of e connected to other edges
if(he1 == he2.next)
t_he = he2;
else
t_he = he1;
// ignore if not "simple" strut edge
if(t_he.simplestrut() == 0)
return(0);
// try to locate a non-strut null edge from the loop of he
if((ref = t_he.getref1()) != null)
{
// check whether the orientations of this and ref match
if(ref == ref.edge.he1 && t_he == t_he.edge.he2)
return(0);
if(ref == ref.edge.he2 && t_he == t_he.edge.he1)
return(0);
return(1);
}
// try to locate a non-strut null edge around he.vtx
if((ref = t_he.getref2()) != null)
{
// check whether the orientations of this and ref match
if(ref == ref.edge.he1 && t_he == t_he.edge.he1)
return(0);
if(ref == ref.edge.he2 && t_he == t_he.edge.he2)
return(0);
return(1);
}
// all null edges of this loop were struts - let majority decide
t_he.getvotes(pos, neg);
if(pos[0] > neg[0])
{
if(t_he == t_he.edge.he2)
return(1);
return(0);
}
else
{
if(t_he == t_he.edge.he2)
return(0);
return(1);
}
}
}
| [
"omoikane.kwansystems.org"
] | omoikane.kwansystems.org |
a61c8dc4ee2dc2aabfd3905b27b11b4cff87db23 | c1b23a03926012ccee280b3895f100cec61d2407 | /topdeep_web_common/server/common-core/src/main/java/topdeep/commonfund/entity/gateway/def/ISFrequentContactsUpdateInput.java | 9295652998853bb1793d168a3a6b3eea4bb703d5 | [] | no_license | zhuangxiaotian/project | a0e548c88f01339993097d99ac68adcba9d11171 | d0c96854b3678209c9a25d07c9729c613fe66d38 | refs/heads/master | 2020-12-05T23:14:27.354448 | 2016-09-01T07:19:22 | 2016-09-01T07:19:22 | 67,108,931 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,261 | java | package topdeep.commonfund.entity.gateway.def;
import java.io.Serializable;
import java.util.*;
/**
* 修改客户联系人备注和标记功能输入参数
*/
public class ISFrequentContactsUpdateInput extends topdeep.commonfund.entity.gateway.def.ISBaseInput {
/**
* 联系人标识,
*/
private String id;
/**
* 联系人备注,
*/
private String contactsRemarks;
/**
* 联系人状态(1、普通;2、关注;3、拉黑),
*/
private String contactsState;
public ISFrequentContactsUpdateInput() {
this.setZ_funcCode("m0f");
}
/**
* 联系人标识,
*/
public String getId() {
return this.id;
}
/**
* 联系人标识,
*/
public void setId(String value)
{
this.id = value;
}
/**
* 联系人备注,
*/
public String getContactsRemarks() {
return this.contactsRemarks;
}
/**
* 联系人备注,
*/
public void setContactsRemarks(String value)
{
this.contactsRemarks = value;
}
/**
* 联系人状态(1、普通;2、关注;3、拉黑),
*/
public String getContactsState() {
return this.contactsState;
}
/**
* 联系人状态(1、普通;2、关注;3、拉黑),
*/
public void setContactsState(String value)
{
this.contactsState = value;
}
}
| [
"xtian.zhuang@topdeep.com"
] | xtian.zhuang@topdeep.com |
49f83ba2789938ae7640d7fd53b62f01a43cc4bd | c7e000e5c6549e095a8ffd032d33e0ca449c7ffd | /bin/platform/bootstrap/gensrc/de/hybris/platform/commercefacades/product/data/VariantCategoryData.java | ed9ab64408abbad21ee6a370d450cdf23f674426 | [] | no_license | J3ys/million | e80ff953e228e4bc43a1108a1c117ddf11cc4644 | a97974b68b4adaf820f9024aa5181de635c60b4f | refs/heads/master | 2021-03-09T22:59:35.115273 | 2015-05-19T02:47:29 | 2015-05-19T02:47:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,720 | java | /*
* ----------------------------------------------------------------
* --- WARNING: THIS FILE IS GENERATED AND WILL BE OVERWRITTEN!
* --- Generated at 2015/05/18 13:25:59
* ----------------------------------------------------------------
*
* [y] hybris Platform
*
* Copyright (c) 2000-2013 hybris AG
* All rights reserved.
*
* This software is the confidential and proprietary information of hybris
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with hybris.
*
*
*/
package de.hybris.platform.commercefacades.product.data;
public class VariantCategoryData implements java.io.Serializable
{
/** <i>Generated property</i> for <code>VariantCategoryData.hasImage</code> property defined at extension <code>commercefacades</code>. */
private Boolean hasImage;
/** <i>Generated property</i> for <code>VariantCategoryData.priority</code> property defined at extension <code>commercefacades</code>. */
private int priority;
/** <i>Generated property</i> for <code>VariantCategoryData.name</code> property defined at extension <code>commercefacades</code>. */
private String name;
public VariantCategoryData()
{
// default constructor
}
public void setHasImage(final Boolean hasImage)
{
this.hasImage = hasImage;
}
public Boolean getHasImage()
{
return hasImage;
}
public void setPriority(final int priority)
{
this.priority = priority;
}
public int getPriority()
{
return priority;
}
public void setName(final String name)
{
this.name = name;
}
public String getName()
{
return name;
}
} | [
"yanagisawa@gotandadenshi.jp"
] | yanagisawa@gotandadenshi.jp |
ac9cd4a5f5f8118851c41aa25781404657f978b5 | 56d1c5242e970ca0d257801d4e627e2ea14c8aeb | /src/com/csms/leetcode/number/n1300/n1360/Leetcode1377.java | c3a6c6a769b710062b53a930a7d9974d1832a9f8 | [] | no_license | dai-zi/leetcode | e002b41f51f1dbd5c960e79624e8ce14ac765802 | 37747c2272f0fb7184b0e83f052c3943c066abb7 | refs/heads/master | 2022-12-14T11:20:07.816922 | 2020-07-24T03:37:51 | 2020-07-24T03:37:51 | 282,111,073 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 161 | java | package com.csms.leetcode.number.n1300.n1360;
//T秒后青蛙的位置
//困难
public class Leetcode1377 {
public static void main(String[] args) {
}
} | [
"liuxiaotongdaizi@sina.com"
] | liuxiaotongdaizi@sina.com |
55d57328136684d36b792558df15098024e27919 | 60b3aa0ae501058f26326b77bc5292e1c3a72859 | /android-demo/MagicIndicator/app/src/main/java/com/queqianme/www/magicindicator/library/BadgePagerTitleView.java | 7c0d9f41e77090e8711eeac0323f380f625982b9 | [] | no_license | puyanLiu/javaAndAndroidDemo | 36ea3538ded86be3ad70202f09276e324b4ba173 | b4c1b8623f6c25fb80c4a1f405c9664f5b399baa | refs/heads/master | 2021-09-28T20:12:23.145754 | 2018-11-20T02:33:13 | 2018-11-20T02:33:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,917 | java | package com.queqianme.www.magicindicator.library;
import android.content.Context;
import android.view.View;
import android.widget.FrameLayout;
/**
* Created by liupuyan on 2017/11/20.
*
* 支持显示角标的title,角标布局可自定义
*/
public class BadgePagerTitleView extends FrameLayout implements IMeasurablePagerTitleView {
private IPagerTitleView mInnerPagerTitleView;
private View mBadgeView;
private boolean mAutoCancelBadge = true;
private BadgeRule mXBadgeRule;
private BadgeRule mYBadgeRule;
public BadgePagerTitleView(Context context) {
super(context);
}
@Override
public void onSelected(int index, int totalCount) {
if (mInnerPagerTitleView != null) {
mInnerPagerTitleView.onSelected(index, totalCount);
}
if (mAutoCancelBadge) {
setBadgeView(null);
}
}
@Override
public void onDeselected(int index, int totalCount) {
if (mInnerPagerTitleView != null) {
mInnerPagerTitleView.onDeselected(index, totalCount);
}
}
@Override
public void onLeave(int index, int totalCount, float leavePercent, boolean leftToRight) {
if (mInnerPagerTitleView != null) {
mInnerPagerTitleView.onLeave(index, totalCount, leavePercent, leftToRight);
}
}
@Override
public void onEnter(int index, int totalCount, float enterPercent, boolean leftToRight) {
if (mInnerPagerTitleView != null) {
mInnerPagerTitleView.onEnter(index, totalCount, enterPercent, leftToRight);
}
}
public IPagerTitleView getInnerPagerTitleView() {
return mInnerPagerTitleView;
}
public void setInnerPagerTitleView(IPagerTitleView innerPagerTitleView) {
if (mInnerPagerTitleView == innerPagerTitleView) {
return;
}
mInnerPagerTitleView = innerPagerTitleView;
removeAllViews();
if (mInnerPagerTitleView instanceof View) {
FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT);
addView((View) mInnerPagerTitleView, lp);
}
if (mBadgeView != null) {
FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
addView(mBadgeView, lp);
}
}
public View getBadgeView() {
return mBadgeView;
}
public void setBadgeView(View badgeView) {
if (mBadgeView == badgeView) {
return;
}
mBadgeView = badgeView;
removeAllViews();
if (mInnerPagerTitleView instanceof View) {
FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT);
addView((View) mInnerPagerTitleView, lp);
}
if (mBadgeView != null) {
FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
addView(mBadgeView, lp);
}
}
@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
super.onLayout(changed, left, top, right, bottom);
if (mInnerPagerTitleView instanceof View && mBadgeView != null) {
int[] position = new int[14]; // 14种角标定位方式
View v = (View) mInnerPagerTitleView;
position[0] = v.getLeft();
position[1] = v.getTop();
position[2] = v.getRight();
position[3] = v.getBottom();
if (mInnerPagerTitleView instanceof IMeasurablePagerTitleView) {
IMeasurablePagerTitleView view = (IMeasurablePagerTitleView) mInnerPagerTitleView;
position[4] = view.getContentLeft();
position[5] = view.getContentTop();
position[6] = view.getContentRight();
position[7] = view.getContentBottom();
} else {
for (int i = 4; i < 8; i++) {
position[i] = position[i - 4];
}
}
position[8] = v.getWidth() / 2;
position[9] = v.getHeight() / 2;
position[10] = position[4] / 2;
position[11] = position[5] / 2;
position[12] = position[6] + (position[2] - position[6]) / 2;
position[13] = position[7] + (position[3] - position[7]) / 2;
// 根据设置的BadgeRule调整角标的位置
if (mXBadgeRule != null) {
int x = position[mXBadgeRule.getAnchor().ordinal()];
int offset = mXBadgeRule.getOffset();
int newLeft = x + offset;
mBadgeView.offsetLeftAndRight(newLeft - mBadgeView.getLeft());
}
if (mYBadgeRule != null) {
int y = position[mYBadgeRule.getAnchor().ordinal()];
int offset = mYBadgeRule.getOffset();
int newTop = y + offset;
mBadgeView.offsetTopAndBottom(newTop - mBadgeView.getTop());
}
}
}
@Override
public int getContentLeft() {
if (mInnerPagerTitleView instanceof IMeasurablePagerTitleView) {
return getLeft() + ((IMeasurablePagerTitleView) mInnerPagerTitleView).getContentLeft();
}
return getLeft();
}
@Override
public int getContentTop() {
if (mInnerPagerTitleView instanceof IMeasurablePagerTitleView) {
return ((IMeasurablePagerTitleView) mInnerPagerTitleView).getContentTop();
}
return getTop();
}
@Override
public int getContentRight() {
if (mInnerPagerTitleView instanceof IMeasurablePagerTitleView) {
return getLeft() + ((IMeasurablePagerTitleView) mInnerPagerTitleView).getContentRight();
}
return getRight();
}
@Override
public int getContentBottom() {
if (mInnerPagerTitleView instanceof IMeasurablePagerTitleView) {
return ((IMeasurablePagerTitleView) mInnerPagerTitleView).getContentBottom();
}
return getBottom();
}
public BadgeRule getXBadgeRule() {
return mXBadgeRule;
}
public void setXBadgeRule(BadgeRule badgeRule) {
if (badgeRule != null) {
BadgeAnchor anchor = badgeRule.getAnchor();
if (anchor != BadgeAnchor.LEFT
&& anchor != BadgeAnchor.RIGHT
&& anchor != BadgeAnchor.CONTENT_LEFT
&& anchor != BadgeAnchor.CONTENT_RIGHT
&& anchor != BadgeAnchor.CENTER_X
&& anchor != BadgeAnchor.LEFT_EDGE_CENTER_X
&& anchor != BadgeAnchor.RIGHT_EDGE_CENTER_X) {
throw new IllegalArgumentException("x badge rule is wrong.");
}
}
mXBadgeRule = badgeRule;
}
public BadgeRule getYBadgeRule() {
return mYBadgeRule;
}
public void setYBadgeRule(BadgeRule badgeRule) {
if (badgeRule != null) {
BadgeAnchor anchor = badgeRule.getAnchor();
if (anchor != BadgeAnchor.TOP
&& anchor != BadgeAnchor.BOTTOM
&& anchor != BadgeAnchor.CONTENT_TOP
&& anchor != BadgeAnchor.CONTENT_BOTTOM
&& anchor != BadgeAnchor.CENTER_Y
&& anchor != BadgeAnchor.TOP_EDGE_CENTER_Y
&& anchor != BadgeAnchor.BOTTOM_EDGE_CENTER_Y) {
throw new IllegalArgumentException("y badge rule is wrong.");
}
}
mYBadgeRule = badgeRule;
}
public boolean isAutoCancelBadge() {
return mAutoCancelBadge;
}
public void setAutoCancelBadge(boolean autoCancelBadge) {
mAutoCancelBadge = autoCancelBadge;
}
}
| [
"814168332@qq.com"
] | 814168332@qq.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.