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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dc251d9e5f750581e0e458ac307fcd368a830935
|
f86938ea6307bf6d1d89a07b5b5f9e360673d9b8
|
/CodeComment_Data/Code_Jam/val/Speaking_in_Tongues/S/Main(242).java
|
373627f9845a2a24bf971a2c86332bd18ab1dd22
|
[] |
no_license
|
yxh-y/code_comment_generation
|
8367b355195a8828a27aac92b3c738564587d36f
|
2c7bec36dd0c397eb51ee5bd77c94fa9689575fa
|
refs/heads/master
| 2021-09-28T18:52:40.660282
| 2018-11-19T14:54:56
| 2018-11-19T14:54:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,131
|
java
|
package methodEmbedding.Speaking_in_Tongues.S.LYD481;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.*;
public class Main {
/**
* @param args
* @throws FileNotFoundException
*/
public static void main(String[] args) throws FileNotFoundException {
// TODO Auto-generated method stub
//array of chars
char[] dict = {'y', 'h', 'e', 's', 'o', 'c', 'v', 'x', 'd', 'u', 'i', 'g', 'l', 'b', 'k', 'r', 'z', 't', 'n', 'w', 'j', 'p', 'f', 'm', 'a', 'q'};
Scanner scan = new Scanner(new File("in"));
scan.nextLine();//removes int at start
int counter = 0;
while (scan.hasNextLine()){
counter++;
System.out.print("Case #"+counter+": ");
String str = scan.nextLine();
//translates
for (int i = 0; i<str.length(); i++){
//gets google char
char goog = str.charAt(i);
//gets index a--> 0
int index = (int) goog - 97;
char eng ;
eng = goog;
//replace if char is not space
if (index>=0){
//get new char
eng = dict[index];
}
System.out.print(eng);
}
System.out.println();
}
}
}
|
[
"liangyuding@sjtu.edu.cn"
] |
liangyuding@sjtu.edu.cn
|
93e5ca1c738863ba7fe4f4c56aed5cd4aff79a2c
|
49217bc82ae13c8f2669c9f77f4eff967427494a
|
/src/main/java/com/bullhorn/apiservice/result/ApiAssociateResult.java
|
2c07e104e2265eb335d779a7d4c4b6ebc6eec3ff
|
[
"MIT"
] |
permissive
|
sreehari2797/starter-kit-spring-maven
|
5a18517cc1872f68ebc003f4356aa64f09bed317
|
4a5502a23bfa09eebaa14120f107efc9318a362b
|
refs/heads/master
| 2023-02-06T05:46:29.679937
| 2020-12-29T05:10:08
| 2020-12-29T05:10:08
| 295,730,688
| 0
| 1
|
MIT
| 2020-09-15T13:05:46
| 2020-09-15T13:05:45
| null |
UTF-8
|
Java
| false
| false
| 780
|
java
|
package com.bullhorn.apiservice.result;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for apiAssociateResult complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="apiAssociateResult">
* <complexContent>
* <extension base="{http://result.apiservice.bullhorn.com/}apiResult">
* <sequence>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "apiAssociateResult")
public class ApiAssociateResult
extends ApiResult
{
}
|
[
"john.sullivan@bullhorn.com"
] |
john.sullivan@bullhorn.com
|
c5da7ac8903630271dbce772430d02bc9aadc7d0
|
7ae255c4d259121c79dea104c797b386d27beb7d
|
/src/main/java/com/alex/netty/secondsample/client/MyClientInitializer.java
|
52805185fa8b42c31d8bdbb1b9c0516648815f7e
|
[] |
no_license
|
alexhaoxuan/netty
|
4582aa6af3200dbc7a133d3d6f834c532bfc0d23
|
5d72f021fd93a06f54077a1685df45e31a264421
|
refs/heads/master
| 2022-02-23T11:33:42.437863
| 2019-09-17T16:52:45
| 2019-09-17T16:52:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,151
|
java
|
package com.alex.netty.secondsample.client;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.socket.SocketChannel;
import io.netty.handler.codec.LengthFieldBasedFrameDecoder;
import io.netty.handler.codec.LengthFieldPrepender;
import io.netty.handler.codec.string.StringDecoder;
import io.netty.handler.codec.string.StringEncoder;
import io.netty.util.CharsetUtil;
/**
* @ClassName:MyClientInitializer
* @description: MyClientInitializer
* @author: Alex
* @Version:1.3
* @create: 2019/09/17 14:57
*/
public class MyClientInitializer extends ChannelInitializer<SocketChannel> {
@Override
protected void initChannel(SocketChannel ch) throws Exception {
ChannelPipeline channelPipeline = ch.pipeline();
channelPipeline.addLast(new LengthFieldBasedFrameDecoder(Integer.MAX_VALUE, 0,4,0,4));
channelPipeline.addLast(new LengthFieldPrepender(4));
channelPipeline.addLast(new StringDecoder(CharsetUtil.UTF_8));
channelPipeline.addLast(new StringEncoder(CharsetUtil.UTF_8));
channelPipeline.addLast(new MyClientHandler());
}
}
|
[
"alex@redescooter.com"
] |
alex@redescooter.com
|
8cf082466d556c1fa549c27b9c140707a936bfd2
|
f0452407cf0563d2aed76f836ed7cc341086e5d0
|
/src/jio/System/Windows/Forms/QueryAccessibilityHelpEventHandler.java
|
0c3b07a81b7136badd086f26e653fe4324284324
|
[] |
no_license
|
Javonet-io-user/3dd3b552-3bdc-46f4-9c7e-83675d0c4985
|
476cae232813efc315c70cf775e4bbd1a89f4baa
|
2ef6326f6cba988c4dc85a20b6c01c4ec08a6b4c
|
refs/heads/master
| 2020-07-06T09:16:10.958905
| 2019-08-18T06:27:36
| 2019-08-18T06:27:36
| 202,968,115
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,015
|
java
|
package jio.System.Windows.Forms;
import Common.Activation;
import static Common.JavonetHelper.Convert;
import static Common.JavonetHelper.getGetObjectName;
import static Common.JavonetHelper.getReturnObjectName;
import static Common.JavonetHelper.ConvertToConcreteInterfaceImplementation;
import Common.JavonetHelper;
import Common.MethodTypeAnnotation;
import com.javonet.Javonet;
import com.javonet.JavonetException;
import com.javonet.JavonetFramework;
import com.javonet.api.NObject;
import com.javonet.api.NEnum;
import com.javonet.api.keywords.NRef;
import com.javonet.api.keywords.NOut;
import com.javonet.api.NControlContainer;
import java.util.concurrent.atomic.AtomicReference;
import java.util.Iterator;
import java.lang.*;
import jio.System.Windows.Forms.*;
import jio.System.*;
public interface QueryAccessibilityHelpEventHandler {
/** Method */
@MethodTypeAnnotation(type = "DelegateMethod")
public void Invoke(Object sender, QueryAccessibilityHelpEventArgs e);
}
|
[
"support@javonet.com"
] |
support@javonet.com
|
d71902b447d44cb8ebee95f2dc7e460c3648756a
|
33630bb72572f2e5cfaf5529faf178dedaa2aa0b
|
/hotline/src/main/java/jp/chang/myclinic/hotline/wrappedtext/Line.java
|
eaa0e2eddf1b76fcfab5dda26780b41ccc1d3806
|
[
"MIT"
] |
permissive
|
hangilc/myclinic-spring
|
917472333853e3a2848cfb60ca5ade05098b700f
|
69ac47ca1ae4383a423a8e097df3caea52ffcb41
|
refs/heads/master
| 2022-12-21T23:43:35.317076
| 2022-06-27T23:09:31
| 2022-06-27T23:09:31
| 135,880,487
| 0
| 0
|
MIT
| 2022-12-14T20:36:52
| 2018-06-03T06:43:15
|
Java
|
UTF-8
|
Java
| false
| false
| 6,805
|
java
|
package jp.chang.myclinic.hotline.wrappedtext;
import javax.swing.*;
import java.awt.*;
import java.util.ArrayList;
import java.util.List;
public class Line {
private int left;
private int contentWidth;
private int width;
private int top;
private int height;
private int baseLineOffset;
private List<Item> items = new ArrayList<>();
public Line(int left, int top, int width){
this.left = left;
this.top = top;
this.width = width;
}
public boolean isEmpty(){
return items.size() == 0;
}
public int getRemaining(){
return width - contentWidth;
}
public void addString(String text, int width, VAlign valign, int fontHeight, int ascent){
switch(valign){
case Top:case Center:case Bottom: {
if( height < fontHeight ){
height = fontHeight;
}
break;
}
case BaseLine: {
if( height < fontHeight ){
height = fontHeight;
}
if( baseLineOffset < ascent ){
baseLineOffset = ascent;
}
break;
}
}
items.add(new StringItem(text, width, valign, fontHeight, ascent));
contentWidth += width;
}
public void addLink(String text, int width, VAlign valign, int fontHeight, int ascent, Runnable action){
switch(valign){
case Top:case Center:case Bottom: {
if( height < fontHeight ){
height = fontHeight;
}
break;
}
case BaseLine: {
if( height < fontHeight ){
height = fontHeight;
}
if( baseLineOffset < ascent ){
baseLineOffset = ascent;
}
break;
}
}
items.add(new LinkItem(text, width, valign, fontHeight, ascent, action));
contentWidth += width;
}
public void addComponent(JComponent component, VAlign valign){
Dimension dim = component.getPreferredSize();
int w = (int)dim.getWidth();
int h = (int)dim.getHeight();
int y = top;
switch(valign){
case Top: {
if( height < h ){
height = h;
}
y = top;
break;
}
case Center: {
if( height < h ){
baseLineOffset += (h - height) / 2;
height = h;
}
y = top + (height - h)/2;
break;
}
case Bottom: {
if( height < h ){
baseLineOffset += h - height;
height = h;
}
y = top + height - h;
break;
}
case BaseLine: throw new RuntimeException("invalid valign (BaseLine) for addComponent");
}
component.setBounds(left + contentWidth, y, (int)dim.getWidth(), (int)dim.getHeight());
items.add(new ComponentItem(w));
contentWidth += w;
}
public void render(Graphics g){
int x = left;
for(Item item: items){
item.renderItem(g, x);
x += item.getItemWidth();
}
}
public int getTop(){
return top;
}
public int getHeight(){
return height;
}
public boolean containsPoint(int x, int y){
return y >= top && y < top + height && x >= left && x < left + contentWidth;
}
public void handleClick(int x, int y){
int probeX = left;
for(Item item: items){
if( probeX <= x && x < probeX + item.getItemWidth() ) {
if (item instanceof LinkItem) {
LinkItem linkItem = (LinkItem) item;
linkItem.run();
}
return;
} else {
probeX += item.getItemWidth();
}
if( probeX > x ){
return;
}
}
}
public boolean isInLink(int x, int y){
int probeX = left;
for(Item item: items){
if( probeX <= x && x < probeX + item.getItemWidth() ){
return item instanceof LinkItem;
} else {
probeX += item.getItemWidth();
}
if( probeX > x ){
break;
}
}
return false;
}
public enum VAlign {
Top, Center, BaseLine, Bottom
}
private interface Item {
void renderItem(Graphics g, int x);
int getItemWidth();
}
private class StringItem implements Item {
private String text;
private int itemWidth;
private VAlign valign;
private int fontHeight;
private int ascent;
StringItem(String text, int itemWidth, VAlign valign, int fontHeight, int ascent){
this.text = text;
this.itemWidth = itemWidth;
this.valign = valign;
this.fontHeight = fontHeight;
this.ascent = ascent;
}
@Override
public void renderItem(Graphics g, int x){
int y = top;
switch(valign){
case Top: y = top + ascent; break;
case Center: y = (int)(top + height/2.0 - fontHeight/2.0 + ascent); break;
case BaseLine: y = top + baseLineOffset; break;
case Bottom: y = top + height - fontHeight + ascent; break;
}
g.drawString(text, x, y);
}
@Override
public int getItemWidth(){
return itemWidth;
}
}
private class LinkItem extends StringItem {
private Runnable callback;
LinkItem(String text, int itemWidth, VAlign valign, int fontHeight, int ascent, Runnable callback){
super(text, itemWidth, valign, fontHeight, ascent);
this.callback = callback;
}
@Override
public void renderItem(Graphics g, int x){
Color save = g.getColor();
g.setColor(Color.BLUE);
super.renderItem(g, x);
g.setColor(save);
}
public void run(){
callback.run();
}
}
private class ComponentItem implements Item {
private int itemWidth;
ComponentItem(int itemWidth){
this.itemWidth = itemWidth;
}
@Override
public void renderItem(Graphics g, int x){
// nop
}
@Override
public int getItemWidth(){
return itemWidth;
}
}
}
|
[
"hangil@chang.jp"
] |
hangil@chang.jp
|
5443aa5f8f5f0997a26ba449681d4703e93c1d7d
|
53d677a55e4ece8883526738f1c9d00fa6560ff7
|
/com/tencent/mm/plugin/appbrand/jsapi/s/b$1$1.java
|
8c8baa227e7358cbf38f74ee7d9e198456dc6fcb
|
[] |
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
| 2,486
|
java
|
package com.tencent.mm.plugin.appbrand.jsapi.s;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.BitmapFactory.Options;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.appbrand.widget.c.a;
final class b$1$1
implements Runnable
{
b$1$1(b.1 param1, byte[] paramArrayOfByte)
{
}
public final void run()
{
AppMethodBeat.i(126628);
if ((this.ibu == null) || (this.ibu.length == 0))
AppMethodBeat.o(126628);
while (true)
{
return;
Object localObject = this.ibu;
int i;
if ((localObject == null) || (localObject.length <= 0))
i = 0;
while (true)
{
label42: if (i == 0)
break label206;
this.ibv.ibt.setImageByteArray(this.ibu);
AppMethodBeat.o(126628);
break;
BitmapFactory.Options localOptions = new BitmapFactory.Options();
localOptions.inJustDecodeBounds = true;
BitmapFactory.decodeByteArray((byte[])localObject, 0, localObject.length, localOptions);
localObject = localOptions.outMimeType;
com.tencent.luggage.g.d.v("Util", "imageType:%s", new Object[] { localObject });
i = -1;
switch (((String)localObject).hashCode())
{
default:
case -879267568:
case -879299344:
}
while (true)
switch (i)
{
default:
i = 0;
break label42;
if (((String)localObject).equals("image/gif"))
{
i = 0;
continue;
if (((String)localObject).equals("image/GIF"))
i = 1;
}
break;
case 0:
case 1:
}
i = 1;
}
try
{
label206: localObject = com.tencent.mm.sdk.platformtools.d.bQ(this.ibu);
this.ibv.ibt.setImageBitmap((Bitmap)localObject);
AppMethodBeat.o(126628);
}
catch (Exception localException)
{
com.tencent.luggage.g.d.c("Luggage.ViewAttributeHelper", "", new Object[] { localException });
AppMethodBeat.o(126628);
}
}
}
}
/* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes2-dex2jar.jar
* Qualified Name: com.tencent.mm.plugin.appbrand.jsapi.s.b.1.1
* JD-Core Version: 0.6.2
*/
|
[
"172601673@qq.com"
] |
172601673@qq.com
|
f181f3caa1440055d6de12ae259948a74e98cbb4
|
0774b7be48a72398f44d831e9f92243c1d3230db
|
/icare-mapp/src/main/java/com/wisdom/core/client/ClientHandler.java
|
e2254f09b5a5f246d2767667762529a888556d76
|
[] |
no_license
|
water-fu/icare
|
cc3eb8b53be7ee378eb7953abb614248151d194d
|
3a2245f6f4c01d9d169d78d77fe096982a29dfc8
|
refs/heads/master
| 2021-01-19T11:32:12.586464
| 2016-05-09T08:25:21
| 2016-05-09T08:25:21
| 82,251,258
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,446
|
java
|
package com.wisdom.core.client;
import com.wisdom.core.MappContext;
import com.wisdom.core.MyApplicationContext;
import com.wisdom.core.exception.MappException;
import com.wisdom.core.exception.MappExceptionCode;
import com.wisdom.core.interfaces.IClientHandler;
import com.wisdom.core.interfaces.IHandler;
import com.wisdom.core.model.IMappDatapackage;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.lang.reflect.ParameterizedType;
import java.util.Map;
/**
*
*/
@Service
public class ClientHandler<T extends IMappDatapackage> implements IClientHandler<T> {
private static final Logger logger = LoggerFactory.getLogger(ClientHandler.class);
@Autowired
protected MyApplicationContext factory;
protected void initContext(T requestObject) throws Exception {
MappContext.initContext(null, requestObject, null);
}
/** 获取泛型 Class **/
private Class<?> getPackageClass() throws Exception
{
ParameterizedType type = (ParameterizedType)getClass().getGenericInterfaces()[0];
logger.debug(type.getActualTypeArguments()[0].toString());
Class.forName(type.getActualTypeArguments()[0].toString()).newInstance();
return (Class<?>) ((ParameterizedType) getClass().getGenericInterfaces()[0]).getActualTypeArguments()[0];
}
/**
* 初始化mapp上下文
*
* @param request
* ,requestObject
* @return
* @throws IllegalAccessException
* @throws InstantiationException
*/
@SuppressWarnings("unchecked")
protected void initContext(T requestObject, Map<String, Object> attributes) throws Exception {
try {
/** 每次新生成一个上下文 **/
MappContext.initContext(requestObject,attributes);
// T request = (T) MappContext.getRequest();
// logger.debug(request.toString());
// if (attributes != null && attributes.isEmpty() == false)
// MappContext.(attributes);
/** 请求报文和返回报文报体结构一致,生成返回报文,并且设置包头与request一致 mler 2013-05-10 **/
// T responseObject = (T) getPackageClass().newInstance();
T responseObject = (T) requestObject.getClass().newInstance();
responseObject.setHeader(requestObject.getHeader());
MappContext.setResponse(responseObject);
} catch (Exception e) {
e.printStackTrace();
throw new MappException(MappExceptionCode.UNEXPECT_ERROR, e);
}
}
/**
* 传入请求对象,并调用方法获得结果
*
* @param request
* @return
* @throws SystemException
* @throws MappException
*/
@Override
@SuppressWarnings("unchecked")
public T doHandlePackage(T requestObject, Map<String, Object> attributes)
throws Exception {
initContext(requestObject, attributes);
doHandle();
return (T) MappContext.getResponse();
}
@Override
/**
* 根据上下文中的request对象,调用接口,获取response对象并保存在上下文中
*
* @param context
* @return
* @throws MappException
*/
public void doHandle() throws Exception
{
IHandler actionHandler = findAction();
actionHandler.doHandle();
}
/** 获取与bizcode对应的Action处理类 **/
private IHandler findAction() {
IHandler action = (IHandler) factory.getBean(MappContext.getRequest().getHeader().getBizCode());
return action;
}
public void setFactory(MyApplicationContext factory) {
this.factory = factory;
}
}
|
[
"fusj@ce2a1918-1c78-4d5b-8570-6b617fc693f1"
] |
fusj@ce2a1918-1c78-4d5b-8570-6b617fc693f1
|
e509527ca723c5a360564085de49128913aff569
|
477915f0aea730e946c3f847ca460b7248cdda64
|
/en-web/src/main/java/com/g2forge/enigma/web/css/layout/Display.java
|
8aa8783273df16216cca08cf9dbbbe7197362715
|
[
"Apache-2.0"
] |
permissive
|
gdgib/enigma
|
dd418242a34e2089c0fedb8f12c19743cc48076b
|
1c817f4f4563c0f622a175ec74f9cea1e72a819b
|
refs/heads/master
| 2022-02-04T00:27:41.501377
| 2020-03-29T19:39:40
| 2020-03-29T19:39:40
| 120,249,959
| 0
| 0
| null | 2018-02-05T03:26:59
| 2018-02-05T03:26:59
| null |
UTF-8
|
Java
| false
| false
| 143
|
java
|
package com.g2forge.enigma.web.css.layout;
import com.g2forge.enigma.web.css.ICSSStyle;
public enum Display implements ICSSStyle {
Block;
}
|
[
"gdgib@outlook.com"
] |
gdgib@outlook.com
|
c2ed21225535a6157be4a93e3c6a83e3ad66b4e5
|
08a95d58927c426e515d7f6d23631abe734105b4
|
/Project/bean/com/dimata/qdep/entity/I_DataCustom.java
|
5b11ae49730c0aa059f240f43af19422b2e13b2b
|
[] |
no_license
|
Bagusnanda90/javaproject
|
878ce3d82f14d28b69b7ef20af675997c73b6fb6
|
1c8f105d4b76c2deba2e6b8269f9035c67c20d23
|
refs/heads/master
| 2020-03-23T15:15:38.449142
| 2018-07-21T00:31:47
| 2018-07-21T00:31:47
| 141,734,002
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 537
|
java
|
/* Generated by Together */
package com.dimata.qdep.entity;
public interface I_DataCustom {
/**
* declaration of identifier to hold name of class that implement this
* Interface
*/
//public static final String DATACUSTOM_CLASSNAME = "com.dimata.custom.entity.custom.DataCustom";
public static final String DATACUSTOM_CLASSNAME = "com.dimata.common.custom.entity.DataCustom";
public long getOwnerId();
public String getDataName();
public String getLink();
public String getDataValue();
}
|
[
"agungbagusnanda90@gmai.com"
] |
agungbagusnanda90@gmai.com
|
258c09834212911337721aa6bb810b33603ed502
|
5fa40394963baf973cfd5a3770c1850be51efaae
|
/src/NHSensor/NHSensorSim/test/ESAUseGBATest.java
|
697fa82ca317932966e502058a6392efe432235c
|
[] |
no_license
|
yejuns/wsn_java
|
5c4d97cb6bc41b91ed16eafca5d14128ed45ed44
|
f071cc72411ecc2866bff3dfc356f38b0c817411
|
refs/heads/master
| 2020-05-14T13:54:14.690176
| 2018-01-28T02:51:44
| 2018-01-28T02:51:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 992
|
java
|
package NHSensor.NHSensorSim.test;
import org.apache.log4j.PropertyConfigurator;
import NHSensor.NHSensorSim.algorithm.ESAUseGBAAlg;
import NHSensor.NHSensorSim.core.SensorSim;
import NHSensor.NHSensorSim.ui.Animator;
public class ESAUseGBATest {
/**
* @param args
*/
public static void main(String[] args) {
PropertyConfigurator.configure("config/log4j.properties");
SensorSim sensorSim = SensorSim.createSensorSim(2, 450, 450, 600, 0.36);
sensorSim.getSimulator().addHandleAndTraceEventListener();
sensorSim.addAlgorithm(ESAUseGBAAlg.NAME);
ESAUseGBAAlg esa = (ESAUseGBAAlg) sensorSim
.getAlgorithm(ESAUseGBAAlg.NAME);
esa.getParam().setANSWER_SIZE(30);
double subQueryRegionWidth = Math.sqrt(3) / 2
* esa.getParam().getRADIO_RANGE();
esa.initSubQueryRegionAndGridsByRegionWidth(subQueryRegionWidth);
sensorSim.run();
sensorSim.printStatistic();
Animator animator = new Animator(esa);
animator.start();
}
}
|
[
"lixinlu2000@163.com"
] |
lixinlu2000@163.com
|
40fa37da3560a54eb3ebf6819c0f4ea5fce08cce
|
27f6a988ec638a1db9a59cf271f24bf8f77b9056
|
/Code-Hunt-data/users/User045/Sector2-Level1/attempt030-20140920-201725.java
|
9c96812e3f9c9c5ae317bfb818ee4664a094d68f
|
[] |
no_license
|
liiabutler/Refazer
|
38eaf72ed876b4cfc5f39153956775f2123eed7f
|
991d15e05701a0a8582a41bf4cfb857bf6ef47c3
|
refs/heads/master
| 2021-07-22T06:44:46.453717
| 2017-10-31T01:43:42
| 2017-10-31T01:43:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 387
|
java
|
public class Program {
public static int Puzzle(int[] a) {
int sum=0,ret=0;
for(int i=0;i<a.length;i++) sum=sum+a[i];
double average = (double)sum/a.length;
int k =(int)average;
if((float)k==(float)average) ret=k;
else if(-(float)k+(float)average<0.5) ret=k;
else ret=k+1;
//if(a.length>1 && a[0]==-1&&a[1]==-1)return 0;
return ret;
}
}
|
[
"liiabiia@yahoo.com"
] |
liiabiia@yahoo.com
|
57f5cda013ae9cdfc27cc599162070e971d4c97a
|
254e7dc1a0ac2515f0953b432280b14dd668bcc5
|
/src/main/java/org/bian/dto/CRCardNetworkParticipantFacilityFulfillmentArrangementControlInputModel.java
|
522d1644d1a19afa3fa24b87a20ad0441efa80c3
|
[
"Apache-2.0"
] |
permissive
|
bianapis/sd-card-network-participant-facility-v2.0
|
93b9bf2e50ce36fc72d21d2cc5c4cae07fae9fd7
|
9178962d86b5a6f662bc7746f1fac938ee6a0ec9
|
refs/heads/master
| 2020-07-11T04:57:25.067030
| 2019-09-06T06:53:26
| 2019-09-06T06:53:26
| 204,450,665
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,345
|
java
|
package org.bian.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.bian.dto.CRCardNetworkParticipantFacilityFulfillmentArrangementControlInputModelCardNetworkParticipantFacilityControlActionRequest;
import javax.validation.Valid;
/**
* CRCardNetworkParticipantFacilityFulfillmentArrangementControlInputModel
*/
public class CRCardNetworkParticipantFacilityFulfillmentArrangementControlInputModel {
private String cardNetworkParticipantFacilityServicingSessionReference = null;
private String cardNetworkParticipantFacilityFulfillmentArrangementInstanceReference = null;
private Object cardNetworkParticipantFacilityFulfillmentArrangementControlActionTaskRecord = null;
private CRCardNetworkParticipantFacilityFulfillmentArrangementControlInputModelCardNetworkParticipantFacilityControlActionRequest cardNetworkParticipantFacilityFulfillmentArrangementControlActionRequest = null;
/**
* `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::ISO20022andUNCEFACT::Identifier general-info: Reference to the active servicing session
* @return cardNetworkParticipantFacilityServicingSessionReference
**/
public String getCardNetworkParticipantFacilityServicingSessionReference() {
return cardNetworkParticipantFacilityServicingSessionReference;
}
public void setCardNetworkParticipantFacilityServicingSessionReference(String cardNetworkParticipantFacilityServicingSessionReference) {
this.cardNetworkParticipantFacilityServicingSessionReference = cardNetworkParticipantFacilityServicingSessionReference;
}
/**
* `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::ISO20022andUNCEFACT::Identifier general-info: Reference to the Card Network Participant Facility Fulfillment Arrangement instance
* @return cardNetworkParticipantFacilityFulfillmentArrangementInstanceReference
**/
public String getCardNetworkParticipantFacilityFulfillmentArrangementInstanceReference() {
return cardNetworkParticipantFacilityFulfillmentArrangementInstanceReference;
}
public void setCardNetworkParticipantFacilityFulfillmentArrangementInstanceReference(String cardNetworkParticipantFacilityFulfillmentArrangementInstanceReference) {
this.cardNetworkParticipantFacilityFulfillmentArrangementInstanceReference = cardNetworkParticipantFacilityFulfillmentArrangementInstanceReference;
}
/**
* `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Binary general-info: The processing control service call consolidated processing record
* @return cardNetworkParticipantFacilityFulfillmentArrangementControlActionTaskRecord
**/
public Object getCardNetworkParticipantFacilityFulfillmentArrangementControlActionTaskRecord() {
return cardNetworkParticipantFacilityFulfillmentArrangementControlActionTaskRecord;
}
public void setCardNetworkParticipantFacilityFulfillmentArrangementControlActionTaskRecord(Object cardNetworkParticipantFacilityFulfillmentArrangementControlActionTaskRecord) {
this.cardNetworkParticipantFacilityFulfillmentArrangementControlActionTaskRecord = cardNetworkParticipantFacilityFulfillmentArrangementControlActionTaskRecord;
}
/**
* Get cardNetworkParticipantFacilityFulfillmentArrangementControlActionRequest
* @return cardNetworkParticipantFacilityFulfillmentArrangementControlActionRequest
**/
public CRCardNetworkParticipantFacilityFulfillmentArrangementControlInputModelCardNetworkParticipantFacilityControlActionRequest getCardNetworkParticipantFacilityFulfillmentArrangementControlActionRequest() {
return cardNetworkParticipantFacilityFulfillmentArrangementControlActionRequest;
}
public void setCardNetworkParticipantFacilityFulfillmentArrangementControlActionRequest(CRCardNetworkParticipantFacilityFulfillmentArrangementControlInputModelCardNetworkParticipantFacilityControlActionRequest cardNetworkParticipantFacilityFulfillmentArrangementControlActionRequest) {
this.cardNetworkParticipantFacilityFulfillmentArrangementControlActionRequest = cardNetworkParticipantFacilityFulfillmentArrangementControlActionRequest;
}
}
|
[
"team1@bian.org"
] |
team1@bian.org
|
08a4e3e726cdbcb612c651349c27937d707b5fd4
|
180e78725121de49801e34de358c32cf7148b0a2
|
/dataset/protocol1/mapstruct/learning/2785/PrimitiveToPrimitiveConversion.java
|
74e8171d67306b09410ae0b280be78b44c1e03b4
|
[] |
no_license
|
ASSERT-KTH/synthetic-checkstyle-error-dataset
|
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
|
40c057e1669584bfc6fecf789b5b2854660222f3
|
refs/heads/master
| 2023-03-18T12:50:55.410343
| 2019-01-25T09:54:39
| 2019-01-25T09:54:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 864
|
java
|
/*
* Copyright MapStruct Authors.
*
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
*/
package org.mapstruct.ap.internal.conversion;
import org.mapstruct.ap.internal.model.common.ConversionContext;
/**
* Conversion between primitive types such as {@code byte} or {@code long}.
*
* @author Gunnar Morling
*/
public class PrimitiveToPrimitiveConversion extends SimpleConversion {
private final Class<?> sourceType;
public PrimitiveToPrimitiveConversion(Class<?> sourceType) {
this.sourceType = sourceType;
}
@Override
public String getToExpression(ConversionContext conversionContext) {
return "<SOURCE>";
}
@Override
public String getFromExpression(ConversionContext conversionContext) {
return "(" + sourceType + ") <SOURCE>";
}
}
|
[
"bloriot97@gmail.com"
] |
bloriot97@gmail.com
|
ac6d79f2881c153c7d6715fe088b8636905d77c9
|
fa1408365e2e3f372aa61e7d1e5ea5afcd652199
|
/src/testcases/CWE789_Uncontrolled_Mem_Alloc/s01/CWE789_Uncontrolled_Mem_Alloc__getCookies_Servlet_ArrayList_14.java
|
e1fee01e7fe2231cb1862cbe2e435d793dd92a3a
|
[] |
no_license
|
bqcuong/Juliet-Test-Case
|
31e9c89c27bf54a07b7ba547eddd029287b2e191
|
e770f1c3969be76fdba5d7760e036f9ba060957d
|
refs/heads/master
| 2020-07-17T14:51:49.610703
| 2019-09-03T16:22:58
| 2019-09-03T16:22:58
| 206,039,578
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,788
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE789_Uncontrolled_Mem_Alloc__getCookies_Servlet_ArrayList_14.java
Label Definition File: CWE789_Uncontrolled_Mem_Alloc.int.label.xml
Template File: sources-sink-14.tmpl.java
*/
/*
* @description
* CWE: 789 Uncontrolled Memory Allocation
* BadSource: getCookies_Servlet Read data from the first cookie using getCookies()
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* BadSink: ArrayList Create an ArrayList using data as the initial size
* Flow Variant: 14 Control flow: if(IO.staticFive==5) and if(IO.staticFive!=5)
*
* */
package testcases.CWE789_Uncontrolled_Mem_Alloc.s01;
import testcasesupport.*;
import javax.servlet.http.*;
import java.util.logging.Level;
import java.util.ArrayList;
public class CWE789_Uncontrolled_Mem_Alloc__getCookies_Servlet_ArrayList_14 extends AbstractTestCaseServlet
{
/* uses badsource and badsink */
public void bad(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
int data;
if (IO.staticFive == 5)
{
data = Integer.MIN_VALUE; /* initialize data in case there are no cookies */
/* Read data from cookies */
{
Cookie cookieSources[] = request.getCookies();
if (cookieSources != null)
{
/* POTENTIAL FLAW: Read data from the first cookie value */
String stringNumber = cookieSources[0].getValue();
try
{
data = Integer.parseInt(stringNumber.trim());
}
catch(NumberFormatException exceptNumberFormat)
{
IO.logger.log(Level.WARNING, "Number format exception reading data from cookie", exceptNumberFormat);
}
}
}
}
else
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run
* but ensure data is inititialized before the Sink to avoid compiler errors */
data = 0;
}
/* POTENTIAL FLAW: Create an ArrayList using data as the initial size. data may be very large, creating memory issues */
ArrayList intArrayList = new ArrayList(data);
}
/* goodG2B1() - use goodsource and badsink by changing IO.staticFive==5 to IO.staticFive!=5 */
private void goodG2B1(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
int data;
if (IO.staticFive != 5)
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run
* but ensure data is inititialized before the Sink to avoid compiler errors */
data = 0;
}
else
{
/* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */
data = 2;
}
/* POTENTIAL FLAW: Create an ArrayList using data as the initial size. data may be very large, creating memory issues */
ArrayList intArrayList = new ArrayList(data);
}
/* goodG2B2() - use goodsource and badsink by reversing statements in if */
private void goodG2B2(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
int data;
if (IO.staticFive == 5)
{
/* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */
data = 2;
}
else
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run
* but ensure data is inititialized before the Sink to avoid compiler errors */
data = 0;
}
/* POTENTIAL FLAW: Create an ArrayList using data as the initial size. data may be very large, creating memory issues */
ArrayList intArrayList = new ArrayList(data);
}
public void good(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
goodG2B1(request, response);
goodG2B2(request, response);
}
/* Below is the main(). It is only used when building this testcase on
* its own for testing or for building a binary to use in testing binary
* analysis tools. It is not used when compiling all the testcases as one
* application, which is how source code analysis tools are tested.
*/
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
|
[
"bqcuong2212@gmail.com"
] |
bqcuong2212@gmail.com
|
a24d15734855e56a392c559b6564174097704dd5
|
b6c0c5b2811b923a74ea97e1b9731f7ffa421f40
|
/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/SecurityProtocol.java
|
1ff1de882be4fe66e51544f1e12968531f9f01f9
|
[
"Apache-2.0"
] |
permissive
|
glahiru/airavata
|
b1ae8dc98af27933ee303ff7300351c070de262d
|
9e7ed4ba8336091717ff1dc823d084f6b349ae08
|
refs/heads/master
| 2021-01-23T18:08:23.120559
| 2014-10-24T05:38:39
| 2014-10-24T05:40:30
| 23,710,309
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,355
|
java
|
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Autogenerated by Thrift Compiler (0.9.1)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.airavata.model.appcatalog.computeresource;
import java.util.Map;
import java.util.HashMap;
import org.apache.thrift.TEnum;
/**
* Enumeration of security authentication and authorization mechanisms supported by Airavata. This enumeration just
* describes the supported mechanism. The corresponding security credentials are registered with Airavata Credential
* store.
*
* USERNAME_PASSWORD:
* A User Name.
*
* SSH_KEYS:
* SSH Keys
*
* FIXME: Change GSI to a more precise generic security protocol - X509
*
*/
@SuppressWarnings("all") public enum SecurityProtocol implements org.apache.thrift.TEnum {
USERNAME_PASSWORD(0),
SSH_KEYS(1),
GSI(2),
KERBEROS(3),
OAUTH(4);
private final int value;
private SecurityProtocol(int value) {
this.value = value;
}
/**
* Get the integer value of this enum value, as defined in the Thrift IDL.
*/
public int getValue() {
return value;
}
/**
* Find a the enum type by its integer value, as defined in the Thrift IDL.
* @return null if the value is not found.
*/
public static SecurityProtocol findByValue(int value) {
switch (value) {
case 0:
return USERNAME_PASSWORD;
case 1:
return SSH_KEYS;
case 2:
return GSI;
case 3:
return KERBEROS;
case 4:
return OAUTH;
default:
return null;
}
}
}
|
[
"smarru@apache.org"
] |
smarru@apache.org
|
ee9545da1fc6c56a6581a5ee411415d765712bcd
|
18b60fd47e20aa0c38806243bed8081c9ef3cd86
|
/jupiter-rpc/src/main/java/org/jupiter/rpc/consumer/invoker/ClusterStrategyBridging.java
|
548b26e8374d96fdfec46ddb447842712a7a3d6b
|
[
"Apache-2.0"
] |
permissive
|
kongzhidea/Jupiter
|
9ddbdf8f652e46e1c751c23098af424a60fb382b
|
9b9234891ba03b21c71da9d69a6e0904216cb094
|
refs/heads/master
| 2021-10-01T15:39:43.719113
| 2018-11-27T11:32:45
| 2018-11-27T11:32:45
| 110,490,308
| 1
| 0
|
NOASSERTION
| 2018-11-27T11:32:46
| 2017-11-13T02:27:29
|
Java
|
UTF-8
|
Java
| false
| false
| 3,029
|
java
|
/*
* Copyright (c) 2015 The Jupiter Project
*
* Licensed under the Apache License, version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jupiter.rpc.consumer.invoker;
import org.jupiter.common.util.Maps;
import org.jupiter.rpc.consumer.cluster.ClusterInvoker;
import org.jupiter.rpc.consumer.cluster.FailFastClusterInvoker;
import org.jupiter.rpc.consumer.cluster.FailOverClusterInvoker;
import org.jupiter.rpc.consumer.cluster.FailSafeClusterInvoker;
import org.jupiter.rpc.consumer.dispatcher.Dispatcher;
import org.jupiter.rpc.model.metadata.ClusterStrategyConfig;
import org.jupiter.rpc.model.metadata.MethodSpecialConfig;
import java.util.List;
import java.util.Map;
/**
* Jupiter
* org.jupiter.rpc.consumer.invoker
*
* @author jiachun.fjc
*/
public class ClusterStrategyBridging {
private final ClusterInvoker defaultClusterInvoker;
private final Map<String, ClusterInvoker> methodSpecialClusterInvokerMapping;
public ClusterStrategyBridging(Dispatcher dispatcher,
ClusterStrategyConfig defaultStrategy,
List<MethodSpecialConfig> methodSpecialConfigs) {
this.defaultClusterInvoker = createClusterInvoker(dispatcher, defaultStrategy);
this.methodSpecialClusterInvokerMapping = Maps.newHashMap();
for (MethodSpecialConfig config : methodSpecialConfigs) {
ClusterStrategyConfig strategy = config.getStrategy();
if (strategy != null) {
methodSpecialClusterInvokerMapping.put(
config.getMethodName(),
createClusterInvoker(dispatcher, strategy)
);
}
}
}
public ClusterInvoker findClusterInvoker(String methodName) {
ClusterInvoker invoker = methodSpecialClusterInvokerMapping.get(methodName);
return invoker != null ? invoker : defaultClusterInvoker;
}
private ClusterInvoker createClusterInvoker(Dispatcher dispatcher, ClusterStrategyConfig strategy) {
ClusterInvoker.Strategy s = strategy.getStrategy();
switch (s) {
case FAIL_FAST:
return new FailFastClusterInvoker(dispatcher);
case FAIL_OVER:
return new FailOverClusterInvoker(dispatcher, strategy.getFailoverRetries());
case FAIL_SAFE:
return new FailSafeClusterInvoker(dispatcher);
default:
throw new UnsupportedOperationException("Unsupported strategy: " + strategy);
}
}
}
|
[
"jiachun.fjc@alibaba-inc.com"
] |
jiachun.fjc@alibaba-inc.com
|
aa71e9db42c2d368774a04f48519358b63dc2692
|
013eb122629346c8a0601a3e56607e6151386896
|
/extensions/arquillian-decoder/arquillian-decoder/api/src/main/java/org/arquillian/extension/decoder/api/Configuration.java
|
de9167cd1c365e6f87db148e40762bc43a2fa547
|
[
"Apache-2.0"
] |
permissive
|
Jakarta-EE-Petclinic/arquillian-showcase
|
a676e8c01d89089a8b5e39716aee1d008c9abfa1
|
68bd3d651fe675ed0b755e67295f8960c5cce92b
|
refs/heads/master
| 2021-03-23T23:26:52.497352
| 2017-07-24T13:07:39
| 2017-07-24T13:07:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,749
|
java
|
/*
* JBoss, Home of Professional Open Source
* Copyright 2015, Red Hat, Inc. and/or its affiliates, and individual
* contributors by the @authors tag. See the copyright.txt in the
* distribution for a full listing of individual contributors.
*
* 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.arquillian.extension.decoder.api;
import java.util.HashMap;
import java.util.Map;
import org.jboss.arquillian.core.spi.Validate;
/**
*
* @author <a href="mailto:smikloso@redhat.com">Stefan Miklosovic</a>
*
*/
public abstract class Configuration
{
private Map<String, String> configuration = new HashMap<String, String>();
/**
* Gets configuration from Arquillian descriptor and creates instance of it.
*
* @param configuration configuration of extension from arquillian.xml
* @return this
* @throws IllegalArgumentException if {@code configuration} is a null object
*/
public Configuration setConfiguration(Map<String, String> configuration)
{
Validate.notNull(configuration, "Properties for configuration of Arquillian Decoder extension can not be a null object!");
this.configuration = configuration;
return this;
}
/**
*
* @return configuration of extension
*/
public Map<String, String> getConfiguration()
{
return this.configuration;
}
/**
* Gets value of {@code name} property. In case a value for such name does not exist or is a null object or an empty string,
* {@code defaultValue} is returned.
*
* @param name name of a property you want to get the value of
* @param defaultValue value returned in case {@code name} is a null string or it is empty
* @return value of a {@code name} property of {@code defaultValue} when {@code name} is null or empty string
* @throws IllegalArgumentException if {@code name} is a null object or an empty string or if {@code defaultValue} is a null
* object
*/
public String getProperty(String name, String defaultValue) throws IllegalStateException
{
Validate.notNullOrEmpty(name, "Unable to get the configuration value of null or empty configuration key");
Validate.notNull(defaultValue, "Unable to set configuration value of " + name + " to null object.");
String found = getConfiguration().get(name);
if (found == null || found.isEmpty())
{
return defaultValue;
} else
{
return found;
}
}
/**
* Sets some property.
*
* @param name acts as a key
* @param value
* @throws IllegalArgumentException if {@code name} is null or empty or {@code value} is null
*/
public void setProperty(String name, String value)
{
Validate.notNullOrEmpty(name, "Name of property can not be a null object nor an empty string!");
Validate.notNull(value, "Value of property can not be a null object!");
configuration.put(name, value);
}
/**
* Validates configuration.
*
* @throws DecoderConfigurationException when configuration of the extension is not valid
*/
public abstract void validate() throws DecoderConfigurationException;
}
|
[
"smikloso@redhat.com"
] |
smikloso@redhat.com
|
fa655208c10859a9985b6ed42ef9ed1d574a652d
|
13ac75e91402706e2e45777ce963635f823d629f
|
/src/common/xap/lui/core/j2eesvr/Servlet.java
|
df2bfdf23f8bd7e80f39857eba3c577343819c4b
|
[] |
no_license
|
gufanyi/wdp
|
86085600062e6d42adcacaf46968854c8632ead1
|
9f69f798b799ab258ed57febad10495a65574c9a
|
refs/heads/master
| 2021-01-10T10:59:49.283794
| 2015-12-17T15:33:23
| 2015-12-17T15:33:23
| 47,962,667
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 613
|
java
|
package xap.lui.core.j2eesvr;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.apache.commons.lang.StringUtils;
/**
* 指定一个类型是servlet
*
* @author licza
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface Servlet {
/**
* ServLet名称.
*/
String name() default StringUtils.EMPTY;
/**
* ServLet路径 example: /user.
*/
String path();
/**
* 多语目录
*
* @return
*/
String langdir() default StringUtils.EMPTY;
}
|
[
"303240304@qq.com"
] |
303240304@qq.com
|
31efab8ecba55ea9d9e8c289f7139ceb41be8de3
|
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
|
/crash-reproduction-ws/results/XRENDERING-481-89-8-Single_Objective_GGA-WeightedSum/com/xpn/xwiki/render/DefaultVelocityManager_ESTest.java
|
a044abb180031f3cc75b14e3d34092fd01c3e9a7
|
[
"MIT",
"CC-BY-4.0"
] |
permissive
|
STAMP-project/Botsing-basic-block-coverage-application
|
6c1095c6be945adc0be2b63bbec44f0014972793
|
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
|
refs/heads/master
| 2022-07-28T23:05:55.253779
| 2022-04-20T13:54:11
| 2022-04-20T13:54:11
| 285,771,370
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 571
|
java
|
/*
* This file was automatically generated by EvoSuite
* Tue Mar 31 16:12:48 UTC 2020
*/
package com.xpn.xwiki.render;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class DefaultVelocityManager_ESTest extends DefaultVelocityManager_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
64ec1189991b7594067f88b9ad75711b98199122
|
f4582e49362090f8241473366933865b9f949dd5
|
/src/test/java/org/jboss/javassist/classfilewriter/proxyfactory/test/AllTests.java
|
3ac596ea7c03b8476cee9f5ea1d0adc23d52c615
|
[] |
no_license
|
alesj/javassist-cfw-proxyfactory
|
d8b90f5dd7bcd3f5a883349c412c8cd265a72ccb
|
3f593391c78b11914b12cb55aa926ea8beff6d09
|
refs/heads/master
| 2021-01-18T06:49:44.886659
| 2010-08-25T15:05:13
| 2010-08-25T15:05:13
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,847
|
java
|
/*
* JBoss, Home of Professional Open Source.
* Copyright 2010, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.javassist.classfilewriter.proxyfactory.test;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
/**
*
* @author <a href="kabir.khan@jboss.com">Kabir Khan</a>
* @version $Revision: 1.1 $
*/
@SuiteClasses({BasicProxyFactoryTestCase.class,
PrimitiveProxyFactoryCalledByWrapperTestCase.class,
PrimitiveProxyFactoryCalledByHandlerTestCase.class,
BoxedProxyFactoryCalledByWrapperTestCase.class,
BoxedProxyFactoryCalledByHandlerTestCase.class,
PrimitiveArrayProxyFactoryCalledByWrapperTestCase.class,
PrimitiveArrayProxyFactoryCalledByHandlerTestCase.class,
BoxedArrayProxyFactoryCalledByWrapperTestCase.class,
BoxedArrayProxyFactoryCalledByHandlerTestCase.class})
@RunWith(Suite.class)
public class AllTests {
}
|
[
"kkhan@redhat.com"
] |
kkhan@redhat.com
|
4d9bcee52a49be024f9daf092532390303558e1a
|
23d65cfe9a12378fdb6d79ade399cad89bc8c01f
|
/roteiros/R18-01-Rot-SkipList-environment/src/main/java/adt/skipList/SkipListImpl.java
|
3069b2d6dab3880516571419d1324cd5539bdcc3
|
[] |
no_license
|
GersonSales/LEDA
|
5feaf6c41dd8416648d930f3b8c3d79e9c2bbf26
|
faeeffeb117eefe861f52ce7cf85619f13e2ecbb
|
refs/heads/master
| 2021-03-16T04:14:16.849769
| 2016-12-09T00:07:06
| 2016-12-09T00:07:06
| 60,433,110
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,923
|
java
|
package adt.skipList;
public class SkipListImpl<T> implements SkipList<T> {
protected SkipListNode<T> root;
protected SkipListNode<T> NIL;
protected int height;
protected int maxHeight;
protected boolean USE_MAX_HEIGHT_AS_HEIGHT = false;
protected double PROBABILITY = 0.5;
public SkipListImpl(int maxHeight) {
if (USE_MAX_HEIGHT_AS_HEIGHT) {
this.height = maxHeight;
} else {
this.height = 1;
}
this.maxHeight = maxHeight;
root = new SkipListNode(Integer.MIN_VALUE, maxHeight, null);
NIL = new SkipListNode(Integer.MAX_VALUE, maxHeight, null);
connectRootToNil();
}
/**
* Faz a ligacao inicial entre os apontadores forward do ROOT e o NIL Caso
* esteja-se usando o level do ROOT igual ao maxLevel esse metodo deve
* conectar todos os forward. Senao o ROOT eh inicializado com level=1 e o
* metodo deve conectar apenas o forward[0].
*/
private void connectRootToNil() {
if (USE_MAX_HEIGHT_AS_HEIGHT) {
for (int i = 0; i < maxHeight; i++) {
root.forward[i] = NIL;
}
} else {
root.forward[0] = NIL;
}
}
/**
* Metodo que gera uma altura aleatoria para ser atribuida a um novo no no
* metodo insert(int,V)
*/
private int randomLevel() {
int randomLevel = 1;
double random = Math.random();
while (Math.random() <= PROBABILITY && randomLevel < maxHeight) {
randomLevel = randomLevel + 1;
}
return randomLevel;
}
@Override
public void insert(int key, T newValue, int height) {
if (height <= maxHeight) {
fixRootRelationship(height);
SkipListNode<T>[] update = new SkipListNode[this.height];
SkipListNode<T> aux = root;
for (int i = this.height - 1; i >= 0; i--) {
while (aux.getForward(i) != null && aux.getForward(i).getKey() < key) {
aux = aux.getForward(i);
}
update[i] = aux;
}
aux = aux.getForward(0);
if (aux.getKey() == key) {
aux.setValue(newValue);
} else {
aux = new SkipListNode<T>(key, height, newValue);
for (int i = 0; i < height; i++) {
aux.forward[i] = update[i].forward[i];
update[i].forward[i] = aux;
}
}
}
}
private void fixRootRelationship(int height) {
if (USE_MAX_HEIGHT_AS_HEIGHT) {
height = maxHeight;
}
if (this.height < height) {
for (int i = this.height; i < height; i++) {
root.forward[i] = NIL;
}
this.height = height;
}
}
@Override
public void remove(int key) {
if (key != this.root.key && key != this.NIL.key) {
SkipListNode<T>[] update = new SkipListNode[this.height];
SkipListNode<T> aux = this.root;
for (int i = this.height - 1; i >= 0; i--) {
while (aux.getForward(i) != null && aux.getForward(i).key < key) {
aux = aux.getForward(i);
}
update[i] = aux;
}
if (aux.getForward(0).key == key) {
aux = aux.getForward(0);
for (int i = aux.height - 1; i >= 0; i--) {
update[i].forward[i] = aux.forward[i];
if (!this.USE_MAX_HEIGHT_AS_HEIGHT && (update[i] == this.root) && (update[i].forward[i] == this.NIL)
&& i != 0)
update[i].forward[i] = null;
}
}
}
}
@Override
public int height() {
return this.height;
}
@Override
public SkipListNode<T> search(int key) {
if (key == this.root.key)
return this.root;
if (key == this.NIL.key)
return this.NIL;
SkipListNode<T> aux = this.root;
for (int i = this.height - 1; i >= 0; i--) {
while (aux.getForward(i) != null && aux.getForward(i).key < key) {
aux = aux.getForward(i);
}
}
if (aux.getForward(0) != null && aux.getForward(0).key == key) {
return aux.getForward(0);
}
return null;
}
@Override
public int size() {
SkipListNode<T> aux = root;
int size = 0;
while (aux.getForward(0) != null) {
aux = aux.getForward(0);
size = aux.equals(NIL) ? size : size + 1;
}
return size;
}
@Override
public SkipListNode<T>[] toArray() {
@SuppressWarnings("unchecked")
SkipListNode<T>[] array = new SkipListNode[size() + 2];
SkipListNode<T> aux = this.root;
for (int i = 0; i < array.length; i++) {
array[i] = aux;
aux = aux.getForward(0);
}
return array;
}
}
|
[
"gerson.junior@ccc.ufcg.edu.br"
] |
gerson.junior@ccc.ufcg.edu.br
|
620318a57588ebd25f850e1aa8d91910f9f0e26e
|
776f7a8bbd6aac23678aa99b72c14e8dd332e146
|
/src/com/google/android/gms/internal/zzib$zzb.java
|
7de606043ab7e644bf284e6c2f84662679968e36
|
[] |
no_license
|
arvinthrak/com.nianticlabs.pokemongo
|
aea656acdc6aa419904f02b7331f431e9a8bba39
|
bcf8617bafd27e64f165e107fdc820d85bedbc3a
|
refs/heads/master
| 2020-05-17T15:14:22.431395
| 2016-07-21T03:36:14
| 2016-07-21T03:36:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 298
|
java
|
package com.google.android.gms.internal;
import android.os.Bundle;
public abstract interface zzib$zzb
{
public abstract void zzd(Bundle paramBundle);
}
/* Location:
* Qualified Name: com.google.android.gms.internal.zzib.zzb
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
88daf945858b871141e6b1bef268a1a7306beb08
|
fffc8497ffbdfbe25c5d7ce22b20604d5ccfb25a
|
/cps/src/main/java/com/jdcloud/sdk/service/cps/model/DescribeSoftwareResponse.java
|
c9e7291c6b0af6550e024a03b549468265738c11
|
[
"Apache-2.0"
] |
permissive
|
edwinlly/jdcloud-sdk-java
|
71cca4c5232d6162abd00d1f86ecb03a606864f5
|
2ba0cf0bf16f17c7b7ead7c7abecd4e918379f80
|
refs/heads/master
| 2020-04-09T03:13:59.854171
| 2018-11-29T06:56:29
| 2018-11-29T06:56:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,221
|
java
|
/*
* Copyright 2018 JDCLOUD.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.
*
* 云物理服务器
* 云物理服务器操作相关的接口
*
* OpenAPI spec version: v1
* Contact:
*
* NOTE: This class is auto generated by the jdcloud code generator program.
*/
package com.jdcloud.sdk.service.cps.model;
import com.jdcloud.sdk.service.JdcloudResponse;
/**
* 查询物理服务器可预装的软件列表<br/>
可调用接口(describeOS)获取云物理服务器支持的操作系统列表<br/>
*/
public class DescribeSoftwareResponse extends JdcloudResponse<DescribeSoftwareResult> implements java.io.Serializable {
private static final long serialVersionUID = 1L;
}
|
[
"oulinbao@jd.com"
] |
oulinbao@jd.com
|
edd70ce34bd1691efc9e60ca55a2f59cd221504a
|
d6c041879c662f4882892648fd02e0673a57261c
|
/com/planet_ink/coffee_mud/Abilities/Common/DiligentStudying.java
|
c14837a7966956aa847d3887fc433c7fb750f091
|
[
"Apache-2.0"
] |
permissive
|
linuxshout/CoffeeMud
|
15a2c09c1635f8b19b0d4e82c9ef8cd59e1233f6
|
a418aa8685046b08c6d970083e778efb76fd3716
|
refs/heads/master
| 2020-04-14T04:17:39.858690
| 2018-12-29T20:50:15
| 2018-12-29T20:50:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,326
|
java
|
package com.planet_ink.coffee_mud.Abilities.Common;
import com.planet_ink.coffee_mud.Abilities.StdAbility;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.*;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;
import java.util.*;
/*
Copyright 2016-2018 Bo Zimmerman
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
public class DiligentStudying extends StdAbility
{
@Override
public String ID()
{
return "DiligentStudying";
}
private final static String localizedName = CMLib.lang().L("Diligent Studying");
@Override
public String name()
{
return localizedName;
}
@Override
public String displayText()
{
return "";
}
@Override
protected int canAffectCode()
{
return CAN_MOBS;
}
@Override
protected int canTargetCode()
{
return 0;
}
@Override
public int abstractQuality()
{
return Ability.QUALITY_BENEFICIAL_SELF;
}
@Override
public boolean isAutoInvoked()
{
return true;
}
@Override
public boolean canBeUninvoked()
{
return false;
}
@Override
public int classificationCode()
{
return Ability.ACODE_COMMON_SKILL;
}
@Override
public void executeMsg(final Environmental myHost, final CMMsg msg)
{
if(msg.sourceMinor()==CMMsg.TYP_LEVEL)
{
if(msg.source() == affected)
{
int amt = (msg.value() - msg.source().basePhyStats().level());
final int multiplier = CMath.s_int(text());
if(multiplier != 0)
amt = amt * multiplier;
if(amt == 1)
msg.source().tell(L("^NYou gain ^H1^N practice point.\n\r^N"));
else
if(amt > 1)
msg.source().tell(L("^NYou gain ^H@x1^N practice points.\n\r^N",""+amt));
else
if(amt == -1)
msg.source().tell(L("^NYou lose ^H1^N practice point.\n\r^N"));
else
if(amt < -1)
msg.source().tell(L("^NYou lose ^H@x1^N practice points.\n\r^N",""+(-amt)));
msg.source().setPractices(msg.source().getPractices() + amt);
if(msg.source().getPractices()<0)
msg.source().setPractices(0);
}
}
super.executeMsg(myHost,msg);
}
}
|
[
"bo@zimmers.net"
] |
bo@zimmers.net
|
979e31e008ce73ce0245e25d0609b14df01dd742
|
4444b59bd0a4da63696ba61055e731573e1715c0
|
/primefaces-blueprints-master/chapter08/src/main/java/com/packtpub/pf/blueprint/service/DAOService.java
|
493bf8a1929d35405748bd033c27b638e7b4b94f
|
[] |
no_license
|
mostafiz9900/PrimeFaces
|
f9c61acbe35abeae809628ee0abe4469448c4b5a
|
e8bde905f68e904bc33d545bf96386d74016cc04
|
refs/heads/master
| 2020-04-15T09:46:43.281052
| 2019-03-11T07:02:55
| 2019-03-11T07:02:55
| 164,564,875
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,178
|
java
|
package com.packtpub.pf.blueprint.service;
import com.packtpub.pf.blueprint.JobStatus;
import com.packtpub.pf.blueprint.persistence.entity.*;
import org.apache.log4j.Logger;
import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.criterion.CriteriaSpecification;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;
import java.util.List;
/**
* Created with IntelliJ IDEA.
* User: Ramkumar Pillai <psramkumar@gmail.com>
* Date: 2/6/14
* Time: 8:18 PM
* To change this template use File | Settings | File Templates.
*/
@TransactionAttribute(TransactionAttributeType.REQUIRED)
public class DAOService {
private static final Logger _log = Logger.getLogger(DAOService.class);
public final String OPEN_STATUS = "OPEN";
public Customer validateUser(String username, String password) {
org.hibernate.Transaction tx = getSession().beginTransaction();
Criteria criteria = getSession().createCriteria(Customer.class);
criteria.add(Restrictions.eq("email", username));
criteria.add(Restrictions.eq("password", password));
criteria.setResultTransformer(CriteriaSpecification.DISTINCT_ROOT_ENTITY);
Customer user = (Customer) criteria.uniqueResult();
tx.commit();
getSession().close();
_log.info("Listed Successfully....");
return user;
}
public List<Location> getAllLocations(){
org.hibernate.Transaction tx = getSession().beginTransaction();
List list = getSession().createCriteria(Location.class).list();
tx.commit();
getSession().close();
_log.info("Listed Successfully....");
return list;
}
public void addOrUpdateEntity(Object o) {
if (o != null) {
org.hibernate.Transaction tx = getSession().beginTransaction();
getSession().saveOrUpdate(o);
tx.commit();
getSession().close();
_log.info("Added Successfully....");
}
}
public Object loadEntityById(Class<?> cl, Long id) {
Object o = null;
if (id != null) {
org.hibernate.Transaction tx = getSession().beginTransaction();
o = getSession().load(cl, id);
tx.commit();
getSession().close();
_log.info(" Successfully Loaded Object....");
}
return o;
}
public List<PrintJobs> getJobsByCustomerId(Customer c) {
org.hibernate.Transaction tx = getSession().beginTransaction();
List list = getSession().createCriteria(PrintJobs.class)
.add(Restrictions.eq("customer", c))
.addOrder(Order.desc("createDate")).list();
tx.commit();
getSession().close();
_log.info("Listed Successfully....");
return list;
}
public List<PrintJobs> getJobsBySubmittedStatus() {
org.hibernate.Transaction tx = getSession().beginTransaction();
List list = getSession().createCriteria(PrintJobs.class)
.add(Restrictions.eq("status", JobStatus.SUBMITTED))
.addOrder(Order.desc("createDate")).list();
tx.commit();
getSession().close();
_log.info("Listed Successfully....");
return list;
}
public Location getLocationByFranchiseeNo(Long franchiseeNo){
Location loc = null;
if (franchiseeNo != null) {
org.hibernate.Transaction tx = getSession().beginTransaction();
Criteria criteria = getSession().createCriteria(Location.class);
criteria.add(Restrictions.eq("franchiseeNo", franchiseeNo));
loc = (Location) criteria.uniqueResult();
tx.commit();
getSession().close();
_log.info("Added Successfully....");
}
return loc;
}
private Session getSession() {
SessionFactory sf = com.packtpub.pf.blueprint.persistence.HibernateUtil.getSessionFactory();
return sf.isClosed() ? sf.openSession() : sf.getCurrentSession();
}
}
|
[
"you@example.com"
] |
you@example.com
|
1eca61a1ab29196034f06a1ce8eb7fe292856fca
|
7b733d7be68f0fa4df79359b57e814f5253fc72d
|
/rest/src/main/java/com/percussion/rest/errors/SiteNotFoundException.java
|
3e2c374978665f49d6359a87aab11331acb2c8cf
|
[
"LicenseRef-scancode-dco-1.1",
"Apache-2.0",
"OFL-1.1",
"LGPL-2.0-or-later"
] |
permissive
|
percussion/percussioncms
|
318ac0ef62dce12eb96acf65fc658775d15d95ad
|
c8527de53c626097d589dc28dba4a4b5d6e4dd2b
|
refs/heads/development
| 2023-08-31T14:34:09.593627
| 2023-08-31T14:04:23
| 2023-08-31T14:04:23
| 331,373,975
| 18
| 6
|
Apache-2.0
| 2023-09-14T21:29:25
| 2021-01-20T17:03:38
|
Java
|
UTF-8
|
Java
| false
| false
| 923
|
java
|
/*
* Copyright 1999-2023 Percussion Software, 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.percussion.rest.errors;
import javax.ws.rs.core.Response;
/**
* @author stephenbolton
*
*/
public class SiteNotFoundException extends RestExceptionBase
{
public SiteNotFoundException()
{
super(RestErrorCode.SITE_NOT_FOUND, null, null, Response.Status.NOT_FOUND);
}
}
|
[
"nate.chadwick@gmail.com"
] |
nate.chadwick@gmail.com
|
8cf345cf5ab1bec54436f40e89f913d5ad2dac87
|
e254635b296055a05983a69228deaca9404b62ec
|
/src/chapter4reusingobjects/InitOrder.java
|
ce23f918b068174e21cbc4adf244c7a9a4c44f05
|
[] |
no_license
|
Nayanzin-Alexander/ThinkingInJava
|
4aca2e58264315fe0d7396fbff03b4e2800e9b8a
|
fdea25eb955a694370239b15f5c755e1d8872f2c
|
refs/heads/master
| 2021-04-15T07:52:17.858456
| 2018-03-24T14:01:28
| 2018-03-24T14:01:28
| 126,604,903
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 883
|
java
|
package chapter4reusingobjects;
import static myutil.Printer.*;
/**
* Created by nayanzin on 27.06.17.
*/
class Insect{
private static int x1 = printInit("static Insect.x1 init");
private int i = 9;
protected int j;
Insect(){
print("i=" + i + " j=" + j);
}
static int printInit(String msg){
print(msg);
return 47;
}
}
public class InitOrder extends Insect{
private static int x2 = printInit("static InitOrder.x2 init");
private int k = printInit("InitOrder.k initialized");
public InitOrder() {
print("k = " + k);
print("j = " + j);
}
public static void main(String[] args) {
print("Beetle constructor");
InitOrder b = new InitOrder();
}
}/*Output:
static Insect.x1 init
static InitOrder.x2 init
Beetle constructor
i=9 j=0
InitOrder.k initialized
k = 47
j = 0
*/
|
[
"nayanzin.alexander@gmail.com"
] |
nayanzin.alexander@gmail.com
|
5a7d73b325a13528c9dbcce3b30664dc194274ad
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project56/src/test/java/org/gradle/test/performance56_4/Test56_360.java
|
a569796717b2cc56b0b853d2dd1ba24df492a258
|
[] |
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
| 292
|
java
|
package org.gradle.test.performance56_4;
import static org.junit.Assert.*;
public class Test56_360 {
private final Production56_360 production = new Production56_360("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
96393de9a5bf2b58b6d49b688755a9e37bbb67bf
|
221d6fec4151d6b850f61bc8f79399c6907bc6a5
|
/serviceframework-web/src/main/java/net/csdn/modules/mock/MockRestRequest.java
|
10d97590d8a88d96b615744247d7e1c797db891a
|
[] |
no_license
|
allwefantasy/ServiceFramework
|
f10798464502b24faa008c31573b40dd286124a2
|
df69f72dc5de0a04d8151a1bea2435b4b816acae
|
refs/heads/master
| 2023-03-07T08:06:42.514004
| 2022-09-16T09:52:32
| 2022-09-16T09:52:32
| 5,311,925
| 329
| 160
| null | 2022-12-14T21:00:53
| 2012-08-06T08:50:38
|
Java
|
UTF-8
|
Java
| false
| false
| 6,479
|
java
|
package net.csdn.modules.mock;
import net.csdn.common.Booleans;
import net.csdn.common.Unicode;
import net.csdn.common.unit.ByteSizeValue;
import net.csdn.common.unit.TimeValue;
import net.csdn.modules.http.RestRequest;
import net.csdn.modules.http.RestUtils;
import org.apache.commons.lang.StringUtils;
import javax.servlet.http.HttpServletRequest;
import java.util.Map;
import java.util.regex.Pattern;
import static net.csdn.common.unit.ByteSizeValue.parseBytesSizeValue;
import static net.csdn.common.unit.TimeValue.parseTimeValue;
/**
* User: WilliamZhu
* Date: 12-7-5
* Time: 下午5:12
*/
public class MockRestRequest implements RestRequest {
private static final Pattern commaPattern = Pattern.compile(",");
private final Method method;
private final Map<String, String> params;
private final String rawPath;
private byte[] content = new byte[0];
public MockRestRequest(Map<String, String> params, Method method, String bodyContentNotForm) {
this.method = method;
this.params = params;
this.rawPath = "";
if (bodyContentNotForm != null)
try {
content = bodyContentNotForm.getBytes();
} catch (Exception e) {
throw new IllegalArgumentException("Fail to parse request params");
}
}
public MockRestRequest(String path, Map<String, String> params, Method requestMethod, String bodyContentNotForm) {
this.method = requestMethod;
this.params = params;
this.rawPath = path;
if (bodyContentNotForm != null)
try {
content = bodyContentNotForm.getBytes();
} catch (Exception e) {
throw new IllegalArgumentException("Fail to parse request params");
}
}
@Override
public Method method() {
return this.method;
}
@Override
public String uri() {
return null;
}
@Override
public String rawPath() {
return rawPath;
}
@Override
public String url() {
return null;
}
@Override
public String queryString() {
return null;
}
@Override
public boolean hasContent() {
return content.length > 0;
}
@Override
public boolean contentUnsafe() {
return false;
}
@Override
public byte[] contentByteArray() {
return content;
}
@Override
public int contentByteArrayOffset() {
return 0;
}
@Override
public int contentLength() {
return content.length;
}
@Override
public String contentAsString() {
return Unicode.fromBytes(contentByteArray(), contentByteArrayOffset(), contentLength());
}
@Override
public String header(String name) {
return null;
}
@Override
public Map<String, String> params() {
return params;
}
@Override
public String cookie(String name) {
return null;
}
@Override
public Object session(String key) {
return null;
}
@Override
public void session(String key, Object value) {
}
@Override
public Object flash(String key) {
return null;
}
@Override
public void flash(String key, Object value) {
}
@Override
public HttpServletRequest httpServletRequest() {
throw new RuntimeException("not implemented yet...");
}
@Override
public boolean hasParam(String key) {
return params.containsKey(key);
}
@Override
public String param(String key) {
return params.get(key);
}
@Override
public String paramMultiKey(String... keys) {
for (String key : keys) {
String temp = param(key);
if (!StringUtils.isEmpty(temp))
return temp;
}
return null;
}
public String param(String key, String defaultValue) {
String value = params.get(key);
if (value == null) {
return defaultValue;
}
return value;
}
@Override
public final String path() {
return RestUtils.decodeComponent(rawPath());
}
@Override
public float paramAsFloat(String key, float defaultValue) {
String sValue = param(key);
if (sValue == null) {
return defaultValue;
}
try {
return Float.parseFloat(sValue);
} catch (NumberFormatException e) {
throw new IllegalArgumentException("Failed to parse float parameter [" + key + "] with value [" + sValue + "]", e);
}
}
@Override
public int paramAsInt(String key, int defaultValue) {
String sValue = param(key);
if (sValue == null) {
return defaultValue;
}
try {
return Integer.parseInt(sValue);
} catch (NumberFormatException e) {
throw new IllegalArgumentException("Failed to parse int parameter [" + key + "] with value [" + sValue + "]", e);
}
}
@Override
public long paramAsLong(String key, long defaultValue) {
String sValue = param(key);
if (sValue == null) {
return defaultValue;
}
try {
return Long.parseLong(sValue);
} catch (NumberFormatException e) {
throw new IllegalArgumentException("Failed to parse int parameter [" + key + "] with value [" + sValue + "]", e);
}
}
@Override
public boolean paramAsBoolean(String key, boolean defaultValue) {
return Booleans.parseBoolean(param(key), defaultValue);
}
@Override
public Boolean paramAsBoolean(String key, Boolean defaultValue) {
String sValue = param(key);
if (sValue == null) {
return defaultValue;
}
return !(sValue.equals("false") || sValue.equals("0") || sValue.equals("off"));
}
@Override
public TimeValue paramAsTime(String key, TimeValue defaultValue) {
return parseTimeValue(param(key), defaultValue);
}
@Override
public ByteSizeValue paramAsSize(String key, ByteSizeValue defaultValue) {
return parseBytesSizeValue(param(key), defaultValue);
}
@Override
public String[] paramAsStringArray(String key, String[] defaultValue) {
String value = param(key);
if (value == null) {
return defaultValue;
}
return commaPattern.split(value);
}
}
|
[
"allwefantasy@gmail.com"
] |
allwefantasy@gmail.com
|
0a0a19ad413734a3e3fd066a3e8686b58ef133cd
|
097df92ce1bfc8a354680725c7d10f0d109b5b7d
|
/com/amazon/ws/emr/hadoop/fs/shaded/com/google/common/collect/NullsLastOrdering.java
|
b0b68869dcba801a98ef0b95720da73792829bb7
|
[] |
no_license
|
cozos/emrfs-hadoop
|
7a1a1221ffc3aa8c25b1067cf07d3b46e39ab47f
|
ba5dfa631029cb5baac2f2972d2fdaca18dac422
|
refs/heads/master
| 2022-10-14T15:03:51.500050
| 2022-10-06T05:38:49
| 2022-10-06T05:38:49
| 233,979,996
| 2
| 2
| null | 2022-10-06T05:41:46
| 2020-01-15T02:24:16
|
Java
|
UTF-8
|
Java
| false
| false
| 1,735
|
java
|
package com.amazon.ws.emr.hadoop.fs.shaded.com.google.common.collect;
import com.amazon.ws.emr.hadoop.fs.shaded.com.google.common.annotations.GwtCompatible;
import java.io.Serializable;
import javax.annotation.Nullable;
@GwtCompatible(serializable=true)
final class NullsLastOrdering<T>
extends Ordering<T>
implements Serializable
{
final Ordering<? super T> ordering;
private static final long serialVersionUID = 0L;
NullsLastOrdering(Ordering<? super T> ordering)
{
this.ordering = ordering;
}
public int compare(@Nullable T left, @Nullable T right)
{
if (left == right) {
return 0;
}
if (left == null) {
return 1;
}
if (right == null) {
return -1;
}
return ordering.compare(left, right);
}
public <S extends T> Ordering<S> reverse()
{
return ordering.reverse().nullsFirst();
}
public <S extends T> Ordering<S> nullsFirst()
{
return ordering.nullsFirst();
}
public <S extends T> Ordering<S> nullsLast()
{
return this;
}
public boolean equals(@Nullable Object object)
{
if (object == this) {
return true;
}
if ((object instanceof NullsLastOrdering))
{
NullsLastOrdering<?> that = (NullsLastOrdering)object;
return ordering.equals(ordering);
}
return false;
}
public int hashCode()
{
return ordering.hashCode() ^ 0xC9177248;
}
public String toString()
{
String str = String.valueOf(String.valueOf(ordering));return 12 + str.length() + str + ".nullsLast()";
}
}
/* Location:
* Qualified Name: com.amazon.ws.emr.hadoop.fs.shaded.com.google.common.collect.NullsLastOrdering
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"Arwin.tio@adroll.com"
] |
Arwin.tio@adroll.com
|
0e9cb3420bedb5424a052f435a6a996799e8f706
|
498dd2daff74247c83a698135e4fe728de93585a
|
/clients/google-api-services-games/v1/1.30.1/com/google/api/services/games/model/RoomLeaveRequest.java
|
2c89fb7053fec0980b5ba0065681e540af28bb8f
|
[
"Apache-2.0"
] |
permissive
|
googleapis/google-api-java-client-services
|
0e2d474988d9b692c2404d444c248ea57b1f453d
|
eb359dd2ad555431c5bc7deaeafca11af08eee43
|
refs/heads/main
| 2023-08-23T00:17:30.601626
| 2023-08-20T02:16:12
| 2023-08-20T02:16:12
| 147,399,159
| 545
| 390
|
Apache-2.0
| 2023-09-14T02:14:14
| 2018-09-04T19:11:33
| null |
UTF-8
|
Java
| false
| false
| 6,879
|
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.
*/
/*
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
* Modify at your own risk.
*/
package com.google.api.services.games.model;
/**
* This is a JSON template for a leave room request.
*
* <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
* transmitted over HTTP when working with the Google Play Game Services API. For a detailed
* explanation see:
* <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
* </p>
*
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public final class RoomLeaveRequest extends com.google.api.client.json.GenericJson {
/**
* Uniquely identifies the type of this resource. Value is always the fixed string
* games#roomLeaveRequest.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String kind;
/**
* Diagnostics for a player leaving the room.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private RoomLeaveDiagnostics leaveDiagnostics;
/**
* Reason for leaving the match. Possible values are: - "PLAYER_LEFT" - The player chose to
* leave the room.. - "GAME_LEFT" - The game chose to remove the player from the room. -
* "REALTIME_ABANDONED" - The player switched to another application and abandoned the room. -
* "REALTIME_PEER_CONNECTION_FAILURE" - The client was unable to establish a connection to other
* peer(s). - "REALTIME_SERVER_CONNECTION_FAILURE" - The client was unable to communicate with
* the server. - "REALTIME_SERVER_ERROR" - The client received an error response when it tried to
* communicate with the server. - "REALTIME_TIMEOUT" - The client timed out while waiting for a
* room. - "REALTIME_CLIENT_DISCONNECTING" - The client disconnects without first calling Leave.
* - "REALTIME_SIGN_OUT" - The user signed out of G+ while in the room. - "REALTIME_GAME_CRASHED"
* - The game crashed. - "REALTIME_ROOM_SERVICE_CRASHED" - RoomAndroidService crashed. -
* "REALTIME_DIFFERENT_CLIENT_ROOM_OPERATION" - Another client is trying to enter a room. -
* "REALTIME_SAME_CLIENT_ROOM_OPERATION" - The same client is trying to enter a new room.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String reason;
/**
* Uniquely identifies the type of this resource. Value is always the fixed string
* games#roomLeaveRequest.
* @return value or {@code null} for none
*/
public java.lang.String getKind() {
return kind;
}
/**
* Uniquely identifies the type of this resource. Value is always the fixed string
* games#roomLeaveRequest.
* @param kind kind or {@code null} for none
*/
public RoomLeaveRequest setKind(java.lang.String kind) {
this.kind = kind;
return this;
}
/**
* Diagnostics for a player leaving the room.
* @return value or {@code null} for none
*/
public RoomLeaveDiagnostics getLeaveDiagnostics() {
return leaveDiagnostics;
}
/**
* Diagnostics for a player leaving the room.
* @param leaveDiagnostics leaveDiagnostics or {@code null} for none
*/
public RoomLeaveRequest setLeaveDiagnostics(RoomLeaveDiagnostics leaveDiagnostics) {
this.leaveDiagnostics = leaveDiagnostics;
return this;
}
/**
* Reason for leaving the match. Possible values are: - "PLAYER_LEFT" - The player chose to
* leave the room.. - "GAME_LEFT" - The game chose to remove the player from the room. -
* "REALTIME_ABANDONED" - The player switched to another application and abandoned the room. -
* "REALTIME_PEER_CONNECTION_FAILURE" - The client was unable to establish a connection to other
* peer(s). - "REALTIME_SERVER_CONNECTION_FAILURE" - The client was unable to communicate with
* the server. - "REALTIME_SERVER_ERROR" - The client received an error response when it tried to
* communicate with the server. - "REALTIME_TIMEOUT" - The client timed out while waiting for a
* room. - "REALTIME_CLIENT_DISCONNECTING" - The client disconnects without first calling Leave.
* - "REALTIME_SIGN_OUT" - The user signed out of G+ while in the room. - "REALTIME_GAME_CRASHED"
* - The game crashed. - "REALTIME_ROOM_SERVICE_CRASHED" - RoomAndroidService crashed. -
* "REALTIME_DIFFERENT_CLIENT_ROOM_OPERATION" - Another client is trying to enter a room. -
* "REALTIME_SAME_CLIENT_ROOM_OPERATION" - The same client is trying to enter a new room.
* @return value or {@code null} for none
*/
public java.lang.String getReason() {
return reason;
}
/**
* Reason for leaving the match. Possible values are: - "PLAYER_LEFT" - The player chose to
* leave the room.. - "GAME_LEFT" - The game chose to remove the player from the room. -
* "REALTIME_ABANDONED" - The player switched to another application and abandoned the room. -
* "REALTIME_PEER_CONNECTION_FAILURE" - The client was unable to establish a connection to other
* peer(s). - "REALTIME_SERVER_CONNECTION_FAILURE" - The client was unable to communicate with
* the server. - "REALTIME_SERVER_ERROR" - The client received an error response when it tried to
* communicate with the server. - "REALTIME_TIMEOUT" - The client timed out while waiting for a
* room. - "REALTIME_CLIENT_DISCONNECTING" - The client disconnects without first calling Leave.
* - "REALTIME_SIGN_OUT" - The user signed out of G+ while in the room. - "REALTIME_GAME_CRASHED"
* - The game crashed. - "REALTIME_ROOM_SERVICE_CRASHED" - RoomAndroidService crashed. -
* "REALTIME_DIFFERENT_CLIENT_ROOM_OPERATION" - Another client is trying to enter a room. -
* "REALTIME_SAME_CLIENT_ROOM_OPERATION" - The same client is trying to enter a new room.
* @param reason reason or {@code null} for none
*/
public RoomLeaveRequest setReason(java.lang.String reason) {
this.reason = reason;
return this;
}
@Override
public RoomLeaveRequest set(String fieldName, Object value) {
return (RoomLeaveRequest) super.set(fieldName, value);
}
@Override
public RoomLeaveRequest clone() {
return (RoomLeaveRequest) super.clone();
}
}
|
[
"chingor@google.com"
] |
chingor@google.com
|
b4b2e057cec36bdbca2a60433abfe17cc585ba82
|
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
|
/project_1_1/src/b/i/j/i/Calc_1_1_18981.java
|
e07b12777c245538d1b58a6b3e558257f5b29635
|
[] |
no_license
|
chalstrick/bigRepo1
|
ac7fd5785d475b3c38f1328e370ba9a85a751cff
|
dad1852eef66fcec200df10083959c674fdcc55d
|
refs/heads/master
| 2016-08-11T17:59:16.079541
| 2015-12-18T14:26:49
| 2015-12-18T14:26:49
| 48,244,030
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 134
|
java
|
package b.i.j.i;
public class Calc_1_1_18981 {
/** @return the sum of a and b */
public int add(int a, int b) {
return a+b;
}
}
|
[
"christian.halstrick@sap.com"
] |
christian.halstrick@sap.com
|
01b80d49077fa200fae48148cf838f4e62b2841a
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-13544-9-10-NSGA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/sheet/internal/SheetDocumentDisplayer_ESTest_scaffolding.java
|
63c0029673b024b978709d83b7dc565c3852da18
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 451
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sat Jan 18 23:58:49 UTC 2020
*/
package org.xwiki.sheet.internal;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class SheetDocumentDisplayer_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
b35016986df2079652f7e678aa4a204b64d7cefa
|
c65095e856008f13ee6531b79ff5503c0d88610a
|
/mockserver-junit-jupiter/src/test/java/org/mockserver/junit/jupiter/MockServerExtensionWithMocksTest.java
|
e6826088bbe999435b5be78c1e3ba021a43b9a89
|
[
"Apache-2.0"
] |
permissive
|
micst96/mockserver
|
884783b25474541348eb0027711b537ce93153ea
|
99df09db2dd2c7fe73dd1d7678ed483c53195fb9
|
refs/heads/master
| 2020-09-17T01:28:06.636170
| 2019-12-03T07:07:00
| 2019-12-03T07:07:00
| 223,946,600
| 0
| 0
|
Apache-2.0
| 2019-12-03T07:07:01
| 2019-11-25T12:44:33
| null |
UTF-8
|
Java
| false
| false
| 5,220
|
java
|
package org.mockserver.junit.jupiter;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.api.extension.ExtensionContext;
import org.junit.jupiter.api.extension.ParameterContext;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import org.mockserver.client.MockServerClient;
import org.mockserver.integration.ClientAndServer;
import java.lang.reflect.AnnotatedElement;
import java.lang.reflect.Parameter;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;
import static org.mockito.ArgumentMatchers.anyList;
import static org.mockito.Mockito.*;
@ExtendWith(MockitoExtension.class)
class MockServerExtensionWithMocksTest {
private MockServerExtension subject;
@Mock
private ClientAndServer mockClientAndServerFactory;
@Mock
private ParameterContext mockParameterContext;
@Mock
private Parameter mockParameter;
@Mock
private ExtensionContext mockExtensionContext;
@Mock
private AnnotatedElement mockAnnotatedElement;
@BeforeEach
void setup() {
subject = new MockServerExtension(mockClientAndServerFactory);
}
@Test
void identifiesSupportedParameter() throws Exception {
doReturn(mockParameter).when(mockParameterContext).getParameter();
doReturn(MockServerClient.class).when(mockParameter).getType();
boolean result = subject.supportsParameter(mockParameterContext, null);
assertThat(result, is(true));
}
@Test
void doesNotsupportsRandomParameterType() throws Exception {
doReturn(mockParameter).when(mockParameterContext).getParameter();
doReturn(Object.class).when(mockParameter).getType();
boolean result = subject.supportsParameter(mockParameterContext, null);
assertThat(result, is(false));
}
@Test
void beforeAdd_startsServerWithRandomPort() throws Exception {
Optional<AnnotatedElement> element = Optional.of(mockAnnotatedElement);
MockServerSettings mockServerSettings = mock(MockServerSettings.class);
doReturn(Optional.empty()).when(mockExtensionContext).getParent();
subject.beforeAll(mockExtensionContext);
verify(mockClientAndServerFactory).startClientAndServer(anyList());
}
@Test
void beforeAdd_startsServerWithSpecifiedPorts() throws Exception {
List<Integer> ports = mockServerCreation();
subject.beforeAll(mockExtensionContext);
verify(mockClientAndServerFactory).startClientAndServer(ports);
}
@Test
void beforeAdd_startsPerTestSuiteServer() throws Exception {
List<Integer> ports = mockServerCreation();
ClientAndServer mockServerClient = mock(ClientAndServer.class);
doReturn(mockServerClient).when(mockClientAndServerFactory).startClientAndServer(anyList());
subject.beforeAll(mockExtensionContext);
verify(mockClientAndServerFactory).startClientAndServer(ports);
}
@Test
void resolveParameter_returnsClientInstance() throws Exception {
Optional<AnnotatedElement> element = Optional.of(mockAnnotatedElement);
MockServerSettings mockServerSettings = mock(MockServerSettings.class);
ClientAndServer mockServerClient = mock(ClientAndServer.class);
doReturn(Optional.empty()).when(mockExtensionContext).getParent();
doReturn(mockServerClient).when(mockClientAndServerFactory).startClientAndServer(anyList());
subject.beforeAll(mockExtensionContext);
Object result = subject.resolveParameter(null, null);
assertThat(result, is(equalTo(mockServerClient)));
}
@Test
void afterAll_stopsClientInstance() throws Exception {
Optional<AnnotatedElement> element = Optional.of(mockAnnotatedElement);
MockServerSettings mockServerSettings = mock(MockServerSettings.class);
ClientAndServer mockServerClient = mock(ClientAndServer.class);
doReturn(Optional.empty()).when(mockExtensionContext).getParent();
doReturn(mockServerClient).when(mockClientAndServerFactory).startClientAndServer(anyList());
doReturn(true).when(mockServerClient).isRunning();
subject.beforeAll(mockExtensionContext);
subject.afterAll(null);
verify(mockServerClient).stop();
}
private List<Integer> mockServerCreation() {
List<Integer> ports = Arrays.asList(5555, 4444);
Optional<AnnotatedElement> element = Optional.of(mockAnnotatedElement);
MockServerSettings mockServerSettings = mock(MockServerSettings.class);
doReturn(ports.stream().mapToInt(Integer::intValue).toArray()).when(mockServerSettings).ports();
doReturn(true).when(mockServerSettings).perTestSuite();
doReturn(mockServerSettings).when(mockAnnotatedElement).getDeclaredAnnotation(MockServerSettings.class);
doReturn(element).when(mockExtensionContext).getElement();
doReturn(Optional.empty()).when(mockExtensionContext).getParent();
return ports;
}
}
|
[
"733179+jamesdbloom@users.noreply.github.com"
] |
733179+jamesdbloom@users.noreply.github.com
|
fdaba72cb67e0c305d438e2235a0c5a4af3ed501
|
231a828518021345de448c47c31f3b4c11333d0e
|
/src/pdf/bouncycastle/crypto/commitments/GeneralHashCommitter.java
|
8d3379d8bc51a367544e95387cdd92745478c607
|
[] |
no_license
|
Dynamit88/PDFBox-Java
|
f39b96b25f85271efbb3a9135cf6a15591dec678
|
480a576bc97fc52299e1e869bb80a1aeade67502
|
refs/heads/master
| 2020-05-24T14:58:29.287880
| 2019-05-18T04:25:21
| 2019-05-18T04:25:21
| 187,312,933
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,120
|
java
|
package pdf.bouncycastle.crypto.commitments;
import java.security.SecureRandom;
import pdf.bouncycastle.crypto.Commitment;
import pdf.bouncycastle.crypto.Committer;
import pdf.bouncycastle.crypto.DataLengthException;
import pdf.bouncycastle.crypto.Digest;
import pdf.bouncycastle.crypto.ExtendedDigest;
import pdf.bouncycastle.util.Arrays;
/**
* A basic hash-committer based on the one described in "Making Mix Nets Robust for Electronic Voting by Randomized Partial Checking",
* by Jakobsson, Juels, and Rivest (11th Usenix Security Symposium, 2002).
* <p>
* The algorithm used by this class differs from the one given in that it includes the length of the message in the hash calculation.
* </p>
*/
public class GeneralHashCommitter
implements Committer
{
private final Digest digest;
private final int byteLength;
private final SecureRandom random;
/**
* Base Constructor. The maximum message length that can be committed to is half the length of the internal
* block size for the digest (ExtendedDigest.getBlockLength()).
*
* @param digest digest to use for creating commitments.
* @param random source of randomness for generating secrets.
*/
public GeneralHashCommitter(ExtendedDigest digest, SecureRandom random)
{
this.digest = digest;
this.byteLength = digest.getByteLength();
this.random = random;
}
/**
* Generate a commitment for the passed in message.
*
* @param message the message to be committed to,
* @return a Commitment
*/
public Commitment commit(byte[] message)
{
if (message.length > byteLength / 2)
{
throw new DataLengthException("Message to be committed to too large for digest.");
}
byte[] w = new byte[byteLength - message.length];
random.nextBytes(w);
return new Commitment(w, calculateCommitment(w, message));
}
/**
* Return true if the passed in commitment represents a commitment to the passed in message.
*
* @param commitment a commitment previously generated.
* @param message the message that was expected to have been committed to.
* @return true if commitment matches message, false otherwise.
*/
public boolean isRevealed(Commitment commitment, byte[] message)
{
if (message.length + commitment.getSecret().length != byteLength)
{
throw new DataLengthException("Message and witness secret lengths do not match.");
}
byte[] calcCommitment = calculateCommitment(commitment.getSecret(), message);
return Arrays.constantTimeAreEqual(commitment.getCommitment(), calcCommitment);
}
private byte[] calculateCommitment(byte[] w, byte[] message)
{
byte[] commitment = new byte[digest.getDigestSize()];
digest.update(w, 0, w.length);
digest.update(message, 0, message.length);
digest.update((byte)((message.length >>> 8)));
digest.update((byte)(message.length));
digest.doFinal(commitment, 0);
return commitment;
}
}
|
[
"vtuse@mail.ru"
] |
vtuse@mail.ru
|
2c11d002c74010cbe214a4e31c5ef28f5ffbe00c
|
be59c0ca127a4f7041758b2709e1327bc71b6e12
|
/qipai/game-zp-xx2710/src/main/java/com/sy599/game/qipai/xx2710/constant/PaohzCard.java
|
a7e5617e74ab046d6671aa5980a9cda401c1e852
|
[] |
no_license
|
Yiwei-TEST/xxqp-server
|
2389dd6b12614b0a9557d59b473f88a3a59620cf
|
c2c683ce8060c0cbaee86c3ee550e0195e1bb7e4
|
refs/heads/main
| 2023-08-14T08:49:37.586893
| 2021-09-15T03:21:13
| 2021-09-15T03:21:13
| 401,583,086
| 1
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,742
|
java
|
package com.sy599.game.qipai.xx2710.constant;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public enum PaohzCard {
phz1(1, 1), phz2(2, 2), phz3(3, 3), phz4(4, 4), phz5(5, 5), phz6(6, 6), phz7(7, 7), phz8(8, 8), phz9(9, 9), phz10(10, 10),
phz11(11, 1), phz12(12, 2), phz13(13, 3), phz14(14, 4), phz15(15, 5), phz16(16, 6), phz17(17, 7), phz18(18, 8), phz19(19, 9), phz20(20, 10),
phz21(21, 1), phz22(22, 2), phz23(23, 3), phz24(24, 4), phz25(25, 5), phz26(26, 6), phz27(27, 7), phz28(28, 8), phz29(29, 9), phz30(30, 10),
phz31(31, 1), phz32(32, 2), phz33(33, 3), phz34(34, 4), phz35(35, 5), phz36(36, 6), phz37(37, 7), phz38(38, 8), phz39(39, 9), phz40(40, 10),
phz41(41, 101), phz42(42, 102), phz43(43, 103), phz44(44, 104), phz45(45, 105), phz46(46, 106), phz47(47, 107), phz48(48, 108), phz49(49, 109), phz50(50, 110),
phz51(51, 101), phz52(52, 102), phz53(53, 103), phz54(54, 104), phz55(55, 105), phz56(56, 106), phz57(57, 107), phz58(58, 108), phz59(59, 109), phz60(60, 110),
phz61(61, 101), phz62(62, 102), phz63(63, 103), phz64(64, 104), phz65(65, 105), phz66(66, 106), phz67(67, 107), phz68(68, 108), phz69(69, 109), phz70(70, 110),
phz71(71, 101), phz72(72, 102), phz73(73, 103), phz74(74, 104), phz75(75, 105), phz76(76, 106), phz77(77, 107), phz78(78, 108), phz79(79, 109), phz80(80, 110),
phz81(81,0),phz82(82,0),phz83(83,0),phz84(84,0),
//85的作用是在检测胡牌的时候加入牌组,可以组成33一句话,不会有对子,最后结束的时候再删除,
//85的作用是在检测听牌的时候加入牌组,替代任意卡牌,看是否可胡牌。
phz85(85,0),phz86(86,0);
private int id;
private int val;
PaohzCard(int id, int val) {
this.id = id;
this.val = val;
}
public int getId() {
return id;
}
public int getVal() {
return val;
}
public boolean isBig() {
return val > 100;
}
/**
* 如果是大牌 返回同值小牌 如果是小牌 返回同值大牌
*
* @return
*/
public int getOtherVal() {
if (isBig()) {
return getPai();
} else {
return 100 + getPai();
}
}
public int getPai() {
return val % 100;
}
public int getCase() {
if (isBig()) {
return 100;
} else {
return 0;
}
}
static List<Integer> hongVal = Arrays.asList(2, 7, 10,102,107,110);
public static boolean isHongpai(int v){
return hongVal.contains(v);
}
public static PaohzCard getPaohzCard(int id) {
if (id == 0) {
return null;
}
return PaohzCard.valueOf(PaohzCard.class, "phz" + id);
}
public static void main(String[] args) {
// prinl();
System.out.println(114 % 100);
}
private static void prinl() {
int k = 1;
for (int i = 1; i <= 8; i++) {
for (int j = 1; j <= 10; j++) {
if (i <= 4) {
System.out.println("phz" + k + "(" + k + "," + j + "),");
} else {
System.out.println("phz" + k + "(" + k + "," + (100 + j) + "),");
}
k++;
}
}
}
public static final String[] xiao_zi= {"一","二","三","四","五","六","七","八","九","十"};
public static final String[] da_zi= {"壹","贰","叁","肆","伍","陆","柒","捌","玖","拾"};
public String toString(){
if(getVal() == 0){
return "王";
}else if(getVal()>100){
return da_zi[getVal()%100-1];
}else if(getVal() <= 10&&getVal() > 0){
return xiao_zi[getVal()-1];
}else {
return "";
}
}
public static List<PaohzCard> getPaohzCardsByVal(int val) {
List<PaohzCard> cards=new ArrayList<>();
if (val >=1&&val<=10) {
for (int i = 0; i < 4; i++) {
cards.add(getPaohzCard(val+10*i));
}
}
if (val >=101&&val<=110) {
for (int i = 0; i < 4; i++) {
cards.add(getPaohzCard(val%100+10*i+40));
}
}
return cards;
}
}
|
[
"ee68i5@yeah.net"
] |
ee68i5@yeah.net
|
d601b30712ca8fe49b923d8b4d5b92773e4d5723
|
6635387159b685ab34f9c927b878734bd6040e7e
|
/src/com/google/android/gms/maps/UiSettings.java
|
c8ea90dc1ee584f0bb06d4b1bd713f10902dce39
|
[] |
no_license
|
RepoForks/com.snapchat.android
|
987dd3d4a72c2f43bc52f5dea9d55bfb190966e2
|
6e28a32ad495cf14f87e512dd0be700f5186b4c6
|
refs/heads/master
| 2021-05-05T10:36:16.396377
| 2015-07-16T16:46:26
| 2015-07-16T16:46:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,829
|
java
|
package com.google.android.gms.maps;
import android.os.RemoteException;
import com.google.android.gms.maps.internal.IUiSettingsDelegate;
import com.google.android.gms.maps.model.RuntimeRemoteException;
public final class UiSettings
{
private final IUiSettingsDelegate zzaqL;
UiSettings(IUiSettingsDelegate paramIUiSettingsDelegate)
{
zzaqL = paramIUiSettingsDelegate;
}
public final boolean isCompassEnabled()
{
try
{
boolean bool = zzaqL.isCompassEnabled();
return bool;
}
catch (RemoteException localRemoteException)
{
throw new RuntimeRemoteException(localRemoteException);
}
}
public final boolean isIndoorLevelPickerEnabled()
{
try
{
boolean bool = zzaqL.isIndoorLevelPickerEnabled();
return bool;
}
catch (RemoteException localRemoteException)
{
throw new RuntimeRemoteException(localRemoteException);
}
}
public final boolean isMapToolbarEnabled()
{
try
{
boolean bool = zzaqL.isMapToolbarEnabled();
return bool;
}
catch (RemoteException localRemoteException)
{
throw new RuntimeRemoteException(localRemoteException);
}
}
public final boolean isMyLocationButtonEnabled()
{
try
{
boolean bool = zzaqL.isMyLocationButtonEnabled();
return bool;
}
catch (RemoteException localRemoteException)
{
throw new RuntimeRemoteException(localRemoteException);
}
}
public final boolean isRotateGesturesEnabled()
{
try
{
boolean bool = zzaqL.isRotateGesturesEnabled();
return bool;
}
catch (RemoteException localRemoteException)
{
throw new RuntimeRemoteException(localRemoteException);
}
}
public final boolean isScrollGesturesEnabled()
{
try
{
boolean bool = zzaqL.isScrollGesturesEnabled();
return bool;
}
catch (RemoteException localRemoteException)
{
throw new RuntimeRemoteException(localRemoteException);
}
}
public final boolean isTiltGesturesEnabled()
{
try
{
boolean bool = zzaqL.isTiltGesturesEnabled();
return bool;
}
catch (RemoteException localRemoteException)
{
throw new RuntimeRemoteException(localRemoteException);
}
}
public final boolean isZoomControlsEnabled()
{
try
{
boolean bool = zzaqL.isZoomControlsEnabled();
return bool;
}
catch (RemoteException localRemoteException)
{
throw new RuntimeRemoteException(localRemoteException);
}
}
public final boolean isZoomGesturesEnabled()
{
try
{
boolean bool = zzaqL.isZoomGesturesEnabled();
return bool;
}
catch (RemoteException localRemoteException)
{
throw new RuntimeRemoteException(localRemoteException);
}
}
public final void setAllGesturesEnabled(boolean paramBoolean)
{
try
{
zzaqL.setAllGesturesEnabled(paramBoolean);
return;
}
catch (RemoteException localRemoteException)
{
throw new RuntimeRemoteException(localRemoteException);
}
}
public final void setCompassEnabled(boolean paramBoolean)
{
try
{
zzaqL.setCompassEnabled(paramBoolean);
return;
}
catch (RemoteException localRemoteException)
{
throw new RuntimeRemoteException(localRemoteException);
}
}
public final void setIndoorLevelPickerEnabled(boolean paramBoolean)
{
try
{
zzaqL.setIndoorLevelPickerEnabled(paramBoolean);
return;
}
catch (RemoteException localRemoteException)
{
throw new RuntimeRemoteException(localRemoteException);
}
}
public final void setMapToolbarEnabled(boolean paramBoolean)
{
try
{
zzaqL.setMapToolbarEnabled(paramBoolean);
return;
}
catch (RemoteException localRemoteException)
{
throw new RuntimeRemoteException(localRemoteException);
}
}
public final void setMyLocationButtonEnabled(boolean paramBoolean)
{
try
{
zzaqL.setMyLocationButtonEnabled(paramBoolean);
return;
}
catch (RemoteException localRemoteException)
{
throw new RuntimeRemoteException(localRemoteException);
}
}
public final void setRotateGesturesEnabled(boolean paramBoolean)
{
try
{
zzaqL.setRotateGesturesEnabled(paramBoolean);
return;
}
catch (RemoteException localRemoteException)
{
throw new RuntimeRemoteException(localRemoteException);
}
}
public final void setScrollGesturesEnabled(boolean paramBoolean)
{
try
{
zzaqL.setScrollGesturesEnabled(paramBoolean);
return;
}
catch (RemoteException localRemoteException)
{
throw new RuntimeRemoteException(localRemoteException);
}
}
public final void setTiltGesturesEnabled(boolean paramBoolean)
{
try
{
zzaqL.setTiltGesturesEnabled(paramBoolean);
return;
}
catch (RemoteException localRemoteException)
{
throw new RuntimeRemoteException(localRemoteException);
}
}
public final void setZoomControlsEnabled(boolean paramBoolean)
{
try
{
zzaqL.setZoomControlsEnabled(paramBoolean);
return;
}
catch (RemoteException localRemoteException)
{
throw new RuntimeRemoteException(localRemoteException);
}
}
public final void setZoomGesturesEnabled(boolean paramBoolean)
{
try
{
zzaqL.setZoomGesturesEnabled(paramBoolean);
return;
}
catch (RemoteException localRemoteException)
{
throw new RuntimeRemoteException(localRemoteException);
}
}
}
/* Location:
* Qualified Name: com.google.android.gms.maps.UiSettings
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
8132ac5a0ade979db86d710722be05c08189e5a5
|
6e85b4cade8d08ce50ef68c2bb6e57ca2b80dcca
|
/src/com/moveit/server/seo/PakkeTransportBody.java
|
fbe52c9cdd547b5dcbfb13db919cbf7efa0d907b
|
[] |
no_license
|
jonasgreen/24moveit
|
fc40cbfa8362ea0039ea91d2e67de9b235cf8d0c
|
fafc8f58899ee1ed204ca5cac8ed9be0a419dee9
|
refs/heads/master
| 2021-01-23T02:41:19.195993
| 2012-08-16T15:49:17
| 2012-08-16T15:49:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 331
|
java
|
package com.moveit.server.seo;
/**
*
*/
public class PakkeTransportBody extends DanishBody{
public String[] getSpecificLinks() {
return new String[0]; //To change body of implemented methods use File | Settings | File Templates.
}
public String getWordPhrase() {
return "pakketransport";
}
}
|
[
"jonasgreen12345@gmail.com"
] |
jonasgreen12345@gmail.com
|
f02c0ee468c64bcbc541a31d61ab355523e0a50b
|
946b4cde6576fea0bde3c064982d9220a2c618fa
|
/dandelion-core/src/main/java/com/github/dandelion/core/asset/processor/impl/JsMinProcessor.java
|
86d1dc64851a9e14ead2c7704d3958ae888c5ba2
|
[
"BSD-3-Clause"
] |
permissive
|
EvgeniGordeev/dandelion
|
13226181c269096715d91f18b80a6db8098fc5a2
|
58517ca0ebd4635ed5e3f5372d4e4b0dd909eae6
|
refs/heads/master
| 2020-12-14T07:30:15.371294
| 2014-10-29T16:45:00
| 2014-10-29T16:45:00
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,013
|
java
|
/*
* [The "BSD licence"]
* Copyright (c) 2013-2014 Dandelion
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of Dandelion nor 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 AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package com.github.dandelion.core.asset.processor.impl;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Reader;
import java.io.Writer;
import com.github.dandelion.core.asset.AssetType;
import com.github.dandelion.core.asset.processor.CompatibleAssetType;
import com.github.dandelion.core.asset.processor.ProcessingContext;
import com.github.dandelion.core.asset.processor.spi.AbstractAssetProcessor;
import com.github.dandelion.core.asset.processor.vendor.JSMin;
import com.github.dandelion.core.utils.ReaderInputStream;
import com.github.dandelion.core.utils.WriterOutputStream;
/**
* <p>
* JS processor based on the {@link JSMin} implementation.
*
* @author Thibault Duchateau
* @since 0.10.0
*/
@CompatibleAssetType(types = AssetType.js)
public class JsMinProcessor extends AbstractAssetProcessor {
/**
* {@inheritDoc}
*/
@Override
public String getProcessorKey() {
return "jsmin";
}
/**
* {@inheritDoc}
*/
@Override
public void doProcess(Reader reader, Writer writer, ProcessingContext processingContext) throws Exception {
InputStream is = new ReaderInputStream(reader, processingContext.getContext().getConfiguration()
.getAssetProcessorEncoding());
OutputStream os = new WriterOutputStream(writer, processingContext.getContext().getConfiguration()
.getAssetProcessorEncoding());
try {
new JSMin(is, os).jsmin();
}
catch (Exception e) {
throw e;
}
finally {
is.close();
os.close();
}
}
}
|
[
"thibault.duchateau@gmail.com"
] |
thibault.duchateau@gmail.com
|
b1df4c58edea470e104575579950fbc696161f7f
|
e15d7d0a2dc15998ba32de8ba0dbb2e515068f92
|
/SIG_HDP_Master/SIG_HDP_Master-ejb/src/java/sessao/GrlCentroHospitalarFacade.java
|
b23429edb261463544ee0538c158d11ff04f7a8c
|
[] |
no_license
|
Projecto2/PFII
|
2e004c9010478edb64aa9192dcb060d1f46d8a4a
|
d21eb80fde87340c8ce34459966e0b8c0d2b6fa2
|
refs/heads/master
| 2021-09-09T14:00:07.955077
| 2018-03-16T19:09:58
| 2018-03-16T19:09:58
| 125,555,909
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,735
|
java
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package sessao;
import entidade.GrlCentroHospitalar;
import java.util.List;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;
/**
*
* @author Ornela F. Boaventura
*/
@Stateless
public class GrlCentroHospitalarFacade extends AbstractFacade<GrlCentroHospitalar>
{
@PersistenceContext(unitName = "SIG_HDP_Master-ejbPU")
private EntityManager em;
@Override
protected EntityManager getEntityManager ()
{
return em;
}
public GrlCentroHospitalarFacade ()
{
super(GrlCentroHospitalar.class);
}
public GrlCentroHospitalar findCentroHospitalarDivina ()
{
Query t = em.createQuery("SELECT c FROM GrlCentroHospitalar c WHERE c.codigoCentro = 'HDP' OR c.fkIdInstituicao.codigoInstituicao = 'HDP'", GrlCentroHospitalar.class);
List<GrlCentroHospitalar> resultado = t.getResultList();
return resultado.isEmpty() ? null : resultado.get(0);
}
public List<GrlCentroHospitalar> findCentroHospitalar (GrlCentroHospitalar centro)
{
String query = constroiQuery(centro);
Query t = em.createQuery(query, GrlCentroHospitalar.class);
if (centro.getFkIdInstituicao().getCodigoInstituicao() != null && !centro.getFkIdInstituicao().getCodigoInstituicao().trim().isEmpty())
{
t.setParameter("sigla", centro.getFkIdInstituicao().getCodigoInstituicao() + "%");
}
if (centro.getFkIdInstituicao().getDescricao() != null && !centro.getFkIdInstituicao().getDescricao().trim().isEmpty())
{
t.setParameter("descricao", centro.getFkIdInstituicao().getDescricao()+ "%");
}
List<GrlCentroHospitalar> resultado = t.getResultList();
return resultado;
}
public String constroiQuery (GrlCentroHospitalar centro)
{
String query = "SELECT c FROM GrlCentroHospitalar c WHERE c.pkIdCentro = c.pkIdCentro";
if (centro.getFkIdInstituicao().getCodigoInstituicao() != null && !centro.getFkIdInstituicao().getCodigoInstituicao().trim().isEmpty())
{
query += " AND c.fkIdInstituicao.codigoInstituicao LIKE :sigla";
}
if (centro.getFkIdInstituicao().getDescricao() != null && !centro.getFkIdInstituicao().getDescricao().trim().isEmpty())
{
query += " AND c.fkIdInstituicao.descricao LIKE :descricao";
}
query += " ORDER BY c.fkIdInstituicao.descricao";
return query;
}
}
|
[
"amed@AMED-PC"
] |
amed@AMED-PC
|
ca9469a2a75a4566ea6373b8fdc5099cbb47b7af
|
eca4a253fe0eba19f60d28363b10c433c57ab7a1
|
/apps/jacob.heccadmin/java/jacob/event/ui/project/ProjectFilterSelectedAdminGroupsButton.java
|
c492eb69976cf042642f84e59dac0eef885f96b6
|
[] |
no_license
|
freegroup/Open-jACOB
|
632f20575092516f449591bf6f251772f599e5fc
|
84f0a6af83876bd21c453132ca6f98a46609f1f4
|
refs/heads/master
| 2021-01-10T11:08:03.604819
| 2015-05-25T10:25:49
| 2015-05-25T10:25:49
| 36,183,560
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,475
|
java
|
/*
* jACOB event handler created with the jACOB Application Designer
*
* Created on Tue Jan 20 14:27:10 CET 2009
*/
package jacob.event.ui.project;
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
import de.tif.jacob.core.data.IDataAccessor;
import de.tif.jacob.core.data.IDataTable;
import de.tif.jacob.core.data.IDataTableRecord;
import de.tif.jacob.screen.IClientContext;
import de.tif.jacob.screen.IGroup;
import de.tif.jacob.screen.IGuiElement;
import de.tif.jacob.screen.IMutableListBox;
import de.tif.jacob.screen.event.IButtonEventHandler;
import jacob.common.AppLogger;
import jacob.model.Projectadmingroup;
import org.apache.commons.logging.Log;
import com.hecc.jacob.util.ListBoxUtil;
/**
* The event handler for the ProjectFilterSelectedAdminGroupsButton generic button.<br>
* The {@link #onClick(IClientContext, IGuiElement)} will be called, if the user clicks on this button.<br>
*
* @author R.Spoor
*/
public class ProjectFilterSelectedAdminGroupsButton extends IButtonEventHandler
{
static public final transient String RCS_ID = "$Id: ProjectFilterSelectedAdminGroupsButton.java,v 1.1 2009/02/17 15:23:29 R.Spoor Exp $";
static public final transient String RCS_REV = "$Revision: 1.1 $";
/**
* Use this logger to write messages and NOT the <code>System.out.println(..)</code> ;-)
*/
static private final transient Log logger = AppLogger.getLogger();
static void filterSelectedGroups(IClientContext context) throws Exception
{
IGroup group = context.getGroup();
String filter = group.getInputFieldValue("projectFilterSelectedAdminGroupsText");
IMutableListBox selected = (IMutableListBox)group.findByName("projectSelectedAdminGroupsListbox");
Map<String,IDataTableRecord> contents = ListBoxUtil.getContents(context, selected);
if (contents == null)
{
return;
}
selected.setOptions(new String[0]);
IDataAccessor accessor = context.getDataAccessor().newAccessor();
IDataTable table = accessor.getTable(Projectadmingroup.NAME);
table.qbeClear();
table.qbeSetValue(Projectadmingroup.name, filter);
int count = table.search();
Set<String> groups = new TreeSet<String>();
for (int i = 0; i < count; i++)
{
IDataTableRecord record = table.getRecord(i);
String groupname = record.getStringValue(Projectadmingroup.name);
if (contents.containsKey(groupname))
{
groups.add(groupname);
}
}
String[] entries = new String[groups.size()];
selected.setOptions(groups.toArray(entries));
}
/**
* The user has clicked on the corresponding button.<br>
* Be in mind: The <code>currentRecord</code> can be <code>null</code>,<br>
* if the button has not the [selected] flag.<br>
* The selected flag assures that the event can only be fired,<br>
* if <code>selectedRecord!=null</code>.<br>
*
* @param context The current client context
* @param emitter The corresponding button to this event handler
*/
@Override
public void onClick(IClientContext context, IGuiElement emitter) throws Exception
{
filterSelectedGroups(context);
}
/**
* The status of the parent group (TableAlias) has been changed.<br>
* <br>
* This is a good place to enable/disable the button on relation to the
* group state or the selected record.<br>
* <br>
* Possible values for the different states are defined in IGuiElement<br>
* <ul>
* <li>IGuiElement.UPDATE</li>
* <li>IGuiElement.NEW</li>
* <li>IGuiElement.SEARCH</li>
* <li>IGuiElement.SELECTED</li>
* </ul>
*
* Be in mind: The <code>currentRecord</code> can be <code>null</code>,<br>
* if the button has not the [selected] flag.<br>
* The selected flag assures that the event can only be fired,<br>
* if <code>selectedRecord!=null</code>.<br>
*
* @param context The current client context
* @param status The new group state. The group is the parent of the corresponding event button.
* @param emitter The corresponding button to this event handler
*/
@Override
public void onGroupStatusChanged(IClientContext context, IGuiElement.GroupState status, IGuiElement emitter) throws Exception
{
emitter.setEnable(status == IGuiElement.UPDATE || status == IGuiElement.NEW);
}
}
|
[
"a.herz@freegroup.de"
] |
a.herz@freegroup.de
|
dabcae99ffb0430ea630ec9d436c6f0d95e27753
|
1a32d704493deb99d3040646afbd0f6568d2c8e7
|
/BOOT-INF/lib/ch/qos/logback/core/spi/LogbackLock.java
|
a8e2f7d7d591381b35c5515e69bf4a174a9d3731
|
[] |
no_license
|
yanrumei/bullet-zone-server-2.0
|
e748ff40f601792405143ec21d3f77aa4d34ce69
|
474c4d1a8172a114986d16e00f5752dc019cdcd2
|
refs/heads/master
| 2020-05-19T11:16:31.172482
| 2019-03-25T17:38:31
| 2019-03-25T17:38:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 295
|
java
|
package ch.qos.logback.core.spi;
public class LogbackLock {}
/* Location: C:\Users\ikatwal\Downloads\bullet-zone-server-2.0.jar!\BOOT-INF\lib\logback-core-1.1.11.jar!\ch\qos\logback\core\spi\LogbackLock.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"ishankatwal@gmail.com"
] |
ishankatwal@gmail.com
|
885581e89f6071c33aeacfee7c90553e0a6259be
|
c8655251bb853a032ab7db6a9b41c13241565ff6
|
/jframe-utils/src/main/java/com/alipay/api/response/AlipayMicropayOrderGetResponse.java
|
b1a19ed3d8ef6b85774fe0c4717633d87ecd15ff
|
[] |
no_license
|
jacksonrick/JFrame
|
3b08880d0ad45c9b12e335798fc1764c9b01756b
|
d9a4a9b17701eb698b957e47fa3f30c6cb8900ac
|
refs/heads/master
| 2021-07-22T21:13:22.548188
| 2017-11-03T06:49:44
| 2017-11-03T06:49:44
| 107,761,091
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 815
|
java
|
package com.alipay.api.response;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.domain.MicroPayOrderDetail;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.micropay.order.get response.
*
* @author auto create
* @since 1.0, 2016-06-06 17:49:51
*/
public class AlipayMicropayOrderGetResponse extends AlipayResponse {
private static final long serialVersionUID = 8785796375246514763L;
/**
* 冻结订单详情
*/
@ApiField("micro_pay_order_detail")
private MicroPayOrderDetail microPayOrderDetail;
public void setMicroPayOrderDetail(MicroPayOrderDetail microPayOrderDetail) {
this.microPayOrderDetail = microPayOrderDetail;
}
public MicroPayOrderDetail getMicroPayOrderDetail( ) {
return this.microPayOrderDetail;
}
}
|
[
"809573150@qq.com"
] |
809573150@qq.com
|
a6cf50501e268ca4825b1fb6c96d2b2d23084c20
|
55772968632fd7b61132586a1d0ffc8d4ea91af2
|
/src/main/java/mcjty/rftools/blocks/shaper/ComposerBlock.java
|
02779c15d8b5863c55c5ba1c4dacf90ab2ddfea1
|
[
"MIT"
] |
permissive
|
josephcsible/RFTools
|
1a9538b3f7e4915d2dd74070851a51edb1e0d2e8
|
9e6a1c857bca293556f11bf81c3cbdc9ba6f2694
|
refs/heads/1.11
| 2022-01-22T17:16:36.926180
| 2017-10-30T03:54:41
| 2017-10-30T03:54:41
| 108,946,093
| 0
| 0
| null | 2017-10-31T04:39:54
| 2017-10-31T04:39:54
| null |
UTF-8
|
Java
| false
| false
| 1,730
|
java
|
package mcjty.rftools.blocks.shaper;
import mcjty.lib.container.GenericGuiContainer;
import mcjty.rftools.RFTools;
import mcjty.rftools.blocks.GenericRFToolsBlock;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import org.lwjgl.input.Keyboard;
import java.util.List;
public class ComposerBlock extends GenericRFToolsBlock<ComposerTileEntity, ComposerContainer> /*, IRedstoneConnectable */ {
public ComposerBlock() {
super(Material.IRON, ComposerTileEntity.class, ComposerContainer.class, "composer", true);
}
@SideOnly(Side.CLIENT)
@Override
public void addInformation(ItemStack itemStack, EntityPlayer player, List<String> list, boolean whatIsThis) {
super.addInformation(itemStack, player, list, whatIsThis);
if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) {
list.add(TextFormatting.WHITE + "This block can construct more complex");
list.add(TextFormatting.WHITE + "shape cards for the Builder or Shield");
list.add(TextFormatting.WHITE + "by creating combinations of other shape");
list.add(TextFormatting.WHITE + "cards");
} else {
list.add(TextFormatting.WHITE + RFTools.SHIFT_MESSAGE);
}
}
@SideOnly(Side.CLIENT)
@Override
public Class<? extends GenericGuiContainer> getGuiClass() {
return GuiComposer.class;
}
@Override
public int getGuiID() {
return RFTools.GUI_COMPOSER;
}
}
|
[
"mcjty1@gmail.com"
] |
mcjty1@gmail.com
|
20e95c23d95f49b63edd3a1c54fe27bf00ab2265
|
a45370080882f3c11d6a7dfc8fd83c0ee5eeb36a
|
/src/main/java/org/minimalj/frontend/Frontend.java
|
99cfd2ed16440240af6f64595398247de4201318
|
[] |
no_license
|
arnzel/minimal-j
|
2b4cf8efdbeece1b4d7e0ff9aa52bdaf472193f3
|
89049f1c0836bcdcf0b4bdc77b7db178d2f46976
|
refs/heads/master
| 2021-01-18T08:44:02.868836
| 2016-02-07T14:12:59
| 2016-02-07T14:12:59
| 51,391,216
| 0
| 0
| null | 2016-02-09T19:03:07
| 2016-02-09T19:03:07
| null |
UTF-8
|
Java
| false
| false
| 6,319
|
java
|
package org.minimalj.frontend;
import java.util.Collections;
import java.util.List;
import java.util.function.Function;
import org.minimalj.frontend.action.Action;
import org.minimalj.frontend.page.IDialog;
import org.minimalj.frontend.page.Page;
import org.minimalj.frontend.page.PageManager;
import org.minimalj.model.Rendering;
import org.minimalj.security.Subject;
/**
* To provide a new kind (Xy) of client you have to implement two things:
* <OL>
* <LI>This class, like XyFrontend</LI>
* <LI>Some kind of XyApplication with a main. The XyApplication should take an instance of Application and
* start the client. Take a look at the existing SwingFrontend, JsonFrontend or LanternaFrontend. The trickiest part will be to implement
* the PageManager.</LI>
* </OL>
*
*/
public abstract class Frontend {
private static Frontend instance;
public static Frontend getInstance() {
if (instance == null) {
throw new IllegalStateException("Frontend has to be initialized");
}
return instance;
}
public static synchronized void setInstance(Frontend frontend) {
if (Frontend.instance != null) {
throw new IllegalStateException("Frontend cannot be changed");
}
if (frontend == null) {
throw new IllegalArgumentException("Frontend cannot be null");
}
Frontend.instance = frontend;
}
public static boolean isAvailable() {
return Frontend.instance != null;
}
/**
* Components are the smallest part of the gui. Things like textfields
* and comboboxes. A form is filled with components.
*/
public interface IComponent {
}
public interface Input<T> extends IComponent {
public void setValue(T value);
public T getValue();
public void setEditable(boolean editable);
}
public interface PasswordField extends Input<char[]> {
}
// http://www.w3schools.com/html/html_form_input_types.asp
public enum InputType { FREE, EMAIL, URL, TEL, NUMBER; }
public abstract IComponent createText(String string);
public abstract IComponent createText(Action action);
public abstract IComponent createText(Rendering rendering);
public abstract IComponent createTitle(String string);
public abstract Input<String> createReadOnlyTextField();
public abstract Input<String> createTextField(int maxLength, String allowedCharacters, InputType inputType, Search<String> suggestionSearch, InputComponentListener changeListener);
public abstract Input<String> createAreaField(int maxLength, String allowedCharacters, InputComponentListener changeListener);
public abstract PasswordField createPasswordField(InputComponentListener changeListener, int maxLength);
public abstract IList createList(Action... actions);
public abstract <T> Input<T> createComboBox(List<T> object, InputComponentListener changeListener);
public abstract Input<Boolean> createCheckBox(InputComponentListener changeListener, String text);
public enum Size { SMALL, MEDIUM, LARGE };
public abstract Input<byte[]> createImage(Size size, InputComponentListener changeListener);
public interface IList extends IComponent {
/**
* @param enabled if false no content should be shown (or
* only in gray) and all actions must get disabled
*/
public void setEnabled(boolean enabled);
public void clear();
public void add(IComponent component, Action... actions);
}
public interface InputComponentListener {
void changed(IComponent source);
}
public interface Search<S> {
public List<S> search(String query);
}
public abstract <T> Input<T> createLookup(InputComponentListener changeListener, Search<T> index, Object[] keys);
public abstract IComponent createComponentGroup(IComponent... components);
/**
* Content means the content of a dialog or of a page
*/
public interface IContent {
}
public interface FormContent extends IContent {
public void add(IComponent component);
public void add(String caption, IComponent component, int span);
public void setValidationMessages(IComponent component, List<String> validationMessages);
}
public abstract FormContent createFormContent(int columns, int columnWidth);
public interface SwitchContent extends IContent {
public void show(IContent content);
}
public abstract SwitchContent createSwitchContent();
public interface ITable<T> extends IContent {
public void setObjects(List<T> objects);
}
public static interface TableActionListener<U> {
public default void selectionChanged(U selectedObject, List<U> selectedObjects) {
}
public default void action(U selectedObject) {
}
public default List<Action> getActions(U selectedObject, List<U> selectedObjects) {
return Collections.emptyList();
}
}
public abstract <T> ITable<T> createTable(Object[] keys, TableActionListener<T> listener);
public abstract IContent createHtmlContent(String htmlOrUrl);
//
public Subject getSubject() {
return getPageManager() != null ? getPageManager().getSubject() : null;
}
public void setSubject(Subject subject) {
getPageManager().setSubject(subject);
}
//
public abstract PageManager getPageManager();
//
public <INPUT, RESULT> RESULT executeSync(Function<INPUT, RESULT> function, INPUT input) {
return function.apply(input);
}
// delegating shortcuts
public static void show(Page page) {
getInstance().getPageManager().show(page);
}
public static void showDetail(Page mainPage, Page detail) {
getInstance().getPageManager().showDetail(mainPage, detail);
}
public static void hideDetail(Page page) {
getInstance().getPageManager().hideDetail(page);
}
public static boolean isDetailShown(Page page) {
return getInstance().getPageManager().isDetailShown(page);
}
public static IDialog showDialog(String title, IContent content, Action saveAction, Action closeAction, Action... actions) {
return getInstance().getPageManager().showDialog(title, content, saveAction, closeAction, actions);
}
public static <T> IDialog showSearchDialog(Search<T> index, Object[] keys, TableActionListener<T> listener) {
return getInstance().getPageManager().showSearchDialog(index, keys, listener);
}
public static void showMessage(String text) {
getInstance().getPageManager().showMessage(text);
}
public static void showError(String text) {
getInstance().getPageManager().showError(text);
}
}
|
[
"bruno.eberhard@pop.ch"
] |
bruno.eberhard@pop.ch
|
4e982106eccfafde832ef398160e2a03cd9471a7
|
7e1511cdceeec0c0aad2b9b916431fc39bc71d9b
|
/flakiness-predicter/input_data/original_tests/joel-costigliola-assertj-core/nonFlakyMethods/org.assertj.core.internal.objectarrays.ObjectArrays_assertDoesNotContain_at_Index_Test-should_throw_error_if_Index_is_null_whatever_custom_comparison_strategy_is.java
|
09957e169c252f113bf5c21fe822c09607d42d2e
|
[
"BSD-3-Clause"
] |
permissive
|
Taher-Ghaleb/FlakeFlagger
|
6fd7c95d2710632fd093346ce787fd70923a1435
|
45f3d4bc5b790a80daeb4d28ec84f5e46433e060
|
refs/heads/main
| 2023-07-14T16:57:24.507743
| 2021-08-26T14:50:16
| 2021-08-26T14:50:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 253
|
java
|
@Test public void should_throw_error_if_Index_is_null_whatever_custom_comparison_strategy_is(){
thrown.expectNullPointerException("Index should not be null");
arraysWithCustomComparisonStrategy.assertDoesNotContain(someInfo(),actual,"YOda",null);
}
|
[
"aalsha2@masonlive.gmu.edu"
] |
aalsha2@masonlive.gmu.edu
|
095f155669883995b63b0ecafa5d94cca577c30f
|
ff707b3f3bea41e94f611e10f6c68adbff0d3792
|
/Interfaces-And-Abstraction/src/_03_say_hello/European.java
|
30d6d3b3343344c7ae577679774a44f5356e3259
|
[] |
no_license
|
yavoryankov83/Java_OOP_Basics
|
3bf70c81bf8f5d9583192d3d3b542e269ad0d36c
|
37991dbdfe0e4aada90df6e3a17dda1bc23c4dfc
|
refs/heads/master
| 2020-03-30T05:22:16.252845
| 2018-09-30T13:23:43
| 2018-09-30T13:23:43
| 150,123,155
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 263
|
java
|
package _03_say_hello;
public class European extends BasePerson {
public European(String name) {
super(name);
}
@Override
public String getName() {
return super.getName();
}
@Override
public String sayHello() {
return "Hello";
}
}
|
[
"yavoryankov83@gmail.com"
] |
yavoryankov83@gmail.com
|
9459a448ed56a6eb4dd3a5f849deef852893780f
|
7ad1ada801466af3727a0e90b11d9ea9ff308484
|
/toutiao/src/main/java/com/hy/model/News.java
|
11365313b6bc598cca7cdfd20c38b48e3026e16c
|
[] |
no_license
|
Mrhuangyi/toutiao
|
cedd07ebf2211e04b339bbda24c9816b49f6c673
|
0d103dfc092b124f101913c9cca10e4bc355e434
|
refs/heads/master
| 2020-04-13T22:33:42.406264
| 2018-12-29T06:39:51
| 2018-12-29T06:39:51
| 163,482,008
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,329
|
java
|
package com.hy.model;
import java.util.Date;
/**
* Created by xiaohuang on 16/6/30.
*/
public class News {
private int id;
private String title;
private String link;
private String image;
private int likeCount;
private int commentCount;
private Date createdDate;
private int userId;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getLink() {
return link;
}
public void setLink(String link) {
this.link = link;
}
public String getImage() {
return image;
}
public void setImage(String image) {
this.image = image;
}
public int getLikeCount() {
return likeCount;
}
public void setLikeCount(int likeCount) {
this.likeCount = likeCount;
}
public int getCommentCount() {
return commentCount;
}
public void setCommentCount(int commentCount) {
this.commentCount = commentCount;
}
public Date getCreatedDate() {
return createdDate;
}
public void setCreatedDate(Date createdDate) {
this.createdDate = createdDate;
}
public int getUserId() {
return userId;
}
public void setUserId(int userId) {
this.userId = userId;
}
}
|
[
"you@example.com"
] |
you@example.com
|
1fad8614771be9716b8a2335442a8d7f9a969109
|
3e059d2542c0593127c23f88d79a9570cc3538c8
|
/manage/src/main/java/com/kinth/frame/manage/web/model/extension/UserAuthorizeModelExtension.java
|
66e40a6024aab28133a705ce58dabcd3995cad11
|
[] |
no_license
|
jadewoo8888/kinth-frame-manage
|
294d8c33cf354b54746a58356c3c625f4aa0ce32
|
0a56f12f20f7972212eedcdda04e2c0f5dcffb3f
|
refs/heads/master
| 2021-01-10T10:31:22.559619
| 2016-01-18T08:47:15
| 2016-01-18T08:47:15
| 48,489,487
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 514
|
java
|
package com.kinth.frame.manage.web.model.extension;
import com.kinth.frame.manage.domain.User;
import com.kinth.frame.manage.web.model.UserAuthorizeModel;
public class UserAuthorizeModelExtension {
public static UserAuthorizeModel toUserBindModel(User user){
UserAuthorizeModel ret=new UserAuthorizeModel();
ret.setLoginName(user.getLoginName());
ret.setRealName(user.getRealName());
ret.setId(user.getId());
if(user.getOrgId()!=null) {
ret.setOrgId(user.getOrgId());
}
return ret;
}
}
|
[
"313388925@qq.com"
] |
313388925@qq.com
|
859dbf2b34b1e6bf5d7876867172c109cab64335
|
30c7449d030b59573c26157801b6c741cbc2335a
|
/src/main/java/gui/JFrameDemo.java
|
4a718c47329b11ef363b1085acd7fe360414fd54
|
[
"BSD-2-Clause"
] |
permissive
|
guxiaogang/javasrc
|
3a2080c1b3c563e1ec48c2678d3c0426d89f1eaf
|
1f248bb30254ecfb6d9222d944902efd70dd4967
|
refs/heads/master
| 2020-05-25T09:45:58.571071
| 2013-12-09T02:00:48
| 2013-12-09T02:00:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,023
|
java
|
package gui;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
/** Just a Frame
*/
public class JFrameDemo extends JFrame {
private static final long serialVersionUID = -3089466980388235513L;
JButton quitButton;
/** Construct the object including its GUI */
public JFrameDemo() {
super("JFrameDemo");
Container cp = getContentPane();
cp.setLayout(new FlowLayout());
cp.add(quitButton = new JButton("Exit"));
// Set up so that "Close" will exit the program,
// not just close the JFrame.
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// This "action handler" will be explained later in the chapter.
quitButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
setVisible(false);
dispose();
System.exit(0);
}
});
pack();
setLocation(500, 400);
}
public static void main(String[] args) {
new JFrameDemo().setVisible(true);
}
}
|
[
"ian@darwinsys.com"
] |
ian@darwinsys.com
|
e6b22f46759e43eee84adb4ffacb5f335c9fe8e4
|
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
|
/program_data/JavaProgramData/104/1334.java
|
622de9d54fe8e4c1a5f02661864b8552dafafeba
|
[
"MIT"
] |
permissive
|
qiuchili/ggnn_graph_classification
|
c2090fefe11f8bf650e734442eb96996a54dc112
|
291ff02404555511b94a4f477c6974ebd62dcf44
|
refs/heads/master
| 2021-10-18T14:54:26.154367
| 2018-10-21T23:34:14
| 2018-10-21T23:34:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 927
|
java
|
package <missing>;
public class GlobalMembers
{
//
// main.cpp
// Homework
//
// Created by ??? on 13-11-17.
// Copyright (c) 2013? ???. All rights reserved.
//
public static int Main()
{
int x;
int y;
int sx;
int sy;
int[] nx = new int[11];
int[] ny = new int[11];
x = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));
y = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));
nx[10] = x;
ny[10] = y;
for (int i = 10;i > 0;i--)
{
nx[i - 1] = nx[i] / 2;
}
for (int i = 10;i > 0;i--)
{
ny[i - 1] = ny[i] / 2;
}
for (sx = 0;sx < 11;sx++)
{
if (nx[sx] != 0)
{
sx--;
break;
}
}
for (sy = 0;sy < 11;sy++)
{
if (ny[sy] != 0)
{
sy--;
break;
}
}
for (int i = 0;i < 11;i++)
{
if (nx[sx] != ny[sy])
{
break;
}
sx++;
sy++;
}
System.out.print(nx[sx - 1]);
System.out.print("\n");
return 0;
}
}
|
[
"y.yu@open.ac.uk"
] |
y.yu@open.ac.uk
|
3254996da6ce30d9e7c817c759bf94a05d233e37
|
fd2e9b314e33fb84e802a35347f335504118b372
|
/common/src/main/java/de/escidoc/core/common/exceptions/application/notfound/RevisionNotFoundException.java
|
23d672180e27f5a05828de7c5d5792b1e2b2329b
|
[] |
no_license
|
crh/escidoc-core-1.3
|
5f0f06f5ba66be07c6633c8c33f285894dc96687
|
f4689e608f464832a41fcf6e451a6c597c5076bc
|
refs/heads/master
| 2020-05-17T18:42:30.813395
| 2012-02-22T10:50:05
| 2012-02-22T10:50:05
| 3,514,360
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,906
|
java
|
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the Common Development and Distribution License, Version 1.0
* only (the "License"). You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at license/ESCIDOC.LICENSE or http://www.escidoc.de/license. See the License for
* the specific language governing permissions and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each file and include the License file at
* license/ESCIDOC.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by
* brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
* Copyright 2006-2011 Fachinformationszentrum Karlsruhe Gesellschaft fuer wissenschaftlich-technische Information mbH
* and Max-Planck-Gesellschaft zur Foerderung der Wissenschaft e.V. All rights reserved. Use is subject to license
* terms.
*/
package de.escidoc.core.common.exceptions.application.notfound;
/**
* The RevisionNotFoundException is used to indicate that the revision requested in the context of the service-call is
* null or does not exist in the System. returned httpStatusCode is 404. Status code (404) indicating that the requested
* resource is not available.
*
* @author Michael Hoppe (FIZ Karlsruhe)
*/
public class RevisionNotFoundException extends ResourceNotFoundException {
/**
* The serial version uid.
*/
private static final long serialVersionUID = 231355439304361649L;
public static final int HTTP_STATUS_CODE = ESCIDOC_HTTP_SC_NOT_FOUND;
public static final String HTTP_STATUS_MESSAGE = "Revision was not found.";
/**
* Default constructor.
*/
public RevisionNotFoundException() {
super(HTTP_STATUS_CODE, HTTP_STATUS_MESSAGE);
}
/**
* Constructor used to map an initial exception.
*
* @param error Throwable
*/
public RevisionNotFoundException(final Throwable error) {
super(error, HTTP_STATUS_CODE, HTTP_STATUS_MESSAGE);
}
/**
* Constructs a new exception with the specified detail message.
*
* @param message - the detail message.
*/
public RevisionNotFoundException(final String message) {
super(message, HTTP_STATUS_CODE, HTTP_STATUS_MESSAGE);
}
/**
* Constructor used to create a new Exception with the specified detail message and a mapping to an initial
* exception.
*
* @param message - the detail message.
* @param error Throwable
*/
public RevisionNotFoundException(final String message, final Throwable error) {
super(message, error, HTTP_STATUS_CODE, HTTP_STATUS_MESSAGE);
}
}
|
[
"Steffen.Wagner@fiz-karlsruhe.de"
] |
Steffen.Wagner@fiz-karlsruhe.de
|
25ca9f4e58dcb08fa9c700a4f9895ff259afe9e2
|
e52ca0ce0bab8c18ab8aeb5087e8738c4bbf96e0
|
/src/main/java/com/addrbook/json/PersonJsonList.java
|
2a25dad1bfec2d29920ea1298481ca011d969f1b
|
[] |
no_license
|
Home-SignUp/Jenkins-SignUp
|
7a9fff5b7b9185d73a965326902a9755b731bb9a
|
c3c23d85d3c530fc376daa7288c435612bbdc7b3
|
refs/heads/master
| 2020-12-24T14:18:33.416601
| 2015-03-20T12:54:26
| 2015-03-20T12:54:26
| 32,582,397
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 341
|
java
|
package com.addrbook.json;
import java.util.List;
/**
* Created by Саша on 18.03.2015.
*/
public class PersonJsonList {
private List<PersonJson> persons;
public List<PersonJson> getPersonJson(){
return persons;
}
public void setPersonJson(List<PersonJson> persons){
this.persons = persons;
}
}
|
[
"dn200978lak@gmail.com"
] |
dn200978lak@gmail.com
|
14f81f123c4ee50335804f33d24c1ed2b7d38e7e
|
c1b23a03926012ccee280b3895f100cec61d2407
|
/topdeep_web_common/server/common-core/src/main/java/topdeep/commonfund/biz/gateway/FundBiz_u0a.java
|
3cc3b74c3d59b2264cdc97d10983db9e73595f19
|
[] |
no_license
|
zhuangxiaotian/project
|
a0e548c88f01339993097d99ac68adcba9d11171
|
d0c96854b3678209c9a25d07c9729c613fe66d38
|
refs/heads/master
| 2020-12-05T23:14:27.354448
| 2016-09-01T07:19:22
| 2016-09-01T07:19:22
| 67,108,931
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,056
|
java
|
package topdeep.commonfund.biz.gateway;
import topdeep.commonfund.entity.gateway.def.*;
import java.util.*;
import java.io.*;
public interface FundBiz_u0a {
/**
* 查询风险测试题库
* @return 结果
*/
ISRiskEvaluationExamQueryOutput riskEvaluationExamQuery(ISRiskEvaluationExamQueryInput inputParam);
/**
* 风险测评
* @return 结果
*/
ISRiskEvaluationOutput riskEvaluation(ISRiskEvaluationInput inputParam);
/**
* 历史确认查询
* @return 结果
*/
ISHistoryConfirmQueryOutput historyConfirmQuery(ISHistoryConfirmQueryInput inputParam);
/**
* 购买基金
* @return 结果
*/
ISFundBuyOutput fundBuy(ISFundBuyInput inputParam);
/**
* 基金赎回
* @return 结果
*/
ISFundRedemptionOutput fundRedemption(ISFundRedemptionInput inputParam);
/**
* 基金转换
* @return 结果
*/
ISFundTransferOutput fundTransfer(ISFundTransferInput inputParam);
/**
* 撤单
* @return 结果
*/
ISTransactionCancelOutput transactionCancel(ISTransactionCancelInput inputParam);
}
|
[
"xtian.zhuang@topdeep.com"
] |
xtian.zhuang@topdeep.com
|
850b487cf506a757b127fa01ce21f23e3ca221e8
|
7198994bd71ffb464916bc7f1c3164bb14d65f77
|
/library/src/main/java/cn/app/library/utils/DownLoadImageUtils.java
|
cc7705c26456d782f48f30d04c2a0020d8f9964f
|
[] |
no_license
|
nakupenda178/lklib
|
78f00b7f7a0aaf42389107638d810e0c5ffc407b
|
7cc36badfe0cf8a1d2b17e579c9fd04adf3d3eb7
|
refs/heads/master
| 2020-07-05T04:29:54.729597
| 2018-05-04T06:54:21
| 2018-05-04T06:54:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,082
|
java
|
package cn.app.library.utils;
import android.os.AsyncTask;
import android.os.Environment;
import android.text.TextUtils;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
/**
* Copyright (c) 2017. alpha, Inc. All rights reserved.
*/
public class DownLoadImageUtils {
public interface DownLoadInterFace {
void afterDownLoad(ArrayList<String> savePaths);
}
public static void downLoad(String savePath, DownLoadInterFace downLoadInterFace, String... download) {
new DownLoadTask(savePath, downLoadInterFace).execute(download);
}
private static class DownLoadTask extends AsyncTask<String, Integer, ArrayList<String>> {
private String mSavePath;
private DownLoadInterFace mDownLoadInterFace;
private DownLoadTask(String savePath, DownLoadInterFace downLoadTask) {
this.mSavePath = savePath;
this.mDownLoadInterFace = downLoadTask;
}
@Override
protected ArrayList<String> doInBackground(String... params) {
ArrayList<String> names = new ArrayList<>();
for (String url : params) {
if (!TextUtils.isEmpty(url)) {
if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
// 获得存储卡的路径
FileOutputStream fos = null;
InputStream is = null;
try {
URL downUrl = new URL(url);
// 创建连接
HttpURLConnection conn = (HttpURLConnection) downUrl.openConnection();
conn.connect();
// 创建输入流
is = conn.getInputStream();
File file = new File(mSavePath);
// 判断文件目录是否存在
if (!file.exists()) {
file.mkdirs();
}
String[] split = url.split("/");
String fileName = split[split.length - 1];
File mApkFile = new File(mSavePath, fileName);
names.add(mApkFile.getAbsolutePath());
fos = new FileOutputStream(mApkFile, false);
int count = 0;
// 缓存
byte buf[] = new byte[1024];
while (true) {
int read = is.read(buf);
if (read == -1) {
break;
}
fos.write(buf, 0, read);
count += read;
publishProgress(count);
}
fos.flush();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (is != null) {
is.close();
}
if (fos != null) {
fos.close();
}
} catch (IOException e1) {
e1.printStackTrace();
}
}
}
}
}
return names;
}
@Override
protected void onPostExecute(ArrayList<String> strings) {
super.onPostExecute(strings);
if (mDownLoadInterFace != null) {
mDownLoadInterFace.afterDownLoad(strings);
}
}
}
}
|
[
"zhaolin.tongwei@gmail.com"
] |
zhaolin.tongwei@gmail.com
|
eefb355e8f3181d633b5278f84825393964a4c4a
|
fac5d6126ab147e3197448d283f9a675733f3c34
|
/src/main/java/dji/internal/diagnostics/handler/FlightControllerDiagnosticsHandler$$Lambda$25.java
|
0a29ce3ed85db68ab116f370bf41830366732dec
|
[] |
no_license
|
KnzHz/fpv_live
|
412e1dc8ab511b1a5889c8714352e3a373cdae2f
|
7902f1a4834d581ee6afd0d17d87dc90424d3097
|
refs/heads/master
| 2022-12-18T18:15:39.101486
| 2020-09-24T19:42:03
| 2020-09-24T19:42:03
| 294,176,898
| 0
| 0
| null | 2020-09-09T17:03:58
| 2020-09-09T17:03:57
| null |
UTF-8
|
Java
| false
| false
| 916
|
java
|
package dji.internal.diagnostics.handler;
import dji.midware.data.model.P3.DataOsdGetPushHome;
import dji.utils.function.Predicate;
import dji.utils.function.Predicate$$CC;
final /* synthetic */ class FlightControllerDiagnosticsHandler$$Lambda$25 implements Predicate {
static final Predicate $instance = new FlightControllerDiagnosticsHandler$$Lambda$25();
private FlightControllerDiagnosticsHandler$$Lambda$25() {
}
public Predicate and(Predicate predicate) {
return Predicate$$CC.and(this, predicate);
}
public Predicate negate() {
return Predicate$$CC.negate(this);
}
public Predicate or(Predicate predicate) {
return Predicate$$CC.or(this, predicate);
}
public boolean test(Object obj) {
return FlightControllerDiagnosticsHandler.lambda$initStatusWarningType$22$FlightControllerDiagnosticsHandler((DataOsdGetPushHome) obj);
}
}
|
[
"michael@districtrace.com"
] |
michael@districtrace.com
|
2e2b48c1b326dc8e81d1ebe2ca49922ed8ca82ca
|
1275e4b98a8dbd61053ebeee6433719248bff988
|
/src/main/java/com/flea/modules/system/action/LibrarySetupController.java
|
b1426a2be972fae8b4b7fbf9ecd1fd90f392d61f
|
[] |
no_license
|
zmiraclej/LibraryOMS
|
98c480dc5d0ea8617826a3e08b98b06f2aa443bc
|
c3ffa73b7a33ec93fecdc7c068c5655305d3a06b
|
refs/heads/master
| 2021-05-10T21:30:37.158091
| 2018-01-20T09:46:31
| 2018-01-20T09:52:20
| 118,229,684
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,667
|
java
|
package com.flea.modules.system.action;
import java.io.IOException;
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSONObject;
import com.flea.common.pojo.Page;
import com.flea.common.service.UserService;
import com.flea.modules.customer.service.CutomerLibraryService;
import com.flea.modules.system.pojo.Library;
import com.flea.modules.system.service.LibraryService;
import com.flea.modules.system.util.PublicDataUtils;
import com.google.gson.Gson;
import com.google.gson.JsonArray;
/**
* 图书馆模式设置
* @author bruce
* @2016年5月25日 上午9:51:37
*/
@Controller
@RequestMapping("cms/libset")
public class LibrarySetupController {
@Autowired
private LibraryService libraryService;
@Autowired
private CutomerLibraryService cutomerLibraryService;
@Resource
private UserService userService;
/**
* 图书馆列表
* @param pageNum
* @param search
* @return
*/
@RequestMapping(value="/list/{page}")
public ModelAndView list(@PathVariable String page,Integer pageNum,Library library,String search,HttpServletRequest request, HttpServletResponse response, Model model){
List<Library> list1 = null;
Page<Library> pageObj=libraryService.find(new Page<Library>(request,response),search, library);
list1 = pageObj.getList();
if(!page.equals("lendout")&&!page.equals("deposit")){
for (int i = 0; i < pageObj.getList().size(); i++) {
boolean flag = true;
try {
flag = list1.get(i).getScope() != 0;
} catch (Exception e) {
flag = false;
}
if(flag){
//如果范围状态为不是未启用的就不给添加 范围几。。。
//list1.get(i).setScopeString("范围"+PublicDataUtils.changeNumber((pageObj.getList().get(i).getScope())));
}
}
}
ModelAndView mav = new ModelAndView();
if(page.equals("lendout")){
mav.setViewName("/library/borrow_limited_set");
} else if(page.equals("deposit")){
mav.setViewName("/library/reader_deposit_set");
}else{
//范围自加一
int max = libraryService.getMaxScope()+1;
List<Library> list = new ArrayList<Library>();
for (int i = 0; i < max; i++) {
Library li = new Library();
//把数字更改字符串。。
li.setName("范围"+PublicDataUtils.changeNumber((i+1)));
list.add(li);
}
mav.addObject("max",list);
mav.setViewName("/library/circulate");
}
mav.addObject("search", search);
mav.addObject("page", pageObj);
return mav;
}
@RequestMapping(value="/lendout",method=RequestMethod.POST)
public void lendout(Integer maxSum,Integer freeRentDays,String rent,String menuIds,HttpServletResponse response) throws IOException{
String[] ids = menuIds.split(",");
libraryService.updateBorrowModelById(maxSum,freeRentDays,rent,ids);
JSONObject json = new JSONObject();
json.put("success", true);
response.setContentType("text/html");
response.getWriter().write(json.toJSONString());
}
@RequestMapping(value="/deposit",method=RequestMethod.POST)
public void deposit(String reader,String deposit,String menuIds,HttpServletResponse response) throws IOException{
String[] ids = menuIds.split(",");
libraryService.updateDepositModelById(reader,deposit,ids);
JSONObject json = new JSONObject();
json.put("success", true);
response.setContentType("text/html");
response.getWriter().write(json.toJSONString());
}
/**
*
* @method:circulate
* @Description:circulate 更新用户所选中的图书馆范围
* @author: HeTao
* @date:2016年5月26日 下午4:44:58
* @param:@param operation
* @param:@param menuIds
* @param:@param response
* @param:@throws IOException
* @return:void
*/
@RequestMapping(value="/circulate",method=RequestMethod.POST)
@ResponseBody
public String circulate(String checkedId,int scope,HttpServletRequest req) throws IOException{
boolean flag = libraryService.updateLibraryScope(checkedId, scope);
if(flag)
return "location.reload()";
else
return "false";
}
}
|
[
"3507373533@qq.com"
] |
3507373533@qq.com
|
d203f46a382a0b88df8078d40ae8c7b84299c5a0
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/5/5_0c8ac53cf35347a67cf31df06650460a653480ff/TestReseekTo/5_0c8ac53cf35347a67cf31df06650460a653480ff_TestReseekTo_t.java
|
7fb643c5cf04739c888cafb6ff223b0e37e87fa6
|
[] |
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,115
|
java
|
/**
* Copyright 2010 The Apache Software Foundation
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.hbase.io.hfile;
import java.util.ArrayList;
import java.util.List;
import org.apache.hadoop.fs.FSDataOutputStream;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hbase.HBaseTestingUtility;
import org.apache.hadoop.hbase.util.Bytes;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Test {@link HFileScanner#reseekTo(byte[])}
*/
public class TestReseekTo {
private final static HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
@Test
public void testReseekTo() throws Exception {
Path ncTFile = new Path(HBaseTestingUtility.getTestDir(), "basic.hfile");
FSDataOutputStream fout = TEST_UTIL.getTestFileSystem().create(ncTFile);
HFile.Writer writer = new HFile.Writer(fout, 4000, "none", null);
int numberOfKeys = 1000;
String valueString = "Value";
List<Integer> keyList = new ArrayList<Integer>();
List<String> valueList = new ArrayList<String>();
for (int key = 0; key < numberOfKeys; key++) {
String value = valueString + key;
keyList.add(key);
valueList.add(value);
writer.append(Bytes.toBytes(key), Bytes.toBytes(value));
}
writer.close();
fout.close();
HFile.Reader reader = new HFile.Reader(TEST_UTIL.getTestFileSystem(),
ncTFile, null, false);
reader.loadFileInfo();
HFileScanner scanner = reader.getScanner(false, true);
scanner.seekTo();
for (int i = 0; i < keyList.size(); i++) {
Integer key = keyList.get(i);
String value = valueList.get(i);
long start = System.nanoTime();
scanner.seekTo(Bytes.toBytes(key));
System.out.println("Seek Finished in: " + (System.nanoTime() - start)/1000 + " micro s");
assertEquals(value, scanner.getValueString());
}
scanner.seekTo();
for (int i = 0; i < keyList.size(); i += 10) {
Integer key = keyList.get(i);
String value = valueList.get(i);
long start = System.nanoTime();
scanner.reseekTo(Bytes.toBytes(key));
System.out.println("Reseek Finished in: " + (System.nanoTime() - start)/1000 + " micro s");
assertEquals(value, scanner.getValueString());
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
4a6b885fc8f83ea2dc8581d5fb188103448c7a19
|
e820097c99fb212c1c819945e82bd0370b4f1cf7
|
/gwt-sh/src/main/java/com/skynet/spms/client/gui/basedatamanager/stockServiceBusiness/bondedWarehouseBusiness/bondedWarehouseInventory/BondedWarehouseInventoryPanel.java
|
c6e901eb911fadc64efb1f70737c6ebc9180f3b7
|
[] |
no_license
|
jayanttupe/springas-train-example
|
7b173ca4298ceef543dc9cf8ae5f5ea365431453
|
adc2e0f60ddd85d287995f606b372c3d686c3be7
|
refs/heads/master
| 2021-01-10T10:37:28.615899
| 2011-12-20T07:47:31
| 2011-12-20T07:47:31
| 36,887,613
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,564
|
java
|
/**
*
*/
package com.skynet.spms.client.gui.basedatamanager.stockServiceBusiness.bondedWarehouseBusiness.bondedWarehouseInventory;
import com.skynet.spms.client.PanelFactory;
import com.skynet.spms.client.ShowcasePanel;
import com.skynet.spms.client.entity.DataInfo;
import com.skynet.spms.client.feature.data.DataSourceTool;
import com.skynet.spms.client.feature.data.DataSourceTool.PostDataSourceInit;
import com.smartgwt.client.data.DataSource;
import com.smartgwt.client.types.VisibilityMode;
import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.layout.SectionStack;
import com.smartgwt.client.widgets.layout.SectionStackSection;
import com.smartgwt.client.widgets.layout.VLayout;
import com.smartgwt.client.widgets.grid.ListGridRecord;
import com.smartgwt.client.widgets.grid.events.CellClickEvent;
import com.smartgwt.client.widgets.grid.events.CellClickHandler;
/**
* @author Administrator
*
*/
public class BondedWarehouseInventoryPanel extends ShowcasePanel {
private static final String DESCRIPTION = "保税库在库记录信息维护页面";
private BondedWarehouseInventoryButtonPanel bondedWarehouseInventoryButtonPanel;
private BondedWarehouseInventoryListgrid bondedWarehouseInventoryListgrid;
private VLayout mainPanelLayout;
private SectionStack mainPanelSection;
private SectionStackSection detailPanelSection;
public static class Factory implements PanelFactory {
private String DESCRIPTION = "保税库在库记录模块";
private String id;
public Canvas create() {
BondedWarehouseInventoryPanel panel = new BondedWarehouseInventoryPanel();
id = panel.getID();
return panel;
}
public String getID() {
return id;
}
public String getDescription() {
return DESCRIPTION;
}
}
public Canvas getViewPanel() {
// 获取数据源
String modeName = "stockServiceBusiness.bondedWarehouseBusiness.bondedWarehouseInventoryStock";
String dsName = "bondedWarehouseInventoryStock_dataSource";
// 主Layout
mainPanelLayout = new VLayout();
mainPanelLayout.setLayoutTopMargin(5);
mainPanelLayout.setMembersMargin(2);
mainPanelLayout.setWidth100();
mainPanelLayout.setHeight100();
// 主Section容器
mainPanelSection = new SectionStack();
mainPanelSection.setHeight100();
mainPanelSection.setVisibilityMode(VisibilityMode.MULTIPLE);
mainPanelSection.setAnimateSections(true);
// 主列表Grid
bondedWarehouseInventoryListgrid = new BondedWarehouseInventoryListgrid();
bondedWarehouseInventoryListgrid.setHeight100();
// 取得Grid中需要显示的数据源
DataSourceTool dataSourceTool = new DataSourceTool();
dataSourceTool.onCreateDataSource(modeName, dsName,
new PostDataSourceInit() {
public void doPostOper(DataSource dataSource,
DataInfo dataInfo) {
bondedWarehouseInventoryListgrid.setDataSource(dataSource);
bondedWarehouseInventoryListgrid.fetchData();
bondedWarehouseInventoryListgrid.drawCredentialsRecordListgrid();
}
});
// ListGrid中的选择事件处理
bondedWarehouseInventoryListgrid.addCellClickHandler(new CellClickHandler() {
@Override
public void onCellClick(CellClickEvent event) {
ListGridRecord selectedRecord = event.getRecord();
if(event.getColNum()!=0){
bondedWarehouseInventoryListgrid.selectRecords(bondedWarehouseInventoryListgrid.getSelection(), false);
bondedWarehouseInventoryListgrid.selectRecord(selectedRecord);
}else if(bondedWarehouseInventoryListgrid.getSelection().length == 1){
selectedRecord = bondedWarehouseInventoryListgrid.getSelection()[0];
bondedWarehouseInventoryListgrid.scrollToRow(bondedWarehouseInventoryListgrid.getRecordIndex(selectedRecord));
}
}
});
// 共用按钮面板
bondedWarehouseInventoryButtonPanel = new BondedWarehouseInventoryButtonPanel(bondedWarehouseInventoryListgrid);
// 主列表面板
detailPanelSection = new SectionStackSection("保税库在库信息");
detailPanelSection.setItems(bondedWarehouseInventoryListgrid);
detailPanelSection.setItems(bondedWarehouseInventoryButtonPanel);
detailPanelSection.setExpanded(true);
// 加载各面板到容器
mainPanelSection.addSection(detailPanelSection);
mainPanelLayout.addMember(bondedWarehouseInventoryButtonPanel);
mainPanelLayout.addMember(mainPanelSection);
return mainPanelLayout;
}
public String getIntro() {
return DESCRIPTION;
}
}
|
[
"usedtolove@3b6edebd-8678-f8c2-051a-d8e859c3524d"
] |
usedtolove@3b6edebd-8678-f8c2-051a-d8e859c3524d
|
8cd5c0a0ab68f15d8d551305e8755e843ea84d4a
|
376ea7c8ead1ab743a4d567c46b34b8dc3cf632f
|
/src/Class283.java
|
4c6d75913df4cab978664c90556f4eda001fdda5
|
[] |
no_license
|
bradleysixx/insomniapk-client
|
ed2180dca6fc8bdf38b82b6a6ad9685fd5e218b7
|
2c47ee9f5fc86c30d742bef9c55859d0088c2ae5
|
refs/heads/master
| 2022-01-20T02:02:26.587366
| 2019-03-26T05:19:36
| 2019-03-26T05:19:36
| 177,716,974
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 528
|
java
|
/* Class283 - Decompiled by JODE
*
*/
public class Class283
{
static int anInt3589;
static int anInt3590 = 0;
static int anInt3591 = 0;
static final int method3389(int i, boolean bool, byte b, int i_0_) {
anInt3589++;
Node_Sub16 node_sub16 = Class295.method3472(i_0_, (byte) 18, bool);
if (node_sub16 == null) {
return 0;
}
if (i < 0 || (node_sub16.anIntArray7138.length ^ 0xffffffff) >= (i ^ 0xffffffff)) {
return 0;
}
if (b <= 60) {
return -79;
}
return node_sub16.anIntArray7138[i];
}
}
|
[
"37641668+bradleysixx@users.noreply.github.com"
] |
37641668+bradleysixx@users.noreply.github.com
|
3f274249431237be1d1791ef4a0540ee89736388
|
8adca48678ed036ebbf5c2310ab60666837f7527
|
/algorithm/src/org/dzhou/research/cci/treegraph/FirstCommonAncestor.java
|
f0cbcab825b0b9a7baf198011169b9f63cbfa728
|
[] |
no_license
|
zhou-dong/algorithm
|
ae6e8c6748c6144b16f419a792c770b7ab246a51
|
085960bdae86821bfede9e741d4a6891a3876709
|
refs/heads/master
| 2021-04-09T17:18:41.609334
| 2018-09-04T23:26:01
| 2018-09-04T23:26:01
| 29,071,701
| 14
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,860
|
java
|
package org.dzhou.research.cci.treegraph;
/**
* Practice of "cracking the code interview"
*
* Design an algorithm and write code find the first common ancestor of two
* nodes in binary tree. Avoid storing additional nodes in a data structure.
* NOTE: This is not necessarily a binary search tree.
*
* @author DONG ZHOU
*/
public class FirstCommonAncestor {
class TreeNode {
int value;
TreeNode left;
TreeNode right;
TreeNode parent;
TreeNode(int value) {
this.value = value;
}
}
boolean covers(TreeNode root, TreeNode node) {
if (root == null)
return false;
if (root == node)
return true;
return covers(root.left, node) || covers(root.right, node);
}
// Solution 1: With links to parents
public class Solution {
TreeNode commonAncestor(TreeNode p, TreeNode q) {
int delta = depth(p) - depth(q);
TreeNode shorter = delta > 0 ? q : p;
TreeNode longer = delta > 0 ? p : q;
longer = goUpBy(longer, Math.abs(delta));
while (shorter != null && longer != null && shorter != longer) {
shorter = shorter.parent;
longer = longer.parent;
}
return shorter;
}
private TreeNode goUpBy(TreeNode node, int delta) {
for (int i = 0; i < delta && node != null; i++) {
node = node.parent;
}
return node;
}
private int depth(TreeNode node) {
int depth = 0;
while (node != null) {
depth++;
node = node.parent;
}
return depth;
}
}
// Solution 2: With links to parents
public class Solution2 {
TreeNode commonAncestor(TreeNode root, TreeNode p, TreeNode q) {
if (!covers(root, p) || !covers(root, q))
return null;
else if (covers(p, q))
return p;
else if (covers(q, p))
return q;
TreeNode sibling = getSibling(p);
TreeNode parent = p.parent;
while (!covers(sibling, q)) {
sibling = getSibling(parent);
parent = parent.parent;
}
return parent;
}
TreeNode getSibling(TreeNode node) {
if (node == null || node.parent == null)
return null;
TreeNode parent = node.parent;
return parent.left == node ? node.right : node.left;
}
}
// Solution 3: Without links to parent
public class Solution3 {
TreeNode commonAncestor(TreeNode root, TreeNode p, TreeNode q) {
if (!covers(root, p) || !covers(root, q))
return null;
return ancestorHelper(root, p, q);
}
TreeNode ancestorHelper(TreeNode root, TreeNode p, TreeNode q) {
if (root == null || root == p || root == q)
return root;
boolean pIsOnLeft = covers(root.left, p);
boolean qIsOnLeft = covers(root.left, p);
if (pIsOnLeft != qIsOnLeft) // nodes are on different side
return root;
TreeNode childSide = pIsOnLeft ? root.left : root.right;
return ancestorHelper(childSide, p, q);
}
}
// Solution 4: optimized solution 3
public class Solution4 {
class Result {
TreeNode node;
boolean isAncestor;
Result(TreeNode node, boolean isAncestor) {
this.node = node;
this.isAncestor = isAncestor;
}
}
TreeNode commonAncestor(TreeNode root, TreeNode p, TreeNode q) {
Result result = commonAncestorHelper(root, p, q);
if (result.isAncestor)
return result.node;
return null;
}
Result commonAncestorHelper(TreeNode root, TreeNode p, TreeNode q) {
if (root == null)
return new Result(null, false);
if (root == p || root == q)
return new Result(root, true);
Result rx = commonAncestorHelper(root.left, p, q);
if (rx.isAncestor)
return rx;
Result ry = commonAncestorHelper(root.right, p, q);
if (ry.isAncestor)
return ry;
if (rx.node != null && ry.node != null)
return new Result(root, true);
else if (root == p || root == q) {
boolean isAncestor = rx.node != null || ry.node != null;
return new Result(root, isAncestor);
} else {
return new Result(rx.node != null ? rx.node : ry.node, false);
}
}
}
}
|
[
"82224165@qq.com"
] |
82224165@qq.com
|
1270bf99c52174804dd5a757749e4c20823027e8
|
f71a7ec87f7e90f8025a3079daced5dbf41aca9c
|
/sf-webapi/src/main/java/com/shifeng/webapi/util/rsa/RSAUtils.java
|
da4255712e96f31936824af332007838f34af9d7
|
[] |
no_license
|
luotianwen/yy
|
5ff456507e9ee3dc1a890c9bead4491d350f393d
|
083a05aac4271689419ee7457cd0727eb10a5847
|
refs/heads/master
| 2021-01-23T10:34:24.402548
| 2017-10-08T05:03:10
| 2017-10-08T05:03:10
| 102,618,007
| 1
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,559
|
java
|
package com.shifeng.webapi.util.rsa;
import java.io.ByteArrayOutputStream;
import java.security.Key;
import java.security.KeyFactory;
import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.interfaces.RSAPrivateKey;
import java.security.interfaces.RSAPublicKey;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.PKCS8EncodedKeySpec;
import java.security.spec.X509EncodedKeySpec;
import javax.crypto.Cipher;
/**
*
* @author WinZhong
*
*/
public class RSAUtils {
/**
* 默认私钥
*/
public static String PRIVATE_KEY = "MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAM8JeqbneXbdySba9krpovLXLhUG9L7NWbeVlZwWYXUWNWaky/rOpWuS2BpT1wluhIIa7dd2vc1MhNorplUj/YOL2lp+9wrefaFJJTB8m+PYAnsEUbv13hxjQQW74R/3GvKg+6gYswynD4pGkfB3oUVldG2VbEYqZdy78zHZ9IMfAgMBAAECgYBpov2I8ayBIPLEt45ZdNJms7JYmj8Ap8hyKom2pZi+ZEGFCOrnIs82jytia4rZziEgPVtDx9taSAO1SfZJlN6BeCfO6H2BV/Iya1G42lexpgiIAdEVu8bZGaYkBnlfnqGy1vljlKBRdEltqwOnVCHEfkErFSPhBidMltZEmNugOQJBAO3fkXAeOrD9PzR8eyVJ4hniC0fk+/FpLmEmteuSEnb7dm0ZW2JgvWZvdItStt4SygKCzAkMQYuBfzo05pr2OEUCQQDe0FtZXVm5jSKA6PQ1n483DC/O2fhdWcSj90/wa+oEINoYVj/GHbbOkEDQgxsSBsOYXj971NH+OfVTmnRBwV4TAkEAmytO1UNy58ebdmKJdk6W5ml1EGYID3ecYJV+8HduAh2RKCP1X9xZULv923COh5jcG/00meZbz2QfGVou4AEjvQJAD5oNW3OS7dA5I0esmfijQZqD2nsezgKUJ1sQ6OfVihZ2zw9zBb9c5pfpQfB8O8XnekrXLSeY0LFkQUdmbphIqwJBALNaOMkNzGXZ8oRfhOuT+Un0fc53SC5s1bYZ88kdKiP3I8JkDIL1CC6N4pJ65maNGl9GWd/zE0G9unquIcrlbeE=";
/**
* 默认公钥
*/
private static String PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDPCXqm53l23ckm2vZK6aLy1y4VBvS+zVm3lZWcFmF1FjVmpMv6zqVrktgaU9cJboSCGu3Xdr3NTITaK6ZVI/2Di9pafvcK3n2hSSUwfJvj2AJ7BFG79d4cY0EFu+Ef9xryoPuoGLMMpw+KRpHwd6FFZXRtlWxGKmXcu/Mx2fSDHwIDAQAB";
/** RSA最大加密明文大小 */
private static final int MAX_ENCRYPT_BLOCK = 117;
/** RSA最大解密密文大小 */
private static final int MAX_DECRYPT_BLOCK = 128;
/** 加密算法RSA */
private static final String KEY_ALGORITHM = "RSA";
/**
* 私钥
*/
private static RSAPrivateKey privateKey;
/**
* 公钥
*/
private static RSAPublicKey publicKey;
/**
* 获取私钥
* @return 当前的私钥对象
*/
private static RSAPrivateKey getPrivateKey() {
if(privateKey == null){
try {
privateKey = loadPrivateKey(PRIVATE_KEY);
} catch (Exception e) {
e.printStackTrace();
}
}
return privateKey;
}
/**
* 获取公钥
* @return 当前的公钥对象
*/
private static RSAPublicKey getPublicKey() {
if(publicKey == null){
try {
publicKey = loadPublicKey(PUBLIC_KEY);
} catch (Exception e) {
e.printStackTrace();
}
}
return publicKey;
}
public static void main(String[] args) throws Exception {
System.out.println(decryptByPrivateKey("P+6vIaeNt+8+Mj25ZXElEtxmJW1Mo8S2w39B2eG1/4XX9qpod7aV/LqLLJDHGEhYyD/cy/DBUaT7pSEMHugqpzxPeQ7aqg8pWEtTpa89QjrM/oedQmyE6ezViawbke24KIyFZtijuxvmfHmZ0EhP4hvgCkIpFz7U7/YjCE3WGdY="));
}
/**
* 公钥加密
*
* @param data
* @return
* @throws Exception
*/
public static String encryptByPublicKey(String data) throws Exception {
getPublicKey();
byte[] dataByte = data.getBytes();
//byte[] keyBytes = Base64Utils.decode(PUBLIC_KEY);
//X509EncodedKeySpec x509KeySpec = new X509EncodedKeySpec(keyBytes);
//KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM);
//Key publicK = keyFactory.generatePublic(x509KeySpec);
// 对数据加密
// Cipher cipher = Cipher.getInstance(keyFactory.getAlgorithm());
Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding");
cipher.init(Cipher.ENCRYPT_MODE, publicKey);
int inputLen = dataByte.length;
ByteArrayOutputStream out = new ByteArrayOutputStream();
int offSet = 0;
byte[] cache;
int i = 0;
// 对数据分段加密
while (inputLen - offSet > 0) {
if (inputLen - offSet > MAX_ENCRYPT_BLOCK) {
cache = cipher.doFinal(dataByte, offSet, MAX_ENCRYPT_BLOCK);
} else {
cache = cipher.doFinal(dataByte, offSet, inputLen - offSet);
}
out.write(cache, 0, cache.length);
i++;
offSet = i * MAX_ENCRYPT_BLOCK;
}
byte[] encryptedData = out.toByteArray();
out.close();
return Base64Utils.encode(encryptedData);
}
/**
* 私钥解密
*
* @param data
* @return
* @throws Exception
*/
public static String decryptByPrivateKey(String data) throws Exception {
getPrivateKey();
byte[] encryptedData = Base64Utils.decode(data);
//byte[] keyBytes = Base64Utils.decode(PRIVATE_KEY);
//PKCS8EncodedKeySpec pkcs8KeySpec = new PKCS8EncodedKeySpec(keyBytes);
//KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM);
//Key privateK = keyFactory.generatePrivate(pkcs8KeySpec);
// Cipher cipher = Cipher.getInstance(keyFactory.getAlgorithm());
Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding");
cipher.init(Cipher.DECRYPT_MODE, privateKey);
int inputLen = encryptedData.length;
ByteArrayOutputStream out = new ByteArrayOutputStream();
int offSet = 0;
byte[] cache;
int i = 0;
// 对数据分段解密
while (inputLen - offSet > 0) {
if (inputLen - offSet > MAX_DECRYPT_BLOCK) {
cache = cipher
.doFinal(encryptedData, offSet, MAX_DECRYPT_BLOCK);
} else {
cache = cipher
.doFinal(encryptedData, offSet, inputLen - offSet);
}
out.write(cache, 0, cache.length);
i++;
offSet = i * MAX_DECRYPT_BLOCK;
}
byte[] decryptedData = out.toByteArray();
out.close();
return new String(decryptedData);
}
/**
* 从字符串中加载公钥
* @param publicKeyStr 公钥数据字符串
* @throws Exception 加载公钥时产生的异常
*/
private static RSAPublicKey loadPublicKey(String publicKeyStr) throws Exception {
try {
byte[] buffer = Base64Utils.decode(publicKeyStr);
KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM);
X509EncodedKeySpec keySpec = new X509EncodedKeySpec(buffer);
return (RSAPublicKey) keyFactory.generatePublic(keySpec);
} catch (NoSuchAlgorithmException e) {
throw new Exception("无此算法");
} catch (InvalidKeySpecException e) {
throw new Exception("公钥非法");
} catch (NullPointerException e) {
throw new Exception("公钥数据为空");
}
}
/**
* 从字符串中加载私钥<br>
* 加载时使用的是PKCS8EncodedKeySpec(PKCS#8编码的Key指令)。
* @param privateKeyStr
* @return
* @throws Exception
*/
private static RSAPrivateKey loadPrivateKey(String privateKeyStr)
throws Exception {
try {
byte[] buffer = Base64Utils.decode(privateKeyStr);
// X509EncodedKeySpec keySpec = new X509EncodedKeySpec(buffer);
PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(buffer);
KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM);
return (RSAPrivateKey) keyFactory.generatePrivate(keySpec);
} catch (NoSuchAlgorithmException e) {
throw new Exception("无此算法");
} catch (InvalidKeySpecException e) {
throw new Exception("私钥非法");
} catch (NullPointerException e) {
throw new Exception("私钥数据为空");
}
}
public static String getPRIVATE_KEY() {
return PRIVATE_KEY;
}
public static void setPRIVATE_KEY(String pRIVATE_KEY) {
PRIVATE_KEY = pRIVATE_KEY;
}
public static String getPUBLIC_KEY() {
return PUBLIC_KEY;
}
public static void setPUBLIC_KEY(String pUBLIC_KEY) {
PUBLIC_KEY = pUBLIC_KEY;
}
}
|
[
"tw l"
] |
tw l
|
79a9229a00f40ead3b0fdb06fed2e85c2cddc404
|
78fddaeff9b3bb94ab0f65e60317ce8916b0098b
|
/support/com/tscp/mvna/domain/support/ticket/manager/TicketServiceModel.java
|
23dbde941aab94f313269da6626e488b73c8024a
|
[] |
no_license
|
pongalong/webonthego
|
1f7666e21428025408037a5128e928677db26b33
|
d2970a3c93abb56906733c146c273eb7fdf6685d
|
refs/heads/master
| 2021-01-10T19:57:25.061696
| 2013-06-25T21:53:01
| 2013-06-25T21:53:01
| 7,276,071
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,264
|
java
|
package com.tscp.mvna.domain.support.ticket.manager;
import java.util.Collection;
import com.tscp.mvna.domain.support.ticket.Ticket;
import com.tscp.mvna.domain.support.ticket.TicketStatus;
import com.tscp.mvna.domain.support.ticket.category.TicketCategory;
import com.tscp.mvna.domain.support.ticket.exception.TicketServiceException;
public interface TicketServiceModel {
public int saveTicket(
Ticket ticket) throws TicketServiceException;
public void updateTicket(
Ticket ticket) throws TicketServiceException;
public void deleteTicket(
Ticket ticket) throws TicketServiceException;
public Ticket getTicketById(
int id) throws TicketServiceException;
public Collection<Ticket> getTicketByStatus(
TicketStatus status) throws TicketServiceException;
public Collection<Ticket> getTicketByCustomer(
int custId, TicketStatus status) throws TicketServiceException;
public Collection<Ticket> getTicketByCreator(
int creatorId, TicketStatus status) throws TicketServiceException;
public Collection<Ticket> getTicketByAssignee(
int assigneeId, TicketStatus status) throws TicketServiceException;
public Collection<Ticket> getTicketByCategory(
TicketCategory category, TicketStatus status) throws TicketServiceException;
}
|
[
"jonathan.pong@gmail.com"
] |
jonathan.pong@gmail.com
|
b3996cd54712e5cfbe65f408fb49419c7554c23b
|
ff6fc5164bd4f9f81e733928df8bf2bf04fa6f36
|
/src/com/massivecraft/mcore/mixin/TeleportMixinAbstract.java
|
1627674f60fb7106b6ac15785af2da9c62cd7c3f
|
[] |
no_license
|
thegamedude221/mcore
|
0f2d4fb02a3c034992aba2ccb5d398a726959a20
|
567707616529b324a742ff69a68a29cdff5b8745
|
refs/heads/master
| 2021-01-18T05:54:57.849832
| 2013-07-12T08:35:22
| 2013-07-12T08:42:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,218
|
java
|
package com.massivecraft.mcore.mixin;
import org.bukkit.entity.Player;
import org.bukkit.event.player.PlayerTeleportEvent;
import org.bukkit.permissions.Permissible;
import com.massivecraft.mcore.MCoreConf;
import com.massivecraft.mcore.ps.PS;
import com.massivecraft.mcore.util.SenderUtil;
public abstract class TeleportMixinAbstract implements TeleportMixin
{
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override
public boolean isCausedByMixin(PlayerTeleportEvent event)
{
return TeleportMixinCauseEngine.get().isCausedByTeleportMixin(event);
}
@Override
public void teleport(Player teleportee, PS to) throws TeleporterException
{
this.teleport(teleportee, to, null);
}
@Override
public void teleport(Player teleportee, PS to, String desc) throws TeleporterException
{
this.teleport(teleportee, to, desc, 0);
}
@Override
public void teleport(Player teleportee, PS to, String desc, Permissible delayPermissible) throws TeleporterException
{
int delaySeconds = getTpdelay(delayPermissible);
this.teleport(teleportee, to, desc, delaySeconds);
}
@Override
public void teleport(Player teleportee, PS to, String desc, int delaySeconds) throws TeleporterException
{
this.teleport(SenderUtil.getSenderId(teleportee), to, desc, delaySeconds);
}
// ----
@Override
public void teleport(String teleporteeId, PS to) throws TeleporterException
{
this.teleport(teleporteeId, to, null);
}
@Override
public void teleport(String teleporteeId, PS to, String desc) throws TeleporterException
{
this.teleport(teleporteeId, to, desc, 0);
}
@Override
public void teleport(String teleporteeId, PS to, String desc, Permissible delayPermissible) throws TeleporterException
{
int delaySeconds = getTpdelay(delayPermissible);
this.teleport(teleporteeId, to, desc, delaySeconds);
}
// -------------------------------------------- //
// UTIL
// -------------------------------------------- //
public static int getTpdelay(Permissible delayPermissible)
{
return MCoreConf.get().getTpdelay(delayPermissible);
}
}
|
[
"olof@sylt.nu"
] |
olof@sylt.nu
|
5b6b0fea1c29d63d7812fde4dab1d7ddc873b410
|
249af7d4b0eea36cdc771536eed2943b01361a59
|
/Client/src_base/rsc/Config.java
|
5da89404ff78cb91a79ad444390a048743521259
|
[] |
no_license
|
Cleako/Wolf-Kingdom-Game
|
015450231a93402b6add2f2a608b5a77f6ad5286
|
bf0fd3fe960599604284628736e5541948051322
|
refs/heads/master
| 2023-04-26T11:30:51.749162
| 2018-08-24T14:06:41
| 2018-08-24T14:06:41
| 127,455,490
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,073
|
java
|
package rsc;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.Properties;
import java.util.Map.Entry;
public class Config {
private static Properties prop = new Properties();
public static final String SERVER_IP = "localhost"; // 10.0.2.2 // 149.56.243.61
public static final int SERVER_PORT = 43594;
public static final int CLIENT_VERSION = 1; // 17 latest.
public static final boolean MEMBERS_FEATURES = false;
public static boolean F_ANDROID_BUILD = false;
public static String F_CACHE_DIR = System.getProperty("user.home") + File.separator + "WK";
/* Configurable: */
public static boolean EXPERIENCE_DROPS = false;
public static boolean BATCH_PROGRESS_BAR = true;
public static boolean SHOW_ROOF = true;
public static boolean SHOW_FOG = true;
public static int SHOW_GROUND_ITEMS = 0;
public static boolean MESSAGE_TAB_SWITCH = true;
public static boolean NAME_CLAN_TAG_OVERLAY = true;
public static boolean SIDE_MENU_OVERLAY = false;
public static boolean KILL_FEED = true;
public static int FIGHT_MENU = 1;
public static int ZOOM = 0;
public static boolean INV_COUNT = false;
/* Android: */
public static boolean F_SHOWING_KEYBOARD = false;
public static int F_LONG_PRESS_CALC;
public static boolean HOLD_AND_CHOOSE = true;
public static int LONG_PRESS_TIMER = 400;
public static int MENU_SIZE = 6;
public static boolean SWIPE_TO_SCROLL = true;
public static boolean SWIPE_TO_ROTATE = true;
// Experience Config Menu
public static int EXPERIENCE_COUNTER = 1;
public static int EXPERIENCE_COUNTER_MODE = 0;
public static int EXPERIENCE_COUNTER_COLOR = 0;
public static int EXPERIENCE_DROP_SPEED = 1;
public static boolean EXPERIENCE_CONFIG_SUBMENU = true;
public static void set(String key, Object value) {
prop.setProperty(key, value.toString());
}
public static void initConfig() {
try {
File file = new File(F_CACHE_DIR + File.separator + "client.properties");
if (!file.exists()) {
file.createNewFile();
saveConfiguration(true);
}
prop.load(new FileInputStream(F_CACHE_DIR + File.separator + "client.properties"));
setConfigurationFromProperties();
saveConfiguration(false);
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
public static void saveConfigProperties() {
try {
File file = new File(F_CACHE_DIR + File.separator + "client.properties");
if (file.exists()) {
file.delete();
}
prop.store(new FileOutputStream(F_CACHE_DIR + File.separator + "client.properties"), null);
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
/**
* Saves configuration from the constants in this class
*
* @param force
*/
public static void saveConfiguration(boolean force) {
Field[] fields = Config.class.getDeclaredFields();
for (Field f : fields) {
if (f.getName().startsWith("F_"))
continue;
if (Modifier.isStatic(f.getModifiers()) && !Modifier.isFinal(f.getModifiers())) {
try {
if (force || !prop.containsKey(f.getName())
|| !prop.get(f.getName()).toString().equalsIgnoreCase(f.get(null).toString())) {
Class<?> t = f.getType();
if (t == int.class) {
set(f.getName(), f.getInt(null));
} else if (t == long.class) {
set(f.getName(), f.getLong(null));
} else if (t == float.class) {
set(f.getName(), f.getFloat(null));
} else if (t == double.class) {
set(f.getName(), f.getDouble(null));
} else if (t == boolean.class) {
set(f.getName(), f.getBoolean(null));
}
}
} catch (Exception e) {
System.out.println("Unable to save setting: " + f.getName() + "");
e.printStackTrace();
}
}
}
saveConfigProperties();
}
public static void setConfigurationFromProperties() {
Field[] fields = Config.class.getDeclaredFields();
for (Entry<Object, Object> entry : prop.entrySet()) {
for (Field f : fields) {
if (f.getName().startsWith("F_"))
continue;
if (f.getName().equals(entry.getKey())) {
try {
Class<?> t = f.getType();
if (t == int.class) {
f.set(null, Integer.parseInt((String) entry.getValue()));
} else if (t == float.class) {
f.set(null, Float.parseFloat((String) entry.getValue()));
} else if (t == double.class) {
f.set(null, Double.parseDouble((String) entry.getValue()));
} else if (t == boolean.class) {
f.set(null, Boolean.parseBoolean((String) entry.getValue()));
} else if (t == long.class) {
f.set(null, Long.parseLong((String) entry.getValue()));
}
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (IllegalArgumentException e) {
e.printStackTrace();
}
}
}
}
}
public static boolean isAndroid() {
return F_ANDROID_BUILD;
}
}
|
[
"cleako@gmail.com"
] |
cleako@gmail.com
|
1e3bacbab713a7c834f0a6bed1b5cfe541f93fe3
|
f9fcde801577e7b9d66b0df1334f718364fd7b45
|
/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/tag/query/Function.java
|
7d831ad1ce255fd69f981cf36f3601aefed15f54
|
[
"Apache-2.0"
] |
permissive
|
numbnet/icepdf_FULL-versii
|
86d74147dc107e4f2239cd4ac312f15ebbeec473
|
b67e1ecb60aca88cacdca995d24263651cf8296b
|
refs/heads/master
| 2021-01-12T11:13:57.107091
| 2016-11-04T16:43:45
| 2016-11-04T16:43:45
| 72,880,329
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,601
|
java
|
/*
* Copyright 2006-2013 ICEsoft Technologies 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 org.icepdf.core.tag.query;
/**
* @author mcollette
* @since 4.0
*/
public abstract class Function implements Expression {
protected String[] arguments;
public void setArguments(String[] arguments) {
this.arguments = arguments;
}
public String describe(int indent) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < indent; i++)
sb.append(" ");
String className = getClass().getName();
className = className.substring(className.lastIndexOf(".") + 1);
sb.append(className);
sb.append(" ( ");
int num = (arguments != null) ? arguments.length : 0;
for (int i = 0; i < num; i++) {
sb.append('\'');
sb.append(arguments[i]);
sb.append('\'');
if (i < (num - 1))
sb.append(", ");
}
sb.append(" )\n");
return sb.toString();
}
}
|
[
"patrick.corless@8668f098-c06c-11db-ba21-f49e70c34f74"
] |
patrick.corless@8668f098-c06c-11db-ba21-f49e70c34f74
|
204290379c1215a168b94bd0d50cc5ea6a1d4de0
|
ef50e50e0b61db62d0476b5b7df3d5f5044a16a9
|
/Graph_theory/borrowing-money/java/senthils.java
|
28c8d6a7186a95f9952fad9541ed04b2731e2218
|
[] |
no_license
|
saketrule/Research_Project-HackerRank_CheckStyle
|
09fd6ef3a067926c754af693b13566cc55fe16ae
|
4334bcbc4620fb94fd3d63034a320756e7233ded
|
refs/heads/master
| 2021-01-22T13:03:08.055929
| 2017-09-12T12:11:19
| 2017-09-12T12:11:19
| 102,361,527
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,804
|
java
|
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
public class Solution {
int C[] = new int[3401];
int max = 0;
int ci[];
Map<Integer, List<Integer>> edges = new HashMap<>();
public void solve(int[] nodes, int start, int N, int used, int sum) {
++C[sum];
if(used == N) {
if(sum > max) {
max = sum;
}
return;
}
for(int i=start; i <= N; i++) {
if(nodes[i] < 1) {
continue;
}
--nodes[i];
++used;
for(Integer v : edges.get(i)) {
if(nodes[v] == 1) {
++used;
}
--nodes[v];
}
solve(nodes, i+1, N, used, sum + ci[i]);
for(Integer v : edges.get(i)) {
++nodes[v];
if(nodes[v] == 1) {
--used;
}
}
++nodes[i];
--used;
}
}
public static void main(String[] args) {
/*
3 2
6 8 2
1 2
3 2
*/
Scanner in = new Scanner(System.in);
Solution dm = new Solution();
int N = in.nextInt(), M = in.nextInt();
dm.ci = new int[N+1];
for(int i=1; i <= N; i++) {
dm.ci[i] = in.nextInt();
dm.edges.put(i, new ArrayList<Integer>());
}
for(int i=0; i < M; i++) {
int A = in.nextInt(), B = in.nextInt();
dm.edges.get(A).add(B);
dm.edges.get(B).add(A);
}
int use[] = new int[N+1];
int numZeroes = 0, numIsolated = 0;
for(Map.Entry<Integer, List<Integer>> entry: dm.edges.entrySet()) {
if(entry.getValue().isEmpty()) {
++numIsolated;
dm.max += dm.ci[entry.getKey()];
use[entry.getKey()] = 0;
if(dm.ci[entry.getKey()] == 0) {
++numZeroes;
}
}
else {
use[entry.getKey()] = 1;
}
}
--dm.C[dm.max];
dm.solve(use, 1, N, numIsolated, dm.max);
long ways = Math.max(1, dm.C[dm.max]);
ways *= Math.pow(2, numZeroes);
System.out.println(dm.max + " " + ways);
in.close();
}
}
|
[
"anonymoussaketjoshi@gmail.com"
] |
anonymoussaketjoshi@gmail.com
|
6675d92323f4d6f6e940e5db8538668e41693c93
|
ca030864a3a1c24be6b9d1802c2353da4ca0d441
|
/classes8.dex_source_from_JADX/com/facebook/reviews/util/helper/ReviewsMessagesHelper.java
|
93a539c29e56fc86e06a747d7fbb010aa2137a43
|
[] |
no_license
|
pxson001/facebook-app
|
87aa51e29195eeaae69adeb30219547f83a5b7b1
|
640630f078980f9818049625ebc42569c67c69f7
|
refs/heads/master
| 2020-04-07T20:36:45.758523
| 2018-03-07T09:04:57
| 2018-03-07T09:04:57
| 124,208,458
| 4
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,185
|
java
|
package com.facebook.reviews.util.helper;
import android.content.res.Resources;
import com.facebook.common.android.ResourcesMethodAutoProvider;
import com.facebook.fbservice.service.ServiceException;
import com.facebook.inject.InjectorLike;
import com.facebook.ui.errordialog.ErrorMessageGenerator;
import javax.annotation.Nonnull;
import javax.inject.Inject;
import javax.inject.Singleton;
@Singleton
/* compiled from: profile_video_android_user_creation_flow_finished */
public class ReviewsMessagesHelper {
private static volatile ReviewsMessagesHelper f4980c;
private final Resources f4981a;
private final ErrorMessageGenerator f4982b;
public static com.facebook.reviews.util.helper.ReviewsMessagesHelper m4926a(@javax.annotation.Nullable com.facebook.inject.InjectorLike r5) {
/* JADX: method processing error */
/*
Error: jadx.core.utils.exceptions.JadxRuntimeException: Can't find immediate dominator for block B:24:0x003b in {17, 19, 21, 23, 26, 28} preds:[]
at jadx.core.dex.visitors.blocksmaker.BlockProcessor.computeDominators(BlockProcessor.java:129)
at jadx.core.dex.visitors.blocksmaker.BlockProcessor.processBlocksTree(BlockProcessor.java:48)
at jadx.core.dex.visitors.blocksmaker.BlockProcessor.rerun(BlockProcessor.java:44)
at jadx.core.dex.visitors.blocksmaker.BlockFinallyExtract.visit(BlockFinallyExtract.java:57)
at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)
at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)
at jadx.core.ProcessClass.process(ProcessClass.java:37)
at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:306)
at jadx.api.JavaClass.decompile(JavaClass.java:62)
at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:199)
*/
/*
r0 = f4980c;
if (r0 != 0) goto L_0x0032;
L_0x0004:
r1 = com.facebook.reviews.util.helper.ReviewsMessagesHelper.class;
monitor-enter(r1);
r0 = f4980c; Catch:{ all -> 0x003a }
if (r0 != 0) goto L_0x0031; Catch:{ all -> 0x003a }
L_0x000b:
if (r5 == 0) goto L_0x0031; Catch:{ all -> 0x003a }
L_0x000d:
r2 = com.facebook.inject.ScopeSet.a(); Catch:{ all -> 0x003a }
r3 = r2.b(); Catch:{ all -> 0x003a }
r0 = com.facebook.inject.SingletonScope.class; Catch:{ all -> 0x003a }
r0 = r5.getInstance(r0); Catch:{ all -> 0x003a }
r0 = (com.facebook.inject.SingletonScope) r0; Catch:{ all -> 0x003a }
r4 = r0.enterScope(); Catch:{ all -> 0x003a }
r0 = r5.getApplicationInjector(); Catch:{ all -> 0x0035 }
r0 = m4927b(r0); Catch:{ all -> 0x0035 }
f4980c = r0; Catch:{ all -> 0x0035 }
com.facebook.inject.SingletonScope.a(r4);
r2.c(r3);
L_0x0031:
monitor-exit(r1); Catch:{ }
L_0x0032:
r0 = f4980c;
return r0;
L_0x0035:
r0 = move-exception;
com.facebook.inject.SingletonScope.a(r4); Catch:{ all -> 0x0035 }
throw r0; Catch:{ all -> 0x0035 }
L_0x003a:
r0 = move-exception;
r2.c(r3); Catch:{ all -> 0x003a }
throw r0; Catch:{ all -> 0x003a }
L_0x003f:
r0 = move-exception;
monitor-exit(r1); Catch:{ all -> 0x003a }
throw r0;
*/
throw new UnsupportedOperationException("Method not decompiled: com.facebook.reviews.util.helper.ReviewsMessagesHelper.a(com.facebook.inject.InjectorLike):com.facebook.reviews.util.helper.ReviewsMessagesHelper");
}
private static ReviewsMessagesHelper m4927b(InjectorLike injectorLike) {
return new ReviewsMessagesHelper(ResourcesMethodAutoProvider.a(injectorLike), ErrorMessageGenerator.b(injectorLike));
}
@Inject
public ReviewsMessagesHelper(Resources resources, ErrorMessageGenerator errorMessageGenerator) {
this.f4981a = resources;
this.f4982b = errorMessageGenerator;
}
public final String m4928a() {
return this.f4981a.getString(2131235329);
}
public final String m4929a(@Nonnull ServiceException serviceException) {
String a = this.f4982b.a(serviceException, true, false);
return a != null ? a : m4928a();
}
}
|
[
"son.pham@jmango360.com"
] |
son.pham@jmango360.com
|
e77d8e92763b1c7efc91537705892f54e09852c8
|
3370a0d2a9e3c73340b895de3566f6e32aa3ca4a
|
/alwin-middleware-grapescode/alwin-core-api/src/main/java/com/codersteam/alwin/core/api/service/activity/DeclarationService.java
|
0667bbe83f64610c845cd3befbd844657a3d74da
|
[] |
no_license
|
Wilczek01/alwin-projects
|
8af8e14601bd826b2ec7b3a4ce31a7d0f522b803
|
17cebb64f445206320fed40c3281c99949c47ca3
|
refs/heads/master
| 2023-01-11T16:37:59.535951
| 2020-03-24T09:01:01
| 2020-03-24T09:01:01
| 249,659,398
| 0
| 0
| null | 2023-01-07T16:18:14
| 2020-03-24T09:02:28
|
Java
|
UTF-8
|
Java
| false
| false
| 433
|
java
|
package com.codersteam.alwin.core.api.service.activity;
import javax.ejb.Local;
/**
* Serwis do aktualizacji spłaconych kwot wszystkich deklaracji zlecenia
*
* @author Piotr Naroznik
*/
@Local
public interface DeclarationService {
/**
* Aktualizacja spłaconych kwot wszystkich deklaracji zlecenia
*
* @param issueId - identyfikator zlecenia
*/
void updateIssueDeclarations(final Long issueId);
}
|
[
"grogus@ad.aliorleasing.pl"
] |
grogus@ad.aliorleasing.pl
|
f7814ec30bae20a7c1257fc447e7130b561c2749
|
79e2e3347aaaac76f771beebdf4a50bcb9804e9f
|
/app/src/main/java/com/windmillsteward/jukutech/activity/login/activity/ForgetPasswordActivity.java
|
19c90172448471f7fdce26a4c98afba95c8bde91
|
[] |
no_license
|
inyuo/shunfengche
|
2b3d5ecda7703c8414ad483326a8c05998b4201d
|
a8c2668f43db962b9b0def531c3fe87cc1f0119d
|
refs/heads/master
| 2020-07-13T13:26:44.196536
| 2019-08-06T07:43:38
| 2019-08-06T07:43:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,212
|
java
|
package com.windmillsteward.jukutech.activity.login.activity;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import com.windmillsteward.jukutech.R;
import com.windmillsteward.jukutech.activity.login.presenter.ForgetPasswordlmpl;
import com.windmillsteward.jukutech.base.BaseActivity;
import com.windmillsteward.jukutech.utils.StateButton;
/**
* 描述:忘记密码
* author:cyq
* 2018-02-09
* Created by 2017 广州聚酷软件科技有限公司 All Right Reserved
*/
public class ForgetPasswordActivity extends BaseActivity implements View.OnClickListener,ForgetPasswordView {
private ImageView iv_back;
private EditText et_account;
private TextView btn_code;
private EditText et_code;
private EditText et_password;
private TextView btn_commit;
private ForgetPasswordlmpl forgetPasswordlmpl;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_forget_password);
initView();
}
private void initView() {
iv_back = (ImageView) findViewById(R.id.iv_back);
et_account = (EditText) findViewById(R.id.et_account);
btn_code = (TextView) findViewById(R.id.btn_code);
et_code = (EditText) findViewById(R.id.et_code);
et_password = (EditText) findViewById(R.id.et_password);
btn_commit = (TextView) findViewById(R.id.btn_commit);
btn_code.setOnClickListener(this);
btn_commit.setOnClickListener(this);
iv_back.setOnClickListener(this);
forgetPasswordlmpl = new ForgetPasswordlmpl(this);
}
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.btn_code:
if (TextUtils.isEmpty(et_account.getText().toString())){
showTips("请输入手机号码",1);
return;
}
forgetPasswordlmpl.getForgetPasswrodCode(et_account.getText().toString(),btn_code);
break;
case R.id.btn_commit:
if (TextUtils.isEmpty(et_account.getText().toString())){
showTips("请输入手机号码",1);
return;
}
if (TextUtils.isEmpty(et_code.getText().toString())){
showTips("请输入验证码",1);
return;
}
if (TextUtils.isEmpty(et_password.getText().toString())){
showTips("请输入密码",1);
return;
}
forgetPasswordlmpl.forgetPassword(et_account.getText().toString(),et_password.getText().toString(),et_code.getText().toString());
break;
case R.id.iv_back:
finish();
break;
}
}
@Override
public void forgetPasswordSuccess() {
showTips("重置成功",1);
finish();
}
@Override
public void forgetPasswordFailed(int code, String msg) {
showTips(msg,1);
}
}
|
[
"mxnzp_life@163.com"
] |
mxnzp_life@163.com
|
d2a906ba7e359cd2322b762d218b3f65b48e85c2
|
780e13b7c76f078f89d21df4aef5ebf8a187b75e
|
/spring-functionaltest-web/src/main/java/jp/co/ntt/fw/spring/functionaltest/app/athn/ATHN05Controller.java
|
b9ff5783a50c3312342866824af4ecceaf504cc0
|
[] |
no_license
|
phoenix110/spring-functionaltest
|
dba4e64b5f188a8d276315c20938cee76b949961
|
2671a07e211ceab4ccd925e21f647dfc0586a809
|
refs/heads/master
| 2020-04-16T07:38:23.180197
| 2018-03-08T01:32:35
| 2018-03-09T06:21:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,395
|
java
|
/*
* Copyright 2014-2018 NTT Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package jp.co.ntt.fw.spring.functionaltest.app.athn;
import javax.inject.Inject;
import jp.co.ntt.fw.spring.functionaltest.domain.model.Administrator;
import jp.co.ntt.fw.spring.functionaltest.domain.service.athn.AdministratorService;
import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import org.terasoluna.gfw.common.exception.BusinessException;
import org.terasoluna.gfw.common.message.ResultMessages;
@Controller
public class ATHN05Controller {
@Inject
AdministratorService administratorService;
@RequestMapping(value = "/0501/001", method = RequestMethod.GET)
public String handle05001(Model model, AdministratorForm form) {
return "athn/createAdministratorUsingBCryptPassword";
}
@RequestMapping(value = "/0501/002", method = RequestMethod.GET)
public String handle05002(Model model, AdministratorForm form) {
return "athn/loginForUsingBCryptPassword";
}
@RequestMapping(value = "0501/001/createAdminUsingBCrypt", method = RequestMethod.POST)
public String createAdministratorUsingBCryptPassword(Model model,
@Validated AdministratorForm form, BindingResult result,
RedirectAttributes redirectAttributes) {
if (result.hasErrors()) {
return handle05001(model, form);
}
// Administratorテーブルに管理者情報登録
Administrator administrator = new Administrator();
administrator.setUsername(form.getUsername());
administrator.setPassword(form.getPassword());
try {
administratorService.createUsingBCryptEncode(administrator);
} catch (BusinessException e) {
// 同じユーザ名が存在する場合エラー
model.addAttribute(e.getResultMessages());
return handle05001(model, form);
}
// エンコード前のパスワード
redirectAttributes.addFlashAttribute("beforeEncodePassword", form
.getPassword());
redirectAttributes.addFlashAttribute(administrator);
return "redirect:/athn/0501/001/createCompleteAdminUsingBCrypt?complete";
}
@RequestMapping(value = "0501/001/createCompleteAdminUsingBCrypt", method = RequestMethod.GET, params = "complete")
public String createCompleteAdministratorUsingBCryptPassword(Model model) {
ResultMessages messages = ResultMessages.info().add("i.sf.athn.0001");
model.addAttribute(messages);
return "athn/createCompleteAdministrator";
}
@RequestMapping(value = "0502/001/afterLogin")
public String afterLoginUsingBCryptPassword(
@AuthenticationPrincipal UserDetails userDetails, Model model) {
if (userDetails != null) {
model.addAttribute("username", userDetails.getUsername());
// principalからパスワードを取得できない為、DBから取得
Administrator administrator = administratorService
.findOneByUserName(userDetails.getUsername());
model.addAttribute("administratorPassword", administrator
.getPassword());
}
return "athn/showAdministratorInfoUsingBCryptPassword";
}
}
|
[
"macchinetta.fw@gmail.com"
] |
macchinetta.fw@gmail.com
|
ffa7e333f4106504fa3d900980086836494f44f8
|
b61296555d47ab1c0b258d0c5326a38c8c18a4f2
|
/test/com/facebook/buck/skylark/function/FakeSkylarkUserDefinedRuleFactory.java
|
de1928671acbf5a6ae877a17efbb676dd9ad3564
|
[
"Apache-2.0"
] |
permissive
|
lyft/buck
|
0abe826d62ac1d046aba4518b9c6c2a69358462a
|
5543d7236fb4ba932a692a67926c404f33676ac2
|
refs/heads/master
| 2023-08-20T12:09:30.454709
| 2019-08-15T15:28:18
| 2019-08-15T16:36:13
| 110,744,548
| 1
| 1
|
Apache-2.0
| 2020-10-28T16:27:03
| 2017-11-14T21:04:49
|
Java
|
UTF-8
|
Java
| false
| false
| 4,395
|
java
|
/*
* Copyright 2019-present Facebook, 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.facebook.buck.skylark.function;
import static com.facebook.buck.skylark.function.SkylarkRuleFunctions.IMPLICIT_ATTRIBUTES;
import com.facebook.buck.core.starlark.rule.SkylarkRuleContext;
import com.facebook.buck.core.starlark.rule.SkylarkUserDefinedRule;
import com.facebook.buck.core.starlark.rule.attr.Attribute;
import com.facebook.buck.core.starlark.rule.attr.impl.ImmutableStringAttribute;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.devtools.build.lib.cmdline.Label;
import com.google.devtools.build.lib.cmdline.LabelSyntaxException;
import com.google.devtools.build.lib.events.Location;
import com.google.devtools.build.lib.syntax.BaseFunction;
import com.google.devtools.build.lib.syntax.Environment;
import com.google.devtools.build.lib.syntax.EvalException;
import com.google.devtools.build.lib.syntax.FuncallExpression;
import com.google.devtools.build.lib.syntax.FunctionSignature;
import com.google.devtools.build.lib.syntax.Runtime;
import java.util.function.Function;
import javax.annotation.Nullable;
/** Simple container class to make constructing {@link SkylarkUserDefinedRule}s easier in tests */
public class FakeSkylarkUserDefinedRuleFactory {
private FakeSkylarkUserDefinedRuleFactory() {}
/**
* @return a simple rule with a single string argument "baz" that is exported as {@code
* //foo:bar.bzl:_impl}
*/
public static SkylarkUserDefinedRule createSimpleRule()
throws EvalException, LabelSyntaxException {
return createSingleArgRule(
"some_rule", "baz", new ImmutableStringAttribute("default", "", false, ImmutableList.of()));
}
/** Create a single argument rule with the given argument name and attr to back it */
public static SkylarkUserDefinedRule createSingleArgRule(
String exportedName, String attrName, Attribute<?> attr)
throws EvalException, LabelSyntaxException {
return createSingleArgRuleWithLabel(exportedName, attrName, attr, "//foo:bar.bzl");
}
public static SkylarkUserDefinedRule createSingleArgRuleWithLabel(
String exportedName, String attrName, Attribute<?> attr, String label)
throws EvalException, LabelSyntaxException {
return createRuleFromCallable(exportedName, attrName, attr, label, ctx -> Runtime.NONE);
}
public static SkylarkUserDefinedRule createSimpleRuleFromCallable(
Function<SkylarkRuleContext, Object> callable) throws EvalException, LabelSyntaxException {
return createRuleFromCallable(
"some_rule",
"baz",
new ImmutableStringAttribute("default", "", false, ImmutableList.of()),
"//foo:bar.bzl",
callable);
}
public static SkylarkUserDefinedRule createRuleFromCallable(
String exportedName,
String attrName,
Attribute<?> attr,
String label,
Function<SkylarkRuleContext, Object> callable)
throws EvalException, LabelSyntaxException {
FunctionSignature signature = FunctionSignature.of(1, 0, 0, false, false, "ctx");
BaseFunction implementation =
new BaseFunction("unconfigured", signature) {
@Override
public Object call(Object[] args, @Nullable FuncallExpression ast, Environment env) {
Preconditions.checkArgument(args.length == 1);
Preconditions.checkArgument(args[0] instanceof SkylarkRuleContext);
return callable.apply((SkylarkRuleContext) args[0]);
}
};
SkylarkUserDefinedRule ret =
SkylarkUserDefinedRule.of(
Location.BUILTIN, implementation, IMPLICIT_ATTRIBUTES, ImmutableMap.of(attrName, attr));
ret.export(Label.parseAbsolute(label, ImmutableMap.of()), exportedName);
return ret;
}
}
|
[
"facebook-github-bot@users.noreply.github.com"
] |
facebook-github-bot@users.noreply.github.com
|
0df2d50946319df3a09778e1f2d0353e98b3c3e9
|
14e90976df71b50bb100cf7b0894036538e14207
|
/src/main/resources/archetype-resources/src/main/java/web/BaseController.java
|
63ebdb248b2c476b4000a00bd9e0d5c205e6eb9c
|
[] |
no_license
|
stickgoal/ssm-archetype
|
2d981e414a2b099d99e89b7a3d77c38187e84c5c
|
c31485a6d58317c4a281694d0d67ad4206790c93
|
refs/heads/master
| 2021-09-18T02:58:58.392042
| 2018-07-09T07:21:18
| 2018-07-09T07:21:18
| 103,370,813
| 4
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 390
|
java
|
package ${package}.web;
import org.springframework.format.datetime.DateFormatter;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;
public class BaseController {
@InitBinder
public void initBind(WebDataBinder webDataBinder){
webDataBinder.addCustomFormatter(new DateFormatter("yyyy-MM-dd HH:mm:ss"));
}
}
|
[
"stick.goal@163.com"
] |
stick.goal@163.com
|
dea316cfe2943074c7c77bcc9adcb709bcbed1bb
|
cf9ea07afaf95fbbecf5445cf386574d0e9ac171
|
/ftests/core/src/main/java/org/commonjava/aprox/ftest/core/store/AddAndRetrieveRemoteRepoTest.java
|
a78ca1d456111783e7a722442dfbffe643e8c059
|
[] |
no_license
|
psakar/aprox
|
b58668bfb74d788f7dbce9de2d695c3a43476951
|
0cc6aaf74216a8f3ec758f0f8113b0547af934b8
|
refs/heads/master
| 2020-12-24T20:15:12.317336
| 2015-08-24T14:41:43
| 2015-08-24T14:41:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,491
|
java
|
/**
* Copyright (C) 2011 Red Hat, Inc. (jdcasey@commonjava.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.commonjava.aprox.ftest.core.store;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.junit.Assert.assertThat;
import org.commonjava.aprox.model.core.RemoteRepository;
import org.junit.Test;
public class AddAndRetrieveRemoteRepoTest
extends AbstractStoreManagementTest
{
@Test
public void addMinimalRemoteRepositoryAndRetrieveIt()
throws Exception
{
final RemoteRepository rr = new RemoteRepository( newName(), "http://www.foo.com" );
final RemoteRepository result = client.stores()
.create( rr, name.getMethodName(), RemoteRepository.class );
assertThat( result.getName(), equalTo( rr.getName() ) );
assertThat( result.getUrl(), equalTo( rr.getUrl() ) );
assertThat( result.equals( rr ), equalTo( true ) );
}
}
|
[
"jdcasey@commonjava.org"
] |
jdcasey@commonjava.org
|
1e5df423e5fc835d75249397172619737d20dfa1
|
5a8e39e2a6b1f57cda89b5f70ff537c14b50cc97
|
/xnProject/bpm-api/bmpos-api/src/main/java/com/xn/bmpos/api/bmposapi/interceptor/LogCostInterceptor.java
|
15bc9d139f3176b9c5e0b7e12238786e87feccfb
|
[] |
no_license
|
1123762330/git_test
|
fa074c23ec018200c35d17873a6155bd35227573
|
fcce977d428f1f63bfe8c9f4f53edc56ce357965
|
refs/heads/master
| 2022-12-21T12:17:43.046134
| 2019-07-01T01:32:53
| 2019-07-01T01:32:53
| 161,956,672
| 0
| 1
| null | 2022-12-16T00:01:44
| 2018-12-16T01:03:24
|
Java
|
UTF-8
|
Java
| false
| false
| 1,055
|
java
|
package com.xn.bmpos.api.bmposapi.interceptor;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class LogCostInterceptor implements HandlerInterceptor {
long start = System.currentTimeMillis();
@Override
public boolean preHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o) throws Exception {
if(true){
return true;
}
return false;
}
@Override
public void postHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, ModelAndView modelAndView) throws Exception {
System.out.println("Interceptor cost="+(System.currentTimeMillis()-start));
}
@Override
public void afterCompletion(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, Exception e) throws Exception {
}
}
|
[
"1123762330@qq.com"
] |
1123762330@qq.com
|
41651e59bb855f0ce994bf60061cae67032073b9
|
9402de797fbfbb895ab636408dae6bcd2e9bb7a0
|
/app/src/main/java/com/example/amr/sunbula/Models/APIResponses/VerfiedAccntResponse.java
|
9043dc7f45d284b5be0b5f6070ee60513fc7bc22
|
[] |
no_license
|
Yackeen/Sunbula
|
b70171e1d8866a551e87afdc47226b5c8ae9d48b
|
b789510ed174a5316a852d1bd2ecc552b34f26e8
|
refs/heads/master
| 2021-01-24T21:47:08.544424
| 2017-12-25T21:06:45
| 2017-12-25T21:06:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 478
|
java
|
package com.example.amr.sunbula.Models.APIResponses;
public class VerfiedAccntResponse {
private String ErrorMessage;
private boolean IsSuccess;
public String getErrorMessage() {
return ErrorMessage;
}
public boolean isSuccess() {
return IsSuccess;
}
public void setErrorMessage(String errorMessage) {
ErrorMessage = errorMessage;
}
public void setSuccess(boolean success) {
IsSuccess = success;
}
}
|
[
"amrabdelhameedfcis123@gmail.com"
] |
amrabdelhameedfcis123@gmail.com
|
e824a6f833016c9ed4f2098341c22cefb6173200
|
e2d819d39b010ac0ff95c7f4eb9115581847ea58
|
/src/kr/or/ddit/nn/service/notice/NoticeServiceImpl.java
|
db1e43b8785728fc9d6b9736cbab5ccff565d46d
|
[] |
no_license
|
hhj2019/NuiNuiServer
|
ebd314eb93144d9d300b04069f44c5f69ea17b1c
|
609582a35fce79574faf7f3a9b05aa0eb9d34671
|
refs/heads/master
| 2020-05-30T18:52:19.464808
| 2019-06-03T00:13:50
| 2019-06-03T00:13:50
| 189,908,348
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,290
|
java
|
package kr.or.ddit.nn.service.notice;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
import java.util.List;
import kr.or.ddit.nn.dao.notice.NoticeDaoImpl;
import kr.or.ddit.nn.vo.notice.NoticeVO;
import kr.or.ddit.nn.vo.notice.Notice_OsearchVO;
import kr.or.ddit.nn.vo.notice.Notice_searchVO;
public class NoticeServiceImpl extends UnicastRemoteObject implements NoticeService {
NoticeDaoImpl noticeDao;
private static NoticeServiceImpl service;
private NoticeServiceImpl() throws RemoteException{
super();
noticeDao = NoticeDaoImpl.getInstance();
}
public static NoticeServiceImpl getInstance() throws RemoteException {
if(service== null) {
service = new NoticeServiceImpl();
}
return service;
}
/**
* 공지사항 목록 출력
*/
@Override
public List<NoticeVO> selectAllNotice() throws RemoteException {
return noticeDao.selectAllNotice();
}
/**
* 공지사항 상세 출력
*/
@Override
public NoticeVO selectNoticedetail(int notice_id) throws RemoteException {
return noticeDao.selectNoticedetail(notice_id);
}
/**
* 공지사항 추가
*/
@Override
public int insertNotice(NoticeVO nv) throws RemoteException {
return noticeDao.insertNotice(nv);
}
/**
* 최신 공지사항 출력
*/
@Override
public List<NoticeVO> selectNewNotice() throws RemoteException {
return noticeDao.selectNewNotice();
}
/**
* 공지사항 수정
*/
@Override
public int updateNotice(NoticeVO nv) throws RemoteException {
return noticeDao.updateNotice(nv);
}
/**
* 공지사항 삭제
*/
@Override
public int deleteNotice(int notice_id) throws RemoteException {
return noticeDao.deleteNotice(notice_id);
}
/**
* 공지사항 제목 + 내용 검색
*/
@Override
public List<NoticeVO> allSearchNotice(Notice_searchVO nsv) throws RemoteException {
return noticeDao.allSearchNotice(nsv);
}
/**
* 공지사항 제목 검색
*/
@Override
public List<NoticeVO> titleSearchNotice(Notice_OsearchVO nosv) throws RemoteException {
return noticeDao.titleSearchNotice(nosv);
}
/**
* 공지사항 내용 검색
*/
@Override
public List<NoticeVO> contentSearchNotice(Notice_OsearchVO nosv) throws RemoteException {
return noticeDao.contentSearchNotice(nosv);
}
}
|
[
"40754230+hhj2019@users.noreply.github.com"
] |
40754230+hhj2019@users.noreply.github.com
|
df0cd4df35cceeb94af65802306fc364c31ae55f
|
5d49e39b3d6473b01b53b1c50397b2ab3e2c47b3
|
/Enterprise Projects/ips-outward-producer/src/main/java/com/combank/ips/outward/producer/model/camt_052_001/Garnishment3.java
|
2721aeb9a2f2a3e29fd40b727538c50317ff0bfc
|
[] |
no_license
|
ThivankaWijesooriya/Developer-Mock
|
54524e4319457fddc1050bfdb0b13c39c54017aa
|
3acbaa98ff4b64fe226bcef0f3e69d6738bdbf65
|
refs/heads/master
| 2023-03-02T04:14:18.253449
| 2023-01-28T05:54:06
| 2023-01-28T05:54:06
| 177,391,319
| 0
| 0
| null | 2020-01-08T17:26:30
| 2019-03-24T08:56:29
|
CSS
|
UTF-8
|
Java
| false
| false
| 7,309
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2022.08.22 at 12:41:17 AM IST
//
package com.combank.ips.outward.producer.model.camt_052_001;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.datatype.XMLGregorianCalendar;
import iso.std.iso._20022.tech.xsd.camt_052_001.ActiveOrHistoricCurrencyAndAmount;
import iso.std.iso._20022.tech.xsd.camt_052_001.GarnishmentType1;
import iso.std.iso._20022.tech.xsd.camt_052_001.PartyIdentification135;
/**
* <p>Java class for Garnishment3 complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="Garnishment3">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Tp" type="{urn:iso:std:iso:20022:tech:xsd:camt.052.001.08}GarnishmentType1"/>
* <element name="Grnshee" type="{urn:iso:std:iso:20022:tech:xsd:camt.052.001.08}PartyIdentification135" minOccurs="0"/>
* <element name="GrnshmtAdmstr" type="{urn:iso:std:iso:20022:tech:xsd:camt.052.001.08}PartyIdentification135" minOccurs="0"/>
* <element name="RefNb" type="{urn:iso:std:iso:20022:tech:xsd:camt.052.001.08}Max140Text" minOccurs="0"/>
* <element name="Dt" type="{urn:iso:std:iso:20022:tech:xsd:camt.052.001.08}ISODate" minOccurs="0"/>
* <element name="RmtdAmt" type="{urn:iso:std:iso:20022:tech:xsd:camt.052.001.08}ActiveOrHistoricCurrencyAndAmount" minOccurs="0"/>
* <element name="FmlyMdclInsrncInd" type="{urn:iso:std:iso:20022:tech:xsd:camt.052.001.08}TrueFalseIndicator" minOccurs="0"/>
* <element name="MplyeeTermntnInd" type="{urn:iso:std:iso:20022:tech:xsd:camt.052.001.08}TrueFalseIndicator" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Garnishment3", propOrder = {
"tp",
"grnshee",
"grnshmtAdmstr",
"refNb",
"dt",
"rmtdAmt",
"fmlyMdclInsrncInd",
"mplyeeTermntnInd"
})
public class Garnishment3 {
@XmlElement(name = "Tp", required = true)
protected GarnishmentType1 tp;
@XmlElement(name = "Grnshee")
protected PartyIdentification135 grnshee;
@XmlElement(name = "GrnshmtAdmstr")
protected PartyIdentification135 grnshmtAdmstr;
@XmlElement(name = "RefNb")
protected String refNb;
@XmlElement(name = "Dt")
protected XMLGregorianCalendar dt;
@XmlElement(name = "RmtdAmt")
protected ActiveOrHistoricCurrencyAndAmount rmtdAmt;
@XmlElement(name = "FmlyMdclInsrncInd")
protected Boolean fmlyMdclInsrncInd;
@XmlElement(name = "MplyeeTermntnInd")
protected Boolean mplyeeTermntnInd;
/**
* Gets the value of the tp property.
*
* @return
* possible object is
* {@link GarnishmentType1 }
*
*/
public GarnishmentType1 getTp() {
return tp;
}
/**
* Sets the value of the tp property.
*
* @param value
* allowed object is
* {@link GarnishmentType1 }
*
*/
public void setTp(GarnishmentType1 value) {
this.tp = value;
}
/**
* Gets the value of the grnshee property.
*
* @return
* possible object is
* {@link PartyIdentification135 }
*
*/
public PartyIdentification135 getGrnshee() {
return grnshee;
}
/**
* Sets the value of the grnshee property.
*
* @param value
* allowed object is
* {@link PartyIdentification135 }
*
*/
public void setGrnshee(PartyIdentification135 value) {
this.grnshee = value;
}
/**
* Gets the value of the grnshmtAdmstr property.
*
* @return
* possible object is
* {@link PartyIdentification135 }
*
*/
public PartyIdentification135 getGrnshmtAdmstr() {
return grnshmtAdmstr;
}
/**
* Sets the value of the grnshmtAdmstr property.
*
* @param value
* allowed object is
* {@link PartyIdentification135 }
*
*/
public void setGrnshmtAdmstr(PartyIdentification135 value) {
this.grnshmtAdmstr = value;
}
/**
* Gets the value of the refNb property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getRefNb() {
return refNb;
}
/**
* Sets the value of the refNb property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setRefNb(String value) {
this.refNb = value;
}
/**
* Gets the value of the dt property.
*
* @return
* possible object is
* {@link XMLGregorianCalendar }
*
*/
public XMLGregorianCalendar getDt() {
return dt;
}
/**
* Sets the value of the dt property.
*
* @param value
* allowed object is
* {@link XMLGregorianCalendar }
*
*/
public void setDt(XMLGregorianCalendar value) {
this.dt = value;
}
/**
* Gets the value of the rmtdAmt property.
*
* @return
* possible object is
* {@link ActiveOrHistoricCurrencyAndAmount }
*
*/
public ActiveOrHistoricCurrencyAndAmount getRmtdAmt() {
return rmtdAmt;
}
/**
* Sets the value of the rmtdAmt property.
*
* @param value
* allowed object is
* {@link ActiveOrHistoricCurrencyAndAmount }
*
*/
public void setRmtdAmt(ActiveOrHistoricCurrencyAndAmount value) {
this.rmtdAmt = value;
}
/**
* Gets the value of the fmlyMdclInsrncInd property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isFmlyMdclInsrncInd() {
return fmlyMdclInsrncInd;
}
/**
* Sets the value of the fmlyMdclInsrncInd property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setFmlyMdclInsrncInd(Boolean value) {
this.fmlyMdclInsrncInd = value;
}
/**
* Gets the value of the mplyeeTermntnInd property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isMplyeeTermntnInd() {
return mplyeeTermntnInd;
}
/**
* Sets the value of the mplyeeTermntnInd property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setMplyeeTermntnInd(Boolean value) {
this.mplyeeTermntnInd = value;
}
}
|
[
"thivankawijesooriya@gmail.com"
] |
thivankawijesooriya@gmail.com
|
93055262fe99539b45c084103ab7f3421970ac1e
|
a1a6c1b700c9cd8cba1fd43fbc83af071dfd2800
|
/kaixin_source/src/com/google/common/collect/Range.java
|
188114029a368a1bd3246a3c501571e0117100dd
|
[] |
no_license
|
jingshauizh/kaixin
|
58c315f99dcdde09589471fcaa262e0a1598701c
|
11b8d109862dba00b7a78f9002e47064f26a0175
|
refs/heads/master
| 2021-07-11T00:55:46.997368
| 2021-04-16T09:41:47
| 2021-04-16T09:41:47
| 25,718,738
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,610
|
java
|
package com.google.common.collect;
import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import com.google.common.base.Preconditions;
import com.google.common.base.Predicate;
import java.io.Serializable;
import java.util.Comparator;
import java.util.Iterator;
import java.util.NoSuchElementException;
import java.util.SortedSet;
import javax.annotation.Nullable;
@Beta
@GwtCompatible
public final class Range<C extends Comparable>
implements Predicate<C>, Serializable
{
private static final long serialVersionUID;
final Cut<C> lowerBound;
final Cut<C> upperBound;
Range(Cut<C> paramCut1, Cut<C> paramCut2)
{
if (paramCut1.compareTo(paramCut2) > 0)
throw new IllegalArgumentException("Invalid range: " + toString(paramCut1, paramCut2));
this.lowerBound = paramCut1;
this.upperBound = paramCut2;
}
private static <T> SortedSet<T> cast(Iterable<T> paramIterable)
{
return (SortedSet)paramIterable;
}
static int compareOrThrow(Comparable paramComparable1, Comparable paramComparable2)
{
return paramComparable1.compareTo(paramComparable2);
}
private static String toString(Cut<?> paramCut1, Cut<?> paramCut2)
{
StringBuilder localStringBuilder = new StringBuilder(16);
paramCut1.describeAsLowerBound(localStringBuilder);
localStringBuilder.append('‥');
paramCut2.describeAsUpperBound(localStringBuilder);
return localStringBuilder.toString();
}
public boolean apply(C paramC)
{
return contains(paramC);
}
@GwtCompatible(serializable=false)
public ContiguousSet<C> asSet(DiscreteDomain<C> paramDiscreteDomain)
{
Preconditions.checkNotNull(paramDiscreteDomain);
Object localObject = this;
while (true)
{
try
{
if (hasLowerBound())
continue;
localObject = ((Range)localObject).intersection(Ranges.atLeast(paramDiscreteDomain.minValue()));
if (hasUpperBound())
continue;
Range localRange = ((Range)localObject).intersection(Ranges.atMost(paramDiscreteDomain.maxValue()));
localObject = localRange;
if ((((Range)localObject).isEmpty()) || (compareOrThrow(this.lowerBound.leastValueAbove(paramDiscreteDomain), this.upperBound.greatestValueBelow(paramDiscreteDomain)) > 0))
{
i = 1;
if (i == 0)
break;
return new EmptyContiguousSet(paramDiscreteDomain);
}
}
catch (NoSuchElementException localNoSuchElementException)
{
throw new IllegalArgumentException(localNoSuchElementException);
}
int i = 0;
}
return (ContiguousSet<C>)new RegularContiguousSet((Range)localObject, paramDiscreteDomain);
}
public Range<C> canonical(DiscreteDomain<C> paramDiscreteDomain)
{
Preconditions.checkNotNull(paramDiscreteDomain);
Cut localCut1 = this.lowerBound.canonical(paramDiscreteDomain);
Cut localCut2 = this.upperBound.canonical(paramDiscreteDomain);
if ((localCut1 == this.lowerBound) && (localCut2 == this.upperBound))
return this;
return Ranges.create(localCut1, localCut2);
}
public boolean contains(C paramC)
{
Preconditions.checkNotNull(paramC);
return (this.lowerBound.isLessThan(paramC)) && (!this.upperBound.isLessThan(paramC));
}
public boolean containsAll(Iterable<? extends C> paramIterable)
{
if (Iterables.isEmpty(paramIterable));
Iterator localIterator;
do
while (!localIterator.hasNext())
{
return true;
if ((paramIterable instanceof SortedSet))
{
SortedSet localSortedSet = cast(paramIterable);
Comparator localComparator = localSortedSet.comparator();
if ((Ordering.natural().equals(localComparator)) || (localComparator == null))
{
if ((contains((Comparable)localSortedSet.first())) && (contains((Comparable)localSortedSet.last())));
for (int i = 1; ; i = 0)
return i;
}
}
localIterator = paramIterable.iterator();
}
while (contains((Comparable)localIterator.next()));
return false;
}
public boolean encloses(Range<C> paramRange)
{
return (this.lowerBound.compareTo(paramRange.lowerBound) <= 0) && (this.upperBound.compareTo(paramRange.upperBound) >= 0);
}
public boolean equals(@Nullable Object paramObject)
{
boolean bool1 = paramObject instanceof Range;
int i = 0;
if (bool1)
{
Range localRange = (Range)paramObject;
boolean bool2 = this.lowerBound.equals(localRange.lowerBound);
i = 0;
if (bool2)
{
boolean bool3 = this.upperBound.equals(localRange.upperBound);
i = 0;
if (bool3)
i = 1;
}
}
return i;
}
public boolean hasLowerBound()
{
return this.lowerBound != Cut.belowAll();
}
public boolean hasUpperBound()
{
return this.upperBound != Cut.aboveAll();
}
public int hashCode()
{
return 31 * this.lowerBound.hashCode() + this.upperBound.hashCode();
}
public Range<C> intersection(Range<C> paramRange)
{
return Ranges.create((Cut)Ordering.natural().max(this.lowerBound, paramRange.lowerBound), (Cut)Ordering.natural().min(this.upperBound, paramRange.upperBound));
}
public boolean isConnected(Range<C> paramRange)
{
return (this.lowerBound.compareTo(paramRange.upperBound) <= 0) && (paramRange.lowerBound.compareTo(this.upperBound) <= 0);
}
public boolean isEmpty()
{
return this.lowerBound.equals(this.upperBound);
}
public BoundType lowerBoundType()
{
return this.lowerBound.typeAsLowerBound();
}
public C lowerEndpoint()
{
return this.lowerBound.endpoint();
}
public Range<C> span(Range<C> paramRange)
{
return Ranges.create((Cut)Ordering.natural().min(this.lowerBound, paramRange.lowerBound), (Cut)Ordering.natural().max(this.upperBound, paramRange.upperBound));
}
public String toString()
{
return toString(this.lowerBound, this.upperBound);
}
public BoundType upperBoundType()
{
return this.upperBound.typeAsUpperBound();
}
public C upperEndpoint()
{
return this.upperBound.endpoint();
}
}
/* Location: C:\9exce\android\pj\kaixin_android_3.9.9_034_kaixin001\classes_dex2jar.jar
* Qualified Name: com.google.common.collect.Range
* JD-Core Version: 0.6.0
*/
|
[
"jingshuaizh@163.com"
] |
jingshuaizh@163.com
|
0711999ffae8b1f2d6968e79b226dfbda2c2c420
|
106e700eabaf18759a78bac00ffc8a0f4c0bd966
|
/src/main/java/rocks/zipcode/atm/controllers/WithdrawController.java
|
1c63fc134bea99b59469f6ddb84dee8640c827f7
|
[
"MIT"
] |
permissive
|
ushrestha703/CashMachineWeekend2Group
|
de1040af84a6e9239c04e58e87ceeb54adfd2f05
|
fa2f01bdb6a5dfac36fbd726cbbc530bf309ada3
|
refs/heads/master
| 2021-01-16T09:54:10.925034
| 2020-02-24T00:40:36
| 2020-02-24T00:40:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,643
|
java
|
package rocks.zipcode.atm.controllers;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.TextArea;
import javafx.scene.control.TextField;
import javafx.scene.input.KeyCode;
import javafx.scene.layout.FlowPane;
import javafx.scene.layout.VBox;
import javafx.scene.paint.Color;
import javafx.stage.Stage;
import java.math.BigDecimal;
import java.text.DecimalFormat;
public class WithdrawController {
public static String getBadWithdrawText(Float amt) {
DecimalFormat df = new DecimalFormat("###,###,###,###,###.##");
df.setDecimalSeparatorAlwaysShown(true);
df.setMinimumFractionDigits(2);
BigDecimal bal = new BigDecimal(CashMachineApp.getCashMachine().getBalance());
BigDecimal amtt = new BigDecimal(amt);
if (CashMachineApp.getCashMachine().getBalance() < 0) {
String value = df.format(bal.multiply(BigDecimal.valueOf(-1.0)));
String amtVal = df.format(amt);
return "Withdraw failed!\nCannot withdraw $" + amtVal + ".\n" + CashMachineApp.getCashMachine().getCurrentUser().getName() + " only has -$" + value;
} else {
String value = df.format(bal);
String amtVal = df.format(amt);
return "Withdraw failed!\nCannot withdraw $" + amtVal + ".\n" + CashMachineApp.getCashMachine().getCurrentUser().getName() + " only has $" + value;
}
}
public static void setupListeners(Stage primaryStage, Scene oldScene, Button withdrawBtn, Button returnBtn, TextField inputText, Label negInputLbl, Label badInputLbl, Label badWithdraw, TextArea machineInfo) {
withdrawBtn.setOnAction(e -> {
try {
Float amount = Float.parseFloat(inputText.getText());
if (amount < 0) {
negInputLbl.setVisible(true);
inputText.setText("");
badInputLbl.setVisible(false);
badWithdraw.setVisible(false);
}
else if (CashMachineApp.getCashMachine().isLoggedIn() && CashMachineApp.getCashMachine().getCurrentUser().canWithdraw(amount)) {
CashMachineApp.getCashMachine().withdraw(amount, CashMachineApp.getCashMachine().getCurrentUser());
machineInfo.setText(CashMachineApp.print());
inputText.setText("");
badInputLbl.setVisible(false);
badWithdraw.setVisible(false);
negInputLbl.setVisible(false);
} else {
badWithdraw.setText(getBadWithdrawText(amount));
badInputLbl.setVisible(false);
badWithdraw.setVisible(true);
negInputLbl.setVisible(false);
inputText.setText("");
}
} catch(NumberFormatException ex) { if (!inputText.getText().equals("")) { inputText.setText(""); badWithdraw.setVisible(false); negInputLbl.setVisible(false); badInputLbl.setVisible(true); }}
});
returnBtn.setOnAction(e -> {
primaryStage.setScene(oldScene);
});
withdrawBtn.setOnKeyPressed(event -> {
if (event.getCode().equals(KeyCode.ENTER)) {
withdrawBtn.fire();
}
}
);
returnBtn.setOnKeyPressed(event -> {
if (event.getCode().equals(KeyCode.ENTER)) {
returnBtn.fire();
}
}
);
}
}
|
[
"nyoxidetwitter@gmail.com"
] |
nyoxidetwitter@gmail.com
|
6e4ce5f5feb56d3e2bd942438273d211f8931f56
|
5ca3901b424539c2cf0d3dda52d8d7ba2ed91773
|
/src_procyon/y/c/l.java
|
b44dfadfaeb3843a7cd359d220a4f87c4ae1b8b1
|
[] |
no_license
|
fjh658/bindiff
|
c98c9c24b0d904be852182ecbf4f81926ce67fb4
|
2a31859b4638404cdc915d7ed6be19937d762743
|
refs/heads/master
| 2021-01-20T06:43:12.134977
| 2016-06-29T17:09:03
| 2016-06-29T17:09:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,613
|
java
|
package y.c;
import java.util.*;
public class l extends EventObject
{
private Object a;
private byte b;
public l(final i i, final byte b, final Object a) {
super(i);
this.b = b;
this.a = a;
}
public byte a() {
return this.b;
}
public Object b() {
return this.a;
}
public i c() {
return (i)this.getSource();
}
public String toString() {
return this.a(this.a());
}
private String a(final byte b) {
switch (b) {
case 0: {
return "NODE_CREATION";
}
case 1: {
return "EDGE_CREATION";
}
case 2: {
return "PRE_NODE_REMOVAL";
}
case 3: {
return "POST_NODE_REMOVAL";
}
case 4: {
return "PRE_EDGE_REMOVAL";
}
case 5: {
return "POST_EDGE_REMOVAL";
}
case 6: {
return "NODE_REINSERTION";
}
case 7: {
return "EDGE_REINSERTION";
}
case 8: {
return "PRE_EDGE_CHANGE";
}
case 9: {
return "POST_EDGE_CHANGE";
}
case 10: {
return "SUBGRAPH_INSERTION";
}
case 11: {
return "SUBGRAPH_REMOVAL";
}
case 12: {
return "PRE_EVENT";
}
case 13: {
return "POST_EVENT";
}
default: {
return "UNKNOWN TYPE (" + b + ")";
}
}
}
static l a(final i i, final q q) {
return new l(i, (byte)0, q);
}
static l a(final i i, final d d) {
return new l(i, (byte)1, d);
}
static l b(final i i, final q q) {
return new l(i, (byte)2, q);
}
static l c(final i i, final q q) {
return new l(i, (byte)3, q);
}
static l b(final i i, final d d) {
return new l(i, (byte)4, d);
}
static l c(final i i, final d d) {
return new l(i, (byte)5, d);
}
static l d(final i i, final q q) {
return new l(i, (byte)6, q);
}
static l d(final i i, final d d) {
return new l(i, (byte)7, d);
}
static l a(final i i) {
return new l(i, (byte)12, null);
}
static l b(final i i) {
return new l(i, (byte)13, null);
}
}
|
[
"manouchehri@riseup.net"
] |
manouchehri@riseup.net
|
369810ffe8c19d9f1960a290b976d37a24acbcaf
|
484aa8477633739f34dbbcc8e2decf62c88c8175
|
/JavaBasic/src/com/syntax/class10/Task2d.java
|
73948730632bb02d47fb246b2dafd06ebe6a0156
|
[] |
no_license
|
samuelwoldegiorgis/Sam-s-Batch6
|
d3bfdef6b29086107e9ac5b3c2299479fad6b30e
|
37f6079eb7b443b833ea115151a87455e6796fd0
|
refs/heads/master
| 2021-05-18T22:21:09.342286
| 2020-04-13T23:52:35
| 2020-04-13T23:52:35
| 251,451,863
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 265
|
java
|
package com.syntax.class10;
public class Task2d {
public static void main(String[] args) {
String [][]months={{"January", "February","December",
"March","April","May"}};
for (int x=0; x<months.length; x++) {
System.out.println();
for (int y=0)
}
}
}
|
[
"samgmil19@gmail.com"
] |
samgmil19@gmail.com
|
f0f12ddf967d839a7e40a06d05428ab1be61c64f
|
7822eb2f86317aebf6e689da2a6708e9cc4ee1ea
|
/Rachio_apk/sources/com/rachio/iro/gen2/model/NetworkRequest.java
|
4602301977bcec25bd5db55d598026f65cba44d1
|
[
"BSD-2-Clause"
] |
permissive
|
UCLA-ECE209AS-2018W/Haoming-Liang
|
9abffa33df9fc7be84c993873dac39159b05ef04
|
f567ae0adc327b669259c94cc49f9b29f50d1038
|
refs/heads/master
| 2021-04-06T20:29:41.296769
| 2018-03-21T05:39:43
| 2018-03-21T05:39:43
| 125,328,864
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 140
|
java
|
package com.rachio.iro.gen2.model;
public class NetworkRequest {
public String key;
public int security;
public String ssid;
}
|
[
"zan@s-164-67-234-113.resnet.ucla.edu"
] |
zan@s-164-67-234-113.resnet.ucla.edu
|
70f77ef333f109687a67209e8671bafc4ea52da4
|
458fcdf38b88334f2026331b7b9cf70d5e6897d5
|
/app/src/main/java/com/dingmouren/rxjavademo/辅助操作符/FinallyDoDemo.java
|
8e81db6187249f2a11dbd6f49df5606df5858744
|
[] |
no_license
|
my-zhao/RxJavaDemo
|
8b76606d5f54bf03adcf3ab2b33393d79f7fcd80
|
701d4a3d6c34197d5cad1bdee3570d23c28ee815
|
refs/heads/master
| 2021-01-06T20:45:28.989194
| 2016-12-27T08:41:03
| 2016-12-27T08:41:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,152
|
java
|
package com.dingmouren.rxjavademo.辅助操作符;
import rx.Observable;
import rx.Subscriber;
import rx.functions.Action0;
/**
* Created by dingmouren on 2016/12/21.
* finallyDo操作符注册了一个动作,Observable完成之后,不管是异常终止还是正常完成都会执行这个回调函数
*/
public class FinallyDoDemo {
public static void main(String[] args){
Observable.just(1,2,3,4).finallyDo(new Action0() {
@Override
public void call() {
System.out.println("finallyDo(Action0) call执行了:" );
}
}).subscribe(new Subscriber<Integer>() {
@Override
public void onCompleted() {
System.out.println("finallyDo(Action0) onCompleted:" );
}
@Override
public void onError(Throwable e) {
System.out.println("finallyDo(Action0) onError:" + e.toString());
}
@Override
public void onNext(Integer integer) {
System.out.println("finallyDo(Action0) onNext:" + integer);
}
}).unsubscribe();
}
}
|
[
"1341520108@qq.com"
] |
1341520108@qq.com
|
0445f35f73ceea24681a0a783a235dfaa88d9054
|
3529ecaa44a53172094ba13498097057c8972723
|
/Questiondir/646.maximum-length-of-pair-chain/646.maximum-length-of-pair-chain_110731708.java
|
4d117fdc19a8c635af17154af81170daf9367dc6
|
[] |
no_license
|
cczhong11/Leetcode-contest-code-downloader
|
0681f0f8c9e8edd5371fd8d0a1d37dcc368566b6
|
db64a67869aae4f0e55e78b65a7e04f5bc2e671c
|
refs/heads/master
| 2021-09-07T15:36:38.892742
| 2018-02-25T04:15:17
| 2018-02-25T04:15:17
| 118,612,867
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,175
|
java
|
public class Solution {
List<Integer>[] graph;
int[] longestChainFrom;
boolean[] visited;
int maxLength;
public int findLongestChain(int[][] pairs) {
maxLength=0;
graph = new List[pairs.length];
for(int i=0; i<pairs.length; ++i)
graph[i]=new ArrayList<Integer>();
for(int i=0; i<pairs.length; ++i) {
for(int j=0; j<pairs.length; ++j) {
if(i==j)
continue;
if(pairs[i][1]<pairs[j][0])
graph[i].add(j);
}
}
longestChainFrom = new int[pairs.length];
visited = new boolean[pairs.length];
for(int i=0; i<pairs.length; ++i)
if(!visited[i])
dfs(i);
return maxLength;
}
void dfs(int node) {
longestChainFrom[node]=1;
visited[node]=true;
for(int neighbor:graph[node]) {
if(!visited[neighbor])
dfs(neighbor);
longestChainFrom[node]=Math.max(longestChainFrom[node], longestChainFrom[neighbor]+1);
}
maxLength=Math.max(maxLength, longestChainFrom[node]);
}
}
|
[
"tczhong24@gmail.com"
] |
tczhong24@gmail.com
|
f064ecb2c3ebc7e8f90df479a0ffb17199078af6
|
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
|
/com.tencent.mobileqqi/classes.jar/NS_MOBILE_MUSIC/GetAllBgMusicListRsp.java
|
4d9ffc60ff8d81b262229e1cfa5a3382b7bf01da
|
[] |
no_license
|
tsuzcx/qq_apk
|
0d5e792c3c7351ab781957bac465c55c505caf61
|
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
|
refs/heads/main
| 2022-07-02T10:32:11.651957
| 2022-02-01T12:41:38
| 2022-02-01T12:41:38
| 453,860,108
| 36
| 9
| null | 2022-01-31T09:46:26
| 2022-01-31T02:43:22
|
Java
|
UTF-8
|
Java
| false
| false
| 2,412
|
java
|
package NS_MOBILE_MUSIC;
import com.qq.taf.jce.JceInputStream;
import com.qq.taf.jce.JceOutputStream;
import com.qq.taf.jce.JceStruct;
import java.util.ArrayList;
public final class GetAllBgMusicListRsp
extends JceStruct
{
static ArrayList cache_all_music_list;
public ArrayList all_music_list = null;
public int all_music_nums = 0;
public byte green_diamond_flag = 0;
public boolean music_can_play = true;
public byte play_mode_flag = 0;
public byte wifi_auto_play = 0;
public GetAllBgMusicListRsp() {}
public GetAllBgMusicListRsp(byte paramByte1, boolean paramBoolean, int paramInt, ArrayList paramArrayList, byte paramByte2, byte paramByte3)
{
this.green_diamond_flag = paramByte1;
this.music_can_play = paramBoolean;
this.all_music_nums = paramInt;
this.all_music_list = paramArrayList;
this.wifi_auto_play = paramByte2;
this.play_mode_flag = paramByte3;
}
public void readFrom(JceInputStream paramJceInputStream)
{
this.green_diamond_flag = paramJceInputStream.read(this.green_diamond_flag, 0, false);
this.music_can_play = paramJceInputStream.read(this.music_can_play, 1, false);
this.all_music_nums = paramJceInputStream.read(this.all_music_nums, 2, false);
if (cache_all_music_list == null)
{
cache_all_music_list = new ArrayList();
MusicInfo localMusicInfo = new MusicInfo();
cache_all_music_list.add(localMusicInfo);
}
this.all_music_list = ((ArrayList)paramJceInputStream.read(cache_all_music_list, 3, false));
this.wifi_auto_play = paramJceInputStream.read(this.wifi_auto_play, 4, false);
this.play_mode_flag = paramJceInputStream.read(this.play_mode_flag, 5, false);
}
public void writeTo(JceOutputStream paramJceOutputStream)
{
paramJceOutputStream.write(this.green_diamond_flag, 0);
paramJceOutputStream.write(this.music_can_play, 1);
paramJceOutputStream.write(this.all_music_nums, 2);
if (this.all_music_list != null) {
paramJceOutputStream.write(this.all_music_list, 3);
}
paramJceOutputStream.write(this.wifi_auto_play, 4);
paramJceOutputStream.write(this.play_mode_flag, 5);
}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mobileqqi\classes2.jar
* Qualified Name: NS_MOBILE_MUSIC.GetAllBgMusicListRsp
* JD-Core Version: 0.7.0.1
*/
|
[
"98632993+tsuzcx@users.noreply.github.com"
] |
98632993+tsuzcx@users.noreply.github.com
|
8ec6009daa7c00495a2b93f5ef6fd68fcffbcdc6
|
431d8362e87e61ee568d79c57e13c4a0b0e02d2e
|
/lara/sep-4th batch/java/logical coding(number systems)/H.java
|
4e472f4b6e6408b68a69fb8e189fc30884666de8
|
[] |
no_license
|
svsaikumar/lara
|
09b3fa9fb2fcee70840d02bdce56148f3a3bf259
|
ed0bfbdfa0a0e668c6ffdd720d80551e03bb93db
|
refs/heads/master
| 2020-03-27T08:53:34.246569
| 2018-08-27T13:56:22
| 2018-08-27T13:56:22
| 146,295,997
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 523
|
java
|
class H//to verify the given number is a perfect number or not
{
public static void main(String[] args)
{
if(args.length < 1)
{
System.out.println("please supply one command line argument ");
return;
}
int num = Integer.parseInt(args[0]);
int sum= 0;
for(int i = 1;i <= num /2;i++)
{
if (num % i ==0 )
{
sum += i;
}
}
if(num == sum)
{
System.out.println("number " +num + " is a perfect ");
}
else
{
System.out.println("number " +num + " is not a perfect ");
}
}
}
|
[
"saikumarsv77@gmail.com"
] |
saikumarsv77@gmail.com
|
6ba7ee747285f1836249604f9510ec4f4adb8309
|
e808d3e97e19558d15bacbcfeb9785014f2eb93a
|
/onebusaway-users/src/main/java/org/onebusaway/users/impl/UserPropertiesServiceVersionedInvocationHandler.java
|
d32f678e1c12119c27b8239e8c26537fb808620e
|
[
"Apache-2.0"
] |
permissive
|
isabella232/onebusaway-application-modules
|
82793b63678f21e28c98093cb71b333a2e22a3c1
|
d2ca6c6e0038d158c9df487cab9f75d18b1214ff
|
refs/heads/master
| 2023-03-08T20:02:35.766999
| 2019-01-03T16:41:11
| 2019-01-03T16:41:11
| 335,592,972
| 0
| 0
|
NOASSERTION
| 2021-02-24T05:43:58
| 2021-02-03T10:50:26
| null |
UTF-8
|
Java
| false
| false
| 3,913
|
java
|
/**
* Copyright (C) 2011 Brian Ferris <bdferris@onebusaway.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.onebusaway.users.impl;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.util.concurrent.atomic.AtomicInteger;
import org.onebusaway.users.model.User;
import org.onebusaway.users.model.UserIndex;
import org.onebusaway.users.model.UserProperties;
import org.onebusaway.users.model.UserPropertiesV1;
import org.onebusaway.users.model.properties.UserPropertiesV2;
import org.onebusaway.users.services.UserPropertiesService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.jmx.export.annotation.ManagedAttribute;
import org.springframework.jmx.export.annotation.ManagedResource;
@ManagedResource("org.onebusaway.users.impl:name=UserPropertiesServiceVersionedInvocationHandler")
public class UserPropertiesServiceVersionedInvocationHandler implements InvocationHandler {
private static Logger _log = LoggerFactory.getLogger(UserPropertiesServiceVersionedInvocationHandler.class);
private UserPropertiesService _userServiceV1;
private UserPropertiesService _userServiceV2;
private int _preferredVersion = -1;
private AtomicInteger _v1References = new AtomicInteger();
private AtomicInteger _v2References = new AtomicInteger();
public void setUserPropertiesServiceV1(UserPropertiesService userServiceV1) {
_userServiceV1 = userServiceV1;
}
public void setUserPropertiesServiceV2(UserPropertiesService userServiceV2) {
_userServiceV2 = userServiceV2;
}
public void setPreferredVersion(int preferredVersion) {
_preferredVersion = preferredVersion;
}
@ManagedAttribute
public int getV1References() {
return _v1References.get();
}
@ManagedAttribute
public int getV2References() {
return _v2References.get();
}
@Override
public Object invoke(Object proxy, Method method, Object[] args)
throws Throwable {
UserPropertiesService service = getServiceForUserArgs(args);
return method.invoke(service, args);
}
private UserPropertiesService getServiceForUserArgs(Object[] args) {
if (_preferredVersion != -1)
return getServiceForVersion(_preferredVersion);
int maxVersion = 0;
if (args != null) {
for (Object arg : args) {
if (arg instanceof User) {
User user = (User) arg;
int version = getPropertiesVersion(user);
maxVersion = Math.max(maxVersion, version);
} else if (arg instanceof UserIndex) {
UserIndex userIndex = (UserIndex) arg;
int version = getPropertiesVersion(userIndex.getUser());
maxVersion = Math.max(maxVersion, version);
}
}
}
return getServiceForVersion(maxVersion);
}
private int getPropertiesVersion(User user) {
UserProperties props = user.getProperties();
if (props instanceof UserPropertiesV1)
return 1;
if (props instanceof UserPropertiesV2)
return 2;
_log.warn("unknown user properties version: " + props.getClass());
return 0;
}
private UserPropertiesService getServiceForVersion(int maxVersion) {
switch (maxVersion) {
case 1:
default:
_v1References.incrementAndGet();
return _userServiceV1;
case 2:
_v2References.incrementAndGet();
return _userServiceV2;
}
}
}
|
[
"bdferris@google.com"
] |
bdferris@google.com
|
893fab0417c53010a743786b8d161a4be5c65226
|
dffafa3283480e34144944878b7b8db9b7b78fed
|
/Cvac/src/main/java/cn/misection/cvac/codegen/bst/bclas/IClass.java
|
3bb0f6034b86bc530f96001264e4985c18da8870
|
[
"MIT"
] |
permissive
|
WenTop1/Cva
|
0bd1c3e1e2999c4104c82d62f08732514523cd0b
|
d9de791d73f82339f2b31019246f9a93a082da3f
|
refs/heads/master
| 2023-03-19T13:13:53.779435
| 2021-03-08T08:24:01
| 2021-03-08T08:24:01
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 316
|
java
|
package cn.misection.cvac.codegen.bst.bclas;
import cn.misection.cvac.codegen.bst.IBackendSyntaxTree;
/**
* @author Military Intelligence 6 root
* @version 1.0.0
* @ClassName AbstractClass
* @Description TODO
* @CreateTime 2021年02月14日 18:01:00
*/
public interface IClass extends IBackendSyntaxTree
{
}
|
[
"hlrongzun@qq.com"
] |
hlrongzun@qq.com
|
7e6b5348cbcbb2250a8e8c4a6be874cf8fee91fd
|
5db11b0c9098351480c57de617336ab7dff483e1
|
/data/scripts/system/handlers/admincommands/Who.java
|
eb134e3b83fdfe60383d3424c759a257aa9b7dbf
|
[] |
no_license
|
VictorManKBO/aion_gserver_4_0
|
d7c6383a005f1a716fcee5e4bd0c33df30a0e0c5
|
ed24bf40c9fcff34cd0c64243b10ab44e60bb258
|
refs/heads/master
| 2022-11-15T19:52:47.654179
| 2020-07-13T10:16:04
| 2020-07-13T10:16:04
| 277,644,635
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,276
|
java
|
package admincommands;
import com.aionemu.gameserver.model.Race;
import com.aionemu.gameserver.model.gameobjects.player.Player;
import com.aionemu.gameserver.utils.PacketSendUtility;
import com.aionemu.gameserver.utils.chathandlers.AdminCommand;
import com.aionemu.gameserver.world.World;
import java.util.Collection;
public class Who extends AdminCommand
{
public Who()
{
super("who");
}
@Override
public void execute(Player admin, String... params) {
Collection<Player> players = World.getInstance().getAllPlayers();
PacketSendUtility.sendMessage(admin, "List players :");
for (Player player : players) {
if (params != null && params.length > 0) {
String cmd = params[0].toLowerCase();
if (("ely").startsWith(cmd)) {
if (player.getCommonData().getRace() == Race.ASMODIANS)
continue;
}
if (("asmo").startsWith(cmd)) {
if (player.getCommonData().getRace() == Race.ELYOS)
continue;
}
if (("member").startsWith(cmd) || ("premium").startsWith(cmd)) {
if (player.getPlayerAccount().getMembership() == 0)
continue;
}
}
PacketSendUtility.sendMessage(admin, "Char: " + player.getName() + " - Race: " + player.getCommonData().getRace().name() + " - Acc: " + player.getAcountName());
}
}
}
|
[
"Vitek.agl@yandex.ru"
] |
Vitek.agl@yandex.ru
|
672b6523770c1b325826546637bf6194a2f33c6d
|
f0d25d83176909b18b9989e6fe34c414590c3599
|
/app/src/main/java/com/google/android/gms/internal/zzawt.java
|
c91b4541cc86b6fb5c23dceea5a4bfa11677e846
|
[] |
no_license
|
lycfr/lq
|
e8dd702263e6565486bea92f05cd93e45ef8defc
|
123914e7c0d45956184dc908e87f63870e46aa2e
|
refs/heads/master
| 2022-04-07T18:16:31.660038
| 2020-02-23T03:09:18
| 2020-02-23T03:09:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,190
|
java
|
package com.google.android.gms.internal;
import android.support.annotation.NonNull;
import android.widget.TextView;
import com.google.android.gms.cast.MediaInfo;
import com.google.android.gms.cast.MediaMetadata;
import com.google.android.gms.cast.framework.media.RemoteMediaClient;
import com.google.android.gms.cast.framework.media.uicontroller.UIController;
public final class zzawt extends UIController {
private final TextView zzavZ;
public zzawt(@NonNull TextView textView) {
this.zzavZ = textView;
}
public final void onMediaStatusUpdated() {
MediaInfo mediaInfo;
MediaMetadata metadata;
RemoteMediaClient remoteMediaClient = getRemoteMediaClient();
if (remoteMediaClient != null && (mediaInfo = remoteMediaClient.getMediaInfo()) != null && (metadata = mediaInfo.getMetadata()) != null) {
String str = MediaMetadata.KEY_SUBTITLE;
if (!metadata.containsKey(str)) {
switch (metadata.getMediaType()) {
case 1:
str = MediaMetadata.KEY_STUDIO;
break;
case 2:
str = MediaMetadata.KEY_SERIES_TITLE;
break;
case 3:
if (!metadata.containsKey(MediaMetadata.KEY_ARTIST)) {
if (!metadata.containsKey(MediaMetadata.KEY_ALBUM_ARTIST)) {
if (metadata.containsKey(MediaMetadata.KEY_COMPOSER)) {
str = MediaMetadata.KEY_COMPOSER;
break;
}
} else {
str = MediaMetadata.KEY_ALBUM_ARTIST;
break;
}
}
break;
case 4:
str = MediaMetadata.KEY_ARTIST;
break;
}
}
if (metadata.containsKey(str)) {
this.zzavZ.setText(metadata.getString(str));
}
}
}
}
|
[
"quyenlm.vn@gmail.com"
] |
quyenlm.vn@gmail.com
|
571b055b3de445ff617225c9a2efdb07cfc40297
|
ac23518013d27e2867b4e8086e8db1062505862b
|
/lkf-spring-boot-activiti/rest/src/test/ActivitiControllerTest.java
|
dead5c889a6fcdc9a04e54a570b860260cea2619
|
[] |
no_license
|
liukaifeng/lkf
|
c5fd235f62ff1cbf35aa80fdbcacaad3872bb994
|
ef166b6961e24f50e3fc4bdb5839653d45d12dfa
|
refs/heads/master
| 2021-01-20T13:10:33.189639
| 2017-11-12T10:34:55
| 2017-11-12T10:34:55
| 90,454,702
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 835
|
java
|
import com.lkf.activiti.rest.ActivitiController;
import org.junit.Before;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import static org.junit.Assert.*;
/**
* @package: com.lkf.activiti.rest
* @project-name: lkf
* @description: todo 一句话描述该类的用途
* @author: Created by 刘凯峰
* @create-datetime: 2017-05-25 16-30
*/
public class ActivitiControllerTest extends BaseTest {
@Autowired
private ActivitiController activitiController;
@Before
public void setUp() throws Exception {
mvc = MockMvcBuilders.standaloneSetup(activitiController).build();
}
@Test
public void processDeploy() throws Exception {
MockMvcGet("/api/activiti/process/deploy");
}
}
|
[
"kaifeng_5liu@163.com"
] |
kaifeng_5liu@163.com
|
271f35c3a5964438905ae0afeb73402869221943
|
4aa90348abcb2119011728dc067afd501f275374
|
/app/src/main/java/com/tencent/mm/protocal/c$x.java
|
3c27b186159fbe942e480544b95e798131b10070
|
[] |
no_license
|
jambestwick/HackWechat
|
0d4ceb2d79ccddb45004ca667e9a6a984a80f0f6
|
6a34899c8bfd50d19e5a5ec36a58218598172a6b
|
refs/heads/master
| 2022-01-27T12:48:43.446804
| 2021-12-29T10:36:30
| 2021-12-29T10:36:30
| 249,366,791
| 0
| 0
| null | 2020-03-23T07:48:32
| 2020-03-23T07:48:32
| null |
UTF-8
|
Java
| false
| false
| 243
|
java
|
package com.tencent.mm.protocal;
import com.tencent.mm.plugin.appbrand.jsapi.an;
import com.tencent.mm.protocal.c.g;
public class c$x extends g {
public c$x() {
super("chooseIdCard", "chooseIdCard", an.CTRL_INDEX, true);
}
}
|
[
"malin.myemail@163.com"
] |
malin.myemail@163.com
|
d1249308fbd0eafaf3117a079a624405cbcc27ea
|
c60f5e9ffefa9c42988e40124fb0849e32ba4df1
|
/hutool-crypto/src/main/java/cn/hutool/crypto/ProviderFactory.java
|
7ade30e79bceaf0aa8d9a9dfed5b7aee26260986
|
[
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-mulanpsl-2.0-en",
"MulanPSL-2.0"
] |
permissive
|
kingour/hutool
|
421d914930da3a45a3d7f289df02369018a031d8
|
1d85b66be10631671438786e6d051877293409f8
|
refs/heads/v5-master
| 2021-08-18T07:19:41.720943
| 2021-08-13T01:57:41
| 2021-08-13T01:57:41
| 218,266,013
| 0
| 0
|
NOASSERTION
| 2021-08-13T01:57:42
| 2019-10-29T10:56:28
| null |
UTF-8
|
Java
| false
| false
| 626
|
java
|
package cn.hutool.crypto;
import java.security.Provider;
/**
* Provider对象生产法工厂类
*
* <pre>
* 1. 调用{@link #createBouncyCastleProvider()} 用于新建一个org.bouncycastle.jce.provider.BouncyCastleProvider对象
* </pre>
*
* @author looly
* @since 4.2.1
*/
public class ProviderFactory {
/**
* 创建Bouncy Castle 提供者<br>
* 如果用户未引入bouncycastle库,则此方法抛出{@link NoClassDefFoundError} 异常
*
* @return {@link Provider}
*/
public static Provider createBouncyCastleProvider() {
return new org.bouncycastle.jce.provider.BouncyCastleProvider();
}
}
|
[
"loolly@gmail.com"
] |
loolly@gmail.com
|
3dfb1312e47424214c5224deef6d2899683a8054
|
a4360286c54186934b619dad3863a7775e6e61dc
|
/openbravo/src/org/openbravo/dal/core/OBDynamicPropertyHandler.java
|
ca49e3f6598e5c784357e9df24876303c6acaf18
|
[] |
no_license
|
Abdielja/Openbravo
|
1f31a284e2d8cff5b50769237732d7236f5d9ab2
|
51dd54967f88b7f647f69b8dd5981991b5843df2
|
refs/heads/master
| 2020-04-06T04:28:50.112404
| 2016-10-25T14:24:34
| 2016-10-25T14:24:34
| 71,905,018
| 0
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,362
|
java
|
/*
*************************************************************************
* The contents of this file are subject to the Openbravo Public License
* Version 1.1 (the "License"), being the Mozilla Public License
* Version 1.1 with a permitted attribution clause; you may not use this
* file except in compliance with the License. You may obtain a copy of
* the License at http://www.openbravo.com/legal/license.html
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
* License for the specific language governing rights and limitations
* under the License.
* The Original Code is Openbravo ERP.
* The Initial Developer of the Original Code is Openbravo SLU
* All portions are Copyright (C) 2008-2011 Openbravo SLU
* All Rights Reserved.
* Contributor(s): ______________________________________.
************************************************************************
*/
package org.openbravo.dal.core;
import java.lang.reflect.Member;
import java.lang.reflect.Method;
import java.util.Map;
import org.hibernate.HibernateException;
import org.hibernate.PropertyNotFoundException;
import org.hibernate.engine.SessionFactoryImplementor;
import org.hibernate.engine.SessionImplementor;
import org.hibernate.property.PropertyAccessor;
import org.openbravo.base.model.NamingUtil;
import org.openbravo.base.structure.BaseOBObject;
/**
* The hibernate getter/setter for a dynamic property.
*
* @author mtaal
*/
@SuppressWarnings("rawtypes")
public class OBDynamicPropertyHandler implements PropertyAccessor {
public Getter getGetter(Class theClass, String propertyName) throws PropertyNotFoundException {
return new Getter(NamingUtil.getStaticPropertyName(theClass, propertyName));
}
public Setter getSetter(Class theClass, String propertyName) throws PropertyNotFoundException {
return new Setter(NamingUtil.getStaticPropertyName(theClass, propertyName));
}
public static class Getter implements org.hibernate.property.Getter {
private static final long serialVersionUID = 1L;
private String propertyName;
public Getter(String propertyName) {
this.propertyName = propertyName;
}
public Method getMethod() {
return null;
}
public Member getMember() {
return null;
}
public String getMethodName() {
return null;
}
public Object get(Object owner) throws HibernateException {
return ((BaseOBObject) owner).getValue(propertyName);
}
public Object getForInsert(Object owner, Map mergeMap, SessionImplementor session)
throws HibernateException {
return get(owner);
}
public Class getReturnType() {
return null;
}
}
public static class Setter implements org.hibernate.property.Setter {
private static final long serialVersionUID = 1L;
private String propertyName;
public Setter(String propertyName) {
this.propertyName = propertyName;
}
public Method getMethod() {
return null;
}
public String getMethodName() {
return null;
}
public void set(Object target, Object value, SessionFactoryImplementor factory)
throws HibernateException {
((BaseOBObject) target).setValue(propertyName, value);
}
}
}
|
[
"abdielja@hotmail.com"
] |
abdielja@hotmail.com
|
6bde95196dfd824d3707d9cb91fd0e5cacbc9dfe
|
082e26b011e30dc62a62fae95f375e4f87d9e99c
|
/docs/weixin_7.0.4_source/反编译源码/未反混淆/src/main/java/com/tencent/mm/boot/svg/a/a/age.java
|
71a760edd71f176e0750fb32076318b62a5cc190
|
[] |
no_license
|
xsren/AndroidReverseNotes
|
9631a5aabc031006e795a112b7ac756a8edd4385
|
9202c276fe9f04a978e4e08b08e42645d97ca94b
|
refs/heads/master
| 2021-04-07T22:50:51.072197
| 2019-07-16T02:24:43
| 2019-07-16T02:24:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,199
|
java
|
package com.tencent.mm.boot.svg.a.a;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Paint.Cap;
import android.graphics.Paint.Join;
import android.graphics.Paint.Style;
import android.graphics.Path;
import android.os.Looper;
import android.support.v4.widget.j;
import com.tencent.mm.svg.WeChatSVGRenderC2Java;
import com.tencent.mm.svg.c;
import com.tencent.smtt.sdk.WebView;
public final class age extends c {
private final int height = 96;
private final int width = 96;
public final int a(int i, Object... objArr) {
switch (i) {
case 0:
return 96;
case 1:
return 96;
case 2:
Canvas canvas = (Canvas) objArr[0];
Looper looper = (Looper) objArr[1];
c.h(looper);
c.g(looper);
Paint k = c.k(looper);
k.setFlags(385);
k.setStyle(Style.FILL);
Paint k2 = c.k(looper);
k2.setFlags(385);
k2.setStyle(Style.STROKE);
k.setColor(WebView.NIGHT_MODE_COLOR);
k2.setStrokeWidth(1.0f);
k2.setStrokeCap(Cap.BUTT);
k2.setStrokeJoin(Join.MITER);
k2.setStrokeMiter(4.0f);
k2.setPathEffect(null);
c.a(k2, looper).setStrokeWidth(1.0f);
canvas.save();
Paint a = c.a(k, looper);
a.setColor(j.INVALID_ID);
Path l = c.l(looper);
l.moveTo(0.0f, 9.6f);
l.cubicTo(0.0f, 4.298066f, 4.298066f, 0.0f, 9.6f, 0.0f);
l.lineTo(86.4f, 0.0f);
l.cubicTo(91.701935f, 0.0f, 96.0f, 4.298066f, 96.0f, 9.6f);
l.lineTo(96.0f, 86.4f);
l.cubicTo(96.0f, 91.701935f, 91.701935f, 96.0f, 86.4f, 96.0f);
l.lineTo(9.6f, 96.0f);
l.cubicTo(4.298066f, 96.0f, 0.0f, 91.701935f, 0.0f, 86.4f);
l.lineTo(0.0f, 9.6f);
l.close();
canvas.drawPath(l, a);
canvas.restore();
canvas.save();
k2 = c.a(k, looper);
k2.setColor(-1);
Path l2 = c.l(looper);
l2.moveTo(48.0f, 45.001343f);
l2.lineTo(30.427227f, 27.428572f);
l2.lineTo(27.428572f, 30.427227f);
l2.lineTo(45.001343f, 48.0f);
l2.lineTo(27.428572f, 65.57277f);
l2.lineTo(30.427227f, 68.57143f);
l2.lineTo(48.0f, 50.998657f);
l2.lineTo(65.57277f, 68.57143f);
l2.lineTo(68.57143f, 65.57277f);
l2.lineTo(50.998657f, 48.0f);
l2.lineTo(68.57143f, 30.427227f);
l2.lineTo(65.57277f, 27.428572f);
l2.close();
WeChatSVGRenderC2Java.setFillType(l2, 1);
WeChatSVGRenderC2Java.setFillType(l2, 2);
canvas.drawPath(l2, k2);
canvas.restore();
c.j(looper);
break;
}
return 0;
}
}
|
[
"alwangsisi@163.com"
] |
alwangsisi@163.com
|
ed9988667f4305ed10b78f558d248dfe8032c73d
|
977e9391e1723162da30bf7d1d44726ea327be9b
|
/common/pixelmon/battles/attacks/specialAttacks/Facade.java
|
0d0f633c41daa191f7396e797c01e7b8a5c0adb8
|
[] |
no_license
|
Rodel30/Pixelmon
|
73b07866c2e26bb74c9fec7fd3e0d4b851cb6489
|
a7eb0dcda3a56ec5c78fab7f5167c3c2c3726c5c
|
refs/heads/master
| 2021-01-16T19:19:25.135417
| 2012-09-11T14:45:53
| 2012-09-11T14:45:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 962
|
java
|
package pixelmon.battles.attacks.specialAttacks;
import java.util.ArrayList;
import pixelmon.battles.attacks.Attack;
import pixelmon.battles.attacks.attackEffects.EffectBase;
import pixelmon.battles.attacks.statusEffects.StatusEffectBase;
import pixelmon.battles.attacks.statusEffects.StatusEffectType;
import pixelmon.entities.pixelmon.EntityPixelmon;
import net.minecraft.src.DamageSource;
import net.minecraft.src.EntityLiving;
public class Facade extends SpecialAttackBase {
public Facade() {
super(SpecialAttackType.Facade, ApplyStage.During, false);
}
@Override
public boolean ApplyEffect(EntityPixelmon user, EntityPixelmon target, Attack a, ArrayList<String> attackList) {
a.basePower = 70;
for (StatusEffectBase e :target.status){
if (e.type == StatusEffectType.Burn || e.type == StatusEffectType.Poison || e.type == StatusEffectType.PoisonBadly || e.type == StatusEffectType.Paralysis)
a.basePower = 140;
}
return false;
}
}
|
[
"malc.geddes@gmail.com"
] |
malc.geddes@gmail.com
|
8cc1973cd01c6693b620bae320fe4c53bcfe2f57
|
dafdbbb0234b1f423970776259c985e6b571401f
|
/allbinary_src/BlisketVOJavaLibraryM/src/main/java/allbinary/business/context/modules/storefront/statistics/users/StoreFrontUsersStatisticsInterface.java
|
25f7536f89ac229aa40912f338a08606d76a45a1
|
[
"LicenseRef-scancode-warranty-disclaimer"
] |
no_license
|
biddyweb/AllBinary-Platform
|
3581664e8613592b64f20fc3f688dc1515d646ae
|
9b61bc529b0a5e2c647aa1b7ba59b6386f7900ad
|
refs/heads/master
| 2020-12-03T10:38:18.654527
| 2013-11-17T11:17:35
| 2013-11-17T11:17:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 773
|
java
|
/*
* AllBinary Open License Version 1
* Copyright (c) 2011 AllBinary
*
* By agreeing to this license you and any business entity you represent are
* legally bound to the AllBinary Open License Version 1 legal agreement.
*
* You may obtain the AllBinary Open License Version 1 legal agreement from
* AllBinary or the root directory of AllBinary's AllBinary Platform repository.
*
* Created By: Travis Berthelot
*
*/
package allbinary.business.context.modules.storefront.statistics.users;
import allbinary.data.tables.TableMappingInterface;
//import allbinary.business.user.commerce.money.Money;
public interface StoreFrontUsersStatisticsInterface extends TableMappingInterface
{
public Long getNumberOfUsers();
public Long getNumberOfUsersByRole(String role);
}
|
[
"travisberthelot@hotmail.com"
] |
travisberthelot@hotmail.com
|
7652c85acc6b65e873dd87daa54e57363bf4382c
|
ed40e92c5b83e07d3838e8781c9d2a9b8508675e
|
/security-browser/src/main/java/com/chen/browser/service/MyUserDetailServiceImpl.java
|
f9d0001697f5a7f58c363a88e8b75eaf65e9c402
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] |
permissive
|
leifchen/hello-security
|
11e7dff5003df60774ce303bd9b15c380d40acc7
|
b10f76eb1eff145572e7affd6b2615c821eedc0a
|
refs/heads/master
| 2021-06-25T13:13:10.299456
| 2020-10-14T00:39:57
| 2020-10-14T00:39:57
| 138,978,320
| 0
| 0
|
Apache-2.0
| 2020-10-16T06:06:44
| 2018-06-28T06:52:39
|
Java
|
UTF-8
|
Java
| false
| false
| 1,239
|
java
|
package com.chen.browser.service;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.core.authority.AuthorityUtils;
import org.springframework.security.core.userdetails.User;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
* MyUserDetailService
*
* @Author LeifChen
* @Date 2018-07-03
*/
@Service("myUserDetailsService")
@Slf4j
public class MyUserDetailServiceImpl implements UserDetailsService {
@Resource
private PasswordEncoder passwordEncoder;
@Override
public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
log.info("登录用户名:{}", username);
String password = passwordEncoder.encode("123456");
System.out.println(password);
return new User(username, password,
true, true, true, true,
AuthorityUtils.commaSeparatedStringToAuthorityList("admin"));
}
}
|
[
"leifchen90@gmail.com"
] |
leifchen90@gmail.com
|
d08861fa4c6576346e18c110508be2a2bbe5754a
|
a2e4cd1885571d7ad3341076c16a3680ea90c637
|
/guvnor-ng/guvnor-widgets/guvnor-config-resource-widget/src/main/java/org/kie/guvnor/configresource/client/widget/ResourceConfigWidget.java
|
91b5cac21fb7b4700a468242b37588fb7408ddcd
|
[
"Apache-2.0"
] |
permissive
|
duongthienduc/guvnor
|
de51a19a2ed8187bd3e8fb43caa2e3649c02fbec
|
c6cdaaffbd44876d6685d9e322d2254110dc9d72
|
refs/heads/master
| 2021-01-20T23:31:53.050342
| 2013-01-30T14:09:45
| 2013-01-30T14:09:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,314
|
java
|
/*
* Copyright 2013 JBoss 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 org.kie.guvnor.configresource.client.widget;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;
import org.kie.guvnor.configresource.client.resources.i18n.Constants;
import org.kie.guvnor.services.config.model.ResourceConfig;
import org.uberfire.client.common.DecoratedDisclosurePanel;
import org.uberfire.client.common.DirtyableComposite;
import org.uberfire.client.common.FormStyleLayout;
import static org.kie.commons.validation.PortablePreconditions.*;
/**
* This displays the resource config. It also captures
* edits, but it does not load or save anything itself.
*/
public class ResourceConfigWidget
extends DirtyableComposite {
private ResourceConfig config = null;
private boolean readOnly;
private VerticalPanel layout = new VerticalPanel();
private FormStyleLayout currentSection;
private String currentSectionName;
private ImportsWidget importsWidget;
public ResourceConfigWidget() {
layout.setWidth( "100%" );
initWidget( layout );
}
public void setContent( final ResourceConfig config,
final boolean readOnly ) {
this.config = checkNotNull( "config", config );
this.readOnly = readOnly;
layout.clear();
loadData();
}
public boolean isDirty() {
if ( importsWidget == null ) {
return false;
}
return importsWidget.isDirty();
}
public void resetDirty() {
if ( importsWidget != null ) {
importsWidget.resetDirty();
}
}
public void makeDirty() {
if ( importsWidget != null ) {
importsWidget.makeDirty();
}
}
private void loadData() {
startSection( Constants.INSTANCE.ImportsSection() );
this.importsWidget = new ImportsWidget( config, readOnly );
addRow( importsWidget );
endSection( false );
}
private void addRow( Widget widget ) {
this.currentSection.addRow( widget );
}
private void endSection( final boolean collapsed ) {
final DecoratedDisclosurePanel advancedDisclosure = new DecoratedDisclosurePanel( currentSectionName );
advancedDisclosure.setWidth( "100%" );
advancedDisclosure.setOpen( !collapsed );
advancedDisclosure.setContent( this.currentSection );
layout.add( advancedDisclosure );
}
private void startSection( final String name ) {
currentSection = new FormStyleLayout();
currentSectionName = name;
}
/**
* Return the data if it is to be saved.
*/
public ResourceConfig getContent() {
return config;
}
}
|
[
"alexandre.porcelli@gmail.com"
] |
alexandre.porcelli@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.