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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0d768ef48c41e8a0bc90950be9137a3cc8df8a2b
|
223bb37709c01a21509df653f1453d5cc0badc57
|
/java-example-spring/src/main/java/com/goodsave/example/spring/cglibdynamicproxy/AccountCglibProxyFactory.java
|
85aa991f744c9b2643a908cc6eb0a255f55cf984
|
[
"Apache-2.0"
] |
permissive
|
goodsave/java-example
|
99fc57f18cac4fe4bcfda688158997ad86f71706
|
67802e8a202ac693b3e1a0042e01bf0fba943d26
|
refs/heads/master
| 2021-04-03T07:03:36.041482
| 2018-03-16T12:30:08
| 2018-03-16T12:30:08
| 124,855,220
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,761
|
java
|
package com.goodsave.example.spring.cglibdynamicproxy;
/**
* AccountCglibProxyFactory
* Created by Joker on 2017/7/27.
*/
import net.sf.cglib.proxy.Enhancer;
import net.sf.cglib.proxy.MethodInterceptor;
import net.sf.cglib.proxy.MethodProxy;
import java.lang.reflect.Method;
public class AccountCglibProxyFactory implements MethodInterceptor {
private Object target;
public Object getInstance(Object target) {
this.target = target;
return Enhancer.create(this.target.getClass(), this);
// Enhancer enhancer = new Enhancer();//该类用于生成代理对象
// enhancer.setSuperclass(this.target.getClass());//设置父类
// enhancer.setCallback(this);//设置回调用对象为本身
// return enhancer.create();
}
@Override
public Object intercept(Object obj, Method method, Object[] args, MethodProxy methodProxy) throws Throwable {
// 排除Object类中的toString等方法
boolean objFlag = method.getDeclaringClass().getName().equals("java.lang.Object");
if (!objFlag) {
System.out.println("before");
}
Object result = null;
// 我们一般使用proxy.invokeSuper(obj,args)方法。这个很好理解,就是执行原始类的方法。还有一个方法proxy.invoke(obj,args),这是执行生成子类的方法。
// 如果传入的obj就是子类的话,会发生内存溢出,因为子类的方法不挺地进入intercept方法,而这个方法又去调用子类的方法,两个方法直接循环调用了。
result = methodProxy.invokeSuper(obj, args);
// result = methodProxy.invoke(obj, args);
if (!objFlag) {
System.out.println("after");
}
return result;
}
}
|
[
"goodsave@qq.com"
] |
goodsave@qq.com
|
cf23b4f1204416d1ef0121deb90ddf6cbe02d197
|
d855638c0d2c86c89d58f69d788d08bf1ede752e
|
/manufacturing-admin-api/src/main/java/com/walrus/manufacturing/admin/web/AdminDashbordController.java
|
4e54d558f1d0a8eb3d4e4e00c87b52a4955944c2
|
[] |
no_license
|
coco-iot/walrus-intelligent-manufacturing
|
2290008ca933408b1063ca61b8e3a50b2e5e2162
|
62b7303d2d9edc1081c51932cd333cf8a00ef3ed
|
refs/heads/master
| 2022-12-14T08:50:55.199833
| 2020-09-25T10:35:34
| 2020-09-25T10:35:34
| 297,271,832
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,806
|
java
|
package com.walrus.manufacturing.admin.web;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.walrus.manufacturing.core.util.ResponseUtil;
import com.walrus.manufacturing.db.service.ManufacturingGoodsProductService;
import com.walrus.manufacturing.db.service.ManufacturingGoodsService;
import com.walrus.manufacturing.db.service.ManufacturingOrderService;
import com.walrus.manufacturing.db.service.ManufacturingUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.Map;
@RestController
@RequestMapping("/admin/dashboard")
@Validated
public class AdminDashbordController {
private final Log logger = LogFactory.getLog(AdminDashbordController.class);
@Autowired
private ManufacturingUserService userService;
@Autowired
private ManufacturingGoodsService goodsService;
@Autowired
private ManufacturingGoodsProductService productService;
@Autowired
private ManufacturingOrderService orderService;
@GetMapping("")
public Object info() {
int userTotal = userService.count();
int goodsTotal = goodsService.count();
int productTotal = productService.count();
int orderTotal = orderService.count();
Map<String, Integer> data = new HashMap<>();
data.put("userTotal", userTotal);
data.put("goodsTotal", goodsTotal);
data.put("productTotal", productTotal);
data.put("orderTotal", orderTotal);
return ResponseUtil.ok(data);
}
}
|
[
"zhangchunsheng423@gmail.com"
] |
zhangchunsheng423@gmail.com
|
6ac1d2ea37c6113449276873366101da64d11c26
|
75f783d1960f90b8c76fa6277da5b2f8c0bae7aa
|
/marathon-core/src/main/java/net/sourceforge/marathon/runtime/api/ISubPropertiesPanel.java
|
109b0e31978c30a7abce3bee2a27b1ce5f52c6d0
|
[
"Apache-2.0"
] |
permissive
|
paul-hammant/MarathonManV4
|
572d1de4ccf67c4a7b2779cc0fff2ace24aeee06
|
5df4650ae1cdd24a2a077e2cfb96695538864845
|
refs/heads/master
| 2023-08-27T10:36:39.310075
| 2016-06-30T05:13:31
| 2016-06-30T05:13:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 910
|
java
|
/*******************************************************************************
* Copyright 2016 Jalian Systems Pvt. Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*******************************************************************************/
package net.sourceforge.marathon.runtime.api;
public interface ISubPropertiesPanel extends IPropertiesPanel {
abstract int getMnemonic();
}
|
[
"dakshinamurthy.karra@jaliansystems.com"
] |
dakshinamurthy.karra@jaliansystems.com
|
b355264a7faf58f16e0e2ec1a5e6a9d1eb29707f
|
62774e6de56acf8c4d4d014f1f5ee709feef6502
|
/car-dealer/src/main/java/com/mkolongo/cardealer/dtos/viewDtos/SaleViewDto.java
|
357ffc6ca44a3670c6e9b26e212d9f3b62fc86ca
|
[] |
no_license
|
Chris-Mk/Hibernate
|
35a9c42679ad6d20925c96d6d3929ad86649f700
|
eb338734c0136d5292e06f7ab2688e4fda31d93c
|
refs/heads/master
| 2023-07-24T00:20:36.222180
| 2023-07-19T19:29:16
| 2023-07-19T19:29:16
| 205,900,454
| 0
| 0
| null | 2023-07-19T19:29:18
| 2019-09-02T16:56:37
|
Java
|
UTF-8
|
Java
| false
| false
| 163
|
java
|
package com.mkolongo.cardealer.dtos.viewDtos;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class SaleViewDto {
private String name;
}
|
[
"chrismks23@gmail.com"
] |
chrismks23@gmail.com
|
d322366e9fc5b39232b3b987ea2b041ff9322c2d
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/54/org/apache/commons/math/linear/CholeskyDecomposition_getDeterminant_65.java
|
709793230c2cd5a2f37adfb248effe93fe6db7c0
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 977
|
java
|
org apach common math linear
class implement algorithm calcul
choleski decomposit real symmetr posit definit matrix
choleski decomposit real symmetr posit definit
matrix consist lower triangular matrix size
sens squar root
base similar
href http math nist gov javanumer jama jama librari
link getlt getlt method ad
code isspd code method remov constructor
implement class expect link posit definit matrix except nonpositivedefinitematrixexcept
matrix decompos
link determin getdetermin determin getdetermin method ad
code solv code method replac link
solver getsolv solver getsolv method equival method provid
return link decomposit solver decompositionsolv
href http mathworld wolfram choleski decomposit choleskydecomposit html math world mathworld
href http wikipedia org wiki choleski decomposit wikipedia
version revis date
choleski decomposit choleskydecomposit
return determin matrix
determin matrix
determin getdetermin
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
e78145b9706339abf8c74f7ee60e11bd411436d2
|
4e8d52f594b89fa356e8278265b5c17f22db1210
|
/WebServiceArtifacts/CI_CI_PERSONAL_DATA/com/oracle/xmlns/enterprise/tools/schemas/m1080144/PROPEDUCATIONLVLBRATypeShape.java
|
ad4feaed7cc1f11fa66ee853ccc80a5e840f85e9
|
[] |
no_license
|
ouniali/WSantipatterns
|
dc2e5b653d943199872ea0e34bcc3be6ed74c82e
|
d406c67efd0baa95990d5ee6a6a9d48ef93c7d32
|
refs/heads/master
| 2021-01-10T05:22:19.631231
| 2015-05-26T06:27:52
| 2015-05-26T06:27:52
| 36,153,404
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,383
|
java
|
package com.oracle.xmlns.enterprise.tools.schemas.m1080144;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
/**
* <p>Java class for PROP_EDUCATION_LVL_BRATypeShape complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="PROP_EDUCATION_LVL_BRATypeShape">
* <simpleContent>
* <extension base="<http://xmlns.oracle.com/Enterprise/Tools/schemas/M1080144.V1>PROP_EDUCATION_LVL_BRATypeDef">
* </extension>
* </simpleContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "PROP_EDUCATION_LVL_BRATypeShape", propOrder = {
"value"
})
public class PROPEDUCATIONLVLBRATypeShape {
@XmlValue
protected String value;
/**
* Gets the value of the value property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setValue(String value) {
this.value = value;
}
}
|
[
"ouni_ali@yahoo.fr"
] |
ouni_ali@yahoo.fr
|
07ab793470a809d51cbbb7be2e784329374db4ff
|
2a9b95689c9ac4a0adb0e0aae5291a4c891dcb6e
|
/KnockKnockClient.java
|
45cf9746ad68fd262c6164f54a711bd715694a01
|
[] |
no_license
|
pconrad/java-sockets-demo
|
20487e31783d32cad2a588ef7de1ddcfaea4ab89
|
154c89abff9a831bd5ac72d53963c161c4a7cea3
|
refs/heads/master
| 2021-01-10T05:30:56.462076
| 2016-02-17T18:15:00
| 2016-02-17T18:15:00
| 51,941,401
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,338
|
java
|
/*
* Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of Oracle or the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
import java.io.*;
import java.net.*;
public class KnockKnockClient {
public static void main(String[] args) throws IOException {
String hostname = "csil.cs.ucsb.edu";
final int DEFAULT_PORT = 4444;
int port = DEFAULT_PORT;
if (args.length >= 1)
hostname = args[0];
if (args.length >= 2) {
try {
port = Integer.parseInt(args[1]);
} catch (NumberFormatException nfe) {
System.err.println("Error: " + args[1] + " not a valid port");
System.exit(1);
};
}
Socket kkSocket = null;
PrintWriter out = null;
BufferedReader in = null;
try {
kkSocket = new Socket(hostname, port);
out = new PrintWriter(kkSocket.getOutputStream(), true);
in = new BufferedReader(new InputStreamReader(kkSocket.getInputStream()));
} catch (UnknownHostException e) {
System.err.println("Don't know about host: " + hostname +".");
System.exit(1);
} catch (IOException e) {
System.err.println("Couldn't get I/O for the connection to: " + hostname +".");
System.exit(1);
}
BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in));
String fromServer;
String fromUser;
while ((fromServer = in.readLine()) != null) {
System.out.println("Server: " + fromServer);
if (fromServer.equals("Bye."))
break;
fromUser = stdIn.readLine();
if (fromUser != null) {
System.out.println("Client: " + fromUser);
out.println(fromUser);
}
}
out.close();
in.close();
stdIn.close();
kkSocket.close();
}
}
|
[
"pconrad@cs.ucsb.edu"
] |
pconrad@cs.ucsb.edu
|
ad0ccc97cdab8c97c797f82409b842cec475f6b2
|
9f38c66cd0b9a5dc252e6af9a3adc804915ff0e9
|
/java/src/designpatterns/apps/paint/designpatternsproject/shapes/square/Square.java
|
9dbac6123c9e17bcdb408fe896f85d1b8b712871
|
[
"MIT"
] |
permissive
|
vuquangtin/designpattern
|
4d4a7d09780a0ebde6b12f8edf589b6f45b38f62
|
fc672493ef31647bd02c4122ab01992fca14675f
|
refs/heads/master
| 2022-09-12T07:00:42.637733
| 2020-09-29T04:20:50
| 2020-09-29T04:20:50
| 225,505,298
| 0
| 0
| null | 2022-09-01T23:16:34
| 2019-12-03T01:41:33
|
Java
|
UTF-8
|
Java
| false
| false
| 3,796
|
java
|
package designpatternsproject.shapes.square;
import java.awt.Color;
import java.awt.Graphics;
import designpatternsproject.shapes.Moveable;
import designpatternsproject.shapes.Shape;
import designpatternsproject.shapes.SurfaceShape;
import designpatternsproject.shapes.line.Line;
import designpatternsproject.shapes.point.Point;
public class Square extends SurfaceShape implements Moveable {
/**
*
*/
private static final long serialVersionUID = 3852248466683549584L;
protected Point upperLeft;
protected int sideLength;
public Square(Point upperLeft, int sideLength) {
this.upperLeft = upperLeft;
this.sideLength = sideLength;
}
public Square(Point upperLeft, int sideLength, Color outer) {
this(upperLeft, sideLength);
setColor(outer);
}
public Square(Point upperLeft, int sideLength, Color outer, Color inner) {
this(upperLeft, sideLength, outer);
setInnerColor(inner);
}
/**
* Will return diagonal line of square
*
* @return
*/
public Line diagonal() {
return new Line(upperLeft, new Point(upperLeft.getX() + sideLength, upperLeft.getY() + sideLength));
}
/**
* Will return point that is center of square
*
* @return
*/
public Point center() {
return diagonal().lineCenter();
}
/**
* Will calculate surface area of square
*
* @return
*/
public int surfaceArea() {
return sideLength * sideLength;
}
/**
* Will calculate volume of square
*
* @return
*/
public int volume() {
return 4 * sideLength;
}
@Override
public boolean equals(Object obj) {
if (obj instanceof Square) {
Square castedObj = (Square) obj;
return upperLeft.equals(castedObj.getUpperLeft()) && sideLength == castedObj.getSideLength();
}
return false;
}
@Override
public String toString() {
return String.format("Square(UpperX=%d,UpperY=%d,a=%d,outercolor=[%d-%d-%d],innercolor=[%d-%d-%d])",
upperLeft.getX(), upperLeft.getY(), sideLength, getColor().getRed(), getColor().getGreen(),
getColor().getBlue(), getInnerColor().getRed(), getInnerColor().getGreen(), getInnerColor().getBlue());
}
@Override
public int compareTo(Shape o) {
if (o instanceof Square) {
Square castedObj = (Square) o;
return surfaceArea() - castedObj.surfaceArea();
}
return 0;
}
@Override
public void fill(Graphics g) {
g.setColor(getInnerColor());
g.fillRect(upperLeft.getX() + 1, upperLeft.getY() + 1, sideLength - 1, sideLength - 1);
}
@Override
public void draw(Graphics g) {
g.setColor(getColor());
g.drawRect(upperLeft.getX(), upperLeft.getY(), sideLength, sideLength);
fill(g);
if (isSelected())
selected(g);
}
@Override
public void selected(Graphics g) {
g.setColor(Color.BLUE);
new Line(upperLeft, new Point(upperLeft.getX() + sideLength, upperLeft.getY())).selected(g);
new Line(upperLeft, new Point(upperLeft.getX(), upperLeft.getY() + sideLength)).selected(g);
new Line(new Point(upperLeft.getX() + sideLength, upperLeft.getY()), diagonal().getPtEnd()).selected(g);
new Line(new Point(upperLeft.getX(), upperLeft.getY() + sideLength), diagonal().getPtEnd()).selected(g);
}
@Override
public boolean contains(int x, int y) {
return upperLeft.getX() <= x && x <= (upperLeft.getX() + sideLength) && upperLeft.getY() <= y
&& y <= (upperLeft.getY() + sideLength);
}
@Override
public void moveTo(int x, int y) {
upperLeft.setX(x);
upperLeft.setY(y);
}
@Override
public void moveFor(int x, int y) {
upperLeft.setX(upperLeft.getX() + x);
upperLeft.setY(upperLeft.getY() + y);
}
public Point getUpperLeft() {
return upperLeft;
}
public void setUpperLeft(Point upperLeft) {
this.upperLeft = upperLeft;
}
public int getSideLength() {
return sideLength;
}
public void setSideLength(int sideLength) {
this.sideLength = sideLength;
}
}
|
[
"tinvuquang@admicro.vn"
] |
tinvuquang@admicro.vn
|
8d0240408b5b88582298fde5e7b1eb717bf94a41
|
50ca020d5dcc4c6ccb717374d4cc2d84b751dd1d
|
/Shubham/Java skillup/day 09-11/a1/LoaderProcess.java
|
7fcfa15e3359693a11f89b3f03c0965e14010299
|
[] |
no_license
|
VARADSP/NeedThisCode
|
16156b7c04040bf823bb8ba128abb326107071d5
|
19e2c8d1b2c4e91f3d5e0314e5be360ec247f8a8
|
refs/heads/master
| 2020-06-23T14:00:20.743123
| 2019-09-05T17:16:17
| 2019-09-05T17:16:17
| 198,641,644
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 611
|
java
|
/**
*
*/
package com.uks.jvs.day09to11.a1;
/**
* @author: Shubham Bujurge
* Created Date:17/05/2019 10: 18 AM
* Assignment: Day 9-11
* Task: Demo Application
*
*/
public class LoaderProcess implements Runnable{
ReadConfiguration objReadConfiguration = null;
Thread thLoaderProcess = null;
//execution start of LoaderProcess
public void run(){
try{
objReadConfiguration = new ReadConfiguration();
thLoaderProcess = new Thread((Runnable) objReadConfiguration);
thLoaderProcess.setPriority(10);
thLoaderProcess.start();
}catch(Exception e){
objReadConfiguration = null;
}
}
}
|
[
"parlikarvarad@gmail.com"
] |
parlikarvarad@gmail.com
|
703ded7935cc7932ea6aebf4d5af87e341e49f67
|
22ca777d5fb55d7270f5b7b12af409e42721d4fa
|
/src/main/java/com/basic/datastruct/unionfind/UF.java
|
9db615ba757854d0c5241e50025318378d62432b
|
[] |
no_license
|
Yommmm/Java-Basic
|
73d1f8ef59ba6186f7169f0dd885cbe7a21d2094
|
fec3793a1284ac53676daf71547f53469b33e042
|
refs/heads/master
| 2021-05-26T05:14:27.590319
| 2020-05-15T15:43:04
| 2020-05-15T15:43:04
| 127,542,927
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 165
|
java
|
package com.basic.datastruct.unionfind;
public interface UF {
int getSize();
boolean isConnected(int p, int q);
void unionElements(int p, int q);
}
|
[
"yangzhiwen@chalco-steering.com"
] |
yangzhiwen@chalco-steering.com
|
2ad8bfad381689335a52860e7bbfaaee62edc260
|
24bf0692593b9c80a2fd51b89ab74f9c62d77042
|
/rxretrofitlibrary/src/main/java/com/wzgiceman/rxretrofitlibrary/retrofit_rx/downlaod/DaoMaster.java
|
7cd92ea109b0493ff1a6809c4a33357b28fcd75d
|
[] |
no_license
|
836948082/MVPProject
|
a0c9d22572d592c33312770f5362d8ec00efabf1
|
602c5015d256f47331dd197796a10b58942ce868
|
refs/heads/master
| 2021-01-22T05:38:09.205598
| 2017-05-26T07:33:29
| 2017-05-26T07:33:29
| 92,484,648
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,509
|
java
|
package com.wzgiceman.rxretrofitlibrary.retrofit_rx.downlaod;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.util.Log;
import org.greenrobot.greendao.AbstractDaoMaster;
import org.greenrobot.greendao.database.StandardDatabase;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.database.DatabaseOpenHelper;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import com.wzgiceman.rxretrofitlibrary.retrofit_rx.http.cookie.CookieResulteDao;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* Master of DAO (schema version 1): knows all DAOs.
*/
public class DaoMaster extends AbstractDaoMaster {
public static final int SCHEMA_VERSION = 1;
/** Creates underlying database table using DAOs. */
public static void createAllTables(Database db, boolean ifNotExists) {
DownInfoDao.createTable(db, ifNotExists);
CookieResulteDao.createTable(db, ifNotExists);
}
/** Drops underlying database table using DAOs. */
public static void dropAllTables(Database db, boolean ifExists) {
DownInfoDao.dropTable(db, ifExists);
CookieResulteDao.dropTable(db, ifExists);
}
/**
* WARNING: Drops all table on Upgrade! Use only during development.
* Convenience method using a {@link DevOpenHelper}.
*/
public static DaoSession newDevSession(Context context, String name) {
Database db = new DevOpenHelper(context, name).getWritableDb();
DaoMaster daoMaster = new DaoMaster(db);
return daoMaster.newSession();
}
public DaoMaster(SQLiteDatabase db) {
this(new StandardDatabase(db));
}
public DaoMaster(Database db) {
super(db, SCHEMA_VERSION);
registerDaoClass(DownInfoDao.class);
registerDaoClass(CookieResulteDao.class);
}
public DaoSession newSession() {
return new DaoSession(db, IdentityScopeType.Session, daoConfigMap);
}
public DaoSession newSession(IdentityScopeType type) {
return new DaoSession(db, type, daoConfigMap);
}
/**
* Calls {@link #createAllTables(Database, boolean)} in {@link #onCreate(Database)} -
*/
public static abstract class OpenHelper extends DatabaseOpenHelper {
public OpenHelper(Context context, String name) {
super(context, name, SCHEMA_VERSION);
}
public OpenHelper(Context context, String name, CursorFactory factory) {
super(context, name, factory, SCHEMA_VERSION);
}
@Override
public void onCreate(Database db) {
Log.i("greenDAO", "Creating tables for schema version " + SCHEMA_VERSION);
createAllTables(db, false);
}
}
/** WARNING: Drops all table on Upgrade! Use only during development. */
public static class DevOpenHelper extends OpenHelper {
public DevOpenHelper(Context context, String name) {
super(context, name);
}
public DevOpenHelper(Context context, String name, CursorFactory factory) {
super(context, name, factory);
}
@Override
public void onUpgrade(Database db, int oldVersion, int newVersion) {
Log.i("greenDAO", "Upgrading schema from version " + oldVersion + " to " + newVersion + " by dropping all tables");
dropAllTables(db, true);
onCreate(db);
}
}
}
|
[
"836948082@qq.com"
] |
836948082@qq.com
|
821b65f40abf71de9370f062c75de730a97142b6
|
d0c2e6cda632f366d387ae8475ead1a834138554
|
/app/src/main/java/com/ranglerz/trivialdrivesample/util/Security.java
|
acc25eb9fe8ee3485d57ae800f3cd2f9706a84d8
|
[
"Apache-2.0"
] |
permissive
|
Shoaib3008757/TrivialDrive
|
3e4d6b3c510f57ceddcee43fd9b65189a5f4520f
|
f681ad743dd7aca0d3eaabbf4dadc2312d8356f2
|
refs/heads/master
| 2021-01-22T22:39:00.387049
| 2017-03-20T10:15:37
| 2017-03-20T10:15:37
| 85,562,691
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,993
|
java
|
/* Copyright (c) 2012 Google 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.ranglerz.trivialdrivesample.util;
import android.text.TextUtils;
import android.util.Base64;
import android.util.Log;
import java.security.InvalidKeyException;
import java.security.KeyFactory;
import java.security.NoSuchAlgorithmException;
import java.security.PublicKey;
import java.security.Signature;
import java.security.SignatureException;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.X509EncodedKeySpec;
/**
* Security-related methods. For a secure implementation, all of this code
* should be implemented on a server that communicates with the
* application on the device. For the sake of simplicity and clarity of this
* example, this code is included here and is executed on the device. If you
* must verify the purchases on the phone, you should obfuscate this code to
* make it harder for an attacker to replace the code with stubs that treat all
* purchases as verified.
*/
public class Security {
private static final String TAG = "IABUtil/Security";
private static final String KEY_FACTORY_ALGORITHM = "RSA";
private static final String SIGNATURE_ALGORITHM = "SHA1withRSA";
/**
* Verifies that the data was signed with the given signature, and returns
* the verified purchase. The data is in JSON format and signed
* with a private key. The data also contains the {@link PurchaseState}
* and product ID of the purchase.
* @param base64PublicKey the base64-encoded public key to use for verifying.
* @param signedData the signed JSON string (signed, not encrypted)
* @param signature the signature for the data, signed with the private key
*/
public static boolean verifyPurchase(String base64PublicKey, String signedData, String signature) {
if (TextUtils.isEmpty(signedData) || TextUtils.isEmpty(base64PublicKey) ||
TextUtils.isEmpty(signature)) {
Log.e(TAG, "Purchase verification failed: missing data.");
return false;
}
PublicKey key = Security.generatePublicKey(base64PublicKey);
return Security.verify(key, signedData, signature);
}
/**
* Generates a PublicKey instance from a string containing the
* Base64-encoded public key.
*
* @param encodedPublicKey Base64-encoded public key
* @throws IllegalArgumentException if encodedPublicKey is invalid
*/
public static PublicKey generatePublicKey(String encodedPublicKey) {
try {
byte[] decodedKey = Base64.decode(encodedPublicKey, Base64.DEFAULT);
KeyFactory keyFactory = KeyFactory.getInstance(KEY_FACTORY_ALGORITHM);
return keyFactory.generatePublic(new X509EncodedKeySpec(decodedKey));
} catch (NoSuchAlgorithmException e) {
throw new RuntimeException(e);
} catch (InvalidKeySpecException e) {
Log.e(TAG, "Invalid key specification.");
throw new IllegalArgumentException(e);
}
}
/**
* Verifies that the signature from the server matches the computed
* signature on the data. Returns true if the data is correctly signed.
*
* @param publicKey public key associated with the developer account
* @param signedData signed data from server
* @param signature server signature
* @return true if the data and signature match
*/
public static boolean verify(PublicKey publicKey, String signedData, String signature) {
byte[] signatureBytes;
try {
signatureBytes = Base64.decode(signature, Base64.DEFAULT);
} catch (IllegalArgumentException e) {
Log.e(TAG, "Base64 decoding failed.");
return false;
}
try {
Signature sig = Signature.getInstance(SIGNATURE_ALGORITHM);
sig.initVerify(publicKey);
sig.update(signedData.getBytes());
if (!sig.verify(signatureBytes)) {
Log.e(TAG, "Signature verification failed.");
return false;
}
return true;
} catch (NoSuchAlgorithmException e) {
Log.e(TAG, "NoSuchAlgorithmException.");
} catch (InvalidKeyException e) {
Log.e(TAG, "Invalid key specification.");
} catch (SignatureException e) {
Log.e(TAG, "Signature exception.");
}
return false;
}
}
|
[
"shoaibanwar.vu@gmail.com"
] |
shoaibanwar.vu@gmail.com
|
f9e98fad1a958b1cb295592a55135a7e326cd21d
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/6/6_800d44c7222af407404ae0e507954f3da9a01654/package-info/6_800d44c7222af407404ae0e507954f3da9a01654_package-info_t.java
|
2afd495295aa0d3295d25a3678eb4e3ac9d329d9
|
[] |
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
| 156
|
java
|
@HtmlStyleSheet(value = "stylesheets/main.css", inline = true)
package com.github.t1.webresource;
import com.github.t1.webresource.codec.HtmlStyleSheet;
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
d93b834ccb937a0ea858b6222ac0900a05d61db5
|
45db437a92ed81e6c8f35b509f7296fc249ea33b
|
/seckill/src/main/java/com/viscu/seckill/rabbitmq/MQReceiver.java
|
2ae721985ea5ff4b720d801f85638533071ee4b5
|
[] |
no_license
|
ostreamBaba/SecKillDemo
|
76aac70014c33f6191650a7d59488252938d81be
|
ac923c5808e77e6ee58652fbb26f2e86abdf90be
|
refs/heads/master
| 2020-04-12T10:59:52.286000
| 2018-12-19T18:06:07
| 2018-12-19T18:06:07
| 162,446,615
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,811
|
java
|
package com.viscu.seckill.rabbitmq;
import com.viscu.seckill.domain.SeckillOrder;
import com.viscu.seckill.domain.SkUser;
import com.viscu.seckill.redis.RedisService;
import com.viscu.seckill.service.GoodsService;
import com.viscu.seckill.service.OrderService;
import com.viscu.seckill.service.SeckillService;
import com.viscu.seckill.vo.GoodsVo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @ Create by ostreamBaba on 18-12-18
* @ 四种模式
*/
@Service
public class MQReceiver {
private static final Logger LOGGER = LoggerFactory.getLogger(MQReceiver.class);
@Autowired
private GoodsService goodsService;
@Autowired
private OrderService orderService;
@Autowired
private SeckillService seckillService;
@RabbitListener(queues = MQConfig.SEC_KILL_QUEUE)
public void receiveSecKill(String message){
LOGGER.info("receive message: "+message);
SeckillMessage msg = RedisService.jsonToBean(message, SeckillMessage.class);
SkUser user = msg.getUser();
long goodsId = msg.getGoodsId();
//判断库存
GoodsVo goods = goodsService.getGoodsVoByGoodsId(goodsId);
int stock = goods.getGoodsStock();
if(stock == 0){
return;
}
//判断是否已经秒杀到了
SeckillOrder order = orderService.getSeckillOrderByUserIdAndGoodsId(user.getId(), goodsId);
if(order != null){
return;
}
//减库存 下订单 写入订单
seckillService.seckill(user, goods);
}
//Direct模式 交换机Exchange
//监听队列
@RabbitListener(queues = MQConfig.MESSAGE_QUEUE)
public void receive(String message){
LOGGER.info("receive message: "+message);
}
@RabbitListener(queues = MQConfig.TOPIC_QUEUE_1)
public void receiveTopic1(String message){
LOGGER.info("topic queue1 receive message: "+message);
}
@RabbitListener(queues = MQConfig.TOPIC_QUEUE_2)
public void receiveTopic2(String message){
LOGGER.info("topic queue2 receive message: "+message);
}
@RabbitListener(queues = MQConfig.FANOUT_QUEUE_1)
public void receiveFanout1(String message){
LOGGER.info("fanout queue1 receive message: "+message);
}
@RabbitListener(queues = MQConfig.FANOUT_QUEUE_2)
public void receiveFanout2(String message){
LOGGER.info("fanout queue2 receive message: "+message);
}
@RabbitListener(queues = MQConfig.HEADER_QUEUE)
public void receiveHeader(byte[] message){
LOGGER.info("header queue receive message: "+new String(message));
}
}
|
[
"1160832305@qq.com"
] |
1160832305@qq.com
|
cffd546e9f77d85d96663bbbd14f723c379786de
|
41bac86d728e5f900e3d60b5a384e7f00c966f5b
|
/communote/webapp/src/main/java/com/communote/server/web/commons/filter/IpRangeChannelFilter.java
|
f8ab5af92933bea91ee19c7cdb5e23c9d51bac9b
|
[
"Apache-2.0"
] |
permissive
|
Communote/communote-server
|
f6698853aa382a53d43513ecc9f7f2c39f527724
|
e6a3541054baa7ad26a4eccbbdd7fb8937dead0c
|
refs/heads/master
| 2021-01-20T19:13:11.466831
| 2019-02-02T18:29:16
| 2019-02-02T18:29:16
| 61,822,650
| 27
| 4
|
Apache-2.0
| 2018-12-08T19:19:06
| 2016-06-23T17:06:40
|
Java
|
UTF-8
|
Java
| false
| false
| 7,695
|
java
|
package com.communote.server.web.commons.filter;
import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.util.Assert;
import com.communote.server.api.ServiceLocator;
import com.communote.server.api.core.application.CommunoteRuntime;
import com.communote.server.api.core.common.ClientAndChannelContextHolder;
import com.communote.server.api.core.config.type.ClientProperty;
import com.communote.server.core.security.iprange.InvalidIpAddressException;
import com.communote.server.core.security.iprange.IpRangeFilterManagement;
import com.communote.server.model.security.ChannelType;
import com.communote.server.persistence.security.ChannelTypeEnum;
import com.communote.server.web.commons.MessageHelper;
/**
* IP range channel filter
*
* @author Communote GmbH - <a href="http://www.communote.com/">http://www.communote.com/</a>
*/
public class IpRangeChannelFilter implements Filter, InitializingBean {
/** Logger. */
private final static Logger LOGGER = LoggerFactory.getLogger(IpRangeChannelFilter.class);
private ChannelType channelType;
private String errorPage;
// error code to return
private int httpErrorCode;
// error message to return when sending the error code
private String httpErrorMessageKey;
private IpRangeFilterManagement ipRangeFilterManagement;
/**
* {@inheritDoc}
*/
@Override
public void afterPropertiesSet() throws Exception {
Assert.notNull(httpErrorMessageKey, "httpErrorMessageKey must be set.");
Assert.notNull(httpErrorCode, "httpErrorCode must be set.");
}
/**
* {@inheritDoc}
*/
@Override
public void destroy() {
// nothing to do
}
/**
* set channel type to {@link ClientAndChannelContextHolder} check ip {@inheritDoc}
*/
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain)
throws IOException, ServletException {
ClientAndChannelContextHolder.setChannel(channelType);
String remoteAddr = request.getRemoteAddr();
try {
boolean isInRange = getIpRangeFilterManagement().isInRange(remoteAddr, channelType);
if (isInRange) {
filterChain.doFilter(request, response);
} else {
handleIpBlocked((HttpServletRequest) request, (HttpServletResponse) response,
remoteAddr);
}
} catch (InvalidIpAddressException e) {
throw new ServletException("IP: " + remoteAddr, e);
}
}
/**
* Gets the channel name.
*
* @return channel name
*/
public String getChannelName() {
return channelType.getValue();
}
/**
* Returns the IP-range filter management.
*
* @return the IP-range filter management
*/
private IpRangeFilterManagement getIpRangeFilterManagement() {
if (ipRangeFilterManagement == null) {
ipRangeFilterManagement = ServiceLocator.instance().getService(
IpRangeFilterManagement.class);
}
return ipRangeFilterManagement;
}
/**
* If an errorPage is defined a forward will occur and the the messages to be displayed will be
* stored in the request as error messages. If the errorPage is undefined the httpErrorCode will
* be sent and the message identified by httpErrorMessageKey will be set.
*
* @param request
* the blocked request
* @param response
* the response to return
* @param remoteAddr
* the blocked IP address
* @throws ServletException
* when the forward fails
* @throws IOException
* when writing the response fails
*/
private void handleIpBlocked(HttpServletRequest request, HttpServletResponse response,
String remoteAddr) throws ServletException, IOException {
LOGGER.info("Access denied for blocked IP: " + remoteAddr);
if (this.errorPage != null) {
MessageHelper.saveErrorMessage(request, MessageHelper.getText(request,
"blog.portal.ip.blocked.message", new Object[] { remoteAddr }));
String supportEmail = CommunoteRuntime.getInstance().getConfigurationManager()
.getClientConfigurationProperties()
.getProperty(ClientProperty.SUPPORT_EMAIL_ADDRESS);
String link = "<a href=\"mailto:" + supportEmail + "\">" + supportEmail + "</a>";
MessageHelper.saveErrorMessage(request, MessageHelper.getText(request,
"blog.portal.ip.blocked.support", new Object[] { link }));
// set status code and not sending error to avoid forward to application-wide
// error-page
response.setStatus(httpErrorCode);
RequestDispatcher rd = request.getRequestDispatcher(response.encodeURL(this.errorPage));
rd.forward(request, response);
}
if (!response.isCommitted()) {
response.sendError(httpErrorCode, MessageHelper.getText(request, httpErrorMessageKey,
new Object[] { remoteAddr }));
}
}
/**
* {@inheritDoc}
*/
@Override
public void init(FilterConfig filterConfig) throws ServletException {
// nothing to do
}
/**
* Sets channel type.
*
* @param channelName
* name of channel
*/
public void setChannelName(String channelName) {
this.channelType = ChannelTypeEnum.fromString(channelName);
}
/**
* The error page to use. Must begin with a "/" and is interpreted relative to the current
* context root.
*
* @param errorPage
* the dispatcher path to display
* @throws IllegalArgumentException
* if the argument doesn't comply with the above limitations
*/
public void setErrorPage(String errorPage) {
if (errorPage != null && !errorPage.startsWith("/")) {
throw new IllegalArgumentException("ErrorPage must begin with '/'");
}
this.errorPage = errorPage;
}
/**
* Sets the HTTP error code to be returned when the IP is blocked.
*
* @param code
* the code, must be convertible to an integer
*/
public void setHttpErrorCode(String code) {
try {
httpErrorCode = Integer.parseInt(code);
} catch (NumberFormatException e) {
throw new IllegalArgumentException("HttpErrorCode must be an integer.");
}
}
/**
* Sets the HTTP error message to be returned alongside the HTTP error code when the IP is
* blocked. The message can contain a place-holder which will be replaced with the blocked IP.
*
* @param errorMsgKey
* the message key
*/
public void setHttpErrorMessageKey(String errorMsgKey) {
httpErrorMessageKey = errorMsgKey;
}
}
|
[
"ronny.winkler@communote.com"
] |
ronny.winkler@communote.com
|
4a08d4ae19478c4b15013f59d8e8ea5a7b4f12a2
|
e6b083da7bf50b20cd3e67da6111f877f6e964f5
|
/MyAPIs2/src/gen/java/io/swagger/api/NotFoundException.java
|
df0c91f01954b8e902fba9b5596615fc0497027f
|
[] |
no_license
|
swbhoi/java-apis
|
f08a6f7b931d39fd54b568aa8fd4de07e9651144
|
ef17a05b0405c9e2d5dedd823d90fe9332c0f59b
|
refs/heads/master
| 2021-01-23T12:26:22.368221
| 2018-02-26T07:21:42
| 2018-02-26T07:21:42
| 61,774,788
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 327
|
java
|
package io.swagger.api;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JaxRSServerCodegen", date = "2017-01-03T01:52:51.008-05:00")
public class NotFoundException extends ApiException {
private int code;
public NotFoundException (int code, String msg) {
super(code, msg);
this.code = code;
}
}
|
[
"swbhoi@gmail.com"
] |
swbhoi@gmail.com
|
3c33b20e70e8bf6d943db36fa6950fea3bfebc09
|
7b8e44f9bc9c675dfe2fe99f174101967b9cf058
|
/app/src/main/java/com/tehike/client/mst/app/project/cmscallbacks/SipGroupResourcesCallback.java
|
5c76f668917ec92bfe9af5f065282d7dbc11e0eb
|
[] |
no_license
|
wpfsean/Z_MST
|
69f47ffdf251e62f828ecc554d4bb8145318b543
|
b5a7c4c5e4b47440f121204fbf3d4ea83d6e199e
|
refs/heads/master
| 2020-04-13T13:42:12.261785
| 2018-12-27T02:54:59
| 2018-12-27T02:54:59
| 149,714,285
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,880
|
java
|
package com.tehike.client.mst.app.project.cmscallbacks;
import android.text.TextUtils;
import com.tehike.client.mst.app.project.db.DbConfig;
import com.tehike.client.mst.app.project.entity.SipGroupBean;
import com.tehike.client.mst.app.project.global.AppConfig;
import com.tehike.client.mst.app.project.utils.ByteUtils;
import com.tehike.client.mst.app.project.utils.Logutils;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;
import java.util.ArrayList;
import java.util.List;
/**
* 描述:用于请求sipgroup请求分组资源
* ===============================
* @author wpfse wpfsean@126.com
* @Create at:2018/10/18 10:33
* @version V1.0
*/
public class SipGroupResourcesCallback implements Runnable {
SipGroupDataCallback listern;
List<SipGroupBean> mList = new ArrayList<>();
String serverIP = "";
String userName = "";
String pwd = "";
public SipGroupResourcesCallback(SipGroupDataCallback listern) {
this.listern = listern;
}
@Override
public void run() {
synchronized (this) {
serverIP = DbConfig.getInstance().getData(4);
if (TextUtils.isEmpty(serverIP))
serverIP = AppConfig.SERVERIP;
userName = DbConfig.getInstance().getData(1);
if (TextUtils.isEmpty(userName))
userName = AppConfig.USERNAME;
pwd = DbConfig.getInstance().getData(2);
if (TextUtils.isEmpty(pwd))
pwd = AppConfig.PWD;
Socket socket = null;
InputStream is = null;
ByteArrayOutputStream bos = null;
try {
byte[] bys = new byte[140];
byte[] zk = AppConfig.VIDEO_HEDER_ID.getBytes();
for (int i = 0; i < zk.length; i++) {
bys[i] = zk[i];
}
// action 6 - 请求SIP组列表
bys[4] = 6;
bys[5] = 0;
bys[6] = 0;
bys[7] = 0;
// 用户名密码
String name = userName+"/"+pwd;
byte[] data = name.getBytes(AppConfig.CMS_FORMAT);
for (int i = 0; i < data.length; i++) {
bys[i + 8] = data[i];
}
socket = new Socket(serverIP, AppConfig.LOGIN_CMS_PORT);
OutputStream os = socket.getOutputStream();
os.write(bys);
os.flush();
is = socket.getInputStream();
bos = new ByteArrayOutputStream();
byte[] headers = new byte[56];
int read = is.read(headers);
byte[] flag = new byte[4];
for (int i = 0; i < 4; i++) {
flag[i] = headers[i];
}
//数量
byte[] count = new byte[4];
for (int i = 0; i < 4; i++) {
count[i] = headers[i + 4];
}
int sipCounts = count[0];
//SipGroupInfo 4+4+128+4 = 140
int alldata = 140 * sipCounts;
byte[] buffer = new byte[1024];
int nIdx = 0;
int nReadLen = 0;
// 把数据写入bos
while (nIdx < alldata) {
nReadLen = is.read(buffer);
bos.write(buffer, 0, nReadLen);
if (nReadLen > 0) {
nIdx += nReadLen;
} else {
break;
}
}
// 把总数据写入bos
byte[] result = bos.toByteArray();
int currentIndex = 0;
List<byte[]> sipList = new ArrayList<>();
for (int i = 0; i < sipCounts; i++) {
byte[] oneSip = new byte[140];
System.arraycopy(result, currentIndex, oneSip, 0, 140);
currentIndex += 140;
sipList.add(oneSip);
}
// 遍历数据
for (byte[] vSip : sipList) {
// 标识头
byte[] sipFlageByte = new byte[4];
System.arraycopy(vSip, 0, sipFlageByte, 0, 4);
String sipFlageString = new String(sipFlageByte, AppConfig.CMS_FORMAT);
byte[] groupid = new byte[4];
System.arraycopy(vSip, 4, groupid, 0, 4);
int group_id = ByteUtils.bytesToInt(groupid, 0);
byte[] group_Name = new byte[128];
System.arraycopy(vSip, 8, group_Name, 0, 128);
int group_name_position = ByteUtils.getPosiotion(group_Name);
String sipgnameString = new String(group_Name,0,group_name_position, AppConfig.CMS_FORMAT);
byte[] sip_Count = new byte[4];
System.arraycopy(vSip, 136, sip_Count, 0, 4);
int sip_count = ByteUtils.bytesToInt(sip_Count, 0);
SipGroupBean sipGroupBean = new SipGroupBean(sipFlageString,group_id,sipgnameString,sip_count);
mList.add(sipGroupBean);
}
if (mList != null && mList.size() > 0){
if (listern != null){
listern.callbackSuccessData(mList);
}
}
} catch (Exception e) {
if (listern != null) {
listern.callbackSuccessData(null);
}
}
}
}
public void start(){
new Thread(this).start();
}
public interface SipGroupDataCallback {
void callbackSuccessData(List<SipGroupBean> mList);
}
}
|
[
"wpfsean@126.com"
] |
wpfsean@126.com
|
70ad7e0eb3efbd0d593e8bea93975a1050095053
|
715107ef459989813d17cff3a69b050bdf04ca6d
|
/src/main/java/com/example/gsasyncmethod/hello/GitHubLookupService.java
|
799a58c307c5f622b10e7ff81ca936324c47a6ec
|
[] |
no_license
|
cybergeene/async_example
|
b9eef175d2572c290e7688e8d3fd673bae7e9fb8
|
470e62810fc26744b2c85d1283b5062854b8a003
|
refs/heads/master
| 2020-04-25T12:48:59.247494
| 2019-02-26T21:03:28
| 2019-02-26T21:03:28
| 172,790,042
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,129
|
java
|
package com.example.gsasyncmethod.hello;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;
import java.util.concurrent.CompletableFuture;
@Service
public class GitHubLookupService {
private static final Logger logger = LoggerFactory.getLogger(GitHubLookupService.class);
private final RestTemplate restTemplate;
public GitHubLookupService(RestTemplateBuilder restTemplateBuilder){
this.restTemplate = restTemplateBuilder.build();
}
@Async
public CompletableFuture<User> findUser(String user) throws InterruptedException{
logger.info("Looking up " + user);
String url = String.format("https://api.github.com/users/%s", user);
User results = restTemplate.getForObject(url, User.class);
//Artificial delay of 1st for demonstration purposes
Thread.sleep(1000L);
return CompletableFuture.completedFuture(results);
}
}
|
[
"you@example.com"
] |
you@example.com
|
c8415cb613fadc2c037d32d6875cb17ef0e70927
|
fdbf4f21b51e6dae915d58c62cbc3901cfd54689
|
/src/main/java/com/learn/interview/chapter13/SoftReferenceDemo.java
|
37c6b4e0252f8c0bb8a84eea28ebb45a58e15656
|
[] |
no_license
|
liu92/learn-java-interview
|
2f5d382ad54f16eecb1856c6c6eda18c86406b3a
|
bc6aa02744e1de0c9f1bf753ffeb390401ead019
|
refs/heads/master
| 2023-05-31T11:10:53.604952
| 2021-06-25T09:40:51
| 2021-06-25T09:40:51
| 294,074,081
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,191
|
java
|
package com.learn.interview.chapter13;
import java.lang.ref.SoftReference;
/**
* @ClassName: SoftReferenceDemo
* @Description: 软引用
* @Author: lin
* @Date: 2020/9/16 22:42
* History:
* @<version> 1.0
*/
public class SoftReferenceDemo {
public static void main(String[] args) {
//softRefMemoryEnough();
softRefMemoryNoEnough();
}
/**
* 内存够用的时候
*/
public static void softRefMemoryEnough(){
// 创建一个强应用
Object o1 = new Object();
// 创建一个软引用
SoftReference<Object> softReference = new SoftReference<>(o1);
System.out.println("*****内存够用时**********o1: "+o1);
System.out.println("***内存够用时******softReference: " + softReference.get());
o1 = null;
// 手动GC
System.gc();
System.out.println("*******内存够用时,进行手动GC后***************o1: "+ o1);
System.out.println("***内存够用时手动GC后软引用*******softReference: " + softReference.get());
}
/**
* JVM配置,故意产生大对象并配置小的内存,让它的内存不够用了导致OOM,看软引用的回收情况
* -Xms10m -Xmx10m -XX:+PrintGCDetails
*/
public static void softRefMemoryNoEnough(){
System.out.println("========================");
// 创建一个强应用
Object o1 = new Object();
// 创建一个软引用
SoftReference<Object> softReference = new SoftReference<>(o1);
System.out.println("*********内存不够用时***********o1: "+o1);
System.out.println("****内存不够用时*****softReference: "+ softReference.get());
o1 = null;
// 模拟OOM自动GC
try {
// 创建30M的大对象
byte[] bytes = new byte[30 * 1024 * 1024];
} catch (Exception e) {
e.printStackTrace();
} finally {
System.out.println("*********内存不够用,并且进行手动GC*************o1: "+ o1);
System.out.println("******内存不够用,并且进行手动GC*****softReference: "+ softReference.get());
}
}
}
|
[
"470437289@qq.com"
] |
470437289@qq.com
|
1de3aac1aa61693fe5fb01fe20f12bc7588f20a7
|
5c2be9dc311a6ee7964efb10bfaac0c626b2bb8c
|
/sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/named/NamedSqlQuery.java
|
6bdcbe7a716a6e2f0d74421fac62a49e3fe11ccf
|
[
"MIT"
] |
permissive
|
hank-cp/SimpleFlatMapper
|
e205eaa4cea885c894cee40080cd41291e32f952
|
7131e74d5d635f577d602ae4c6f06d807216b1d8
|
refs/heads/master
| 2023-03-04T22:03:21.409617
| 2023-02-23T09:56:16
| 2023-02-23T09:56:16
| 217,269,583
| 0
| 0
|
MIT
| 2019-10-24T10:09:06
| 2019-10-24T10:09:05
| null |
UTF-8
|
Java
| false
| false
| 2,380
|
java
|
package org.simpleflatmapper.jdbc.named;
import org.simpleflatmapper.jdbc.SizeSupplier;
import org.simpleflatmapper.util.Asserts;
import java.util.ArrayList;
import java.util.List;
public class NamedSqlQuery implements ParameterizedQuery {
private static final SizeSupplier DEFAULT_SIZE_SUPPLIER = new SizeSupplier() {
@Override
public int getSize(int columnIndex) {
return 1;
}
};
private final String sql;
private final NamedParameter[] parameters;
private NamedSqlQuery(String sql, NamedParameter[] parameters) {
this.sql = Asserts.requireNonNull("sql", sql);
this.parameters = Asserts.requireNonNull("parameters", parameters);
}
public static NamedSqlQuery parse(final CharSequence charSequence) {
Asserts.requireNonNull("charSequence", charSequence);
final List<NamedParameter> sqlParameters = new ArrayList<NamedParameter>();
new NamedSqlQueryParser(new NamedSqlQueryParser.Callback() {
@Override
public void param(NamedParameter namedParameter) {
sqlParameters.add(namedParameter);
}
}).parse(charSequence);
return new NamedSqlQuery(
charSequence.toString(),
sqlParameters.toArray(new NamedParameter[0]));
}
public String toSqlQuery() {
return toSqlQuery(DEFAULT_SIZE_SUPPLIER);
}
public String toSqlQuery(SizeSupplier sizeSupplier) {
StringBuilder sb = new StringBuilder(sql.length());
int start = 0;
for(int i = 0; i < parameters.length; i++) {
NamedParameter sqlParameter = parameters[i];
sb.append(sql, start, sqlParameter.getPosition().getStart());
appendParam(sizeSupplier, sb, i);
start = sqlParameter.getPosition().getEnd();
}
sb.append(sql, start, sql.length());
return sb.toString();
}
public void appendParam(SizeSupplier sizeSupplier, StringBuilder sb, int index) {
int size = sizeSupplier.getSize(index);
for(int i = 0; i < size; i++) {
if (i != 0) sb.append(", ");
sb.append("?");
}
}
public int getParametersSize() {
return parameters.length;
}
public NamedParameter getParameter(int i) {
return parameters[i];
}
}
|
[
"arnaud.roger@gmail.com"
] |
arnaud.roger@gmail.com
|
0dc9cd694a478d3f4df10bccae6b82dcf10f6291
|
0b4844d550c8e77cd93940e4a1d8b06d0fbeabf7
|
/JavaSource/dream/req/work/dao/ReqWoRsltListDAO.java
|
1e4e67a04b209e3abc8f6185c2cd0127e72ebbcc
|
[] |
no_license
|
eMainTec-DREAM/DREAM
|
bbf928b5c50dd416e1d45db3722f6c9e35d8973c
|
05e3ea85f9adb6ad6cbe02f4af44d941400a1620
|
refs/heads/master
| 2020-12-22T20:44:44.387788
| 2020-01-29T06:47:47
| 2020-01-29T06:47:47
| 236,912,749
| 0
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 875
|
java
|
package dream.req.work.dao;
import java.util.List;
import common.bean.User;
import common.spring.BaseJdbcDaoSupportIntf;
import dream.req.work.dto.MaWoReqCommonDTO;
import dream.req.work.dto.ReqWoRsltListDTO;
/**
* 작업요청-작업결과 - 목록 dao
* @author youngjoo38
* @version $Id:$
* @since 1.0
*/
public interface ReqWoRsltListDAO extends BaseJdbcDaoSupportIntf
{
/**
* grid find
* @author youngjoo38
* @version $Id:$
* @since 1.0
*
* @param maWoReqCommonDTO
* @return List
*/
public List findList(MaWoReqCommonDTO maWoReqCommonDTO,ReqWoRsltListDTO reqWoRsltListDTO, User user);
public int deleteList(String id, String compNo);
public String findTotalCount(MaWoReqCommonDTO maWoReqCommonDTO,ReqWoRsltListDTO reqWoRsltListDTO, User user) throws Exception;
}
|
[
"HN4741@10.31.0.185"
] |
HN4741@10.31.0.185
|
fe74a60d500f6804958cdd471c5d3f001dff9a61
|
c7b70bfc62c76c6ee4c2c3dab1414c47f6af1754
|
/server/src/com/rs/net/decoders/ClientPacketsDecoder.java
|
36676a6c69eab7480f13223a772eec51b4b2c49c
|
[] |
no_license
|
EnlistedGhost/MorrowRealm-v718
|
4459bb58f5ceb4dca8e4ef5ee7dcd55e57951a6b
|
8608210d1a3a3bd4374200ffe938fc56d071b554
|
refs/heads/master
| 2020-06-01T21:26:28.610346
| 2019-06-24T18:48:29
| 2019-06-24T18:48:29
| 190,932,255
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,482
|
java
|
package com.rs.net.decoders;
import com.rs.Settings;
import com.rs.io.InputStream;
import com.rs.net.Session;
import com.rs.utils.Logger;
public final class ClientPacketsDecoder extends Decoder {
public ClientPacketsDecoder(Session connection) {
super(connection);
}
@Override
public final void decode(InputStream stream) {
session.setDecoder(-1);
int packetId = stream.readUnsignedByte();
switch (packetId) {
case 14:
decodeLogin(stream);
break;
case 15:
decodeGrab(stream);
break;
default:
if (Settings.DEBUG)
Logger.log(this, "PacketId " + packetId);
session.getChannel().close();
break;
}
}
private final void decodeLogin(InputStream stream) {
if (stream.getRemaining() != 0) {
session.getChannel().close();
return;
}
session.setDecoder(2);
session.setEncoder(1);
session.getLoginPackets().sendStartUpPacket();
}
private final void decodeGrab(InputStream stream) {
int size = stream.readUnsignedByte();
if (stream.getRemaining() < size) {
session.getChannel().close();
return;
}
session.setEncoder(0);
if (stream.readInt() != Settings.CLIENT_BUILD || stream.readInt() != Settings.CUSTOM_CLIENT_BUILD) {
session.setDecoder(-1);
session.getGrabPackets().sendOutdatedClientPacket();
return;
}
if(!stream.readString().equals(Settings.GRAB_SERVER_TOKEN)) {
session.getChannel().close();
return;
}
session.setDecoder(1);
session.getGrabPackets().sendStartUpPacket();
}
}
|
[
"enlisted.ghost@gmail.com"
] |
enlisted.ghost@gmail.com
|
fc85a6be3e02da9ab297e521563937ff4313b0e6
|
385e9732bc4ba86842f03836c2f8fe32566dcab3
|
/cloudfoundry-client-spring/src/test/java/org/cloudfoundry/client/spring/SpringLoggingClientTest.java
|
6ac64dc180742ac987fc16e3fd79a1585e6ea38b
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
ArthurHlt/cf-java-client
|
0467ea218b082e27b58050768396d22aad486a11
|
92fab2d916a6d8fe3d93c6c68a6f44070f22a918
|
refs/heads/master
| 2021-01-15T23:30:20.983522
| 2016-02-15T17:28:53
| 2016-02-15T17:28:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,505
|
java
|
/*
* Copyright 2013-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.cloudfoundry.client.spring;
import org.cloudfoundry.client.logging.LogMessage;
import org.cloudfoundry.client.logging.RecentLogsRequest;
import org.cloudfoundry.utils.test.TestSubscriber;
import org.junit.Test;
import org.springframework.web.client.RestOperations;
import javax.websocket.ClientEndpointConfig;
import javax.websocket.WebSocketContainer;
import java.net.URI;
import java.util.Collections;
import java.util.List;
import static java.util.concurrent.TimeUnit.SECONDS;
import static org.mockito.Mockito.RETURNS_SMART_NULLS;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
public final class SpringLoggingClientTest extends AbstractRestTest {
private final ClientEndpointConfig clientEndpointConfig = mock(ClientEndpointConfig.class, RETURNS_SMART_NULLS);
private final RestOperations restOperations = mock(RestOperations.class, RETURNS_SMART_NULLS);
private final WebSocketContainer webSocketContainer = mock(WebSocketContainer.class, RETURNS_SMART_NULLS);
private final SpringLoggingClient client = new SpringLoggingClient(this.restOperations, URI.create("https://recent.root"), URI.create("https://stream.root"), this.webSocketContainer, this
.clientEndpointConfig, PROCESSOR_GROUP);
@Test
public void recent() throws InterruptedException {
when(this.restOperations.getForObject(URI.create("https://recent.root/recent?app=test-application-id"), List.class)).thenReturn(Collections.singletonList(LogMessage.builder().build()));
TestSubscriber<LogMessage> testSubscriber = new TestSubscriber<>();
this.client
.recent(RecentLogsRequest.builder()
.applicationId("test-application-id")
.build())
.subscribe(testSubscriber
.assertCount(1));
testSubscriber.verify(5, SECONDS);
}
}
|
[
"bhale@pivotal.io"
] |
bhale@pivotal.io
|
fa42baa5dee3b580e3ed3ecfc9c5c70e6b2ddeac
|
78a89691ae32f9576143feb561cf127adf7a7a33
|
/ksh-infrastructure/ksh-meeting-control/src/main/java/com/fosung/ksh/meeting/control/hst/response/DepartResponseDTO.java
|
126aaaaa2f098cadf9642a832bd2615cbedc75bf
|
[] |
no_license
|
zhenqun/fosung-ksh
|
e1a4aac4f08ab124018fc89548d7dc9c963afec7
|
36027ee33b5d56443aafa2fcfb3a02f7159845c2
|
refs/heads/master
| 2022-07-10T05:19:44.742151
| 2019-10-21T01:03:56
| 2019-10-21T01:03:56
| 215,750,234
| 0
| 0
| null | 2022-06-29T17:43:12
| 2019-10-17T09:10:08
|
Java
|
UTF-8
|
Java
| false
| false
| 1,142
|
java
|
package com.fosung.ksh.meeting.control.hst.response;
import lombok.Data;
import java.io.Serializable;
/**
* @description:组织返回信息
* @auther: xingxl
* @date: 2018/12/4 15:35
*/
@Data
public class DepartResponseDTO implements Serializable {
private static final long serialVersionUID = -1228032683418980378L;
/*
* 暂时未使用
*/
private Integer backupDepartId;
/*
* 组织描述
*/
private String departDesc;
/*
* 本组织的id
*/
private Integer departId;
/*
* 部门级别 0普通部门 1中级部门 2高级部门 仅供参考
*/
private String departLevel;
/*
* 组织名称
*/
private String departName;
/*
* 0不对上级节点显示 1可以对上级节点显示
*/
private String departType;
/*
* 是否是最后一个组织 1是 0不是
*/
private String isFinalDepart;
/*
* 所属节点ID,节点与服务器节点相同则代表数据出自于此服务器
*/
private Integer nodeId;
/*
* 上级组织的id
*/
private Integer parentDepartId;
}
|
[
"liuzq@hd100.com"
] |
liuzq@hd100.com
|
2bf5efb3513eeaddf17cdf0ca7786d92a058d9b2
|
e3cc6d2f4634e9edcca23f6b41148654ae2f0f7a
|
/src/main/java/com/appCrawler/pagePro/Lexun.java
|
8db0d33766253bc4587c7c0343d2dee21e18af1f
|
[] |
no_license
|
buildhappy/webCrawler
|
c54f36caedb7e3f1418a8cc46f897f846f53b1d1
|
109f0d1acadf38da1985e147238c80715480ead2
|
refs/heads/master
| 2020-05-19T20:56:07.168001
| 2015-09-15T07:11:46
| 2015-09-15T07:11:46
| 42,501,826
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,013
|
java
|
package com.appCrawler.pagePro;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import us.codecraft.webmagic.Apk;
import us.codecraft.webmagic.Page;
import us.codecraft.webmagic.Site;
import us.codecraft.webmagic.processor.PageProcessor;
/**
* 乐讯 http://www.lexun.com/
* Lexun #68
* 没有搜索接口,只有有限的几个应用,
* @author DMT
*/
public class Lexun implements PageProcessor{
private static Logger logger = LoggerFactory.getLogger(Lexun.class);
Site site = Site.me().setCharset("utf-8").setRetryTimes(0).setSleepTime(3);
@Override
public Apk process(Page page) {
//index page
if(page.getUrl().regex("").match()){
}
//the app detail page
if(page.getUrl().regex("").match()){
}
return null;
}
@Override
public Site getSite() {
return site;
}
@Override
public List<Apk> processMulti(Page page) {
// TODO Auto-generated method stub
return null;
}
}
|
[
"buildhappy512@163.com"
] |
buildhappy512@163.com
|
fd7f275b042d47a8ed250f6e7d49ffac95987f6b
|
dbfef24b8e48968baa87dcd2d8d94af6c9821d98
|
/lynx-api/src/com/dikshatech/portal/dao/DivisonDao.java
|
4500f71c75fa5539448a84e3c42893a3e153d313
|
[] |
no_license
|
sudheer999/vijay-gradle
|
7ab62da1b41120b48ab5c8f06f3e3be5c4a5530e
|
c03d167319ec915c3eb25e394761682144e1e3b3
|
refs/heads/master
| 2021-04-26T23:02:03.684417
| 2018-03-02T11:03:07
| 2018-03-02T11:03:07
| 123,918,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,529
|
java
|
/*
* This source file was generated by FireStorm/DAO.
*
* If you purchase a full license for FireStorm/DAO you can customize this header file.
*
* For more information please visit http://www.codefutures.com/products/firestorm
*/
package com.dikshatech.portal.dao;
import com.dikshatech.portal.dto.*;
import com.dikshatech.portal.exceptions.*;
public interface DivisonDao
{
/**
* Inserts a new row in the DIVISON table.
*/
public DivisonPk insert(Divison dto) throws DivisonDaoException;
/**
* Updates a single row in the DIVISON table.
*/
public void update(DivisonPk pk, Divison dto) throws DivisonDaoException;
/**
* Deletes a single row in the DIVISON table.
*/
public void delete(DivisonPk pk) throws DivisonDaoException;
/**
* Returns the rows from the DIVISON table that matches the specified
* primary-key value.
*/
public Divison findByPrimaryKey(DivisonPk pk) throws DivisonDaoException;
/**
* Returns all rows from the DIVISON table that match the criteria 'ID =
* :id'.
*/
public Divison findByPrimaryKey(int id) throws DivisonDaoException;
/**
* Returns all rows from the DIVISON table that match the criteria ''.
*/
public Divison[] findAll() throws DivisonDaoException;
/**
* Returns all rows from the DIVISON table that match the criteria 'ID =
* :id'.
*/
public Divison[] findWhereIdEquals(int id) throws DivisonDaoException;
/**
* Returns all rows from the DIVISON table that match the criteria 'NAME =
* :name'.
*/
public Divison[] findWhereNameEquals(String name) throws DivisonDaoException;
/**
* Returns all rows from the DIVISON table that match the criteria
* 'PARENT_ID = :parentId'.
*/
public Divison[] findWhereParentIdEquals(int parentId) throws DivisonDaoException;
/**
* Returns all rows from the DIVISON table that match the criteria
* 'REGION_ID = :regionId'.
*/
public Divison[] findWhereRegionIdEquals(int regionId) throws DivisonDaoException;
/**
* Sets the value of maxRows
*/
public void setMaxRows(int maxRows);
/**
* Gets the value of maxRows
*/
public int getMaxRows();
/**
* Returns all rows from the DIVISON table that match the specified
* arbitrary SQL statement
*/
public Divison[] findByDynamicSelect(String sql, Object[] sqlParams) throws DivisonDaoException;
/**
* Returns all rows from the DIVISON table that match the specified
* arbitrary SQL statement
*/
public Divison[] findByDynamicWhere(String sql, Object[] sqlParams) throws DivisonDaoException;
}
|
[
"sudheer.tsm9@gmail.com"
] |
sudheer.tsm9@gmail.com
|
cbd7b1795b6dc36fd086731dc910b8add815d5dd
|
da08ae282fcafeb6a17acabedf0d9259996d03c7
|
/myfinances/src/main/java/com/bushidosoft/myfinances/services/UserService.java
|
77673fd9047a59356c7951bbc824e628ba0d30ff
|
[] |
no_license
|
jkomorek/MyFinances
|
b978cb4d3475bc2daba69b435abe09756b19f579
|
0dc9cb5abdf0add734faaf2b0be1ad5e9f9c7b0a
|
refs/heads/master
| 2021-01-25T07:39:38.576357
| 2012-09-24T02:16:32
| 2012-09-24T02:16:32
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,884
|
java
|
package com.bushidosoft.myfinances.services;
import org.apache.commons.validator.routines.EmailValidator;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bushidosoft.myfinances.dal.UserPasswordRepository;
import com.bushidosoft.myfinances.dal.UserRepository;
import com.bushidosoft.myfinances.entities.User;
import com.bushidosoft.myfinances.entities.UserPassword;
import com.bushidosoft.myfinances.services.exceptions.InvalidPasswordException;
import com.bushidosoft.myfinances.services.exceptions.InvalidUserNameException;
import com.bushidosoft.myfinances.services.exceptions.UserAlreadyExistsException;
@Service
public class UserService {
@Autowired(required=true)
private UserRepository userRepository;
@Autowired(required=true)
private UserPasswordRepository userPasswordRepository;
private static Logger logger = Logger.getLogger(UserService.class);
/**
* Asserts that the current password for the provided user matches the supplied password
*
* @param user
* @param password
* @return true if current password matches
*/
public boolean verifyPassword(User user, String password) {
if (user == null) throw new RuntimeException("Cannot verify password for null User");
logger.debug("Verifying password for user ["+user.getUserName()+"]");
String currentPassword = userPasswordRepository.findMostRecentPasswordForUser(user);
if (currentPassword == null) {
logger.debug("Current password is null");
return false;
}
return (currentPassword.equals(password));
}
/**
* Set current Password for User
*/
public void setCurrentPassword(User user, String password) {
validatePassword(user, password);
logger.debug("Changing password for user ["+user.getUserName()+"]");
UserPassword userPassword = new UserPassword();
userPassword.setPassword(password);
userPassword.setUser(user);
userPasswordRepository.create(userPassword);
}
/**
* Attempts to create a new User with the provided UserName.
*
* @throws InvalidUserNameException
* @throws UserAlreadyExistsException
* @param userName
* @return
*/
public User createUser(String userName) {
validateUserName(userName);
if (userRepository.findByAttribute("userName", userName) != null) throw new UserAlreadyExistsException(userName);
User user = new User();
user.setUserName(userName);
userRepository.create(user);
return user;
}
/**
* Assert that the supplied userName:
* <ul>
* <li>is not null</li>
* <li>is a valid email address</li>
* </ul>
*
* @throws InvalidUserNameException
* @param userName
*/
public void validateUserName(String userName) {
if (userName == null) throw new InvalidUserNameException(userName, "UserName cannot be null");
if (!EmailValidator.getInstance().isValid(userName)) throw new InvalidUserNameException(userName, "UserName is not a valid email address");
}
/**
* Asserts that the supplied password:
* <ul>
* <li>is not null</li>
* <li>is at least 8 characters</li>
* <li>does not match the userName for the user it applies to</li>
* </ul>
* @param password
*/
public void validatePassword(User user, String password) {
if (user == null) throw new RuntimeException("Cannot validate password against null user");
if (password == null) throw new InvalidPasswordException("Null passwords are not allowed");
if (password.length() < 8) throw new InvalidPasswordException("Password must be at least 8 characters");
if (password.equals(user.getUserName())) throw new InvalidPasswordException("Password must not match user name");
}
public UserRepository getUserRepository() {
return userRepository;
}
public void setUserRepository(UserRepository userRepository) {
this.userRepository = userRepository;
}
}
|
[
"jonathan.komorek@gmail.com"
] |
jonathan.komorek@gmail.com
|
8f9592b72c2feb0d42db532f2c1535f10fe03628
|
6629cef4b676b40de6d9d82d000325f215e50834
|
/com/ekalife/elions/web/uw/AkseptasiPasFireController.java
|
ea263b217267dfbd752a8f4ae7040f3ac94869e6
|
[] |
no_license
|
fidesetratio/insurance
|
a9bf169b9d1b568a2ae570b233a234a2500a4e31
|
6ba971ae6dc6d4858949f333b48b9113ef7ae8c4
|
refs/heads/master
| 2023-01-01T17:38:50.269848
| 2020-10-27T03:39:52
| 2020-10-27T03:39:52
| 307,576,991
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,201
|
java
|
package com.ekalife.elions.web.uw;
import id.co.sinarmaslife.std.spring.util.Email;
import java.io.File;
import java.text.DateFormat;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.validation.BindException;
import org.springframework.validation.Errors;
import org.springframework.validation.ObjectError;
import org.springframework.validation.ValidationUtils;
import org.springframework.web.bind.BindUtils;
import org.springframework.web.bind.ServletRequestDataBinder;
import org.springframework.web.servlet.ModelAndView;
import com.ekalife.elions.model.AddressBilling;
import com.ekalife.elions.model.AddressNew;
import com.ekalife.elions.model.Agen;
import com.ekalife.elions.model.Akseptasi;
import com.ekalife.elions.model.BlackList;
import com.ekalife.elions.model.BlackListFamily;
import com.ekalife.elions.model.Client;
import com.ekalife.elions.model.CmdInputBlacklist;
import com.ekalife.elions.model.Cmdeditbac;
import com.ekalife.elions.model.Command;
import com.ekalife.elions.model.Datausulan;
import com.ekalife.elions.model.DetBlackList;
import com.ekalife.elions.model.Pas;
import com.ekalife.elions.model.Pemegang;
import com.ekalife.elions.model.Policy;
import com.ekalife.elions.model.Reas;
import com.ekalife.elions.model.ReffBii;
import com.ekalife.elions.model.Rekening_client;
import com.ekalife.elions.model.Tertanggung;
import com.ekalife.elions.model.User;
import com.ekalife.utils.CheckSum;
import com.ekalife.utils.FormatString;
import com.ekalife.utils.parent.ParentFormController;
public class AkseptasiPasFireController extends ParentFormController{
private long accessTime;
protected final Log logger = LogFactory.getLog(getClass());
private Email email;
public void setEmail(Email email) {
this.email = email;
}
protected void onBindAndValidate(HttpServletRequest request, Object cmd, BindException err) throws Exception {
}
protected ModelAndView onSubmit( HttpServletRequest request, HttpServletResponse response, Object cmd, BindException errors ) throws Exception
{
return new ModelAndView(
"uw/akseptasi_pas_fire");
}
protected void initBinder(HttpServletRequest arg0, ServletRequestDataBinder binder) throws Exception {
logger.debug("EditBacController : initBinder");
binder.registerCustomEditor(Double.class, null, doubleEditor);
binder.registerCustomEditor(Integer.class, null, integerEditor);
binder.registerCustomEditor(Date.class, null, dateEditor);
}
protected Object formBackingObject(HttpServletRequest request)
throws Exception {
logger.debug("EditBacController : formBackingObject");
this.accessTime = System.currentTimeMillis();
HttpSession session = request.getSession();
User currentUser = (User) session.getAttribute("currentUser");
Pas pas = new Pas();
return pas;
}
}
|
[
"Patar.Tambunan@SINARMASMSIGLIFE.CO.ID"
] |
Patar.Tambunan@SINARMASMSIGLIFE.CO.ID
|
81f810487cf916529594303138f306edae447ad2
|
22e506ee8e3620ee039e50de447def1e1b9a8fb3
|
/java_src/p000a/p001a/p002a/p005c/AbstractC0029a.java
|
46bb637836b917bf3a971a71bf92720049545463
|
[] |
no_license
|
Qiangong2/GraffitiAllianceSource
|
477152471c02aa2382814719021ce22d762b1d87
|
5a32de16987709c4e38594823cbfdf1bd37119c5
|
refs/heads/master
| 2023-07-04T23:09:23.004755
| 2021-08-11T18:10:17
| 2021-08-11T18:10:17
| 395,075,728
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 442
|
java
|
package p000a.p001a.p002a.p005c;
import p000a.p001a.p002a.AbstractC0033d;
import p000a.p001a.p002a.C0046j;
import p000a.p001a.p002a.p004b.AbstractC0019h;
/* renamed from: a.a.a.c.a */
/* compiled from: IScheme */
public interface AbstractC0029a<T extends AbstractC0033d> {
/* renamed from: a */
void mo70a(AbstractC0019h hVar, T t) throws C0046j;
/* renamed from: b */
void mo71b(AbstractC0019h hVar, T t) throws C0046j;
}
|
[
"sassafrass@fasizzle.com"
] |
sassafrass@fasizzle.com
|
cd2be045a28c03c7f5861b610eb6da93709adc09
|
642f1f62abb026dee2d360a8b19196e3ccb859a1
|
/culturecloud-pojo/src/main/java/com/culturecloud/model/request/common/SysUserDetailVO.java
|
ae5e3a409aa3c341b49cd7774c40a907688feb4c
|
[] |
no_license
|
P79N6A/alibaba-1
|
f6dacf963d56856817b211484ca4be39f6dd9596
|
6ec48f26f16d51c8a493b0eee12d90775b6eaf1d
|
refs/heads/master
| 2020-05-27T08:34:26.827337
| 2019-05-25T07:50:12
| 2019-05-25T07:50:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 389
|
java
|
package com.culturecloud.model.request.common;
import javax.validation.constraints.NotNull;
import com.culturecloud.bean.BaseRequest;
public class SysUserDetailVO extends BaseRequest{
@NotNull(message = "管理员ID不能为空")
private String userId;
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
}
|
[
"comalibaba@163.com"
] |
comalibaba@163.com
|
d0de081f2a54dd74688c3d63da9a4ab258e7f534
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/thinkaurelius--titan/7161caba4c572ce128a24329336966f133f31b37/before/Durations.java
|
4ad4bd4d81df94ca306d50b08918547ea39b9a9d
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,762
|
java
|
package com.thinkaurelius.titan.util.time;
import com.google.common.base.Preconditions;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
/**
* Utility methods for dealing with {@link Duration}
*/
public class Durations {
public static Duration min(Duration x, Duration y) {
return x.compareTo(y) <= 0 ? x : y;
}
/*
* This method is based on the method of the same name in Stopwatch.java in
* Google Guava 14.0.1, where it was defined with private visibility.
*/
static String abbreviate(TimeUnit unit) {
switch (unit) {
case NANOSECONDS:
return "ns";
case MICROSECONDS:
return "\u03bcs"; // μs
case MILLISECONDS:
return "ms";
case SECONDS:
return "s";
case MINUTES:
return "m";
case HOURS:
return "h";
case DAYS:
return "d";
default:
throw new AssertionError("Unexpected time unit: " + unit);
}
}
private static final Map<String,TimeUnit> unitNames = new HashMap<String,TimeUnit>() {{
for (TimeUnit unit : TimeUnit.values()) {
put(abbreviate(unit),unit); //abbreviated name
String name = unit.toString().toLowerCase();
put(name,unit); //abbreviated name in singular
assert name.endsWith("s");
put(name.substring(0,name.length()-1),unit);
}
put("us",TimeUnit.MICROSECONDS);
}};
public static TimeUnit parse(String unitName) {
TimeUnit unit = unitNames.get(unitName.toLowerCase());
Preconditions.checkArgument(unit!=null,"Unknown unit time: %s",unitName);
return unit;
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
aaa0280551c94af47bce6f86d16e5ec57eb34783
|
53d677a55e4ece8883526738f1c9d00fa6560ff7
|
/com/tencent/mm/ui/base/MaskLayout.java
|
704ab8f53f618c5612aa51185f0a32965faebc7d
|
[] |
no_license
|
0jinxing/wechat-apk-source
|
544c2d79bfc10261eb36389c1edfdf553d8f312a
|
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
|
refs/heads/master
| 2020-06-07T20:06:03.580028
| 2019-06-21T09:17:26
| 2019-06-21T09:17:26
| 193,069,132
| 9
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,742
|
java
|
package com.tencent.mm.ui.base;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.RelativeLayout.LayoutParams;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.ad.a.a;
import com.tencent.mm.sdk.platformtools.ab;
public class MaskLayout extends RelativeLayout
{
private ImageView moR;
private View view;
private Drawable yyQ;
public MaskLayout(Context paramContext, AttributeSet paramAttributeSet)
{
this(paramContext, paramAttributeSet, 0);
}
public MaskLayout(Context paramContext, AttributeSet paramAttributeSet, int paramInt)
{
super(paramContext, paramAttributeSet, paramInt);
AppMethodBeat.i(106966);
paramContext = paramContext.obtainStyledAttributes(paramAttributeSet, a.a.MaskLayout, paramInt, 0);
this.yyQ = paramContext.getDrawable(0);
paramContext.recycle();
AppMethodBeat.o(106966);
}
private void a(MaskLayout.a parama)
{
AppMethodBeat.i(106971);
removeView(this.moR);
RelativeLayout.LayoutParams localLayoutParams1 = new RelativeLayout.LayoutParams(-2, -2);
RelativeLayout.LayoutParams localLayoutParams2 = localLayoutParams1;
switch (MaskLayout.1.yyR[parama.ordinal()])
{
default:
localLayoutParams2 = new RelativeLayout.LayoutParams(-1, -1);
case 3:
case 1:
case 2:
case 4:
}
while (true)
{
addView(this.moR, localLayoutParams2);
AppMethodBeat.o(106971);
return;
localLayoutParams1.addRule(12);
localLayoutParams1.addRule(11);
localLayoutParams2 = localLayoutParams1;
continue;
localLayoutParams1.addRule(12);
localLayoutParams1.addRule(9);
localLayoutParams2 = localLayoutParams1;
continue;
localLayoutParams1.addRule(11);
localLayoutParams2 = localLayoutParams1;
}
}
public final void a(Bitmap paramBitmap, MaskLayout.a parama)
{
AppMethodBeat.i(106970);
a(parama);
this.moR.setImageBitmap(paramBitmap);
AppMethodBeat.o(106970);
}
public View getContentView()
{
return this.view;
}
public void onFinishInflate()
{
AppMethodBeat.i(106967);
super.onFinishInflate();
this.view = findViewById(2131821019);
if (this.view == null)
{
ab.d("MicroMsg.MaskLayout", "%s", new Object[] { "not found view by id, new one" });
this.view = new View(getContext());
RelativeLayout.LayoutParams localLayoutParams = new RelativeLayout.LayoutParams(-1, -1);
localLayoutParams.addRule(13);
this.view.setLayoutParams(localLayoutParams);
addView(this.view);
}
this.moR = new ImageView(getContext());
this.moR.setLayoutParams(new RelativeLayout.LayoutParams(-1, -1));
this.moR.setImageDrawable(this.yyQ);
addView(this.moR);
AppMethodBeat.o(106967);
}
public void setMaskBitmap(Bitmap paramBitmap)
{
AppMethodBeat.i(106968);
a(MaskLayout.a.yyW);
this.moR.setImageBitmap(paramBitmap);
AppMethodBeat.o(106968);
}
public void setMaskDrawable(Drawable paramDrawable)
{
AppMethodBeat.i(106969);
a(MaskLayout.a.yyW);
this.moR.setImageDrawable(paramDrawable);
AppMethodBeat.o(106969);
}
}
/* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes4-dex2jar.jar
* Qualified Name: com.tencent.mm.ui.base.MaskLayout
* JD-Core Version: 0.6.2
*/
|
[
"172601673@qq.com"
] |
172601673@qq.com
|
da1403619c52eb3e515695bd1a9831b7e8eca6bb
|
25b689288d1135dc2b88acb80db81df2ab616b64
|
/src/blocks/com/shtick/utils/scratch/runner/standard/blocks/AbstractOpcodeValue.java
|
e43e1b2298ef5134faf783eb13ffa96b8463adea
|
[
"MIT"
] |
permissive
|
seanmcox/scratch-runner-blocks-standard
|
2a38c158698b0b61aa551cb0279472fcd013c181
|
125b2934e0b28af2d17d23c1d844b761222f0213
|
refs/heads/master
| 2021-04-27T01:10:08.416141
| 2018-07-02T20:01:04
| 2018-07-02T20:01:04
| 122,668,964
| 0
| 0
| null | 2018-07-02T20:01:05
| 2018-02-23T20:24:41
|
Java
|
UTF-8
|
Java
| false
| false
| 2,536
|
java
|
/**
*
*/
package com.shtick.utils.scratch.runner.standard.blocks;
import java.util.HashMap;
import com.shtick.utils.scratch.runner.core.OpcodeValue;
import com.shtick.utils.scratch.runner.core.ValueListener;
/**
* @author sean.cox
*
*/
public abstract class AbstractOpcodeValue implements OpcodeValue{
private static String[] ORDINALS = new String[] {"first","second","third","fourth","fifth"};
private int argumentCount;
private String opcode;
private HashMap<ValueListener,ValueListener[]> sublistenersByValueListener = new HashMap<>();
private HashMap<ValueListener,Object[]> argumentsByValueListener = new HashMap<>();
/**
* Each results array represents the result of calculating this OpcodeValue in the context of the ValueListener.
* This array is shared by other PassThroughValueListeners that are supporting the tracking of changes to this OpcodeValue in the context of the valueListener.
*
* results[0] is the old value.
* results[1] is the new value.
*/
private HashMap<ValueListener,Object[]> resultsByValueListener = new HashMap<>();
/**
* @param argumentCount
* @param opcode
*/
public AbstractOpcodeValue(int argumentCount, String opcode) {
super();
this.argumentCount = argumentCount;
this.opcode = opcode;
}
/**
* @return the argumentCount
*/
public int getArgumentCount() {
return argumentCount;
}
@Override
public String getOpcode() {
return opcode;
}
/**
*
* @param valueListener
* @return The array of evaluated arguments representing the current state of all arguments relevant to the given valueListener, or null if the valueListener isn't registered.
*/
public Object[] getArgumentState(ValueListener valueListener) {
return argumentsByValueListener.get(valueListener);
}
/**
*
* @param valueListener
* @param value not null
*/
public void reportValue(ValueListener valueListener, Object value) {
/*
* Represents the result of calculating this OpcodeValue in the context of the ValueListener.
* This array is shared by other PassThroughValueListeners that are supporting the tracking of changes to this OpcodeValue in the context of the valueListener.
*
* results[0] is the old value.
* results[1] is the new value.
*/
Object[] results = resultsByValueListener.get(valueListener);
synchronized(results) {
if(results == null)
return;
results[0] = results[1];
results[1] = value;
if(!results[0].equals(results[1]))
valueListener.valueUpdated(results[0], results[1]);
}
}
}
|
[
"git@smcox.com"
] |
git@smcox.com
|
2525828c00e7a2ba35682bea73831e0337ef6b92
|
254292bbb95222cd6a97eae493e28b5a63c14a9d
|
/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/shell/AnsiString.java
|
2c278c817173ce12b9090f7edcf280418ff359d5
|
[
"Apache-2.0"
] |
permissive
|
pikefeier/springboot
|
0e881a59ceefd3ae1991e83a0ad4a4d787831097
|
2fb23ab250f095dec39bf5e4d114c26d51467142
|
refs/heads/master
| 2023-01-09T02:51:23.939848
| 2019-12-30T12:19:14
| 2019-12-30T12:19:14
| 230,909,567
| 0
| 0
|
Apache-2.0
| 2022-12-27T14:51:00
| 2019-12-30T12:10:46
|
Java
|
UTF-8
|
Java
| false
| false
| 2,133
|
java
|
/*
* Copyright 2012-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.cli.command.shell;
import jline.Terminal;
import org.fusesource.jansi.Ansi;
import org.fusesource.jansi.AnsiRenderer.Code;
/**
* Simple utility class to build an ANSI string when supported by the {@link Terminal}.
*
* @author Phillip Webb
*/
class AnsiString {
private final Terminal terminal;
private final StringBuilder value = new StringBuilder();
/**
* Create a new {@link AnsiString} for the given {@link Terminal}.
*
* @param terminal the terminal used to test if {@link Terminal#isAnsiSupported() ANSI
* is supported}.
*/
AnsiString(Terminal terminal) {
this.terminal = terminal;
}
/**
* Append text with the given ANSI codes.
*
* @param text the text to append
* @param codes the ANSI codes
* @return this string
*/
AnsiString append(String text, Code... codes) {
if (codes.length == 0 || !isAnsiSupported()) {
this.value.append(text);
return this;
}
Ansi ansi = Ansi.ansi();
for (Code code : codes) {
ansi = applyCode(ansi, code);
}
this.value.append(ansi.a(text).reset().toString());
return this;
}
private Ansi applyCode(Ansi ansi, Code code) {
if (code.isColor()) {
if (code.isBackground()) {
return ansi.bg(code.getColor());
}
return ansi.fg(code.getColor());
}
return ansi.a(code.getAttribute());
}
private boolean isAnsiSupported() {
return this.terminal.isAnsiSupported();
}
@Override
public String toString() {
return this.value.toString();
}
}
|
[
"945302777@qq.com"
] |
945302777@qq.com
|
c947d1eded5346be4163087e087c7b170c66bc12
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/8/8_4186548cb3e07564b66b7d72be4657ea5b00a103/ConvergeServlet/8_4186548cb3e07564b66b7d72be4657ea5b00a103_ConvergeServlet_t.java
|
527f34cfc8350d4893c5a1ccb61b3d980d7571c8
|
[] |
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,081
|
java
|
package net.styleguise.converge;
import java.io.IOException;
import java.io.StringWriter;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import redstone.xmlrpc.XmlRpcServer;
import redstone.xmlrpc.interceptors.DebugInvocationInterceptor;
@SuppressWarnings("serial")
public class ConvergeServlet extends HttpServlet {
private ConvergeService convergeService;
@Override
public void init(ServletConfig config) throws ServletException {
super.init(config);
String delegateClass = config.getInitParameter("convergeServiceDelegateClass");
if( delegateClass == null )
throw new ServletException("Init parameter [convergeServiceDelegateClass] must be specified");
try{
Class<?> clazz = Class.forName(delegateClass);
Object obj = clazz.newInstance();
if( obj instanceof ConvergeServiceDelegate )
convergeService = new ConvergeService((ConvergeServiceDelegate)obj);
else
throw new ServletException("The [convergeServiceDelegateClass] must be a subclass of " + ConvergeServiceDelegate.class.getName());
}
catch(InstantiationException e){
throw new ServletException("Unable to instantiate " + delegateClass + ". It should have a non-private, no-arg constructor", e);
}
catch(IllegalAccessException e){
throw new ServletException("Unable to instantiate " + delegateClass + ". It should have a non-private, no-arg constructor", e);
}
catch(ClassNotFoundException e){
throw new ServletException("Unable to find class named " + delegateClass, e);
}
}
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
if( req.getParameter("info") != null ){
String xml = convergeService.convergeInfoXml();
resp.setContentType("text/xml");
resp.getWriter().write(xml);
resp.getWriter().flush();
}
else if( req.getParameter("postlogin") != null ){
// String sessionId = req.getParameter("session_id");
// int memberId = Integer.parseInt(req.getParameter("member_id"));
// int productId = Integer.parseInt(req.getParameter("product_id"));
// String key = req.getParameter("key");
//TODO log user in
}
}
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
StringWriter buffer = new StringWriter(2048);
XmlRpcServer xmlRpcServer = new XmlRpcServer();
xmlRpcServer.addInvocationHandler("ipConverge", convergeService);
xmlRpcServer.addInvocationInterceptor(new DebugInvocationInterceptor(getServletContext()));
xmlRpcServer.execute(req.getInputStream(), buffer);
String response = buffer.toString();
resp.setCharacterEncoding("UTF-8");
resp.setContentType("text/xml");
resp.setContentLength(response.getBytes("UTF-8").length);
resp.getWriter().write(response);
resp.getWriter().flush();
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
d74a2e909eb4bc6f8e9115154c4c459a7c236d52
|
6253283b67c01a0d7395e38aeeea65e06f62504b
|
/decompile/app/Contacts/src/main/java/com/loc/az.java
|
0dd47ffeaef5160e1fee34cf889484129684d0e8
|
[] |
no_license
|
sufadi/decompile-hw
|
2e0457a0a7ade103908a6a41757923a791248215
|
4c3efd95f3e997b44dd4ceec506de6164192eca3
|
refs/heads/master
| 2023-03-15T15:56:03.968086
| 2017-11-08T03:29:10
| 2017-11-08T03:29:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 361
|
java
|
package com.loc;
import java.util.Map;
/* compiled from: DexDownLoadRequest */
class az extends bs {
private ax d;
az(ax axVar) {
this.d = axVar;
}
public Map<String, String> a() {
return null;
}
public Map<String, String> b() {
return null;
}
public String c() {
return this.d.a();
}
}
|
[
"liming@droi.com"
] |
liming@droi.com
|
74f8f2357bd0d5187f196413344cd3388b198bfb
|
8d496100549466fa7645d8a4873916029a7c4d34
|
/SIGERL/src/br/com/linkcom/wms/geral/dao/OcupacaoEnderecoHistoricoDAO.java
|
ff27b489fe3b0d7fe37668a4b122ddf5cc9edb5d
|
[] |
no_license
|
evertonreis11/sigerl
|
92e4a278f2e238f5289acab13be2e8f2533fdee0
|
8e59f0cf529d5b0907ca74e2a22ee25f4e4879f4
|
refs/heads/master
| 2020-04-10T14:12:32.657231
| 2019-01-15T15:41:23
| 2019-01-15T15:41:23
| 161,054,554
| 0
| 0
| null | null | null | null |
ISO-8859-1
|
Java
| false
| false
| 4,925
|
java
|
package br.com.linkcom.wms.geral.dao;
import java.sql.Date;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.List;
import org.hibernate.HibernateException;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.transform.AliasToBeanResultTransformer;
import org.springframework.orm.hibernate3.HibernateCallback;
import br.com.linkcom.neo.persistence.GenericDAO;
import br.com.linkcom.neo.persistence.QueryBuilder;
import br.com.linkcom.wms.geral.bean.Endereco;
import br.com.linkcom.wms.geral.bean.OcupacaoEnderecoHistorico;
import br.com.linkcom.wms.geral.bean.Produto;
import br.com.linkcom.wms.geral.bean.vo.ExtratoOcupacaoVO;
import br.com.linkcom.wms.modulo.logistica.controller.report.filtro.ExtratoOcupacaoFiltro;
import br.com.linkcom.wms.util.WmsUtil;
public class OcupacaoEnderecoHistoricoDAO extends GenericDAO<OcupacaoEnderecoHistorico> {
/**
* Lista os históricos de ocupação para o relatório de extrato de ocupação.
*
* @author Giovane Freitas
* @param filtro
* @return
*/
@SuppressWarnings("unchecked")
public List<ExtratoOcupacaoVO> findForReportExtratoOcupacao(ExtratoOcupacaoFiltro filtro) {
final QueryBuilder<OcupacaoEnderecoHistorico> queryBuilder = query()
.select("ordemservico.cdordemservico as cdordemservico," +
"area.codigo || '.' || endereco.endereco as endereco," +
"endereco.cdendereco as cdendereco,produto.descricao as descricaoProduto," +
"produto.codigo as codigoProduto,produto.cdproduto as cdproduto," +
"ocupacaoEnderecoHistorico.dtentrada as dtentrada,ocupacaoEnderecoHistorico.qtde as qtde," +
"ocupacaoEnderecoHistorico.acumula as acumula,ordemtipo.nome as tipoOperacao," +
"carregamento.cdcarregamento as cdcarregamento,transferencia.cdtransferencia as cdtransferencia," +
"inventario.cdinventario as cdinventario,recebimento.cdrecebimento as cdrecebimento," +
"ocupacaoEnderecoHistorico.cdocupacaoenderecohistorico as cdocupacaoenderecohistorico," +
"usuario.nome as operador")
.join("ocupacaoEnderecoHistorico.produto produto")
.join("ocupacaoEnderecoHistorico.ordemservico ordemservico")
.join("ocupacaoEnderecoHistorico.endereco endereco")
.join("endereco.area area")
.join("ordemservico.ordemtipo ordemtipo")
.join("ordemservico.listaOrdemServicoUsuario osu")
.join("osu.usuario usuario")
.leftOuterJoin("ordemservico.carregamento carregamento")
.leftOuterJoin("ordemservico.transferencia transferencia")
.leftOuterJoin("ordemservico.recebimento recebimento")
.leftOuterJoin("ordemservico.inventariolote inventariolote")
.leftOuterJoin("inventariolote.inventario inventario")
.orderBy("ocupacaoEnderecoHistorico.dtentrada")
.setUseTranslator(false);
queryBuilder.where("area.deposito = ?", WmsUtil.getDeposito());
queryBuilder.where("area=?", filtro.getEndereco().getArea());
queryBuilder.where("endereco.endereco.rua=?", filtro.getEndereco().getRuaI());
queryBuilder.where("endereco.endereco.predio=?", filtro.getEndereco().getPredioI());
queryBuilder.where("endereco.endereco.nivel=?", filtro.getEndereco().getNivelI());
queryBuilder.where("endereco.endereco.apto=?", filtro.getEndereco().getAptoI());
queryBuilder.where("trunc(ocupacaoEnderecoHistorico.dtentrada)>=?", filtro.getInicio());
queryBuilder.where("trunc(ocupacaoEnderecoHistorico.dtentrada)<=?", filtro.getTermino());
if(filtro.getProduto() != null && filtro.getProduto().getCdproduto() != null){
queryBuilder
.openParentheses()
.where("produto=?", filtro.getProduto()).or()
.where("produto.produtoprincipal=?", filtro.getProduto())
.closeParentheses();
}
queryBuilder.orderBy("produto.descricao, area.codigo, endereco.endereco, ordemservico.cdordemservico");
return getHibernateTemplate().executeFind(new HibernateCallback(){
public Object doInHibernate(Session session) throws HibernateException, SQLException {
Query query = session.createQuery(queryBuilder.getQuery());
for (int i = 0; i < queryBuilder.getWhere().getParameters().size(); i++) {
query.setParameter(i, queryBuilder.getWhere().getParameters().get(i));
}
query.setResultTransformer(new AliasToBeanResultTransformer(ExtratoOcupacaoVO.class));
return query.list();
}
});
}
/**
* Obtém o saldo anterior a uma determinada data.
*
* @author Giovane Freitas
* @param inicio
* @param endereco
* @param produto
* @return
*/
public Long getSaldoAnterior(Date inicio, Endereco endereco, Produto produto) {
return getJdbcTemplate().queryForLong(
"select SALDOATUAL(" + endereco.getCdendereco() + "," + produto.getCdproduto() + ",to_date('"
+ new SimpleDateFormat("dd/MM/yyyy").format(inicio) + "', 'DD/MM/YYYY')) from dual");
}
}
|
[
"everton.reis19@gmail.com"
] |
everton.reis19@gmail.com
|
bee310ef1af82cfcea360c9be06e87c491f5b7a5
|
1b280f8167dab27fa9c0aff3d05e5504badf6ed8
|
/src/main/java/org/op4j/operators/impl/op/list/Level1ListElementsOperator.java
|
1a9b2ffdd97f0f1ee83b0068b34d555fd451bea4
|
[
"Apache-2.0"
] |
permissive
|
shyding/op4j
|
bcf2d600bbea83c2bb0fe48142a0fa5abe2bb1d9
|
b577596dfe462089d3dd169666defc6de7ad289a
|
refs/heads/master
| 2021-05-16T18:54:01.108057
| 2012-05-13T22:24:48
| 2012-05-13T22:24:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,171
|
java
|
/*
* =============================================================================
*
* Copyright (c) 2010, The OP4J team (http://www.op4j.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 org.op4j.operators.impl.op.list;
import java.util.List;
import org.javaruntype.type.Type;
import org.op4j.functions.IFunction;
import org.op4j.operators.impl.AbstractOperator;
import org.op4j.operators.intf.list.ILevel1ListElementsOperator;
import org.op4j.operators.qualities.UniqOpOperator;
import org.op4j.target.Target;
import org.op4j.target.Target.Normalisation;
/**
*
* @since 1.0
*
* @author Daniel Fernández
*
*/
public final class Level1ListElementsOperator<I,T> extends AbstractOperator
implements UniqOpOperator<I,List<T>>, ILevel1ListElementsOperator<I,T> {
public Level1ListElementsOperator(final Target target) {
super(target);
}
public Level0ListOperator<I,T> endFor() {
return new Level0ListOperator<I,T>(getTarget().endIterate(null));
}
public <X> Level1ListElementsOperator<I,X> castTo(final Type<X> type) {
return endFor().generic().castToListOf(type).forEach();
}
public List<T> get() {
return endFor().get();
}
public Level1ListElementsSelectedOperator<I,T> ifIndex(final int... indexes) {
return new Level1ListElementsSelectedOperator<I,T>(getTarget().selectIndex(indexes));
}
public Level1ListElementsSelectedOperator<I,T> ifIndexNot(final int... indexes) {
return new Level1ListElementsSelectedOperator<I,T>(getTarget().selectIndexNot(indexes));
}
public Level1ListElementsSelectedOperator<I,T> ifTrue(final IFunction<? super T,Boolean> eval) {
return new Level1ListElementsSelectedOperator<I,T>(getTarget().selectMatching(eval));
}
public Level1ListElementsSelectedOperator<I,T> ifFalse(final IFunction<? super T,Boolean> eval) {
return new Level1ListElementsSelectedOperator<I,T>(getTarget().selectNotMatching(eval));
}
public Level1ListElementsSelectedOperator<I,T> ifNotNull() {
return new Level1ListElementsSelectedOperator<I,T>(getTarget().selectNotNull());
}
public Level1ListElementsSelectedOperator<I,T> ifNull() {
return new Level1ListElementsSelectedOperator<I,T>(getTarget().selectNull());
}
public <X> Level1ListElementsOperator<I,X> exec(final IFunction<? super T,X> function) {
return new Level1ListElementsOperator<I,X>(getTarget().execute(function, Normalisation.NONE));
}
public Level1ListElementsOperator<I,T> replaceWith(final T replacement) {
return new Level1ListElementsOperator<I,T>(getTarget().replaceWith(replacement, Normalisation.NONE));
}
public Level1ListElementsOperator<I,T> replaceIfNullWith(final T replacement) {
return ifNull().replaceWith(replacement).endIf();
}
public Level1ListElementsOperator<I,T> execIfFalse(final IFunction<? super T, Boolean> eval, final IFunction<? super T, ? extends T> function) {
return new Level1ListElementsOperator<I,T>(getTarget().executeIfFalse(eval, function, null, Normalisation.NONE));
}
public <X> Level1ListElementsOperator<I,X> execIfFalse(final IFunction<? super T, Boolean> eval, final IFunction<? super T, X> function, final IFunction<? super T, X> elseFunction) {
return new Level1ListElementsOperator<I,X>(getTarget().executeIfFalse(eval, function, elseFunction, Normalisation.NONE));
}
public Level1ListElementsOperator<I,T> execIfIndex(final int[] indexes, final IFunction<? super T, ? extends T> function) {
return new Level1ListElementsOperator<I,T>(getTarget().executeIfIndex(indexes, function, null, Normalisation.NONE));
}
public <X> Level1ListElementsOperator<I,X> execIfIndex(final int[] indexes, final IFunction<? super T, X> function, final IFunction<? super T, X> elseFunction) {
return new Level1ListElementsOperator<I,X>(getTarget().executeIfIndex(indexes, function, elseFunction, Normalisation.NONE));
}
public Level1ListElementsOperator<I,T> execIfIndexNot(final int[] indexes, final IFunction<? super T, ? extends T> function) {
return new Level1ListElementsOperator<I,T>(getTarget().executeIfIndexNot(indexes, function, null, Normalisation.NONE));
}
public <X> Level1ListElementsOperator<I,X> execIfIndexNot(final int[] indexes, final IFunction<? super T, X> function, final IFunction<? super T, X> elseFunction) {
return new Level1ListElementsOperator<I,X>(getTarget().executeIfIndexNot(indexes, function, elseFunction, Normalisation.NONE));
}
public Level1ListElementsOperator<I, T> execIfNotNull(final IFunction<? super T, ? extends T> function) {
return new Level1ListElementsOperator<I,T>(getTarget().executeIfNotNull(function, null, Normalisation.NONE));
}
public <X> Level1ListElementsOperator<I,X> execIfNotNull(final IFunction<? super T, X> function, final IFunction<? super T, X> elseFunction) {
return new Level1ListElementsOperator<I,X>(getTarget().executeIfNotNull(function, elseFunction, Normalisation.NONE));
}
public Level1ListElementsOperator<I,T> execIfNull(final IFunction<? super T, ? extends T> function) {
return new Level1ListElementsOperator<I,T>(getTarget().executeIfNull(function, null, Normalisation.NONE));
}
public <X> Level1ListElementsOperator<I,X> execIfNull(final IFunction<? super T, X> function, final IFunction<? super T, X> elseFunction) {
return new Level1ListElementsOperator<I,X>(getTarget().executeIfNull(function, elseFunction, Normalisation.NONE));
}
public Level1ListElementsOperator<I,T> execIfTrue(final IFunction<? super T, Boolean> eval, final IFunction<? super T, ? extends T> function) {
return new Level1ListElementsOperator<I,T>(getTarget().executeIfTrue(eval, function, null, Normalisation.NONE));
}
public <X> Level1ListElementsOperator<I,X> execIfTrue(final IFunction<? super T, Boolean> eval, final IFunction<? super T, X> function, final IFunction<? super T, X> elseFunction) {
return new Level1ListElementsOperator<I,X>(getTarget().executeIfTrue(eval, function, elseFunction, Normalisation.NONE));
}
}
|
[
"daniel.fernandez@11thlabs.org"
] |
daniel.fernandez@11thlabs.org
|
09a4b3e6e9dc0cd13e396ba62275046971a6b481
|
1a4770c215544028bad90c8f673ba3d9e24f03ad
|
/second/quark/src/main/java/com/tencent/mm/sdk/diffdev/a/e.java
|
aa7de0ca2fe146022017ac0a72a32ac72f9dfa42
|
[] |
no_license
|
zhang1998/browser
|
e480fbd6a43e0a4886fc83ea402f8fbe5f7c7fce
|
4eee43a9d36ebb4573537eddb27061c67d84c7ba
|
refs/heads/master
| 2021-05-03T06:32:24.361277
| 2018-02-10T10:35:36
| 2018-02-10T10:35:36
| 120,590,649
| 8
| 10
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,766
|
java
|
package com.tencent.mm.sdk.diffdev.a;
import android.util.Log;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.params.HttpConnectionParams;
import org.apache.http.util.EntityUtils;
public final class e {
public static byte[] b(String str, int i) {
byte[] bArr = null;
if (str == null || str.length() == 0) {
Log.e("MicroMsg.SDK.NetUtil", "httpGet, url is null");
} else {
HttpClient defaultHttpClient = new DefaultHttpClient();
HttpUriRequest httpGet = new HttpGet(str);
if (i >= 0) {
try {
HttpConnectionParams.setSoTimeout(defaultHttpClient.getParams(), i);
} catch (Exception e) {
Log.e("MicroMsg.SDK.NetUtil", "httpGet, Exception ex = " + e.getMessage());
} catch (IncompatibleClassChangeError e2) {
Log.e("MicroMsg.SDK.NetUtil", "httpGet, IncompatibleClassChangeError ex = " + e2.getMessage());
} catch (Throwable th) {
Log.e("MicroMsg.SDK.NetUtil", "httpGet, Throwable ex = " + th.getMessage());
}
}
HttpResponse execute = defaultHttpClient.execute(httpGet);
if (execute.getStatusLine().getStatusCode() != 200) {
Log.e("MicroMsg.SDK.NetUtil", "httpGet fail, status code = " + execute.getStatusLine().getStatusCode());
} else {
bArr = EntityUtils.toByteArray(execute.getEntity());
}
}
return bArr;
}
}
|
[
"2764207312@qq.com"
] |
2764207312@qq.com
|
675bbe84091891096cb354756ca2cdd5640dc14d
|
e1e5bd6b116e71a60040ec1e1642289217d527b0
|
/H5/L2_Scripts_com/L2_Scripts_Revision_20720_2268/src/l2s/gameserver/handler/voicecommands/impl/Debug.java
|
710cd31f9aa7c682e083086d02cc7104e1de0c2f
|
[] |
no_license
|
serk123/L2jOpenSource
|
6d6e1988a421763a9467bba0e4ac1fe3796b34b3
|
603e784e5f58f7fd07b01f6282218e8492f7090b
|
refs/heads/master
| 2023-03-18T01:51:23.867273
| 2020-04-23T10:44:41
| 2020-04-23T10:44:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 978
|
java
|
package l2s.gameserver.handler.voicecommands.impl;
import l2s.gameserver.Config;
import l2s.gameserver.handler.voicecommands.IVoicedCommandHandler;
import l2s.gameserver.model.Player;
import l2s.gameserver.network.l2.components.CustomMessage;
public class Debug implements IVoicedCommandHandler
{
private final String[] _commandList = new String[] { "debug" };
@Override
public String[] getVoicedCommandList()
{
return _commandList;
}
@Override
public boolean useVoicedCommand(String command, Player player, String args)
{
if(!Config.ALLOW_VOICED_COMMANDS)
return false;
if (!Config.ALT_DEBUG_ENABLED)
return false;
if (player.isDebug())
{
player.setDebug(false);
player.sendMessage(new CustomMessage("voicedcommandhandlers.Debug.Disabled", player));
}
else
{
player.setDebug(true);
player.sendMessage(new CustomMessage("voicedcommandhandlers.Debug.Enabled", player));
}
return true;
}
}
|
[
"64197706+L2jOpenSource@users.noreply.github.com"
] |
64197706+L2jOpenSource@users.noreply.github.com
|
22d7cf8e2b566d390bca82929d119f1e8602d256
|
19518b3679ff7b9b2a131d0fbc7e259f45f4efb3
|
/lib/worldwind-release.0.5.0/src/gov/nasa/worldwind/event/InputHandler.java
|
adc8113dc8e31351ba5ffcfb0d9ca5038d3ce05a
|
[] |
no_license
|
lehrblogger/twiterra
|
3d88f3a1f10f22fe341ae5b6741b0ca99a42db87
|
550d9b712b3e80e9376bc6f2079529ea1c6c82a8
|
refs/heads/master
| 2020-12-24T18:03:26.564633
| 2009-01-05T06:00:48
| 2009-01-05T06:00:48
| 98,770
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,230
|
java
|
/*
Copyright (C) 2001, 2006 United States Government
as represented by the Administrator of the
National Aeronautics and Space Administration.
All Rights Reserved.
*/
package gov.nasa.worldwind.event;
import gov.nasa.worldwind.WorldWindow;
import gov.nasa.worldwind.avlist.AVList;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.awt.event.MouseWheelListener;
/**
* @author tag
* @version $Id: InputHandler.java 5121 2008-04-22 17:54:54Z tgaskins $
*/
public interface InputHandler extends AVList, java.beans.PropertyChangeListener
{
void setEventSource(WorldWindow newWorldWindow);
WorldWindow getEventSource();
void setHoverDelay(int delay);
int getHoverDelay();
void addSelectListener(SelectListener listener);
void removeSelectListener(SelectListener listener);
void addMouseListener(MouseListener listener);
void removeMouseListener(MouseListener listener);
void addMouseMotionListener(MouseMotionListener listener);
void removeMouseMotionListener(MouseMotionListener listener);
void addMouseWheelListener(MouseWheelListener listener);
void removeMouseWheelListener(MouseWheelListener listener);
void clear();
}
|
[
"lehrburger@gmail.com"
] |
lehrburger@gmail.com
|
bdf8c59be27b67b06a6be9664a921e87fdaa3c36
|
89086c7e43d9da6c574c64cb609bfa66c4d65fcf
|
/src/test/java/com/gmail/mosoft521/jmtpdp/ch13pipeline/example/FTPClientUtil.java
|
454095ef7ff05682514ff94c6904f7f0af305650
|
[] |
no_license
|
mosoft521/jmtpdp
|
f2222443b6b6503866ec1f01f7ac4996e5fb987d
|
cc4697cfc1dcd6c42b138f64e81f52e1ce6616b4
|
refs/heads/master
| 2021-01-10T06:08:58.640358
| 2017-08-15T05:27:08
| 2017-08-15T05:27:08
| 51,734,372
| 3
| 5
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,034
|
java
|
package com.gmail.mosoft521.jmtpdp.ch13pipeline.example;
import org.apache.commons.net.ftp.FTP;
import org.apache.commons.net.ftp.FTPClient;
import org.apache.commons.net.ftp.FTPClientConfig;
import org.apache.commons.net.ftp.FTPReply;
import java.io.BufferedInputStream;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
import java.util.concurrent.FutureTask;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
//模式角色:Promise.Promisor、Promise.Result
public class FTPClientUtil {
/*
* helperExecutor是个静态变量,这使得newInstance方法在生成不同的FTPClientUtil实例时可以共用同一个线程池。
* 模式角色:Promise.TaskExecutor
*/
private volatile static ExecutorService helperExecutor;
static {
helperExecutor = new ThreadPoolExecutor(1, Runtime.getRuntime()
.availableProcessors() * 2, 60, TimeUnit.SECONDS,
new ArrayBlockingQueue<Runnable>(10), new ThreadFactory() {
public Thread newThread(Runnable r) {
Thread t = new Thread(r);
t.setDaemon(true);
return t;
}
}, new ThreadPoolExecutor.CallerRunsPolicy());
}
private final FTPClient ftp = new FTPClient();
private final Map<String, Boolean> dirCreateMap = new HashMap<String, Boolean>();
// 私有构造器
private FTPClientUtil() {
}
// 模式角色:Promise.Promisor.compute
public static Future<FTPClientUtil> newInstance(final String ftpServer,
final String userName, final String password) {
Callable<FTPClientUtil> callable = new Callable<FTPClientUtil>() {
@Override
public FTPClientUtil call() throws Exception {
FTPClientUtil self = new FTPClientUtil();
self.init(ftpServer, userName, password);
return self;
}
};
// task相当于模式角色:Promise.Promise
final FutureTask<FTPClientUtil> task = new FutureTask<FTPClientUtil>(
callable);
helperExecutor.execute(task);
return task;
}
private void init(String ftpServer, String userName, String password)
throws Exception {
FTPClientConfig config = new FTPClientConfig();
ftp.configure(config);
int reply;
ftp.connect(ftpServer);
System.out.print(ftp.getReplyString());
reply = ftp.getReplyCode();
if (!FTPReply.isPositiveCompletion(reply)) {
ftp.disconnect();
throw new RuntimeException("FTP server refused connection.");
}
boolean isOK = ftp.login(userName, password);
if (isOK) {
System.out.println(ftp.getReplyString());
} else {
throw new RuntimeException("Failed to login." + ftp.getReplyString());
}
reply = ftp.cwd("~/subspsync");
if (!FTPReply.isPositiveCompletion(reply)) {
ftp.disconnect();
throw new RuntimeException("Failed to change working directory.reply:"
+ reply);
} else {
System.out.println(ftp.getReplyString());
}
ftp.setFileType(FTP.ASCII_FILE_TYPE);
}
public void upload(File file) throws Exception {
InputStream dataIn = new BufferedInputStream(new FileInputStream(file),
1024 * 8);
boolean isOK;
String dirName = file.getParentFile().getName();
String fileName = dirName + '/' + file.getName();
ByteArrayInputStream checkFileInputStream = new ByteArrayInputStream(
"".getBytes());
try {
if (!dirCreateMap.containsKey(dirName)) {
ftp.makeDirectory(dirName);
dirCreateMap.put(dirName, null);
}
try {
isOK = ftp.storeFile(fileName, dataIn);
} catch (IOException e) {
throw new RuntimeException("Failed to upload " + file, e);
}
if (isOK) {
ftp.storeFile(fileName + ".c", checkFileInputStream);
} else {
throw new RuntimeException("Failed to upload " + file + ",reply:" + ","
+ ftp.getReplyString());
}
} finally {
dataIn.close();
}
}
public void disconnect() {
if (ftp.isConnected()) {
try {
ftp.disconnect();
} catch (IOException ioe) {
// 什么也不做
}
}
}
}
|
[
"mosoft521@gmail.com"
] |
mosoft521@gmail.com
|
59ab29cfb4f226e236f7be34f9258a49ad8866ed
|
f6b90fae50ea0cd37c457994efadbd5560a5d663
|
/android/nut-dex2jar.src/com/tencent/wxop/stat/b/r.java
|
f416bcb121f92f1c8aea4b9122aacd4df61ccbce
|
[] |
no_license
|
dykdykdyk/decompileTools
|
5925ae91f588fefa7c703925e4629c782174cd68
|
4de5c1a23f931008fa82b85046f733c1439f06cf
|
refs/heads/master
| 2020-01-27T09:56:48.099821
| 2016-09-14T02:47:11
| 2016-09-14T02:47:11
| 66,894,502
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,877
|
java
|
package com.tencent.wxop.stat.b;
import android.content.Context;
import android.content.pm.PackageManager;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.wifi.ScanResult;
import android.net.wifi.WifiInfo;
import android.net.wifi.WifiManager;
import android.os.Build.VERSION;
import android.telephony.TelephonyManager;
import android.util.Log;
import java.util.Collections;
import java.util.List;
import org.json.JSONArray;
import org.json.JSONObject;
public final class r
{
private static String a = "";
public static String a(Context paramContext)
{
try
{
if (a(paramContext, "android.permission.READ_PHONE_STATE"))
{
paramContext = ((TelephonyManager)paramContext.getSystemService("phone")).getDeviceId();
if (paramContext != null)
return paramContext;
}
else
{
Log.e("MtaSDK", "Could not get permission of android.permission.READ_PHONE_STATE");
}
return null;
}
catch (Throwable paramContext)
{
while (true)
Log.e("MtaSDK", "get device id error", paramContext);
}
}
public static String a(String paramString)
{
String str;
if (paramString == null)
str = null;
do
{
return str;
str = paramString;
}
while (Build.VERSION.SDK_INT < 8);
try
{
str = new String(g.b(h.a(paramString.getBytes("UTF-8"))), "UTF-8");
return str;
}
catch (Throwable localThrowable)
{
Log.e("MtaSDK", "decode error", localThrowable);
}
return paramString;
}
public static void a(JSONObject paramJSONObject, String paramString1, String paramString2)
{
if (paramString2 != null);
try
{
if (paramString2.length() > 0)
paramJSONObject.put(paramString1, paramString2);
return;
}
catch (Throwable paramJSONObject)
{
Log.e("MtaSDK", "jsonPut error", paramJSONObject);
}
}
public static boolean a(Context paramContext, String paramString)
{
boolean bool = false;
try
{
int i = paramContext.getPackageManager().checkPermission(paramString, paramContext.getPackageName());
if (i == 0)
bool = true;
return bool;
}
catch (Throwable paramContext)
{
Log.e("MtaSDK", "checkPermission error", paramContext);
}
return false;
}
public static String b(Context paramContext)
{
if (a(paramContext, "android.permission.ACCESS_WIFI_STATE"))
try
{
paramContext = (WifiManager)paramContext.getSystemService("wifi");
if (paramContext == null)
return "";
paramContext = paramContext.getConnectionInfo().getMacAddress();
return paramContext;
}
catch (Exception paramContext)
{
Log.e("MtaSDK", "get wifi address error", paramContext);
return "";
}
Log.e("MtaSDK", "Could not get permission of android.permission.ACCESS_WIFI_STATE");
return "";
}
public static String b(String paramString)
{
String str;
if (paramString == null)
str = null;
do
{
return str;
str = paramString;
}
while (Build.VERSION.SDK_INT < 8);
try
{
str = new String(h.b(g.a(paramString.getBytes("UTF-8"))), "UTF-8");
return str;
}
catch (Throwable localThrowable)
{
Log.e("MtaSDK", "encode error", localThrowable);
}
return paramString;
}
public static String c(Context paramContext)
{
try
{
paramContext = g(paramContext);
if (paramContext != null)
{
paramContext = paramContext.getBSSID();
return paramContext;
}
}
catch (Throwable paramContext)
{
Log.e("MtaSDK", "encode error", paramContext);
}
return null;
}
public static String d(Context paramContext)
{
try
{
paramContext = g(paramContext);
if (paramContext != null)
{
paramContext = paramContext.getSSID();
return paramContext;
}
}
catch (Throwable paramContext)
{
Log.e("MtaSDK", "encode error", paramContext);
}
return null;
}
public static boolean e(Context paramContext)
{
try
{
if ((a(paramContext, "android.permission.INTERNET")) && (a(paramContext, "android.permission.ACCESS_NETWORK_STATE")))
{
paramContext = (ConnectivityManager)paramContext.getSystemService("connectivity");
if (paramContext != null)
{
paramContext = paramContext.getActiveNetworkInfo();
if ((paramContext != null) && (paramContext.isAvailable()))
return true;
Log.w("MtaSDK", "Network error");
return false;
}
}
else
{
Log.e("MtaSDK", "can not get the permisson of android.permission.INTERNET");
}
return false;
}
catch (Throwable paramContext)
{
while (true)
Log.e("MtaSDK", "isNetworkAvailable error", paramContext);
}
}
public static JSONArray f(Context paramContext)
{
JSONArray localJSONArray;
try
{
if ((a(paramContext, "android.permission.INTERNET")) && (a(paramContext, "android.permission.ACCESS_NETWORK_STATE")))
{
paramContext = (WifiManager)paramContext.getSystemService("wifi");
if (paramContext != null)
{
paramContext = paramContext.getScanResults();
if ((paramContext != null) && (paramContext.size() > 0))
{
Collections.sort(paramContext, new s());
localJSONArray = new JSONArray();
int i = 0;
while ((i < paramContext.size()) && (i < 10))
{
ScanResult localScanResult = (ScanResult)paramContext.get(i);
JSONObject localJSONObject = new JSONObject();
localJSONObject.put("bs", localScanResult.BSSID);
localJSONObject.put("ss", localScanResult.SSID);
localJSONArray.put(localJSONObject);
i += 1;
}
}
}
}
else
{
Log.e("MtaSDK", "can not get the permisson of android.permission.INTERNET");
}
return null;
}
catch (Throwable paramContext)
{
while (true)
Log.e("MtaSDK", "isWifiNet error", paramContext);
}
return localJSONArray;
}
private static WifiInfo g(Context paramContext)
{
if (a(paramContext, "android.permission.ACCESS_WIFI_STATE"))
{
paramContext = (WifiManager)paramContext.getApplicationContext().getSystemService("wifi");
if (paramContext != null)
return paramContext.getConnectionInfo();
}
return null;
}
}
/* Location: C:\crazyd\work\ustone\odm2016031702\baidu\android\nut-dex2jar.jar
* Qualified Name: com.tencent.wxop.stat.b.r
* JD-Core Version: 0.6.2
*/
|
[
"819468107@qq.com"
] |
819468107@qq.com
|
9b40cfcca4789dfedb7193e88016a8681b4ae7b9
|
75aa50b8c053defc3d1fcd1afd46b90e91f295cb
|
/eomcs-java-project-48-server/src/main/java/com/eomcs/lms/handler/MemberAddCommand.java
|
2f0eab85d936b2404e43866abefe0635a4ee4867
|
[] |
no_license
|
top9148/eomcs-java-project
|
97e1fcc959326e5c9d8c8b0aca9415bbff5d840b
|
b2174abf3c5f89d54b54345efa322ac2a89ca4da
|
refs/heads/master
| 2020-06-17T11:31:46.570262
| 2019-03-08T00:43:46
| 2019-03-08T00:43:46
| 195,911,349
| 1
| 0
| null | 2019-07-09T01:41:11
| 2019-07-09T01:41:11
| null |
UTF-8
|
Java
| false
| false
| 1,162
|
java
|
package com.eomcs.lms.handler;
import java.io.BufferedReader;
import java.io.PrintWriter;
import com.eomcs.lms.dao.MemberDao;
import com.eomcs.lms.domain.Member;
import com.eomcs.stereotype.CommandMapping;
import com.eomcs.stereotype.Component;
@Component
public class MemberAddCommand {
MemberDao memberDao;
public MemberAddCommand(MemberDao memberDao) {
this.memberDao = memberDao;
}
@CommandMapping("/member/add")
public void add(BufferedReader in, PrintWriter out) {
try {
Member member = new Member();
out.print("이름?\n!{}!\n"); out.flush();
member.setName(in.readLine());
out.print("이메일?\n!{}!\n"); out.flush();
member.setEmail(in.readLine());
out.print("암호?\n!{}!\n"); out.flush();
member.setPassword(in.readLine());
out.print("사진?\n!{}!\n"); out.flush();
member.setPhoto(in.readLine());
out.print("전화?\n!{}!\n"); out.flush();
member.setTel(in.readLine());
memberDao.add(member);
out.println("회원을 저장했습니다.");
} catch (Exception e) {
out.printf("%s : %s\n", e.toString(), e.getMessage());
}
}
}
|
[
"jinyoung.eom@gmail.com"
] |
jinyoung.eom@gmail.com
|
e8ed35cd1dc4cae4215ad53c8a7f5803e1473583
|
a9279e164bda62d3843d901bdc74d29a893f2651
|
/src/main/java/com/mkolongo/grocery_store/service/abstraction/MerchantProductService.java
|
a684f8a20ffb4222e219d8b3839249b0add29351
|
[] |
no_license
|
Chris-Mk/grocery_store
|
0c02d60c2d9589fc29fea131463d3df4db7055cd
|
2e0c4360f25ac238a37d27a61801bb6a898653bc
|
refs/heads/master
| 2023-06-03T07:32:03.710633
| 2021-06-13T13:14:28
| 2021-06-13T13:14:28
| 338,658,508
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 446
|
java
|
package com.mkolongo.grocery_store.service.abstraction;
import com.mkolongo.grocery_store.domain.models.binding.MerchantBindingModel;
import com.mkolongo.grocery_store.domain.models.binding.ProductBindingModel;
import java.util.Set;
public interface MerchantProductService {
void registerMerchantAndProducts(MerchantBindingModel merchantBindingModel,
Set<ProductBindingModel> productBindingModels);
}
|
[
"chrismks23@gmail.com"
] |
chrismks23@gmail.com
|
e70a1662187301d643e40d3deca3f3ceb8f2a41c
|
77aed0c29f6cf7bb8197abb36e8464e016daec98
|
/graphsdk/src/main/java/com/microsoft/graph/generated/IBaseConversationThreadReplyRequestBuilder.java
|
ea1148bc705a18fa312f505c98cc1231320342f8
|
[
"MIT"
] |
permissive
|
TBag/msgraph-sdk-android
|
c93ef70b0158b053cb0554101ae3df8a23a4d233
|
9311679c5881f91e5e1a775860f46643ba3652ac
|
refs/heads/master
| 2021-01-18T12:25:15.925515
| 2016-06-28T18:53:17
| 2016-06-28T18:53:17
| 60,361,545
| 1
| 0
| null | 2016-06-28T18:53:17
| 2016-06-03T16:18:26
|
Java
|
UTF-8
|
Java
| false
| false
| 1,437
|
java
|
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
package com.microsoft.graph.generated;
import com.microsoft.graph.concurrency.*;
import com.microsoft.graph.core.*;
import com.microsoft.graph.extensions.*;
import com.microsoft.graph.http.*;
import com.microsoft.graph.generated.*;
import com.microsoft.graph.options.*;
import com.microsoft.graph.serializer.*;
import java.util.Arrays;
import java.util.List;
// **NOTE** This file was generated by a tool and any changes will be overwritten.
/**
* The interface for the Base Conversation Thread Reply Request Builder.
*/
public interface IBaseConversationThreadReplyRequestBuilder extends IRequestBuilder {
/**
* Creates the IConversationThreadReplyRequest
*
* @return The IConversationThreadReplyRequest instance
*/
IConversationThreadReplyRequest buildRequest();
/**
* Creates the IConversationThreadReplyRequest with specific options instead of the existing options
*
* @param options the options for the request
* @return The IConversationThreadReplyRequest instance
*/
IConversationThreadReplyRequest buildRequest(final List<Option> options);
}
|
[
"pnied@microsoft.com"
] |
pnied@microsoft.com
|
47546bc2dfc7e023ae16b4df6f7818d308debc20
|
0bffcdd8c5f803627956bd7cec7b28d1cea00dc3
|
/src/main/java/com/hw/entities/LoginParams.java
|
c721d4ada08fee68a902620509541c9565884e83
|
[] |
no_license
|
sinzua/baseApk
|
eb5d8c28cdb385ec49413217151ebba7c2fbb723
|
9011fb631ed84b1747561244cc08fff38205e97c
|
refs/heads/master
| 2021-01-21T17:39:20.367401
| 2017-05-21T18:06:26
| 2017-05-21T18:06:26
| 91,977,496
| 3
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,469
|
java
|
package com.hw.entities;
public class LoginParams {
private String _csrftoken = "2435840e7eb34784eac33b2b391818eb";
private String _uuid;
private String device_id;
private boolean from_reg;
private String password;
private String username;
public LoginParams(UserInfo userInfo) {
this.username = userInfo.getUserName();
this.password = userInfo.getPassword();
String uuid = userInfo.getUuid();
this.device_id = uuid;
this._uuid = uuid;
}
public String get_uuid() {
return this._uuid;
}
public void set_uuid(String _uuid) {
this._uuid = _uuid;
}
public String getPassword() {
return this.password;
}
public void setPassword(String password) {
this.password = password;
}
public String getUsername() {
return this.username;
}
public void setUsername(String username) {
this.username = username;
}
public String getDevice_id() {
return this.device_id;
}
public void setDevice_id(String device_id) {
this.device_id = device_id;
}
public boolean isFrom_reg() {
return this.from_reg;
}
public void setFrom_reg(boolean from_reg) {
this.from_reg = from_reg;
}
public String get_csrftoken() {
return this._csrftoken;
}
public void set_csrftoken(String _csrftoken) {
this._csrftoken = _csrftoken;
}
}
|
[
"sinzua@gmail.com"
] |
sinzua@gmail.com
|
619618b7170ab3a25d02c756a7fa15043d733389
|
cf0f34937b476ecde5ebcca7e2119bcbb27cfbf2
|
/src/com/huateng/po/TblRiskInfUpdLog.java
|
3a33a16128b8c487d66995d97e928d4d14ed93db
|
[] |
no_license
|
Deron84/xxxTest
|
b5f38cc2dfe3fe28b01634b58b1236b7ec5b4854
|
302b807f394e31ac7350c5c006cb8dc334fc967f
|
refs/heads/master
| 2022-02-01T03:32:54.689996
| 2019-07-23T11:04:09
| 2019-07-23T11:04:09
| 198,212,201
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,333
|
java
|
package com.huateng.po;
import java.io.Serializable;
public class TblRiskInfUpdLog implements Serializable {
private static final long serialVersionUID = 1L;
protected void initialize() {
}
/**
*
*/
public TblRiskInfUpdLog() {
super();
}
private int hashCode = Integer.MIN_VALUE;
// primary key
private java.lang.String id;
// fields
private java.lang.String saModelKind;
private java.lang.String saFieldName;
private java.lang.String saFieldValueBF;
private java.lang.String saFieldValue;
private java.lang.String modiZoneNo;
private java.lang.String modiOprId;
private java.lang.String modiTime;
/**
* @return the id
*/
public java.lang.String getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(java.lang.String id) {
this.id = id;
}
/**
* @return the saModelKind
*/
public java.lang.String getSaModelKind() {
return saModelKind;
}
/**
* @param saModelKind the saModelKind to set
*/
public void setSaModelKind(java.lang.String saModelKind) {
this.saModelKind = saModelKind;
}
/**
* @return the saFieldName
*/
public java.lang.String getSaFieldName() {
return saFieldName;
}
/**
* @param saFieldName the saFieldName to set
*/
public void setSaFieldName(java.lang.String saFieldName) {
this.saFieldName = saFieldName;
}
/**
* @return the saFieldValueBF
*/
public java.lang.String getSaFieldValueBF() {
return saFieldValueBF;
}
/**
* @param saFieldValueBF the saFieldValueBF to set
*/
public void setSaFieldValueBF(java.lang.String saFieldValueBF) {
this.saFieldValueBF = saFieldValueBF;
}
/**
* @return the saFieldValue
*/
public java.lang.String getSaFieldValue() {
return saFieldValue;
}
/**
* @param saFieldValue the saFieldValue to set
*/
public void setSaFieldValue(java.lang.String saFieldValue) {
this.saFieldValue = saFieldValue;
}
/**
* @return the modiZoneNo
*/
public java.lang.String getModiZoneNo() {
return modiZoneNo;
}
/**
* @return the modiOprId
*/
public java.lang.String getModiOprId() {
return modiOprId;
}
/**
* @param modiOprId the modiOprId to set
*/
public void setModiOprId(java.lang.String modiOprId) {
this.modiOprId = modiOprId;
}
/**
* @param modiZoneNo the modiZoneNo to set
*/
public void setModiZoneNo(java.lang.String modiZoneNo) {
this.modiZoneNo = modiZoneNo;
}
/**
* @return the modiTime
*/
public java.lang.String getModiTime() {
return modiTime;
}
/**
* @param modiTime the modiTime to set
*/
public void setModiTime(java.lang.String modiTime) {
this.modiTime = modiTime;
}
public boolean equals(Object obj) {
if (null == obj)
return false;
if (!(obj instanceof TblRiskInfUpdLog))
return false;
else {
TblRiskInfUpdLog tblRiskInf = (TblRiskInfUpdLog) obj;
if (null == this.getId() || null == tblRiskInf.getId())
return false;
else
return (this.getId().equals(tblRiskInf.getId()));
}
}
public int hashCode() {
if (Integer.MIN_VALUE == this.hashCode) {
if (null == this.getId())
return super.hashCode();
else {
String hashStr = this.getClass().getName() + ":"
+ this.getId().hashCode();
this.hashCode = hashStr.hashCode();
}
}
return this.hashCode;
}
public String toString() {
return super.toString();
}
}
|
[
"weijx@inspur.com"
] |
weijx@inspur.com
|
4e923c5d29b05ad2194de1195bac01c1bcdf7c1d
|
0d6800f311072bbd3ee0de305b1145d1040521e8
|
/src/main/java/org/yaml/snakeyaml/nodes/Node.java
|
4c4c7cb756d558640395f98f2363670140095bf9
|
[] |
no_license
|
MisterSandFR/LunchBox
|
52ddc560721f71b5c593f1f53f350bf8c24a42ad
|
70ddc5432c56668d0e4ad1add9a0742263934dc7
|
refs/heads/master
| 2020-12-25T05:03:03.642668
| 2016-06-09T00:39:43
| 2016-06-09T00:39:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,160
|
java
|
package org.yaml.snakeyaml.nodes;
import org.yaml.snakeyaml.error.Mark;
public abstract class Node {
private Tag tag;
private Mark startMark;
protected Mark endMark;
private Class type;
private boolean twoStepsConstruction;
protected boolean resolved;
protected Boolean useClassConstructor;
public Node(Tag tag, Mark startMark, Mark endMark) {
this.setTag(tag);
this.startMark = startMark;
this.endMark = endMark;
this.type = Object.class;
this.twoStepsConstruction = false;
this.resolved = true;
this.useClassConstructor = null;
}
public Tag getTag() {
return this.tag;
}
public Mark getEndMark() {
return this.endMark;
}
public abstract NodeId getNodeId();
public Mark getStartMark() {
return this.startMark;
}
public void setTag(Tag tag) {
if (tag == null) {
throw new NullPointerException("tag in a Node is required.");
} else {
this.tag = tag;
}
}
public final boolean equals(Object obj) {
return super.equals(obj);
}
public Class getType() {
return this.type;
}
public void setType(Class type) {
if (!type.isAssignableFrom(this.type)) {
this.type = type;
}
}
public void setTwoStepsConstruction(boolean twoStepsConstruction) {
this.twoStepsConstruction = twoStepsConstruction;
}
public boolean isTwoStepsConstruction() {
return this.twoStepsConstruction;
}
public final int hashCode() {
return super.hashCode();
}
public boolean useClassConstructor() {
return this.useClassConstructor == null ? (!this.tag.isSecondary() && this.isResolved() && !Object.class.equals(this.type) && !this.tag.equals(Tag.NULL) ? true : this.tag.isCompatible(this.getType())) : this.useClassConstructor.booleanValue();
}
public void setUseClassConstructor(Boolean useClassConstructor) {
this.useClassConstructor = useClassConstructor;
}
public boolean isResolved() {
return this.resolved;
}
}
|
[
"pturchan@yahoo.com"
] |
pturchan@yahoo.com
|
5edfaa79d974b2867d76dd5fe36ad9d1f79161c0
|
5d5c2688698a2d6689c1d635724b550b31224c86
|
/extlib-des/lwp/openntf/design-test/eclipse/plugins/com.ibm.xsp.extlib.designer.tooling.test/src/xsp/extlib/designer/test/visualizations/dojoform/DjVerticalSliderVisualizerTest.java
|
bbf6886d5da94848eea6365330a957816f76ee6c
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-other-permissive",
"MIT",
"CDDL-1.1",
"LicenseRef-scancode-public-domain"
] |
permissive
|
OpenNTF/XPagesExtensionLibrary
|
6bffba4bd5eab5b148a3b4d700da244aab053743
|
25b3b1df7fafb7ceb131e07ade93de5c9ff733d5
|
refs/heads/master
| 2020-04-15T16:12:15.910509
| 2020-03-11T11:49:17
| 2020-03-11T11:49:17
| 26,643,618
| 21
| 35
|
Apache-2.0
| 2019-03-25T12:55:44
| 2014-11-14T15:08:35
|
Java
|
UTF-8
|
Java
| false
| false
| 2,784
|
java
|
/*
* Copyright IBM Corp. 2011
*
* 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 xsp.extlib.designer.test.visualizations.dojoform;
import xsp.extlib.designer.test.visualizations.AbstractVisualizationTest;
import com.ibm.xsp.extlib.designer.tooling.visualizations.dojoform.DjVerticalSliderVisualizer;
public class DjVerticalSliderVisualizerTest extends AbstractVisualizationTest {
/*
* (non-Javadoc)
* @see xsp.extlib.designer.test.visualizations.AbstractVisualizationTest#getTagName()
*/
@Override
public String getTagName() {
return "djVerticalSlider";
}
/*
* (non-Javadoc)
* @see xsp.extlib.designer.test.visualizations.AbstractVisualizationTest#getTagName()
*/
@Override
public String getNamespaceURI() {
return EXT_LIB_NAMESPACE_URI;
}
/*
* (non-Javadoc)
* @see xsp.extlib.designer.test.visualizations.AbstractVisualizationTest#setUp()
*/
@Override
protected void setUp() throws Exception {
super.setUp();
_visualizationFactory = new DjVerticalSliderVisualizer();
}
/*
* (non-Javadoc)
* @see xsp.extlib.designer.test.visualizations.AbstractVisualizationTest#isRenderMarkupStatic()
*/
@Override
public boolean isRenderMarkupStatic(){
return true;
}
/*
* (non-Javadoc)
* @see xsp.extlib.designer.test.visualizations.AbstractVisualizationTest#getExectedXSPMarkup()
*/
@Override
public String getExpectedXSPMarkup() {
StringBuilder strBuilder = new StringBuilder();
strBuilder.append("<xp:image url=\"/extlib/designer/markup/dojoform/vertSlider.png\">");
strBuilder.append("</xp:image>");
return strBuilder.toString();
}
/*
* (non-Javadoc)
* @see xsp.extlib.designer.test.visualizations.AbstractVisualizationTest#getExpectedFullXSPMarkup()
*/
@Override
public String getExpectedFullXSPMarkup() {
StringBuilder strBuilder = new StringBuilder();
strBuilder.append(getDefaultXPageHeader());
strBuilder.append(getExpectedXSPMarkup());
strBuilder.append(getDefaultXPageFooter());
return strBuilder.toString();
}
/*
* (non-Javadoc)
* @see xsp.extlib.designer.test.visualizations.AbstractVisualizationTest#getExpectedProcessedFullXSPMarkup()
*/
@Override
public String getExpectedProcessedFullXSPMarkup() {
return getExpectedFullXSPMarkup();
}
}
|
[
"padraic.edwards@ie.ibm.com"
] |
padraic.edwards@ie.ibm.com
|
e067b7ce5521c3b19ddf6c7c6a64b5834c17c7ea
|
104cda8eafe0617e2a5fa1e2b9f242d78370521b
|
/aliyun-java-sdk-vpc/src/main/java/com/aliyuncs/vpc/transform/v20160428/DescribeNetworkAclsResponseUnmarshaller.java
|
28f4498d41156f559d43718162b4b905db3b5459
|
[
"Apache-2.0"
] |
permissive
|
SanthosheG/aliyun-openapi-java-sdk
|
89f9b245c1bcdff8dac0866c36ff9a261aa40684
|
38a910b1a7f4bdb1b0dd29601a1450efb1220f79
|
refs/heads/master
| 2020-07-24T00:00:59.491294
| 2019-09-09T23:00:27
| 2019-09-11T04:29:56
| 207,744,099
| 2
| 0
|
NOASSERTION
| 2019-09-11T06:55:58
| 2019-09-11T06:55:58
| null |
UTF-8
|
Java
| false
| false
| 6,641
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.aliyuncs.vpc.transform.v20160428;
import java.util.ArrayList;
import java.util.List;
import com.aliyuncs.vpc.model.v20160428.DescribeNetworkAclsResponse;
import com.aliyuncs.vpc.model.v20160428.DescribeNetworkAclsResponse.NetworkAcl;
import com.aliyuncs.vpc.model.v20160428.DescribeNetworkAclsResponse.NetworkAcl.EgressAclEntry;
import com.aliyuncs.vpc.model.v20160428.DescribeNetworkAclsResponse.NetworkAcl.IngressAclEntry;
import com.aliyuncs.vpc.model.v20160428.DescribeNetworkAclsResponse.NetworkAcl.Resource;
import com.aliyuncs.transform.UnmarshallerContext;
public class DescribeNetworkAclsResponseUnmarshaller {
public static DescribeNetworkAclsResponse unmarshall(DescribeNetworkAclsResponse describeNetworkAclsResponse, UnmarshallerContext _ctx) {
describeNetworkAclsResponse.setRequestId(_ctx.stringValue("DescribeNetworkAclsResponse.RequestId"));
describeNetworkAclsResponse.setTotalCount(_ctx.stringValue("DescribeNetworkAclsResponse.TotalCount"));
describeNetworkAclsResponse.setPageNumber(_ctx.stringValue("DescribeNetworkAclsResponse.PageNumber"));
describeNetworkAclsResponse.setPageSize(_ctx.stringValue("DescribeNetworkAclsResponse.PageSize"));
List<NetworkAcl> networkAcls = new ArrayList<NetworkAcl>();
for (int i = 0; i < _ctx.lengthValue("DescribeNetworkAclsResponse.NetworkAcls.Length"); i++) {
NetworkAcl networkAcl = new NetworkAcl();
networkAcl.setNetworkAclId(_ctx.stringValue("DescribeNetworkAclsResponse.NetworkAcls["+ i +"].NetworkAclId"));
networkAcl.setRegionId(_ctx.stringValue("DescribeNetworkAclsResponse.NetworkAcls["+ i +"].RegionId"));
networkAcl.setNetworkAclName(_ctx.stringValue("DescribeNetworkAclsResponse.NetworkAcls["+ i +"].NetworkAclName"));
networkAcl.setDescription(_ctx.stringValue("DescribeNetworkAclsResponse.NetworkAcls["+ i +"].Description"));
networkAcl.setVpcId(_ctx.stringValue("DescribeNetworkAclsResponse.NetworkAcls["+ i +"].VpcId"));
networkAcl.setCreationTime(_ctx.stringValue("DescribeNetworkAclsResponse.NetworkAcls["+ i +"].CreationTime"));
networkAcl.setStatus(_ctx.stringValue("DescribeNetworkAclsResponse.NetworkAcls["+ i +"].Status"));
List<IngressAclEntry> ingressAclEntries = new ArrayList<IngressAclEntry>();
for (int j = 0; j < _ctx.lengthValue("DescribeNetworkAclsResponse.NetworkAcls["+ i +"].IngressAclEntries.Length"); j++) {
IngressAclEntry ingressAclEntry = new IngressAclEntry();
ingressAclEntry.setNetworkAclEntryId(_ctx.stringValue("DescribeNetworkAclsResponse.NetworkAcls["+ i +"].IngressAclEntries["+ j +"].NetworkAclEntryId"));
ingressAclEntry.setPolicy(_ctx.stringValue("DescribeNetworkAclsResponse.NetworkAcls["+ i +"].IngressAclEntries["+ j +"].Policy"));
ingressAclEntry.setProtocol(_ctx.stringValue("DescribeNetworkAclsResponse.NetworkAcls["+ i +"].IngressAclEntries["+ j +"].Protocol"));
ingressAclEntry.setSourceCidrIp(_ctx.stringValue("DescribeNetworkAclsResponse.NetworkAcls["+ i +"].IngressAclEntries["+ j +"].SourceCidrIp"));
ingressAclEntry.setPort(_ctx.stringValue("DescribeNetworkAclsResponse.NetworkAcls["+ i +"].IngressAclEntries["+ j +"].Port"));
ingressAclEntry.setEntryType(_ctx.stringValue("DescribeNetworkAclsResponse.NetworkAcls["+ i +"].IngressAclEntries["+ j +"].EntryType"));
ingressAclEntry.setNetworkAclEntryName(_ctx.stringValue("DescribeNetworkAclsResponse.NetworkAcls["+ i +"].IngressAclEntries["+ j +"].NetworkAclEntryName"));
ingressAclEntry.setDescription(_ctx.stringValue("DescribeNetworkAclsResponse.NetworkAcls["+ i +"].IngressAclEntries["+ j +"].Description"));
ingressAclEntries.add(ingressAclEntry);
}
networkAcl.setIngressAclEntries(ingressAclEntries);
List<EgressAclEntry> egressAclEntries = new ArrayList<EgressAclEntry>();
for (int j = 0; j < _ctx.lengthValue("DescribeNetworkAclsResponse.NetworkAcls["+ i +"].EgressAclEntries.Length"); j++) {
EgressAclEntry egressAclEntry = new EgressAclEntry();
egressAclEntry.setNetworkAclEntryId(_ctx.stringValue("DescribeNetworkAclsResponse.NetworkAcls["+ i +"].EgressAclEntries["+ j +"].NetworkAclEntryId"));
egressAclEntry.setPolicy(_ctx.stringValue("DescribeNetworkAclsResponse.NetworkAcls["+ i +"].EgressAclEntries["+ j +"].Policy"));
egressAclEntry.setProtocol(_ctx.stringValue("DescribeNetworkAclsResponse.NetworkAcls["+ i +"].EgressAclEntries["+ j +"].Protocol"));
egressAclEntry.setDestinationCidrIp(_ctx.stringValue("DescribeNetworkAclsResponse.NetworkAcls["+ i +"].EgressAclEntries["+ j +"].DestinationCidrIp"));
egressAclEntry.setPort(_ctx.stringValue("DescribeNetworkAclsResponse.NetworkAcls["+ i +"].EgressAclEntries["+ j +"].Port"));
egressAclEntry.setEntryType(_ctx.stringValue("DescribeNetworkAclsResponse.NetworkAcls["+ i +"].EgressAclEntries["+ j +"].EntryType"));
egressAclEntry.setDescription(_ctx.stringValue("DescribeNetworkAclsResponse.NetworkAcls["+ i +"].EgressAclEntries["+ j +"].Description"));
egressAclEntry.setNetworkAclEntryName(_ctx.stringValue("DescribeNetworkAclsResponse.NetworkAcls["+ i +"].EgressAclEntries["+ j +"].NetworkAclEntryName"));
egressAclEntries.add(egressAclEntry);
}
networkAcl.setEgressAclEntries(egressAclEntries);
List<Resource> resources = new ArrayList<Resource>();
for (int j = 0; j < _ctx.lengthValue("DescribeNetworkAclsResponse.NetworkAcls["+ i +"].Resources.Length"); j++) {
Resource resource = new Resource();
resource.setResourceId(_ctx.stringValue("DescribeNetworkAclsResponse.NetworkAcls["+ i +"].Resources["+ j +"].ResourceId"));
resource.setResourceType(_ctx.stringValue("DescribeNetworkAclsResponse.NetworkAcls["+ i +"].Resources["+ j +"].ResourceType"));
resource.setStatus(_ctx.stringValue("DescribeNetworkAclsResponse.NetworkAcls["+ i +"].Resources["+ j +"].Status"));
resources.add(resource);
}
networkAcl.setResources(resources);
networkAcls.add(networkAcl);
}
describeNetworkAclsResponse.setNetworkAcls(networkAcls);
return describeNetworkAclsResponse;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
dd0b0140a92af7436cf1af53cac051085435da5d
|
c9f35539fc31dfbffd8dd20ff3412445074a96cb
|
/LTR-IE/src/edu/columbia/cs/ltrie/extractor/wrapping/CIMPLEExtractionSystem.java
|
cb3f0f3dc9d5324de61e2f7eaae2d22db666d755
|
[] |
no_license
|
wsgan001/LTR-IE
|
e161bfedee90ee4f310a1938bf5b027a7d600b90
|
876171b7d1268d1e2b05be84233575eb2af42a6a
|
refs/heads/master
| 2020-03-27T00:54:42.536393
| 2015-12-28T23:01:34
| 2015-12-28T23:01:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,837
|
java
|
package edu.columbia.cs.ltrie.extractor.wrapping;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
import edu.columbia.cs.ltrie.datamodel.Span;
import edu.columbia.cs.ltrie.datamodel.Tuple;
import edu.columbia.cs.ltrie.extractor.ExtractionSystem;
import edu.columbia.cs.ltrie.utils.SerializationHelper;
import prototype.CIMPLE.execution.OperatorNode;
import prototype.CIMPLE.loader.DocumentContentLoader;
import prototype.CIMPLE.loader.ListOfFilesLoader;
import prototype.CIMPLE.optimizer.Optimizer;
public class CIMPLEExtractionSystem extends ExtractionSystem {
private OperatorNode executionPlan;
public CIMPLEExtractionSystem(String executionPlan) throws IllegalArgumentException, IOException, ClassNotFoundException, InstantiationException, IllegalAccessException, InvocationTargetException{
this.executionPlan = (OperatorNode) SerializationHelper.read(executionPlan);
}
@Override
public List<Tuple> execute(String path, String docContent) {
executionPlan.resetNode();
DocumentContentLoader oneDocLoader = new DocumentContentLoader(path,docContent);
oneDocLoader.loadFullCollection();
List<prototype.CIMPLE.datamodel.Tuple> resultsCIMPLE = executionPlan.execute();
List<Tuple> results = new ArrayList<Tuple>();
for(prototype.CIMPLE.datamodel.Tuple t : resultsCIMPLE){
Tuple newTuple = new Tuple();
for(int i=0;i<t.getSize();i++){
prototype.CIMPLE.datamodel.Span cimpleSpan = (prototype.CIMPLE.datamodel.Span)t.getData(i);
Span newSpan = new Span(path, cimpleSpan.getStart(), cimpleSpan.getEnd(), cimpleSpan.getValue());
newTuple.setData("attribute" + i, newSpan);
}
results.add(newTuple);
}
return results;
}
@Override
public String getPlanString() {
return executionPlan.toString();
}
}
|
[
"pjbarrio@cs.columbia.edu"
] |
pjbarrio@cs.columbia.edu
|
fa5846f97885c3ee3312485a6e890ffce72d0d03
|
55821b09861478c6db214d808f12f493f54ff82a
|
/trunk/java.prj/ecc/src/com/dragonflow/Api/SSBaseReturnValues.java
|
03462b48e6f6839f66bcbedda86f864ac1f1be75
|
[] |
no_license
|
SiteView/ECC8.13
|
ede526a869cf0cb076cd9695dbc16075a1cf9716
|
bced98372138b09140dc108b33bb63f33ef769fe
|
refs/heads/master
| 2016-09-05T13:57:21.282048
| 2012-06-12T08:54:40
| 2012-06-12T08:54:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 412
|
java
|
/*
* Created on 2005-3-10 22:16:20
*
* .java
*
* History:
*
*/
package com.dragonflow.Api;
/**
* Comment for <code></code>
*
* @author
* @version 0.0
*
*
*/
public abstract class SSBaseReturnValues {
public SSBaseReturnValues() {
}
abstract java.lang.Object getReturnValueType();
public java.lang.String toString() {
return "";
}
}
|
[
"136122085@163.com"
] |
136122085@163.com
|
4ee7b879d20476530e514830748fd3539ec268d6
|
0a9cd619bef858b9769e8667cfe1caec769839bc
|
/core/test/smartKeys/quoteLike/PerlQuoteLikeSingleTestCase.java
|
df53a9f7e3ed33cfb6f3d108665d7a396bfca2c6
|
[
"Apache-2.0"
] |
permissive
|
cockscomb/Perl5-IDEA
|
8205b7c5e4f9a7010f06db669252613c45e5d7c5
|
b8b1843fe4f44c44031a2a44a53b50c99e8bdb32
|
refs/heads/master
| 2021-01-15T21:43:48.159002
| 2019-06-05T19:11:22
| 2019-06-05T19:11:22
| 40,441,021
| 0
| 0
| null | 2015-08-09T15:31:52
| 2015-08-09T15:31:51
| null |
UTF-8
|
Java
| false
| false
| 6,692
|
java
|
/*
* Copyright 2015-2017 Alexandr Evstigneev
*
* 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 smartKeys.quoteLike;
/**
* Test for single-section operators: q/qw/qq/qx/m/qr
*/
public abstract class PerlQuoteLikeSingleTestCase extends PerlQuoteLikeTestCase {
public void testParenInParen() {doTestWithBS("$a = (" + OP + "<caret>);", "(", "$a = (" + OP + "(<caret>));");}
public void testBracketInBracket() {doTestWithBS("$a = [" + OP + "<caret>];", "[", "$a = [" + OP + "[<caret>]];");}
public void testBraceInBrace() {doTestWithBS("$a = {" + OP + "<caret>};", "{", "$a = {" + OP + "{<caret>}};");}
public void testIssue1791() {doTestWithBS("foreach (" + OP + "<caret>){}", "(", "foreach (" + OP + "(<caret>)){}");}
public void testParenInParenSpaced() {doTestWithBS("$a = ( " + OP + " <caret> );", "(", "$a = ( " + OP + " (<caret>) );");}
public void testBracketInBracketSpaced() {doTestWithBS("$a = [ " + OP + " <caret> ];", "[", "$a = [ " + OP + " [<caret>] ];");}
public void testBraceInBraceSpaced() {doTestWithBS("$a = { " + OP + " <caret> };", "{", "$a = { " + OP + " {<caret>} };");}
public void testIssue1791Spaced() {doTestWithBS("foreach ( " + OP + " <caret> ){}", "(", "foreach ( " + OP + " (<caret>) ){}");}
public void testPaired() {doTest(OP + "<caret>", "<", OP + "<<caret>>");}
public void testPairedWithSpace() {doTest(OP + " <caret>", "{", OP + " {<caret>}");}
public void testUnpaired() {doTest(OP + "<caret>", "|", OP + "|<caret>|");}
public void testUnpairedWithSpace() {doTest(OP + " <caret>", ",", OP + " ,<caret>,");}
public void testSharp() {doTest(OP + "<caret>", "#", OP + "#<caret>#");}
public void testSharpWithSpace() {doTest(OP + " <caret>", "#", OP + " #<caret>");}
public void testLetter() {doTest(OP + "<caret>", "a", OP + "a<caret>");}
public void testLetterWithSpace() {doTest(OP + " <caret>", "a", OP + " a<caret>a");}
public void testAmbiguousLetter() {doTest(OP + "<caret>", "w", OP + "w<caret>");}
public void testAmbiguousLetterWithSpace() {doTest(OP + " <caret>", "w", OP + " w<caret>w");}
public void testQuoteSingle() {doTest(OP + "<caret>", "'", OP + "'<caret>'");}
public void testQuoteSingleWithSpace() {doTest(OP + " <caret>", "'", OP + " '<caret>'");}
public void testQuoteDouble() {doTest(OP + "<caret>", "\"", OP + "\"<caret>\"");}
public void testQuoteDoubleWithSpace() {doTest(OP + " <caret>", "\"", OP + " \"<caret>\"");}
public void testQuoteTick() {doTest(OP + "<caret>", "`", OP + "`<caret>`");}
public void testQuoteTickWithSpace() {doTest(OP + " <caret>", "`", OP + " `<caret>`");}
public void testParen() {doTest(OP + "<caret>", "(", OP + "(<caret>)");}
public void testParenWithSpace() {doTest(OP + " <caret>", "(", OP + " (<caret>)");}
public void testBracket() {doTest(OP + "<caret>", "[", OP + "[<caret>]");}
public void testBracketWithSpace() {doTest(OP + " <caret>", "[", OP + " [<caret>]");}
public void testBrace() {doTest(OP + "<caret>", "{", OP + "{<caret>}");}
public void testBraceWithSpace() {doTest(OP + " <caret>", "{", OP + " {<caret>}");}
public void testClosedPaired() {doTest(OP + "<caret>>", "<", OP + "<<caret>>");}
public void testClosedPairedWithSpace() {doTest(OP + " <caret>>", "<", OP + " <<caret>>");}
public void testClosedUnPaired() {doTest(OP + "<caret>|", "|", OP + "|<caret>|");}
public void testClosedUnPairedWithSpace() {doTest(OP + " <caret>|", "|", OP + " |<caret>|");}
public void testClosedSQ() {doTest(OP + "<caret>'", "'", OP + "'<caret>'");}
public void testClosedSQWithSpace() {doTest(OP + " <caret>'", "'", OP + " '<caret>'");}
public void testClosedDQ() {doTest(OP + "<caret>\"", "\"", OP + "\"<caret>\"");}
public void testClosedDQWithSpace() {doTest(OP + " <caret>\"", "\"", OP + " \"<caret>\"");}
public void testClosedXQ() {doTest(OP + "<caret>`", "`", OP + "`<caret>`");}
public void testClosedXQWithSpace() {doTest(OP + " <caret>`", "`", OP + " `<caret>`");}
public void testPairedSwapped() {doTest(OP + "<caret>", ">", OP + "><caret>>");}
public void testRemovingPaired() {doTestBS(OP + "<<caret>>", OP + "<caret>");}
public void testRemovingPairedWithSpace() {doTestBS(OP + " <<caret>>", OP + " <caret>");}
public void testRemovingUnPaired() {doTestBS(OP + "|<caret>|", OP + "<caret>");}
public void testRemovingUnPairedWithSpace() {doTestBS(OP + " |<caret>|", OP + " <caret>");}
public void testRemovingSQ() {doTestBS(OP + "'<caret>'", OP + "<caret>");}
public void testRemovingSQWithSpace() {doTestBS(OP + " '<caret>'", OP + " <caret>");}
public void testRemovingDQ() {doTestBS(OP + "\"<caret>\"", OP + "<caret>");}
public void testRemovingDQWithSpace() {doTestBS(OP + " \"<caret>\"", OP + " <caret>");}
public void testRemovingXQ() {doTestBS(OP + "`<caret>`", OP + "<caret>");}
public void testRemovingXQWithSpace() {doTestBS(OP + " `<caret>`", OP + " <caret>");}
public void testRemovingParen() {doTestBS(OP + "(<caret>)", OP + "<caret>");}
public void testRemovingParenWithSpace() {doTestBS(OP + " (<caret>)", OP + " <caret>");}
public void testRemovingBracket() {doTestBS(OP + "[<caret>]", OP + "<caret>");}
public void testRemovingBracketWithSpace() {doTestBS(OP + " [<caret>]", OP + " <caret>");}
public void testRemovingBrace() {doTestBS(OP + "{<caret>}", OP + "<caret>");}
public void testRemovingBraceWithSpace() {doTestBS(OP + " {<caret>}", OP + " <caret>");}
public void testDoubleClosePaired() {doTest(OP + "<<caret>>", ">", OP + "<><caret>");}
public void testDoubleCloseUnPaired() {doTest(OP + "|<caret>|", "|", OP + "||<caret>");}
public void testDoubleCloseSQ() {doTest(OP + "'<caret>'", "'", OP + "''<caret>");}
public void testDoubleCloseDQ() {doTest(OP + "\"<caret>\"", "\"", OP + "\"\"<caret>");}
public void testDoubleCloseXQ() {doTest(OP + "`<caret>`", "`", OP + "``<caret>");}
public void testDoubleCloseParen() {doTest(OP + "(<caret>)", ")", OP + "()<caret>");}
public void testDoubleCloseBracket() {doTest(OP + "[<caret>]", "]", OP + "[]<caret>");}
public void testDoubleCloseBrace() {doTest(OP + "{<caret>}", "}", OP + "{}<caret>");}
}
|
[
"hurricup@gmail.com"
] |
hurricup@gmail.com
|
2041dcd99076c1bfc7a02b598f0782ee3b9605a9
|
90585347e2145647784ca3f5f79be4d7b6fcb60d
|
/hw-gae-server/src/main/java/hu/hw/cloud/server/service/RoomTypeService.java
|
46b0b50e7db4b9c5e66965544f69854553414027
|
[
"Apache-2.0"
] |
permissive
|
CloudRobi/hw-gae
|
5b5fd6fc5c250458c33b7d14c45cd098c5bd2f74
|
53d6d77edd70179f7c1a38767d13a1b5030d8b48
|
refs/heads/master
| 2020-03-14T22:11:40.693987
| 2018-05-01T16:50:28
| 2018-05-01T16:50:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 275
|
java
|
/**
*
*/
package hu.hw.cloud.server.service;
import hu.hw.cloud.server.entity.hotel.RoomType;
import hu.hw.cloud.shared.dto.hotel.RoomTypeDto;
/**
* @author CR
*
*/
public interface RoomTypeService extends HotelChildService<RoomType, RoomTypeDto> {
}
|
[
"csernikr@gmail.com"
] |
csernikr@gmail.com
|
526254dc80e67e433b121abea84ce8678c5fce55
|
47798511441d7b091a394986afd1f72e8f9ff7ab
|
/src/main/java/com/alipay/api/domain/NewsfeedMediaGiftInfo.java
|
0bcd7caf8caf951a77944b5a4db87f327480716d
|
[
"Apache-2.0"
] |
permissive
|
yihukurama/alipay-sdk-java-all
|
c53d898371032ed5f296b679fd62335511e4a310
|
0bf19c486251505b559863998b41636d53c13d41
|
refs/heads/master
| 2022-07-01T09:33:14.557065
| 2020-05-07T11:20:51
| 2020-05-07T11:20:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,320
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 红包数据结构
*
* @author auto create
* @since 1.0, 2016-10-26 17:43:38
*/
public class NewsfeedMediaGiftInfo extends AlipayObject {
private static final long serialVersionUID = 7382885895631861323L;
/**
* 地址
*/
@ApiField("action")
private String action;
/**
* 安卓的高度
*/
@ApiField("adr_height")
private String adrHeight;
/**
* 安卓缩略图
*/
@ApiField("adr_thumb")
private String adrThumb;
/**
* 安卓宽度
*/
@ApiField("adr_width")
private String adrWidth;
/**
* ios高度
*/
@ApiField("ios_height")
private String iosHeight;
/**
* ios缩略图
*/
@ApiField("ios_thumb")
private String iosThumb;
/**
* ios宽度
*/
@ApiField("ios_width")
private String iosWidth;
/**
* 大图
*/
@ApiField("theme")
private String theme;
/**
* 红包类型all、f、m
*/
@ApiField("type")
private String type;
public String getAction() {
return this.action;
}
public void setAction(String action) {
this.action = action;
}
public String getAdrHeight() {
return this.adrHeight;
}
public void setAdrHeight(String adrHeight) {
this.adrHeight = adrHeight;
}
public String getAdrThumb() {
return this.adrThumb;
}
public void setAdrThumb(String adrThumb) {
this.adrThumb = adrThumb;
}
public String getAdrWidth() {
return this.adrWidth;
}
public void setAdrWidth(String adrWidth) {
this.adrWidth = adrWidth;
}
public String getIosHeight() {
return this.iosHeight;
}
public void setIosHeight(String iosHeight) {
this.iosHeight = iosHeight;
}
public String getIosThumb() {
return this.iosThumb;
}
public void setIosThumb(String iosThumb) {
this.iosThumb = iosThumb;
}
public String getIosWidth() {
return this.iosWidth;
}
public void setIosWidth(String iosWidth) {
this.iosWidth = iosWidth;
}
public String getTheme() {
return this.theme;
}
public void setTheme(String theme) {
this.theme = theme;
}
public String getType() {
return this.type;
}
public void setType(String type) {
this.type = type;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
0d4b25b273e7521fe452b714765f2073f9a65aae
|
b99e6f1b7953531743354f7c276425c4aaafa0f5
|
/eno_net_lib/src/main/java/com/eno/base/utils/TCRSField.java
|
c94e316d7f2479b163db3e410b969ab3dc7f5c14
|
[] |
no_license
|
3105Jhm/4tr-mx
|
37fadd5d12e587e4b341785f9d01d0609fc81803
|
f256a9039f92b6ef134680f1721e3e4c6522ab9c
|
refs/heads/master
| 2022-06-24T05:33:07.018001
| 2020-05-11T06:34:25
| 2020-05-11T06:34:25
| 260,776,803
| 0
| 0
| null | 2020-05-11T06:30:09
| 2020-05-02T21:18:30
|
Java
|
UTF-8
|
Java
| false
| false
| 2,436
|
java
|
package com.eno.base.utils;
/**
* <p>Title: TCRSField��</p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2003</p>
* <p>Company: </p>
* @author cheng-dn
* @version 1.0
*/
//2010-05-24 更新说明:
//1)结果集数据块结构修改,把内容标注说明和字段描述块中的文字部分内容放入到动态缓存数据块中去;
//2)取消内容标注说明和字段描述块中的文字部分内容的长度限制,改为特殊分隔符号限制;
//3)增加动态内容的内存双字节对齐处理,以保证在Unicode环境下取值正确;
//4)所有的文字信息内容修改为动态长度;
//
//isUnistringDesc 真正的代表的意思变为 是否中文字段,如果是中文字段,将会在
//中按StringEncodeing处理
public class TCRSField {
public final static int sizeof = 12;
public String fieldName;
public String FieldDesc;
public int fieldType;
public int dataLength;
public int dataOffset;
public boolean isUnistringDesc;
public TCRSField() {
}
/** ************************************* */
/** ************字段类型******************** */
/** *********************************** */
public static final int fdtype_unknow = 0;
public static final int fdtype_bool = 1;
public static final int fdtype_int1 = 2;
public static final int fdtype_int2 = 3;
public static final int fdtype_int4 = 4;
public static final int fdtype_int8 = 5;
public static final int fdtype_real4 = 6;
public static final int fdtype_real8 = 7;
public static final int fdtype_string = 9; /* string */
public static final int fdtype_array = 14; /* bytearray */
public static final int fdtype_unistring = 101;
public static final int fdtype_enofloat = 102;
public static final int fdtype_enomoney = 103;
public TCRSField(String fdName, int fdType) {
if (fdName != null) {
fieldName = fdName;
} else
fieldName = "";
FieldDesc = "";
fieldType = fdType;
dataLength = 0;
dataOffset = 0;
}
public TCRSField(String fdName, int fdType, String fdDesc) {
this(fdName, fdType, fdDesc, false);
}
public TCRSField(String fdName, int fdType, String fdDesc,
boolean convToUnicode) {
if (fdName != null) {
fieldName = fdName;
} else
fieldName = "";
fieldType = fdType;
if (fdDesc != null)
FieldDesc = fdDesc;
else
FieldDesc = "";
dataLength = dataOffset = 0;
}
boolean IsUniFieldDesc()
{
return isUnistringDesc;
}
}
|
[
"932599583@qq.com"
] |
932599583@qq.com
|
5d634be7a1927cc79487d3ca82fa546a036b7c46
|
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
|
/Code Snippet Repository/Jetty/Jetty1910.java
|
37a52cdcf2cc7aef3fa30a9181e8012486121de2
|
[] |
no_license
|
saber13812002/DeepCRM
|
3336a244d4852a364800af3181e03e868cf6f9f5
|
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
|
refs/heads/master
| 2023-03-16T00:08:06.473699
| 2018-04-18T05:29:50
| 2018-04-18T05:29:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 430
|
java
|
public void removeBinding (Name name)
{
String key = name.toString();
if (__log.isDebugEnabled())
__log.debug("Removing binding with key="+key);
Binding binding = _bindings.remove(key);
if (binding!=null)
{
Collection<Listener> list = findListeners();
for (Listener listener : list)
listener.unbind(this,binding);
}
}
|
[
"Qing.Mi@my.cityu.edu.hk"
] |
Qing.Mi@my.cityu.edu.hk
|
fb9592e8d42aff00178aeddde7c43e38b9e28974
|
0489f9dbedcd37c5aeb506a94aa2e3a99f615ae5
|
/tooling/commons/content-package-builder/src/main/java/io/wcm/tooling/commons/contentpackagebuilder/XmlContentBuilder.java
|
11f006d56a26b5f6550df22c57463876fbbcb23b
|
[
"Apache-2.0"
] |
permissive
|
tml/wcm-io
|
08235a31e7307151172be90aa7964a0b71b32e72
|
f7c9416e63eaccf3983ea4361e878a3b3f10ff87
|
refs/heads/master
| 2020-12-30T20:43:55.544241
| 2015-07-07T13:15:18
| 2015-07-07T13:15:18
| 35,439,461
| 0
| 0
| null | 2015-05-11T17:39:10
| 2015-05-11T17:39:09
| null |
UTF-8
|
Java
| false
| false
| 7,392
|
java
|
/*
* #%L
* wcm.io
* %%
* Copyright (C) 2015 wcm.io
* %%
* 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.
* #L%
*/
package io.wcm.tooling.commons.contentpackagebuilder;
import static io.wcm.tooling.commons.contentpackagebuilder.XmlNamespaces.NS_JCR;
import java.text.DateFormat;
import java.util.List;
import java.util.Map;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.apache.commons.lang3.StringUtils;
import org.apache.jackrabbit.util.ISO9075;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
/**
* Builds CMS content packages.
*/
final class XmlContentBuilder {
private final DocumentBuilderFactory documentBuilderFactory;
private final DocumentBuilder documentBuilder;
private final Map<String, String> xmlNamespaces;
private final ValueConverter valueConverter = new ValueConverter();
static final String PN_PRIMARY_TYPE = "jcr:primaryType";
static final String NT_PAGE = "cq:Page";
static final String NT_PAGE_CONTENT = "cq:PageContent";
static final String NT_UNSTRUCTURED = "nt:unstructured";
static final String NT_FILE = "nt:file";
static final String NT_RESOURCE = "nt:resource";
public XmlContentBuilder(Map<String, String> xmlNamespaces) {
this.documentBuilderFactory = DocumentBuilderFactory.newInstance();
this.documentBuilderFactory.setNamespaceAware(true);
try {
this.documentBuilder = documentBuilderFactory.newDocumentBuilder();
}
catch (ParserConfigurationException ex) {
throw new RuntimeException("Failed to set up XML document builder: " + ex.getMessage(), ex);
}
this.xmlNamespaces = xmlNamespaces;
}
/**
* Build XML for cq:Page.
* @param content Content with page properties and nested nodes
* @return cq:Page JCR XML
*/
public Document buildPage(Map<String, Object> content) {
Document doc = documentBuilder.newDocument();
Element jcrRoot = createJcrRoot(doc, NT_PAGE);
Element jcrContent = createJcrContent(doc, jcrRoot, NT_PAGE_CONTENT);
exportPayload(doc, jcrContent, content);
return doc;
}
/**
* Build XML for any JCR content.
* @param content Content with properties and nested nodes
* @return JCR XML
*/
public Document buildContent(Map<String, Object> content) {
Document doc = documentBuilder.newDocument();
String primaryType = StringUtils.defaultString((String)content.get(PN_PRIMARY_TYPE), NT_UNSTRUCTURED);
Element jcrRoot = createJcrRoot(doc, primaryType);
exportPayload(doc, jcrRoot, content);
return doc;
}
/**
* Build XML for nt:file
* @param mimeType Mime type
* @param encoding Encoding
* @return nt:file XML
*/
public Document buildNtFile(String mimeType, String encoding) {
Document doc = documentBuilder.newDocument();
Element jcrRoot = createJcrRoot(doc, NT_FILE);
Element jcrContent = createJcrContent(doc, jcrRoot, NT_RESOURCE);
if (StringUtils.isNotEmpty(mimeType)) {
setAttributeNamespaceAware(jcrContent, "jcr:mimeType", mimeType);
}
if (StringUtils.isNotEmpty(encoding)) {
setAttributeNamespaceAware(jcrContent, "jcr:encoding", encoding);
}
return doc;
}
/**
* Build filter XML for package metadata files.
* @param filters Filters
* @return Filter XML
*/
public Document buildFilter(List<PackageFilter> filters) {
Document doc = documentBuilder.newDocument();
Element workspaceFilterElement = doc.createElement("workspaceFilter");
workspaceFilterElement.setAttribute("version", "1.0");
doc.appendChild(workspaceFilterElement);
for (PackageFilter filter : filters) {
Element filterElement = doc.createElement("filter");
filterElement.setAttribute("root", filter.getRootPath());
workspaceFilterElement.appendChild(filterElement);
for (PackageFilterRule rule : filter.getRules()) {
Element ruleElement = doc.createElement(rule.isInclude() ? "include" : "exclude");
ruleElement.setAttribute("pattern", rule.getPattern());
filterElement.appendChild(ruleElement);
}
}
return doc;
}
private Element createJcrRoot(Document doc, String primaryType) {
Element jcrRoot = doc.createElementNS(NS_JCR, "jcr:root");
for (Map.Entry<String, String> namespace : xmlNamespaces.entrySet()) {
jcrRoot.setAttribute("xmlns:" + namespace.getKey(), namespace.getValue());
}
setAttributeNamespaceAware(jcrRoot, PN_PRIMARY_TYPE, primaryType);
doc.appendChild(jcrRoot);
return jcrRoot;
}
private Element createJcrContent(Document doc, Element jcrRoot, String primaryType) {
Element jcrContent = doc.createElementNS(NS_JCR, "jcr:content");
setAttributeNamespaceAware(jcrContent, PN_PRIMARY_TYPE, primaryType);
jcrRoot.appendChild(jcrContent);
return jcrContent;
}
@SuppressWarnings("unchecked")
private void exportPayload(Document doc, Element element, Map<String, Object> content) {
for (Map.Entry<String,Object> entry : content.entrySet()) {
Object value = entry.getValue();
if (value == null) {
continue;
}
if (value instanceof Map) {
Map<String, Object> childMap = (Map<String, Object>)value;
Element subElement = doc.createElement(ISO9075.encode(entry.getKey()));
if (!hasAttributeNamespaceAware(subElement, PN_PRIMARY_TYPE) && !childMap.containsKey(PN_PRIMARY_TYPE)) {
setAttributeNamespaceAware(subElement, PN_PRIMARY_TYPE, NT_UNSTRUCTURED);
}
element.appendChild(subElement);
exportPayload(doc, subElement, childMap);
}
else if (!hasAttributeNamespaceAware(element, entry.getKey())) {
String stringValue = valueConverter.toString(value);
setAttributeNamespaceAware(element, entry.getKey(), stringValue);
}
}
}
private void setAttributeNamespaceAware(Element element, String key, String value) {
String namespace = getNamespace(key);
if (namespace == null) {
element.setAttribute(ISO9075.encode(key), value);
}
else {
element.setAttributeNS(namespace, ISO9075.encode(key), value);
}
}
private boolean hasAttributeNamespaceAware(Element element, String key) {
String namespace = getNamespace(key);
if (namespace == null) {
return element.hasAttribute(key);
}
else {
return element.hasAttributeNS(namespace, key);
}
}
private String getNamespace(String key) {
if (!StringUtils.contains(key, ":")) {
return null;
}
String nsPrefix = StringUtils.substringBefore(key, ":");
return xmlNamespaces.get(nsPrefix);
}
/**
* @return Date format used for formatting timestamps in content package.
*/
public DateFormat getJcrTimestampFormat() {
return valueConverter.getJcrTimestampFormat();
}
}
|
[
"sseifert@pro-vision.de"
] |
sseifert@pro-vision.de
|
423528d412951033daebc7ce07035a6bbc7da21b
|
a11ba1b53c0e1e978b5f4f55a38b4ff5b13d5e36
|
/engine/src/test/java/org/apache/hop/trans/steps/constant/ConstantTest.java
|
aca355980e1c044cd4c7f35a2367b4878ed724dc
|
[
"Apache-2.0"
] |
permissive
|
lipengyu/hop
|
157747f4da6d909a935b4510e01644935333fef9
|
8afe35f0705f44d78b5c33c1ba3699f657f8b9dc
|
refs/heads/master
| 2020-09-12T06:31:58.176011
| 2019-11-11T21:17:59
| 2019-11-11T21:17:59
| 222,341,727
| 1
| 0
|
Apache-2.0
| 2019-11-18T01:50:19
| 2019-11-18T01:50:18
| null |
UTF-8
|
Java
| false
| false
| 3,675
|
java
|
/*! ******************************************************************************
*
* Pentaho Data Integration
*
* Copyright (C) 2002-2018 by Hitachi Vantara : http://www.pentaho.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.
*
******************************************************************************/
package org.apache.hop.trans.steps.constant;
import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Test;
import org.mockito.Mockito;
import org.apache.hop.core.RowMetaAndData;
import org.apache.hop.core.exception.HopPluginException;
import org.apache.hop.core.logging.LoggingObjectInterface;
import org.apache.hop.core.row.RowMeta;
import org.apache.hop.core.row.value.ValueMetaPluginType;
import org.apache.hop.junit.rules.RestoreHopEngineEnvironment;
import org.apache.hop.trans.steps.mock.StepMockHelper;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
public class ConstantTest {
private StepMockHelper<ConstantMeta, ConstantData> mockHelper;
private ConstantMeta constantMeta = mock( ConstantMeta.class );
private ConstantData constantData = mock( ConstantData.class );
private RowMetaAndData rowMetaAndData = mock( RowMetaAndData.class );
private Constant constantSpy;
@ClassRule
public static RestoreHopEngineEnvironment env = new RestoreHopEngineEnvironment();
@BeforeClass
public static void setUpBeforeClass() throws HopPluginException {
ValueMetaPluginType.getInstance().searchPlugins();
}
@Before
public void setUp() throws Exception {
mockHelper = new StepMockHelper<>( "Add Constants", ConstantMeta.class, ConstantData.class );
when( mockHelper.logChannelInterfaceFactory.create( any(), any( LoggingObjectInterface.class ) ) ).thenReturn(
mockHelper.logChannelInterface );
when( mockHelper.trans.isRunning() ).thenReturn( true );
doReturn( rowMetaAndData ).when( mockHelper.stepDataInterface ).getConstants();
constantSpy = Mockito.spy( new Constant( mockHelper.stepMeta, mockHelper.stepDataInterface, 0,
mockHelper.transMeta, mockHelper.trans ) );
}
@After
public void tearDown() throws Exception {
mockHelper.cleanUp();
}
@Test
public void testProcessRow_success() throws Exception {
doReturn( new Object[1] ).when( constantSpy ).getRow();
doReturn( new RowMeta() ).when( constantSpy ).getInputRowMeta();
doReturn( new Object[1] ).when( rowMetaAndData ).getData();
boolean success = constantSpy.processRow( constantMeta, constantData );
assertTrue( success );
}
@Test
public void testProcessRow_fail() throws Exception {
doReturn( null ).when( constantSpy ).getRow();
doReturn( null ).when( constantSpy ).getInputRowMeta();
boolean success = constantSpy.processRow( constantMeta, constantData );
assertFalse( success );
}
}
|
[
"mattcasters@gmail.com"
] |
mattcasters@gmail.com
|
ea0e2a8c81a40cfb7312402a3408e2669387e9ca
|
91b79302c192ee38a15903c187cee164e1727fb6
|
/src/main/java/DAOs/JuniperAPIDAOs/FlightBookingRules.java
|
f652267b0b4630d3ceffeba54085da1852aa245d
|
[] |
no_license
|
Gnafpas/ATBHolidaysAPI
|
24d82b8a431ad0bf10255e5511e3ef2c434ae780
|
6485a034c56587d790060c0da87d4f24ee947229
|
refs/heads/master
| 2020-04-08T17:25:42.641876
| 2018-12-25T12:17:44
| 2018-12-25T12:17:44
| 159,566,357
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,717
|
java
|
package DAOs.JuniperAPIDAOs;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="FlightBookingRulesRQ" type="{http://www.juniper.es/webservice/2007/}JP_FlightBookingRulesRQ" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"flightBookingRulesRQ"
})
@XmlRootElement(name = "FlightBookingRules")
public class FlightBookingRules {
@XmlElement(name = "FlightBookingRulesRQ")
protected JPFlightBookingRulesRQ flightBookingRulesRQ;
/**
* Gets the value of the flightBookingRulesRQ property.
*
* @return
* possible object is
* {@link JPFlightBookingRulesRQ }
*
*/
public JPFlightBookingRulesRQ getFlightBookingRulesRQ() {
return flightBookingRulesRQ;
}
/**
* Sets the value of the flightBookingRulesRQ property.
*
* @param value
* allowed object is
* {@link JPFlightBookingRulesRQ }
*
*/
public void setFlightBookingRulesRQ(JPFlightBookingRulesRQ value) {
this.flightBookingRulesRQ = value;
}
}
|
[
"george@skamnos.com"
] |
george@skamnos.com
|
c99c0e048fb2d8a00c3dc1f605abce3bbc492f43
|
0f1f7332b8b06d3c9f61870eb2caed00aa529aaa
|
/ebean/tags/v2.0.2/api/src/main/java/com/avaje/ebean/SqlQuery.java
|
9f7389e003d1866a9bdfeac345b454f2f1cb9744
|
[] |
no_license
|
rbygrave/sourceforge-ebean
|
7e52e3ef439ed64eaf5ce48e0311e2625f7ee5ed
|
694274581a188be664614135baa3e4697d52d6fb
|
refs/heads/master
| 2020-06-19T10:29:37.011676
| 2019-12-17T22:09:29
| 2019-12-17T22:09:29
| 196,677,514
| 1
| 0
| null | 2019-12-17T22:07:13
| 2019-07-13T04:21:16
|
Java
|
UTF-8
|
Java
| false
| false
| 3,372
|
java
|
package com.avaje.ebean;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* Query object for performing native SQL queries that return SqlRow's.
* <p>
* Firstly note that you can use your own sql queries with <em>entity beans</em>
* by using the SqlSelect annotation. This should be your first approach when
* wanting to use your own SQL queries.
* </p>
* <p>
* If ORM Mapping is too tight and constraining for your problem then SqlQuery
* could be a good approach.
* </p>
* <p>
* The returned SqlRow objects are similar to a LinkedHashMap with some type
* conversion support added.
* </p>
*
* <pre class="code">
* // its typically a good idea to use a named query
* // and put the sql in the orm.xml instead of in your code
*
* String sql = "select id, name from customer where name like :name and status_code = :status";
*
* SqlQuery sqlQuery = Ebean.createSqlQuery(sql);
* sqlQuery.setParameter("name", "Acme%");
* sqlQuery.setParameter("status", "ACTIVE");
*
* // execute the query returning a List of MapBean objects
* List<SqlRow> list = sqlQuery.findList();
* </pre>
*
*/
public interface SqlQuery extends Serializable {
/**
* Execute the query returning a list.
*/
public List<SqlRow> findList();
/**
* Execute the query returning a set.
*/
public Set<SqlRow> findSet();
/**
* Execute the query returning a map.
*/
public Map<?, SqlRow> findMap();
/**
* Execute the query returning a single row or null.
* <p>
* If this query finds 2 or more rows then it will throw a
* PersistenceException.
* </p>
*/
public SqlRow findUnique();
/**
* The same as bind for named parameters.
*/
public SqlQuery setParameter(String name, Object value);
/**
* The same as bind for positioned parameters.
*/
public SqlQuery setParameter(int position, Object value);
/**
* Set a listener to process the query on a row by row basis.
* <p>
* It this case the rows are not loaded into the persistence context and
* instead can be processed by the query listener.
* </p>
* <p>
* Use this when you want to process a large query and do not want to hold
* the entire query result in memory.
* </p>
*/
public SqlQuery setListener(SqlQueryListener queryListener);
/**
* Set the index of the first row of the results to return.
*/
public SqlQuery setFirstRow(int firstRow);
/**
* Set the maximum number of query results to return.
*/
public SqlQuery setMaxRows(int maxRows);
/**
* Set the index after which fetching continues in a background thread.
*/
public SqlQuery setBackgroundFetchAfter(int backgroundFetchAfter);
/**
* Set the column to use to determine the keys for a Map.
*/
public SqlQuery setMapKey(String mapKey);
/**
* Set a timeout on this query.
* <p>
* This will typically result in a call to setQueryTimeout() on a preparedStatement.
* If the timeout occurs an exception will be thrown - this will be a SQLException wrapped
* up in a PersistenceException.
* </p>
*
* @param secs the query timeout limit in seconds. Zero means there is no limit.
*/
public SqlQuery setTimeout(int secs);
}
|
[
"208973+rbygrave@users.noreply.github.com"
] |
208973+rbygrave@users.noreply.github.com
|
e05d5e8fe59f918542a8e21c7a3c15571f597d17
|
5ec087de3ff7ff2e25f9d3fd3565e7801a6246c1
|
/src/main/java/net/iotgw/mail/imap/protocol/Status.java
|
3ffb1f882bb67dec0328e09fb40ed0e311feca81
|
[
"Apache-2.0"
] |
permissive
|
xjavamail/javamail
|
e5c4356fd45c4490345f711f79ebbd774fabbee7
|
712aa78c8a260983017608fffb6c0c72cbba3836
|
refs/heads/main
| 2023-08-08T01:54:11.205935
| 2021-09-13T12:10:30
| 2021-09-13T12:10:30
| 312,495,376
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,209
|
java
|
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 1997-2017 Oracle and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
* and Distribution License("CDDL") (collectively, the "License"). You
* may not use this file except in compliance with the License. You can
* obtain a copy of the License at
* https://oss.oracle.com/licenses/CDDL+GPL-1.1
* or LICENSE.txt. See the License for the specific
* language governing permissions and limitations under the License.
*
* When distributing the software, include this License Header Notice in each
* file and include the License file at LICENSE.txt.
*
* GPL Classpath Exception:
* Oracle designates this particular file as subject to the "Classpath"
* exception as provided by Oracle in the GPL Version 2 section of the License
* file that accompanied this code.
*
* Modifications:
* If applicable, add the following below the License Header, with the fields
* enclosed by brackets [] replaced by your own identifying information:
* "Portions Copyright [year] [name of copyright owner]"
*
* Contributor(s):
* If you wish your version of this file to be governed by only the CDDL or
* only the GPL Version 2, indicate your decision by adding "[Contributor]
* elects to include this software in this distribution under the [CDDL or GPL
* Version 2] license." If you don't indicate a single choice of license, a
* recipient has the option to distribute your version of this file under
* either the CDDL, the GPL Version 2 or to extend the choice of license to
* its licensees as provided above. However, if you add GPL Version 2 code
* and therefore, elected the GPL Version 2 license, then the option applies
* only if the new code is made subject to such option by the copyright
* holder.
*/
package net.iotgw.mail.imap.protocol;
import java.util.Map;
import net.iotgw.mail.iap.*;
import java.util.HashMap;
import java.util.Locale;
/**
* STATUS response.
*
* @author John Mani
* @author Bill Shannon
*/
public class Status {
public String mbox = null;
public int total = -1;
public int recent = -1;
public long uidnext = -1;
public long uidvalidity = -1;
public int unseen = -1;
public long highestmodseq = -1;
public Map<String,Long> items; // any unknown items
static final String[] standardItems =
{ "MESSAGES", "RECENT", "UNSEEN", "UIDNEXT", "UIDVALIDITY" };
public Status(Response r) throws ParsingException {
// mailbox := astring
mbox = r.readAtomString();
if (!r.supportsUtf8())
mbox = BASE64MailboxDecoder.decode(mbox);
// Workaround buggy IMAP servers that don't quote folder names
// with spaces.
final StringBuilder buffer = new StringBuilder();
boolean onlySpaces = true;
while (r.peekByte() != '(' && r.peekByte() != 0) {
final char next = (char)r.readByte();
buffer.append(next);
if (next != ' ') {
onlySpaces = false;
}
}
if (!onlySpaces) {
mbox = (mbox + buffer).trim();
}
if (r.readByte() != '(')
throw new ParsingException("parse error in STATUS");
do {
String attr = r.readAtom();
if (attr == null)
throw new ParsingException("parse error in STATUS");
if (attr.equalsIgnoreCase("MESSAGES"))
total = r.readNumber();
else if (attr.equalsIgnoreCase("RECENT"))
recent = r.readNumber();
else if (attr.equalsIgnoreCase("UIDNEXT"))
uidnext = r.readLong();
else if (attr.equalsIgnoreCase("UIDVALIDITY"))
uidvalidity = r.readLong();
else if (attr.equalsIgnoreCase("UNSEEN"))
unseen = r.readNumber();
else if (attr.equalsIgnoreCase("HIGHESTMODSEQ"))
highestmodseq = r.readLong();
else {
if (items == null)
items = new HashMap<>();
items.put(attr.toUpperCase(Locale.ENGLISH),
Long.valueOf(r.readLong()));
}
} while (!r.isNextNonSpace(')'));
}
/**
* Get the value for the STATUS item.
*
* @param item the STATUS item
* @return the value
* @since JavaMail 1.5.2
*/
public long getItem(String item) {
item = item.toUpperCase(Locale.ENGLISH);
Long v;
long ret = -1;
if (items != null && (v = items.get(item)) != null)
ret = v.longValue();
else if (item.equals("MESSAGES"))
ret = total;
else if (item.equals("RECENT"))
ret = recent;
else if (item.equals("UIDNEXT"))
ret = uidnext;
else if (item.equals("UIDVALIDITY"))
ret = uidvalidity;
else if (item.equals("UNSEEN"))
ret = unseen;
else if (item.equals("HIGHESTMODSEQ"))
ret = highestmodseq;
return ret;
}
public static void add(Status s1, Status s2) {
if (s2.total != -1)
s1.total = s2.total;
if (s2.recent != -1)
s1.recent = s2.recent;
if (s2.uidnext != -1)
s1.uidnext = s2.uidnext;
if (s2.uidvalidity != -1)
s1.uidvalidity = s2.uidvalidity;
if (s2.unseen != -1)
s1.unseen = s2.unseen;
if (s2.highestmodseq != -1)
s1.highestmodseq = s2.highestmodseq;
if (s1.items == null)
s1.items = s2.items;
else if (s2.items != null)
s1.items.putAll(s2.items);
}
}
|
[
"seven.stone.2012@gmail.com"
] |
seven.stone.2012@gmail.com
|
87d090e9c7c934581e1520d6a94f8b5fe1ecb0ba
|
9930f13fa98ea6993522eece170b835b31b40dab
|
/ymgy-transwins/src/main/java/org/ymgy/transwins/test/entity/TestDataChild.java
|
2d624e44fd9b171ed00b2a30e593704467af3d7a
|
[] |
no_license
|
zhaojunfei/transwins
|
c05ef2257323cd6990979a7d884838345071f3ed
|
953c029efa5a51b8db24ee9109ae59e0ee53dcaf
|
refs/heads/master
| 2020-06-01T15:46:57.128866
| 2017-06-14T10:41:29
| 2017-06-14T10:41:29
| 94,079,068
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,170
|
java
|
/**
* Copyright © 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
*/
package org.ymgy.transwins.test.entity;
import org.hibernate.validator.constraints.Length;
import org.ymgy.transwins.common.persistence.DataEntity;
/**
* 主子表生成Entity
* @author ThinkGem
* @version 2015-04-06
*/
public class TestDataChild extends DataEntity<TestDataChild> {
private static final long serialVersionUID = 1L;
private TestDataMain testDataMain; // 业务主表 父类
private String name; // 名称
public TestDataChild() {
super();
}
public TestDataChild(String id){
super(id);
}
public TestDataChild(TestDataMain testDataMain){
this.testDataMain = testDataMain;
}
@Length(min=0, max=64, message="业务主表长度必须介于 0 和 64 之间")
public TestDataMain getTestDataMain() {
return testDataMain;
}
public void setTestDataMain(TestDataMain testDataMain) {
this.testDataMain = testDataMain;
}
@Length(min=0, max=100, message="名称长度必须介于 0 和 100 之间")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
|
[
"773152@qq.com"
] |
773152@qq.com
|
28ef9a6dfc8609c5c6dc89b2a24459401819226d
|
f766baf255197dd4c1561ae6858a67ad23dcda68
|
/app/src/main/java/com/tencent/mm/protocal/c/cci.java
|
58e3fdb9355c2909b5016dee0413cbd3706001cc
|
[] |
no_license
|
jianghan200/wxsrc6.6.7
|
d83f3fbbb77235c7f2c8bc945fa3f09d9bac3849
|
eb6c56587cfca596f8c7095b0854cbbc78254178
|
refs/heads/master
| 2020-03-19T23:40:49.532494
| 2018-06-12T06:00:50
| 2018-06-12T06:00:50
| 137,015,278
| 4
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,507
|
java
|
package com.tencent.mm.protocal.c;
public final class cci
extends com.tencent.mm.bk.a
{
public String syg;
protected final int a(int paramInt, Object... paramVarArgs)
{
if (paramInt == 0)
{
paramVarArgs = (f.a.a.c.a)paramVarArgs[0];
if (this.syg != null) {
paramVarArgs.g(1, this.syg);
}
return 0;
}
if (paramInt == 1) {
if (this.syg == null) {
break label174;
}
}
label174:
for (paramInt = f.a.a.b.b.a.h(1, this.syg) + 0;; paramInt = 0)
{
return paramInt;
if (paramInt == 2)
{
paramVarArgs = new f.a.a.a.a((byte[])paramVarArgs[0], unknownTagHandler);
for (paramInt = com.tencent.mm.bk.a.a(paramVarArgs); paramInt > 0; paramInt = com.tencent.mm.bk.a.a(paramVarArgs)) {
if (!super.a(paramVarArgs, this, paramInt)) {
paramVarArgs.cJS();
}
}
break;
}
if (paramInt == 3)
{
f.a.a.a.a locala = (f.a.a.a.a)paramVarArgs[0];
cci localcci = (cci)paramVarArgs[1];
switch (((Integer)paramVarArgs[2]).intValue())
{
default:
return -1;
}
localcci.syg = locala.vHC.readString();
return 0;
}
return -1;
}
}
}
/* Location: /Users/Han/Desktop/wxall/微信反编译/反编译 6.6.7/dex2jar-2.0/classes5-dex2jar.jar!/com/tencent/mm/protocal/c/cci.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"526687570@qq.com"
] |
526687570@qq.com
|
7e1ddeae8b975decb9d467adb7bb0d1140e99439
|
8a86f37d2404198bacd2f75fba3112cd78e71d81
|
/project/cqxb/src/com/cqxb/throughImg/GingerScroller.java
|
8e0688d2ba7834f11dc420fd0d05896c44dcce3c
|
[] |
no_license
|
BinYangXian/AndroidStudioProjects
|
86791a16b99570aeb585524f03ccea3d3360596a
|
9438f0271625eb30de846bb3c2e8f14be2cf069c
|
refs/heads/master
| 2020-12-25T09:57:45.860434
| 2016-07-30T02:27:12
| 2016-07-30T02:27:12
| 62,277,964
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,162
|
java
|
/*******************************************************************************
* Copyright 2011, 2012 Chris Banes.
*
* 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.cqxb.throughImg;
import android.annotation.TargetApi;
import android.content.Context;
import android.widget.OverScroller;
@TargetApi(9)
public class GingerScroller extends ScrollerProxy {
protected final OverScroller mScroller;
private boolean mFirstScroll = false;
public GingerScroller(Context context) {
mScroller = new OverScroller(context);
}
@Override
public boolean computeScrollOffset() {
// Workaround for first scroll returning 0 for the direction of the edge it hits.
// Simply recompute values.
if (mFirstScroll) {
mScroller.computeScrollOffset();
mFirstScroll = false;
}
return mScroller.computeScrollOffset();
}
@Override
public void fling(int startX, int startY, int velocityX, int velocityY, int minX, int maxX, int minY, int maxY,
int overX, int overY) {
mScroller.fling(startX, startY, velocityX, velocityY, minX, maxX, minY, maxY, overX, overY);
}
@Override
public void forceFinished(boolean finished) {
mScroller.forceFinished(finished);
}
@Override
public boolean isFinished() {
return mScroller.isFinished();
}
@Override
public int getCurrX() {
return mScroller.getCurrX();
}
@Override
public int getCurrY() {
return mScroller.getCurrY();
}
}
|
[
"350852832@qq.com"
] |
350852832@qq.com
|
e2a08ef78703e0c5e65ce460b0b6b6b6161a56ac
|
6be09f2a0e021e5834af02a5235ae9ccceff06a4
|
/SIGCP/src/pe/com/pacasmayo/sgcp/bean/EstadoNotificacionBean.java
|
9586f687f6b212f7c13defb4b351da4191fd20ea
|
[] |
no_license
|
fbngeldres/sigcp
|
60e4f556c0c5555c136639a06bea85f0b1cad744
|
fc7d94c1e0d5b6abb5004d92a031355941884718
|
refs/heads/master
| 2021-01-11T22:33:13.669537
| 2017-03-07T16:19:41
| 2017-03-07T16:20:14
| 78,987,468
| 0
| 0
| null | null | null | null |
ISO-8859-3
|
Java
| false
| false
| 811
|
java
|
package pe.com.pacasmayo.sgcp.bean;
/*
* SGCP (Sistema de Gestión y Control de la Producción)
* Archivo: EstadoNotificacionBean.java
* Modificado: Jan 21, 2010 12:01:51 PM
* Autor: hector.longarte
*
* Copyright (C) DBAccess, 2010. All rights reserved.
*
* Developed by: DBAccess. http://www.dbaccess.com
*/
import java.util.Set;
public interface EstadoNotificacionBean {
public abstract Long getCodigo();
public abstract void setCodigo(Long codigo);
public abstract String getNombreEstadoNotificacion();
public abstract void setNombreEstadoNotificacion(String nombreEstadoNotificacion);
public abstract Set<NotificacionDiariaBean> getNotificaciondiarias();
public abstract void setNotificaciondiarias(Set<NotificacionDiariaBean> notificaciondiarias);
}
|
[
"fbngeldres@gmail.com"
] |
fbngeldres@gmail.com
|
5ab40d1bf8f0dca06a0b9598aa4ed53b9c830834
|
6392035b0421990479baf09a3bc4ca6bcc431e6e
|
/projects/aws-sdk-java-4baf0a4d/prev/aws-java-sdk-efs/src/main/java/com/amazonaws/services/elasticfilesystem/package-info.java
|
306fb46349491c64313bb7408d6e7d2f061f62e0
|
[] |
no_license
|
ameyaKetkar/RMinerEvaluationTools
|
4975130072bf1d4940f9aeb6583eba07d5fedd0a
|
6102a69d1b78ae44c59d71168fc7569ac1ccb768
|
refs/heads/master
| 2020-09-26T00:18:38.389310
| 2020-05-28T17:34:39
| 2020-05-28T17:34:39
| 226,119,387
| 3
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 187
|
java
|
/**
* Synchronous and asynchronous client classes for accessing AmazonElasticFileSystem.
*
* Amazon Elastic File System
*/
package com.amazonaws.services.elasticfilesystem;
|
[
"ask1604@gmail.com"
] |
ask1604@gmail.com
|
be23fe7f60a0051755dcdf3895230ac9f7785e4b
|
09b7f281818832efb89617d6f6cab89478d49930
|
/root/projects/web-client/source/java/org/alfresco/web/bean/coci/EditOnlineDialog.java
|
b303406f89aeb146614493c4c24bad1503a59bcd
|
[] |
no_license
|
verve111/alfresco3.4.d
|
54611ab8371a6e644fcafc72dc37cdc3d5d8eeea
|
20d581984c2d22d5fae92e1c1674552c1427119b
|
refs/heads/master
| 2023-02-07T14:00:19.637248
| 2020-12-25T10:19:17
| 2020-12-25T10:19:17
| 323,932,520
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,137
|
java
|
/*
* Copyright (C) 2005-2010 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.web.bean.coci;
import java.util.Map;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
import javax.transaction.UserTransaction;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.content.MimetypeMap;
import org.alfresco.service.cmr.repository.ContentReader;
import org.alfresco.web.app.Application;
import org.alfresco.web.bean.repository.Node;
import org.alfresco.web.bean.repository.Repository;
import org.alfresco.web.ui.common.Utils;
import org.alfresco.web.ui.common.component.UIActionLink;
/**
* This base dialog class provides methods for online editing. It does
* doesn't have entry in web-client-config-dialogs.xml as is not instantiated directly.
*/
public class EditOnlineDialog extends CCCheckoutFileDialog
{
public final static String ONLINE_EDITING = "onlineEditing";
/**
* Action listener for handle webdav online editing action. E.g "edit_doc_online_webdav" action
*
* @param event ActionEvent
*/
public void handleWebdavEditing(ActionEvent event)
{
handle(event);
Node workingCopyNode = property.getDocument();
if (workingCopyNode != null)
{
UIActionLink link = (UIActionLink) event.getComponent();
Map<String, String> params = link.getParameterMap();
String webdavUrl = params.get("webdavUrl");
if (webdavUrl != null)
{
// modify webDav for editing working copy
property.setWebdavUrl(webdavUrl.substring(0, webdavUrl.lastIndexOf('/') + 1) + workingCopyNode.getName());
}
FacesContext fc = FacesContext.getCurrentInstance();
fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "dialog:close:browse");
}
}
/**
* Action listener for handle cifs online editing action. E.g "edit_doc_online_cifs" action
*
* @param event ActionEvent
*/
public void handleCifsEditing(ActionEvent event)
{
handle(event);
Node workingCopyNode = property.getDocument();
if (workingCopyNode != null)
{
UIActionLink link = (UIActionLink) event.getComponent();
Map<String, String> params = link.getParameterMap();
String cifsPath = params.get("cifsPath");
if (cifsPath != null)
{
// modify cifsPath for editing working copy
property.setCifsPath(cifsPath.substring(0, cifsPath.lastIndexOf('\\') + 1) + workingCopyNode.getName());
}
FacesContext fc = FacesContext.getCurrentInstance();
fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "dialog:close:browse");
}
}
/**
* Action listener for handle http online(inline) editing action. E.g "edit_doc_online_http" action
*
* @param event ActionEvent
*/
public void handleHttpEditing(ActionEvent event)
{
handle(event);
Node workingCopyNode = property.getDocument();
if (workingCopyNode != null)
{
ContentReader reader = property.getContentService().getReader(workingCopyNode.getNodeRef(), ContentModel.PROP_CONTENT);
if (reader != null)
{
String mimetype = reader.getMimetype();
// calculate which editor screen to display
if (MimetypeMap.MIMETYPE_TEXT_PLAIN.equals(mimetype) || MimetypeMap.MIMETYPE_XML.equals(mimetype) ||
MimetypeMap.MIMETYPE_TEXT_CSS.equals(mimetype) || MimetypeMap.MIMETYPE_JAVASCRIPT.equals(mimetype))
{
// make content available to the text editing screen
property.setEditorOutput(reader.getContentString());
// navigate to appropriate screen
FacesContext fc = FacesContext.getCurrentInstance();
fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "dialog:close:browse");
this.navigator.setupDispatchContext(workingCopyNode);
fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "dialog:editTextInline");
}
else
{
// make content available to the html editing screen
property.setDocumentContent(reader.getContentString());
property.setEditorOutput(null);
// navigate to appropriate screen
FacesContext fc = FacesContext.getCurrentInstance();
fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "dialog:close:browse");
this.navigator.setupDispatchContext(workingCopyNode);
fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "dialog:editHtmlInline");
}
}
}
}
/**
* Base handling method.
*
* @param event ActionEvent
*/
public void handle(ActionEvent event)
{
super.setupContentAction(event);
Node node = property.getDocument();
if (node != null)
{
UserTransaction tx = null;
FacesContext context = FacesContext.getCurrentInstance();
try
{
tx = Repository.getUserTransaction(context, false);
tx.begin();
// if current content is already working copy then we don't checkout
if (node.hasAspect(ContentModel.ASPECT_WORKING_COPY) == false)
{
// if checkout is successful, then checkoutFile sets property workingDocument
checkoutFile(FacesContext.getCurrentInstance(), null);
Node workingCopyNode = property.getWorkingDocument();
if (workingCopyNode != null)
{
// set working copy node as document for editing
property.setDocument(workingCopyNode);
getNodeService().setProperty(workingCopyNode.getNodeRef(), ContentModel.PROP_WORKING_COPY_MODE, ONLINE_EDITING);
}
}
// commit the transaction
tx.commit();
}
catch (Throwable err)
{
try { if (tx != null) {tx.rollback();} } catch (Exception tex) {}
property.setDocument(null);
}
}
}
}
|
[
"verve111@mail.ru"
] |
verve111@mail.ru
|
ceb5a4c60e2e35ce8eed2a3c2b7ac86f4b422748
|
e9a7b7c70a5592bb78efda2ebc9e856180119e75
|
/app_androidx/base/src/main/java/met/hx/com/base/base/activity/PBaseRefreshActivity.java
|
308583425de004a8ad2f19cae2071ec63eb886b3
|
[] |
no_license
|
xiao349305433/LSY
|
f34b216e85b8c09d964136d75a28fb58e80801f8
|
56cf6a85456c81e144536f8982210970373c3897
|
refs/heads/master
| 2023-02-09T01:49:08.071297
| 2020-12-29T16:05:49
| 2020-12-29T16:05:49
| 325,332,864
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,928
|
java
|
package met.hx.com.base.base.activity;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.annotation.CallSuper;
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
import com.scwang.smartrefresh.layout.api.RefreshFooter;
import com.scwang.smartrefresh.layout.api.RefreshHeader;
import com.scwang.smartrefresh.layout.api.RefreshLayout;
import com.scwang.smartrefresh.layout.constant.RefreshState;
import com.scwang.smartrefresh.layout.listener.OnMultiPurposeListener;
import met.hx.com.base.R;
import met.hx.com.base.base.BaseAttribute;
import met.hx.com.base.base.BasePresenter;
import met.hx.com.base.basemvp.v.views.RefreshView;
/**
* Created by huxu on 2017/11/17.
*/
public abstract class PBaseRefreshActivity extends BaseYesPresenterActivity<BasePresenter> implements OnMultiPurposeListener {
protected SmartRefreshLayout mSmartRefresh;
protected LinearLayout mLinearLayout;
protected TextView mTextEmptyData;
protected RefreshView refreshView;
protected View viewContent;
@Override
protected void onInitAttribute(BaseAttribute ba) {
ba.mActivityLayoutId = R.layout.base_activity_refresh;
}
@CallSuper
@Override
protected void initView() {
setRefreshLayout();
addContentView();
setAllViews();
}
private void setRefreshLayout() {
if (getRefreshViewId() != 0) {
refreshView = (RefreshView) findViewById(getRefreshViewId());
} else {
refreshView = (RefreshView) findViewById(R.id.base_refresh);
}
}
protected void addContentView() {
refreshView.addRefreshContentView(initRefreshLayoutId());
}
private void setAllViews() {
mSmartRefresh = refreshView.getmSmartRefresh();
mLinearLayout = refreshView.getmBaseLinearContent();
mTextEmptyData = refreshView.getmBaseTextEmptyData();
viewContent = refreshView.getViewChild();
mSmartRefresh.setOnMultiPurposeListener(this);
}
protected abstract int initRefreshLayoutId();
/**
* 自定义刷新内容,需要RefreshView的id
*
* @return
*/
protected int getRefreshViewId() {
return 0;
}
/**
* 没有数据时显示
*/
protected void showEmptyData() {
refreshView.showEmptyData(null);
}
public void showEmptyData(String emptyText) {
refreshView.showEmptyData(emptyText);
}
public void showEmptyData(String emptyText, int gravity, int marginTop) {
refreshView.showEmptyData(emptyText, gravity, marginTop);
}
@Override
public void onHeaderPulling(RefreshHeader header, float percent, int offset, int headerHeight, int extendHeight) {
}
@Override
public void onHeaderReleasing(RefreshHeader header, float percent, int offset, int headerHeight, int extendHeight) {
}
@Override
public void onHeaderStartAnimator(RefreshHeader header, int headerHeight, int extendHeight) {
}
@Override
public void onHeaderFinish(RefreshHeader header, boolean success) {
}
@Override
public void onFooterPulling(RefreshFooter footer, float percent, int offset, int footerHeight, int extendHeight) {
}
@Override
public void onFooterReleasing(RefreshFooter footer, float percent, int offset, int footerHeight, int extendHeight) {
}
@Override
public void onFooterStartAnimator(RefreshFooter footer, int footerHeight, int extendHeight) {
}
@Override
public void onFooterFinish(RefreshFooter footer, boolean success) {
}
@Override
public void onLoadmore(RefreshLayout refreshlayout) {
}
@Override
public void onRefresh(RefreshLayout refreshlayout) {
}
@Override
public void onStateChanged(RefreshLayout refreshLayout, RefreshState oldState, RefreshState newState) {
}
}
|
[
"xiao349305433@qq.com"
] |
xiao349305433@qq.com
|
0c4220028728f4a6c568bc2df253e86afb9acdb4
|
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
|
/vdmeter-20210425/src/main/java/com/aliyun/vdmeter20210425/models/DescribeMeterRtcRtBandWidthUsageResponseBody.java
|
4bea37b3cfa2f2c36572ea3170db28c283cea333
|
[
"Apache-2.0"
] |
permissive
|
aliyun/alibabacloud-java-sdk
|
83a6036a33c7278bca6f1bafccb0180940d58b0b
|
008923f156adf2e4f4785a0419f60640273854ec
|
refs/heads/master
| 2023-09-01T04:10:33.640756
| 2023-09-01T02:40:45
| 2023-09-01T02:40:45
| 288,968,318
| 40
| 45
| null | 2023-06-13T02:47:13
| 2020-08-20T09:51:08
|
Java
|
UTF-8
|
Java
| false
| false
| 3,970
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.vdmeter20210425.models;
import com.aliyun.tea.*;
public class DescribeMeterRtcRtBandWidthUsageResponseBody extends TeaModel {
@NameInMap("Data")
public java.util.List<DescribeMeterRtcRtBandWidthUsageResponseBodyData> data;
// Id of the request
@NameInMap("RequestId")
public String requestId;
public static DescribeMeterRtcRtBandWidthUsageResponseBody build(java.util.Map<String, ?> map) throws Exception {
DescribeMeterRtcRtBandWidthUsageResponseBody self = new DescribeMeterRtcRtBandWidthUsageResponseBody();
return TeaModel.build(map, self);
}
public DescribeMeterRtcRtBandWidthUsageResponseBody setData(java.util.List<DescribeMeterRtcRtBandWidthUsageResponseBodyData> data) {
this.data = data;
return this;
}
public java.util.List<DescribeMeterRtcRtBandWidthUsageResponseBodyData> getData() {
return this.data;
}
public DescribeMeterRtcRtBandWidthUsageResponseBody setRequestId(String requestId) {
this.requestId = requestId;
return this;
}
public String getRequestId() {
return this.requestId;
}
public static class DescribeMeterRtcRtBandWidthUsageResponseBodyData extends TeaModel {
@NameInMap("AnchorPeakRate")
public Float anchorPeakRate;
@NameInMap("AnchorPeakTs")
public Long anchorPeakTs;
@NameInMap("AudiencePeakRate")
public Float audiencePeakRate;
@NameInMap("AudiencePeakTs")
public Long audiencePeakTs;
@NameInMap("PeakRate")
public Float peakRate;
@NameInMap("PeakTs")
public Long peakTs;
@NameInMap("Timestamp")
public Long timestamp;
public static DescribeMeterRtcRtBandWidthUsageResponseBodyData build(java.util.Map<String, ?> map) throws Exception {
DescribeMeterRtcRtBandWidthUsageResponseBodyData self = new DescribeMeterRtcRtBandWidthUsageResponseBodyData();
return TeaModel.build(map, self);
}
public DescribeMeterRtcRtBandWidthUsageResponseBodyData setAnchorPeakRate(Float anchorPeakRate) {
this.anchorPeakRate = anchorPeakRate;
return this;
}
public Float getAnchorPeakRate() {
return this.anchorPeakRate;
}
public DescribeMeterRtcRtBandWidthUsageResponseBodyData setAnchorPeakTs(Long anchorPeakTs) {
this.anchorPeakTs = anchorPeakTs;
return this;
}
public Long getAnchorPeakTs() {
return this.anchorPeakTs;
}
public DescribeMeterRtcRtBandWidthUsageResponseBodyData setAudiencePeakRate(Float audiencePeakRate) {
this.audiencePeakRate = audiencePeakRate;
return this;
}
public Float getAudiencePeakRate() {
return this.audiencePeakRate;
}
public DescribeMeterRtcRtBandWidthUsageResponseBodyData setAudiencePeakTs(Long audiencePeakTs) {
this.audiencePeakTs = audiencePeakTs;
return this;
}
public Long getAudiencePeakTs() {
return this.audiencePeakTs;
}
public DescribeMeterRtcRtBandWidthUsageResponseBodyData setPeakRate(Float peakRate) {
this.peakRate = peakRate;
return this;
}
public Float getPeakRate() {
return this.peakRate;
}
public DescribeMeterRtcRtBandWidthUsageResponseBodyData setPeakTs(Long peakTs) {
this.peakTs = peakTs;
return this;
}
public Long getPeakTs() {
return this.peakTs;
}
public DescribeMeterRtcRtBandWidthUsageResponseBodyData setTimestamp(Long timestamp) {
this.timestamp = timestamp;
return this;
}
public Long getTimestamp() {
return this.timestamp;
}
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
57b80bd7c488ae2c21253a3bcd2a58bf57f6b238
|
9e048428ca10f604c557784f4b28c68ce9b5cccb
|
/bitcamp-java-basic/src/step12/ex01/Exam03_2.java
|
420f603a676214ec63e90aa244a1d1507efb1c78
|
[] |
no_license
|
donhee/bitcamp
|
6c90ec687e00de07315f647bdb1fda0e277c3937
|
860aa16d86cbd6faeb56b1f5c70b5ea5d297aef0
|
refs/heads/master
| 2021-01-24T11:44:48.812897
| 2019-02-20T00:06:07
| 2019-02-20T00:06:07
| 123,054,172
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 724
|
java
|
// java.util.ArrayList의 indexOf()의 사용
package step12.ex01;
import java.util.ArrayList;
public class Exam03_2 {
public static void main(String[] args) {
String s1 = new String("aaa");
String s2 = new String("bbb");
String s3 = new String("ccc");
String s4 = new String("bbb"); // s2 != s4
ArrayList list = new ArrayList();
list.add(s1);
list.add(s2);
list.add(s3);
print(list);
System.out.println(list.indexOf(s4));
}
static void print(ArrayList list) {
for (int i = 0; i < list.size(); i++) {
System.out.print(list.get(i) + ", ");
}
System.out.println();
}
}
|
[
"231313do@gmail.com"
] |
231313do@gmail.com
|
5af5d5b1fb023fd80d8b5bbb1c3808de9d60b09f
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/3/3_295891c84879cf020291eedd65b54ff2768b729e/InvestigationOverviewPlugin/3_295891c84879cf020291eedd65b54ff2768b729e_InvestigationOverviewPlugin_s.java
|
26cd28379aff1083efbecba4dd2b06a6c4b1872e
|
[] |
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
| 6,856
|
java
|
/* Date: May 15, 2009
* Template: PluginScreenJavaTemplateGen.java.ftl
* generator: org.molgenis.generators.screen.PluginScreenJavaTemplateGen 3.3.0-testing
*
* THIS FILE IS A TEMPLATE. PLEASE EDIT :-)
*/
package plugins.investigationoverview;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.List;
import org.molgenis.data.Data;
import org.molgenis.framework.db.Database;
import org.molgenis.framework.db.QueryRule;
import org.molgenis.framework.db.QueryRule.Operator;
import org.molgenis.framework.ui.FormController;
import org.molgenis.framework.ui.FormModel;
import org.molgenis.framework.ui.PluginModel;
import org.molgenis.framework.ui.ScreenController;
import org.molgenis.framework.ui.ScreenMessage;
import org.molgenis.model.elements.DBSchema;
import org.molgenis.organization.Investigation;
import org.molgenis.pheno.ObservationElement;
import org.molgenis.util.Entity;
import org.molgenis.util.Tuple;
import org.molgenis.xgap.InvestigationFile;
import app.JDBCMetaDatabase;
public class InvestigationOverviewPlugin extends PluginModel<Entity>
{
private static final long serialVersionUID = -7068554327138233108L;
private InvestigationOverviewModel model = new InvestigationOverviewModel();
public InvestigationOverviewModel getMyModel()
{
return model;
}
public InvestigationOverviewPlugin(String name, ScreenController<?> parent)
{
super(name, parent);
}
@Override
public String getViewName()
{
return "plugins_investigationoverview_InvestigationOverviewPlugin";
}
@Override
public String getViewTemplate()
{
return "plugins/investigationoverview/InvestigationOverviewPlugin.ftl";
}
@Override
public void handleRequest(Database db, Tuple request)
{
System.out.println("*** handleRequest WRAPPER __action: " + request.getString("__action"));
this.handleRequest(db, request, null);
}
public void handleRequest(Database db, Tuple request, PrintWriter out)
{
if (request.getString("__action") != null)
{
String action = request.getString("__action");
System.out.println("*** handleRequest __action: " + request.getString("__action"));
try
{
if (action.equals("showAllAnnotations"))
{
this.model.setShowAllAnnotations(true);
}
else if (action.equals("showFourAnnotations"))
{
this.model.setShowAllAnnotations(false);
}
else if (action.equals("showAllExperiments"))
{
this.model.setShowAllExperiments(true);
}
else if (action.equals("showFourExperiments"))
{
this.model.setShowAllExperiments(false);
}
else if (action.equals("showAllOther"))
{
this.model.setShowAllOther(true);
}
else if (action.equals("showFourOther"))
{
this.model.setShowAllOther(false);
}
this.setMessages();
}
catch (Exception e)
{
e.printStackTrace();
this.setMessages(new ScreenMessage(e.getMessage() != null ? e.getMessage() : "null", false));
}
}
}
public void clearMessage()
{
this.setMessages();
}
@Override
public void reload(Database db)
{
try
{
if (this.model.getShowAllAnnotations() == null)
{
this.model.setShowAllAnnotations(false);
}
if (this.model.getShowAllExperiments() == null)
{
this.model.setShowAllExperiments(false);
}
if (this.model.getShowAllOther() == null)
{
this.model.setShowAllOther(false);
}
ScreenController<?> parentController = (ScreenController<?>) this.getParent().getParent();
FormModel<Investigation> parentForm = (FormModel<Investigation>) ((FormController)parentController).getModel();
Investigation inv = parentForm.getRecords().get(0);
System.out.println("Investigation inv = " + inv.toString());
this.model.setSelectedInv(inv);
QueryRule thisInv = new QueryRule("investigation", Operator.EQUALS, inv.getId());
List<ObservationElement> ofList = db.find(ObservationElement.class, thisInv);
// first make map of type + amount
HashMap<String, Integer> annotationTypeAndNr = new HashMap<String, Integer>();
for (ObservationElement of : ofList)
{
// System.out.println(of.get__Type() + " " + of.getName());
if (!of.get__Type().equals("Data"))
{
if (annotationTypeAndNr.containsKey(of.get__Type()))
{
annotationTypeAndNr.put(of.get__Type(), annotationTypeAndNr.get(of.get__Type()) + 1);
}
else
{
annotationTypeAndNr.put(of.get__Type(), 1);
}
}
}
// merge type+amount and add hyperlink instead (note: hyperlink may
// NOT actually match!
HashMap<String, String> annotationWithLinks = new HashMap<String, String>();
for (String key : annotationTypeAndNr.keySet())
{
annotationWithLinks.put(key + " (" + annotationTypeAndNr.get(key) + ")", "?select=" + key + "s");
System.out.println("annotationWithLinks.put: " + key + " (" + annotationTypeAndNr.get(key) + ") <- " + "?select=" + key + "s");
}
this.model.setAnnotationList(annotationWithLinks);
HashMap<String, String> expList = new HashMap<String, String>();
List<Data> dataList = db.find(Data.class, thisInv);
for (Data d : dataList)
{
// + " ("+d.getFeature_name()+" x "+d.getTarget_name()+")"
expList.put(d.getName(),
"?__target=Datas&__action=filter_set&__filter_attribute=Data_id&__filter_operator=EQUALS&__filter_value="
+ d.getId());
}
this.model.setExpList(expList);
HashMap<String, String> otherList = new HashMap<String, String>();
List<InvestigationFile> ifList = db.find(InvestigationFile.class, thisInv);
for (InvestigationFile invFile : ifList)
{
otherList.put(invFile.getName() + "." + invFile.getExtension(),
"?__target=Files&__action=filter_set&__filter_attribute=File_id&__filter_operator=EQUALS&__filter_value="
+ invFile.getId());
}
this.model.setOtherList(otherList);
JDBCMetaDatabase metadb = new JDBCMetaDatabase();
org.molgenis.model.elements.Entity entity = metadb.getEntity("ObservationElement");
System.out.println("getting children of ObservationElement");
for (DBSchema dbs : entity.getAllChildren())
{
System.out.println("CHILD: " + dbs.getName());
}
this.setMessages();
}
catch (Exception e)
{
e.printStackTrace();
this.setMessages(new ScreenMessage(e.getMessage() != null ? e.getMessage() : "null", false));
}
}
@Override
public boolean isVisible()
{
return true;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
7ca9fad6853fbb45e504946d030bf7d1c996829e
|
7de95dfb11c10eef5c579289f98c163f5cbe4665
|
/bibliotheques-annecy-ws/bibliotheques-annecy-ws-batch/src/main/java/com/bibliotheques/ws/batch/generated/editionservice/GetListEmpruntResponse.java
|
aef2e33f4e1dae75523ecc490d2b7973c4a677b2
|
[] |
no_license
|
AndreM-1/Projet_10_Amelioration_Systeme_information_bibliotheque
|
3c134a84fdb2f1140fb0c4356f15f770ee8927fa
|
f2ba8464678e2025d3dd36e94de45c4f7d9d644c
|
refs/heads/master
| 2020-04-08T16:53:18.763607
| 2019-01-14T14:59:40
| 2019-01-16T09:31:44
| 159,540,252
| 0
| 0
| null | 2018-12-26T08:40:34
| 2018-11-28T17:32:56
|
Java
|
UTF-8
|
Java
| false
| false
| 2,002
|
java
|
package com.bibliotheques.ws.batch.generated.editionservice;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import com.bibliotheques.ws.model.bean.edition.Emprunt;
/**
* <p>Classe Java pour anonymous complex type.
*
* <p>Le fragment de schéma suivant indique le contenu attendu figurant dans cette classe.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="emprunt" type="{http://www.example.org/beans}Emprunt" maxOccurs="unbounded"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"emprunt"
})
@XmlRootElement(name = "getListEmpruntResponse")
public class GetListEmpruntResponse {
@XmlElement(required = true)
protected List<Emprunt> emprunt;
/**
* Gets the value of the emprunt property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the emprunt property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getEmprunt().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Emprunt }
*
*
*/
public List<Emprunt> getEmprunt() {
if (emprunt == null) {
emprunt = new ArrayList<Emprunt>();
}
return this.emprunt;
}
}
|
[
"andre_monnier@yahoo.fr"
] |
andre_monnier@yahoo.fr
|
780cecf174c680156c94116699c53027a06ea9e7
|
6283d2413f49bbc4a8bba70121484b2ff3e43a43
|
/src/main/java/com/kangyonggan/site/exception/ParseException.java
|
2a5d488d624e50c1d74902661360e762830b7b44
|
[] |
no_license
|
kangyonggan/site
|
f6f3062b3e646b864d7f99998090ddbc88757db7
|
e7330682e679b4a7ee44447d4b54577894b9e262
|
refs/heads/master
| 2021-01-12T11:30:20.328481
| 2016-11-07T15:50:07
| 2016-11-07T15:50:07
| 72,941,091
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 525
|
java
|
package com.kangyonggan.site.exception;
/**
* @author kangyonggan
* @since 2016/11/2
*/
public class ParseException extends Exception {
private static String defaultMessage = "解析网页异常";
public ParseException() {
super(defaultMessage);
}
public ParseException(String message) {
super(message);
}
public ParseException(Throwable e) {
super(defaultMessage, e);
}
public ParseException(String message, Throwable e) {
super(message, e);
}
}
|
[
"kangyonggan@gmail.com"
] |
kangyonggan@gmail.com
|
b599abf659ec995984c8e43c927f9f4bb8e337cb
|
6ca726ba2467d5360fa4b3d7cf1d86e13461e697
|
/src/main/java/android/support/p000v4/app/FragmentManagerState.java
|
c0104dce523af38d2d8a7542a7f5bd73532a1d6a
|
[] |
no_license
|
DevNebula/android_packages_app_lgcamera
|
324766642d0d7debd907c5664320c5e17028fd9d
|
b5ed59a03a0950a31d4f35b3f1802c774de49cd6
|
refs/heads/master
| 2020-03-31T05:30:10.682195
| 2018-10-07T14:12:46
| 2018-10-07T14:12:46
| 151,948,692
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,451
|
java
|
package android.support.p000v4.app;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.Parcelable.Creator;
/* compiled from: FragmentManager */
/* renamed from: android.support.v4.app.FragmentManagerState */
final class FragmentManagerState implements Parcelable {
public static final Creator<FragmentManagerState> CREATOR = new C00101();
FragmentState[] mActive;
int[] mAdded;
BackStackState[] mBackStack;
/* compiled from: FragmentManager */
/* renamed from: android.support.v4.app.FragmentManagerState$1 */
static class C00101 implements Creator<FragmentManagerState> {
C00101() {
}
public FragmentManagerState createFromParcel(Parcel in) {
return new FragmentManagerState(in);
}
public FragmentManagerState[] newArray(int size) {
return new FragmentManagerState[size];
}
}
public FragmentManagerState(Parcel in) {
this.mActive = (FragmentState[]) in.createTypedArray(FragmentState.CREATOR);
this.mAdded = in.createIntArray();
this.mBackStack = (BackStackState[]) in.createTypedArray(BackStackState.CREATOR);
}
public int describeContents() {
return 0;
}
public void writeToParcel(Parcel dest, int flags) {
dest.writeTypedArray(this.mActive, flags);
dest.writeIntArray(this.mAdded);
dest.writeTypedArray(this.mBackStack, flags);
}
}
|
[
"eliminater74@gmail.com"
] |
eliminater74@gmail.com
|
1cc88e3c497a9d9356340e2a36993433d327325a
|
48715909b73b7599113fc063acb3511b7fc92fa0
|
/app/src/main/java/com/big/chit/models/SearchMessageModel.java
|
cad89a9b0f9725febc1ab8ac4f0438e396b69eec
|
[] |
no_license
|
iusama46/Bigchat2
|
6c27178806d36406569f219271789f78d7d18bbb
|
825cae506317167925b2477d4ea78d8080c10f8b
|
refs/heads/master
| 2023-05-05T08:23:36.119589
| 2021-04-10T10:23:19
| 2021-04-10T10:23:19
| 356,379,470
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,944
|
java
|
package com.big.chit.models;
public class SearchMessageModel {
private String profileImg;
private String name;
private String lastMessage;
private String messageId;
private long time;
@AttachmentTypes.AttachmentType
int attachmentType;
private User user;
private Group group;
public SearchMessageModel(String profileImg, String name, String lastMessage, String messageId, long time, int attachmentType,User user, Group group) {
this.profileImg = profileImg;
this.name = name;
this.lastMessage = lastMessage;
this.messageId = messageId;
this.time = time;
this.attachmentType = attachmentType;
this.user = user;
this.group = group;
}
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
public Group getGroup() {
return group;
}
public void setGroup(Group group) {
this.group = group;
}
public String getProfileImg() {
return profileImg;
}
public void setProfileImg(String profileImg) {
this.profileImg = profileImg;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getLastMessage() {
return lastMessage;
}
public void setLastMessage(String lastMessage) {
this.lastMessage = lastMessage;
}
public String getMessageId() {
return messageId;
}
public void setMessageId(String messageId) {
this.messageId = messageId;
}
public long getTime() {
return time;
}
public void setTime(long time) {
this.time = time;
}
public int getAttachmentType() {
return attachmentType;
}
public void setAttachmentType(int attachmentType) {
this.attachmentType = attachmentType;
}
}
|
[
"you@example.com"
] |
you@example.com
|
c69db460d9bbfbee0edf85f34e5ec34acbb2e7de
|
1e8a5381b67b594777147541253352e974b641c5
|
/u/aly/au.java
|
5382ecd771594bb0118edad0cbe9d6624aedc787
|
[] |
no_license
|
jramos92/Verify-Prueba
|
d45f48829e663122922f57720341990956390b7f
|
94765f020d52dbfe258dab9e36b9bb8f9578f907
|
refs/heads/master
| 2020-05-21T14:35:36.319179
| 2017-03-11T04:24:40
| 2017-03-11T04:24:40
| 84,623,529
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 523
|
java
|
package u.aly;
public enum au
implements cl
{
private final int c;
private au(int paramInt)
{
this.c = paramInt;
}
public static au a(int paramInt)
{
switch (paramInt)
{
default:
return null;
case 1:
return a;
}
return b;
}
public int a()
{
return this.c;
}
}
/* Location: C:\Users\julian\Downloads\Veryfit 2 0_vV2.0.28_apkpure.com-dex2jar.jar!\u\aly\au.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"ramos.marin92@gmail.com"
] |
ramos.marin92@gmail.com
|
530542e3553a4913d7c290e66e936fe56eca552c
|
59758c7a717cc5f2fe451f84ccdff1c5bdbf64e4
|
/1907-java/src/i_thread/DateTimeThread.java
|
951b733934ef72c7151818e5599c43a8cf796cd1
|
[] |
no_license
|
LeeHyeounGyeoung/-
|
c301f5eb3c0c4ea2a70042895ff65eb530479993
|
e131ae295bc8d05a2b5387762fa4f5e5b646944d
|
refs/heads/master
| 2020-11-25T09:45:02.584410
| 2020-01-09T23:52:12
| 2020-01-09T23:52:12
| 228,604,121
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 449
|
java
|
package i_thread;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.swing.JLabel;
import javax.swing.JTextField;
public class DateTimeThread extends Thread{
JLabel watch;
public DateTimeThread(JLabel watch) {
this.watch = watch;
}
public void run() {
SimpleDateFormat sdf = new SimpleDateFormat("yyy-MM-dd(E) hh:mm:ss");
while(true) {
watch.setText(sdf.format(new Date()));
}
}
}
|
[
"JHTA@JHTA-PC"
] |
JHTA@JHTA-PC
|
13c0ae0aca8e2eaa0ad64c9621ae630cf22c83c8
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/single-large-project/src/test/java/org/gradle/test/performancenull_361/Testnull_36052.java
|
0c922a18632c1ecc6b96557904b39e3fe6960ce9
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 308
|
java
|
package org.gradle.test.performancenull_361;
import static org.junit.Assert.*;
public class Testnull_36052 {
private final Productionnull_36052 production = new Productionnull_36052("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
571c55705990f3cc6c9cf7f9c625f71e683a92ae
|
4dd413d3652def76b322be4fbd54f7566c3f9009
|
/src/org/springframework/beans/support/RefreshablePagedListHolder.java
|
689da899dd377c1e5434d56b8703df915e6bc8a5
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
aristotle0x01/spring-framework-1.0
|
57ba9fb4571ae767d5e037bda317f0af636467de
|
10839c81f4bb2265d968a03cc8a6f58f1c7d7b30
|
refs/heads/master
| 2022-07-11T21:39:19.231388
| 2020-03-17T09:44:21
| 2020-03-17T09:44:21
| 209,035,884
| 3
| 5
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,090
|
java
|
/*
* Copyright 2002-2004 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.beans.support;
import java.util.Locale;
import org.springframework.beans.BeanUtils;
/**
* RefreshablePagedListHolder is a PagedListHolder subclass with reloading capabilities.
* It automatically re-requests the List from the source provider, in case of Locale or
* filter changes.
*
* <p>Data binding works just like with PagedListHolder. The locale can be specified in
* Locale's toString syntax, e.g. "locale=en_US". The filter object can be of any
* custom class, preferably a bean for easy data binding from a request. An instance
* will simply get passed through to PagedListSourceProvider.loadList. A filter property
* can be specified via "filter.myFilterProperty", for example.
*
* <p>The scenario in the controller could be:
* <code>
* RefreshablePagedListHolder holder = request.getSession("mySessionAttr");<br>
* if (holder == null) {<br>
* holder = new RefreshablePagedListHolder();<br>
* holder.setSourceProvider(new MyAnonymousOrEmbeddedSourceProvider());<br>
* holder.setFilter(new MyAnonymousOrEmbeddedFilter());<br>
* request.getSession().setAttribute("mySessionAttr", holder);<br>
* }<br>
* holder.refresh(false);
* BindException ex = BindUtils.bind(request, listHolder, "myModelAttr");<br>
* return ModelAndView("myViewName", ex.getModel());<br>
* <br>
* ...<br>
* <br>
* private class MyAnonymousOrEmbeddedSourceProvider implements PagedListSourceProvider {<br>
* public List loadList(Locale locale, Object filter) {<br>
* MyAnonymousOrEmbeddedFilter filter = (MyAnonymousOrEmbeddedFilter) filter;<br<
* // an empty name mask should lead to all objects being loaded
* return myBusinessService.loadMyObjectsByNameMask(filter.getName());<br>
* }<br>
* <br>
* private class MyAnonymousOrEmbeddedFilter {<br>
* private String name = "";<br>
* public String getName() {<br>
* return name;<br<
* }<br>
* public void setName(String name) {<br>
* this.name = name;<br>
* }<br>
* }<br>
* </code>
*
* @author Jean-Pierre Pawlak
* @author Juergen Hoeller
* @since 24.05.2003
* @see org.springframework.beans.support.PagedListSourceProvider
* @see org.springframework.beans.propertyeditors.LocaleEditor
* @version $Id: RefreshablePagedListHolder.java,v 1.2 2004/03/18 02:46:10 trisberg Exp $
*/
public class RefreshablePagedListHolder extends PagedListHolder {
private PagedListSourceProvider sourceProvider;
private Locale locale;
private Locale localeUsed;
private Object filter;
private Object filterUsed;
/**
* Create a new list holder.
* You'll need to set a source provider to be able to use the holder.
* @see #setSourceProvider
*/
public RefreshablePagedListHolder() {
super();
}
/**
* Create a new list holder with the given source provider.
*/
public RefreshablePagedListHolder(PagedListSourceProvider sourceProvider) {
super();
this.sourceProvider = sourceProvider;
}
/**
* Set the callback class for reloading the List when necessary.
* If the list is definitely not modifiable, i.e. not locale aware
* and no filtering, use PagedListHolder.
* @see org.springframework.beans.support.PagedListHolder
*/
public void setSourceProvider(PagedListSourceProvider sourceProvider) {
this.sourceProvider = sourceProvider;
}
/**
* Return the callback class for reloading the List when necessary.
*/
public PagedListSourceProvider getSourceProvider() {
return sourceProvider;
}
/**
* Set the Locale that the source provider should use for loading the list.
* This can either be populated programmatically (e.g. with the request locale),
* or via binding (using Locale's toString syntax, e.g. "locale=en_US").
* @param locale the current Locale, or null
*/
public void setLocale(Locale locale) {
this.locale = locale;
}
/**
* Return the Locale that the source provider should use for loading the list.
* @return the current Locale, or null
*/
public Locale getLocale() {
return locale;
}
/**
* Set the filter object that the source provider should use for loading the list.
* This will typically be a bean, for easy data binding.
* @param filter the filter object, or null
*/
public void setFilter(Object filter) {
this.filter = filter;
}
/**
* Return the filter that the source provider should use for loading the list.
* @return the current filter, or null
*/
public Object getFilter() {
return filter;
}
/**
* Reload the underlying list from the source provider if necessary
* (i.e. if the locale and/or the filter has changed), and resort it.
* @param force whether a reload should be performed in any case
*/
public void refresh(boolean force) {
if (this.sourceProvider != null && (force ||
(this.locale != null && !this.locale.equals(this.localeUsed)) ||
(this.filter != null && !this.filter.equals(this.filterUsed)))) {
setSource(this.sourceProvider.loadList(this.locale, this.filter));
if (this.filter != null && !this.filter.equals(this.filterUsed)) {
this.setPage(0);
}
this.localeUsed = this.locale;
if (null != this.filter) {
this.filterUsed = BeanUtils.instantiateClass(this.filter.getClass());
BeanUtils.copyProperties(this.filter, this.filterUsed);
}
}
resort();
}
}
|
[
"aristotle0x01@proton.me"
] |
aristotle0x01@proton.me
|
f0e92f3b11e94dbe192df5f81838efa515f0bd22
|
d654590ad9962cf5a039ed9da7ae892edb01bd2e
|
/test-eclipselink-springdata/generated-sources/apt/fr/an/tests/eclipselink/domain/Review_.java
|
d69b2add0b496963d07394a8efad37552288c6b7
|
[] |
no_license
|
Arnaud-Nauwynck/test-snippets
|
d3a314f61bddaeb6e6a5ed3fafd1932c72637f1d
|
a088bc1252bc677fbc70ee630da15b0a625d4a46
|
refs/heads/master
| 2023-07-19T15:04:38.067591
| 2023-07-09T14:55:50
| 2023-07-09T14:55:50
| 6,697,535
| 9
| 19
| null | 2023-03-02T00:25:17
| 2012-11-15T00:52:21
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 877
|
java
|
package fr.an.tests.eclipselink.domain;
import java.util.Date;
import javax.annotation.Generated;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value = "org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor")
@StaticMetamodel(Review.class)
public abstract class Review_ {
public static volatile SingularAttribute<Review, TripType> tripType;
public static volatile SingularAttribute<Review, Rating> rating;
public static volatile SingularAttribute<Review, Hotel> hotel;
public static volatile SingularAttribute<Review, Integer> index;
public static volatile SingularAttribute<Review, String> details;
public static volatile SingularAttribute<Review, Long> id;
public static volatile SingularAttribute<Review, String> title;
public static volatile SingularAttribute<Review, Date> checkInDate;
}
|
[
"arnaud.nauwynck@gmail.com"
] |
arnaud.nauwynck@gmail.com
|
0fe84abf4e0ad54895199e8aa450f335693c131c
|
3f3b0a118e8315b26e068a602e37566fa357e036
|
/src/main/java/com/isa/oca/preparation/section2/lecture3/Teacher.java
|
781bdff7adaa02fe28d4d9b588a61bbfcf2e58e8
|
[] |
no_license
|
isaolmez/udemy-oca-java
|
d06adc6fb04831e71486259dade473a3c7a656b1
|
56d9613cd52724017cfc2e8caf223113bfdd8199
|
refs/heads/master
| 2020-04-06T06:52:58.998797
| 2017-11-26T10:55:52
| 2017-11-26T10:55:52
| 33,448,353
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 166
|
java
|
package com.isa.oca.preparation.section2.lecture3;
public class Teacher {
public void hiClass() {
System.out.println("Hi class! How are you?");
}
}
|
[
"isaolmez@gmail.com"
] |
isaolmez@gmail.com
|
c04eeefb69900e1cdc707da5aa6c8fa330282694
|
7a2544ccc3e3e07a7a2f55e5ca51633d06a29f0c
|
/src/main/java/edu/uiowa/slis/BIBFRAME/Annotation/AnnotationAnnotatedByIterator.java
|
0e7fe88ffc2df7e3e3a40019eea91580f1a74c9e
|
[] |
no_license
|
eichmann/BIBFRAMETagLib
|
bf3ddf103e1010dab4acdb034f7d037fa0419f9d
|
816e96a0e55e5f67688ba238e623e13daba92d61
|
refs/heads/master
| 2021-12-28T00:04:14.171163
| 2020-01-20T17:44:33
| 2020-01-20T17:44:33
| 135,755,642
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,506
|
java
|
package edu.uiowa.slis.BIBFRAME.Annotation;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspTagException;
import org.apache.jena.query.QuerySolution;
import org.apache.jena.query.ResultSet;
import java.util.Hashtable;
@SuppressWarnings("serial")
public class AnnotationAnnotatedByIterator extends edu.uiowa.slis.BIBFRAME.TagLibSupport {
static AnnotationAnnotatedByIterator currentInstance = null;
private static final Log log = LogFactory.getLog(AnnotationAnnotatedByIterator.class);
static boolean firstInstance = false;
static boolean lastInstance = false;
String subjectURI = null;
String type = null;
String annotatedBy = null;
ResultSet rs = null;
String sortCriteria = null;
int limitCriteria = 0;
int offsetCriteria = 0;
Hashtable<String,String> classFilter = null;
public int doStartTag() throws JspException {
currentInstance = this;
try {
Annotation theAnnotation = (Annotation) findAncestorWithClass(this, Annotation.class);
if (theAnnotation != null) {
subjectURI = theAnnotation.getSubjectURI();
}
if (theAnnotation == null && subjectURI == null) {
throw new JspException("subject URI generation currently not supported");
}
rs = getResultSet(prefix+"SELECT ?s ?t where {"
+" <" + subjectURI + "> <http://www.w3.org/ns/oa#annotatedBy> ?s . "
+" OPTIONAL { ?s <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?t } ."
+" FILTER NOT EXISTS {"
+" ?s <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?subtype ."
+" ?subtype <http://www.w3.org/2000/01/rdf-schema#subClassOf> ?t ."
+" filter ( ?subtype != ?t )"
+" } " +
" } " +
(limitCriteria == 0 ? "" : " LIMIT " + limitCriteria + " ") +
(offsetCriteria == 0 ? "" : " OFFSET " + offsetCriteria + " ")
);
while(rs.hasNext()) {
QuerySolution sol = rs.nextSolution();
annotatedBy = sol.get("?s").toString();
type = sol.get("?t") == null ? null : getLocalName(sol.get("?t").toString());
// if (type == null)
// continue;
if (classFilter == null || (classFilter != null && type != null && classFilter.containsKey(type))) {
log.info("instance: " + annotatedBy + " type: " + type);
firstInstance = true;
lastInstance = ! rs.hasNext();
return EVAL_BODY_INCLUDE;
}
}
} catch (Exception e) {
log.error("Exception raised in AnnotationAnnotatedByIterator doStartTag", e);
clearServiceState();
freeConnection();
throw new JspTagException("Exception raised in AnnotationAnnotatedByIterator doStartTag");
}
return SKIP_BODY;
}
public int doAfterBody() throws JspException {
try {
while(rs.hasNext()) {
QuerySolution sol = rs.nextSolution();
annotatedBy = sol.get("?s").toString();
type = sol.get("?t") == null ? null : getLocalName(sol.get("?t").toString());
// if (type == null)
// continue;
if (classFilter == null || (classFilter != null && type != null && classFilter.containsKey(type))) {
log.info("instance: " + annotatedBy + " type: " + type);
firstInstance = false;
lastInstance = ! rs.hasNext();
return EVAL_BODY_AGAIN;
}
}
} catch (Exception e) {
log.error("Exception raised in AnnotationAnnotatedByIterator doAfterBody", e);
clearServiceState();
freeConnection();
throw new JspTagException("Exception raised in AnnotationAnnotatedByIterator doAfterBody");
}
return SKIP_BODY;
}
public int doEndTag() throws JspException {
currentInstance = null;
try {
// do processing
} catch (Exception e) {
log.error("Exception raised in AnnotationAnnotatedBy doEndTag", e);
throw new JspTagException("Exception raised in AnnotationAnnotatedBy doEndTag");
} finally {
clearServiceState();
freeConnection();
}
return super.doEndTag();
}
private void clearServiceState() {
subjectURI = null;
type = null;
annotatedBy = null;
classFilter = null;
}
public void setSortCriteria(String theSortCriteria) {
sortCriteria = theSortCriteria;
}
public String getSortCriteria() {
return sortCriteria;
}
public void setLimitCriteria(Integer theLimitCriteria) {
limitCriteria = theLimitCriteria;
}
public Integer getLimitCriteria() {
return limitCriteria;
}
public void setOffsetCriteria(Integer theOffsetCriteria) {
offsetCriteria = theOffsetCriteria;
}
public Integer getOffsetCriteria() {
return offsetCriteria;
}
public void setType(String theType) {
type = theType;
}
public String getType() {
return type;
}
public void setAnnotatedBy(String theAnnotatedBy) {
annotatedBy = theAnnotatedBy;
}
public String getAnnotatedBy() {
return annotatedBy;
}
public static void setFirstInstance(Boolean theFirstInstance) {
firstInstance = theFirstInstance;
}
public static Boolean getFirstInstance() {
return firstInstance;
}
public static void setLastInstance(Boolean theLastInstance) {
lastInstance = theLastInstance;
}
public static Boolean getLastInstance() {
return lastInstance;
}
public void setClassFilter(String filterString) {
String[] classFilterArray = filterString.split(" ");
this.classFilter = new Hashtable<String, String>();
for (String filterClass : classFilterArray) {
log.info("adding filterClass " + filterClass + " to AnnotationAnnotatedByIterator");
classFilter.put(filterClass, "");
}
}
public String getClassFilter() {
return classFilter.toString();
}
}
|
[
"david-eichmann@uiowa.edu"
] |
david-eichmann@uiowa.edu
|
41c586eebb7f88ed49bdb7db85b970702b439b01
|
0981333953bdbf488421f094bd584efd0c789902
|
/SillyChildClient/app/src/main/java/com/sillykid/app/entity/mine/deliveryaddress/RegionListBean.java
|
6d416ba7e81bc5f724a4c736d27311628eae2422
|
[
"Apache-2.0"
] |
permissive
|
921668753/SillyChildClient2-Android
|
ff7f0d9a97be64e610ecad304903bc853cbb3db0
|
f8f8ea3cca9013d39c9d7164bd2bd9573528093d
|
refs/heads/master
| 2020-03-23T09:18:15.433017
| 2018-12-04T13:46:33
| 2018-12-04T13:46:33
| 141,379,323
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,238
|
java
|
package com.sillykid.app.entity.mine.deliveryaddress;
import com.common.cklibrary.entity.BaseResult;
import com.contrarywind.interfaces.IPickerViewData;
import java.util.List;
public class RegionListBean extends BaseResult<List<RegionListBean.DataBean>> {
public static class DataBean implements IPickerViewData {
/**
* region_id : 1
* local_name : 北京
* region_grade : 1
* p_region_id : 0
* childnum : 16
* zipcode :
* cod : 1
*/
private int region_id;
private String local_name;
private int region_grade;
private int p_region_id;
private int childnum;
private String zipcode;
private String cod;
public int getRegion_id() {
return region_id;
}
public void setRegion_id(int region_id) {
this.region_id = region_id;
}
public String getLocal_name() {
return local_name;
}
public void setLocal_name(String local_name) {
this.local_name = local_name;
}
public int getRegion_grade() {
return region_grade;
}
public void setRegion_grade(int region_grade) {
this.region_grade = region_grade;
}
public int getP_region_id() {
return p_region_id;
}
public void setP_region_id(int p_region_id) {
this.p_region_id = p_region_id;
}
public int getChildnum() {
return childnum;
}
public void setChildnum(int childnum) {
this.childnum = childnum;
}
public String getZipcode() {
return zipcode;
}
public void setZipcode(String zipcode) {
this.zipcode = zipcode;
}
public String getCod() {
return cod;
}
public void setCod(String cod) {
this.cod = cod;
}
//这个用来显示在PickerView上面的字符串,PickerView会通过getPickerViewText方法获取字符串显示出来。
@Override
public String getPickerViewText() {
return local_name;
}
}
}
|
[
"921668753@qq.com"
] |
921668753@qq.com
|
9f1c6157b4c3abf4b18bf236236a4c07f1f98637
|
2e9cefe7ff4ad13c8ef88f1e35671e56dea0d46a
|
/app/src/main/java/com/huirong/model/approvaldetailmodel/BeawayApvlModel.java
|
f5c326f44eb487ccdc23f6035239b3073b2e736b
|
[] |
no_license
|
kinbod/HRERP
|
3420a54538bdc45c37be32a7003671fda83a72a5
|
f1927bfb4c8fa8a9101aed908641b2830cf6cdba
|
refs/heads/master
| 2021-06-25T04:26:58.340626
| 2017-08-07T01:35:17
| 2017-08-07T01:35:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,232
|
java
|
package com.huirong.model.approvaldetailmodel;
import java.io.Serializable;
import java.util.List;
/**
* 我的申请/我的审批
* 出差详情
* Created by sjy on 2016/12/26.
*/
public class BeawayApvlModel implements Serializable {
private static final long serialVersionUID = 1L;
public String ApplicationID;//
public String ApplicationTitle;//
public String EmployeeID;//
public String EmployeeName;//
public String Reason;//
public String StartTripDate;//
public String EndTripDate;
public String TripDays;
public String TripAddress;
public String Traffic;//交通工具
public String Attendance;
public String Remark;
public String ActiveFlg;
public String CreateTime;
public String ApplicationCreateTime;
public String StoreID;
public String Temp;
public String AppDepartmentID;
public String DepartmentName;
public String StoreName;
public String ApprovalStatus;
public List<ApprovalInfoLists> ApprovalInfoLists ;
public static class ApprovalInfoLists implements Serializable {
public String Comment = "";
public String ApprovalDate = "";
public String YesOrNo= "";
public String ApprovalEmployeeName= "";
public String getComment() {
return Comment;
}
public void setComment(String comment) {
Comment = comment;
}
public String getApprovalDate() {
return ApprovalDate;
}
public void setApprovalDate(String approvalDate) {
ApprovalDate = approvalDate;
}
public String getYesOrNo() {
return YesOrNo;
}
public void setYesOrNo(String yesOrNo) {
YesOrNo = yesOrNo;
}
public String getApprovalEmployeeName() {
return ApprovalEmployeeName;
}
public void setApprovalEmployeeName(String approvalEmployeeName) {
ApprovalEmployeeName = approvalEmployeeName;
}
}
public List<BeawayApvlModel.ApprovalInfoLists> getApprovalInfoLists() {
return ApprovalInfoLists;
}
public void setApprovalInfoLists(List<BeawayApvlModel.ApprovalInfoLists> approvalInfoLists) {
this.ApprovalInfoLists = approvalInfoLists;
}
public String getReason() {
return Reason;
}
public void setReason(String reason) {
Reason = reason;
}
public static long getSerialVersionUID() {
return serialVersionUID;
}
public String getApprovalStatus() {
return ApprovalStatus;
}
public void setApprovalStatus(String approvalStatus) {
ApprovalStatus = approvalStatus;
}
public String getStoreName() {
return StoreName;
}
public void setStoreName(String storeName) {
StoreName = storeName;
}
public String getDepartmentName() {
return DepartmentName;
}
public void setDepartmentName(String departmentName) {
DepartmentName = departmentName;
}
public String getEmployeeName() {
return EmployeeName;
}
public void setEmployeeName(String employeeName) {
EmployeeName = employeeName;
}
public String getApplicationCreateTime() {
return ApplicationCreateTime;
}
public void setApplicationCreateTime(String applicationCreateTime) {
ApplicationCreateTime = applicationCreateTime;
}
public String getRemark() {
return Remark;
}
public void setRemark(String remark) {
Remark = remark;
}
public String getApplicationID() {
return ApplicationID;
}
public void setApplicationID(String applicationID) {
ApplicationID = applicationID;
}
public String getApplicationTitle() {
return ApplicationTitle;
}
public void setApplicationTitle(String applicationTitle) {
ApplicationTitle = applicationTitle;
}
public String getEmployeeID() {
return EmployeeID;
}
public void setEmployeeID(String employeeID) {
EmployeeID = employeeID;
}
public String getStartTripDate() {
return StartTripDate;
}
public void setStartTripDate(String startTripDate) {
StartTripDate = startTripDate;
}
public String getEndTripDate() {
return EndTripDate;
}
public void setEndTripDate(String endTripDate) {
EndTripDate = endTripDate;
}
public String getTripDays() {
return TripDays;
}
public void setTripDays(String tripDays) {
TripDays = tripDays;
}
public String getTripAddress() {
return TripAddress;
}
public void setTripAddress(String tripAddress) {
TripAddress = tripAddress;
}
public String getTraffic() {
return Traffic;
}
public void setTraffic(String traffic) {
Traffic = traffic;
}
public String getAttendance() {
return Attendance;
}
public void setAttendance(String attendance) {
Attendance = attendance;
}
public String getActiveFlg() {
return ActiveFlg;
}
public void setActiveFlg(String activeFlg) {
ActiveFlg = activeFlg;
}
public String getCreateTime() {
return CreateTime;
}
public void setCreateTime(String createTime) {
CreateTime = createTime;
}
public String getStoreID() {
return StoreID;
}
public void setStoreID(String storeID) {
StoreID = storeID;
}
public String getTemp() {
return Temp;
}
public void setTemp(String temp) {
Temp = temp;
}
public String getAppDepartmentID() {
return AppDepartmentID;
}
public void setAppDepartmentID(String appDepartmentID) {
AppDepartmentID = appDepartmentID;
}
@Override
public String toString() {
return "BeawayModel{" +
"ApplicationID='" + ApplicationID + '\'' +
", ApplicationTitle='" + ApplicationTitle + '\'' +
", EmployeeID='" + EmployeeID + '\'' +
", EmployeeName='" + EmployeeName + '\'' +
", Reason='" + Reason + '\'' +
", StartTripDate='" + StartTripDate + '\'' +
", EndTripDate='" + EndTripDate + '\'' +
", TripDays='" + TripDays + '\'' +
", TripAddress='" + TripAddress + '\'' +
", Traffic='" + Traffic + '\'' +
", Attendance='" + Attendance + '\'' +
", Remark='" + Remark + '\'' +
", ActiveFlg='" + ActiveFlg + '\'' +
", CreateTime='" + CreateTime + '\'' +
", ApplicationCreateTime='" + ApplicationCreateTime + '\'' +
", StoreID='" + StoreID + '\'' +
", Temp='" + Temp + '\'' +
", AppDepartmentID='" + AppDepartmentID + '\'' +
", DepartmentName='" + DepartmentName + '\'' +
", StoreName='" + StoreName + '\'' +
", ApprovalStatus='" + ApprovalStatus + '\'' +
", ApprovalInfoLists=" + ApprovalInfoLists +
'}';
}
}
|
[
"sjy0118atsn@163.com"
] |
sjy0118atsn@163.com
|
925ffaef3bd0645992785b99aa02a4ced47bf390
|
bc449e6cc4297450c522be16e38480057c0a0e66
|
/module_community/src/main/java/com/competition/pdking/module_community/community/new_post/weight/InsertLinkDialog.java
|
1b182ad5d7d63d8a83c57a5408cf412aa0121812
|
[] |
no_license
|
PdKingLiu/knowledge-circle
|
4615d842d6c428af92480789a1605c79bc5003d3
|
7d4973df11706c077da30a0235f7213a3f0828d9
|
refs/heads/master
| 2021-06-28T21:40:47.558539
| 2021-01-12T10:38:52
| 2021-01-12T10:38:52
| 206,325,308
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,243
|
java
|
package com.competition.pdking.module_community.community.new_post.weight;
import android.app.Dialog;
import android.content.Context;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.EditText;
import com.competition.pdking.lib_common_resourse.toast.ToastUtils;
import com.competition.pdking.module_community.R;
/**
* @author liupeidong
* Created on 2019/10/3 18:00
*/
public class InsertLinkDialog extends Dialog implements View.OnClickListener {
private EditText etName;
private EditText etLink;
private OnClickListener listener;
private Context context;
public InsertLinkDialog(Context context, int themeResId) {
super(context, themeResId);
this.context = context;
View view = LayoutInflater.from(context).inflate(R.layout.layout_insert_link_dialog, null);
setContentView(view);
etName = view.findViewById(R.id.et_name);
etLink = view.findViewById(R.id.et_link);
view.findViewById(R.id.btn_ok).setOnClickListener(this);
view.findViewById(R.id.btn_cancel).setOnClickListener(this);
Window window = getWindow();
WindowManager.LayoutParams params = window.getAttributes();
params.gravity = Gravity.CENTER;
window.setAttributes(params);
}
@Override
public void onClick(View v) {
int i = v.getId();
if (i == R.id.btn_cancel) {
this.hide();
this.dismiss();
} else if (i == R.id.btn_ok) {
if (listener != null) {
String name = etName.getText().toString();
String link = etLink.getText().toString();
if (name.equals("") || link.equals("")) {
ToastUtils.showToast(context, "输入有误");
return;
}
listener.onClick(name, link);
}
this.hide();
this.dismiss();
}
}
public interface OnClickListener {
void onClick(String name, String link);
}
public void setListener(OnClickListener listener) {
this.listener = listener;
}
}
|
[
"931942280@qq.com"
] |
931942280@qq.com
|
a4972b85f23fc5e3102a9548f6069e973a943b77
|
6aae159dca5c39e0fbbd46114aa16d0c955ad3c0
|
/perun-beans/src/main/java/cz/metacentrum/perun/core/api/exceptions/rt/ExtSourceExistsRuntimeException.java
|
1cd09c063bdf99477dc752d32ceae8ed0d3b4dd1
|
[
"Apache-2.0",
"BSD-2-Clause"
] |
permissive
|
vlastavlasta/perun
|
01be9e55dac683913a5c1e953a434dbe74bada22
|
e69ff53f4e83ec66c674f921c899a3e50c045c87
|
refs/heads/master
| 2020-12-30T19:45:55.605367
| 2014-03-19T16:41:34
| 2014-03-19T16:41:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 669
|
java
|
package cz.metacentrum.perun.core.api.exceptions.rt;
@SuppressWarnings("serial")
public class ExtSourceExistsRuntimeException extends EntityExistsRuntimeException {
private String userId;
public ExtSourceExistsRuntimeException() {
super();
}
public ExtSourceExistsRuntimeException(String userId) {
super();
this.userId = userId;
}
public ExtSourceExistsRuntimeException(Throwable cause) {
super(cause);
}
public ExtSourceExistsRuntimeException(Throwable cause, String userId) {
super(cause);
this.userId = userId;
}
public String getUserId() {
return userId;
}
}
|
[
"256627@mail.muni.cz"
] |
256627@mail.muni.cz
|
042bcb39f77bca1667322cbafe963f584fb35c81
|
823e652469aa42e50af6d31eeb9b859ad9df7c04
|
/java/ru/myx/jdbc/lock/LockManager.java
|
eb343f71bdf8cf130844775b25f9467ed3221a08
|
[] |
no_license
|
A-E-3/ae3.sdk
|
1bba80a219cc70efbede1d3043b572901ac017ee
|
691ae5fa5f4495214030e08fc453931725971092
|
refs/heads/master
| 2023-06-07T17:58:10.074023
| 2023-06-06T06:49:21
| 2023-06-06T06:49:21
| 138,877,358
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 580
|
java
|
package ru.myx.jdbc.lock;
/**
* @author myx
*
*/
public interface LockManager {
/**
* @param interest
* @return boolean
*/
public boolean addInterest(final Interest interest);
/**
* @param guid
* @param version
* @return locker
*/
public Locker createLock(final String guid, final int version);
/**
* @param interest
* @return boolean
*/
public boolean removeInterest(final Interest interest);
/**
* @param identity
*/
public void start(final String identity);
/**
* @param identity
*/
public void stop(final String identity);
}
|
[
"myx@myx.co.nz"
] |
myx@myx.co.nz
|
c0e449e5684177c9434ba616c670d05554d156f5
|
9f740cdaa1b5c980fdbb653e3d4a17ce02e7c506
|
/src/main/java/guru/springframework/spring5webapp/repositories/PublisherRepository.java
|
9fc699be9fae24ac51ea4e8c2015dbd7dc59a65a
|
[] |
no_license
|
kananmuradli/spring5webapp
|
43e931485c1c5041de1016db10f100ae9ee00131
|
56965417b40a4e4ccafc38d833b99ee29cc5d74a
|
refs/heads/main
| 2023-07-04T15:16:38.807820
| 2021-07-29T15:20:29
| 2021-07-29T15:20:29
| 390,765,916
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 261
|
java
|
package guru.springframework.spring5webapp.repositories;
import guru.springframework.spring5webapp.domain.Publisher;
import org.springframework.data.repository.CrudRepository;
public interface PublisherRepository extends CrudRepository<Publisher, Long> {
}
|
[
"="
] |
=
|
7b5a1ed2224112d566bf9b3735abc38aaf6b48cf
|
ed0b8f6c7a0b441211f3923c4973edd18a7f239d
|
/practice-java-basic/example/bitcamp/java100/Test11_4.java
|
58fccb10ee868e9f52a713b8a67401630e09bdb7
|
[] |
no_license
|
dazzul94/PracticeMakesPerfect
|
9a32b946b2eb8c90e9e1070cfa3373fab7a21fa0
|
f8b8cc002c2b4fecc1aa240a45f41ba4014ef4ba
|
refs/heads/master
| 2021-09-04T02:13:50.265288
| 2018-01-14T13:40:55
| 2018-01-14T13:40:55
| 105,512,085
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 285
|
java
|
package bitcamp.java100;
public class Test11_4{
public static void main(String[] args) {
System.out.println(100);
System.out.println(0144);
System.out.println(0x64);
System.out.println(0b01100100);
System.out.println(0b1100100);
}
}
|
[
"dazzul@naver.com"
] |
dazzul@naver.com
|
5833fc91d05694a4846b02f47bd91994db51dd2b
|
f5b76de6cad2a38434213aa9414981855d35ca5b
|
/src/com/cxstock/pojo/Tbsettlement.java
|
1f67013b33617656f5a0fb865b3944ece7bdb979
|
[] |
no_license
|
3parts/mystock
|
112f0f7d4923635eaf22dd421eed31a8adbcbe2d
|
1748a141d156a000818155f02907eab39888b716
|
refs/heads/master
| 2021-01-22T19:54:13.594269
| 2017-03-17T00:47:57
| 2017-03-17T00:47:57
| 85,255,057
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,225
|
java
|
package com.cxstock.pojo;
/**
* Tbsettlement entity. @author MyEclipse Persistence Tools
*/
public class Tbsettlement implements java.io.Serializable {
// Fields
private Integer id;
private String vcNo;
private String vcName;
private String vcRemark;
private Integer companyId;
// Constructors
/** default constructor */
public Tbsettlement() {
}
/** full constructor */
public Tbsettlement(String vcNo, String vcName, String vcRemark,
Integer companyId) {
this.vcNo = vcNo;
this.vcName = vcName;
this.vcRemark = vcRemark;
this.companyId = companyId;
}
// Property accessors
public Integer getId() {
return this.id;
}
public void setId(Integer id) {
this.id = id;
}
public String getVcNo() {
return this.vcNo;
}
public void setVcNo(String vcNo) {
this.vcNo = vcNo;
}
public String getVcName() {
return this.vcName;
}
public void setVcName(String vcName) {
this.vcName = vcName;
}
public String getVcRemark() {
return this.vcRemark;
}
public void setVcRemark(String vcRemark) {
this.vcRemark = vcRemark;
}
public Integer getCompanyId() {
return this.companyId;
}
public void setCompanyId(Integer companyId) {
this.companyId = companyId;
}
}
|
[
"mjy@yueyuan.pro"
] |
mjy@yueyuan.pro
|
b506dda9690a396078a8a911d1d0afa8341ea9c2
|
77610502a3db6204d808878338b88ae667ef44b6
|
/src/main/java/org/red5/server/net/protocol/RTMPDecodeState.java
|
8ae6012d0a9fe8fad7ec76dc546c76f744ef8409
|
[
"Apache-2.0"
] |
permissive
|
nusofthq/red5-server-common
|
c2ef629d8ad385050229d22c1a94c106b4b7b8ea
|
9eaa5be5cfbec458ded329f32947aaeb5feca9f2
|
refs/heads/master
| 2021-01-22T11:29:28.937025
| 2016-03-10T13:22:32
| 2016-03-10T13:22:32
| 53,585,859
| 0
| 1
| null | 2016-03-10T13:19:33
| 2016-03-10T13:19:32
| null |
UTF-8
|
Java
| false
| false
| 4,054
|
java
|
/*
* RED5 Open Source Flash Server - https://github.com/Red5/
*
* Copyright 2006-2016 by respective authors (see below). All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.red5.server.net.protocol;
/**
* Represents current decode state of the protocol.
*/
public class RTMPDecodeState {
/**
* Session id to which this decoding state belongs.
*/
public String sessionId;
/**
* Decoding finished successfully state constant.
*/
public static byte DECODER_OK = 0x00;
/**
* Decoding continues state constant.
*/
public static byte DECODER_CONTINUE = 0x01;
/**
* Decoder is buffering state constant.
*/
public static byte DECODER_BUFFER = 0x02;
/**
* Classes like the RTMP state object will extend this marker interface.
*/
private int decoderBufferAmount;
/**
* Current decoder state, decoder is stopped by default.
*/
private byte decoderState = DECODER_OK;
/**
* Names for the states.
*/
private static final String[] names = new String[]{"Ok", "Continue", "Buffer"};
public RTMPDecodeState(String sessionId) {
this.sessionId = sessionId;
}
/**
* Returns current buffer amount.
*
* @return Buffer amount
*/
public int getDecoderBufferAmount() {
return decoderBufferAmount;
}
/**
* Specifies buffer decoding amount
*
* @param amount Buffer decoding amount
*/
public void bufferDecoding(int amount) {
decoderState = DECODER_BUFFER;
decoderBufferAmount = amount;
}
/**
* Set decoding state as "needed to be continued".
*/
public void continueDecoding() {
decoderState = DECODER_CONTINUE;
}
/**
* Checks whether remaining buffer size is greater or equal than buffer amount and so if it makes sense to start decoding.
*
* @param remaining Remaining buffer size
* @return true if there is data to decode, false otherwise
*/
public boolean canStartDecoding(int remaining) {
return remaining >= decoderBufferAmount;
}
/**
* Starts decoding. Sets state to "ready" and clears buffer amount.
*/
public void startDecoding() {
decoderState = DECODER_OK;
decoderBufferAmount = 0;
}
/**
* Checks whether decoding is complete.
*
* @return true if decoding has finished, false otherwise
*/
public boolean hasDecodedObject() {
return (decoderState == DECODER_OK);
}
/**
* Checks whether decoding process can be continued.
*
* @return true if decoding can be continued, false otherwise
*/
public boolean canContinueDecoding() {
return (decoderState != DECODER_BUFFER);
}
/**
* @return the sessionId
*/
public String getSessionId() {
return sessionId;
}
/**
* @param sessionId
* the sessionId to set
*/
public void setSessionId(String sessionId) {
this.sessionId = sessionId;
}
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return "RTMPDecodeState [sessionId=" + sessionId + ", decoderState=" + names[decoderState] + ", decoderBufferAmount=" + decoderBufferAmount + "]";
}
}
|
[
"mondain@gmail.com"
] |
mondain@gmail.com
|
e9d9a2028f74d83b8f16ede0c31cede4a5553676
|
bc52c32fdf90b57692d24bd9be4b3d30a5eb6209
|
/src/test/java/com/d2g/crm/web/rest/AuditResourceIT.java
|
566d7fe68bc722c47a8f6ff82e6ba4537337a521
|
[] |
no_license
|
seanlazenby/jhipster-D2GCRM
|
e43fc055625ccf8e56c85bb35b1098ca5766f101
|
817403f67f7a37fb620b7b919f5fd67c8e416932
|
refs/heads/master
| 2020-06-04T22:39:20.517718
| 2019-06-16T17:23:44
| 2019-06-16T17:23:44
| 192,218,078
| 0
| 0
| null | 2019-10-31T20:20:37
| 2019-06-16T17:23:32
|
Java
|
UTF-8
|
Java
| false
| false
| 6,572
|
java
|
package com.d2g.crm.web.rest;
import com.d2g.crm.D2GcrmApp;
import com.d2g.crm.config.TestSecurityConfiguration;
import com.d2g.crm.config.audit.AuditEventConverter;
import com.d2g.crm.domain.PersistentAuditEvent;
import com.d2g.crm.repository.PersistenceAuditEventRepository;
import com.d2g.crm.service.AuditEventService;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.MockitoAnnotations;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.web.PageableHandlerMethodArgumentResolver;
import org.springframework.format.support.FormattingConversionService;
import org.springframework.http.MediaType;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import java.time.Instant;
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
import static org.hamcrest.Matchers.hasItem;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;
/**
* Integration tests for the {@link AuditResource} REST controller.
*/
@SpringBootTest(classes = {D2GcrmApp.class, TestSecurityConfiguration.class})
public class AuditResourceIT {
private static final String SAMPLE_PRINCIPAL = "SAMPLE_PRINCIPAL";
private static final String SAMPLE_TYPE = "SAMPLE_TYPE";
private static final Instant SAMPLE_TIMESTAMP = Instant.parse("2015-08-04T10:11:30Z");
private static final long SECONDS_PER_DAY = 60 * 60 * 24;
@Autowired
private PersistenceAuditEventRepository auditEventRepository;
@Autowired
private AuditEventConverter auditEventConverter;
@Autowired
private MappingJackson2HttpMessageConverter jacksonMessageConverter;
@Autowired
@Qualifier("mvcConversionService")
private FormattingConversionService formattingConversionService;
@Autowired
private PageableHandlerMethodArgumentResolver pageableArgumentResolver;
private PersistentAuditEvent auditEvent;
private MockMvc restAuditMockMvc;
@BeforeEach
public void setup() {
MockitoAnnotations.initMocks(this);
AuditEventService auditEventService =
new AuditEventService(auditEventRepository, auditEventConverter);
AuditResource auditResource = new AuditResource(auditEventService);
this.restAuditMockMvc = MockMvcBuilders.standaloneSetup(auditResource)
.setCustomArgumentResolvers(pageableArgumentResolver)
.setConversionService(formattingConversionService)
.setMessageConverters(jacksonMessageConverter).build();
}
@BeforeEach
public void initTest() {
auditEventRepository.deleteAll();
auditEvent = new PersistentAuditEvent();
auditEvent.setAuditEventType(SAMPLE_TYPE);
auditEvent.setPrincipal(SAMPLE_PRINCIPAL);
auditEvent.setAuditEventDate(SAMPLE_TIMESTAMP);
}
@Test
public void getAllAudits() throws Exception {
// Initialize the database
auditEventRepository.save(auditEvent);
// Get all the audits
restAuditMockMvc.perform(get("/management/audits"))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
.andExpect(jsonPath("$.[*].principal").value(hasItem(SAMPLE_PRINCIPAL)));
}
@Test
public void getAudit() throws Exception {
// Initialize the database
auditEventRepository.save(auditEvent);
// Get the audit
restAuditMockMvc.perform(get("/management/audits/{id}", auditEvent.getId()))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
.andExpect(jsonPath("$.principal").value(SAMPLE_PRINCIPAL));
}
@Test
public void getAuditsByDate() throws Exception {
// Initialize the database
auditEventRepository.save(auditEvent);
// Generate dates for selecting audits by date, making sure the period will contain the audit
String fromDate = SAMPLE_TIMESTAMP.minusSeconds(SECONDS_PER_DAY).toString().substring(0, 10);
String toDate = SAMPLE_TIMESTAMP.plusSeconds(SECONDS_PER_DAY).toString().substring(0, 10);
// Get the audit
restAuditMockMvc.perform(get("/management/audits?fromDate="+fromDate+"&toDate="+toDate))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
.andExpect(jsonPath("$.[*].principal").value(hasItem(SAMPLE_PRINCIPAL)));
}
@Test
public void getNonExistingAuditsByDate() throws Exception {
// Initialize the database
auditEventRepository.save(auditEvent);
// Generate dates for selecting audits by date, making sure the period will not contain the sample audit
String fromDate = SAMPLE_TIMESTAMP.minusSeconds(2*SECONDS_PER_DAY).toString().substring(0, 10);
String toDate = SAMPLE_TIMESTAMP.minusSeconds(SECONDS_PER_DAY).toString().substring(0, 10);
// Query audits but expect no results
restAuditMockMvc.perform(get("/management/audits?fromDate=" + fromDate + "&toDate=" + toDate))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
.andExpect(header().string("X-Total-Count", "0"));
}
@Test
public void getNonExistingAudit() throws Exception {
// Get the audit
restAuditMockMvc.perform(get("/management/audits/{id}", Long.MAX_VALUE))
.andExpect(status().isNotFound());
}
@Test
public void testPersistentAuditEventEquals() throws Exception {
TestUtil.equalsVerifier(PersistentAuditEvent.class);
PersistentAuditEvent auditEvent1 = new PersistentAuditEvent();
auditEvent1.setId("id1");
PersistentAuditEvent auditEvent2 = new PersistentAuditEvent();
auditEvent2.setId(auditEvent1.getId());
assertThat(auditEvent1).isEqualTo(auditEvent2);
auditEvent2.setId("id2");
assertThat(auditEvent1).isNotEqualTo(auditEvent2);
auditEvent1.setId(null);
assertThat(auditEvent1).isNotEqualTo(auditEvent2);
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
371570a3bb9f5fd06de65ef84de6b6090c298301
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/14/14_60c8a314564abc8b60a1b70281ae761773cc23cd/SurveySkipRule/14_60c8a314564abc8b60a1b70281ae761773cc23cd_SurveySkipRule_s.java
|
257ccf7b1b9378e068e186506460f5b6e6f2507e
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 2,750
|
java
|
package org.chai.kevin.survey;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.chai.kevin.form.FormCloner;
import org.chai.kevin.form.FormElement;
import org.chai.kevin.form.FormEnteredValue;
import org.chai.kevin.form.FormSkipRule;
import org.chai.kevin.form.FormElement.ElementCalculator;
import org.chai.kevin.location.DataLocationEntity;
import org.chai.kevin.survey.SurveyElement.SurveyElementCalculator;
import org.chai.kevin.survey.validation.SurveyEnteredQuestion;
@Entity(name="SurveySkipRule")
@Table(name="dhsst_survey_skip_rule")
public class SurveySkipRule extends FormSkipRule {
private Survey survey;
private Set<SurveyQuestion> skippedSurveyQuestions = new HashSet<SurveyQuestion>();
@ManyToOne(targetEntity=Survey.class, fetch=FetchType.LAZY)
@JoinColumn(nullable=false)
public Survey getSurvey() {
return survey;
}
public void setSurvey(Survey survey) {
this.survey = survey;
}
@ManyToMany(targetEntity=SurveyQuestion.class)
@JoinTable(name="dhsst_survey_skipped_survey_questions")
public Set<SurveyQuestion> getSkippedSurveyQuestions() {
return skippedSurveyQuestions;
}
public void setSkippedSurveyQuestions(Set<SurveyQuestion> skippedSurveyQuestions) {
this.skippedSurveyQuestions = skippedSurveyQuestions;
}
@Override
public void deepCopy(FormSkipRule copy, FormCloner surveyCloner) {
super.deepCopy(copy, surveyCloner);
SurveySkipRule surveyCopy = (SurveySkipRule)copy;
surveyCopy.setSurvey(((SurveyCloner)surveyCloner).getSurvey(getSurvey()));
for (SurveyQuestion question : getSkippedSurveyQuestions()) {
surveyCopy.getSkippedSurveyQuestions().add(((SurveyCloner)surveyCloner).getQuestion(question));
}
}
@Override
public void evaluate(DataLocationEntity entity, ElementCalculator calculator) {
super.evaluate(entity, calculator);
SurveyElementCalculator surveyCalculator = (SurveyElementCalculator)calculator;
boolean skipped = surveyCalculator.getFormValidationService().isSkipped(this, entity, calculator.getValidatableLocator());
for (SurveyQuestion question : getSkippedSurveyQuestions()) {
SurveyEnteredQuestion enteredQuestion = surveyCalculator.getSurveyValueService().getOrCreateSurveyEnteredQuestion(entity, question);
if (skipped) enteredQuestion.getSkippedRules().add(this);
else enteredQuestion.getSkippedRules().remove(this);
surveyCalculator.addAffectedQuestion(enteredQuestion);
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
82f9a2e3a1e49cd13bbdb2207981ae25cb1ca4c6
|
e181171ef9729ac28986349349a5a2e1f5ff5d13
|
/src/main/java/uz/tafakkur/qrapp/server/security/SecurityUtils.java
|
3c8d2f6b0aa34d74f0a56eee59a712165143ef0d
|
[] |
no_license
|
Rasulbek/simple-qr-app
|
7c0c48412376fb3d68e623d604d0244a04036914
|
36c8aae7492d6e02e4aeb28790978d6101591447
|
refs/heads/master
| 2021-07-05T09:26:46.767575
| 2019-01-29T11:56:36
| 2019-01-29T11:56:36
| 168,145,677
| 0
| 1
| null | 2020-09-18T16:50:02
| 2019-01-29T11:46:42
|
Java
|
UTF-8
|
Java
| false
| false
| 2,984
|
java
|
package uz.tafakkur.qrapp.server.security;
import org.springframework.security.core.context.SecurityContext;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails;
import java.util.Optional;
/**
* Utility class for Spring Security.
*/
public final class SecurityUtils {
private SecurityUtils() {
}
/**
* Get the login of the current user.
*
* @return the login of the current user
*/
public static Optional<String> getCurrentUserLogin() {
SecurityContext securityContext = SecurityContextHolder.getContext();
return Optional.ofNullable(securityContext.getAuthentication())
.map(authentication -> {
if (authentication.getPrincipal() instanceof UserDetails) {
UserDetails springSecurityUser = (UserDetails) authentication.getPrincipal();
return springSecurityUser.getUsername();
} else if (authentication.getPrincipal() instanceof String) {
return (String) authentication.getPrincipal();
}
return null;
});
}
/**
* Get the JWT of the current user.
*
* @return the JWT of the current user
*/
public static Optional<String> getCurrentUserJWT() {
SecurityContext securityContext = SecurityContextHolder.getContext();
return Optional.ofNullable(securityContext.getAuthentication())
.filter(authentication -> authentication.getCredentials() instanceof String)
.map(authentication -> (String) authentication.getCredentials());
}
/**
* Check if a user is authenticated.
*
* @return true if the user is authenticated, false otherwise
*/
public static boolean isAuthenticated() {
SecurityContext securityContext = SecurityContextHolder.getContext();
return Optional.ofNullable(securityContext.getAuthentication())
.map(authentication -> authentication.getAuthorities().stream()
.noneMatch(grantedAuthority -> grantedAuthority.getAuthority().equals(AuthoritiesConstants.ANONYMOUS)))
.orElse(false);
}
/**
* If the current user has a specific authority (security role).
* <p>
* The name of this method comes from the isUserInRole() method in the Servlet API
*
* @param authority the authority to check
* @return true if the current user has the authority, false otherwise
*/
public static boolean isCurrentUserInRole(String authority) {
SecurityContext securityContext = SecurityContextHolder.getContext();
return Optional.ofNullable(securityContext.getAuthentication())
.map(authentication -> authentication.getAuthorities().stream()
.anyMatch(grantedAuthority -> grantedAuthority.getAuthority().equals(authority)))
.orElse(false);
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
d5f6086da2faaa9d6afe5c107078c3194bb5cc05
|
139b96e65688b2a8b09cab0b070a8f50a630f6ed
|
/Project/ebweb2019/src/main/java/vn/softdreams/ebweb/repository/impl/EbPackageRepositoryImpl.java
|
ca589846e03b45a291152687325fec9c29adbe86
|
[] |
no_license
|
hoangpham1997/ChanDoi
|
785945b93c11c0081888f45c93b57de7de5d45f7
|
2e62bf65b690ebbf36a7f14bdbdaedae4fe16b36
|
refs/heads/master
| 2022-09-14T08:08:58.914426
| 2020-07-06T15:10:18
| 2020-07-06T15:10:18
| 242,865,582
| 0
| 0
| null | 2022-09-01T23:29:37
| 2020-02-24T23:24:29
|
Java
|
UTF-8
|
Java
| false
| false
| 1,713
|
java
|
package vn.softdreams.ebweb.repository.impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import vn.softdreams.ebweb.domain.EbGroup;
import vn.softdreams.ebweb.domain.EbPackage;
import vn.softdreams.ebweb.repository.EbGroupRepositoryCustom;
import vn.softdreams.ebweb.repository.EbPackageRepositoryCustom;
import vn.softdreams.ebweb.service.util.Common;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;
import java.util.*;
public class EbPackageRepositoryImpl implements EbPackageRepositoryCustom {
@Autowired
@PersistenceContext(unitName = "entityManagerFactory")
private EntityManager entityManager;
@Override
public Page<EbPackage> findAllEbPackage(Pageable pageable) {
StringBuilder sql = new StringBuilder();
List<EbPackage> lstResult = new ArrayList<>();
Map<String, Object> params = new HashMap<>();
sql.append(" FROM EbPackage ");
Query countQuerry = entityManager.createNativeQuery("SELECT Count(*) " + sql.toString());
Common.setParams(countQuerry, params);
Number total = (Number) countQuerry.getSingleResult();
if (total.longValue() > 0) {
Query query = entityManager.createNativeQuery("SELECT * " + sql.toString() + " order by packageCode", EbPackage.class);
Common.setParamsWithPageable(query, params, pageable, total);
lstResult = query.getResultList();
}
return new PageImpl<>(lstResult, pageable, total.longValue());
}
}
|
[
"hoangpham28121997@gmail.com"
] |
hoangpham28121997@gmail.com
|
b9384f896ee198d90eb36e68373ebaebbe2c458c
|
2148f5bd7a5ffa6ae07849e40a28d1cf528f230e
|
/Hibernate Code First/Lab/Shampoo Company/src/main/java/entities/ingredient/BasicIngredient.java
|
240c4a24732c608faafcf8ec141948e222757a6e
|
[] |
no_license
|
vanshianec/Hibernate-And-Spring-Data
|
d2b0c8f1db686377834bacd6f1db85be04b27a15
|
2aed2b7af4f96456d919a31cfb3336cbcfcb1286
|
refs/heads/master
| 2022-07-05T19:50:31.552910
| 2019-08-01T21:23:14
| 2019-08-01T21:23:14
| 200,120,653
| 0
| 0
| null | 2022-06-21T01:35:10
| 2019-08-01T21:20:42
|
Java
|
UTF-8
|
Java
| false
| false
| 1,451
|
java
|
package entities.ingredient;
import entities.shampoo.BasicShampoo;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.List;
@Entity
@Table(name = "ingredients")
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name = "ingredient_type", discriminatorType = DiscriminatorType.STRING)
public abstract class BasicIngredient implements Ingredient{
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private int id;
@Column(name = "name")
private String name;
@Column(name = "price")
private BigDecimal price;
@ManyToMany(mappedBy = "ingredients", cascade = CascadeType.ALL)
private List<BasicShampoo> shampoos;
protected BasicIngredient(){}
protected BasicIngredient(String name, BigDecimal price){
this.name = name;
this.price = price;
}
public void setId(int id) {
this.id = id;
}
public void setName(String name) {
this.name = name;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
public void setShampoos(List<BasicShampoo> shampoos) {
this.shampoos = shampoos;
}
public int getId() {
return id;
}
public String getName() {
return name;
}
public BigDecimal getPrice() {
return price;
}
public List<BasicShampoo> getShampoos() {
return shampoos;
}
}
|
[
"ivaniovov@abv.bg"
] |
ivaniovov@abv.bg
|
1b9dcd34069145899e78ecd7a0113e07404cd4f5
|
95a54e3f3617bf55883210f0b5753b896ad48549
|
/java_src/com/google/gson/internal/bind/util/ISO8601Utils.java
|
4f01213190cbbd5633710ebd0a58b8b578b0775e
|
[] |
no_license
|
aidyk/TagoApp
|
ffc5a8832fbf9f9819f7f8aa7af29149fbab9ea5
|
e31a528c8f931df42075fc8694754be146eddc34
|
refs/heads/master
| 2022-12-22T02:20:58.486140
| 2021-05-16T07:42:02
| 2021-05-16T07:42:02
| 325,695,453
| 3
| 1
| null | 2022-12-16T00:32:10
| 2020-12-31T02:34:45
|
Smali
|
UTF-8
|
Java
| false
| false
| 4,512
|
java
|
package com.google.gson.internal.bind.util;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.Locale;
import java.util.TimeZone;
public class ISO8601Utils {
private static final TimeZone TIMEZONE_UTC = TimeZone.getTimeZone(UTC_ID);
private static final String UTC_ID = "UTC";
public static String format(Date date) {
return format(date, false, TIMEZONE_UTC);
}
public static String format(Date date, boolean z) {
return format(date, z, TIMEZONE_UTC);
}
public static String format(Date date, boolean z, TimeZone timeZone) {
GregorianCalendar gregorianCalendar = new GregorianCalendar(timeZone, Locale.US);
gregorianCalendar.setTime(date);
StringBuilder sb = new StringBuilder("yyyy-MM-ddThh:mm:ss".length() + (z ? ".sss".length() : 0) + (timeZone.getRawOffset() == 0 ? "Z" : "+hh:mm").length());
padInt(sb, gregorianCalendar.get(1), "yyyy".length());
char c = '-';
sb.append('-');
padInt(sb, gregorianCalendar.get(2) + 1, "MM".length());
sb.append('-');
padInt(sb, gregorianCalendar.get(5), "dd".length());
sb.append('T');
padInt(sb, gregorianCalendar.get(11), "hh".length());
sb.append(':');
padInt(sb, gregorianCalendar.get(12), "mm".length());
sb.append(':');
padInt(sb, gregorianCalendar.get(13), "ss".length());
if (z) {
sb.append('.');
padInt(sb, gregorianCalendar.get(14), "sss".length());
}
int offset = timeZone.getOffset(gregorianCalendar.getTimeInMillis());
if (offset != 0) {
int i = offset / 60000;
int abs = Math.abs(i / 60);
int abs2 = Math.abs(i % 60);
if (offset >= 0) {
c = '+';
}
sb.append(c);
padInt(sb, abs, "hh".length());
sb.append(':');
padInt(sb, abs2, "mm".length());
} else {
sb.append('Z');
}
return sb.toString();
}
/* JADX WARNING: Removed duplicated region for block: B:47:0x00c4 A[Catch:{ IllegalArgumentException | IndexOutOfBoundsException | NumberFormatException -> 0x01b1 }] */
/* JADX WARNING: Removed duplicated region for block: B:75:0x01a9 A[Catch:{ IllegalArgumentException | IndexOutOfBoundsException | NumberFormatException -> 0x01b1 }] */
/* Code decompiled incorrectly, please refer to instructions dump. */
public static java.util.Date parse(java.lang.String r17, java.text.ParsePosition r18) throws java.text.ParseException {
/*
// Method dump skipped, instructions count: 552
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.gson.internal.bind.util.ISO8601Utils.parse(java.lang.String, java.text.ParsePosition):java.util.Date");
}
private static boolean checkOffset(String str, int i, char c) {
return i < str.length() && str.charAt(i) == c;
}
private static int parseInt(String str, int i, int i2) throws NumberFormatException {
int i3;
int i4;
if (i < 0 || i2 > str.length() || i > i2) {
throw new NumberFormatException(str);
}
if (i < i2) {
i4 = i + 1;
int digit = Character.digit(str.charAt(i), 10);
if (digit >= 0) {
i3 = -digit;
} else {
throw new NumberFormatException("Invalid number: " + str.substring(i, i2));
}
} else {
i4 = i;
i3 = 0;
}
while (i4 < i2) {
int i5 = i4 + 1;
int digit2 = Character.digit(str.charAt(i4), 10);
if (digit2 >= 0) {
i3 = (i3 * 10) - digit2;
i4 = i5;
} else {
throw new NumberFormatException("Invalid number: " + str.substring(i, i2));
}
}
return -i3;
}
private static void padInt(StringBuilder sb, int i, int i2) {
String num = Integer.toString(i);
for (int length = i2 - num.length(); length > 0; length--) {
sb.append('0');
}
sb.append(num);
}
private static int indexOfNonDigit(String str, int i) {
while (i < str.length()) {
char charAt = str.charAt(i);
if (charAt < '0' || charAt > '9') {
return i;
}
i++;
}
return str.length();
}
}
|
[
"ai@AIs-MacBook-Pro.local"
] |
ai@AIs-MacBook-Pro.local
|
ddf6d2de8d8b365572700ee56854026b129c3696
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_f8eee177e831d695ad8e054369565f9b68289cfc/HKerberosSaslThriftClientFactoryImpl/2_f8eee177e831d695ad8e054369565f9b68289cfc_HKerberosSaslThriftClientFactoryImpl_s.java
|
eb2abf15d1c15867cf4c56432da9fd16cdab441e
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 2,745
|
java
|
/**
* Client Factory that provides Secure sockets using Kerberos as authentication
* SASL mechanism.
*
* It expects few system properties to be set up:
* <ul>
* <li><code>kerberos.service.principal.name</code> Kerberos Service principal name without the domain. Default: "cassandra".
*
* <li><code>ssl.truststore</code> File path for trust store
* <li><code>ssl.truststore.password</code> Password for trust store
* <li><code>ssl.protocol</code> SSL protocol, default SSL
* <li><code>ssl.store.type</code> Store type, default JKS
* <li><code>ssl.cipher.suites</code> Cipher suites
* </ul>
* <p>
*
*
* @see HSaslThriftClient
*
*/
package me.prettyprint.cassandra.connection.factory;
import org.apache.thrift.transport.TSSLTransportFactory.TSSLTransportParameters;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import me.prettyprint.cassandra.connection.client.HClient;
import me.prettyprint.cassandra.connection.client.HKerberosThriftClient;
import me.prettyprint.cassandra.connection.client.HSaslThriftClient;
import me.prettyprint.cassandra.connection.security.SSLHelper;
import me.prettyprint.cassandra.service.CassandraHost;
public class HKerberosSaslThriftClientFactoryImpl implements HClientFactory {
private static final Logger log = LoggerFactory.getLogger(HKerberosSecuredThriftClientFactoryImpl.class);
public static final String JAAS_CONFIG = "jaas.conf";
public static final String KRB5_CONFIG = "krb5.conf";
private String krbServicePrincipalName;
private TSSLTransportParameters params;
public HKerberosSaslThriftClientFactoryImpl() {
params = SSLHelper.getTSSLTransportParameters();
if (params != null) {
log.debug("SSL properties:");
log.debug(" ssl.truststore = {}", System.getProperty("ssl.truststore"));
log.debug(" ssl.protocol = {}", System.getProperty("ssl.protocol"));
log.debug(" ssl.store.type = {}", System.getProperty("ssl.store.type"));
log.debug(" ssl.cipher.suites = {}", System.getProperty("ssl.cipher.suites"));
}
krbServicePrincipalName = System.getProperty("kerberos.service.principal.name");
if (krbServicePrincipalName != null) {
log.debug("Kerberos service principal name = {}", krbServicePrincipalName);
}
}
/**
* {@inheritDoc}
*/
public HClient createClient(CassandraHost ch) {
if (log.isDebugEnabled()) {
log.debug("Creation of new client");
}
if (params == null)
return new HSaslThriftClient(ch, krbServicePrincipalName);
else
return new HSaslThriftClient(ch, krbServicePrincipalName, params);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.