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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e3dd559179ec60a8329cf12fc8ea6b0a5bee836e | c395e83cb3f17ec9d61dccae2b5480cfb213a1fb | /chapter44/websocket-demo/src/main/java/com/example/websocketdemo/wsserver/WebSocketServer.java | d1e4bf171befeac000c70f659e0f0bf3735cef2a | [
"MIT"
] | permissive | hanqunfeng/springbootchapter | ea62c04f1364c3d48d4ba5245bb0dca4e2aa7d7f | 3d81dbc0644c923b2b808112e58045690408a78b | refs/heads/master | 2023-08-31T01:19:48.933309 | 2023-08-29T10:11:28 | 2023-08-29T10:11:28 | 246,488,567 | 9 | 10 | MIT | 2023-06-26T03:37:34 | 2020-03-11T06:04:37 | Java | UTF-8 | Java | false | false | 4,505 | java | package com.example.websocketdemo.wsserver;
import com.example.websocketdemo.controller.TokenController;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import javax.websocket.*;
import javax.websocket.server.PathParam;
import javax.websocket.server.ServerEndpoint;
import java.io.IOException;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicInteger;
/**
* <h1>WebSocketServer</h1>
* Created by hanqf on 2020/10/29 11:27.
*
* @ServerEndpoint(value = "/ws/asset")表示websocket的接口服务地址
* @OnOpen注解的方法,为连接建立成功时调用的方法
* @OnClose注解的方法,为连接关闭调用的方法
* @OnMessage注解的方法,为收到客户端消息后调用的方法
* @OnError注解的方法,为出现异常时调用的方法
*/
@Component
@Slf4j
@ServerEndpoint(value = "/ws/{userId}")
public class WebSocketServer {
//用来统计连接客户端的数量
private static final AtomicInteger OnlineCount = new AtomicInteger(0);
// concurrent包的线程安全Set,用来存放每个客户端对应的Session对象。
//private static CopyOnWriteArraySet<Session> SessionSet = new CopyOnWriteArraySet<>();
private static ConcurrentHashMap<String, Session> sessionMap = new ConcurrentHashMap<>();
/**
* 发送消息,实践表明,每次浏览器刷新,session会发生变化。
*
* @param session session
* @param message 消息
*/
private static void sendMessage(Session session, String message, String userId) throws IOException {
session.getBasicRemote().sendText(String.format("%s (From Server,Session ID=%s,UserId=%s)", message, session.getId(), userId));
}
/**
* 群发消息
* 服务器向所有在线的javax.websocket.Session用户发送消息。
*
* @param message 消息
*/
public static void broadCastInfo(String message) throws IOException {
sessionMap.forEach(LambdaBiConsumer.wrapper((k, v) -> {
Session session = sessionMap.get(k);
if (session.isOpen()) {
sendMessage(session, message, k);
}
}));
//for (String userId : sessionMap.keySet()) {
// Session session = sessionMap.get(userId);
// if (session.isOpen()) {
// sendMessage(session, message, userId);
// }
//}
}
/**
* 连接建立成功调用的方法
* <p>
* javax.websocket.Session
*/
@OnOpen
public void onOpen(@PathParam(value = "userId") String userId, Session session) throws IOException {
List<String> list = session.getRequestParameterMap().get("token");
String token = null;
if (list != null && list.size() > 0) {
token = list.get(0);
}
if (TokenController.tokenMap.get(userId) != null && TokenController.tokenMap.get(userId).equals(token)) {
sessionMap.put(userId, session);
int cnt = OnlineCount.incrementAndGet(); // 在线数加1
log.info("[" + userId + "]连接加入,当前连接数为:{}", cnt);
} else {
log.info("[" + userId + "]认证失败");
session.close();
}
}
/**
* 收到客户端消息后调用的方法
*
* @param message 客户端发送过来的消息
*/
@OnMessage
public void onMessage(String message, @PathParam(value = "userId") String userId, Session session) throws IOException {
log.info("[" + userId + "]来自客户端的消息:{}", message);
//sendMessage(session, "Echo消息内容:"+message);
//使用一个或多个浏览器打开测试页面即可
broadCastInfo(message); //群发消息
}
/**
* 连接关闭调用的方法
*/
@OnClose
public void onClose(@PathParam(value = "userId") String userId, Session session) {
sessionMap.remove(userId);
int cnt = OnlineCount.decrementAndGet();
if (cnt < 0) {
OnlineCount.set(0);
}
log.info("[" + userId + "]连接关闭,当前连接数为:{}", cnt);
}
/**
* 出现错误
*/
@OnError
public void onError(@PathParam(value = "userId") String userId, Session session, Throwable error) {
log.error("[" + userId + "]发生错误:{},Session ID: {}", error.getMessage(), session.getId());
}
}
| [
"hanqf2008@163.com"
] | hanqf2008@163.com |
db52778108df8ab5781d32e1300025a6c22a8cb4 | 4d066bf93529cb1cd5fb03f33f28c1d52b1f7d8e | /src/main/java/me/silloy/spring/start/extension/dependency/springintegration/package-info.java | 9d708d917f9b8e47e4ddb38d20d72380013b4a28 | [] | no_license | silloy/start.silloy.me | 2bcf3737ee901c773571847e5c3ae8f86e60de78 | 10e798817f3843f9db25f2505eb303d0376bc212 | refs/heads/master | 2022-11-06T04:18:40.418660 | 2020-06-28T07:39:14 | 2020-06-28T07:39:14 | 275,532,278 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 778 | java | /*
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Extensions for generation of projects that depend on Spring Integration.
*/
package me.silloy.spring.start.extension.dependency.springintegration;
| [
"sshzh90@gmail.com"
] | sshzh90@gmail.com |
340fe93a260133c5182bea662a20a7ce1e705f96 | a8861467a0bc9658c721a185404077792d41182b | /phone/app/src/main/java/com/yanxiu/gphone/student/bcresource/response/ResetTopicPaperHistoryResponse.java | 6cf98f05f8d244c6aaaf6ffbf97c7944c1d90ec4 | [] | no_license | Dwti/yxyl_new | 47123040f020ab9ada1d82edbbb53f65c59f1a9b | 5cc7554b8bff9fbb27fcc571f5b2ba41b1f7836d | refs/heads/master | 2021-09-14T19:33:12.740451 | 2018-02-09T07:06:02 | 2018-02-09T07:06:02 | 133,895,940 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 235 | java | package com.yanxiu.gphone.student.bcresource.response;
import com.yanxiu.gphone.student.base.EXueELianBaseResponse;
/**
* Created by sp on 17-10-26.
*/
public class ResetTopicPaperHistoryResponse extends EXueELianBaseResponse {
}
| [
"sunpeng@yanxiu.com"
] | sunpeng@yanxiu.com |
ebfbe6abd88583b7660469e84ce563380491f8be | 2e03da8505fba2f5fba0aa96096240cfe1584490 | /crunchyroll/crunchyroll2-0-3/com/tremorvideo/sdk/android/richmedia/s.java | 7b2d9283ba03d8211047a11f94894c625a72bd0f | [] | no_license | JairoBm13/crunchywomod | c00f8535a76ee7a5e0554d766ddc08b608e57f9b | 90ad43cdf12e41fc6ff2323ec5d6d94cc45a1c52 | refs/heads/master | 2021-01-20T14:48:30.312526 | 2017-05-08T21:37:16 | 2017-05-08T21:37:16 | 90,674,385 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,446 | java | //
// Decompiled by Procyon v0.5.30
//
package com.tremorvideo.sdk.android.richmedia;
public class s extends ab
{
public s(final o o) {
super(o);
}
private String a(final long n, final long n2, final int n3) {
final float n4 = n / 1000.0f;
if (n4 < 0.1) {
return "0";
}
return Integer.toString((int)Math.ceil(n4) + n3);
}
@Override
protected String a(final p p3, final ab.a a, final long n) {
if (this.p != null) {
return this.p;
}
final com.tremorvideo.sdk.android.richmedia.a g = this.g.g();
final a a2 = (a)a;
final String a3 = g.a(a2.e);
final String a4 = g.a(a2.a);
final String s = "##";
final b b = com.tremorvideo.sdk.android.richmedia.s.b.values()[a2.b];
final m.a b2 = p3.b();
String s2;
if (b == com.tremorvideo.sdk.android.richmedia.s.b.d) {
s2 = this.a(n, this.g.c(), a2.c);
}
else if (b == com.tremorvideo.sdk.android.richmedia.s.b.c) {
s2 = this.a(this.g.c() - n, this.g.c(), a2.c);
}
else if (b == com.tremorvideo.sdk.android.richmedia.s.b.a) {
s2 = s;
if (b2 != null) {
final int b3 = b2.b();
final int a5 = b2.a();
if (b3 != -1 && a5 != -1) {
s2 = this.a(b3 - a5, b3, a2.c);
}
else {
s2 = this.a(0L, 0L, a2.c);
}
}
}
else {
s2 = s;
if (b == com.tremorvideo.sdk.android.richmedia.s.b.b) {
s2 = s;
if (b2 != null) {
final int b4 = b2.b();
final int a6 = b2.a();
if (b4 != -1 && a6 != -1) {
s2 = this.a(a6, b4, a2.c);
}
else {
s2 = this.a(0L, 0L, a2.c);
}
}
}
}
return a3 + s2 + a4;
}
@Override
public void a(final p p2, final long n) {
super.a(p2, n);
}
@Override
protected ab.a c() {
return new a();
}
private class a extends ab.a
{
public int a;
public int b;
public int c;
@Override
public void a(final e e) {
((ab.a)this).b(e);
try {
this.e = e.b();
this.a = e.b();
this.b = e.b();
this.c = e.a();
this.f = e.b();
this.g = e.b();
this.h = e.d();
this.i = e.b();
this.j = e.d();
this.k = e.b();
this.l = e.d();
this.m = e.b();
this.n = e.d();
this.o = e.b();
this.p = e.d();
this.q = e.b();
this.r = e.d();
this.s = e.b();
this.t = e.d();
this.u = e.b();
this.v = e.d();
this.w = e.b();
this.x = e.d();
this.y = e.b();
this.z = e.f();
}
catch (Exception ex) {}
}
}
public enum b
{
a,
b,
c,
d;
}
}
| [
"j.bautista.m13@outlook.com"
] | j.bautista.m13@outlook.com |
90bcc34a5e618bf0697f564d2f66dd088f3d6525 | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XWIKI-14462-15-5-FEMO-WeightedSum:TestLen:CallDiversity/org/xwiki/platform/wiki/creationjob/internal/WikiCreationJob_ESTest.java | 3a6f898a227ae7c1563363d1fd5d69945f16f304 | [] | no_license | STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application | cf118b23ecb87a8bf59643e42f7556b521d1f754 | 3bb39683f9c343b8ec94890a00b8f260d158dfe3 | refs/heads/master | 2022-07-29T14:44:00.774547 | 2020-08-10T15:14:49 | 2020-08-10T15:14:49 | 285,804,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 581 | java | /*
* This file was automatically generated by EvoSuite
* Sun Apr 05 05:46:04 UTC 2020
*/
package org.xwiki.platform.wiki.creationjob.internal;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class WikiCreationJob_ESTest extends WikiCreationJob_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
c168f0f8fa25b331a68c7b150be15332a1099ff2 | a4a053c66a4df5bf34a586333e6d8669f3e5ee32 | /OpERP/src/main/java/devopsdistilled/operp/client/items/ManufacturerPane.java | 16579675b0033a56c03d06f25a4e7cb4794bf841 | [
"MIT"
] | permissive | TheKojuEffect/OpERP | da9f69eb9995832491ec58dc1b16c92382ebdad3 | 5a6762a3f2401a305901d56d00ce04406a905025 | refs/heads/master | 2021-01-16T19:09:45.202242 | 2013-09-01T14:15:33 | 2013-09-01T14:15:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 979 | java | package devopsdistilled.operp.client.items;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import net.miginfocom.swing.MigLayout;
public class ManufacturerPane {
private final JPanel pane;
private final JTextField textField;
public ManufacturerPane() {
pane = new JPanel();
pane.setLayout(new MigLayout("", "[][grow]", "[][][grow]"));
JLabel lblName = new JLabel("Name");
pane.add(lblName, "cell 0 0,alignx trailing");
textField = new JTextField();
pane.add(textField, "cell 1 0,growx");
textField.setColumns(10);
JButton btnNewButton = new JButton("Cancel");
btnNewButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
}
});
pane.add(btnNewButton, "flowx,cell 1 1");
JButton btnSave = new JButton("Save");
pane.add(btnSave, "cell 1 1");
}
}
| [
"kplx2.0@gmail.com"
] | kplx2.0@gmail.com |
ca15942bb5bc946fb125267b22aa97d5843b6bbc | 40d844c1c780cf3618979626282cf59be833907f | /src/testcases/CWE197_Numeric_Truncation_Error/s01/CWE197_Numeric_Truncation_Error__int_Environment_to_byte_74a.java | 49b8c8684edd61613683b09f65c2d1788dddf631 | [] | no_license | rubengomez97/juliet | f9566de7be198921113658f904b521b6bca4d262 | 13debb7a1cc801977b9371b8cc1a313cd1de3a0e | refs/heads/master | 2023-06-02T00:37:24.532638 | 2021-06-23T17:22:22 | 2021-06-23T17:22:22 | 379,676,259 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,007 | java | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE197_Numeric_Truncation_Error__int_Environment_to_byte_74a.java
Label Definition File: CWE197_Numeric_Truncation_Error__int.label.xml
Template File: sources-sink-74a.tmpl.java
*/
/*
* @description
* CWE: 197 Numeric Truncation Error
* BadSource: Environment Read data from an environment variable
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: to_byte
* BadSink : Convert data to a byte
* Flow Variant: 74 Data flow: data passed in a HashMap from one method to another in different source files in the same package
*
* */
package testcases.CWE197_Numeric_Truncation_Error.s01;
import testcasesupport.*;
import java.util.HashMap;
import java.util.logging.Level;
public class CWE197_Numeric_Truncation_Error__int_Environment_to_byte_74a extends AbstractTestCase
{
public void bad() throws Throwable
{
int data;
data = Integer.MIN_VALUE; /* Initialize data */
/* get environment variable ADD */
/* POTENTIAL FLAW: Read data from an environment variable */
{
String stringNumber = System.getenv("ADD");
if (stringNumber != null) // avoid NPD incidental warnings
{
try
{
data = Integer.parseInt(stringNumber.trim());
}
catch(NumberFormatException exceptNumberFormat)
{
IO.logger.log(Level.WARNING, "Number format exception parsing data from string", exceptNumberFormat);
}
}
}
HashMap<Integer,Integer> dataHashMap = new HashMap<Integer,Integer>();
dataHashMap.put(0, data);
dataHashMap.put(1, data);
dataHashMap.put(2, data);
(new CWE197_Numeric_Truncation_Error__int_Environment_to_byte_74b()).badSink(dataHashMap );
}
public void good() throws Throwable
{
goodG2B();
}
/* goodG2B() - use goodsource and badsink */
private void goodG2B() throws Throwable
{
int data;
/* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */
data = 2;
HashMap<Integer,Integer> dataHashMap = new HashMap<Integer,Integer>();
dataHashMap.put(0, data);
dataHashMap.put(1, data);
dataHashMap.put(2, data);
(new CWE197_Numeric_Truncation_Error__int_Environment_to_byte_74b()).goodG2BSink(dataHashMap );
}
/* Below is the main(). It is only used when building this testcase on
* its own for testing or for building a binary to use in testing binary
* analysis tools. It is not used when compiling all the testcases as one
* application, which is how source code analysis tools are tested.
*/
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
| [
"you@example.com"
] | you@example.com |
95af05b3320921707845fe628c517d2ff77e098f | 1bdd58fd87e940c5d34238202ba5c015272c6d63 | /annotations/src/com/tj/producer/annotations/entity/IgnoreRead.java | 55b630fcb2a360b3a435f50f5691a561bf5d9923 | [] | no_license | tbiegner99/ODataFramework | ba74bcca53f8d4574e68d91402f25c3ea1491226 | 3109614009c9940a61b37241ecdb2a81c9859e03 | refs/heads/master | 2021-01-23T22:38:40.911230 | 2016-03-06T04:30:49 | 2016-03-06T04:30:49 | 32,660,393 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 426 | java | package com.tj.producer.annotations.entity;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/***
* Skips the property for read and list operations.
* Marks the field as write only.
* @author tbiegner
*
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.FIELD })
public @interface IgnoreRead {
}
| [
"tbiegner99@gmail.com"
] | tbiegner99@gmail.com |
63673be14838e948aa10ae859d0c079c6c53bf36 | 3e0d77eedc400f6925ee8c75bf32f30486f70b50 | /CoreJava/src/com/techchefs/javaapps/assignment/assessment/moduleone/TestCandidateFilter.java | 403550433fd272d466c12562dee130d96e564ac9 | [] | no_license | sanghante/ELF-06June19-TechChefs-SantoshG | 1c1349a1e4dcea33923dda73cdc7e7dbc54f48e6 | a13c01aa22e057dad1e39546a50af1be6ab78786 | refs/heads/master | 2023-01-10T05:58:52.183306 | 2019-08-14T13:26:12 | 2019-08-14T13:26:12 | 192,526,998 | 0 | 0 | null | 2023-01-04T07:13:13 | 2019-06-18T11:30:13 | Rich Text Format | UTF-8 | Java | false | false | 898 | java | package com.techchefs.javaapps.assignment.assessment.moduleone;
import java.util.ArrayList;
import lombok.extern.java.Log;
@Log
public class TestCandidateFilter {
public static void main(String[] args) {
Candidate c1 = new Candidate("Tina", Gender.FEMALE, 23.9);
Candidate c2 = new Candidate("Meena", Gender.FEMALE, 73.4);
Candidate c3 = new Candidate("Gina", Gender.FEMALE, 83.1);
Candidate c4 = new Candidate("Rama", Gender.MALE, 43.2);
Candidate c5 = new Candidate("Gottilla", Gender.OTHER, 83.8);
ArrayList<Candidate> list = new ArrayList<>();
list.add(c1);
list.add(c2);
list.add(c3);
list.add(c4);
list.add(c5);
long res = list.stream()
.filter( c -> c.getGender().equals(Gender.FEMALE))
.filter(d -> d.getPercentage() >=35.0).count();
log.info("Number of passed female candidates is :"+res);
}
}
enum Gender {
MALE, FEMALE, OTHER;
} | [
"santhosh.ghante@yahoo.com"
] | santhosh.ghante@yahoo.com |
057f1bfe2863a9b3dd27a5cc85163b55ab09dbda | 66ca9c217c1fa0e41e8be0c9b8d9c81cc832fa6d | /src/main/java/org/workerunity/socialauction/web/rest/errors/ErrorConstants.java | e6364202b93f1a94a3377fc865376f7329be3b29 | [] | no_license | jewettdiane/social-auction | dd3773d3e4d1654a9e5eb3cab9d0875061ad917c | f56880b9c5dd01f6141b9cd9a46efd0c82c1b8e9 | refs/heads/master | 2021-07-02T15:37:11.124481 | 2018-10-25T20:06:46 | 2018-10-25T20:06:46 | 154,730,762 | 0 | 1 | null | 2020-09-18T08:55:57 | 2018-10-25T20:06:37 | Java | UTF-8 | Java | false | false | 1,230 | java | package org.workerunity.socialauction.web.rest.errors;
import java.net.URI;
public final class ErrorConstants {
public static final String ERR_CONCURRENCY_FAILURE = "error.concurrencyFailure";
public static final String ERR_VALIDATION = "error.validation";
public static final String PROBLEM_BASE_URL = "https://www.jhipster.tech/problem";
public static final URI DEFAULT_TYPE = URI.create(PROBLEM_BASE_URL + "/problem-with-message");
public static final URI CONSTRAINT_VIOLATION_TYPE = URI.create(PROBLEM_BASE_URL + "/constraint-violation");
public static final URI PARAMETERIZED_TYPE = URI.create(PROBLEM_BASE_URL + "/parameterized");
public static final URI ENTITY_NOT_FOUND_TYPE = URI.create(PROBLEM_BASE_URL + "/entity-not-found");
public static final URI INVALID_PASSWORD_TYPE = URI.create(PROBLEM_BASE_URL + "/invalid-password");
public static final URI EMAIL_ALREADY_USED_TYPE = URI.create(PROBLEM_BASE_URL + "/email-already-used");
public static final URI LOGIN_ALREADY_USED_TYPE = URI.create(PROBLEM_BASE_URL + "/login-already-used");
public static final URI EMAIL_NOT_FOUND_TYPE = URI.create(PROBLEM_BASE_URL + "/email-not-found");
private ErrorConstants() {
}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
57902491c3938ef7d96082c36042c49e3747adda | c774d25f74d7128b247ae2c1569fd5046c41bce8 | /org.tolven.assembler.configwrapper/serverconfig/source/org/tolven/config/model/credential/bean/CertificateKeyStoreDetail.java | cb007452bc715143f06c252d01f390ea6a939c28 | [] | no_license | dubrsl/tolven | f42744237333447a5dd8348ae991bb5ffcb5a2d3 | 0e292799b42ae7364050749705eff79952c1b5d3 | refs/heads/master | 2021-01-01T18:38:36.978913 | 2011-11-11T14:40:13 | 2011-11-11T14:40:13 | 40,418,393 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,085 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2011.07.22 at 03:20:48 PM PDT
//
package org.tolven.config.model.credential.bean;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for CertificateKeyStoreDetail complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="CertificateKeyStoreDetail">
* <complexContent>
* <extension base="{urn:tolven-org:credentials:1.0}Credential">
* <attribute name="format" use="required">
* <simpleType>
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="jks"/>
* <enumeration value="pkcs12"/>
* </restriction>
* </simpleType>
* </attribute>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CertificateKeyStoreDetail")
public class CertificateKeyStoreDetail
extends Credential
{
@XmlAttribute(required = true)
protected String format;
/**
* Gets the value of the format property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getFormat() {
return format;
}
/**
* Sets the value of the format property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setFormat(String value) {
this.format = value;
}
}
| [
"chrislomonico@21cf0891-b729-4dbf-aa24-92c9934df42b"
] | chrislomonico@21cf0891-b729-4dbf-aa24-92c9934df42b |
ccfdd12a722d728d86a856d5e66cf114cacad9cd | ca6ed1b41ccc5d8ac491aaa077c9974f443d8c94 | /mall-order/src/main/java/com/yp/mall/order/service/impl/PaymentInfoServiceImpl.java | a79379e28ab25595b5318d0d796af4ab5b1a83fd | [] | no_license | yanping1/guli-mall | 2b7996f6f5477c315ac7ad8ef8076913d3081fe9 | 60a0a6d9283f29bb1c0295639497ef76a9ed8f46 | refs/heads/master | 2023-07-01T12:56:57.413042 | 2021-08-06T09:26:23 | 2021-08-06T09:26:23 | 388,312,493 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 978 | java | package com.yp.mall.order.service.impl;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yp.common.utils.PageUtils;
import com.yp.common.utils.Query;
import com.yp.mall.order.dao.PaymentInfoDao;
import com.yp.mall.order.entity.PaymentInfoEntity;
import com.yp.mall.order.service.PaymentInfoService;
@Service("paymentInfoService")
public class PaymentInfoServiceImpl extends ServiceImpl<PaymentInfoDao, PaymentInfoEntity> implements PaymentInfoService {
@Override
public PageUtils queryPage(Map<String, Object> params) {
IPage<PaymentInfoEntity> page = this.page(
new Query<PaymentInfoEntity>().getPage(params),
new QueryWrapper<PaymentInfoEntity>()
);
return new PageUtils(page);
}
} | [
"1822117257@qq.com"
] | 1822117257@qq.com |
bb507ba4a8ed30ab5a8df39ef703e3a546a50b22 | d4b17a1dde0309ea8a1b2f6d6ae640e44a811052 | /lang_interface/java/com/intel/daal/algorithms/multinomial_naive_bayes/training/TrainingDistributedStep1Local.java | ddc8e7f980dec078801ea84a716ed98af250d4ff | [
"Apache-2.0",
"Intel"
] | permissive | h2oai/daal | c50f2b14dc4a9ffc0b7f7bcb40b599cadac6d333 | d49815df3040f3872a1fdb9dc99ee86148e4494e | refs/heads/daal_2018_beta_update1 | 2023-05-25T17:48:44.312245 | 2017-09-29T13:30:10 | 2017-09-29T13:30:10 | 96,125,165 | 2 | 3 | null | 2017-09-29T13:30:11 | 2017-07-03T15:26:26 | C++ | UTF-8 | Java | false | false | 7,108 | java | /* file: TrainingDistributedStep1Local.java */
/*******************************************************************************
* Copyright 2014-2017 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*******************************************************************************/
/**
* @defgroup multinomial_naive_bayes_training_distributed Distributed
* @ingroup multinomial_naive_bayes_training
* @{
*/
package com.intel.daal.algorithms.multinomial_naive_bayes.training;
import com.intel.daal.algorithms.ComputeMode;
import com.intel.daal.algorithms.Precision;
import com.intel.daal.algorithms.classifier.training.TrainingInput;
import com.intel.daal.algorithms.multinomial_naive_bayes.Parameter;
import com.intel.daal.services.DaalContext;
/**
* <a name="DAAL-CLASS-ALGORITHMS__MULTINOMIAL_NAIVE_BAYES__TRAINING__TRAININGDISTRIBUTEDSTEP1LOCAL"></a>
* @brief Algorithm class for training naive Bayes model on the first step in the distributed processing mode
* <!-- \n<a href="DAAL-REF-MULTINOMNAIVEBAYES-ALGORITHM">Multinomial naive Bayes algorithm description and usage models</a> -->
*
* @par References
* - com.intel.daal.algorithms.classifier.training.InputId class
* - com.intel.daal.algorithms.classifier.training.TrainingResultId class
* - com.intel.daal.algorithms.classifier.training.TrainingInput class
*/
public class TrainingDistributedStep1Local extends com.intel.daal.algorithms.classifier.training.TrainingOnline {
public Parameter parameter; /*!< Parameters of the algorithm */
public TrainingMethod method; /*!< %Training method for the algorithm */
/** @private */
static {
System.loadLibrary("JavaAPI");
}
/**
* Constructs multinomial naive Bayes training algorithm by copying input objects and parameters
* of another multinomial naive Bayes training algorithm
* @param context Context to manage the multinomial naive Bayes training
* @param other An algorithm to be used as the source to initialize the input objects
* and parameters of the algorithm
*/
public TrainingDistributedStep1Local(DaalContext context, TrainingDistributedStep1Local other) {
super(context);
this.method = other.method;
prec = other.prec;
this.cObject = cClone(other.cObject, prec.getValue(), method.getValue());
input = new TrainingInput(getContext(), cObject, ComputeMode.online);
parameter = new Parameter(getContext(), cInitParameter(this.cObject, prec.getValue(), method.getValue()));
}
/**
* Constructs multinomial naive Bayes training algorithm
* @param context Context to manage the multinomial naive Bayes training
* @param cls Data type to use in intermediate computations of the multinomial naive Bayes training on the first step in the distributed
* processing mode,
* Double.class or Float.class
* @param method Multinomial naive Bayes training method, @ref TrainingMethod
* @param nClasses Number of classes
*/
public TrainingDistributedStep1Local(DaalContext context, Class<? extends Number> cls, TrainingMethod method,
long nClasses) {
super(context);
this.method = method;
if (cls != Double.class && cls != Float.class) {
throw new IllegalArgumentException("type unsupported");
}
if (this.method != TrainingMethod.defaultDense &&
this.method != TrainingMethod.fastCSR) {
throw new IllegalArgumentException("method unsupported");
}
if (cls == Double.class) {
prec = Precision.doublePrecision;
} else {
prec = Precision.singlePrecision;
}
this.cObject = cInit(prec.getValue(), method.getValue(), nClasses);
input = new TrainingInput(getContext(), cObject, ComputeMode.online);
parameter = new Parameter(getContext(), cInitParameter(this.cObject, prec.getValue(), method.getValue()));
}
/**
* Computes naive Bayes training results on the first step in the distributed processing mode
* \return Naive Bayes training results on the first step in the distributed processing mode
*/
@Override
public TrainingPartialResult compute() {
super.compute();
return new TrainingPartialResult(getContext(), cGetPartialResult(cObject, prec.getValue(), method.getValue()));
}
/**
* Computes naive Bayes training results on the first step in the distributed processing mode
* \return Naive Bayes training results on the first step in the distributed processing mode
*/
@Override
public TrainingResult finalizeCompute() {
super.finalizeCompute();
return new TrainingResult(getContext(), cGetResult(cObject, prec.getValue(), method.getValue()));
}
/**
* Registers user-allocated memory to store naive Bayes training results
* @param result Structure to store naive Bayes training results
*/
public void setResult(TrainingResult result) {
cSetResult(cObject, prec.getValue(), method.getValue(), result.getCObject());
}
/**
* Registers user-allocated memory to store naive Bayes training partial results
* @param result Structure to store naive Bayes training partial results
*/
public void setPartialResult(TrainingPartialResult result) {
cSetPartialResult(cObject, prec.getValue(), method.getValue(), result.getCObject());
}
/**
* Returns the newly allocated multinomial naive Bayes training algorithm
* with a copy of input objects and parameters of this multinomial naive Bayes training algorithm
* @param context Context to manage the multinomial naive Bayes training
*
* @return The newly allocated algorithm
*/
@Override
public TrainingDistributedStep1Local clone(DaalContext context) {
return new TrainingDistributedStep1Local(context, this);
}
private native long cInit(int prec, int method, long nClasses);
private native long cInitParameter(long algAddr, int prec, int method);
private native long cGetResult(long algAddr, int prec, int method);
private native void cSetResult(long algAddr, int prec, int method, long cObject);
private native long cGetPartialResult(long algAddr, int prec, int method);
private native void cSetPartialResult(long algAddr, int prec, int method, long cObject);
private native long cClone(long algAddr, int prec, int method);
}
/** @} */
| [
"vasily.rubtsov@intel.com"
] | vasily.rubtsov@intel.com |
384e4f1f1192a6133cf0da455c756a5b8ba4b057 | efb28b31f370389c8848784d00c6d01a0cdb2e6e | /app/src/main/java/com/hongbaogou/request/PersonalDataSMSSaveRequests.java | 9c2cf321129ad3b9ba3e8b000ed0d8ce1f61985d | [] | no_license | rel4/1004 | 3b2001b2735835b2dea201265c1db2c215b99c9b | 0287e16b9c6e8749bc82fd12a6e6f9775a3fdeb6 | refs/heads/master | 2021-01-19T20:11:57.717749 | 2017-05-10T04:20:21 | 2017-05-10T04:20:21 | 88,494,392 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,235 | java | package com.hongbaogou.request;
import android.util.Log;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
import com.android.volley.RequestQueue;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.StringRequest;
import com.hongbaogou.bean.BaseObjectBean;
import com.hongbaogou.bean.PersonDataBean;
import com.hongbaogou.listener.OnPersonalDataSMSSaveListener;
import com.hongbaogou.utils.RequestManager;
/**
* Created by Administrator on 2015/12/1.
*/
public class PersonalDataSMSSaveRequests extends BaseRequest{
private RequestQueue mQueue;
private String urlRequest = "member/do_save_mobile?";
public void personalDatasmsSaveRequests(String uid,String old_mobile,String mobile,String code,String bind_type, final OnPersonalDataSMSSaveListener onPersonalDataSMSSaveListener){
mQueue = RequestManager.getRequestQueue();
String url = urlBase+urlRequest+getParams()+"&uid="+uid+"&old_mobile="+old_mobile+"&mobile="+mobile+"&code="+code+"&bind_type="+bind_type;
System.out.println("------保存手机号url------"+url);
StringRequest stringRequest = new StringRequest(url,
new Response.Listener<String>() {
public void onResponse(String response) {
String substring = response.substring(response.indexOf("{"), response.lastIndexOf("}") + 1);
Log.d("substring",substring );
System.out.println("------保存手机号response------" + response);
BaseObjectBean baseObjectBean = JSON.parseObject(substring, new TypeReference<BaseObjectBean<PersonDataBean>>() {
});
onPersonalDataSMSSaveListener.OnPersonalDataSMSSaveListenerSuccess(baseObjectBean);
}
}, new Response.ErrorListener() {
public void onErrorResponse(VolleyError error) {
Log.e("TAGS", error.getMessage(), error);
onPersonalDataSMSSaveListener.OnPersonalDataSMSSaveListeneroFailed(error);
}
});
RequestManager.addRequest(stringRequest,mQueue);
}
}
| [
"7444670@qq.com"
] | 7444670@qq.com |
ae4c3be37064c37663d767237a8391289ccfd816 | 028cbe18b4e5c347f664c592cbc7f56729b74060 | /external/modules/log4j/1.2.14/v1_2_14_maven/tests/src/java/org/apache/log4j/helpers/OptionConverterTestCase.java | ff829236c3ac8fe77b6193de10f46c7908f47dad | [
"Apache-2.0"
] | permissive | dmatej/Glassfish-SVN-Patched | 8d355ff753b23a9a1bd9d7475fa4b2cfd3b40f9e | 269e29ba90db6d9c38271f7acd2affcacf2416f1 | refs/heads/master | 2021-05-28T12:55:06.267463 | 2014-11-11T04:21:44 | 2014-11-11T04:21:44 | 23,610,469 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,419 | java | /*
* Copyright 1999-2005 The Apache Software Foundation.
*
* 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.
*/
// Log4j uses the JUnit framework for internal unit testing. JUnit
// is available from "http://www.junit.org".
package org.apache.log4j.helpers;
import org.apache.log4j.helpers.OptionConverter;
import org.apache.log4j.Level;
import org.apache.log4j.xml.XLevel;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import junit.framework.Test;
import java.util.Properties;
/**
Test variable substitution code.
@author Ceki Gülcü
@since 1.0
*/
public class OptionConverterTestCase extends TestCase {
Properties props;
public OptionConverterTestCase(String name) {
super(name);
}
public
void setUp() {
props = new Properties();
props.put("TOTO", "wonderful");
props.put("key1", "value1");
props.put("key2", "value2");
System.setProperties(props);
}
public
void tearDown() {
props = null;
}
public
void varSubstTest1() {
String r;
r = OptionConverter.substVars("hello world.", null);
assertEquals("hello world.", r);
r = OptionConverter.substVars("hello ${TOTO} world.", null);
assertEquals("hello wonderful world.", r);
}
public
void varSubstTest2() {
String r;
r = OptionConverter.substVars("Test2 ${key1} mid ${key2} end.", null);
assertEquals("Test2 value1 mid value2 end.", r);
}
public
void varSubstTest3() {
String r;
r = OptionConverter.substVars(
"Test3 ${unset} mid ${key1} end.", null);
assertEquals("Test3 mid value1 end.", r);
}
public
void varSubstTest4() {
String res;
String val = "Test4 ${incomplete ";
try {
res = OptionConverter.substVars(val, null);
}
catch(IllegalArgumentException e) {
String errorMsg = e.getMessage();
//System.out.println('['+errorMsg+']');
assertEquals('"'+val
+ "\" has no closing brace. Opening brace at position 6.",
errorMsg);
}
}
public
void varSubstTest5() {
Properties props = new Properties();
props.put("p1", "x1");
props.put("p2", "${p1}");
String res = OptionConverter.substVars("${p2}", props);
System.out.println("Result is ["+res+"].");
assertEquals(res, "x1");
}
public
void toLevelTest1() {
String val = "INFO";
Level p = OptionConverter.toLevel(val, null);
assertEquals(p, Level.INFO);
}
public
void toLevelTest2() {
String val = "INFO#org.apache.log4j.xml.XLevel";
Level p = OptionConverter.toLevel(val, null);
assertEquals(p, Level.INFO);
}
public
void toLevelTest3() {
String val = "TRACE#org.apache.log4j.xml.XLevel";
Level p = OptionConverter.toLevel(val, null);
assertEquals(p, XLevel.TRACE);
}
public
void toLevelTest4() {
String val = "TR#org.apache.log4j.xml.XLevel";
Level p = OptionConverter.toLevel(val, null);
assertEquals(p, null);
}
public
void toLevelTest5() {
String val = "INFO#org.apache.log4j.xml.TOTO";
Level p = OptionConverter.toLevel(val, null);
assertEquals(p, null);
}
public
static
Test suite() {
TestSuite suite = new TestSuite();
suite.addTest(new OptionConverterTestCase("varSubstTest5"));
suite.addTest(new OptionConverterTestCase("varSubstTest1"));
suite.addTest(new OptionConverterTestCase("varSubstTest2"));
suite.addTest(new OptionConverterTestCase("varSubstTest3"));
suite.addTest(new OptionConverterTestCase("varSubstTest4"));
suite.addTest(new OptionConverterTestCase("toLevelTest1"));
suite.addTest(new OptionConverterTestCase("toLevelTest2"));
suite.addTest(new OptionConverterTestCase("toLevelTest3"));
suite.addTest(new OptionConverterTestCase("toLevelTest4"));
suite.addTest(new OptionConverterTestCase("toLevelTest5"));
return suite;
}
}
| [
"janey@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5"
] | janey@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5 |
eac64fe0110a75f49bddb6a098493408ab4be13f | b00c54389a95d81a22e361fa9f8bdf5a2edc93e3 | /frameworks/opt/bluetooth/src/android/bluetooth/client/pbap/BluetoothPbapRequestPullVcardListing.java | 5f042baea8576537b2e5a01ca6d16c007d6a5efc | [] | no_license | mirek190/x86-android-5.0 | 9d1756fa7ff2f423887aa22694bd737eb634ef23 | eb1029956682072bb7404192a80214189f0dc73b | refs/heads/master | 2020-05-27T01:09:51.830208 | 2015-10-07T22:47:36 | 2015-10-07T22:47:36 | 41,942,802 | 15 | 20 | null | 2020-03-09T00:21:03 | 2015-09-05T00:11:19 | null | UTF-8 | Java | false | false | 3,317 | java | /*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.bluetooth.client.pbap;
import android.util.Log;
import android.bluetooth.client.pbap.utils.ObexAppParameters;
import android.bluetooth.client.pbap.BluetoothPbapVcardListing;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import javax.obex.HeaderSet;
final class BluetoothPbapRequestPullVcardListing extends BluetoothPbapRequest {
private static final String TAG = "BluetoothPbapRequestPullVcardListing";
private static final String TYPE = "x-bt/vcard-listing";
private BluetoothPbapVcardListing mResponse = null;
private int mNewMissedCalls = -1;
public BluetoothPbapRequestPullVcardListing(String folder, byte order, byte searchAttr,
String searchVal, int maxListCount, int listStartOffset) {
if (maxListCount < 0 || maxListCount > 65535) {
throw new IllegalArgumentException("maxListCount should be [0..65535]");
}
if (listStartOffset < 0 || listStartOffset > 65535) {
throw new IllegalArgumentException("listStartOffset should be [0..65535]");
}
if (folder == null) {
folder = "";
}
mHeaderSet.setHeader(HeaderSet.NAME, folder);
mHeaderSet.setHeader(HeaderSet.TYPE, TYPE);
ObexAppParameters oap = new ObexAppParameters();
if (order >= 0) {
oap.add(OAP_TAGID_ORDER, order);
}
if (searchVal != null) {
oap.add(OAP_TAGID_SEARCH_ATTRIBUTE, searchAttr);
oap.add(OAP_TAGID_SEARCH_VALUE, searchVal);
}
/*
* maxListCount is a special case which is handled in
* BluetoothPbapRequestPullVcardListingSize
*/
if (maxListCount > 0) {
oap.add(OAP_TAGID_MAX_LIST_COUNT, (short) maxListCount);
}
if (listStartOffset > 0) {
oap.add(OAP_TAGID_LIST_START_OFFSET, (short) listStartOffset);
}
oap.addToHeaderSet(mHeaderSet);
}
@Override
protected void readResponse(InputStream stream) throws IOException {
Log.v(TAG, "readResponse");
mResponse = new BluetoothPbapVcardListing(stream);
}
@Override
protected void readResponseHeaders(HeaderSet headerset) {
Log.v(TAG, "readResponseHeaders");
ObexAppParameters oap = ObexAppParameters.fromHeaderSet(headerset);
if (oap.exists(OAP_TAGID_NEW_MISSED_CALLS)) {
mNewMissedCalls = oap.getByte(OAP_TAGID_NEW_MISSED_CALLS);
}
}
public ArrayList<BluetoothPbapCard> getList() {
return mResponse.getList();
}
public int getNewMissedCalls() {
return mNewMissedCalls;
}
}
| [
"mirek190@gmail.com"
] | mirek190@gmail.com |
94efb33ab46ff0778fe9f19b237101378e5cc762 | 180e78725121de49801e34de358c32cf7148b0a2 | /dataset/protocol1/jdbi/testing/832/JdbiException.java | 851a7a05efa5a611b88cfc004f30efe9b0588a91 | [] | no_license | ASSERT-KTH/synthetic-checkstyle-error-dataset | 40e8d1e0a7ebe7f7711def96a390891a6922f7bd | 40c057e1669584bfc6fecf789b5b2854660222f3 | refs/heads/master | 2023-03-18T12:50:55.410343 | 2019-01-25T09:54:39 | 2019-01-25T09:54:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,543 | java | /*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jdbi.v3.core;
/**
* Base unchecked exception for exceptions thrown from jdbi.
*/
public abstract class JdbiException extends RuntimeException {
private static final long serialVersionUID = 1L;
/**
* @param message the exception message
* @param cause the optional cause
*/
public JdbiException(String message, Throwable cause) {
super(message, cause);
}
/**
* @param cause the cause of this exception
*/
public JdbiException(Throwable cause) {
super(cause);
}
/**
* Constructs a new runtime exception with the specified detail message.
* The cause is not initialized, and may subsequently be initialized by a
* call to {@link #initCause}.
*
* @param message the detail message. The detail message is saved for
* later retrieval by the {@link #getMessage()} method.
*/
public JdbiException(String message) {
super(message);
}
}
| [
"bloriot97@gmail.com"
] | bloriot97@gmail.com |
1f06b7b76d9ec971af70e588f19b2cabd42be8c3 | f5b90d10db8841381dc23ab65502dca43135295e | /One/day20/src/com/socket/transfile/ImageTcpClient.java | 3b99e74146096a9ef63089db175b31504b6333b2 | [
"LicenseRef-scancode-mulanpsl-2.0-en",
"MulanPSL-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | fsjhut/shangMaStudy | f8edf1f6d55478615d6bd8b1a4add211de98ba36 | c0abad4a87e2000dd13225ffdc7e95293625fb55 | refs/heads/master | 2023-07-17T09:15:31.931156 | 2021-09-01T02:18:18 | 2021-09-01T02:18:18 | 364,105,148 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,135 | java | package com.socket.transfile;
import java.io.*;
import java.net.Socket;
import java.net.UnknownHostException;
import java.util.Objects;
import java.util.Scanner;
/**
* 1. 可以传输文件或者目录
* 2. 对文件或文件的大小进行记录
* 3. 使用多线程
* 4. 在客户端显示文件传输的进度
* 5. 传输完成后 计算总文件的大小,
* 与客户端的比对是否一致
* 6. 比对成功,则提示用户上传已成功
*
* @author SunHang
* @className: TcpClient
* @description: 客户端上传到服务器
* @createTime 2021/4/12 19:14
*/
public class ImageTcpClient {
public static Scanner scanner = new Scanner(System.in);
public static String fileInitialPath;
public static void main(String[] args) {
// 定义一个上传的路径
System.out.println("=======欢迎使用文件上传系统!========");
System.out.println("请输入你要上传的文件目录:");
fileInitialPath = scanner.nextLine();
File file = new File(fileInitialPath);
if (!file.exists()) {
System.out.println("输入的文件名有误!");
return;
}
if (file.isDirectory()) {
// 如果是一个文件目录,则先向服务器传入文件名
uploadPath(file);
// 调用文件夹上传的方法
fileHandle(file);
} else {
fileUpload2(file);
}
}
public static void fileHandle(File file) {
if (!file.exists()) {
return;
}
// 调用递归的方法进行文件的传输
File[] child = file.listFiles();
Objects.requireNonNull(child);
for (File file1 : child) {
if (file1.isDirectory()) {
// 先上传路径
uploadPath(file1);
// 递归调用
fileHandle(file1);
} else {
// 执行文件上传的任务
fileUpload(file1);
}
}
}
//E:\个人笔记\项目V1.0\SharedBike.java
private static void uploadPath(File file1) {
// 如果是目录,上传到目录路径给服务器,
// 服务器接受到目录后,创建一个文件夹
String absPath = file1.getAbsolutePath();
String truePath = updatePath(absPath);
try {
Socket socket = new Socket("192.168.14.246", 8888);
DataOutputStream firstStream = new
DataOutputStream(socket.getOutputStream());
if ("".equals(truePath)) {
// 第一次传输,应该传输根文件名
// E:\资料\课件\第一阶段
// String[] split = fileInitialPath.split("\\\\");
// String rootPath = split[split.length - 1];
firstStream.writeUTF("@" + file1.getName());
// System.out.println(file1.getName());
socket.shutdownOutput();
socket.close();
} else {
firstStream.writeUTF("#" + truePath);
// 关闭输出流
socket.shutdownOutput();
// 关闭套接字
socket.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
private static void fileUpload(File file) {
// String fileName = file.getName();
String filePath = file.getAbsolutePath();
// 文件的绝对路径要进行处理,绝对路径减去最初的filePath
String truePath = updatePath(filePath);
try {
Socket socket = new Socket("192.168.14.246", 8888);
// 先传输,文件名和文件的路径
DataOutputStream firstStream = new
DataOutputStream(socket.getOutputStream());
firstStream.writeUTF("*" + truePath);
// socket.shutdownOutput();
// 读取文件的内容,传递给服务器
byte[] bytes = new byte[1024];
int len;
// System.out.println(file.exists());
FileInputStream inputStream = new FileInputStream(file);
// FileInputStream inputStream = new FileInputStream(file);
OutputStream contentStream = socket.getOutputStream();
while ((len = inputStream.read(bytes)) != -1) {
contentStream.write(bytes, 0, len);
}
// 关闭输出流
socket.shutdownOutput();
// 关闭套接字
socket.close();
} catch (IOException e) {
e.printStackTrace();
}
}
private static String updatePath(String filePath) {
// filePath - fileInitialPath
String truePath = filePath.replace(fileInitialPath, "");
String truePath2;
if("".equals(truePath)){
truePath2 = "";
}else{
truePath2 = truePath.substring(1,truePath.length());
}
return truePath2;
}
private static void fileUpload2(File file) {
String fileName = file.getName();
try {
Socket socket = new Socket("192.168.14.246", 8888);
// 先传输,文件名和文件的路径
DataOutputStream firstStream = new
DataOutputStream(socket.getOutputStream());
firstStream.writeUTF("&"+fileName);
// socket.shutdownOutput();
// 读取文件的内容,传递给服务器
byte[] bytes = new byte[1024];
int len;
// FileInputStream inputStream = new FileInputStream(file.getAbsolutePath());
FileInputStream inputStream = new FileInputStream(file);
OutputStream contentStream = socket.getOutputStream();
while ((len = inputStream.read(bytes)) != -1) {
contentStream.write(bytes, 0, len);
}
// 关闭输出流
socket.shutdownOutput();
// 关闭套接字
socket.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
| [
"1067224906@qq.com"
] | 1067224906@qq.com |
4b1053a251b531c89477e65673ce65dec6b8881b | e9664119586e3218921a5d3062037635c28f6534 | /MPP/20170922_lesson10/lesson10/exercise_3/OldFileIO.java | fab543213c3f040ace880e0e70707d0205ea345c | [] | no_license | yangquan1982/MSCS | 5818ff1d2b5ea2159ecf74f29f800dfac389846f | a90c86b64223587bb8dde92ba325423b934d459b | refs/heads/master | 2021-08-14T13:30:49.810867 | 2017-11-15T20:34:15 | 2017-11-15T20:34:15 | 109,010,825 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,235 | java | package lesson10.exercise_3;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.StringTokenizer;
import java.util.logging.Logger;
public class OldFileIO {
private static final Logger LOG = Logger.getLogger(OldFileIO.class.getName());
public final static String FILE_LOCATION = System.getProperty("user.dir")
+ "\\src\\lesson10\\exercise_3\\word_test.txt";
void readText(String filename) {
File f = new File(filename);
FileReader fr = null;
BufferedReader reader = null;
try {
fr = new FileReader(f);
reader = new BufferedReader(fr);
String line = null;
while((line = reader.readLine()) != null) {
System.out.println(line);
}
} catch(IOException e) {
LOG.warning("IOException thrown when reading file: " + e.getMessage());
} finally { //close the resource
try {
if(fr != null) fr.close();
if(reader != null) reader.close();
} catch(IOException ex) {
LOG.warning("IOException thrown when closing file: " + ex.getMessage());
}
}
}
public static void main(String[] args) {
OldFileIO oldfile = new OldFileIO();
String filename = FILE_LOCATION;
oldfile.readText(filename);
}
}
| [
"tbg127@gmail.com"
] | tbg127@gmail.com |
fbbda76f27e685372fab071eb4657a3d72ab4888 | af846ab7ffc148cd3207f3e65cfb2dde6d92c767 | /sparrow-search/sparrow-search-tool/src/main/java/org/jchmlib/util/TagReader.java | 3fe444bdbe895a4d02dd31b2fe21776191a7cfe4 | [
"Apache-2.0"
] | permissive | aniu2002/myself-toolkit | aaf5f71948bb45d331b206d806de85c84bafadcc | aea640b4339ea24d7bfd32311f093560573635d3 | refs/heads/master | 2022-12-24T20:25:43.702167 | 2019-03-11T14:42:14 | 2019-03-11T14:42:14 | 99,811,298 | 1 | 0 | Apache-2.0 | 2022-12-12T21:42:45 | 2017-08-09T13:26:46 | Java | UTF-8 | Java | false | false | 4,570 | java | package org.jchmlib.util;
import java.nio.ByteBuffer;
import java.util.HashMap;
import java.io.UnsupportedEncodingException;
public class TagReader
{
int level;
HashMap<String, Integer> tagLevels;
ByteBuffer data;
String codec;
public TagReader(ByteBuffer data, String codec) {
this.data = data;
this.codec = codec;
tagLevels = new HashMap<String, Integer>();
level = 0;
}
public Tag getNext() {
Tag ret = new Tag();
ret.totalLevel = level;
if (!data.hasRemaining()) return ret;
String tagString = readTag();
String istring = tagString;
if (tagString.startsWith("<!")) { // comment or metadata, skip it
return getNext();
}
if (tagString.startsWith("<?")) { // special data, skip it
return getNext();
}
int itmp;
if (tagString.startsWith("</")) { // a closed tag
ret.name = tagString.substring(1, tagString.length()-1).trim().toLowerCase();
level--;
ret.totalLevel = level;
if (tagLevels.containsKey(ret.name.substring(1))) {
itmp = ((Integer) tagLevels.get(ret.name.substring(1))).intValue();
itmp--;
}
else {
itmp = 0;
}
tagLevels.put(ret.name.substring(1), new Integer(itmp));
ret.tagLevel = itmp;
return ret;
}
// open tag
ret.name = tagString.substring(1, tagString.length()-1).trim().toLowerCase();
if (tagLevels.containsKey(ret.name)) {
itmp = ((Integer) tagLevels.get(ret.name)).intValue();
itmp++;
}
else {
itmp = 1;
}
tagLevels.put(ret.name, new Integer(itmp));
ret.tagLevel = itmp;
// now read the tag paremeters
tagString = tagString.substring(1);
int index = tagString.indexOf(" ");
if (index > 0) {
String elem;
String value;
ret.name = tagString.substring(0, index).toLowerCase();
tagString = tagString.substring(index+1);
int indexQuote = -1;
int indexEq = tagString.indexOf("=");
int i=0;
while (indexEq > 0) {
i++;
elem = tagString.substring(0, indexEq);
indexQuote = tagString.substring(indexEq + 2).indexOf("\"");
if (indexQuote < 0) {
// the hhc file seems broken
System.out.println(tagString);
break;
}
value = tagString.substring(indexEq+2, indexEq+2+indexQuote);
ret.elems.put(elem.toLowerCase(), value);
tagString = tagString.substring(indexEq+2+indexQuote+2);
indexEq = tagString.indexOf("=");
}
if (ret.name.equalsIgnoreCase("param") && i!=2) {
System.out.println("Strange: "+istring);
}
}
return ret;
}
public boolean hasNext() {
return data.hasRemaining();
}
public String readTag() {
skipWhitespace();
byte[] buf = new byte[1024];
int pos = 0;
peek(); // skip '<'
buf[pos++] = data.get();
while (peek() != '>') {
if (peek() == '=') {
buf[pos++] = data.get();
skipWhitespace();
buf[pos++] = data.get(); // '"' after '='
while (peek() != '"') {
buf[pos++] = data.get();
}
buf[pos++] = data.get();
}
else {
buf[pos++] = data.get();
}
}
buf[pos++] = data.get();
skipWhitespace();
String tag="";
try {
tag = new String(buf, 0, pos, codec);
} catch (UnsupportedEncodingException e) {
System.err.println("Encoding " + codec + " unsupported");
tag = new String(buf, 0, pos);
}
return tag;
}
private int peek() {
data.mark();
int result = data.get();
data.reset();
return result;
}
public void skipWhitespace() {
while ( hasNext() &&
Character.isWhitespace( (char)peek() ) ) {
data.get();
}
}
}
| [
"yuanzhengchu2002@163.com"
] | yuanzhengchu2002@163.com |
f1a058f29d2183971b4d068a454aa8612811f5ce | b8c99bb08bd31ce5eeec4d8bb761957640f7a7f0 | /template-provider/template-provider-admin/src/main/java/com/template/provider/admin/ProviderAdminBootstrap.java | 0dc74b1229ee6dcfa5139067ff94a9f02386505c | [] | no_license | FullDeveloper/template | e8d76878aa4f173b90e131206deca0ba8a833d49 | 376e62e507880ff3afe71ff94de6b992f7310bd0 | refs/heads/master | 2020-03-12T09:26:08.907470 | 2018-06-14T07:47:13 | 2018-06-14T07:47:13 | 130,552,709 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,110 | java | package com.template.provider.admin;
import com.template.auth.client.EnableAuthClient;
import com.template.cache.EnableCache;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* Author: zrb
* Date: 2018/4/22
* Time: 15:18
* Description:
*/
@SpringBootApplication
@MapperScan("com.template.provider.admin.mapper")
@EnableTransactionManagement
@EnableFeignClients({"com.template.auth.client.feign"})
@EnableAuthClient
@RestController
//@EnableCache
public class ProviderAdminBootstrap {
public static void main(String[] args) {
SpringApplication.run(ProviderAdminBootstrap.class, args);
}
@RequestMapping(value = "/hi")
public String helloAdmin(){
return "hello Admin";
}
}
| [
"1875222156@qq.com"
] | 1875222156@qq.com |
54526ebf95b19a30592b696070b9e3f5515f3496 | ef44d044ff58ebc6c0052962b04b0130025a102b | /com.freevisiontech.fvmobile_source_from_JADX/sources/com/mp4parser/streaming/extensions/SampleFlagsTrackExtension.java | c91167508e2ff4867ab3beabf4aa6570e37666db | [] | no_license | thedemoncat/FVShare | e610bac0f2dc394534ac0ccec86941ff523e2dfd | bd1e52defaec868f0d1f9b4f2039625c8ff3ee4a | refs/heads/master | 2023-08-06T04:11:16.403943 | 2021-09-25T10:11:13 | 2021-09-25T10:11:13 | 410,232,121 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 162 | java | package com.mp4parser.streaming.extensions;
import com.mp4parser.streaming.TrackExtension;
public class SampleFlagsTrackExtension implements TrackExtension {
}
| [
"nl.ruslan@yandex.ru"
] | nl.ruslan@yandex.ru |
1b7773ffd2d0605f41ab63a762565dacae8186f6 | 40665051fadf3fb75e5a8f655362126c1a2a3af6 | /DataArt-CalculationEngine/003fc5ab4189ffbed124bb639dc94e50d120b0d2/223/Excel_IF_False_All_Test.java | 05abb4211b4a5e94e39c7a7d8bb8fcca2567788f | [] | no_license | fermadeiral/StyleErrors | 6f44379207e8490ba618365c54bdfef554fc4fde | d1a6149d9526eb757cf053bc971dbd92b2bfcdf1 | refs/heads/master | 2020-07-15T12:55:10.564494 | 2019-10-24T02:30:45 | 2019-10-24T02:30:45 | 205,546,543 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,526 | java | /*
Copyright 2015 DataArt Apps, Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package com.dataart.spreadsheetanalytics.test.graph.standardwithconfig;
import static com.dataart.spreadsheetanalytics.test.util.GraphTestUtil.ALL_CELLS_GRAPHML_DIR;
import static com.dataart.spreadsheetanalytics.test.util.GraphTestUtil.STANDARD_EXCELS_DIR;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import com.dataart.spreadsheetanalytics.api.engine.IAuditor;
import com.dataart.spreadsheetanalytics.api.model.IDataModel;
import com.dataart.spreadsheetanalytics.engine.Converters;
import com.dataart.spreadsheetanalytics.engine.SpreadsheetAuditor;
import com.dataart.spreadsheetanalytics.engine.graph.ExecutionGraphConfig;
import com.dataart.spreadsheetanalytics.test.SerializedGraphTest;
import com.dataart.spreadsheetanalytics.test.util.GraphTestUtil;
public class Excel_IF_False_All_Test extends SerializedGraphTest {
static String file = "IF_False";
static String path = STANDARD_EXCELS_DIR + file + ".xlsx";
static String graphml = file + "/";
static String suffix = "All";
static String suffix1 = "JOIN_ALL";
static String suffix2 = "JOIN_2";
static String suffix3 = "JOIN_5";
static String suffix4 = "JOIN_10";
IAuditor auditor = null;
@Before
public void beforeTest() throws Exception {
final IDataModel model = Converters.toDataModel(new XSSFWorkbook(path));
GraphTestUtil.initExternalServices(model);
auditor = new SpreadsheetAuditor(model);
}
@After
public void afterTest() throws Exception {
super.after();
}
@Test
public void assert_ExcelFile_SerializedGraph_No_Join() throws Exception {
graph = auditor.buildExecutionGraph();
super.compare_ExcelFile_SerializedGraph(ALL_CELLS_GRAPHML_DIR, graphml, suffix);
}
@Test
public void assert_ExcelFile_SerializedGraph_Join_All() throws Exception {
graph = auditor.buildExecutionGraph(ExecutionGraphConfig.JOIN_ALL_DUPLICATE_VERTICES);
super.compare_ExcelFile_SerializedGraph(ALL_CELLS_GRAPHML_DIR, graphml, suffix1);
}
@Test
public void assert_ExcelFile_SerializedGraph_Join_2() throws Exception {
graph = auditor.buildExecutionGraph(ExecutionGraphConfig.LIMIT_TO_2_DUPLICATE_VERTICES);
super.compare_ExcelFile_SerializedGraph(ALL_CELLS_GRAPHML_DIR, graphml, suffix2);
}
@Test
public void assert_ExcelFile_SerializedGraph_Join_5() throws Exception {
graph = auditor.buildExecutionGraph(ExecutionGraphConfig.LIMIT_TO_5_DUPLICATE_VERTICES);
super.compare_ExcelFile_SerializedGraph(ALL_CELLS_GRAPHML_DIR, graphml, suffix3);
}
@Test
public void assert_ExcelFile_SerializedGraph_Join_10() throws Exception {
graph = auditor.buildExecutionGraph(ExecutionGraphConfig.LIMIT_TO_10_DUPLICATE_VERTICES);
super.compare_ExcelFile_SerializedGraph(ALL_CELLS_GRAPHML_DIR, graphml, suffix4);
}
}
| [
"fer.madeiral@gmail.com"
] | fer.madeiral@gmail.com |
e3bc79520a0250a96d0c1670128528335893cdc9 | b81dc3ae5d15a90e99476c64fcad57c4d2235e98 | /src/main/java/testapp/generated/ota2008a/PMSResStatusType_2008A.java | 7953f451634e224367950e2ce22c3547e604c732 | [] | no_license | northernbird/modelmapper-issue-one | a0c496cc38fecce1f8dd19d9846225e4e82a9fd2 | e84e1df0ebf04de4b518c4673c033b08718c11e9 | refs/heads/master | 2020-12-29T15:59:49.960115 | 2019-04-25T18:44:42 | 2019-04-25T18:44:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,075 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2017.04.10 at 03:49:35 PM CEST
//
package testapp.generated.ota2008a;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for PMS_ResStatusType.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="PMS_ResStatusType">
* <restriction base="{http://www.opentravel.org/OTA/2003/05}StringLength1to16">
* <enumeration value="Reserved"/>
* <enumeration value="Requested"/>
* <enumeration value="Request denied"/>
* <enumeration value="No-show"/>
* <enumeration value="Cancelled"/>
* <enumeration value="In-house"/>
* <enumeration value="Checked out"/>
* <enumeration value="Waitlisted"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "PMS_ResStatusType")
@XmlEnum
public enum PMSResStatusType_2008A {
/**
* The reservation has been reserved.
*
*/
@XmlEnumValue("Reserved")
RESERVED("Reserved"),
/**
* The reservation has been requested but has not yet been reserved.
*
*/
@XmlEnumValue("Requested")
REQUESTED("Requested"),
/**
* The request for the reservation has been denied.
*
*/
@XmlEnumValue("Request denied")
REQUEST_DENIED("Request denied"),
/**
* This reservation is in "no show" status. Typically this means the person for whom this reservation belonged did not check in and the reservation was moved to "no show" status.
*
*/
@XmlEnumValue("No-show")
NO_SHOW("No-show"),
/**
* This reservation has been cancelled.
*
*/
@XmlEnumValue("Cancelled")
CANCELLED("Cancelled"),
/**
* This reservation has been check in, and is in "in-house" status.
*
*/
@XmlEnumValue("In-house")
IN_HOUSE("In-house"),
/**
* The guest has checked out and the reservation has been changed to "Checked out" status
*
*/
@XmlEnumValue("Checked out")
CHECKED_OUT("Checked out"),
/**
* This reservation is in waitlist status and the reservation has not been confirmed.
*
*/
@XmlEnumValue("Waitlisted")
WAITLISTED("Waitlisted");
private final String value;
PMSResStatusType_2008A(String v) {
value = v;
}
public String value() {
return value;
}
public static PMSResStatusType_2008A fromValue(String v) {
for (PMSResStatusType_2008A c: PMSResStatusType_2008A.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}
| [
"ervin@rateboard.info"
] | ervin@rateboard.info |
25c6ecbf3fcf79658967800de1724685782803db | 5b5362e26b79b486f597b3d325d23840b76442f0 | /empoa-simple-models-impl/src/test/java/org/openapitools/empoa/simple/internal/OASFactoryResolverImplTest.java | a566337780c9c557f3af17f278b63e52ad680126 | [
"Apache-2.0"
] | permissive | fschuerer/empoa | 191b5751c874c7315e8189ad26204261710b75c5 | 2d3b21c2b28b241e5f4497df981f6e6df4ddd14c | refs/heads/master | 2020-08-06T04:52:44.020885 | 2019-08-26T15:24:42 | 2019-08-26T15:24:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,784 | java | /*******************************************************************************
* Copyright 2019 Jeremie Bresson
*
* 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.openapitools.empoa.simple.internal;
import static org.assertj.core.api.Assertions.assertThat;
import org.eclipse.microprofile.openapi.OASFactory;
import org.junit.jupiter.api.Test;
public class OASFactoryResolverImplTest {
@Test
public void testCreateObject() {
assertThat(OASFactory.createObject(org.eclipse.microprofile.openapi.models.Components.class))
.isOfAnyClassIn(org.openapitools.empoa.simple.internal.models.ComponentsImpl.class);
assertThat(OASFactory.createObject(org.eclipse.microprofile.openapi.models.ExternalDocumentation.class))
.isOfAnyClassIn(org.openapitools.empoa.simple.internal.models.ExternalDocumentationImpl.class);
assertThat(OASFactory.createObject(org.eclipse.microprofile.openapi.models.OpenAPI.class))
.isOfAnyClassIn(org.openapitools.empoa.simple.internal.models.OpenAPIImpl.class);
assertThat(OASFactory.createObject(org.eclipse.microprofile.openapi.models.Operation.class))
.isOfAnyClassIn(org.openapitools.empoa.simple.internal.models.OperationImpl.class);
assertThat(OASFactory.createObject(org.eclipse.microprofile.openapi.models.PathItem.class))
.isOfAnyClassIn(org.openapitools.empoa.simple.internal.models.PathItemImpl.class);
assertThat(OASFactory.createObject(org.eclipse.microprofile.openapi.models.Paths.class))
.isOfAnyClassIn(org.openapitools.empoa.simple.internal.models.PathsImpl.class);
assertThat(OASFactory.createObject(org.eclipse.microprofile.openapi.models.callbacks.Callback.class))
.isOfAnyClassIn(org.openapitools.empoa.simple.internal.models.callbacks.CallbackImpl.class);
assertThat(OASFactory.createObject(org.eclipse.microprofile.openapi.models.examples.Example.class))
.isOfAnyClassIn(org.openapitools.empoa.simple.internal.models.examples.ExampleImpl.class);
assertThat(OASFactory.createObject(org.eclipse.microprofile.openapi.models.headers.Header.class))
.isOfAnyClassIn(org.openapitools.empoa.simple.internal.models.headers.HeaderImpl.class);
assertThat(OASFactory.createObject(org.eclipse.microprofile.openapi.models.info.Contact.class))
.isOfAnyClassIn(org.openapitools.empoa.simple.internal.models.info.ContactImpl.class);
assertThat(OASFactory.createObject(org.eclipse.microprofile.openapi.models.info.Info.class))
.isOfAnyClassIn(org.openapitools.empoa.simple.internal.models.info.InfoImpl.class);
assertThat(OASFactory.createObject(org.eclipse.microprofile.openapi.models.info.License.class))
.isOfAnyClassIn(org.openapitools.empoa.simple.internal.models.info.LicenseImpl.class);
assertThat(OASFactory.createObject(org.eclipse.microprofile.openapi.models.links.Link.class))
.isOfAnyClassIn(org.openapitools.empoa.simple.internal.models.links.LinkImpl.class);
assertThat(OASFactory.createObject(org.eclipse.microprofile.openapi.models.media.Content.class))
.isOfAnyClassIn(org.openapitools.empoa.simple.internal.models.media.ContentImpl.class);
assertThat(OASFactory.createObject(org.eclipse.microprofile.openapi.models.media.Discriminator.class))
.isOfAnyClassIn(org.openapitools.empoa.simple.internal.models.media.DiscriminatorImpl.class);
assertThat(OASFactory.createObject(org.eclipse.microprofile.openapi.models.media.Encoding.class))
.isOfAnyClassIn(org.openapitools.empoa.simple.internal.models.media.EncodingImpl.class);
assertThat(OASFactory.createObject(org.eclipse.microprofile.openapi.models.media.MediaType.class))
.isOfAnyClassIn(org.openapitools.empoa.simple.internal.models.media.MediaTypeImpl.class);
assertThat(OASFactory.createObject(org.eclipse.microprofile.openapi.models.media.Schema.class))
.isOfAnyClassIn(org.openapitools.empoa.simple.internal.models.media.SchemaImpl.class);
assertThat(OASFactory.createObject(org.eclipse.microprofile.openapi.models.media.XML.class))
.isOfAnyClassIn(org.openapitools.empoa.simple.internal.models.media.XMLImpl.class);
assertThat(OASFactory.createObject(org.eclipse.microprofile.openapi.models.parameters.Parameter.class))
.isOfAnyClassIn(org.openapitools.empoa.simple.internal.models.parameters.ParameterImpl.class);
assertThat(OASFactory.createObject(org.eclipse.microprofile.openapi.models.parameters.RequestBody.class))
.isOfAnyClassIn(org.openapitools.empoa.simple.internal.models.parameters.RequestBodyImpl.class);
assertThat(OASFactory.createObject(org.eclipse.microprofile.openapi.models.responses.APIResponse.class))
.isOfAnyClassIn(org.openapitools.empoa.simple.internal.models.responses.APIResponseImpl.class);
assertThat(OASFactory.createObject(org.eclipse.microprofile.openapi.models.responses.APIResponses.class))
.isOfAnyClassIn(org.openapitools.empoa.simple.internal.models.responses.APIResponsesImpl.class);
assertThat(OASFactory.createObject(org.eclipse.microprofile.openapi.models.security.OAuthFlow.class))
.isOfAnyClassIn(org.openapitools.empoa.simple.internal.models.security.OAuthFlowImpl.class);
assertThat(OASFactory.createObject(org.eclipse.microprofile.openapi.models.security.OAuthFlows.class))
.isOfAnyClassIn(org.openapitools.empoa.simple.internal.models.security.OAuthFlowsImpl.class);
assertThat(OASFactory.createObject(org.eclipse.microprofile.openapi.models.security.Scopes.class))
.isOfAnyClassIn(org.openapitools.empoa.simple.internal.models.security.ScopesImpl.class);
assertThat(OASFactory.createObject(org.eclipse.microprofile.openapi.models.security.SecurityRequirement.class))
.isOfAnyClassIn(org.openapitools.empoa.simple.internal.models.security.SecurityRequirementImpl.class);
assertThat(OASFactory.createObject(org.eclipse.microprofile.openapi.models.security.SecurityScheme.class))
.isOfAnyClassIn(org.openapitools.empoa.simple.internal.models.security.SecuritySchemeImpl.class);
assertThat(OASFactory.createObject(org.eclipse.microprofile.openapi.models.servers.Server.class))
.isOfAnyClassIn(org.openapitools.empoa.simple.internal.models.servers.ServerImpl.class);
assertThat(OASFactory.createObject(org.eclipse.microprofile.openapi.models.servers.ServerVariable.class))
.isOfAnyClassIn(org.openapitools.empoa.simple.internal.models.servers.ServerVariableImpl.class);
assertThat(OASFactory.createObject(org.eclipse.microprofile.openapi.models.servers.ServerVariables.class))
.isOfAnyClassIn(org.openapitools.empoa.simple.internal.models.servers.ServerVariablesImpl.class);
assertThat(OASFactory.createObject(org.eclipse.microprofile.openapi.models.tags.Tag.class))
.isOfAnyClassIn(org.openapitools.empoa.simple.internal.models.tags.TagImpl.class);
}
}
| [
"dev@jmini.fr"
] | dev@jmini.fr |
548ad1d568d2d397036d1dfa41076fd68feeaaf3 | 7dbbe21b902fe362701d53714a6a736d86c451d7 | /BzenStudio-5.6/Source/com/zend/ide/bf/jb.java | 6cc97a530714237e8bc90ec814759cbcaf5f1474 | [] | no_license | HS-matty/dev | 51a53b4fd03ae01981549149433d5091462c65d0 | 576499588e47e01967f0c69cbac238065062da9b | refs/heads/master | 2022-05-05T18:32:24.148716 | 2022-03-20T16:55:28 | 2022-03-20T16:55:28 | 196,147,486 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 808 | java | package com.zend.ide.bf;
import com.zend.ide.n.gz;
import com.zend.ide.y.e;
import com.zend.ide.y.f;
import com.zend.ide.y.i;
class jb extends gz
{
final ba y;
jb(ba paramba)
{
}
protected void z()
{
this.v = new i(c());
this.v.a("editor.functionHelpAction", "functionHelp", 0);
f localf = new f();
this.n = new e(localf);
localf.a("editing.font", this.q);
localf.a("editing.tabSize", this.s);
localf.a("editing.lineWrap", this.t);
localf.a("editing.wordWrap", this.u);
this.n.a("editing.font");
this.n.a("editing.tabSize");
this.n.a("editing.lineWrap");
this.n.a("editing.wordWrap");
}
}
/* Location: C:\Program Files\Zend\ZendStudio-5.5.1\bin\ZendIDE.jar
* Qualified Name: com.zend.ide.bf.jb
* JD-Core Version: 0.6.0
*/ | [
"byqdes@gmail.com"
] | byqdes@gmail.com |
ca8ec352d2d9f24e6c0a96b2f679d1078842796c | f5acd38efe9f28e14a3e77cf60f938000a6660ab | /clients/java-pkmst/generated/src/main/java/com/prokarma/pkmst/model/Body.java | d37732ac1d90a97110f0fa921e1bfd3a4a7f0b5a | [
"MIT"
] | permissive | rahulyhg/swaggy-jenkins | 3fc9377c8cf8643d6b4ffe4a6aceb49315afdb8e | 21326779f8814a07153acaf5af15ffbbd593c48b | refs/heads/master | 2020-05-04T16:14:43.369417 | 2019-01-27T06:27:32 | 2019-01-27T06:27:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,783 | java | package com.prokarma.pkmst.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Response class to be returned by Api
* @author pkmst
*
*/
/**
* Body
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPKMSTServerCodegen", date = "2018-08-21T04:38:28.156Z[GMT]")
public class Body {
@JsonProperty("favorite")
private Boolean favorite = null;
public Body favorite(Boolean favorite) {
this.favorite = favorite;
return this;
}
/**
* Get favorite
* @return favorite
**/
@ApiModelProperty(required = true, value = "")
public Boolean getFavorite() {
return favorite;
}
public void setFavorite(Boolean favorite) {
this.favorite = favorite;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Body body = (Body) o;
return Objects.equals(this.favorite, body.favorite);
}
@Override
public int hashCode() {
return Objects.hash(favorite);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Body {\n");
sb.append(" favorite: ").append(toIndentedString(favorite)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
| [
"cliffano@gmail.com"
] | cliffano@gmail.com |
bc7398d4ee642ca69c3e7ec52ebba0960b82fda8 | 3441de0b93c9bc4dc40e1a46abd7d36cafe51c2d | /paascloud-provider/paascloud-provider-tpc/src/main/java/com/paascloud/provider/web/frontend/TpcMqConsumerController.java | 586d587472336166199dbe29751ee8298b66b485 | [] | no_license | XinxiJiang/passcloud-master | 23baeb1c4360432585c07e49e7e2366dc2955398 | 212c2d7c2c173a788445c21de4775c4792a11242 | refs/heads/master | 2023-04-11T21:31:27.208057 | 2018-12-11T04:42:18 | 2018-12-11T04:44:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,120 | java | package com.paascloud.provider.web.frontend;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.paascloud.provider.model.domain.TpcMqConsumer;
import com.paascloud.provider.model.vo.TpcMqConsumerVo;
import com.paascloud.provider.model.vo.TpcMqSubscribeVo;
import com.paascloud.provider.service.TpcMqConsumerService;
import com.passcloud.common.base.dto.LoginAuthDto;
import com.passcloud.common.base.dto.UpdateStatusDto;
import com.passcloud.common.core.annotation.LogAnnotation;
import com.passcloud.common.core.support.BaseController;
import com.passcloud.common.util.PublicUtil;
import com.passcloud.common.util.wrapper.WrapMapper;
import com.passcloud.common.util.wrapper.Wrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
/**
* 消费者管理.
*
* @author liyuzhang
*/
@RestController
@RequestMapping(value = "/consumer", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(value = "WEB - TpcMqConsumerController", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public class TpcMqConsumerController extends BaseController {
private TpcMqConsumerService tpcMqConsumerService;
/**
* 查询Mq消费者列表.
*
* @param tpcMqConsumer the tpc mq consumer
*
* @return the wrapper
*/
@PostMapping(value = "/queryConsumerVoListWithPage")
@ApiOperation(httpMethod = "POST", value = "查询Mq消费者列表")
public Wrapper<List<TpcMqConsumerVo>> queryConsumerVoList(@ApiParam(name = "consumer", value = "Mq消费者") @RequestBody TpcMqConsumer tpcMqConsumer) {
logger.info("查询消费者列表tpcMqProducerQuery={}", tpcMqConsumer);
List<TpcMqConsumerVo> list = tpcMqConsumerService.listConsumerVoWithPage(tpcMqConsumer);
return WrapMapper.ok(list);
}
/**
* 查询订阅者列表.
*
* @param tpcMqConsumer the tpc mq consumer
*
* @return the wrapper
*/
@PostMapping(value = "/querySubscribeListWithPage")
@ApiOperation(httpMethod = "POST", value = "查询订阅者列表")
public Wrapper<PageInfo<TpcMqSubscribeVo>> querySubscribeListWithPage(@ApiParam(name = "consumer", value = "Mq消费者") @RequestBody TpcMqConsumer tpcMqConsumer) {
logger.info("查询Mq订阅列表tpcMqConsumerQuery={}", tpcMqConsumer);
PageHelper.startPage(tpcMqConsumer.getPageNum(), tpcMqConsumer.getPageSize());
tpcMqConsumer.setOrderBy("update_time desc");
List<TpcMqSubscribeVo> list = tpcMqConsumerService.listSubscribeVoWithPage(tpcMqConsumer);
PageInfo<TpcMqSubscribeVo> pageInfo = new PageInfo<>(list);
if (PublicUtil.isNotEmpty(list)) {
Map<Long, TpcMqSubscribeVo> tpcMqSubscribeVoMap = this.trans2Map(list);
List<Long> subscribeIdList = new ArrayList<>(tpcMqSubscribeVoMap.keySet());
List<TpcMqSubscribeVo> tagVoList = tpcMqConsumerService.listSubscribeVo(subscribeIdList);
for (TpcMqSubscribeVo vo : tagVoList) {
Long subscribeId = vo.getId();
if (!tpcMqSubscribeVoMap.containsKey(subscribeId)) {
continue;
}
TpcMqSubscribeVo tpcMqSubscribeVo = tpcMqSubscribeVoMap.get(subscribeId);
tpcMqSubscribeVo.setTagVoList(vo.getTagVoList());
}
pageInfo.setList(new ArrayList<>(tpcMqSubscribeVoMap.values()));
}
return WrapMapper.ok(pageInfo);
}
private Map<Long, TpcMqSubscribeVo> trans2Map(List<TpcMqSubscribeVo> resultDTOS) {
Map<Long, TpcMqSubscribeVo> resultMap = new TreeMap<>((o1, o2) -> {
o1 = o1 == null ? 0 : o1;
o2 = o2 == null ? 0 : o2;
return o2.compareTo(o1);
});
for (TpcMqSubscribeVo resultDTO : resultDTOS) {
resultMap.put(resultDTO.getId(), resultDTO);
}
return resultMap;
}
/**
* 更改消费者状态.
*
* @param updateStatusDto the update status dto
*
* @return the wrapper
*/
@PostMapping(value = "/modifyStatusById")
@ApiOperation(httpMethod = "POST", value = "更改消费者状态")
@LogAnnotation
public Wrapper modifyConsumerStatusById(@ApiParam(value = "更改消费者状态") @RequestBody UpdateStatusDto updateStatusDto) {
logger.info("修改consumer状态 updateStatusDto={}", updateStatusDto);
Long consumerId = updateStatusDto.getId();
LoginAuthDto loginAuthDto = getLoginAuthDto();
TpcMqConsumer consumer = new TpcMqConsumer();
consumer.setId(consumerId);
consumer.setStatus(updateStatusDto.getStatus());
consumer.setUpdateInfo(loginAuthDto);
int result = tpcMqConsumerService.update(consumer);
return super.handleResult(result);
}
/**
* 根据消费者ID删除消费者.
*
* @param id the id
*
* @return the wrapper
*/
@PostMapping(value = "/deleteById/{id}")
@ApiOperation(httpMethod = "POST", value = "根据消费者ID删除消费者")
@LogAnnotation
public Wrapper deleteConsumerById(@PathVariable Long id) {
logger.info("删除consumer id={}", id);
int result = tpcMqConsumerService.deleteConsumerById(id);
return super.handleResult(result);
}
}
| [
"35205889+mliyz@users.noreply.github.com"
] | 35205889+mliyz@users.noreply.github.com |
bbd27f40ca7a214113e3d421cd8c90191be9163b | 06f7bd5ee2773c2a5599575235e3dc934799b9df | /core/src/main/java/com/dtolabs/rundeck/core/common/SelectorUtils.java | 96614383fb0ec4dd9559796cf72e945a16b6dcbb | [
"Apache-2.0"
] | permissive | rundeck/rundeck | 46c6fb57d7bf7b1ff890908eb4cb1ee8078c09b4 | 7c5000f2929c3f07b9ff7d08981dc7738da3372d | refs/heads/main | 2023-09-01T19:48:37.654990 | 2023-09-01T19:08:15 | 2023-09-01T19:08:15 | 886,774 | 4,827 | 1,022 | Apache-2.0 | 2023-09-14T21:51:34 | 2010-09-03T22:11:25 | Groovy | UTF-8 | Java | false | false | 3,892 | java | /*
* Copyright 2016 SimplifyOps, Inc. (http://simplifyops.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* SelectorUtils.java
*
* User: Greg Schueler <a href="mailto:greg@dtosolutions.com">greg@dtosolutions.com</a>
* Created: 7/19/11 4:48 PM
*
*/
package com.dtolabs.rundeck.core.common;
import java.util.Collection;
import java.util.HashSet;
/**
* SelectorUtils is ...
*
* @author Greg Schueler <a href="mailto:greg@dtosolutions.com">greg@dtosolutions.com</a>
*/
public class SelectorUtils {
private abstract static class ChainNodesSelector implements NodesSelector{
NodesSelector aselector;
NodesSelector bselector;
public ChainNodesSelector(NodesSelector aselector, NodesSelector bselector) {
this.aselector = aselector;
this.bselector = bselector;
}
}
public static class AndNodesSelector extends ChainNodesSelector{
public AndNodesSelector(NodesSelector aselector, NodesSelector bselector) {
super(aselector, bselector);
}
public boolean acceptNode(INodeEntry entry) {
return aselector.acceptNode(entry) && bselector.acceptNode(entry);
}
}
public static class OrNodesSelector extends ChainNodesSelector{
public OrNodesSelector(NodesSelector aselector, NodesSelector bselector) {
super(aselector, bselector);
}
public boolean acceptNode(INodeEntry entry) {
return aselector.acceptNode(entry) || bselector.acceptNode(entry);
}
}
public static NodesSelector and(NodesSelector a,NodesSelector b) {
return new AndNodesSelector(a, b);
}
public static NodesSelector or(NodesSelector a,NodesSelector b) {
return new OrNodesSelector(a, b);
}
public static NodesSelector singleNode(final String nodename){
return new MultiNodeSelector(nodename);
}
public static NodesSelector nodeList(final Collection<String> nodenames) {
return new MultiNodeSelector(nodenames);
}
public static class MultiNodeSelector implements NodesSelector{
private final HashSet<String> nodenames;
public MultiNodeSelector(final String nodename) {
this.nodenames = new HashSet<String>();
nodenames.add(nodename);
}
public MultiNodeSelector(final Collection<String> nodenames) {
this.nodenames = new HashSet<String>(nodenames);
}
public boolean acceptNode(final INodeEntry entry) {
return nodenames.contains(entry.getNodename());
}
@Override
public String toString() {
return "MultiNodeSelector{" +
"nodenames=" + nodenames +
'}';
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
MultiNodeSelector that = (MultiNodeSelector) o;
if (nodenames != null ? !nodenames.equals(that.nodenames) : that.nodenames != null) {
return false;
}
return true;
}
@Override
public int hashCode() {
return nodenames != null ? nodenames.hashCode() : 0;
}
}
}
| [
"greg.schueler@gmail.com"
] | greg.schueler@gmail.com |
cd9c0ba08838a348e1887188ac20d3b9223e0c89 | 206483278d50303f98fa8e837d14cc20005af5eb | /src/main/java/com/wl/socket/thread/DeskBackMessThread.java | 661d1e4cf9cba2b8deb2ad4c8e311418b961db40 | [] | no_license | 438483836/Per | 040cb724d987fd2cd658f55856b8f7838a7ca2de | 1146367b922cdfd8ad593a941d243deeeba4d3c3 | refs/heads/master | 2020-03-20T17:21:05.678483 | 2018-08-10T05:38:49 | 2018-08-10T05:38:49 | 137,557,498 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,259 | java | package com.wl.socket.thread;
import com.wl.service.DeskBackMessService;
import com.wl.socket.client.ScanCodeGetStation;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.PostConstruct;
/**
* 上件台返回信息
* Created by Vincent on 2018-07-16.
*/
public class DeskBackMessThread {
private static Logger logger = LogManager.getLogger(DeskBackMessThread.class);
@Autowired
private DeskBackMessService deskBackMessService;
@PostConstruct
public void initService(){
Thread thread = new Thread(new Runnable() {
public void run() {
int i = 0;
try {
Thread.sleep(5 * 1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
while (true){
if (i > 10) {
logger.error("已失败10次,不再尝试连接");
break;
}
ScanCodeGetStation.scanCodeGetPLC(deskBackMessService);
}
}
});
thread.start();
}
}
| [
"438483836@qq.com"
] | 438483836@qq.com |
fa8cd741e569d2aaf3b07e384a0e318d75e5b72a | d84b9fe97a06f65c899f00e494965f9c06793244 | /kafka-eagle-plugin/src/main/java/org/smartloli/kafka/eagle/plugin/font/KafkaEagleVersion.java | df10c495361c437b65f9074e1182fdb08bf44cd9 | [
"Apache-2.0"
] | permissive | linger118927/kafka-eagle | b0519354e4f3e08993c2791ea8d0f3dbb67b62fe | 2a6ae043a0631729329ef715c49c22e91018ef9a | refs/heads/master | 2022-10-16T07:06:41.943313 | 2020-06-08T15:36:44 | 2020-06-08T15:36:44 | 271,450,526 | 0 | 0 | Apache-2.0 | 2020-06-11T04:23:26 | 2020-06-11T04:23:26 | null | UTF-8 | Java | false | false | 1,407 | 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.smartloli.kafka.eagle.plugin.font;
import java.io.File;
import java.io.IOException;
/**
* Print kafka eagle system version.
*
* @author smartloli.
*
* Created by Jan 23, 2018
*/
public class KafkaEagleVersion {
public static void main(String[] args) throws IOException {
String name = System.getProperty("user.dir") + "/font/slant.flf";
File file = new File(name);
String asciiArt = FigletFont.convertOneLine(file, "KAfKA EAGLE");
System.out.println("Welcome to");
System.out.println(asciiArt);
System.out.println("Version 1.4.9 -- Copyright 2016-2020");
}
}
| [
"smartloli.org@gmail.com"
] | smartloli.org@gmail.com |
2cbe5230f549181fc6a018e2d7e553a0d1d9fc93 | cdf0eb2721e5b73cee2e24dde44f67e40e71ee6f | /src/main/java/com/mascova/punic/web/rest/errors/ErrorConstants.java | 093383e8cb4518210f90aa3a48f6c91a41fd096f | [] | no_license | irfanr/punic | 21aa16a1b11b897c179f6af3f8b45fa2e56140b9 | 549dbe20dcd666f4a7fd861a0d3cde4cfb9f25c2 | refs/heads/master | 2020-06-09T19:28:33.245733 | 2015-11-04T12:34:08 | 2015-11-04T12:34:08 | 35,603,492 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 434 | java | package com.mascova.punic.web.rest.errors;
public final class ErrorConstants {
public static final String ERR_CONCURRENCY_FAILURE = "error.concurrencyFailure";
public static final String ERR_ACCESS_DENIED = "error.accessDenied";
public static final String ERR_VALIDATION = "error.validation";
public static final String ERR_METHOD_NOT_SUPPORTED = "error.methodNotSupported";
private ErrorConstants() {
}
}
| [
"irfan.romadona@gmail.com"
] | irfan.romadona@gmail.com |
7e0021084e42f1f9aa7458cb3c8f250b99280b35 | d1a6d1e511df6db8d8dd0912526e3875c7e1797d | /genny_JavaWithoutLambdasApi21/applicationModule/src/test/java/applicationModulepackageJava5/Foo403Test.java | 7966e5919df7a3f3b570304b48e8ac8a9109d5b3 | [] | no_license | NikitaKozlov/generated-project-for-desugaring | 0bc1443ab3ddc84cd289331c726761585766aea7 | 81506b3711004185070ca4bb9a93482b70011d36 | refs/heads/master | 2020-03-20T00:35:06.996525 | 2018-06-12T09:30:37 | 2018-06-12T09:30:37 | 137,049,317 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 481 | java | package applicationModulepackageJava5;
import org.junit.Test;
public class Foo403Test {
@Test
public void testFoo0() {
new Foo403().foo0();
}
@Test
public void testFoo1() {
new Foo403().foo1();
}
@Test
public void testFoo2() {
new Foo403().foo2();
}
@Test
public void testFoo3() {
new Foo403().foo3();
}
@Test
public void testFoo4() {
new Foo403().foo4();
}
@Test
public void testFoo5() {
new Foo403().foo5();
}
}
| [
"nikita.e.kozlov@gmail.com"
] | nikita.e.kozlov@gmail.com |
a1134f1e6e924cb7c26f867d236a6a6e6be12a6a | e1af7696101f8f9eb12c0791c211e27b4310ecbc | /MCP/temp/src/minecraft/net/minecraft/item/ItemExpBottle.java | 54016a9b1ea053e91049b4b937b164f0f93a758f | [] | no_license | VinmaniaTV/Mania-Client | e36810590edf09b1d78b8eeaf5cbc46bb3e2d8ce | 7a12b8bad1a8199151b3f913581775f50cc4c39c | refs/heads/main | 2023-02-12T10:31:29.076263 | 2021-01-13T02:29:35 | 2021-01-13T02:29:35 | 329,156,099 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,670 | java | package net.minecraft.item;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.item.EntityExpBottle;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.SoundEvents;
import net.minecraft.stats.StatList;
import net.minecraft.util.ActionResult;
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumHand;
import net.minecraft.util.SoundCategory;
import net.minecraft.world.World;
public class ItemExpBottle extends Item {
public ItemExpBottle() {
this.func_77637_a(CreativeTabs.field_78026_f);
}
public boolean func_77636_d(ItemStack p_77636_1_) {
return true;
}
public ActionResult<ItemStack> func_77659_a(World p_77659_1_, EntityPlayer p_77659_2_, EnumHand p_77659_3_) {
ItemStack itemstack = p_77659_2_.func_184586_b(p_77659_3_);
if (!p_77659_2_.field_71075_bZ.field_75098_d) {
itemstack.func_190918_g(1);
}
p_77659_1_.func_184148_a((EntityPlayer)null, p_77659_2_.field_70165_t, p_77659_2_.field_70163_u, p_77659_2_.field_70161_v, SoundEvents.field_187601_be, SoundCategory.NEUTRAL, 0.5F, 0.4F / (field_77697_d.nextFloat() * 0.4F + 0.8F));
if (!p_77659_1_.field_72995_K) {
EntityExpBottle entityexpbottle = new EntityExpBottle(p_77659_1_, p_77659_2_);
entityexpbottle.func_184538_a(p_77659_2_, p_77659_2_.field_70125_A, p_77659_2_.field_70177_z, -20.0F, 0.7F, 1.0F);
p_77659_1_.func_72838_d(entityexpbottle);
}
p_77659_2_.func_71029_a(StatList.func_188057_b(this));
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, itemstack);
}
}
| [
"vinmaniamc@gmail.com"
] | vinmaniamc@gmail.com |
b4a650a33dd2e0fa3fd3f81d14076fe1389c1022 | a5be151a654a28f02e58c1e360917fa459d188d4 | /core-examples/src/test/java/org/carrot2/examples/E02_TweakingAttributes.java | 693fd016af12a9a0979a2700ffd5818e9a32a9ba | [
"Apache-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-bsd-ack-carrot2"
] | permissive | EJHortala/carrot2 | 5d73429b0b05f22594af30fbfdb2853ef0bbbaf9 | 524fc48835ff5309df905b46de135e7d4a2c9ba8 | refs/heads/master | 2020-08-30T03:31:59.142006 | 2019-10-24T11:46:34 | 2019-10-24T11:46:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,187 | java | /*
* Carrot2 project.
*
* Copyright (C) 2002-2019, Dawid Weiss, Stanisław Osiński.
* All rights reserved.
*
* Refer to the full license file "carrot2.LICENSE"
* in the root folder of the repository checkout or at:
* https://www.carrot2.org/carrot2.LICENSE
*/
package org.carrot2.examples;
import java.io.IOException;
import java.util.List;
import java.util.Locale;
import java.util.stream.Stream;
import org.carrot2.attrs.*;
import org.carrot2.clustering.Cluster;
import org.carrot2.clustering.Document;
import org.carrot2.clustering.kmeans.BisectingKMeansClusteringAlgorithm;
import org.carrot2.clustering.lingo.LingoClusteringAlgorithm;
import org.carrot2.clustering.stc.STCClusteringAlgorithm;
import org.carrot2.language.LanguageComponents;
import org.carrot2.math.mahout.Arrays;
import org.carrot2.math.matrix.FactorizationQuality;
import org.carrot2.math.matrix.LocalNonnegativeMatrixFactorizationFactory;
import org.junit.Test;
/** This example shows how to tweak clustering algorithm parameters, prior to clustering. */
public class E02_TweakingAttributes {
@Test
public void tweakLingo() throws IOException {
LanguageComponents languageComponents = LanguageComponents.load("English");
// Tweak Lingo's defaults. Note each attribute comes with JavaDoc documentation
// and some are contrained to a specific range of values. Also, each algorithm
// will typically have a different set of attributes to choose from.
LingoClusteringAlgorithm algorithm = new LingoClusteringAlgorithm();
algorithm.desiredClusterCount.set(10);
algorithm.preprocessing.wordDfThreshold.set(5);
algorithm.preprocessing.phraseDfThreshold.set(5);
algorithm.preprocessing.documentAssigner.minClusterSize.set(4);
// For attributes that are interfaces, provide concrete implementations of that
// interface, configuring it separately. Programming editors provide support for listing
// all interface implementations, use it to inspect the possibilities.
LocalNonnegativeMatrixFactorizationFactory factorizationFactory =
new LocalNonnegativeMatrixFactorizationFactory();
factorizationFactory.factorizationQuality.set(FactorizationQuality.HIGH);
algorithm.matrixReducer.factorizationFactory = factorizationFactory;
List<Cluster<Document>> clusters =
algorithm.cluster(ExamplesData.documentStream(), languageComponents);
System.out.println("Clusters from Lingo:");
ExamplesCommon.printClusters(clusters);
}
@Test
public void tweakStc() throws IOException {
LanguageComponents languageComponents = LanguageComponents.load("English");
// Tweak Lingo's defaults. Note each attribute comes with JavaDoc documentation
// and some are contrained to a specific range of values. Also, each algorithm
// will typically have a different set of attributes to choose from.
STCClusteringAlgorithm algorithm = new STCClusteringAlgorithm();
algorithm.maxClusters.set(10);
algorithm.ignoreWordIfInHigherDocsPercent.set(.8);
algorithm.preprocessing.wordDfThreshold.set(5);
List<Cluster<Document>> clusters =
algorithm.cluster(ExamplesData.documentStream(), languageComponents);
System.out.println("Clusters from STC:");
ExamplesCommon.printClusters(clusters);
}
@Test
public void listAllAttributes() {
// All algorithms implement the visitor pattern so that their (and their default
// components') attributes can be listed and inspected. For example.
class Lister implements AttrVisitor {
private final String lead;
public Lister(String lead) {
this.lead = lead;
}
@Override
public void visit(String key, AttrBoolean attr) {
print(key, attr.get(), "bool", attr);
}
@Override
public void visit(String key, AttrInteger attr) {
print(key, attr.get(), "int", attr);
}
@Override
public void visit(String key, AttrDouble attr) {
print(key, attr.get(), "double", attr);
}
@Override
public <T extends Enum<T>> void visit(String key, AttrEnum<T> attr) {
print(key, attr.get(), "enum of: " + attr.enumClass().getSimpleName(), attr);
}
@Override
public void visit(String key, AttrString attr) {
print(key, attr.get(), "string", attr);
}
@Override
public void visit(String key, AttrStringArray attr) {
print(key, Arrays.toString(attr.get()), "array of strings", attr);
}
@Override
public <T extends AcceptingVisitor> void visit(String key, AttrObject<T> attr) {
AcceptingVisitor value = attr.get();
print(
key,
value == null ? "null" : value.getClass().getSimpleName(),
"<" + attr.getInterfaceClass().getSimpleName() + ">",
attr);
if (value != null) {
value.accept(new Lister(lead + key + "."));
}
}
@Override
public <T extends AcceptingVisitor> void visit(String key, AttrObjectArray<T> attr) {
List<T> value = attr.get();
print(
key,
value == null ? "null" : "list[" + value.size() + "]",
"array of <" + attr.getInterfaceClass().getSimpleName() + ">",
attr);
if (value != null) {
for (AcceptingVisitor v : value) {
v.accept(new Lister(lead + key + "[]."));
}
}
}
private void print(String key, Object value, String type, Attr<?> attr) {
System.out.println(
String.format(
Locale.ROOT,
"%s%s = %s (%s, %s)",
lead,
key,
value,
type,
attr.getDescription() == null ? "--" : attr.getDescription()));
}
}
Stream.of(
new LingoClusteringAlgorithm(),
new STCClusteringAlgorithm(),
new BisectingKMeansClusteringAlgorithm())
.forEachOrdered(
algorithm -> {
System.out.println("\n# Attributes of " + algorithm.getClass().getSimpleName());
algorithm.accept(new Lister(""));
});
}
}
| [
"dawid.weiss@carrotsearch.com"
] | dawid.weiss@carrotsearch.com |
96776a571bf56cfc6c9c27863311981083786261 | 88e75d1d5dd8cefa6bab4054db0bb7aadccb701e | /src/main/java/pokecube/alternative/Config.java | 3c14914ef100cfdb46190af23c1cc024fbf6de58 | [
"MIT"
] | permissive | Pokecube-Development/Pokecube-Alternative | e605e733a9d7593a72310edcc563cff0b2d8c514 | 13811742e91083fbbcd2f865eda18674e7980a09 | refs/heads/master | 2020-03-26T22:36:54.852340 | 2019-06-08T18:04:14 | 2019-06-08T18:04:14 | 145,473,489 | 0 | 1 | MIT | 2019-06-08T05:37:25 | 2018-08-20T21:43:36 | Java | UTF-8 | Java | false | false | 3,274 | java | package pokecube.alternative;
import java.io.File;
import java.util.logging.Level;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.client.event.ConfigChangedEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import pokecube.core.interfaces.PokecubeMod;
import thut.core.common.config.ConfigBase;
import thut.core.common.config.Configure;
public class Config extends ConfigBase
{
public static Config instance;
private static String[] DEFAULTBADGES = { //@formatter:off
"steel",
"ghost",
"flying",
"ground",
"ice",
"fighting",
"fire",
"bug"
};//@formatter:on
public boolean isEnabled = true;
@Configure(category = "client")
public float scale = 1.0f;
@Configure(category = "client")
public int shift = 0;
@Configure(category = "client")
public String beltOffset = "0 0 -0.6";
@Configure(category = "client")
public String beltOffsetSneak = "0.0 0.13125 -0.105";
@Configure(category = "client")
public boolean cooldownMeter = true;
@Configure(category = "client")
public boolean overrideGui = true;
@Configure(category = "misc")
public boolean autoThrow = true;
@Configure(category = "misc")
public boolean trainerCard = false;
@Configure(category = "misc", needsMcRestart = true)
public boolean use = true;
@Configure(category = "misc")
public String[] badgeOrder = { //@formatter:off
"steel",
"ghost",
"flying",
"ground",
"ice",
"fighting",
"fire",
"bug"
};//@formatter:on
public final float[] offset = new float[3];
public final float[] sneak = new float[3];
public Config()
{
super(null);
}
public Config(File file)
{
super(file, new Config());
instance = this;
MinecraftForge.EVENT_BUS.register(this);
populateSettings();
applySettings();
save();
}
@Override
protected void applySettings()
{
String[] args = beltOffsetSneak.split(" ");
for (int i = 0; i < 3; i++)
{
sneak[i] = Float.parseFloat(args[i]);
}
args = beltOffset.split(" ");
for (int i = 0; i < 3; i++)
{
offset[i] = Float.parseFloat(args[i]);
}
if (badgeOrder.length != DEFAULTBADGES.length)
{
badgeOrder = DEFAULTBADGES;
PokecubeMod.log(Level.WARNING, "badgeOrder must contain 8 badges!");
}
}
@SubscribeEvent
public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent eventArgs)
{
if (eventArgs.getModID().equals(Reference.MODID))
{
populateSettings();
applySettings();
save();
}
}
}
| [
"elpatricimo@gmail.com"
] | elpatricimo@gmail.com |
86cfd6f66af2a7012f074b1b7c593dd3c00ce702 | c2fa04760594de051e51eb1b7102b827424951ae | /YiXin/src/com/miicaa/common/base/CustomPopup.java | 059f2b90894e42c5b3d2b021c6669cbf7583bf27 | [
"Apache-2.0"
] | permissive | glustful/mika | c3d9c7b61f02ac94a7e750ebf84391464054e2a3 | 300c9e921fbefd00734882466819e5987cfc058b | refs/heads/master | 2021-01-10T10:50:44.125499 | 2016-04-06T01:45:26 | 2016-04-06T01:45:26 | 55,567,241 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,864 | java | package com.miicaa.common.base;
import android.app.Activity;
import android.content.Context;
import android.graphics.drawable.BitmapDrawable;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.widget.PopupWindow;
import android.widget.PopupWindow.OnDismissListener;
import android.widget.RelativeLayout;
import com.miicaa.home.R;
/**
*
*/
public class CustomPopup
{
protected PopupWindow mPopupWindow = null;
protected View mRoot = null;
protected int height = RelativeLayout.LayoutParams.WRAP_CONTENT;
protected OnCustomDismissListener listener;
public View getmRoot() {
return mRoot;
}
public void setmRoot(View mRoot) {
this.mRoot = mRoot;
}
public void setmRoot(int layoutId) {
mRoot = LayoutInflater.from(mContext).inflate(layoutId, null);
}
protected Context mContext = null;
private static Builder mBuilder;
public static Builder builder(Context context)
{
mBuilder = new Builder(context);
return mBuilder;
}
private CustomPopup(Context context)
{
this.mContext = context;
}
private void DrawContent()
{
//mRoot.measure(0, 0);
mPopupWindow = new PopupWindow(mRoot, LayoutParams.MATCH_PARENT, height, false);
mPopupWindow.setWidth(LayoutParams.MATCH_PARENT);
mPopupWindow.setHeight(height);
mPopupWindow.setBackgroundDrawable(new BitmapDrawable());
mPopupWindow.setFocusable(true);
mPopupWindow.setOutsideTouchable(true);
mPopupWindow.setOnDismissListener(new OnDismissListener() {
@Override
public void onDismiss() {
if(listener != null){
listener.onDimiss();
}
}
});
mRoot.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
if(event.getAction()==MotionEvent.ACTION_DOWN){
mPopupWindow.dismiss();
}
return true;
}
});
}
public void setOnDismissListener(OnCustomDismissListener l){
this.listener = l;
}
public void show()
{
DrawContent();
Activity activity = (Activity)mContext;
mPopupWindow.setAnimationStyle(R.style.AnimationPreview);
mPopupWindow.showAtLocation(activity.getWindow().getDecorView(), Gravity.BOTTOM, 0, 0);
}
public void show(View parentView, int gravity, int x, int y) {
DrawContent();
mPopupWindow.setAnimationStyle(R.style.AnimationPreview);
mPopupWindow.showAtLocation(parentView, gravity, x, y);
}
public void dismiss(){
mPopupWindow.dismiss();
}
public static class Builder
{
CustomPopup mPopup;
public Builder (Context context)
{
mPopup = new CustomPopup(context);
}
public Builder setContentView(int layoutId){
mPopup.setmRoot(layoutId);
return this;
}
public Builder setContentView(View layout){
mPopup.setmRoot(layout);
return this;
}
public Builder setOnDismissListener(OnCustomDismissListener l){
mPopup.setOnDismissListener(l);
return this;
}
public void show()
{
mPopup.show();
}
public void show(View parentView, int gravity, int x, int y)
{
mPopup.show(parentView,gravity,x,y);
}
public void dismiss(){
mPopup.dismiss();
}
public Builder setHeight(int height) {
mPopup.setHeight(height);
return this;
}
}
public void setHeight(int height) {
this.height = height;
}
public interface OnCustomDismissListener{
void onDimiss();
}
}
| [
"852411097@qq.com"
] | 852411097@qq.com |
84a1e17282c38cdb6456113eb3a3353d830fdcfb | a9e188e7af942ac0c2cd103a248147d1f3e95c57 | /annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/customconstraints/CheckCaseValidator.java | a2be60d53367ed75de66268ace0af2b0d57052e9 | [
"Apache-2.0"
] | permissive | RobbinWang/hibernate-validator | 5a0f449e088041fe48054f5c62227d9eaaf4c8e7 | 18edfc0b35447781f72f6756ee50a61bfa9184d9 | refs/heads/master | 2021-01-22T13:08:32.758376 | 2015-06-19T07:09:03 | 2015-06-19T07:12:34 | 38,877,718 | 1 | 0 | null | 2015-07-10T11:45:49 | 2015-07-10T11:45:49 | null | UTF-8 | Java | false | false | 896 | java | /*
* Hibernate Validator, declare and validate application constraints
*
* License: Apache License, Version 2.0
* See the license.txt file in the root directory or <http://www.apache.org/licenses/LICENSE-2.0>.
*/
package org.hibernate.validator.ap.testmodel.customconstraints;
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
public class CheckCaseValidator implements ConstraintValidator<CheckCase, String> {
private CaseMode caseMode;
public void initialize(CheckCase constraintAnnotation) {
this.caseMode = constraintAnnotation.value();
}
public boolean isValid(String object, ConstraintValidatorContext constraintContext) {
if ( object == null ) {
return true;
}
if ( caseMode == CaseMode.UPPER ) {
return object.equals( object.toUpperCase() );
}
else {
return object.equals( object.toLowerCase() );
}
}
}
| [
"hibernate@ferentschik.de"
] | hibernate@ferentschik.de |
3ab4318960e80fec79bb840a02c53c2245a25a52 | 46ec79d01644c07d342fc4d4c40c8d6fecfe73a4 | /app/src/main/java/ru/club/sfera/MarketApp/rests/RestAdapter.java | 691890d22324dba35c6144aef930ae3e061b3f8d | [] | no_license | mick3247652/sfera4 | 6eb40c1d457f338c894f9c7e592567c6d506aa9e | 04bdc93b79733d08719273b37ee980d20dfd0310 | refs/heads/master | 2020-06-23T21:54:23.529016 | 2019-08-03T07:29:11 | 2019-08-03T07:29:11 | 198,764,425 | 0 | 0 | null | 2019-07-25T05:38:15 | 2019-07-25T05:38:15 | null | UTF-8 | Java | false | false | 1,242 | java | package ru.club.sfera.MarketApp.rests;
import ru.club.sfera.BuildConfig;
import ru.club.sfera.MarketApp.Config;
import java.util.concurrent.TimeUnit;
import okhttp3.OkHttpClient;
import okhttp3.logging.HttpLoggingInterceptor;
import okhttp3.logging.HttpLoggingInterceptor.Level;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
public class RestAdapter {
public static ApiInterface createAPI() {
HttpLoggingInterceptor logging = new HttpLoggingInterceptor();
logging.setLevel(Level.BODY);
OkHttpClient.Builder builder = new OkHttpClient.Builder();
builder.connectTimeout(10, TimeUnit.SECONDS);
builder.writeTimeout(10, TimeUnit.SECONDS);
builder.readTimeout(30, TimeUnit.SECONDS);
if(BuildConfig.DEBUG){
builder.addInterceptor(logging);
}
builder.cache(null);
OkHttpClient okHttpClient = builder.build();
Retrofit retrofit = new Retrofit.Builder()
.baseUrl(Config.ADMIN_PANEL_URL + "/")
.addConverterFactory(GsonConverterFactory.create())
.client(okHttpClient)
.build();
return retrofit.create(ApiInterface.class);
}
}
| [
"ofxsite@gmail.com"
] | ofxsite@gmail.com |
d9de22212a78dfae546e686896638ab7d9633a63 | e5b84002cb0224e689e97632a656130248d25047 | /CoreJava/CoreJavaPractice/src/com/package1/Manager.java | 22c8dc4de1b70696b1288e2465e7aa2ca00ed8df | [] | no_license | aadvikm/JAVA_J2EE_REPO | 4a254fda12c6a30b098ac0e04a54f4ee18cfd464 | 689fcfbcea739440795b43ef578b6312a2c144d3 | refs/heads/master | 2020-03-25T07:50:20.677504 | 2018-09-14T04:35:32 | 2018-09-14T04:35:32 | 143,584,253 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,286 | java | package com.package1;
public class Manager {
static int x;
private int salary;
final int MAXSAL =15000;
public Manager() throws TwoManyObject {
x=x+1;
if(x>1){
TwoManyObject too =new TwoManyObject("Sorry, you can not create more than one object.! ");
throw too;
}
}
public int getSalary() throws MaxSalaryAllowed {
if(this.salary >this.MAXSAL){
MaxSalaryAllowed maxSal =new MaxSalaryAllowed("Max Allowed Salary is :"+ MAXSAL);
throw maxSal;
}
else
return salary;
}
public void setSalary(int salary) throws MaxSalaryAllowed {
if(this.salary >this.MAXSAL){
MaxSalaryAllowed maxSal =new MaxSalaryAllowed("Max Allowed Salary is :"+ MAXSAL);
throw maxSal;
}
else
this.salary = salary;
}
public static void main(String[] args) {
try{
Manager m = new Manager();
//Manager m1 =new Manager();(Exception ex: com.package1.TwoManyObject: Sorry, you can not create more than one object.! )
//m.setSalary(16000);//(Exception ex: com.package1.MaxSalaryAllowed: Max Allowed Salary is :15000)
m.setSalary(13000);
System.out.println("Salary :"+ m.getSalary());
}catch(Exception ex){
ex.printStackTrace();
System.out.println("Exception ex: "+ex);
}
}
}
| [
"Brindha@192.168.0.17"
] | Brindha@192.168.0.17 |
13822b925ecf2efb3b658172dc71fdfd0abe3d8e | eb3a129479a5ea1bc722ffca10921c81b025f380 | /cc-kle/src/main/java/cc/creativecomputing/kle/trajectorie/StpData.java | a9d890407f0ced486fd08f62ae3173f5caf67976 | [] | no_license | texone/creativecomputing | 855fe4116322c17aff576020f7c1ba11c3dc30dd | c276d2060a878f115db29bb7d2e7419f5de33e0a | refs/heads/master | 2022-01-25T09:36:11.280953 | 2022-01-11T19:51:48 | 2022-01-11T19:51:48 | 42,046,027 | 8 | 3 | null | 2019-11-02T15:04:26 | 2015-09-07T10:10:58 | Java | UTF-8 | Java | false | false | 173 | java | package cc.creativecomputing.kle.trajectorie;
public class StpData {
public double position;
public double velocity;
public double acceleration;
public double jerk;
}
| [
"info@texone.org"
] | info@texone.org |
dd3cad3fd9474c5fab6b023e2ea5ddef0c2e1762 | edbdea4feed4f39977215eb11bb0f0d877b53996 | /myBatis/src/main/java/com/wjs/mybatis/sqlparse/model/SelectList.java | 14f52487238b013238e0742a198ddd0c22084abf | [] | no_license | wjs1989/mycore | b787b44f41635ef6bcf8db6f98fa206eb68b6996 | 0050c96ab14c23940ca462d7f6b6b59631cff06c | refs/heads/master | 2022-06-27T18:27:31.262146 | 2020-09-02T07:53:15 | 2020-09-02T07:53:15 | 252,192,157 | 0 | 0 | null | 2022-06-21T03:06:57 | 2020-04-01T14:04:55 | Java | UTF-8 | Java | false | false | 758 | java | /**
* Copyright 2020 bejson.com
*/
package com.wjs.mybatis.sqlparse.model;
public class SelectList {
private String column;
private String symbol;
private String val;
private String varia;
public String getColumn() {
return column;
}
public void setColumn(String column) {
this.column = column;
}
public String getSymbol() {
return symbol;
}
public void setSymbol(String symbol) {
this.symbol = symbol;
}
public String getVal() {
return val;
}
public void setVal(String val) {
this.val = val;
}
public String getVaria() {
return varia;
}
public void setVaria(String varia) {
this.varia = varia;
}
} | [
"wenjs001@163.com"
] | wenjs001@163.com |
04fa38ebcd4375d2ea9be5493716ff6d58234c1a | d1a6d1e511df6db8d8dd0912526e3875c7e1797d | /genny_JavaWithoutLambdasApi21_ReducedClassCount/applicationModule/src/main/java/applicationModulepackageJava0/Foo701.java | 9f977d0c7b27ba21ea84395967fcf74ea5bb5960 | [] | no_license | NikitaKozlov/generated-project-for-desugaring | 0bc1443ab3ddc84cd289331c726761585766aea7 | 81506b3711004185070ca4bb9a93482b70011d36 | refs/heads/master | 2020-03-20T00:35:06.996525 | 2018-06-12T09:30:37 | 2018-06-12T09:30:37 | 137,049,317 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 506 | java | package applicationModulepackageJava0;
public class Foo701 {
public void foo0() {
new applicationModulepackageJava0.Foo700().foo9();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
public void foo4() {
foo3();
}
public void foo5() {
foo4();
}
public void foo6() {
foo5();
}
public void foo7() {
foo6();
}
public void foo8() {
foo7();
}
public void foo9() {
foo8();
}
}
| [
"nikita.e.kozlov@gmail.com"
] | nikita.e.kozlov@gmail.com |
613f8fe05348665aa546bbf6b8609937c16aef48 | 3168a667c28dfc428f678e220152ef97bda2c3dd | /src/main/java/cn/com/evo/cms/web/controller/pay/WelfareDiscountController.java | 2df347439c582b88428eefac77a1eb72cae1fd4e | [] | no_license | jooejooe/evo_spider | 61396155e606b10a9709cda458e5b0ae21857bf5 | 78dfb6f28c9e46fb22a60eae7cbc5c52de2a6e3d | refs/heads/master | 2023-05-09T22:22:51.032013 | 2020-05-12T05:35:58 | 2020-05-12T05:35:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,766 | java | package cn.com.evo.cms.web.controller.pay;
import cn.com.evo.cms.domain.entity.pay.WelfareDiscount;
import cn.com.evo.cms.domain.vo.cms.WelfareDiscountVo;
import cn.com.evo.cms.service.pay.WelfareDiscountService;
import com.frameworks.core.logger.annotation.RunLogger;
import com.frameworks.core.web.controller.BaseController;
import com.frameworks.core.web.page.Pager;
import com.frameworks.core.web.result.DataResult;
import com.frameworks.core.web.result.MsgResult;
import com.frameworks.core.web.search.DynamicSpecifications;
import com.google.common.collect.Lists;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.dozer.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
@Controller
@RequestMapping("/productCharge/discount/welfareDiscount")
public class WelfareDiscountController extends BaseController {
private static final String VIEW_PAGE = "cms/productCharge/discount/welfareDiscount/view";
private static final String SELECT_PAGE = "cms/productCharge/discount/welfareDiscount/select";
private static final String FORM_PAGE = "cms/productCharge/discount/welfareDiscount/form";
@Autowired
private WelfareDiscountService WelfareDiscountService;
@Autowired
private Mapper mapper;
protected WelfareDiscountService getService() {
return WelfareDiscountService;
}
@RequiresPermissions(value = {"ProductCharge:Discount:WelfareDiscount:show"})
@RequestMapping(value = "", method = {RequestMethod.GET})
public ModelAndView show(HttpServletRequest request) {
return new ModelAndView(VIEW_PAGE);
}
@RequestMapping(value = "/select", method = {RequestMethod.GET})
public ModelAndView videoSelect(HttpServletRequest request) {
ModelAndView mav = new ModelAndView(SELECT_PAGE);
return mav;
}
@RequiresPermissions(value = {"ProductCharge:Discount:WelfareDiscount:search"})
@RequestMapping(value = "/list", method = {RequestMethod.POST}, produces = {MediaType.APPLICATION_JSON_VALUE})
@ResponseBody
public DataResult list(HttpServletRequest request, Pager webPage) {
DataResult dataRet = new DataResult();
try {
Specification<WelfareDiscount> specification = DynamicSpecifications.bySearchFilter(request, WelfareDiscount.class, null);
List<WelfareDiscount> entities = getService().findByCondition(specification, webPage);
List<WelfareDiscountVo> lstVo = Lists.newArrayList();
for (WelfareDiscount entity : entities) {
WelfareDiscountVo vo = mapper.map(entity, WelfareDiscountVo.class);
lstVo.add(vo);
}
dataRet.pushOk("获取数据列表成功!");
dataRet.setTotal(webPage.getTotalCount());
dataRet.setRows(lstVo);
} catch (Exception e) {
dataRet.pushError("获取数据列表失败!");
logger.error("获取数据列表异常!", e);
}
return dataRet;
}
@RequiresPermissions(value = {"ProductCharge:Discount:WelfareDiscount:show"})
@RequestMapping(value = "/add", method = {RequestMethod.GET})
public ModelAndView add(HttpServletRequest request) {
ModelAndView mav = new ModelAndView(FORM_PAGE);
return mav;
}
@RunLogger(value = "添加", isSaveRequest = true)
@RequiresPermissions(value = {"ProductCharge:Discount:WelfareDiscount:add"})
@RequestMapping(value = "/add", method = {RequestMethod.POST}, produces = {MediaType.APPLICATION_JSON_VALUE})
@ResponseBody
public MsgResult store(WelfareDiscount entity) {
MsgResult msgRet = new MsgResult();
try {
getService().save(entity);
msgRet.pushOk("添加成功!");
} catch (Exception e) {
msgRet.pushError("添加失败:" + e.getMessage());
logger.error("添加时,发生异常!", e);
}
return msgRet;
}
@RequiresPermissions(value = {"ProductCharge:Discount:WelfareDiscount:show"})
@RequestMapping(value = "/edit/{id}", method = {RequestMethod.GET})
public ModelAndView edit(@PathVariable("id") String id) {
ModelAndView mav = new ModelAndView(FORM_PAGE);
WelfareDiscount entity = getService().findById(id);
mav.addObject("entity", entity);
return mav;
}
@RunLogger(value = "编辑", isSaveRequest = true)
@RequiresPermissions(value = {"ProductCharge:Discount:WelfareDiscount:modify"})
@RequestMapping(value = "/edit", method = {RequestMethod.POST}, produces = {MediaType.APPLICATION_JSON_VALUE})
@ResponseBody
public MsgResult modify(WelfareDiscount entity) {
MsgResult msgRet = new MsgResult();
try {
getService().update(entity);
msgRet.pushOk("修改成功!");
} catch (Exception e) {
msgRet.pushError("修改失败:" + e.getMessage());
logger.error("修改时,发生异常!", e);
}
return msgRet;
}
@RunLogger(value = "删除", isSaveRequest = true)
@RequiresPermissions(value = {"ProductCharge:Discount:WelfareDiscount:remove"})
@RequestMapping(value = "/remove/{id}", method = {RequestMethod.POST}, produces = {
MediaType.APPLICATION_JSON_VALUE})
@ResponseBody
public MsgResult remove(@PathVariable("id") String id) {
MsgResult msgRet = new MsgResult();
try {
getService().deleteById(id);
msgRet.pushOk("删除成功!");
} catch (Exception e) {
msgRet.pushError("删除失败:" + e.getMessage());
logger.error("删除时,发生异常!", e);
}
return msgRet;
}
@RunLogger(value = "批量删除", isSaveRequest = true)
@RequiresPermissions(value = {"ProductCharge:Discount:WelfareDiscount:remove"})
@RequestMapping(value = "/remove", method = {RequestMethod.POST}, produces = {MediaType.APPLICATION_JSON_VALUE})
@ResponseBody
public MsgResult remove(@RequestParam("ids[]") String[] ids) {
MsgResult msgRet = new MsgResult();
try {
getService().deleteByIds(ids);
msgRet.pushOk("批量删除成功!");
} catch (Exception e) {
msgRet.pushError("批量删除失败:" + e.getMessage());
logger.error("批量删除时,发生异常!", e);
}
return msgRet;
}
}
| [
"liuhailong927@sina.com"
] | liuhailong927@sina.com |
eb6b159d5f9cc099f85d5254b8e767d4cbb8cb99 | 144044f9282c50253a75bd8d5c23f619ad38fdf8 | /biao/biao-reactive-data/src/main/java/com/biao/reactive/data/mongo/service/CardService.java | 438ebce9a9f34a66ff8b2859e3df929c646a5f18 | [] | no_license | clickear/biao | ba645de06b4e92b0539b05404c061194669f4570 | af71fd055c4ff3aa0b767a0a8b4eb74328e00f6f | refs/heads/master | 2020-05-16T15:47:33.675136 | 2019-09-25T08:20:28 | 2019-09-25T08:20:28 | 183,143,104 | 0 | 0 | null | 2019-04-24T03:46:28 | 2019-04-24T03:46:28 | null | UTF-8 | Java | false | false | 729 | java | /**
*
*/
package com.biao.reactive.data.mongo.service;
import com.biao.reactive.data.mongo.domain.Card;
import java.util.List;
import java.util.Optional;
public interface CardService {
/**
* 保存文件
*
* @param Card
* @return
*/
Card saveCard(Card card);
/**
* 删除文件
*
* @param Card
* @return
*/
void removeCard(String id);
/**
* 根据id获取文件
*
* @param Card
* @return
*/
Optional<Card> getCardById(String id);
/**
* 分页查询,按上传时间降序
*
* @param pageIndex
* @param pageSize
* @return
*/
List<Card> listCardByPage(int pageIndex, int pageSize);
}
| [
"1072163919@qq.com"
] | 1072163919@qq.com |
799969711b3e408c2f569f73f154775788442012 | 9c00688a804f059fa128cc929ec5523351731b3e | /framework/entity/src/com/hanlin/fadp/entity/config/model/EntityEcaReader.java | b53778157fa6885b27f7f03b810237d10cb58eb6 | [] | no_license | yangrui110/asunerp | f37b4c9f425cd67c9dd6fc35cac124ae9f89e241 | 3f702ce694b7b7bd6df77a60cd6578a8e1744bb5 | refs/heads/master | 2020-05-07T12:45:16.575197 | 2019-04-10T07:46:41 | 2019-04-10T07:46:41 | 180,295,937 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,839 | java |
package com.hanlin.fadp.entity.config.model;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import com.hanlin.fadp.base.lang.ThreadSafe;
import com.hanlin.fadp.base.util.UtilXml;
import com.hanlin.fadp.entity.GenericEntityConfException;
import org.w3c.dom.Element;
/**
* An object that models the <code><entity-eca-reader></code> element.
*
* @see <code>entity-config.xsd</code>
*/
@ThreadSafe
public final class EntityEcaReader {
private final String name; // type = xs:string
private final List<Resource> resourceList; // <resource>
EntityEcaReader(Element element) throws GenericEntityConfException {
String lineNumberText = EntityConfig.createConfigFileLineNumberText(element);
String name = element.getAttribute("name").intern();
if (name.isEmpty()) {
throw new GenericEntityConfException("<entity-eca-reader> element name attribute is empty" + lineNumberText);
}
this.name = name;
List<? extends Element> resourceElementList = UtilXml.childElementList(element, "resource");
if (resourceElementList.isEmpty()) {
this.resourceList = Collections.emptyList();
} else {
List<Resource> resourceList = new ArrayList<Resource>(resourceElementList.size());
for (Element resourceElement : resourceElementList) {
resourceList.add(new Resource(resourceElement));
}
this.resourceList = Collections.unmodifiableList(resourceList);
}
}
/** Returns the value of the <code>name</code> attribute. */
public String getName() {
return this.name;
}
/** Returns the <code><resource></code> child elements. */
public List<Resource> getResourceList() {
return this.resourceList;
}
}
| [
"“Youremail@xxx.com”"
] | “Youremail@xxx.com” |
f4ba69e05da94b8c6ecd177efd6dceaf7c875c87 | 7fdc7740a7b4958e26f4bdd0c67e2f33c9d032ab | /Handbook-Java/src/main/java/com/handbook/java/designmode/factory/YiLi.java | d4f15e46c782baa2ea28d758b184b3daed30cae3 | [] | no_license | lysjava1992/javabase | 9290464826d89c0415bb7c6084aa649de1496741 | 9d403aae8f20643fe1bf370cabcdd93164ea604b | refs/heads/master | 2023-06-22T02:25:21.573301 | 2021-12-12T03:35:36 | 2021-12-12T03:35:36 | 216,582,761 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 356 | java | package com.handbook.java.designmode.factory;
/**
* 天行健,君子以自强不息
* 地势坤,君子以厚德载物
*
* @ClassName YiLi
* @Description TODO
* @Author Mr.Luan
* @Date 2020/1/11 11:23
* @Version 1.0
**/
public class YiLi implements Milk {
@Override
public String createMilke() {
return "伊利牛奶";
}
}
| [
"763644568@qq.com"
] | 763644568@qq.com |
77a110edaa45646871ace2505dfda4c15a0add8a | df6b4d2a5dac69c2a164e66fc9e9f357bcab2a1d | /app/src/main/java/com/haotang/pet/adapter/SerchBeauResultAdapter.java | 2220aa447ff3f9ee0520d51a7e83cdf104fe493a | [] | no_license | freetest/pet_android_new | ef075627aa53e5456ccd3c77fe28254a3fe8c2c2 | 6d07ee31436bd519f6369c5783fd7198c86dbd2b | refs/heads/master | 2023-03-16T04:26:02.457589 | 2020-06-04T10:43:17 | 2020-06-04T10:43:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,279 | java | package com.haotang.pet.adapter;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.haotang.pet.R;
import com.haotang.pet.entity.Beautician;
import com.haotang.pet.util.GlideUtil;
import com.haotang.pet.util.Utils;
import com.haotang.pet.view.NiceImageView;
import java.util.List;
/**
* <p>Title:${type_name}</p>
* <p>Description:</p>
* <p>Company:北京昊唐科技有限公司</p>
*
* @author 姜谷蓄
* @date2020-04-8
*/
public class SerchBeauResultAdapter extends BaseQuickAdapter<Beautician, BaseViewHolder> {
public SerchBeauResultAdapter(int layoutResId, List<Beautician> data) {
super(layoutResId, data);
}
@Override
protected void convert(final BaseViewHolder helper, final Beautician item) {
TextView tv_item_serchbeau_name = helper.getView(R.id.tv_searchbeauty_name);
NiceImageView iv_item_serchbeau_img = helper.getView(R.id.nv_searchbeauty_head);
ImageView iv_item_serchbeau_jb = helper.getView(R.id.iv_item_serchbeau_jb);
TextView tv_item_ordernum = helper.getView(R.id.tv_searchbeauty_order);
TextView tv_item_good = helper.getView(R.id.tv_searchbeauty_good);
if (item != null) {
GlideUtil.loadImg(mContext, item.image, iv_item_serchbeau_img, R.drawable.icon_production_default);
Utils.setText(tv_item_serchbeau_name, item.name, "", View.VISIBLE, View.VISIBLE);
Utils.setText(tv_item_ordernum, "服务 "+item.ordernum+"单", "", View.VISIBLE, View.VISIBLE);
Utils.setText(tv_item_good, "好评率 "+item.goodRate, "", View.VISIBLE, View.VISIBLE);
if (item.tid == 1) {
iv_item_serchbeau_jb.setImageResource(R.drawable.icon_serchbeau_level1);
} else if (item.tid == 2) {
iv_item_serchbeau_jb.setImageResource(R.drawable.icon_serchbeau_level2);
} else if (item.tid == 3) {
iv_item_serchbeau_jb.setImageResource(R.drawable.icon_serchbeau_level3);
}
helper.addOnClickListener(R.id.iv_item_serchbeau_yy).addOnClickListener(R.id.nv_searchbeauty_head);
}
}
}
| [
"xvjun@haotang365.com.cn"
] | xvjun@haotang365.com.cn |
be8bc3b9cb28a6c0340bf16e66088d4b4bc6ce21 | 364ab302f80e8e84525b3d5f228033435654dfc7 | /src/command/DeleteCommand.java | f3957484235308b92340d28fea117410a2341669 | [] | no_license | sellyn0607/GMS-Model-2 | 289ec1b62bbcbc94c224289e985065ddc2ec416a | 529abefb7f879299dca7d45bc71718882fc2fc5b | refs/heads/master | 2020-03-26T13:10:44.680593 | 2018-08-03T00:50:54 | 2018-08-03T00:50:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 492 | java | package command;
import javax.servlet.http.HttpServletRequest;
import domain.MemberBean;
import service.MemberServiceImpl;
public class DeleteCommand extends Command {
public DeleteCommand(HttpServletRequest request) {
setRequest(request);
setAction(request.getParameter("action"));
execute();
}
@Override
public void execute() {
MemberServiceImpl.getInstance()
.deleteMember((MemberBean) request.getSession().getAttribute("user"));
request.getSession().invalidate();
}
}
| [
"kstad@naver.com"
] | kstad@naver.com |
8bf4add05a00f5b369a4fdb92ab4b0513fe1659a | bc1fbf89595dc5ddac694e2dde366ec405639567 | /diagnosis-report/src/main/java/com/eeduspace/report/model/ReleaseViewData.java | 4d7531400013bf1c2b1f7fc3048c0cd6fec14a9b | [] | no_license | dingran9/b2b-diagnosis | 5bd9396b45b815fa856d8f447567e81425e67b9e | 147f7bb2ef3f0431638f076281cd74a9489f9c26 | refs/heads/master | 2021-05-06T07:47:14.230444 | 2017-12-18T09:44:08 | 2017-12-18T09:44:08 | 113,966,212 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,903 | java | package com.eeduspace.report.model;
import java.io.Serializable;
import java.util.Date;
/**
* Created by liuhongfei on 2017/9/28.
*/
public class ReleaseViewData implements Serializable{
/**
* 教师的发布记录code
*/
private String code ;
private String diagnosisName;
private Date startTime;
private Date endTime;
private Integer schoolCode;
private String schoolName;
private Integer stageCode;
private Integer gradeCode;
private Integer subjectCode;
private Integer teacherCode;
private String teacherName;
private Integer artType;
public Integer getEcode() {
return ecode;
}
public void setEcode(Integer ecode) {
this.ecode = ecode;
}
private String diagnosisPaperCode;
private Integer diagnosisType;
private Integer isSnapshot;
private String unitCode;
/**
* 报告中发布记录code
*/
private Integer ecode;
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getDiagnosisName() {
return diagnosisName;
}
public void setDiagnosisName(String diagnosisName) {
this.diagnosisName = diagnosisName;
}
public Date getStartTime() {
return startTime;
}
public void setStartTime(Date startTime) {
this.startTime = startTime;
}
public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
public Integer getSchoolCode() {
return schoolCode;
}
public void setSchoolCode(Integer schoolCode) {
this.schoolCode = schoolCode;
}
public String getSchoolName() {
return schoolName;
}
public void setSchoolName(String schoolName) {
this.schoolName = schoolName;
}
public Integer getStageCode() {
return stageCode;
}
public void setStageCode(Integer stageCode) {
this.stageCode = stageCode;
}
public Integer getGradeCode() {
return gradeCode;
}
public void setGradeCode(Integer gradeCode) {
this.gradeCode = gradeCode;
}
public Integer getSubjectCode() {
return subjectCode;
}
public void setSubjectCode(Integer subjectCode) {
this.subjectCode = subjectCode;
}
public Integer getTeacherCode() {
return teacherCode;
}
public void setTeacherCode(Integer teacherCode) {
this.teacherCode = teacherCode;
}
public String getTeacherName() {
return teacherName;
}
public void setTeacherName(String teacherName) {
this.teacherName = teacherName;
}
public Integer getArtType() {
return artType;
}
public void setArtType(Integer artType) {
this.artType = artType;
}
public String getDiagnosisPaperCode() {
return diagnosisPaperCode;
}
public void setDiagnosisPaperCode(String diagnosisPaperCode) {
this.diagnosisPaperCode = diagnosisPaperCode;
}
public Integer getDiagnosisType() {
return diagnosisType;
}
public void setDiagnosisType(Integer diagnosisType) {
this.diagnosisType = diagnosisType;
}
public Integer getIsSnapshot() {
return isSnapshot;
}
public void setIsSnapshot(Integer isSnapshot) {
this.isSnapshot = isSnapshot;
}
public String getUnitCode() {
return unitCode;
}
public void setUnitCode(String unitCode) {
this.unitCode = unitCode;
}
public String getUnitName() {
return unitName;
}
public void setUnitName(String unitName) {
this.unitName = unitName;
}
public Integer getGroupAreaDistrictId() {
return groupAreaDistrictId;
}
public void setGroupAreaDistrictId(Integer groupAreaDistrictId) {
this.groupAreaDistrictId = groupAreaDistrictId;
}
public String getGroupAreaDistrictName() {
return groupAreaDistrictName;
}
public void setGroupAreaDistrictName(String groupAreaDistrictName) {
this.groupAreaDistrictName = groupAreaDistrictName;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Integer getExamType() {
return examType;
}
public void setExamType(Integer examType) {
this.examType = examType;
}
public Integer getReleaseCode() {
return releaseCode;
}
public void setReleaseCode(Integer releaseCode) {
this.releaseCode = releaseCode;
}
public String getReleaseName() {
return releaseName;
}
public void setReleaseName(String releaseName) {
this.releaseName = releaseName;
}
public String getSemester() {
return semester;
}
public void setSemester(String semester) {
this.semester = semester;
}
public Integer getTotalScore() {
return totalScore;
}
public void setTotalScore(Integer totalScore) {
this.totalScore = totalScore;
}
public Integer getDifficultStar() {
return difficultStar;
}
public void setDifficultStar(Integer difficultStar) {
this.difficultStar = difficultStar;
}
private String unitName;
private Integer groupAreaDistrictId;
private String groupAreaDistrictName;
private Date createTime;
private Integer examType;
private Integer releaseCode;
private String releaseName;
private String semester;
private Integer totalScore;
private Integer difficultStar;
private Integer sort;
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
}
| [
"dingran@e-eduspace.com"
] | dingran@e-eduspace.com |
7831dace424a87b2ff37f70d4e70e2f5123a9b8e | c2d8181a8e634979da48dc934b773788f09ffafb | /storyteller/output/storyteller/CommonTranslationRSSExportAction.java | a21c7ea680b3a5f27dbd7986d884354071ef5d83 | [] | no_license | toukubo/storyteller | ccb8281cdc17b87758e2607252d2d3c877ffe40c | 6128b8d275efbf18fd26d617c8503a6e922c602d | refs/heads/master | 2021-05-03T16:30:14.533638 | 2016-04-20T12:52:46 | 2016-04-20T12:52:46 | 9,352,300 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,397 | java | package net.storyteller.web;
import java.io.IOException;
import java.util.Date;
import java.util.Iterator;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import net.storyteller.model.*;
import net.storyteller.model.crud.*;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.criterion.Restrictions;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.web.context.support.WebApplicationContextUtils;
import churchillobjects.rss4j.RssChannel;
import churchillobjects.rss4j.RssChannelItem;
import churchillobjects.rss4j.RssDocument;
import churchillobjects.rss4j.RssDublinCore;
import churchillobjects.rss4j.generator.RssGenerator;
import net.enclosing.util.HibernateSession;
public class CommonTranslationRSSExportAction extends Action{
public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest req,
HttpServletResponse res) throws Exception{
try{
RssDocument objRss=new RssDocument();
objRss.setVersion("1.0");
Session session = new HibernateSession().currentSession(this
.getServlet().getServletContext());
Criteria criteria = session.createCriteria(CommonTranslation.class);
criteria.add(Restrictions.idEq(req.getAttribute("id")));
// ##secoundclass## ##secoundobj## = commonTranslation.get##secoundclass##();
criteria = session.createCriteria(CommonTranslation.class);
// criteria.addOrder(Order.desc("date"));
// criteria.add(Restrictions.eq("##secoundobj##", ##secoundobj##));
criteria.setMaxResults(30);
if(req.getParameter("q") !=null && !req.getParameter("q").equals("")){
criteria.add(Restrictions.like("##aiueo##","%" + new String(req.getParameter("q").getBytes("8859_1"), "UTF-8") + "%"));
}
ChannelBuilder builder = new ChannelBuilder();
ChannelIF newChannel = builder.createChannel("CommonTranslations");
newChannel.setFormat(ChannelFormat.RSS_1_0);
newChannel.setLanguage("ja");
newChannel.setSite(new URL("http://"+req.getServerName()+req.getRequestURI()));
newChannel.setLocation(new URL("http://"+req.getServerName()+req.getRequestURI()));
newChannel.setDescription("CommonTranslations");
newChannel.setSite(new URL("http://"+req.getServerName()+req.getRequestURI()));
newChannel.setLocation(new URL("http://"+req.getServerName()+req.getRequestURI()));
newChannel.setDescription("CommonTranslations");
for (Iterator iter = criteria.list().iterator(); iter.hasNext();) {
CommonTranslation commonTranslation = (CommonTranslation)iter.next();
ItemIF item = new Item();
//item.setDate(new Date());
item.setTitle(commonTranslation.getName());
item.setLink(new URL("http://"+req.getServerName()+req.getRequestURI());
item.setDescription(commonTranslation.getName());
newChannel.addItem(item);
}
StringWriter stringWriter = new StringWriter();
res.setContentType("text/xml;charset=utf-8");
res.setCharacterEncoding("utf-8");
RSS_1_0_Exporter writer = new RSS_1_0_Exporter(stringWriter,"utf-8");
writer.write(newChannel);
res.getWriter().write(stringWriter.toString());
PrintWriter printWriter = new PrintWriter(new File(this.getServlet().getServletContext().getRealPath("CommonTranslationRssExport.xml")),"utf-8");
printWriter.write(stringWriter.toString());
session.flush();
}catch(IOException e){
System.out.println(e.toString());
}finally{
}
return mapping.findForward("success");
}
public String url2link(String string){
return string.replaceAll("(http://|https://){1}[\\w\\.\\-/:]+","<a href='$0'>$0</a>");
}
public String nl2br(String string){
string = string.replaceAll("\\n","<br />");
return string.replaceAll("\\n","<br />");
}
} | [
"toukubo@gmail.com"
] | toukubo@gmail.com |
ec9b62018a7d028e2002d1bd30e0eb02c840ec7a | 793df459501d0113d6acdd41faf590122a242796 | /confu-master/benchmarks/xalan/original_source_from_jdcore/org/apache/xerces/jaxp/validation/ValidatorHelper.java | de671fab14e4c9872f56a4f2a6ede82e231244a1 | [
"Apache-2.0"
] | permissive | tsmart-date/nasac-2017-demo | fc9c927eb6cc88e090066fc351b58c74a79d936e | 07f2d3107f1b40984ffda9e054fa744becd8c8a3 | refs/heads/master | 2021-07-15T21:29:42.245245 | 2017-10-24T14:28:14 | 2017-10-24T14:28:14 | 105,340,725 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 325 | java | package org.apache.xerces.jaxp.validation;
import java.io.IOException;
import javax.xml.transform.Result;
import javax.xml.transform.Source;
import org.xml.sax.SAXException;
abstract interface ValidatorHelper
{
public abstract void validate(Source paramSource, Result paramResult)
throws SAXException, IOException;
}
| [
"liuhan0518@gmail.com"
] | liuhan0518@gmail.com |
6eaaaab4b474f84bc8c170b7c30cc4cad8a1b21c | 5cf9749de043e7af019fc246b63977aae89d039f | /Clan/Clan/src/com/youzu/taobao/main/qqstyle/HotThreadFragment.java | 97c62e5da4870c956e8806fca345a23558a4c051 | [
"Apache-2.0"
] | permissive | raycraft/MyBigApp_Discuz_Android | def12d04bf3318e2a6d711c75a70042f551dcdfc | 6f80f5a260f3cfa1694cab0a39f6034dd49ce7f8 | refs/heads/master | 2021-01-12T04:19:05.602028 | 2016-12-29T05:34:24 | 2016-12-29T05:34:24 | 77,585,600 | 2 | 3 | null | null | null | null | UTF-8 | Java | false | false | 5,046 | java | //package com.youzu.taobao.main.qqstyle;
//
//import android.annotation.SuppressLint;
//import android.os.Bundle;
//import android.view.LayoutInflater;
//import android.view.View;
//import android.view.ViewGroup;
//import android.widget.AdapterView;
//import android.widget.ImageView;
//import android.widget.TextView;
//
//import com.youzu.android.framework.ViewUtils;
//import com.youzu.android.framework.view.annotation.event.OnItemClick;
//import com.youzu.taobao.R;
//import BaseFragment;
//import com.youzu.taobao.base.json.threadview.ThreadJson;
//import com.youzu.taobao.base.json.forum.Thread;
//import com.youzu.taobao.base.net.ClanHttpParams;
//import LoadImageUtils;
//import StringUtils;
//import JumpThreadUtils;
//import ThreadAndArticleItemUtils;
//import ViewHolder;
//import BaseRefreshAdapter;
//import RefreshListView;
//
///**
// * 热点
// *
// * @author wangxi
// */
//public class HotThreadFragment extends BaseFragment {
// private HotThreadAdapter mAdapter;
// private RefreshListView mListView;
// private OnEmptyDataListener mListener;
//
// private static HotThreadFragment fragment;
//
// public static HotThreadFragment getInstance(OnEmptyDataListener listener) {
// if (fragment == null) {
// fragment = new HotThreadFragment(listener);
// }
// return fragment;
// }
//
// @SuppressLint("ValidFragment")
// public HotThreadFragment(OnEmptyDataListener listener) {
// mListener = listener;
// }
//
// public HotThreadFragment() {
// }
//
//
// public void setOnEmptyDataListener(OnEmptyDataListener listener) {
// mListener = listener;
// }
//
// @Override
// public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
// mListView = (RefreshListView) inflater.inflate(R.layout.fragment_list, container, false);
// ViewUtils.inject(this, mListView);
// ClanHttpParams params = new ClanHttpParams(getActivity());
// params.addQueryStringParameter("module", "hotthread");
// HotThreadAdapter adapter = new HotThreadAdapter(params);
// mListView.setAdapter(adapter);
// mAdapter = adapter;
// return mListView;
// }
//
// @Override
// public void onResume() {
// super.onResume();
// mAdapter.notifyDataSetChanged();
// }
//
// @OnItemClick(R.id.list)
// public void itemClick(AdapterView<?> parent, View view, int position, long id) {
// Thread thread = (Thread) mAdapter.getItem(position);
//// ClanUtils.showDetail(getActivity(), thread.getTid());
// JumpThreadUtils.gotoThreadDetail(getActivity(), thread.getTid());
// }
//
//
// private class HotThreadAdapter extends BaseRefreshAdapter<ThreadJson> {
// public HotThreadAdapter(ClanHttpParams params) {
// super(params);
// }
//
// @Override
// protected void loadSuccess(int page, ThreadJson result) {
// super.loadSuccess(page, result);
// if (mListener != null && page <= 1 && mData.isEmpty()) {
// mListener.onEmpty();
// }
// }
//
// @Override
// public View getView(int position, View convertView, ViewGroup parent) {
// if (convertView == null) {
// convertView = View.inflate(getActivity(), R.layout.item_hot_thread, null);
// }
// TextView subjectText = ViewHolder.get(convertView, R.id.subject);
// TextView authorText = ViewHolder.get(convertView, R.id.author);
// ImageView photoImage = ViewHolder.get(convertView, R.id.photo);
// TextView num = ViewHolder.get(convertView, R.id.num);
// TextView tvForumName = ViewHolder.get(convertView, R.id.forum_name);
// ImageView iconImage = ViewHolder.get(convertView, R.id.icon);
//
//
// Thread thread = (Thread) getItem(position);
// subjectText.setText(StringUtils.get(thread.getSubject()));
// authorText.setText(StringUtils.get(thread.getAuthor()));
// LoadImageUtils.displayMineAvatar(getActivity(), photoImage, thread.getAvatar());
//
// String forumName = StringUtils.get("forum_name");
// String views = StringUtils.get(thread.getViews());
// String replies = StringUtils.get(thread.getReplies());
//
// if (thread.getAttachment().equals("2")) {
// iconImage.setVisibility(View.VISIBLE);
// } else iconImage.setVisibility(View.GONE);
//
// tvForumName.setText(forumName);
// num.setText(replies + "/" + views);
//
//
// String tid = thread.getTid();
// boolean hasRead = ThreadAndArticleItemUtils.hasRead(getActivity(), tid);
// int colorRes = getActivity().getResources().getColor(hasRead ? R.color.text_black_selected : R.color.text_black_ta_title);
// subjectText.setTextColor(colorRes);
//
// return convertView;
// }
//
// }
//
//
//}
| [
"raycraft@qq.com"
] | raycraft@qq.com |
acef15bae9917b02b98eb4976b83ebd48f074c4e | ca5ec34b43a93eb5da68aefa0ccb3f84767b3e40 | /app/src/main/java/com/example/gcm/NotificationActivity.java | e224b86d369bdd0a57051ac848c5ea7d35f08974 | [] | no_license | AstixIntelligenceManagementSystem/ParasSOSFAIndirect | 56f143e584720c03519c29e1387459092da6328a | 3a7af35959be6b2b5fee7373f16fc74d596529f4 | refs/heads/master | 2020-03-30T04:15:33.021605 | 2018-10-23T11:51:21 | 2018-10-23T11:51:21 | 143,012,246 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,627 | java | package com.example.gcm;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.StringTokenizer;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.telephony.TelephonyManager;
import android.util.DisplayMetrics;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TableLayout;
import android.widget.TableRow;
import android.widget.TextView;
import com.astix.Common.CommonInfo;
import project.astix.com.parassosfaindirect.BaseActivity;
import project.astix.com.parassosfaindirect.PRJDatabase;
import project.astix.com.parassosfaindirect.LauncherActivity;
import project.astix.com.parassosfaindirect.R;
import project.astix.com.parassosfaindirect.StoreSelection;
public class NotificationActivity extends BaseActivity
{
private final static int PLAY_SERVICES_RESOLUTION_REQUEST = 9000;
public TableLayout tbl1_dyntable_For_Notification;
public TableRow tr1PG2;
PRJDatabase dbengine = new PRJDatabase(this);
public int ComeFromActivity=0;
public String imei;
public String date;
public String pickerDate;
public String rID;
public int chkActivity=1;
@Override
protected void onCreate(Bundle savedInstanceState)
{
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_notification);
Intent passedvals = getIntent();
if( getIntent().getExtras() != null)
{
if(getIntent().hasExtra("chkActivity"))
{
chkActivity=0;
String str = getIntent().getStringExtra("msg");
String comeFrom = getIntent().getStringExtra("comeFrom");
ComeFromActivity=Integer.parseInt(comeFrom);
}
}
/*public long inserttblNotificationMstr(String IMEI,String Noti_text,String Noti_DateTime,int Noti_ReadStatus,int Noti_NewOld,
String Noti_ReadDateTime,int Noti_outStat)*/
tbl1_dyntable_For_Notification = (TableLayout) findViewById(R.id.dyntable_For_Notification);
dbengine.open();
int SerialNo=dbengine.countNoRowIntblNotificationMstr();
System.out.println("Sunil LastNitificationrList SerialNo : "+SerialNo);
//String LastOrderDetail[]=dbengine.fetchAllDataFromtblFirstOrderDetailsOnLastVisitDetailsActivity(storeID);
String LastNitificationrList[]=dbengine.LastNitificationrListDB();
//String LastNitificationrList[]={"10-06-2015_Hi ","11-06-2015_Bye "};
System.out.println("Sunil LastNitificationrList : "+LastNitificationrList.length);
dbengine.close();
LayoutInflater inflater = getLayoutInflater();
DisplayMetrics dm = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(dm);
double x = Math.pow(dm.widthPixels/dm.xdpi,2);
double y = Math.pow(dm.heightPixels/dm.ydpi,2);
double screenInches = Math.sqrt(x+y);
for (int current = 0; current <= (LastNitificationrList.length - 1); current++)
{
final TableRow row = (TableRow)inflater.inflate(R.layout.table_notification, tbl1_dyntable_For_Notification, false);
TextView tv1 = (TextView)row.findViewById(R.id.tvDate);
TextView tv2 = (TextView)row.findViewById(R.id.tvMessage);
if(screenInches>6.5)
{
tv1.setTextSize(14);
tv2.setTextSize(14);
}
else
{
}
//System.out.println("Abhinav Raj LTDdet[current]:"+LTDdet[current]);
StringTokenizer tokens = new StringTokenizer(String.valueOf(LastNitificationrList[current]), "_");
tv1.setText(" "+tokens.nextToken().trim());
tv2.setText(" "+tokens.nextToken().trim());
tbl1_dyntable_For_Notification.addView(row);
}
Button backbutton=(Button)findViewById(R.id.backbutton);
backbutton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Intent submitStoreIntent = new Intent(NotificationActivity.this, LauncherActivity.class);
startActivity(submitStoreIntent);
finish();
}
});
}
@Override
public void onBackPressed() {
// TODO Auto-generated method stub
super.onBackPressed();
if(chkActivity ==1)
{
TelephonyManager tManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
imei = tManager.getDeviceId();
if(CommonInfo.imei.trim().equals(null) || CommonInfo.imei.trim().equals(""))
{
imei = tManager.getDeviceId();
CommonInfo.imei=imei;
}
else
{
imei=CommonInfo.imei.trim();
}
Date currDate = new Date();
SimpleDateFormat currDateFormat = new SimpleDateFormat("dd-MMM-yyyy",Locale.ENGLISH);
date = currDateFormat.format(currDate).toString();
Date date1=new Date();
SimpleDateFormat sdf = new SimpleDateFormat("dd-MMM-yyyy",Locale.ENGLISH);
String passDate = sdf.format(date1).toString();
String fDate = passDate.trim().toString();
dbengine.open();
rID=dbengine.GetActiveRouteID();
dbengine.close();
Intent submitStoreIntent = new Intent(NotificationActivity.this, StoreSelection.class);
submitStoreIntent.putExtra("imei", imei);
submitStoreIntent.putExtra("userDate", date);
submitStoreIntent.putExtra("pickerDate", fDate);
submitStoreIntent.putExtra("rID", rID);
startActivity(submitStoreIntent);
finish();
}
else
{
Intent submitStoreIntent = new Intent(NotificationActivity.this, LauncherActivity.class);
startActivity(submitStoreIntent);
finish();
}
}
}
| [
"astixset2@gmail.com"
] | astixset2@gmail.com |
dcc321dd2fe505b9f8fe2c42bc6700d56140b273 | 0f68c0f88c5cbccd421449ea960db31a798ebf38 | /src/main/java/cn/com/hh/service/mapper/UnblockLotteryConfigMapper.java | 4a23a98a16b43fa7c90ac63dadc351a734630521 | [] | no_license | leimu222/exchange | 0e5c72658f5986d99dc96a6e860444e2624e90e2 | e22bfc530a230ba23088a36b6d86a9a380d7a8ef | refs/heads/master | 2023-01-31T16:19:37.498040 | 2020-12-08T10:30:46 | 2020-12-08T10:30:46 | 319,348,177 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,280 | java | package com.common.api.mapper;
import com.common.api.model.UnblockLotteryConfig;
import java.util.List;
import org.apache.ibatis.annotations.Param;
/**
* @author Gavin Lee
* @version 1.0
* @date 2020-12-08 18:16:09
* Description: [unblock服务实现]
*/
public interface UnblockLotteryConfigMapper{
/**
* 查询unblock
*
* @param id unblockID
* @return unblock
*/
public UnblockLotteryConfig selectUnblockLotteryConfigById(Long id);
/**
* 查询unblock列表
*
* @param unblockLotteryConfig unblock
* @return unblock集合
*/
public List<UnblockLotteryConfig> selectUnblockLotteryConfigList(UnblockLotteryConfig unblockLotteryConfig);
/**
* 新增unblock
*
* @param unblockLotteryConfig unblock
* @return 结果
*/
public int insertUnblockLotteryConfig(UnblockLotteryConfig unblockLotteryConfig);
/**
* 修改unblock
*
* @param unblockLotteryConfig unblock
* @return 结果
*/
public int updateUnblockLotteryConfig(UnblockLotteryConfig unblockLotteryConfig);
/**
* 删除unblock
*
* @param id unblockID
* @return 结果
*/
public int deleteUnblockLotteryConfigById(Long id);
/**
* 批量删除unblock
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteUnblockLotteryConfigByIds(Long[] ids);
}
| [
"2165456@qq.com"
] | 2165456@qq.com |
536cba2d1172f01741542bb2ba31cf7eb8024264 | cda3816a44e212b52fdf1b9578e66a4543445cbb | /trunk/Src/l2next/gameserver/network/clientpackets/RequestAnswerJoinParty.java | 24004f93c0aec8e70d6ecfb5429401661de19f7b | [] | no_license | gryphonjp/L2J | 556d8b1f24971782f98e1f65a2e1c2665a853cdb | 003ec0ed837ec19ae7f7cf0e8377e262bf2d6fe4 | refs/heads/master | 2020-05-18T09:51:07.102390 | 2014-09-16T14:25:06 | 2014-09-16T14:25:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,940 | java | package l2next.gameserver.network.clientpackets;
import l2next.gameserver.model.Player;
import l2next.gameserver.model.Request;
import l2next.gameserver.model.Request.L2RequestType;
import l2next.gameserver.model.party.Party;
import l2next.gameserver.network.serverpackets.ActionFail;
import l2next.gameserver.network.serverpackets.JoinParty;
import l2next.gameserver.network.serverpackets.components.IStaticPacket;
import l2next.gameserver.network.serverpackets.components.SystemMsg;
public class RequestAnswerJoinParty extends L2GameClientPacket
{
private int _response;
@Override
protected void readImpl()
{
if(_buf.hasRemaining())
{
_response = readD();
}
else
{
_response = 0;
}
}
@Override
protected void runImpl()
{
Player activeChar = getClient().getActiveChar();
if(activeChar == null)
{
return;
}
Request request = activeChar.getRequest();
if(request == null || !request.isTypeOf(L2RequestType.PARTY))
{
return;
}
if(!request.isInProgress())
{
request.cancel();
activeChar.sendActionFailed();
return;
}
if(activeChar.isOutOfControl())
{
request.cancel();
activeChar.sendActionFailed();
return;
}
Player requestor = request.getRequestor();
if(requestor == null)
{
request.cancel();
activeChar.sendPacket(SystemMsg.THAT_PLAYER_IS_NOT_ONLINE);
activeChar.sendActionFailed();
return;
}
if(requestor.getRequest() != request)
{
request.cancel();
activeChar.sendActionFailed();
return;
}
// отказ(0) или автоматический отказ(-1)
if(_response <= 0)
{
request.cancel();
requestor.sendPacket(JoinParty.FAIL);
return;
}
if(activeChar.isInOlympiadMode())
{
request.cancel();
activeChar.sendPacket(SystemMsg.A_PARTY_CANNOT_BE_FORMED_IN_THIS_AREA);
requestor.sendPacket(JoinParty.FAIL);
return;
}
if(requestor.isInOlympiadMode())
{
request.cancel();
requestor.sendPacket(JoinParty.FAIL);
return;
}
Party party = requestor.getParty();
if(party != null && party.getMemberCount() >= Party.MAX_SIZE)
{
request.cancel();
activeChar.sendPacket(SystemMsg.THE_PARTY_IS_FULL);
requestor.sendPacket(SystemMsg.THE_PARTY_IS_FULL);
requestor.sendPacket(JoinParty.FAIL);
return;
}
IStaticPacket problem = activeChar.canJoinParty(requestor);
if(problem != null)
{
request.cancel();
activeChar.sendPacket(problem, ActionFail.STATIC);
requestor.sendPacket(JoinParty.FAIL);
return;
}
if(party == null)
{
int itemDistribution = request.getInteger("itemDistribution");
requestor.setParty(party = new Party(requestor, itemDistribution));
}
try
{
activeChar.joinParty(party);
requestor.sendPacket(JoinParty.SUCCESS);
}
finally
{
request.done();
}
}
} | [
"tuningxtreme@108c6750-40d5-47c8-815d-bc471747907c"
] | tuningxtreme@108c6750-40d5-47c8-815d-bc471747907c |
24357cdc8925009a73a60218c0730b02bbcc11b3 | 19fa9ea02ba0174123c601d356aa16bad50047e6 | /src/net/ion/webapp/utils/SaveObject.java | b15255cdc7683c01a9e88990f4bb8d6d791e52a3 | [] | no_license | shsuk/jojesus | 6e337e030ba06cab5ece791f26320ae6f1b967f2 | a93386a6ba2692cb2ef5aaa38fb0f899cf93669e | refs/heads/master | 2020-03-30T00:19:10.437031 | 2016-02-18T02:51:19 | 2016-02-18T02:51:19 | 22,201,431 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,450 | java | package net.ion.webapp.utils;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.HashMap;
import java.util.Map;
public class SaveObject {
private static String root = "";
public static void setSavePath(String savePath){
root = savePath + "/";
}
public static void main(String[] args)throws Exception {
Map<String, String> m = new HashMap<String, String>();
m.put("sss", "sdsdsd");
m.put("sss1", "sdsdsd1");
m.put("sss2", "sdsdsd2");
save("test", m);
Map<String, String> m1 = (Map<String, String>)load("test", HashMap.class);
System.out.println(m1);
}
public static void save(String key, Object obj) throws Exception {
FileOutputStream fos = null;
ObjectOutputStream oos = null;
try {
String fname = obj.getClass().getName();
fos = new FileOutputStream(root + fname+"."+key);
oos = new ObjectOutputStream(fos);
oos.writeObject(obj);
} finally{
oos.close();
}
}
public static Object load(String key, Class clazz) throws Exception {
FileInputStream fis = null;
ObjectInputStream ois = null;
Object obj = null;
try {
clazz.getPackage();
fis = new FileInputStream(root + clazz.getName()+"."+key);
ois = new ObjectInputStream(fis);
obj = ois.readObject();
} finally{
ois.close();
}
return obj;
}
}
| [
"Administrator@MSDN-SPECIAL"
] | Administrator@MSDN-SPECIAL |
ce14a5247ccdd40e4305456ffc9e61e8efc643fa | 7ca7e10da17f8df1bb892a4b62a4e724a4ccb576 | /src/main/java/ml/socshared/stat/domain/response/SentryEventResponse.java | 5f076316504f3dbeb3dcbe41940874b680ad7d3d | [] | no_license | SocShared/system-statistic-service | e9c572073c9392485c3fa89aedf5cadf5e55b05d | acc3244a166d915193c57f6f65f1c51380d155c7 | refs/heads/master | 2022-11-05T07:58:39.980787 | 2020-06-25T01:45:52 | 2020-06-25T01:45:52 | 260,529,838 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 823 | java | package ml.socshared.stat.domain.response;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Getter;
import lombok.Setter;
import ml.socshared.stat.config.CustomLocalDateTimeSerializer;
import java.time.LocalDateTime;
@Getter
@Setter
@JsonInclude(JsonInclude.Include.NON_NULL)
public class SentryEventResponse {
private String eventID;
private String projectID;
private String groupID;
private String message;
private String title;
@JsonSerialize(using = CustomLocalDateTimeSerializer.class)
private LocalDateTime dateCreated;
@JsonSerialize(using = CustomLocalDateTimeSerializer.class)
private LocalDateTime dateReceived;
private Object context;
private Object tags;
private Long size;
}
| [
"vladovchinnikov950@gmail.com"
] | vladovchinnikov950@gmail.com |
7a59e79f6da5bf8727c6a224c0675526474f004b | 92dd6bc0a9435c359593a1f9b309bb58d3e3f103 | /src/hackerRank/Algorithms/Sorting/_05RunningTimeOfAlgorithms.java | 762b012aab1491885825bffc2b1092d6bd8b50f8 | [
"MIT"
] | permissive | darshanhs90/Java-Coding | bfb2eb84153a8a8a9429efc2833c47f6680f03f4 | da76ccd7851f102712f7d8dfa4659901c5de7a76 | refs/heads/master | 2023-05-27T03:17:45.055811 | 2021-06-16T06:18:08 | 2021-06-16T06:18:08 | 36,981,580 | 3 | 3 | null | null | null | null | UTF-8 | Java | false | false | 753 | java | package hackerRank.Algorithms.Sorting;
import java.util.Scanner;
/*
* Link:https://www.hackerrank.com/challenges/runningtime
*/
public class _05RunningTimeOfAlgorithms {
public static void insertionSort(int[] A){
for(int i = 1; i < A.length; i++){
int value = A[i];
int j = i - 1;
while(j >= 0 && A[j] > value){
A[j + 1] = A[j];
j = j - 1;
}
A[j + 1] = value;
}
printArray(A);
}
static void printArray(int[] ar) {
for(int n: ar){
System.out.print(n+" ");
}
}
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int[] ar = new int[n];
for(int i=0;i<n;i++){
ar[i]=in.nextInt();
}
insertionSort(ar);
}
}
| [
"hsdars@gmail.com"
] | hsdars@gmail.com |
7d477087927cacd1423151254552278b2967b4e5 | 5dc5101200a83e281089813cae785750b502c8db | /RequestMethod/src/kr/co/softcampus/controller/TestController.java | 29cb31187acc640a5f2202aab11873cb09dc5975 | [] | no_license | kho903/Spring_MVC5 | c0000e7cf6ca62cef226d22650ff0e4a94053504 | be564bb297baba929405e7b6b033b604ac0ac5c3 | refs/heads/master | 2023-05-28T14:51:36.909373 | 2021-06-10T12:37:26 | 2021-06-10T12:37:26 | 356,515,731 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,441 | java | package kr.co.softcampus.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@Controller
public class TestController {
@RequestMapping(value="/test1", method = RequestMethod.GET)
public String test1_get() {
return "test1";
}
@RequestMapping(value = "/test2", method = RequestMethod.POST)
public String test2_post() {
return "test2";
}
@RequestMapping(value = "/test3", method = RequestMethod.GET)
public String test3_get() {
return "test3_get";
}
@RequestMapping(value = "/test3", method = RequestMethod.POST)
public String test3_post() {
return "test3_post";
}
@GetMapping("/test4")
public String test4() {
return "test4";
}
@PostMapping("/test5")
public String test5() {
return "test5";
}
@GetMapping("/test6")
public String test6_get() {
return "test6_get";
}
@PostMapping("/test6")
public String test6_post() {
return "test6_post";
}
@RequestMapping(value = "/test7", method = {RequestMethod.GET, RequestMethod.POST})
public String test7() {
return "test7";
}
@GetMapping("/test8")
public String test8_get() {
return test8_post();
}
@PostMapping("/test8")
public String test8_post() {
return "test8";
}
}
| [
"gmldnr2222@naver.com"
] | gmldnr2222@naver.com |
1b3272ac541d538b38d7d4fecc61b398cc03aab5 | f009dc33f9624aac592cb66c71a461270f932ffa | /src/main/java/com/alipay/api/domain/AlipayOpenAuthAppAesGetModel.java | cc17589fc1b845f1e105db6faa8892a3343d46bb | [
"Apache-2.0"
] | permissive | 1093445609/alipay-sdk-java-all | d685f635af9ac587bb8288def54d94e399412542 | 6bb77665389ba27f47d71cb7fa747109fe713f04 | refs/heads/master | 2021-04-02T16:49:18.593902 | 2020-03-06T03:04:53 | 2020-03-06T03:04:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 642 | java | package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 授权应用aes密钥查询
*
* @author auto create
* @since 1.0, 2020-01-08 11:54:16
*/
public class AlipayOpenAuthAppAesGetModel extends AlipayObject {
private static final long serialVersionUID = 7412617774225929742L;
/**
* 商家应用appId
*/
@ApiField("merchant_app_id")
private String merchantAppId;
public String getMerchantAppId() {
return this.merchantAppId;
}
public void setMerchantAppId(String merchantAppId) {
this.merchantAppId = merchantAppId;
}
}
| [
"ben.zy@antfin.com"
] | ben.zy@antfin.com |
b561cd4cddf4c1b61c41cb006931103f9375102f | 918562b552e7c4f15beed899dc0b46e9574e1eb7 | /Examples/src/main/java/com/aspose/note/examples/pages/InsertPages.java | c59050780ac38f3734dec99253533ec2af707c35 | [
"MIT"
] | permissive | ali-salman/Aspose.Note-for-Java | 298872add92561d858657bf9d19768da3dada96a | b45c77d270fa6bbace9e8f32dab1b03461022d54 | refs/heads/master | 2021-01-21T15:34:48.224686 | 2016-05-26T11:48:09 | 2016-05-26T11:48:09 | 59,041,465 | 0 | 0 | null | 2016-05-17T16:50:54 | 2016-05-17T16:50:54 | null | UTF-8 | Java | false | false | 3,772 | java | package com.aspose.note.examples.pages;
import com.aspose.note.*;
import com.aspose.note.examples.Utils;
import java.io.IOException;
import java.nio.file.Path;
public class InsertPages {
public static void main(String... args)
throws IOException {
// create an object of the Document class
Document doc = new Document();
// Initialize Page class object and set its level
Page page1 = new Page(doc);
page1.setLevel((byte) 1);
// Initialize Page class object and set its level
Page page2 = new Page(doc);
page1.setLevel((byte) 2);
// Initialize Page class object and set its level
Page page3 = new Page(doc);
page1.setLevel((byte) 1);
// Adding nodes to first Page
Outline outline = new Outline(doc);
OutlineElement outlineElem = new OutlineElement(doc);
TextStyle textStyle = new TextStyle();
textStyle.setFontColor(java.awt.Color.black);
textStyle.setFontName("David Transparent");
textStyle.setFontSize(10);
RichText text = new RichText(doc);
text.setText("First page.");
text.setDefaultStyle(textStyle);
outlineElem.appendChild(text);
outline.appendChild(outlineElem);
page1.appendChild(outline);
// Adding nodes to second Page
Outline outline2 = new Outline(doc);
OutlineElement outlineElem2 = new OutlineElement(doc);
TextStyle textStyle2 = new TextStyle();
textStyle2.setFontColor(java.awt.Color.black);
textStyle2.setFontName("David Transparent");
textStyle2.setFontSize(10);
RichText text2 = new RichText(doc);
text2.setText("Second page.");
text2.setDefaultStyle(textStyle2);
outlineElem2.appendChild(text2);
outline2.appendChild(outlineElem2);
page2.appendChild(outline2);
// Adding nodes to third Page
Outline outline3 = new Outline(doc);
OutlineElement outlineElem3 = new OutlineElement(doc);
TextStyle textStyle3 = new TextStyle();
textStyle3.setFontColor(java.awt.Color.black);
textStyle3.setFontName("Broadway");
textStyle3.setFontSize(10);
RichText text3 = new RichText(doc);
text3.setText("Third page.");
text3.setDefaultStyle(textStyle3);
outlineElem3.appendChild(text3);
outline3.appendChild(outlineElem3);
page3.appendChild(outline3);
// Add pages to the OneNote Document
doc.appendChild(page1);
doc.appendChild(page2);
doc.appendChild(page3);
Path outputBmp = Utils.getPath(InsertPages.class, "Output.bmp");
doc.save(outputBmp.toString(), SaveFormat.Bmp);
System.out.printf("File Saved: %s\n", outputBmp);
Path outputPdf = Utils.getPath(InsertPages.class, "Output.pdf");
doc.save(outputPdf.toString(), SaveFormat.Pdf);
System.out.printf("File Saved: %s\n", outputPdf);
Path outputGif = Utils.getPath(InsertPages.class, "Output.gif");
doc.save(outputGif.toString(), SaveFormat.Gif);
System.out.printf("File Saved: %s\n", outputGif);
Path outputJpg = Utils.getPath(InsertPages.class, "Output.jpg");
doc.save(outputJpg.toString(), SaveFormat.Jpeg);
System.out.printf("File Saved: %s\n", outputJpg);
Path outputPng = Utils.getPath(InsertPages.class, "Output.png");
doc.save(outputPng.toString(), SaveFormat.Png);
System.out.printf("File Saved: %s\n", outputPng);
Path outputTiff = Utils.getPath(InsertPages.class, "Output.tiff");
doc.save(outputTiff.toString(), SaveFormat.Tiff);
System.out.printf("File Saved: %s\n", outputTiff);
}
}
| [
"saqib@masood.pk"
] | saqib@masood.pk |
cd392dff4c5eef9605d4a8361121922f03b8aa28 | 12823b910d5eb51d5907f38a5de0c4648ae27308 | /src/io/trivium/dep/com/google/common/util/concurrent/ListenableFutureTask.java | 18d13c2bad04b223b763d802bb811ce131625eab | [
"Apache-2.0"
] | permissive | JensWalter/trivium | 428330f4cb09229312a601581c380a67f77b7467 | e0000bbe59429b1b90f2e1b208fb3be222927a90 | refs/heads/master | 2021-05-31T10:15:47.682179 | 2016-03-26T13:29:25 | 2016-03-26T13:29:25 | 30,550,214 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,027 | java | /*
* Copyright (C) 2008 The Guava Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.trivium.dep.com.google.common.util.concurrent;
import java.util.concurrent.Callable;
import java.util.concurrent.Executor;
import java.util.concurrent.FutureTask;
import javax.annotation.Nullable;
/**
* A {@link FutureTask} that also implements the {@link ListenableFuture}
* interface. Unlike {@code FutureTask}, {@code ListenableFutureTask} does not
* provide an overrideable {@link FutureTask#done() done()} method. For similar
* functionality, call {@link #addListener}.
*
* <p>
*
* @author Sven Mawson
* @since 1.0
*/
public class ListenableFutureTask<V> extends FutureTask<V>
implements ListenableFuture<V> {
// TODO(cpovirk): explore ways of making ListenableFutureTask final. There are
// some valid reasons such as BoundedQueueExecutorService to allow extends but it
// would be nice to make it final to avoid unintended usage.
// The execution list to hold our listeners.
private final ExecutionList executionList = new ExecutionList();
/**
* Creates a {@code ListenableFutureTask} that will upon running, execute the
* given {@code Callable}.
*
* @param callable the callable task
* @since 10.0
*/
public static <V> ListenableFutureTask<V> create(Callable<V> callable) {
return new ListenableFutureTask<V>(callable);
}
/**
* Creates a {@code ListenableFutureTask} that will upon running, execute the
* given {@code Runnable}, and arrange that {@code get} will return the
* given result on successful completion.
*
* @param runnable the runnable task
* @param result the result to return on successful completion. If you don't
* need a particular result, consider using constructions of the form:
* {@code ListenableFuture<?> f = ListenableFutureTask.create(runnable,
* null)}
* @since 10.0
*/
public static <V> ListenableFutureTask<V> create(
Runnable runnable, @Nullable V result) {
return new ListenableFutureTask<V>(runnable, result);
}
ListenableFutureTask(Callable<V> callable) {
super(callable);
}
ListenableFutureTask(Runnable runnable, @Nullable V result) {
super(runnable, result);
}
@Override
public void addListener(Runnable listener, Executor exec) {
executionList.add(listener, exec);
}
/**
* Internal implementation detail used to invoke the listeners.
*/
@Override
protected void done() {
executionList.execute();
}
}
| [
"js.walter@gmx.net"
] | js.walter@gmx.net |
71b2a87235ce88940d085c3782650ceb9e7e48ce | d2402ea937a0330e92ccaf6e1bfd8fc02e1b29c9 | /src/com/ms/silverking/cloud/dht/net/protocol/PutResponseMessageFormat.java | 5c02a3550e0e0f6c69d6c89ddb784033fbb67911 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | duyangzhou/SilverKing | b8880e0527eb6b5d895da4dbcf7a600b8a7786d8 | b1b582f96d3771c01bf8239c64e99869f54bb3a1 | refs/heads/master | 2020-04-29T19:34:13.958262 | 2019-07-25T17:48:17 | 2019-07-25T17:48:17 | 176,359,498 | 0 | 0 | Apache-2.0 | 2019-03-18T19:55:08 | 2019-03-18T19:55:08 | null | UTF-8 | Java | false | false | 514 | java | package com.ms.silverking.cloud.dht.net.protocol;
import com.ms.silverking.numeric.NumConversion;
public class PutResponseMessageFormat extends KeyValueMessageFormat {
// options buffer
public static final int versionSize = NumConversion.BYTES_PER_LONG;
public static final int storageStateSize = 1;
public static final int versionOffset = 0;
public static final int storageStateOffset = versionSize;
public static final int optionBytesSize = versionSize + storageStateSize;
}
| [
"Benjamin.Holst@morganstanley.com"
] | Benjamin.Holst@morganstanley.com |
33b7f1eb32c18c513a89df0b79c738dff70e98ef | 91f71eb339be3627acb62291f4a79afbb611d026 | /src/main/java/me/brunosantana/exam1/package1/Test13.java | 2b9a72a9b764edaa0231272785cbea060cc05a22 | [] | no_license | brunosantanati/1Z0-808 | 69ba0fe553e752df163bcea1649411a29418420c | 4b3b251d016d046f765c6e45e2975f499a0ca50b | refs/heads/master | 2022-03-16T15:18:18.823311 | 2022-02-17T13:35:44 | 2022-02-17T13:35:44 | 242,811,666 | 0 | 0 | null | 2020-10-13T19:48:48 | 2020-02-24T18:30:04 | Java | UTF-8 | Java | false | false | 709 | java | package me.brunosantana.exam1.package1;
public class Test13 {
public static void main(String[] args) {
StringBuilder sb = new StringBuilder();
//System.out.println(sb.append(null).length()); //Unresolved compilation problem: The method append(Object) is ambiguous for the type StringBuilder
/*
* 'append' method is overloaded in StringBuilder class: append(String), append(StringBuffer) and append(char[]) etc.
In this case compiler gets confused as to which method `append(null)` can be tagged because String, StringBuffer and char[] are not related to each other in multilevel inheritance. Hence `sb.append(null)` causes compilation error.
*/
}
}
| [
"bruno.santana.ti@gmail.com"
] | bruno.santana.ti@gmail.com |
c3f226793935a7fe59b68d1bf11984363b9b729d | 54f352a242a8ad6ff5516703e91da61e08d9a9e6 | /Source Codes/CodeJamData/08/44/8.java | 4d12377779ea3041cf5549e2ccd44d5418dd77e0 | [] | no_license | Kawser-nerd/CLCDSA | 5cbd8a4c3f65173e4e8e0d7ed845574c4770c3eb | aee32551795763b54acb26856ab239370cac4e75 | refs/heads/master | 2022-02-09T11:08:56.588303 | 2022-01-26T18:53:40 | 2022-01-26T18:53:40 | 211,783,197 | 23 | 9 | null | null | null | null | UTF-8 | Java | false | false | 1,996 | java | import java.io.*;
import java.util.*;
import java.math.*;
public class Main implements Runnable {
BufferedReader in;
BufferedWriter out;
int n;
boolean vis[];
int perm[];
int result;
String s;
public int calc() {
int res = 1;
char lastChar = s.charAt(perm[0]);
for(int i = 1; i < s.length(); i++) {
if( lastChar != s.charAt(i/n*n + perm[i%n])) {
res++;
lastChar = s.charAt(i/n*n + perm[i%n]);
}
}
return res;
}
public void rec(int dep ){
if( dep == n ) {
result = Math.min(result, calc() );
return;
}
for(int i = 0; i < n; i++) {
if(!vis[i]) {
vis[i] = true;
perm[dep] = i;
rec(dep+1);
vis[i] = false;
}
}
}
public void solve() throws Exception {
n = iread();
vis = new boolean[n];
perm = new int[n];
s = readword();
result = 100000000;
rec(0);
out.write(result + "\n");
}
public int iread() throws IOException {
return Integer.parseInt(readword());
}
public double dread() throws IOException {
return Double.parseDouble(readword());
}
public long lread() throws IOException {
return Long.parseLong(readword());
}
public String readword() throws IOException {
int c = in.read();
while( c >= 0 && c <= ' ' ) {
c = in.read();
}
if( c < 0 ) return "";
StringBuilder builder = new StringBuilder();
while( c > ' ' ) {
builder.append((char)c);
c = in.read();
}
return builder.toString();
}
public void run() {
try {
in = new BufferedReader( new FileReader("input.txt"));
out = new BufferedWriter( new FileWriter("output.txt"));
int tn = iread();
for(int tc = 1; tc <= tn; tc++) {
out.write("Case #" + tc + ": ");
solve();
}
out.flush();
} catch( Exception e ) {
e.printStackTrace();
System.exit(1);
}
}
public static void main(String[] args) {
Locale.setDefault(Locale.US);
new Thread(new Main()).start();
}
}
| [
"kwnafi@yahoo.com"
] | kwnafi@yahoo.com |
eaeb0fb331e7820df1dda51a2736a714aebba90c | bf7b4c21300a8ccebb380e0e0a031982466ccd83 | /middlewareConcepts2014-master/Assignment3/lib/jacorb-3.4/src/generated/org/omg/CosCollection/SortedBagOperations.java | a941af2087034679647e9fa1fa13625bd41a80ae | [] | no_license | Puriakshat/Tuberlin | 3fe36b970aabad30ed95e8a07c2f875e4912a3db | 28dcf7f7edfe7320c740c306b1c0593a6c1b3115 | refs/heads/master | 2021-01-19T07:30:16.857479 | 2014-11-06T18:49:16 | 2014-11-06T18:49:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 432 | java | package org.omg.CosCollection;
/**
* Generated from IDL interface "SortedBag".
*
* @author JacORB IDL compiler V @project.version@
* @version generated at 27-May-2014 20:14:30
*/
public interface SortedBagOperations
extends org.omg.CosCollection.EqualitySortedCollectionOperations
{
/* constants */
/* operations */
int compare(org.omg.CosCollection.SortedBag collector, org.omg.CosCollection.Comparator comparison);
}
| [
"puri.akshat@gmail.com"
] | puri.akshat@gmail.com |
831d14f3c2290c15f5dfb4cc3986648d19e89503 | c56a749b06ed08a1ce4d6ad810a9c62b060c3dd8 | /jeebiz-admin-extras/jeebiz-admin-extras-authz-feature/src/main/java/net/jeebiz/admin/extras/authz/feature/service/IAuthzFeatureOptService.java | ebb93737232976d637532c94dca74a1bf2e843b1 | [
"Apache-2.0"
] | permissive | dvien/jeebiz-admin | 0943e36a5a1f1db50873e72c35cdbe6e254cb651 | 3275ef0122f25c144f3ab92604eb137f19e27666 | refs/heads/master | 2022-01-12T18:29:39.671285 | 2019-06-29T10:39:40 | 2019-06-29T10:39:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 624 | java | /**
* Copyright (C) 2018 Jeebiz (http://jeebiz.net).
* All Rights Reserved.
*/
package net.jeebiz.admin.extras.authz.feature.service;
import java.util.List;
import net.jeebiz.boot.api.service.BaseService;
import net.jeebiz.admin.extras.authz.feature.dao.entities.AuthzFeatureOptModel;
public interface IAuthzFeatureOptService extends BaseService<AuthzFeatureOptModel>{
public List<AuthzFeatureOptModel> getFeatureOpts();
public List<AuthzFeatureOptModel> getFeatureOptList(String featureId, boolean visible);
public int getOptCountByName(String name, String featureId, String optId);
}
| [
"hnxyhcwdl1003@163.com"
] | hnxyhcwdl1003@163.com |
660773098b40ed63452ddbabc4070b0f5df4e5c0 | 22b9c697e549de334ac354dfc1d14223eff99121 | /PaaS_SaaS_Accelerator_RESTFulFacade/XJC_Beans/src/com/oracle/xmlns/apps/crmcommon/interactions/interactionservice/types/CreateInteractionAssociation.java | 6113640e3975db93d2ca9d646893c5c2e11ae874 | [
"BSD-3-Clause"
] | permissive | digideskio/oracle-cloud | 50e0d24e937b3afc991ad9cb418aa2bb263a4372 | 80420e9516290e5d5bfd6c0fa2eaacbc11762ec7 | refs/heads/master | 2021-01-22T13:57:21.947497 | 2016-05-13T06:26:16 | 2016-05-13T06:26:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,343 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2013.10.24 at 02:07:22 PM BST
//
package com.oracle.xmlns.apps.crmcommon.interactions.interactionservice.types;
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;
import com.oracle.xmlns.apps.crmcommon.interactions.interactionservice.InteractionAssociation;
/**
* <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="interactionAssociationWS" type="{http://xmlns.oracle.com/apps/crmCommon/interactions/interactionService/}InteractionAssociation"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"interactionAssociationWS"
})
@XmlRootElement(name = "createInteractionAssociation")
public class CreateInteractionAssociation {
@XmlElement(required = true)
protected InteractionAssociation interactionAssociationWS;
/**
* Gets the value of the interactionAssociationWS property.
*
* @return
* possible object is
* {@link InteractionAssociation }
*
*/
public InteractionAssociation getInteractionAssociationWS() {
return interactionAssociationWS;
}
/**
* Sets the value of the interactionAssociationWS property.
*
* @param value
* allowed object is
* {@link InteractionAssociation }
*
*/
public void setInteractionAssociationWS(InteractionAssociation value) {
this.interactionAssociationWS = value;
}
}
| [
"shailendrapradhan@Shailendras-MacBook-Pro.local"
] | shailendrapradhan@Shailendras-MacBook-Pro.local |
686f744c37399100b80d8c5929ebc06e1086c13b | 575c19e81594666f51cceb55cb1ab094b218f66b | /octopusconsortium/src/main/java/OctopusConsortium/Models/RCSGB/RoleStatusX.java | aa2f7300f415ebc6bce51eb16f04d1e8a030e477 | [
"Apache-2.0"
] | permissive | uk-gov-mirror/111online.ITK-MessagingEngine | 62b702653ea716786e2684e3d368898533e77534 | 011e8cbe0bcb982eedc2204318d94e2bb5d4adb2 | refs/heads/master | 2023-01-22T17:47:54.631879 | 2020-12-01T14:18:05 | 2020-12-01T14:18:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,316 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-257
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.10.24 at 11:01:41 AM BST
//
package OctopusConsortium.Models.RCSGB;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
/**
* <p>Java class for RoleStatus_X.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="RoleStatus_X">
* <restriction base="{urn:hl7-org:v3}cs">
* <enumeration value="nullified"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlEnum
public enum RoleStatusX {
@XmlEnumValue("nullified")
NULLIFIED("nullified");
private final String value;
RoleStatusX(String v) {
value = v;
}
public String value() {
return value;
}
public static RoleStatusX fromValue(String v) {
for (RoleStatusX c: RoleStatusX.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}
| [
"tom.axworthy@nhs.net"
] | tom.axworthy@nhs.net |
862e1a49ddf8cecb46cf9c5328818f5e6ec001a7 | 5bfa881211de55b64fd373b8e0e1455c6395bcf1 | /src/main/java/subaraki/petbuddy/network/PacketSyncOwnInventory.java | c55cecb9b9bd2e906e1938d0d6c8b584c0531522 | [] | no_license | miiton/PetBuddy2016 | 413c927315707fb1c2a63b68dc57f60651ffebeb | 6cb35f7e2bff337d675c7dfc631a426ff8f1799b | refs/heads/master | 2021-09-05T01:39:06.363233 | 2018-01-04T17:51:26 | 2018-01-04T17:51:26 | 118,596,610 | 0 | 0 | null | 2018-01-23T10:45:11 | 2018-01-23T10:45:11 | null | UTF-8 | Java | false | false | 2,623 | java | package subaraki.petbuddy.network;
import io.netty.buffer.ByteBuf;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.network.ByteBufUtils;
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
import subaraki.petbuddy.capability.PetInventory;
import subaraki.petbuddy.capability.PetInventoryCapability;
import subaraki.petbuddy.entity.EntityPetBuddy;
import subaraki.petbuddy.mod.PetBuddy;
public class PacketSyncOwnInventory implements IMessage {
public ItemStack stack[] = new ItemStack[3];
public String petid;
public int skinIndex;
public PacketSyncOwnInventory() {
}
public PacketSyncOwnInventory(EntityPlayer player) {
PetInventory inv = player.getCapability(PetInventoryCapability.CAPABILITY, null);
petid = inv.getPetID() == null ? "null" : Integer.toString(inv.getPetID());
skinIndex = inv.getSkinIndex();
for(int i = 0; i < stack.length; i ++)
stack[i] = inv.getInventoryHandler().getStackInSlot(12+i);
}
@Override
public void fromBytes(ByteBuf buf) {
petid = ByteBufUtils.readUTF8String(buf);
skinIndex = buf.readInt();
for (int i = 0; i < stack.length; i++){
stack[i] = ByteBufUtils.readItemStack(buf);
}
}
@Override
public void toBytes(ByteBuf buf) {
ByteBufUtils.writeUTF8String(buf, petid);
buf.writeInt(skinIndex);
for (int i = 0; i < stack.length; i++) {
ByteBufUtils.writeItemStack(buf, stack[i]);
}
}
public static class PacketSyncOwnInventoryHandler implements IMessageHandler<PacketSyncOwnInventory, IMessage>{
@Override
public IMessage onMessage(PacketSyncOwnInventory message,MessageContext ctx) {
Minecraft.getMinecraft().addScheduledTask(() -> {
EntityPlayer player = PetBuddy.proxy.getClientPlayer();
if(player == null)
return;
PetInventory inv = player.getCapability(PetInventoryCapability.CAPABILITY, null);
inv.setSkinIndex(message.skinIndex);
String id = message.petid;
if(id.equals("null"))
inv.setPetID(null);
else{
inv.setPetID(Integer.parseInt(id));
Entity e = player.world.getEntityByID(Integer.parseInt(id));
if(e instanceof EntityPetBuddy){
((EntityPetBuddy)e).forceIndex(inv.getSkinIndex());
}
}
for (int i = 0; i < message.stack.length; i++){
inv.setStackInSlot(12+i,message.stack[i]);
}
});
return null;
}
}
}
| [
"robbeenaxel@hotmail.com"
] | robbeenaxel@hotmail.com |
a76c083a4172861a8c830f8405785a25a76e5ed7 | a9717fc777628e1cc1d847c23f5408679abfdf5a | /src/sicca-ejb/ejbModule/enums/TitularSuplente.java | adbcc107dcd5fd86a549ba74a3380a4790223073 | [] | no_license | marcosd94/trabajo | da678b69dca30d31a0c167ee76194ea1f7fb62f0 | 00a7b110b4f5f70df7fb83af967d9dcc0e488053 | refs/heads/master | 2021-01-19T02:40:58.253026 | 2016-07-20T18:15:44 | 2016-07-20T18:15:44 | 63,803,756 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,170 | java | package enums;
public enum TitularSuplente {
TITULAR(1, "TITULAR", "T"),
SUPLENTE(2, "SUPLENTE", "S");
private Integer id;
private String descripcion;
private String valor;
private TitularSuplente(Integer id, String descripcion, String valor) {
this.id = id;
this.descripcion = descripcion;
this.valor = valor;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getDescripcion() {
return descripcion;
}
public void setDescripcion(String descripcion) {
this.descripcion = descripcion;
}
public String getValor() {
return valor;
}
public void setValor(String valor) {
this.valor = valor;
}
public static TitularSuplente getTitularSuplentePorId(Integer id) {
for (TitularSuplente func : TitularSuplente.values()) {
if (id == func.getId()) {
return func;
}
}
return null;
}
public static TitularSuplente getTitularSuplentePorValor(String valor) {
for (TitularSuplente func : TitularSuplente.values()) {
if (valor.equals(func.getValor())) {
return func;
}
}
return null;
}
}
| [
"mrcperalta.mp@gmail.com"
] | mrcperalta.mp@gmail.com |
fe053d72a9cbb02d63f611cb540823fcc8d1dff7 | 37c11a7fa33e0461dc2c19ffdbd0c50014553b15 | /app_doctor/src/main/java/com/kmwlyy/doctor/model/httpEvent/Http_getVoiceDetail_Event.java | 2440a59e1c76f98b30a03c7782ed1b8be392e255 | [] | no_license | SetAdapter/KMYYAPP | 5010d4e8a3dd60240236db15b34696bb443914b7 | 57eeba04cb5ae57911d1fa47ef4b2320eb1f9cbf | refs/heads/master | 2020-04-23T13:56:33.078507 | 2019-02-18T04:39:40 | 2019-02-18T04:39:40 | 171,215,008 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 713 | java | package com.kmwlyy.doctor.model.httpEvent;
import android.content.Context;
import com.kmwlyy.core.net.HttpClient;
import com.kmwlyy.core.net.HttpEvent;
import com.kmwlyy.core.net.HttpListener;
import com.kmwlyy.doctor.MyApplication;
import com.kmwlyy.doctor.model.VVConsultDetailBean;
import java.util.HashMap;
/**
* 获取粉丝数
*/
public class Http_getVoiceDetail_Event extends HttpEvent<VVConsultDetailBean> {
public Http_getVoiceDetail_Event(String oPDRegisterID, HttpListener listener) {
super(listener);
mReqAction = "/UserOPDRegisters";
mReqMethod = HttpClient.GET;
mReqParams = new HashMap<>();
mReqParams.put("OPDRegisterID", oPDRegisterID);
}
} | [
"383411934@qq.com"
] | 383411934@qq.com |
d777c3fbd49af14cc2744412a9f748b02d15c6a5 | 10186b7d128e5e61f6baf491e0947db76b0dadbc | /org/apache/commons/collections/functors/ForClosure.java | ec0f71bd632c0afbc695be8f852dd239af06926b | [
"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 | 2,199 | java | /* */ package org.apache.commons.collections.functors;
/* */
/* */ import java.io.Serializable;
/* */ import org.apache.commons.collections.Closure;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class ForClosure
/* */ implements Serializable, Closure
/* */ {
/* */ static final long serialVersionUID = -1190120533393621674L;
/* */ private final int iCount;
/* */ private final Closure iClosure;
/* */
/* */ public static Closure getInstance(int count, Closure closure) {
/* 51 */ if (count <= 0 || closure == null) {
/* 52 */ return NOPClosure.INSTANCE;
/* */ }
/* 54 */ if (count == 1) {
/* 55 */ return closure;
/* */ }
/* 57 */ return new ForClosure(count, closure);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public ForClosure(int count, Closure closure) {
/* 69 */ this.iCount = count;
/* 70 */ this.iClosure = closure;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public void execute(Object input) {
/* 79 */ for (int i = 0; i < this.iCount; i++) {
/* 80 */ this.iClosure.execute(input);
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public Closure getClosure() {
/* 91 */ return this.iClosure;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public int getCount() {
/* 101 */ return this.iCount;
/* */ }
/* */ }
/* Location: /mnt/r/ConTenDoViewer.jar!/org/apache/commons/collections/functors/ForClosure.class
* Java compiler version: 1 (45.3)
* JD-Core Version: 1.1.3
*/ | [
"xiayuanzhong+gpg2020@gmail.com"
] | xiayuanzhong+gpg2020@gmail.com |
263906c3b1f1e604ff95a8373bbd97e8610b6a2e | d26f11c1611b299e169e6a027f551a3deeecb534 | /jface/org/fdesigner/ui/jface/databinding/swt/IWidgetValueProperty.java | a954fa7f6d2dacbca5b13b1f621a84395d8abff4 | [] | no_license | WeControlTheFuture/fdesigner-ui | 1bc401fd71a57985544220b9f9e42cf18db6491d | 62efb51e57e5d7f25654e67ef8b2762311b766b6 | refs/heads/master | 2020-11-24T15:00:24.450846 | 2019-12-27T08:47:23 | 2019-12-27T08:47:23 | 228,199,674 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,498 | java | /*******************************************************************************
* Copyright (c) 2009, 2015 Matthew Hall and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Matthew Hall - initial API and implementation (bug 264286)
*******************************************************************************/
package org.fdesigner.ui.jface.databinding.swt;
import org.eclipse.swt.widgets.Widget;
import org.fdesigner.databinding.observable.value.IObservableValue;
import org.fdesigner.databinding.observable.value.IVetoableValue;
import org.fdesigner.databinding.observable.value.ValueChangingEvent;
import org.fdesigner.databinding.property.value.IValueProperty;
/**
* {@link IValueProperty} for observing an SWT Widget
*
* @param <S> type of the source widget
* @param <T> type of the value of the property
*
* @since 1.3
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IWidgetValueProperty<S extends Widget, T> extends IValueProperty<S, T> {
/**
* Returns an {@link ISWTObservableValue} observing this value property on
* the given widget
*
* @param widget
* the source widget
* @return an observable value observing this value property on the given
* widget
*/
@Override
public ISWTObservableValue<T> observe(S widget);
/**
* Returns an {@link ISWTObservableValue} observing this value property on the
* given widget, which delays notification of value changes until at least
* <code>delay</code> milliseconds have elapsed since that last change event, or
* until a FocusOut event is received from the widget (whichever happens first).
* <p>
* This observable helps to boost performance in situations where an observable
* has computationally expensive listeners (e.g. changing filters in a viewer)
* or many dependencies (master fields with multiple detail fields). A common
* use of this observable is to delay validation of user input until the user
* stops typing in a UI field.
* <p>
* To notify about pending changes, the returned observable fires a stale event
* when the wrapped observable value fires a change event, and remains stale
* until the delay has elapsed and the value change is fired. A call to
* {@link IObservableValue#getValue} while a value change is pending will fire
* the value change immediately, short-circuiting the delay.
* <p>
* Only updates resulting from the observed widget are delayed. Calls directly
* to {@link IObservableValue#setValue} are not, and they cancel pending delayed
* values.
* <p>
* Note that this observable will not forward {@link ValueChangingEvent} events
* from a wrapped {@link IVetoableValue}.
* <p>
* This method is equivalent to
* <code>SWTObservables.observeDelayedValue(delay, observe(widget))</code>.
*
* @param delay the delay in milliseconds.
* @param widget the source widget
* @return an observable value observing this value property on the given
* widget, and which delays change notifications for <code>delay</code>
* milliseconds.
*/
public ISWTObservableValue<T> observeDelayed(int delay, S widget);
}
| [
"491676539@qq.com"
] | 491676539@qq.com |
6535e148eb886482884bee39ef3f98bfc6780594 | 01f1f247fe3fd446e806e7f88604fda7ca7bff48 | /sftp.src/com/jscape/filetransfer/AftpFileTransfer$SecurityMode.java | cbebd4b804e54c95ffa2ae8f4193bd36e031a57f | [] | no_license | DiegoTc/ImageUpload | bba6761ecc8f8e925b0da77fb2dac1c413793db6 | c306b1186d3d2f3d3e64157a337a3f7a3eca9bcd | refs/heads/master | 2016-09-07T18:39:23.469651 | 2014-03-14T20:34:57 | 2014-03-14T20:34:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 242 | java | // INTERNAL ERROR //
/* Location: C:\Users\dturcios\Documents\NetBeansProjects\ImageUploader\dist\lib\sftp.jar
* Qualified Name: com.jscape.filetransfer.AftpFileTransfer.SecurityMode
* JD-Core Version: 0.7.0.1
*/ | [
"dturcios@HCE-ECM-002.us.adler.corp"
] | dturcios@HCE-ECM-002.us.adler.corp |
2db48ee15299772505a80fb7da410a525d6ec994 | 09810fc60b0d6e68df6bfa49652be078e5bfefd9 | /module2/src/case_study/bai_tap_1/Data.java | 06bb6acd56ba41cab0c7a52db92b010bd7ead35b | [] | no_license | C0920G1-NguyenQuangHoaiLinh/C0920G1-NguyenQuangHoaiLinh | 18323fe752648daa7acaad0aa567c16d5ca30804 | 21f2061dc0e5df53dfdec73381b3b65a5e81e841 | refs/heads/master | 2023-03-29T21:22:50.560687 | 2021-04-07T04:43:15 | 2021-04-07T04:43:15 | 297,220,239 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 932 | java | package case_study.bai_tap_1;
import java.io.Serializable;
import java.util.ArrayList;
public class Data implements Serializable {
private ArrayList<Person> listPerson = new ArrayList<Person>();
private ArrayList<String> listGroup;
public Data() {
}
public ArrayList<Person> getListPerson() {
return listPerson;
}
public void setListPerson(ArrayList<Person> listPerson) {
this.listPerson = listPerson;
}
public ArrayList<String> getListGroup() {
listGroup = new ArrayList<String>();
for (int i = 0; i < listPerson.size(); i++) {
boolean check = true;
for (int j = i - 1; j >= 0; j--) {
if (listPerson.get(i).getGroup()
.equals(listPerson.get(j).getGroup())) {
check = false;
break;
}
}
if (check) {
listGroup.add(listPerson.get(i).getGroup());
}
}
return listGroup;
}
public void setListGroup(ArrayList<String> listGroup) {
this.listGroup = listGroup;
}
}
| [
"you@example.com"
] | you@example.com |
e3378e897d61e94f1cd1f715c5957b35a96ce14a | 98503f4fef67ed9d01ce54ecac0267bf48adfa75 | /Practices/src/free/InD1.java | b28aee0b8de4ea950bbc2a229b06fb6cea24ad9d | [] | no_license | kiribeam/practices | 9a35bf01e93bf152a8371c9094c5606642242e0b | e60de9cb6c7d23d919403aabe3e415c04764f7cf | refs/heads/master | 2020-06-26T11:19:13.125241 | 2019-07-30T09:28:40 | 2019-07-30T09:28:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,331 | java | import java.util.*;
public class InD1{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String tmp = sc.nextLine();
int[] pairs = getInput(tmp);
int size = pairs[0];
int change = pairs[1];
int[] array = getInput(sc.nextLine());
int[][] changes = new int[change][2];
for(int i=0; i<change; i++){
changes[i] = getInput(sc.nextLine());
}
boolean[] evenList = new boolean[size];
int result = 0;
for(int i=0; i<size; i++){
if(array[i]%2==0) {
evenList[i] = true;
result += array[i];
}
}
int num;
for(int i=0; i<change; i++){
num = changes[i][0]-1;
if(changes[i][1]%2 != 0) {
if(evenList[num]){
result -= array[num];
}else{
result += array[num] + changes[i][1];
}
evenList[num] = ! evenList[num];
}else if(evenList[num]){
result += changes[i][1];
}
array[num] += changes[i][1];
System.out.println(result + "");
}
}
public static int[] getInput(String s){
String[] strings = s.split(" ");
int length = strings.length;
//System.out.println(length + "");
int[] result = new int[length];
for(int i=0; i<length; i++)
result[i] = Integer.parseInt(strings[i]);
return result;
}
}
| [
"kiribeam@outlook.com"
] | kiribeam@outlook.com |
679217ad5cb2972cef0d6be0d3a007fcec043969 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/35/35_4231bbfd0940af8345ca02b7b440a635db6f4679/jIBCBitcoin/35_4231bbfd0940af8345ca02b7b440a635db6f4679_jIBCBitcoin_t.java | d0661a392e6956e332d9012993c86164efabe761 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 3,598 | java | package org.hive13.jircbot.commands;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.SocketTimeoutException;
import java.net.URL;
import java.util.Calendar;
import javax.net.ssl.SSLHandshakeException;
import org.hive13.jircbot.jIRCBot;
import org.hive13.jircbot.support.MtGoxTicker;
import org.hive13.jircbot.support.jIRCTools;
import com.google.gson.Gson;
public class jIBCBitcoin extends jIBCommand {
private final String MT_GOX_URL = "https://mtgox.com/code/data/ticker.php";
private Calendar lastDisplayed = null;
@Override
public String getCommandName() {
return "bitcoin";
}
@Override
public String getHelp() {
return "";
}
@Override
protected void handleMessage(jIRCBot bot, String channel, String sender,
String message) {
if(message.toLowerCase().equals(getCommandName())) {
sendBitcoinUpdate(bot, channel);
} else if(message.contains(getCommandName())) {
if(lastDisplayed != null) {
long now = Calendar.getInstance().getTimeInMillis();
if(now - lastDisplayed.getTimeInMillis() > 600000) { // 10 Minutes
sendBitcoinUpdate(bot, channel);
}
} else {
sendBitcoinUpdate(bot, channel);
}
}
}
private void sendBitcoinUpdate(jIRCBot bot, String channel) {
Object content = null;
Gson gson = new Gson();
String errorMsg = "";
try {
// Wrote my own URL retriever because WebFile doesn't handle SSL correctly
URL url = new URL(MT_GOX_URL);
java.net.URLConnection httpConn = url.openConnection();
httpConn.setDoInput(true);
httpConn.connect();
InputStream in = httpConn.getInputStream();
BufferedInputStream bufIn = new BufferedInputStream(in);
byte buf[] = new byte[8192];
bufIn.read(buf, 0, 8192);
content = new String(buf,"US-ASCII");
// Having issues with https via getUrlContent
//content = jIRCTools.getUrlContent(MT_GOX_URL);
} catch (MalformedURLException e) {
errorMsg = "Mt. Gox is reporting an invalid URL.";
e.printStackTrace();
} catch (SocketTimeoutException e) {
errorMsg = "Mt. Gox appears to be down right now";
e.printStackTrace();
} catch (SSLHandshakeException e) {
errorMsg = "Mt. Gox gave us an SSL Handshake error.";
e.printStackTrace();
} catch (IOException e) {
errorMsg = "Mt. Gox had an IOException? Seriously?";
e.printStackTrace();
}
if(content != null) {
String json = content.toString();
// Massage json to fit our class a bit
json = json.substring(10, json.lastIndexOf('}'));
MtGoxTicker ticker = gson.fromJson(json, MtGoxTicker.class);
bot.sendMessage(channel, "Mt. Gox: Last=" + ticker.last + " High=" + ticker.high + " Low=" + ticker.low + " Avg=" + ticker.avg);
lastDisplayed = Calendar.getInstance();
} else {
bot.sendMessage(channel, errorMsg);
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
c775b5b07274fb58808411c3cb5ce71d18a0e6bb | 194e44209e5494bc78378963e15cbfc8ba944373 | /src/main/java/thebetweenlands/common/entity/EntityShockwaveSwordItem.java | 534155a96e97d8678b223d430050a904d2e005e5 | [] | no_license | Angry-Pixel/The-Betweenlands | cf8b8f4b8ac58b047dfbb19911426b81c7f31733 | eafac1c217cdf304d477b025708e0dadf82b6953 | refs/heads/1.12-fixes | 2023-09-01T07:57:27.962697 | 2023-04-07T19:02:05 | 2023-04-07T19:02:05 | 30,657,636 | 237 | 125 | null | 2023-09-04T07:18:36 | 2015-02-11T16:34:13 | Java | UTF-8 | Java | false | false | 2,001 | java | package thebetweenlands.common.entity;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.datasync.DataParameter;
import net.minecraft.network.datasync.DataSerializers;
import net.minecraft.network.datasync.EntityDataManager;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
public class EntityShockwaveSwordItem extends EntityItem {
private static final DataParameter<Integer> WAVE_PROGRESS = EntityDataManager.createKey(EntityShockwaveSwordItem.class, DataSerializers.VARINT);
private int waveProgress;
private int lastWaveProgress;
public EntityShockwaveSwordItem(World worldIn) {
super(worldIn);
this.setPickupDelay(80);
this.setNoDespawn();
this.setSize(0.25F, 1.0F);
}
public EntityShockwaveSwordItem(World worldObj, double posX, double posY, double posZ, ItemStack itemStack) {
super(worldObj, posX, posY, posZ, itemStack);
this.setPickupDelay(80);
this.setNoDespawn();
}
@Override
protected void entityInit() {
super.entityInit();
this.getDataManager().register(WAVE_PROGRESS, 0);
}
@Override
public void onUpdate() {
super.onUpdate();
this.lastWaveProgress = this.waveProgress;
this.waveProgress = this.getDataManager().get(WAVE_PROGRESS);
if(this.waveProgress < 50)
this.getDataManager().set(WAVE_PROGRESS, this.waveProgress + 1);
}
@Override
public void writeEntityToNBT(NBTTagCompound nbt) {
super.writeEntityToNBT(nbt);
nbt.setInteger("WaveProgress", this.getDataManager().get(WAVE_PROGRESS));
}
@Override
public void readEntityFromNBT(NBTTagCompound nbt) {
super.readEntityFromNBT(nbt);
this.getDataManager().set(WAVE_PROGRESS, nbt.getInteger("WaveProgress"));
}
@SideOnly(Side.CLIENT)
public float getWaveProgress(float partialTicks) {
return this.lastWaveProgress + (this.waveProgress - this.lastWaveProgress) * partialTicks;
}
}
| [
"samuelboerlin@bluewin.ch"
] | samuelboerlin@bluewin.ch |
bc722314d819735894c7e99edf657b9a748b65a9 | 2993feda802f507fc33f07caf190c057ca7f4ff5 | /src/org/obicere/bytecode/core/reader/code/instruction/FLoad_1Reader.java | b3599f661165fa170cb34574dd0680320687d716 | [] | no_license | mattwzawislak/ByteCodeCore | cd2ea5d54f3ffee767f6a072bfee557165742de7 | 0913e2b30b69f3ccc6e8bfb8739a194f96e62622 | refs/heads/master | 2021-06-29T22:48:55.066527 | 2017-09-18T21:25:16 | 2017-09-18T21:25:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 530 | java | package org.obicere.bytecode.core.reader.code.instruction;
import org.javacore.code.instruction.FLoad_1;
import org.obicere.bytecode.core.objects.code.instruction.DefaultFLoad_1;
import org.obicere.bytecode.core.reader.Reader;
import org.obicere.bytecode.core.util.ByteCodeReader;
import java.io.IOException;
/**
* @author Obicere
*/
public class FLoad_1Reader implements Reader<FLoad_1> {
@Override
public FLoad_1 read(final ByteCodeReader input) throws IOException {
return DefaultFLoad_1.INSTANCE;
}
} | [
"mattwzawislak@gmail.com"
] | mattwzawislak@gmail.com |
bcbac85aaacb9d2b3eafae1600812e75a42a20bb | d5f09c7b0e954cd20dd613af600afd91b039c48a | /sources/com/alibaba/fastjson/support/geo/LineString.java | 040f32c25ba0ab9b33bdf05fadee58a472a91927 | [] | no_license | t0HiiBwn/CoolapkRelease | af5e00c701bf82c4e90b1033f5c5f9dc8526f4b3 | a6a2b03e32cde0e5163016e0078391271a8d33ab | refs/heads/main | 2022-07-29T23:28:35.867734 | 2021-03-26T11:41:18 | 2021-03-26T11:41:18 | 345,290,891 | 5 | 2 | null | null | null | null | UTF-8 | Java | false | false | 484 | java | package com.alibaba.fastjson.support.geo;
import com.alibaba.fastjson.annotation.JSONType;
@JSONType(orders = {"type", "bbox", "coordinates"}, typeName = "LineString")
public class LineString extends Geometry {
private double[][] coordinates;
public LineString() {
super("LineString");
}
public double[][] getCoordinates() {
return this.coordinates;
}
public void setCoordinates(double[][] dArr) {
this.coordinates = dArr;
}
}
| [
"test@gmail.com"
] | test@gmail.com |
4cf3eb9dd3631996946445fddb8d27ffc5dbbea4 | fe6bed2c0736728f82ac11dc830916660b836854 | /src/main/java/br/ufpa/labes/spm/domain/BranchANDCon.java | 812a81f4e6492666b58b9cdcb3c56794088e1b66 | [
"MIT"
] | permissive | Lakshamana/spm-mini | b2989154fda60f638697c2a8ad69a87ed16101a5 | 6bd41f8e9a9e73b1ad8ec1aab799814fb7ad232a | refs/heads/master | 2022-12-22T13:17:38.536657 | 2019-12-13T16:21:53 | 2019-12-13T16:21:53 | 217,307,577 | 0 | 0 | MIT | 2022-12-16T04:40:40 | 2019-10-24T13:35:28 | Java | UTF-8 | Java | false | false | 3,184 | java | package br.ufpa.labes.spm.domain;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import javax.persistence.*;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
/** A BranchANDCon. */
@Entity
@Table(name = "branch_and_con")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class BranchANDCon extends BranchCon implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@ManyToMany
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@JoinTable(
name = "branch_and_con_to_multiple_con",
joinColumns = @JoinColumn(name = "branchandcon_id", referencedColumnName = "id"),
inverseJoinColumns = @JoinColumn(name = "to_multiple_con_id", referencedColumnName = "id"))
private Set<MultipleCon> toMultipleCons = new HashSet<>();
@ManyToMany(mappedBy = "fromBranchANDCons")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@JsonIgnore
private Set<Activity> toActivities = new HashSet<>();
// jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Set<MultipleCon> getToMultipleCons() {
return toMultipleCons;
}
public BranchANDCon toMultipleCons(Set<MultipleCon> multipleCons) {
this.toMultipleCons = multipleCons;
return this;
}
public BranchANDCon addToMultipleCon(MultipleCon multipleCon) {
this.toMultipleCons.add(multipleCon);
multipleCon.getTheBranchANDCons().add(this);
return this;
}
public BranchANDCon removeToMultipleCon(MultipleCon multipleCon) {
this.toMultipleCons.remove(multipleCon);
multipleCon.getTheBranchANDCons().remove(this);
return this;
}
public void setToMultipleCons(Set<MultipleCon> multipleCons) {
this.toMultipleCons = multipleCons;
}
public Set<Activity> getToActivities() {
return toActivities;
}
public BranchANDCon toActivities(Set<Activity> activities) {
this.toActivities = activities;
return this;
}
public BranchANDCon addToActivity(Activity activity) {
this.toActivities.add(activity);
activity.getFromBranchANDCons().add(this);
return this;
}
public BranchANDCon removeToActivity(Activity activity) {
this.toActivities.remove(activity);
activity.getFromBranchANDCons().remove(this);
return this;
}
public void setToActivities(Set<Activity> activities) {
this.toActivities = activities;
}
// jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not
// remove
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof BranchANDCon)) {
return false;
}
return id != null && id.equals(((BranchANDCon) o).id);
}
@Override
public int hashCode() {
return 31;
}
@Override
public String toString() {
return "BranchANDCon{" + "id=" + getId() + "}";
}
}
| [
"guitrompa1@gmail.com"
] | guitrompa1@gmail.com |
9b69d2bbe2689755c0bf79f292f349d4f29c84fa | dc15e59b5baa26178c02561308afde41c315bbb4 | /swift-study/src/main/java/com/swift/sr18/mt564/SeqDF98ALOTOType.java | a471935d563730eff0ed5a8b429c32f8465272bf | [] | no_license | zbdy20061001/swift | 0e7014e2986a8f6fc04ad22f2505b7f05d67d7b8 | 260e942b848175d1e8d12571a3d32efecaa3d437 | refs/heads/master | 2020-04-26T19:16:05.954125 | 2019-03-04T15:12:27 | 2019-03-04T15:12:27 | 173,768,829 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 2,864 | java | //
// 此文件是由 JavaTM Architecture for XML Binding (JAXB) 引用实现 v2.2.8-b130911.1802 生成的
// 请访问 <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// 在重新编译源模式时, 对此文件的所有修改都将丢失。
// 生成时间: 2018.12.05 时间 12:24:35 AM CST
//
package com.swift.sr18.mt564;
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>SeqD_F98a_LOTO_Type complex type的 Java 类。
*
* <p>以下模式片段指定包含在此类中的预期内容。
*
* <pre>
* <complexType name="SeqD_F98a_LOTO_Type">
* <complexContent>
* <extension base="{urn:swift:xsd:fin.564.2018}Qualifier">
* <choice>
* <element name="F98A" type="{urn:swift:xsd:fin.564.2018}F98A_Type"/>
* <element name="F98B" type="{urn:swift:xsd:fin.564.2018}F98B_25_Type"/>
* <element name="F98C" type="{urn:swift:xsd:fin.564.2018}F98C_Type"/>
* </choice>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SeqD_F98a_LOTO_Type", propOrder = {
"f98A",
"f98B",
"f98C"
})
public class SeqDF98ALOTOType
extends Qualifier
{
@XmlElement(name = "F98A")
protected F98AType f98A;
@XmlElement(name = "F98B")
protected F98B25Type f98B;
@XmlElement(name = "F98C")
protected F98CType f98C;
/**
* 获取f98A属性的值。
*
* @return
* possible object is
* {@link F98AType }
*
*/
public F98AType getF98A() {
return f98A;
}
/**
* 设置f98A属性的值。
*
* @param value
* allowed object is
* {@link F98AType }
*
*/
public void setF98A(F98AType value) {
this.f98A = value;
}
/**
* 获取f98B属性的值。
*
* @return
* possible object is
* {@link F98B25Type }
*
*/
public F98B25Type getF98B() {
return f98B;
}
/**
* 设置f98B属性的值。
*
* @param value
* allowed object is
* {@link F98B25Type }
*
*/
public void setF98B(F98B25Type value) {
this.f98B = value;
}
/**
* 获取f98C属性的值。
*
* @return
* possible object is
* {@link F98CType }
*
*/
public F98CType getF98C() {
return f98C;
}
/**
* 设置f98C属性的值。
*
* @param value
* allowed object is
* {@link F98CType }
*
*/
public void setF98C(F98CType value) {
this.f98C = value;
}
}
| [
"zbdy20061001@163.com"
] | zbdy20061001@163.com |
69213e360bbad0d5de80cda30239753c2638ad31 | fcfd2fb3af67dccd5768875e555e07a5c41854d1 | /src/main/java/pattern/factory/factoryMethod/Client.java | 500fabab15a3218aa76ff27c3c3a7fdf53ea1d36 | [] | no_license | wuhulala/pattern | 6e58aa0985d4e533bdb00a0a6144d73d646a7c25 | 881b027019941f4ec56f12011c32cd56e73f6eee | refs/heads/master | 2021-01-09T20:46:42.938025 | 2018-07-01T03:12:49 | 2018-07-01T03:12:49 | 63,119,862 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 237 | java | package pattern.factory.factoryMethod;
/**
* @author xueaohui
*/
public class Client {
public static void main(String[] args){
PizzaStore pizzaStore = new NYPizzaStore();
pizzaStore.orderPizza("cheese");
}
}
| [
"370031044@qq.com"
] | 370031044@qq.com |
767ac77faeb2dbd2871cd0c40f77fdb957208173 | 7569f9a68ea0ad651b39086ee549119de6d8af36 | /cocoon-2.1.9/src/blocks/databases/java/org/apache/cocoon/components/source/impl/BlobSourceFactory.java | d98f41bea9a9bd7a7c9e7f1ad1f6476025a6fb40 | [
"Apache-2.0"
] | permissive | tpso-src/cocoon | 844357890f8565c4e7852d2459668ab875c3be39 | f590cca695fd9930fbb98d86ae5f40afe399c6c2 | refs/heads/master | 2021-01-10T02:45:37.533684 | 2015-07-29T18:47:11 | 2015-07-29T18:47:11 | 44,549,791 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,417 | java | /*
* Copyright 1999-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.cocoon.components.source.impl;
import org.apache.avalon.framework.logger.AbstractLogEnabled;
import org.apache.avalon.framework.service.ServiceException;
import org.apache.avalon.framework.service.ServiceManager;
import org.apache.avalon.framework.service.Serviceable;
import org.apache.avalon.framework.thread.ThreadSafe;
import org.apache.excalibur.source.Source;
import org.apache.excalibur.source.SourceException;
import org.apache.excalibur.source.SourceFactory;
import java.io.IOException;
import java.net.MalformedURLException;
import java.util.Map;
/**
* A factory for 'blob:' sources.
*
* @author <a href="mailto:sylvain@apache.org">Sylvain Wallez</a>
* @author <a href="mailto:stephan@apache.org">Stephan Michels</a>
* @version CVS $Id: BlobSourceFactory.java 30932 2004-07-29 17:35:38Z vgritsenko $
*/
public class BlobSourceFactory
extends AbstractLogEnabled
implements Serviceable, SourceFactory, ThreadSafe {
/** The ServiceManager instance */
protected ServiceManager manager;
/**
* Get a <code>Source</code> object.
* @param parameters This is optional.
*/
public Source getSource(String location, Map parameters)
throws MalformedURLException, IOException, SourceException {
BlobSource blob = new BlobSource(location);
this.setupLogger(blob);
blob.service(this.manager);
return blob;
}
/**
* Release a {@link Source} object.
*/
public void release( Source source ) {
// Nothing to do
}
/**
* @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
*/
public void service(ServiceManager manager) throws ServiceException {
this.manager = manager;
}
}
| [
"ms@tpso.com"
] | ms@tpso.com |
6121bdffa32f1515a1bb31dddc44cf5368f3dc80 | 178ef1239b7b188501395c4d3db3f0266b740289 | /android/content/SyncAdaptersCache.java | 392bbb09ac97a044f3faccc4fccfb2957a87d1d6 | [] | no_license | kailashrs/5z_framework | b295e53d20de0b6d2e020ee5685eceeae8c0a7df | 1b7f76b1f06cfb6fb95d4dd41082a003d7005e5d | refs/heads/master | 2020-04-26T12:31:27.296125 | 2019-03-03T08:58:23 | 2019-03-03T08:58:23 | 173,552,503 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,981 | java | package android.content;
import android.content.pm.RegisteredServicesCache;
import android.content.pm.RegisteredServicesCache.ServiceInfo;
import android.content.pm.XmlSerializerAndParser;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.text.TextUtils;
import android.util.ArrayMap;
import android.util.AttributeSet;
import android.util.SparseArray;
import com.android.internal.R.styleable;
import com.android.internal.annotations.GuardedBy;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlSerializer;
public class SyncAdaptersCache
extends RegisteredServicesCache<SyncAdapterType>
{
private static final String ATTRIBUTES_NAME = "sync-adapter";
private static final String SERVICE_INTERFACE = "android.content.SyncAdapter";
private static final String SERVICE_META_DATA = "android.content.SyncAdapter";
private static final String TAG = "Account";
private static final MySerializer sSerializer = new MySerializer();
@GuardedBy("mServicesLock")
private SparseArray<ArrayMap<String, String[]>> mAuthorityToSyncAdapters = new SparseArray();
public SyncAdaptersCache(Context paramContext)
{
super(paramContext, "android.content.SyncAdapter", "android.content.SyncAdapter", "sync-adapter", sSerializer);
}
public String[] getSyncAdapterPackagesForAuthority(String paramString, int paramInt)
{
synchronized (mServicesLock)
{
Object localObject2 = (ArrayMap)mAuthorityToSyncAdapters.get(paramInt);
Object localObject3 = localObject2;
if (localObject2 == null)
{
localObject3 = new android/util/ArrayMap;
((ArrayMap)localObject3).<init>();
mAuthorityToSyncAdapters.put(paramInt, localObject3);
}
if (((ArrayMap)localObject3).containsKey(paramString))
{
paramString = (String[])((ArrayMap)localObject3).get(paramString);
return paramString;
}
Object localObject4 = getAllServices(paramInt);
localObject2 = new java/util/ArrayList;
((ArrayList)localObject2).<init>();
Iterator localIterator = ((Collection)localObject4).iterator();
while (localIterator.hasNext())
{
localObject4 = (RegisteredServicesCache.ServiceInfo)localIterator.next();
if ((paramString.equals(type).authority)) && (componentName != null)) {
((ArrayList)localObject2).add(componentName.getPackageName());
}
}
localObject4 = new String[((ArrayList)localObject2).size()];
((ArrayList)localObject2).toArray((Object[])localObject4);
((ArrayMap)localObject3).put(paramString, localObject4);
return localObject4;
}
}
protected void onServicesChangedLocked(int paramInt)
{
synchronized (mServicesLock)
{
ArrayMap localArrayMap = (ArrayMap)mAuthorityToSyncAdapters.get(paramInt);
if (localArrayMap != null) {
localArrayMap.clear();
}
super.onServicesChangedLocked(paramInt);
return;
}
}
protected void onUserRemoved(int paramInt)
{
synchronized (mServicesLock)
{
mAuthorityToSyncAdapters.remove(paramInt);
super.onUserRemoved(paramInt);
return;
}
}
public SyncAdapterType parseServiceAttributes(Resources paramResources, String paramString, AttributeSet paramAttributeSet)
{
paramResources = paramResources.obtainAttributes(paramAttributeSet, R.styleable.SyncAdapter);
try
{
String str = paramResources.getString(2);
paramAttributeSet = paramResources.getString(1);
if ((!TextUtils.isEmpty(str)) && (!TextUtils.isEmpty(paramAttributeSet)))
{
boolean bool1 = paramResources.getBoolean(3, true);
boolean bool2 = paramResources.getBoolean(4, true);
boolean bool3 = paramResources.getBoolean(6, false);
boolean bool4 = paramResources.getBoolean(5, false);
paramString = new SyncAdapterType(str, paramAttributeSet, bool1, bool2, bool3, bool4, paramResources.getString(0), paramString);
return paramString;
}
return null;
}
finally
{
paramResources.recycle();
}
}
static class MySerializer
implements XmlSerializerAndParser<SyncAdapterType>
{
MySerializer() {}
public SyncAdapterType createFromXml(XmlPullParser paramXmlPullParser)
throws IOException, XmlPullParserException
{
return SyncAdapterType.newKey(paramXmlPullParser.getAttributeValue(null, "authority"), paramXmlPullParser.getAttributeValue(null, "accountType"));
}
public void writeAsXml(SyncAdapterType paramSyncAdapterType, XmlSerializer paramXmlSerializer)
throws IOException
{
paramXmlSerializer.attribute(null, "authority", authority);
paramXmlSerializer.attribute(null, "accountType", accountType);
}
}
}
| [
"kailash.sudhakar@gmail.com"
] | kailash.sudhakar@gmail.com |
6cbb60b6feb2ac5571abf70a250ce3aa25d5a13e | 96f9bac9891c89fe51b0a79de7ae7080f88f306e | /src/main/java/observer/version3/NewsPaper.java | e2024fc2fca6fed6257240f45bebac79385c4b0b | [] | no_license | xudesan33/grinding-design-pattern | dc510ef6686eea181a0c96ad9f32747e02481b6b | 5689cce027a3fb1bd4f3469ba0ac5969b0e8beb2 | refs/heads/master | 2023-05-08T02:00:37.711044 | 2021-06-02T11:05:20 | 2021-06-02T11:05:20 | 373,138,212 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 598 | java | package observer.version3;
/**
* 报纸对象,具体的目标实现
*/
public class NewsPaper extends Subject{
/**
* 报纸的具体内容
*/
private String content;
/**
* 获取报纸的具体内容
* @return 报纸的具体内容
*/
public String getContent() {
return content;
}
/**
* 示意,设置报纸的具体内容,相当于要出版报纸了
* @param content 报纸的具体内容
*/
public void setContent(String content) {
this.content = content;
// 内容有了,说明又出报纸了,那就通知所有的读者
notifyObservers(content);
}
} | [
"sander-xu@zamplus.com"
] | sander-xu@zamplus.com |
de9b9ccc71bcb55503fce0c8fd304154f435e3dd | ffd5cceaedfafe48c771f3d8f8841be9773ae605 | /demonstrations/src/main/java/boofcv/demonstrations/binary/SelectHistogramThresholdPanelV.java | 8822c6b3f176931e7633c54c29c81a9a59f581c3 | [
"LicenseRef-scancode-takuya-ooura",
"Apache-2.0"
] | permissive | Pandinosaurus/BoofCV | 7ea1db317570b2900349e2b44cc780efc9bf1269 | fc75d510eecf7afd55383b6aae8f01a92b1a47d3 | refs/heads/SNAPSHOT | 2023-08-31T07:29:59.845934 | 2019-11-03T17:46:24 | 2019-11-03T17:46:24 | 191,161,726 | 0 | 0 | Apache-2.0 | 2019-11-03T23:57:13 | 2019-06-10T12:13:55 | Java | UTF-8 | Java | false | false | 3,797 | java | /*
* Copyright (c) 2011-2019, Peter Abeles. All Rights Reserved.
*
* This file is part of BoofCV (http://boofcv.org).
*
* 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 boofcv.demonstrations.binary;
import boofcv.gui.StandardAlgConfigPanel;
import boofcv.gui.binary.HistogramThresholdPanel;
import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
/**
* Creates a control panel for selecting thresholds of pixel image intensities
*
* @author Peter Abeles
*/
public class SelectHistogramThresholdPanelV extends StandardAlgConfigPanel implements ChangeListener , ActionListener {
JSlider thresholdLevel;
HistogramThresholdPanel histogramPanel;
JButton toggleButton;
Listener listener;
int valueThreshold;
boolean valueDown;
public SelectHistogramThresholdPanelV(int threshold ,
boolean directionDown )
{
this.valueThreshold = threshold;
this.valueDown = directionDown;
histogramPanel = new HistogramThresholdPanel(256,256);
histogramPanel.setPreferredSize(new Dimension(120,60));
histogramPanel.setMaximumSize(histogramPanel.getPreferredSize());
histogramPanel.setThreshold(valueThreshold,valueDown);
thresholdLevel = new JSlider(JSlider.HORIZONTAL,0,255,valueThreshold);
thresholdLevel.setMajorTickSpacing(20);
thresholdLevel.setPaintTicks(true);
thresholdLevel.addChangeListener(this);
thresholdLevel.setValue(threshold);
toggleButton = new JButton();
toggleButton.setPreferredSize(new Dimension(100,30));
toggleButton.setMaximumSize(toggleButton.getPreferredSize());
toggleButton.setMinimumSize(toggleButton.getPreferredSize());
setToggleText();
toggleButton.addActionListener(this);
addAlignCenter(histogramPanel);
addSeparator();
addAlignCenter(thresholdLevel);
addAlignCenter(toggleButton);
}
public HistogramThresholdPanel getHistogramPanel() {
return histogramPanel;
}
public void setListener(Listener listener) {
this.listener = listener;
}
public int getThreshold() {
return valueThreshold;
}
public boolean isDown() {
return valueDown;
}
private void setToggleText() {
if(valueDown)
toggleButton.setText("down");
else
toggleButton.setText("Up");
}
@Override
public void stateChanged(ChangeEvent e) {
if( e.getSource() == thresholdLevel ) {
int oldValue = valueThreshold;
valueThreshold = ((Number)thresholdLevel.getValue()).intValue();
if( oldValue == valueThreshold )
return;
}
histogramPanel.setThreshold(valueThreshold,valueDown);
histogramPanel.repaint();
if( listener != null )
listener.histogramThresholdChange();
}
@Override
public void actionPerformed(ActionEvent e) {
if( e.getSource() == toggleButton ) {
valueDown = !valueDown;
setToggleText();
}
histogramPanel.setThreshold(valueThreshold,valueDown);
histogramPanel.repaint();
if( listener != null )
listener.histogramThresholdChange();
}
public void setThreshold(int threshold) {
valueThreshold = threshold;
thresholdLevel.setValue(threshold);
histogramPanel.setThreshold(valueThreshold,valueDown);
}
public static interface Listener
{
public void histogramThresholdChange();
}
}
| [
"peter.abeles@gmail.com"
] | peter.abeles@gmail.com |
3c993edc5538376d30da45d5a96e7751d6162e69 | 16ae24a99672cc47f1a3eb5e885505acb6419d19 | /SketchFix/src/main/java/ece/utexas/edu/sketchFix/staticTransform/model/stmts/VarItem.java | b78c4d898dc3e473a3bef12c21c84d3faf1a7340 | [] | no_license | lisahua/SketchFix | 71ed6ce4ae6c027eb1fda20b6beaa14f69554ce3 | 55ac24727839aef1eabe1ad6a7f93903d97813af | refs/heads/master | 2020-04-06T09:09:37.644478 | 2016-09-12T16:10:04 | 2016-09-12T16:10:04 | 63,458,796 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 972 | java | /**
* @author Lisa Aug 14, 2016 StateRequest.java
*/
package ece.utexas.edu.sketchFix.staticTransform.model.stmts;
import ece.utexas.edu.sketchFix.repair.processor.SkLineType;
import sketch.compiler.ast.core.FENode;
import sketch.compiler.ast.core.typs.Type;
public class VarItem {
String varName;
Type type;
FENode scope;
SkLineType scopeType;
String funcName;
public VarItem(String varName, Type type, FENode scope, SkLineType scopeType, String funcName) {
this.varName = varName;
this.type = type;
this.scope = scope;
this.scopeType = scopeType;
this.funcName = funcName;
}
public String getVarName() {
return varName;
}
public void setVarName(String varName) {
this.varName = varName;
}
public FENode getScope() {
return scope;
}
public void setScope(FENode scope) {
this.scope = scope;
}
public String getFuncName() {
return funcName;
}
public void setFuncName(String funcName) {
this.funcName = funcName;
}
} | [
"lisahua46@gmail.com"
] | lisahua46@gmail.com |
1eaa480f27cfaba9de66cdd1f1ecde8cc1b1484f | 31b7d2067274728a252574b2452e617e45a1c8fb | /jpa-connector-beehive-bdk/com_V2.0.1.0.0/oracle/beehive/AuditEffectiveActorNameSortCriteria.java | d72d882d56843b1113e1a2a355ae3c805c06d9f1 | [] | no_license | ericschan/open-icom | c83ae2fa11dafb92c3210a32184deb5e110a5305 | c4b15a2246d1b672a8225cbb21b75fdec7f66f22 | refs/heads/master | 2020-12-30T12:22:48.783144 | 2017-05-28T00:51:44 | 2017-05-28T00:51:44 | 91,422,338 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,213 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.3-hudson-jaxb-ri-2.2.3-3-
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2011.02.27 at 04:52:46 PM PST
//
package com.oracle.beehive;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for auditEffectiveActorNameSortCriteria complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="auditEffectiveActorNameSortCriteria">
* <complexContent>
* <extension base="{http://www.oracle.com/beehive}auditStringSortCriteria">
* <sequence>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "auditEffectiveActorNameSortCriteria")
public class AuditEffectiveActorNameSortCriteria
extends AuditStringSortCriteria
{
}
| [
"eric.sn.chan@gmail.com"
] | eric.sn.chan@gmail.com |
c5740437fe3e6595a736bfacbfca1189f8cd996e | 27cda5e6fb5da7ae2dea91450ca1082bcaa55424 | /Source/Java/CacheImpl/main/test/java/gov/va/med/imaging/storage/cache/AbstractTestCacheMemento.java | 46a6728a79a502e1778a95e4965dc483b0ecc483 | [
"Apache-2.0"
] | permissive | VHAINNOVATIONS/Telepathology | 85552f179d58624e658b0b266ce83e905480acf2 | 989c06ccc602b0282c58c4af3455c5e0a33c8593 | refs/heads/master | 2021-01-01T19:15:40.693105 | 2015-11-16T22:39:23 | 2015-11-16T22:39:23 | 32,991,526 | 3 | 9 | null | null | null | null | UTF-8 | Java | false | false | 5,348 | java | /**
*
*/
package gov.va.med.imaging.storage.cache;
import gov.va.med.imaging.storage.cache.exceptions.CacheException;
import gov.va.med.imaging.storage.cache.impl.CacheManagerImpl;
import gov.va.med.imaging.storage.cache.impl.eviction.LastAccessedEvictionStrategy;
import gov.va.med.imaging.storage.cache.impl.eviction.LastAccessedEvictionStrategyMemento;
import gov.va.med.imaging.storage.cache.impl.eviction.StorageThresholdEvictionStrategy;
import gov.va.med.imaging.storage.cache.impl.eviction.StorageThresholdEvictionStrategyMemento;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import javax.management.InstanceNotFoundException;
import javax.management.MBeanException;
import javax.management.RuntimeOperationsException;
import junit.framework.TestCase;
/**
* @author VHAISWBECKEC
*
*/
public abstract class AbstractTestCacheMemento
extends TestCase
{
private CacheManagerImpl cacheManager;
protected void setUp() throws Exception
{
super.setUp();
cacheManager = CacheManagerImpl.getSingleton();
}
protected CacheManagerImpl getCacheManager()
{
return cacheManager;
}
protected abstract URI getCacheUri() throws URISyntaxException;
protected abstract void validateCacheRealizationClass(Cache cache);
protected abstract String getCacheName();
public void testMemento()
throws MBeanException, CacheException, RuntimeOperationsException, InstanceNotFoundException
{
Cache cache = null;
try
{
cache = getCacheManager().createCache(getCacheName(), getCacheUri(), (String)null );
}
catch (URISyntaxException x)
{
x.printStackTrace();
fail(x.getMessage());
}
catch (IOException x)
{
x.printStackTrace();
fail(x.getMessage());
}
validateCacheRealizationClass(cache);
LastAccessedEvictionStrategyMemento memento0 = new LastAccessedEvictionStrategyMemento();
memento0.setName("lastAccessedEvictionStrategy");
memento0.setMaximumTimeSinceLastAccess(10000L);
memento0.setInitialized(true);
getCacheManager().createEvictionStrategy( cache, memento0 );
StorageThresholdEvictionStrategyMemento memento3 = new StorageThresholdEvictionStrategyMemento();
memento3.setName("freeSpaceEvictionStrategy");
memento3.setMinFreeSpaceThreshold(100000000L);
memento3.setTargetFreeSpaceThreshold(1000000000L);
memento3.setDelay(1000L);
memento3.setInterval(10000L);
memento3.setInitialized(true);
getCacheManager().createEvictionStrategy( cache, memento3 );
getCacheManager().createRegion( cache, "region0", new String[]{"lastAccessedEvictionStrategy"} );
getCacheManager().createRegion( cache, "region1", new String[]{"lastAccessedEvictionStrategy"} );
getCacheManager().createRegion( cache, "region2", new String[]{"freeSpaceEvictionStrategy"} );
getCacheManager().createRegion( cache, "region3", new String[]{"freeSpaceEvictionStrategy"} );
try
{
getCacheManager().store(cache);
}
catch (IOException x)
{
x.printStackTrace();
fail(x.getMessage());
}
Cache resurrectedCache = null;
try
{
resurrectedCache = getCacheManager().getCache(getCacheName());
}
catch (FileNotFoundException x)
{
x.printStackTrace();
fail(x.getMessage());
}
catch (IOException x)
{
x.printStackTrace();
fail(x.getMessage());
}
assertEquals(getCacheName(), resurrectedCache.getName());
assertEquals(2, resurrectedCache.getEvictionStrategies().size());
assertEquals(4, resurrectedCache.getRegions().size());
assertNotNull( resurrectedCache.getEvictionStrategy("lastAccessedEvictionStrategy") );
assertNotNull( resurrectedCache.getEvictionStrategy("freeSpaceEvictionStrategy") );
Region region = null;
EvictionStrategy[] evictionStrategies = null;
region = resurrectedCache.getRegion("region0");
assertNotNull( region );
evictionStrategies = region.getEvictionStrategies();
assertNotNull( evictionStrategies );
assertEquals(1, evictionStrategies.length);
assertTrue(evictionStrategies[0] instanceof LastAccessedEvictionStrategy);
assertEquals( "lastAccessedEvictionStrategy", evictionStrategies[0].getName() );
region = resurrectedCache.getRegion("region1");
evictionStrategies = region.getEvictionStrategies();
assertNotNull( region );
assertNotNull( evictionStrategies );
assertEquals(1, evictionStrategies.length);
assertTrue(evictionStrategies[0] instanceof LastAccessedEvictionStrategy);
assertEquals( "lastAccessedEvictionStrategy", evictionStrategies[0].getName() );
region = resurrectedCache.getRegion("region2");
evictionStrategies = region.getEvictionStrategies();
assertNotNull( region );
assertNotNull( evictionStrategies );
assertEquals(1, evictionStrategies.length);
assertTrue(evictionStrategies[0] instanceof StorageThresholdEvictionStrategy);
assertEquals( "freeSpaceEvictionStrategy", evictionStrategies[0].getName() );
region = resurrectedCache.getRegion("region3");
evictionStrategies = region.getEvictionStrategies();
assertNotNull( region );
assertNotNull( evictionStrategies );
assertEquals(1, evictionStrategies.length);
assertTrue(evictionStrategies[0] instanceof StorageThresholdEvictionStrategy);
assertEquals( "freeSpaceEvictionStrategy", evictionStrategies[0].getName() );
getCacheManager().delete(cache);
}
}
| [
"ctitton@vitelnet.com"
] | ctitton@vitelnet.com |
c2181ce9347e10dd170f38324f83071ebbb2d79b | d7fca7f6db9ccc23234de54833e1023c0eb79d91 | /QMM.edit/src/qmm/provider/greaterThan_FunctionalOperatorItemProvider.java | 8d3be62d8a3f9665747cebf8c63cfb67457c9957 | [] | no_license | Racheast/ModelingQueryLanguage | 739015017204f22f997dc278eb02779770989cb8 | 1cfd316ffd5f428feee3cb5886599d67fde3d3ac | refs/heads/master | 2020-04-11T04:27:46.920258 | 2018-12-16T20:20:10 | 2018-12-16T20:20:10 | 161,512,321 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,277 | java | /**
*/
package qmm.provider;
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.ecore.EStructuralFeature;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
import qmm.QmmFactory;
import qmm.QmmPackage;
import qmm.greaterThan_FunctionalOperator;
/**
* This is the item provider adapter for a {@link qmm.greaterThan_FunctionalOperator} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class greaterThan_FunctionalOperatorItemProvider extends Number_Original_FunctionalOperatorItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public greaterThan_FunctionalOperatorItemProvider(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);
addNegatedPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
* This adds a property descriptor for the Negated feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addNegatedPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_NegatableElement_negated_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_NegatableElement_negated_feature", "_UI_NegatableElement_type"),
QmmPackage.eINSTANCE.getNegatableElement_Negated(),
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
/**
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
if (childrenFeatures == null) {
super.getChildrenFeatures(object);
childrenFeatures.add(QmmPackage.eINSTANCE.getBoolean_FunctionalType_Operator());
childrenFeatures.add(QmmPackage.eINSTANCE.getgreaterThan_FunctionalOperator_I());
}
return childrenFeatures;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EStructuralFeature getChildFeature(Object object, Object child) {
// Check the type of the specified child object and return the proper feature to use for
// adding (see {@link AddCommand}) it as a child.
return super.getChildFeature(object, child);
}
/**
* This returns greaterThan_FunctionalOperator.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/greaterThan_FunctionalOperator"));
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
greaterThan_FunctionalOperator greaterThan_FunctionalOperator = (greaterThan_FunctionalOperator)object;
return getString("_UI_greaterThan_FunctionalOperator_type") + " " + greaterThan_FunctionalOperator.isNegated();
}
/**
* 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(greaterThan_FunctionalOperator.class)) {
case QmmPackage.GREATER_THAN_FUNCTIONAL_OPERATOR__NEGATED:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
case QmmPackage.GREATER_THAN_FUNCTIONAL_OPERATOR__OPERATOR:
case QmmPackage.GREATER_THAN_FUNCTIONAL_OPERATOR__I:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
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);
newChildDescriptors.add
(createChildParameter
(QmmPackage.eINSTANCE.getBoolean_FunctionalType_Operator(),
QmmFactory.eINSTANCE.createparseBoolean_FunctionalOperator()));
newChildDescriptors.add
(createChildParameter
(QmmPackage.eINSTANCE.getBoolean_FunctionalType_Operator(),
QmmFactory.eINSTANCE.createcompareTo_FunctionalOperator()));
newChildDescriptors.add
(createChildParameter
(QmmPackage.eINSTANCE.getBoolean_FunctionalType_Operator(),
QmmFactory.eINSTANCE.createObject_Boolean_equals_FunctionalOperator()));
newChildDescriptors.add
(createChildParameter
(QmmPackage.eINSTANCE.getBoolean_FunctionalType_Operator(),
QmmFactory.eINSTANCE.createObject_Boolean_toString_FunctionalOperator()));
newChildDescriptors.add
(createChildParameter
(QmmPackage.eINSTANCE.getgreaterThan_FunctionalOperator_I(),
QmmFactory.eINSTANCE.createNumber_FunctionalParameter()));
}
}
| [
"e1128978@student.tuwien.ac.at"
] | e1128978@student.tuwien.ac.at |
f25a83ebf6233d862f85ab1b58f82e8dc3339b41 | 0fdcfd44c6fecb9e5644bae78dfe5e4707bb8c54 | /src/JavaBasics/Even_or_odd_GivenNumber_Readon_Console.java | 24efe7fdaa0847fd93cf5c6f5ac0cdfea1358c8f | [] | no_license | Rajeshrao1991/rajesh | 427502b6afc0cb88293eb162cc92c5d7718592a8 | f0e9f3efcba23614e745fc14d24766aba9212011 | refs/heads/master | 2020-09-15T01:47:55.645750 | 2019-11-22T04:15:02 | 2019-11-22T04:15:02 | 223,319,377 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 172 | java | package JavaBasics;
public class Even_or_odd_GivenNumber_Readon_Console {
public static void main(String[] args) {
// TODO Auto-generated method stub
}
}
| [
"User@User-PC"
] | User@User-PC |
cd6003ed52197e1401357dbe0b2bfa12048e35ad | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/2/2_446628083595605b9a4bdbf27672523af0e29d14/PDFExport/2_446628083595605b9a4bdbf27672523af0e29d14_PDFExport_t.java | a48dea76a12c0654dd2dbecbac1def5e7da83aa3 | [] | 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 | 4,583 | java | package cz.incad.kramerius.lp;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Date;
import java.util.logging.Level;
import org.w3c.dom.Document;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.Key;
import com.google.inject.name.Names;
import cz.incad.kramerius.FedoraAccess;
import cz.incad.kramerius.lp.guice.ArgumentLocalesProvider;
import cz.incad.kramerius.lp.guice.PDFModule;
import cz.incad.kramerius.pdf.GeneratePDFService;
import cz.incad.kramerius.processes.impl.ProcessStarter;
import cz.incad.kramerius.utils.DCUtils;
/**
* Staticky export do pdf
* @author pavels
*/
public class PDFExport {
public static final java.util.logging.Logger LOGGER = java.util.logging.Logger
.getLogger(PDFExport.class.getName());
public static void main(String[] args) throws IOException {
System.out.println("Spoustim staticky export .. ");
if (args.length >= 4) {
LOGGER.info("Parameters "+args[0]+", "+args[1]+", "+args[2]+", "+args[3]);
String outputFolderName = args[0];
Medium medium = Medium.valueOf(args[1]);
String uuid = args[2];
String djvuUrl = args[3];
String i18nUrl = args[4];
if (args.length > 6) {
LOGGER.info("Country "+args[5]);
LOGGER.info("Lang "+args[6]);
System.setProperty(ArgumentLocalesProvider.ISO3COUNTRY_KEY, args[5]);
System.setProperty(ArgumentLocalesProvider.ISO3LANG_KEY, args[6]);
}
File uuidFolder = new File(getTmpDir(), uuid);
if (uuidFolder.exists()) { uuidFolder.delete(); }
Injector injector = Guice.createInjector(new PDFModule());
if (System.getProperty("uuid") != null) {
updateProcessName(uuid, injector, medium);
}
generatePDFs(uuid, uuidFolder, injector,djvuUrl,i18nUrl);
createFSStructure(uuidFolder, new File(outputFolderName), medium);
}
}
private static void updateProcessName(String uuid, Injector injector, Medium medium)
throws IOException {
FedoraAccess fa = injector.getInstance(Key.get(FedoraAccess.class, Names.named("rawFedoraAccess")));
Document dc = fa.getDC(uuid);
String titleFromDC = DCUtils.titleFromDC(dc);
ProcessStarter.updateName("Generování '"+titleFromDC+"' na "+medium);
}
private static void createFSStructure(File pdfsFolder, File outputFodler, Medium medium) {
int pocitadlo = 0;
long bytes = 0;
File currentFolder = createFolder(outputFodler, medium, ++pocitadlo);
System.out.println(currentFolder.getAbsolutePath());
File[] listFiles = pdfsFolder.listFiles();
if (listFiles != null) {
Arrays.sort(listFiles, new Comparator<File>() {
@Override
public int compare(File o1, File o2) {
Date modified1 = new Date(o1.lastModified());
Date modified2 = new Date(o2.lastModified());
return modified1.compareTo(modified2);
}
});
for (File file : listFiles) {
if ((bytes+file.length()) > medium.getSize()) {
currentFolder = createFolder(outputFodler, medium, ++pocitadlo);
bytes = 0;
}
bytes += file.length();
file.renameTo(new File(currentFolder, file.getName()));
}
}
}
private static File createFolder(File outputFodler, Medium medium, int pocitadlo) {
File dir = new File(outputFodler, medium.name()+"_"+pocitadlo);
if (!dir.exists()) {dir.mkdirs();}
return dir;
}
private static void generatePDFs(String uuid, File uuidFolder, Injector injector, String djvuUrl, String i18nUrl) {
try {
if (!uuidFolder.exists()) {
uuidFolder.mkdirs();
} else {
File[] files = uuidFolder.listFiles();
if (files != null) {
for (File file : files) { file.deleteOnExit(); }
}
}
FedoraAccess fa = injector.getInstance(Key.get(FedoraAccess.class, Names.named("rawFedoraAccess")));
GeneratePDFService generatePDF = injector.getInstance(GeneratePDFService.class);
LOGGER.info("fedoraAccess.getDC("+uuid+")");
Document dc = fa.getDC(uuid);
LOGGER.info("dcUtils.titleFromDC("+dc+")");
String title = DCUtils.titleFromDC(dc);
LOGGER.info("title is "+title);
GenerateController controller = new GenerateController(uuidFolder, title);
generatePDF.fullPDFExport(uuid, controller, controller, djvuUrl, i18nUrl);
} catch (IOException e) {
LOGGER.log(Level.SEVERE, e.getMessage(), e);
}
}
private static File getTmpDir() {
return new File(System.getProperty("java.io.tmpdir"));
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
ff43d8f8c54313d6952333189ced299dea3b55a1 | af0048b7c1fddba3059ae44cd2f21c22ce185b27 | /springframework/src/main/java/org/springframework/http/codec/protobuf/ProtobufEncoder.java | 3fdb8d6ef48e3d6a80fbc7d2923eb0d18a04a388 | [] | no_license | P79N6A/whatever | 4b51658fc536887c870d21b0c198738ed0d1b980 | 6a5356148e5252bdeb940b45d5bbeb003af2f572 | refs/heads/master | 2020-07-02T19:58:14.366752 | 2019-08-10T14:45:17 | 2019-08-10T14:45:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,845 | java | package org.springframework.http.codec.protobuf;
import com.google.protobuf.Message;
import org.reactivestreams.Publisher;
import org.springframework.core.ResolvableType;
import org.springframework.core.io.buffer.DataBuffer;
import org.springframework.core.io.buffer.DataBufferFactory;
import org.springframework.core.io.buffer.DataBufferUtils;
import org.springframework.http.MediaType;
import org.springframework.http.codec.HttpMessageEncoder;
import org.springframework.lang.Nullable;
import org.springframework.util.MimeType;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import java.io.IOException;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
public class ProtobufEncoder extends ProtobufCodecSupport implements HttpMessageEncoder<Message> {
private static final List<MediaType> streamingMediaTypes = MIME_TYPES.stream().map(mimeType -> new MediaType(mimeType.getType(), mimeType.getSubtype(), Collections.singletonMap(DELIMITED_KEY, DELIMITED_VALUE))).collect(Collectors.toList());
@Override
public boolean canEncode(ResolvableType elementType, @Nullable MimeType mimeType) {
return Message.class.isAssignableFrom(elementType.toClass()) && supportsMimeType(mimeType);
}
@Override
public Flux<DataBuffer> encode(Publisher<? extends Message> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) {
return Flux.from(inputStream).map(message -> encodeValue(message, bufferFactory, !(inputStream instanceof Mono)));
}
@Override
public DataBuffer encodeValue(Message message, DataBufferFactory bufferFactory, ResolvableType valueType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) {
return encodeValue(message, bufferFactory, false);
}
private DataBuffer encodeValue(Message message, DataBufferFactory bufferFactory, boolean delimited) {
DataBuffer buffer = bufferFactory.allocateBuffer();
boolean release = true;
try {
if (delimited) {
message.writeDelimitedTo(buffer.asOutputStream());
} else {
message.writeTo(buffer.asOutputStream());
}
release = false;
return buffer;
} catch (IOException ex) {
throw new IllegalStateException("Unexpected I/O error while writing to data buffer", ex);
} finally {
if (release) {
DataBufferUtils.release(buffer);
}
}
}
@Override
public List<MediaType> getStreamingMediaTypes() {
return streamingMediaTypes;
}
@Override
public List<MimeType> getEncodableMimeTypes() {
return getMimeTypes();
}
}
| [
"heavenlystate@163.com"
] | heavenlystate@163.com |
d4d48bdddd08b100e5097603b7ef902a04606e7f | 3421f2ceee9cbd192dec516a01a2341df657cd86 | /src/test/java/com/example/demo/form/SignupControllerTest.java | b9a63d58751ed0807151b6fa7b2fa29a1e1b97cb | [] | no_license | umanking/inflearn-spring-security | e0aa1d4aa1bfbb707b3bad2194ae098404a692b2 | b83d506e4a8b45a0d30f4b7f399fe4f44bd8e797 | refs/heads/master | 2020-07-21T14:52:03.719433 | 2020-06-25T09:02:45 | 2020-06-25T09:02:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,895 | java | package com.example.demo.form;
import org.hamcrest.CoreMatchers;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureWebMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc;
import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.*;
import static org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.csrf;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@RunWith(SpringRunner.class)
@SpringBootTest
@AutoConfigureMockMvc
public class SignupControllerTest {
@Autowired
MockMvc mockMvc;
@Test
public void sigupFormTest() throws Exception{
mockMvc.perform(get("/signup"))
.andExpect(content().string(containsString("_csrf")))
.andDo(print())
.andExpect(status().isOk());
}
@Test
public void sigupProcessTest() throws Exception {
mockMvc.perform(post("/signup")
.param("username", "andrew")
.param("password", "123")
// csrf 추가
.with(csrf())
).andDo(print())
.andExpect(status().is3xxRedirection());
}
} | [
"umanking@gmail.com"
] | umanking@gmail.com |
4c98ff791ac743888aeb4226add340d636858048 | a7667b6267041dfe584e5b962ba91e7f2cd5272b | /src/main/java/net/minecraft/command/server/CommandBanIp.java | 34e4270b27abe2aede335dea30268e20a8f0190f | [
"MIT"
] | permissive | 8osm/AtomMC | 79925dd6bc3123e494f0671ddaf33caa318ea427 | 9ca248a2e870b3058e90679253d25fdb5b75f41c | refs/heads/master | 2020-06-29T14:08:11.184503 | 2019-08-05T00:44:42 | 2019-08-05T00:44:42 | 200,557,840 | 0 | 0 | MIT | 2019-08-05T00:52:31 | 2019-08-05T00:52:31 | null | UTF-8 | Java | false | false | 3,809 | java | package net.minecraft.command.server;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.annotation.Nullable;
import net.minecraft.command.CommandBase;
import net.minecraft.command.CommandException;
import net.minecraft.command.ICommandSender;
import net.minecraft.command.PlayerNotFoundException;
import net.minecraft.command.WrongUsageException;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.management.UserListIPBansEntry;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextComponentTranslation;
public class CommandBanIp extends CommandBase {
public static final Pattern IP_PATTERN = Pattern.compile("^([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])$");
public String getName() {
return "ban-ip";
}
public int getRequiredPermissionLevel() {
return 3;
}
public boolean checkPermission(MinecraftServer server, ICommandSender sender) {
return server.getPlayerList().getBannedIPs().isLanServer() && super.checkPermission(server, sender);
}
public String getUsage(ICommandSender sender) {
return "commands.banip.usage";
}
public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException {
if (args.length >= 1 && args[0].length() > 1) {
ITextComponent itextcomponent = args.length >= 2 ? getChatComponentFromNthArg(sender, args, 1) : null;
Matcher matcher = IP_PATTERN.matcher(args[0]);
if (matcher.matches()) {
this.banIp(server, sender, args[0], itextcomponent == null ? null : itextcomponent.getUnformattedText());
} else {
EntityPlayerMP entityplayermp = server.getPlayerList().getPlayerByUsername(args[0]);
if (entityplayermp == null) {
throw new PlayerNotFoundException("commands.banip.invalid");
}
this.banIp(server, sender, entityplayermp.getPlayerIP(), itextcomponent == null ? null : itextcomponent.getUnformattedText());
}
} else {
throw new WrongUsageException("commands.banip.usage", new Object[0]);
}
}
public List<String> getTabCompletions(MinecraftServer server, ICommandSender sender, String[] args, @Nullable BlockPos targetPos) {
return args.length == 1 ? getListOfStringsMatchingLastWord(args, server.getOnlinePlayerNames()) : Collections.emptyList();
}
protected void banIp(MinecraftServer server, ICommandSender sender, String ipAddress, @Nullable String banReason) {
UserListIPBansEntry userlistipbansentry = new UserListIPBansEntry(ipAddress, (Date) null, sender.getName(), (Date) null, banReason);
server.getPlayerList().getBannedIPs().addEntry(userlistipbansentry);
List<EntityPlayerMP> list = server.getPlayerList().getPlayersMatchingAddress(ipAddress);
String[] astring = new String[list.size()];
int i = 0;
for (EntityPlayerMP entityplayermp : list) {
entityplayermp.connection.disconnect(new TextComponentTranslation("multiplayer.disconnect.ip_banned", new Object[0]));
astring[i++] = entityplayermp.getName();
}
if (list.isEmpty()) {
notifyCommandListener(sender, this, "commands.banip.success", new Object[]{ipAddress});
} else {
notifyCommandListener(sender, this, "commands.banip.success.players", new Object[]{ipAddress, joinNiceString(astring)});
}
}
} | [
"rostyk1@hotmail.com"
] | rostyk1@hotmail.com |
297b1a14cd1c380d3d3039346d41d6503445649a | 06780aeb787b2dd60e6872631b9dfea4c846545d | /KalturaClient/src/main/java/com/kaltura/client/types/MetroPcsDistributionProviderFilter.java | 32b0dfa5cbf0f2bce6e3b8b6e35d3dfb3744ef25 | [] | no_license | fossabot/KalturaGeneratedAPIClientsAndroid | e74d31a9c86ca06f63cd5107bf3bda5fc4763a92 | ad556110aebe9bebde7b5bf41d5a6332ba9033b8 | refs/heads/master | 2020-05-30T07:01:09.265490 | 2019-05-31T12:42:51 | 2019-05-31T12:42:51 | 189,592,106 | 0 | 0 | null | 2019-05-31T12:42:46 | 2019-05-31T12:42:45 | null | UTF-8 | Java | false | false | 2,895 | java | // ===================================================================================================
// _ __ _ _
// | |/ /__ _| | |_ _ _ _ _ __ _
// | ' </ _` | | _| || | '_/ _` |
// |_|\_\__,_|_|\__|\_,_|_| \__,_|
//
// This file is part of the Kaltura Collaborative Media Suite which allows users
// to do with audio, video, and animation what Wiki platfroms allow them to do with
// text.
//
// Copyright (C) 2006-2019 Kaltura Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, 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 Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// @ignore
// ===================================================================================================
package com.kaltura.client.types;
import android.os.Parcel;
import com.google.gson.JsonObject;
import com.kaltura.client.Params;
import com.kaltura.client.utils.request.MultiRequestBuilder;
/**
* This class was generated using generate.php
* against an XML schema provided by Kaltura.
*
* MANUAL CHANGES TO THIS CLASS WILL BE OVERWRITTEN.
*/
@SuppressWarnings("serial")
@MultiRequestBuilder.Tokenizer(MetroPcsDistributionProviderFilter.Tokenizer.class)
public class MetroPcsDistributionProviderFilter extends MetroPcsDistributionProviderBaseFilter {
public interface Tokenizer extends MetroPcsDistributionProviderBaseFilter.Tokenizer {
}
public MetroPcsDistributionProviderFilter() {
super();
}
public MetroPcsDistributionProviderFilter(JsonObject jsonObject) throws APIException {
super(jsonObject);
}
public Params toParams() {
Params kparams = super.toParams();
kparams.add("objectType", "KalturaMetroPcsDistributionProviderFilter");
return kparams;
}
public static final Creator<MetroPcsDistributionProviderFilter> CREATOR = new Creator<MetroPcsDistributionProviderFilter>() {
@Override
public MetroPcsDistributionProviderFilter createFromParcel(Parcel source) {
return new MetroPcsDistributionProviderFilter(source);
}
@Override
public MetroPcsDistributionProviderFilter[] newArray(int size) {
return new MetroPcsDistributionProviderFilter[size];
}
};
public MetroPcsDistributionProviderFilter(Parcel in) {
super(in);
}
}
| [
"community@kaltura.com"
] | community@kaltura.com |
f693737156bb2d2a36ce3aee95bab24d792027d4 | b31cf5586f210c7c5b5245b6cae47f0ec0c57099 | /itoken-web-posts/src/main/java/com/sen/itoken/web/posts/service/WebPostsService.java | a8007cbb34e9ce7b56b2386e74e2780b74a16462 | [
"Apache-2.0"
] | permissive | sumforest/itoken | 7a012ed55b3e4c9976cc0a6ba94a68a20059d399 | 427f4fa56631d27cf9f40ab4ae3b0b6818cd62ac | refs/heads/master | 2022-11-30T11:18:42.786801 | 2019-10-08T16:24:44 | 2019-10-08T16:24:44 | 205,435,175 | 1 | 0 | Apache-2.0 | 2022-11-16T09:48:46 | 2019-08-30T18:17:48 | Java | UTF-8 | Java | false | false | 1,402 | java | package com.sen.itoken.web.posts.service;
import com.sen.itoken.common.web.service.BaseClientService;
import com.sen.itoken.web.posts.fallback.WebPostsFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
/**
* @Auther: Sen
* @Date: 2019/8/26 23:50
* @Description:
*/
@FeignClient(value = "itoken-service-posts",fallback = WebPostsFallback.class)
public interface WebPostsService extends BaseClientService {
@RequestMapping(value = "v1/posts/page/{pageNum}/{pageSize}", method = RequestMethod.GET)
String page(
@PathVariable(required = true, value = "pageNum") int pageNum,
@PathVariable(required = true, value = "pageSize") int pageSize,
@RequestParam(required = false, value = "tbPostsPostJson") String tbPostsPostJson
);
@RequestMapping(value = "v1/psots/{postGuid}", method = RequestMethod.GET)
String getPostsById(@PathVariable(value = "postGuid") String postGuid);
@RequestMapping(value = "v1/posts",method = RequestMethod.POST)
String save(@RequestParam(value = "tbPostsJson") String tbPostsJson,
@RequestParam(value = "optsBy") String optsBy);
}
| [
"12345678"
] | 12345678 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.