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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d7f04e8d31306f32de8e9c3678305f6c5a05ee7a
|
a4a51084cfb715c7076c810520542af38a854868
|
/src/main/java/com/garena/sticker/a/a.java
|
e680861d5300c356f7f1e51235758fca7292b2bb
|
[] |
no_license
|
BharathPalanivelu/repotest
|
ddaf56a94eb52867408e0e769f35bef2d815da72
|
f78ae38738d2ba6c9b9b4049f3092188fabb5b59
|
refs/heads/master
| 2020-09-30T18:55:04.802341
| 2019-12-02T10:52:08
| 2019-12-02T10:52:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 189
|
java
|
package com.garena.sticker.a;
import com.garena.sticker.model.StickerManifest;
import f.c.f;
import io.b.j;
public interface a {
@f(a = "manifest.json")
j<StickerManifest> a();
}
|
[
"noiz354@gmail.com"
] |
noiz354@gmail.com
|
f6894d196c76c13e04cd2e5c7f1be66a0fc1ebc1
|
c66123ace7d2c870b7f6b1620cb34a8a1fb05994
|
/src/main/java/big/domain/factories/MyClass14Builder.java
|
b998f59ab6ee0d73fb8da96a8c77d553fdd28636
|
[] |
no_license
|
jtrentes/jtr_test
|
843fada2c6533dcc09796b32df3b2acb0570083e
|
1f25f588297cbf86b199bad0b59275d55cef35a1
|
refs/heads/master
| 2020-04-18T07:43:28.087451
| 2013-08-06T09:27:29
| 2013-08-06T09:27:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 384
|
java
|
package big.domain.factories;
import big.domain.MyClass14;
public class MyClass14Builder
{
private MyClass14 myclass14;
public MyClass14 build ()
{
return myclass14;
}
public MyClass14Builder id (Long id)
{
myclass14.setId (id);
return this;
}
public MyClass14Builder initMyClass14 ()
{
myclass14 = new MyClass14();
return this;
}
}
|
[
"tomcat7@ks313184.kimsufi.com"
] |
tomcat7@ks313184.kimsufi.com
|
16cf91ad052e62616d56daa02fd53a5a51529372
|
ce44e9fec5f4ee3eff79c3e6fbb0064fbb94753d
|
/main/geo/test/boofcv/abst/feature/tracker/TestDdaManagerGeneralPoint.java
|
c33a3a1f21566529755c74b895e277bd9325398d
|
[
"Apache-2.0"
] |
permissive
|
wsjhnsn/BoofCV
|
74fc0687e29c45df1d2fc125b28d777cd91a8158
|
bdae47003090c03386b6b23e2a884bceba242241
|
refs/heads/master
| 2020-12-24T12:34:02.996379
| 2014-06-27T21:15:21
| 2014-06-27T21:15:21
| 21,334,100
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,144
|
java
|
/*
* Copyright (c) 2011-2013, Peter Abeles. All Rights Reserved.
*
* This file is part of BoofCV (http://boofcv.org).
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package boofcv.abst.feature.tracker;
import boofcv.abst.feature.associate.AssociateDescTo2D;
import boofcv.abst.feature.associate.AssociateDescription2D;
import boofcv.abst.feature.associate.ScoreAssociateHamming_B;
import boofcv.abst.feature.describe.DescribeRegionPoint;
import boofcv.abst.feature.describe.WrapDescribeBrief;
import boofcv.abst.feature.detect.interest.ConfigGeneralDetector;
import boofcv.alg.feature.describe.DescribePointBrief;
import boofcv.alg.feature.describe.brief.FactoryBriefDefinition;
import boofcv.alg.feature.detect.interest.EasyGeneralFeatureDetector;
import boofcv.alg.feature.detect.interest.GeneralFeatureDetector;
import boofcv.factory.feature.associate.FactoryAssociation;
import boofcv.factory.feature.describe.FactoryDescribePointAlgs;
import boofcv.factory.feature.detect.interest.FactoryDetectPoint;
import boofcv.factory.filter.blur.FactoryBlurFilter;
import boofcv.struct.feature.TupleDesc_B;
import boofcv.struct.image.ImageFloat32;
import java.util.Random;
/**
* @author Peter Abeles
*/
public class TestDdaManagerGeneralPoint extends StandardPointTracker<ImageFloat32> {
public TestDdaManagerGeneralPoint() {
super(true, false);
}
@Override
public PointTracker<ImageFloat32> createTracker() {
DescribePointBrief<ImageFloat32> brief =
FactoryDescribePointAlgs.brief(FactoryBriefDefinition.gaussian2(new Random(123), 16, 512),
FactoryBlurFilter.gaussian(ImageFloat32.class, 0, 4));
GeneralFeatureDetector<ImageFloat32,ImageFloat32> corner =
FactoryDetectPoint.createShiTomasi(new ConfigGeneralDetector(-1,2, 0), false, ImageFloat32.class);
ScoreAssociateHamming_B score = new ScoreAssociateHamming_B();
AssociateDescription2D<TupleDesc_B> association =
new AssociateDescTo2D<TupleDesc_B>(FactoryAssociation.greedy(score,400, true));
DescribeRegionPoint<ImageFloat32,TupleDesc_B> describe =
new WrapDescribeBrief<ImageFloat32>(brief,ImageFloat32.class);
EasyGeneralFeatureDetector<ImageFloat32,ImageFloat32> easy = new
EasyGeneralFeatureDetector<ImageFloat32,ImageFloat32>(corner,ImageFloat32.class,ImageFloat32.class);
DdaManagerGeneralPoint<ImageFloat32,ImageFloat32,TupleDesc_B> manager;
manager = new DdaManagerGeneralPoint<ImageFloat32,ImageFloat32,TupleDesc_B>(easy,describe,2);
DetectDescribeAssociate<ImageFloat32,TupleDesc_B> tracker =
new DetectDescribeAssociate<ImageFloat32, TupleDesc_B>(manager,association,false);
return tracker;
}
}
|
[
"peter.abeles@gmail.com"
] |
peter.abeles@gmail.com
|
6275d6009a36962079f3528c3f1e0793a4d3a8cf
|
23d8d18fc973305cc088a4e8a3b62727f979caf5
|
/app/src/main/java/com/ffxz/cosmetics/function/DividerGridItemDecoration.java
|
db5e02a58ab737f2cbb553eff6259d03c7c23acb
|
[] |
no_license
|
zhouxiang130/FCosmetic
|
af84777b87fbe121f98511b6ec717f5511b7439f
|
0c9cf1bb6e0941e8ffe29ae35db3e82165bf1c47
|
refs/heads/master
| 2020-06-29T14:41:24.029902
| 2019-08-07T02:02:10
| 2019-08-07T02:02:10
| 200,562,562
| 0
| 1
| null | 2019-08-07T02:02:11
| 2019-08-05T01:38:54
|
Java
|
UTF-8
|
Java
| false
| false
| 5,289
|
java
|
package com.ffxz.cosmetics.function;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.StaggeredGridLayoutManager;
import android.view.View;
/**
* Created by Administrator on 2018/5/28 0028.
*/
public class DividerGridItemDecoration extends RecyclerView.ItemDecoration
{
private static final int[] ATTRS = new int[] { android.R.attr.listDivider };
private Drawable mDivider;
public DividerGridItemDecoration(Context context)
{
final TypedArray a = context.obtainStyledAttributes(ATTRS);
mDivider = a.getDrawable(0);
a.recycle();
}
@Override
public void onDraw(Canvas c, RecyclerView parent, RecyclerView.State state)
{
drawHorizontal(c, parent);
drawVertical(c, parent);
}
private int getSpanCount(RecyclerView parent)
{
// 列数
int spanCount = -1;
RecyclerView.LayoutManager layoutManager = parent.getLayoutManager();
if (layoutManager instanceof GridLayoutManager)
{
spanCount = ((GridLayoutManager) layoutManager).getSpanCount();
} else if (layoutManager instanceof StaggeredGridLayoutManager)
{
spanCount = ((StaggeredGridLayoutManager) layoutManager)
.getSpanCount();
}
return spanCount;
}
public void drawHorizontal(Canvas c, RecyclerView parent)
{
int childCount = parent.getChildCount();
for (int i = 0; i < childCount; i++)
{
final View child = parent.getChildAt(i);
final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child
.getLayoutParams();
final int left = child.getLeft() - params.leftMargin;
final int right = child.getRight() + params.rightMargin
+ mDivider.getIntrinsicWidth();
final int top = child.getBottom() + params.bottomMargin;
final int bottom = top + mDivider.getIntrinsicHeight();
mDivider.setBounds(left, top, right, bottom);
mDivider.draw(c);
}
}
public void drawVertical(Canvas c, RecyclerView parent)
{
final int childCount = parent.getChildCount();
for (int i = 0; i < childCount; i++)
{
final View child = parent.getChildAt(i);
final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child
.getLayoutParams();
final int top = child.getTop() - params.topMargin;
final int bottom = child.getBottom() + params.bottomMargin;
final int left = child.getRight() + params.rightMargin;
final int right = left + mDivider.getIntrinsicWidth();
mDivider.setBounds(left, top, right, bottom);
mDivider.draw(c);
}
}
private boolean isLastColum(RecyclerView parent, int pos, int spanCount,
int childCount)
{
RecyclerView.LayoutManager layoutManager = parent.getLayoutManager();
if (layoutManager instanceof GridLayoutManager)
{
if ((pos + 1) % spanCount == 0)// 如果是最后一列,则不需要绘制右边
{
return true;
}
} else if (layoutManager instanceof StaggeredGridLayoutManager)
{
int orientation = ((StaggeredGridLayoutManager) layoutManager)
.getOrientation();
if (orientation == StaggeredGridLayoutManager.VERTICAL)
{
if ((pos + 1) % spanCount == 0)// 如果是最后一列,则不需要绘制右边
{
return true;
}
} else
{
childCount = childCount - childCount % spanCount;
if (pos >= childCount)// 如果是最后一列,则不需要绘制右边
return true;
}
}
return false;
}
private boolean isLastRaw(RecyclerView parent, int pos, int spanCount,
int childCount)
{
RecyclerView.LayoutManager layoutManager = parent.getLayoutManager();
if (layoutManager instanceof GridLayoutManager)
{
childCount = childCount - childCount % spanCount;
if (pos >= childCount)// 如果是最后一行,则不需要绘制底部
return true;
} else if (layoutManager instanceof StaggeredGridLayoutManager)
{
int orientation = ((StaggeredGridLayoutManager) layoutManager)
.getOrientation();
// StaggeredGridLayoutManager 且纵向滚动
if (orientation == StaggeredGridLayoutManager.VERTICAL)
{
childCount = childCount - childCount % spanCount;
// 如果是最后一行,则不需要绘制底部
if (pos >= childCount)
return true;
} else
// StaggeredGridLayoutManager 且横向滚动
{
// 如果是最后一行,则不需要绘制底部
if ((pos + 1) % spanCount == 0)
{
return true;
}
}
}
return false;
}
@Override
public void getItemOffsets(Rect outRect, int itemPosition,
RecyclerView parent)
{
int spanCount = getSpanCount(parent);
int childCount = parent.getAdapter().getItemCount();
if (isLastRaw(parent, itemPosition, spanCount, childCount))// 如果是最后一行,则不需要绘制底部
{
outRect.set(0, 0, mDivider.getIntrinsicWidth(), 0);
} else if (isLastColum(parent, itemPosition, spanCount, childCount))// 如果是最后一列,则不需要绘制右边
{
outRect.set(0, 0, 0, mDivider.getIntrinsicHeight());
} else
{
outRect.set(0, 0, mDivider.getIntrinsicWidth(),
mDivider.getIntrinsicHeight());
}
}
}
|
[
"1141681281@qq.com"
] |
1141681281@qq.com
|
c5a3ced0d6c8c5d26373797fee3984e750323428
|
f3c979ce8aa52837cdbc8f536f279edcf29b32e1
|
/src/test/java/spi/jdk/TestJdkSpi.java
|
3d0b3629c8e11e3318657d9f8f37b55e80c916b2
|
[] |
no_license
|
xuwenjin/xwj-test
|
eb5e59da596251a89e652de80b58126c6982aae9
|
e1e59ba6b7499729ec55d3d9319ccfe694ff55f7
|
refs/heads/master
| 2022-12-22T23:05:47.126085
| 2021-04-12T00:59:08
| 2021-04-12T00:59:08
| 141,364,757
| 2
| 3
| null | 2022-12-10T02:33:21
| 2018-07-18T01:30:56
|
Java
|
UTF-8
|
Java
| false
| false
| 1,957
|
java
|
package spi.jdk;
import java.util.ServiceLoader;
import org.junit.Test;
import spi.jdk.IBaseService;
/**
* 测试ServiceLoader的用法(JDK自带的)
*
* 参考文档地址:https://www.cnblogs.com/aspirant/p/10616704.html
*
*
* 1、通过在资源目录META-INF/services下,新建文件名称是服务类型的完全限定名,如spi.jdk.IBaseService
* 2、定义对应的接口和实现类:IBaseService接口、HDFSServiceImpl和LocalServiceImpl实现类
* 3、通过ServiceLoader.load(IBaseService.class)就可以找到IBaseService的实现类
*
* 可以看到ServiceLoader可以根据IBaseService把定义的两个实现类找出来,返回一个ServiceLoader的实现,
* 而ServiceLoader实现了Iterable接口,所以可以通过ServiceLoader来遍历所有在配置文件中定义的类的实例。
*
* 使用场景:一般使用接口的实现类都是静态new一个实现类赋值给接口引用
*
* 缺点:会一次加载所有实现类,并生成实例对象
*
*/
public class TestJdkSpi {
/**
* 测试ServiceLoader.load的结果是否单例
*
* 结果:
* 1、每一个扩展点接口的ServiceLoader都是一个新的实例
* 2、每一个扩展点接口实现类都是一个新的实例
*/
@Test
public void testFor() {
for (int i = 0; i < 5; i++) {
ServiceLoader<IBaseService> serviceLoader = ServiceLoader.load(IBaseService.class);
System.out.println(serviceLoader.hashCode());
IBaseService service = serviceLoader.iterator().next();
System.out.println(service.hashCode());
System.out.println("-----------------------------");
}
}
@Test
public void test1() {
/**
* 底层原理:通过类的全路径,反射生成实例对象
*/
ServiceLoader<IBaseService> serviceLoader = ServiceLoader.load(IBaseService.class);
for (IBaseService service : serviceLoader) {
System.out.println(service.getScheme() + "=" + service.sayHello());
}
}
}
|
[
"563210736@qq.com"
] |
563210736@qq.com
|
b5162149b6930525eeb725d5efd0a0df7e012656
|
cea3fe1ae551bf2f81b431876d15563d6347119b
|
/case Ant SSO/antsso-demo/src/main/java/com/gang/antsso/controller/TestController.java
|
c544e59354dc7a633c59f24fc9606da9141c3615
|
[] |
no_license
|
black-ant/case
|
2e33cbd74b559924d3a53092a8b070edea4d143d
|
589598bb41398b330bc29b2ca61757296b55b579
|
refs/heads/master
| 2023-07-31T23:22:51.168312
| 2022-07-24T06:15:53
| 2022-07-24T06:15:53
| 137,761,384
| 86
| 26
| null | 2023-07-17T01:03:21
| 2018-06-18T14:22:01
|
Java
|
UTF-8
|
Java
| false
| false
| 673
|
java
|
package com.gang.antsso.controller;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @Classname TestController
* @Description TODO
* @Date 2020/2/23 17:29
* @Created by zengzg
*/
@RestController
@RequestMapping("/index")
public class TestController {
private Logger logger = LoggerFactory.getLogger(this.getClass());
@GetMapping("one")
public String getIndex() {
logger.info("------> this is in inde one <-------");
return "ok";
}
}
|
[
"1016930479@qq.com"
] |
1016930479@qq.com
|
f9b1afd8c2c086c5e27465b09556a31f7485598f
|
f48468e1fb44269958d45e2a698c764694712a2e
|
/gwt-ol3-demo/src/main/java/de/desjardins/ol3/demo/client/GwtOL3Playground.java
|
8132ba7a8d3a94145540ead5e5524959166cd83c
|
[
"Apache-2.0"
] |
permissive
|
JornC/gwt-ol3
|
97dcd88915cdc2c602114744d2bfb036886f3f69
|
ac8783c7c7818606750687de0a217bec793b64ca
|
refs/heads/master
| 2020-12-07T13:42:19.885497
| 2016-07-04T13:48:42
| 2016-07-04T13:48:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 489
|
java
|
package de.desjardins.ol3.demo.client;
import com.google.gwt.core.client.EntryPoint;
import de.desjardins.ol3.demo.client.example.OL3ExampleType;
/**
* EntryPoint for playing with gwt-ol3-Features.
*
* @author Tino Desjardins
*
*/
public class GwtOL3Playground implements EntryPoint {
@Override
public void onModuleLoad() {
// choose your example
OL3ExampleType exampleType = OL3ExampleType.TileExample;
exampleType.getExample().show();
}
}
|
[
"tino.desjardins@arcor.de"
] |
tino.desjardins@arcor.de
|
da4537a45d9688a5b050b69ed4a949151f19caa7
|
77cdb54e742ba8a1f5e8ebb34d30f46cb1026656
|
/PatternDesign/CompoundPattern/DuckSystem/src/model/RedheadDuck.java
|
f0ba0ad63e9f79335fdc5623d28939e27caccc4b
|
[] |
no_license
|
kickccat/PatternDesign
|
ad0c51a8147d6855da80400a3f897830ab109465
|
d526e2827bf9701119225d83335af87c6dd03a38
|
refs/heads/master
| 2021-04-27T20:13:59.796861
| 2018-03-03T17:18:41
| 2018-03-03T17:18:41
| 122,374,959
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 623
|
java
|
package model;
public class RedheadDuck implements Quackable {
Observable observable;
private String name;
public RedheadDuck() {
this.observable = new Observable(this);
this.name = "Redhead Duck";
}
public String getName() {
return name;
}
@Override
public void quack() {
System.out.println("Quack");
notifyObservers();
}
@Override
public void registerObserver(Observer observer) {
observable.registerObserver(observer);
}
@Override
public void notifyObservers() {
observable.notifyObservers();
}
}
|
[
"kickccat@hotmail.com"
] |
kickccat@hotmail.com
|
4a9a892c2965fc5153d987352656f1f1fd083e8d
|
23b6d6971a66cf057d1846e3b9523f2ad4e05f61
|
/MLMN-Statistics/src/vn/com/vhc/vmsc2/statistics/web/controller/DyBscHoIbcController.java
|
59faf128ed5f0e30429127919d77d7d429947dd5
|
[] |
no_license
|
vhctrungnq/mlmn
|
943f5a44f24625cfac0edc06a0d1b114f808dfb8
|
d3ba1f6eebe2e38cdc8053f470f0b99931085629
|
refs/heads/master
| 2020-03-22T13:48:30.767393
| 2018-07-08T05:14:12
| 2018-07-08T05:14:12
| 140,132,808
| 0
| 1
| null | 2018-07-08T05:29:27
| 2018-07-08T02:57:06
|
Java
|
UTF-8
|
Java
| false
| false
| 8,050
|
java
|
package vn.com.vhc.vmsc2.statistics.web.controller;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;
import vn.com.vhc.vmsc2.statistics.dao.BscDAO;
import vn.com.vhc.vmsc2.statistics.dao.HProvincesCodeDAO;
import vn.com.vhc.vmsc2.statistics.dao.VRpDyBscHoBhIbcDAO;
import vn.com.vhc.vmsc2.statistics.dao.VRpDyBscHoIbcDAO;
import vn.com.vhc.vmsc2.statistics.domain.Bsc;
import vn.com.vhc.vmsc2.statistics.domain.HProvincesCode;
import vn.com.vhc.vmsc2.statistics.domain.VRpDyBscHoBhIbc;
import vn.com.vhc.vmsc2.statistics.domain.VRpDyBscHoIbc;
import vn.com.vhc.vmsc2.statistics.web.utils.Chart;
import vn.com.vhc.vmsc2.statistics.web.utils.Helper;
@Controller
public class DyBscHoIbcController extends BaseController{
@Autowired
private VRpDyBscHoIbcDAO vRpDyBscHoIbcDao;
@Autowired
private VRpDyBscHoBhIbcDAO vRpDyBscHoBhIbcDao;
@Autowired
private HProvincesCodeDAO hProvincesCodeDao;
@Autowired
private BscDAO bscDao;
private DateFormat df = new SimpleDateFormat("dd/MM/yyyy");
@RequestMapping("/report/radio/ibc/bsc-ho/dy/list")
public ModelAndView dyBscHoList(@RequestParam(required = false) String region,@RequestParam(required = false) String bscid, @RequestParam(required = false) String day, ModelMap model,
HttpServletRequest request) {
long currentTime = System.currentTimeMillis();
try {
Date d;
if (day == null) {
d = new Date(currentTime - 24 * 60 * 60 * 1000);
} else {
d = df.parse(day);
}
List<HProvincesCode> regionList = hProvincesCodeDao.getAllRegion();
model.addAttribute("regionList", regionList);
List<Bsc> bscList = bscDao.getAll();
model.addAttribute("bscList", bscList);
if (region == null)
region = "";
List<VRpDyBscHoIbc> vRpDyBscHoIbc = vRpDyBscHoIbcDao.filter(bscid, d, region);
model.addAttribute("day", df.format(d));
model.addAttribute("vRpDyBscHoIbc", vRpDyBscHoIbc);
model.addAttribute("region", region);
}catch(ParseException e) {
saveError(request, e.toString());
}
return new ModelAndView("dyBscHoIbcList");
}
@RequestMapping("/report/radio/ibc/bsc-ho/dy/details")
public String showReport(@RequestParam(required = false) String region,@RequestParam(required=true) String bscid,
@RequestParam(required = false) String startDate, @RequestParam(required = false) String endDate, ModelMap model, HttpServletRequest request) {
long currentTime = System.currentTimeMillis();
try {
Date startDay;
Date endDay;
Calendar cal = Calendar.getInstance();
if(endDate==null){
endDay = new Date(currentTime - 24 * 60 * 60 * 1000);
cal.add(Calendar.DATE, -30);
startDay = cal.getTime();
}else{
endDay = df.parse(endDate);
if (startDate == null) {
cal.setTime(endDay);
cal.add(Calendar.DATE, -30);
startDay = cal.getTime();
}
else{
startDay = df.parse(startDate);
}
}
model.addAttribute("startDate", df.format(startDay));
model.addAttribute("endDate", df.format(endDay));
List<HProvincesCode> regionList = hProvincesCodeDao.getAllRegion();
model.addAttribute("regionList", regionList);
List<Bsc> bscList = bscDao.getAll();
model.addAttribute("bscList", bscList);
if (region == null)
region = "";
List<VRpDyBscHoIbc> vRpDyBscHoIbcDetails = vRpDyBscHoIbcDao.filterDetails(df.format(startDay), df.format(endDay), bscid, region);
model.addAttribute("vRpDyBscHoIbcDetails", vRpDyBscHoIbcDetails);
model.addAttribute("bscid", bscid);
model.addAttribute("region", region);
/* Chart */
List<String> categories = new ArrayList<String>();
List<Float> inHoSucrList = new ArrayList<Float>();
List<Float> ogHoSucrList = new ArrayList<Float>();
for (VRpDyBscHoIbc vRpDyBscHoIbc : vRpDyBscHoIbcDetails) {
categories.add(df.format(vRpDyBscHoIbc.getDay()));
inHoSucrList.add(vRpDyBscHoIbc.getInHoSucr());
ogHoSucrList.add(vRpDyBscHoIbc.getOgHoSucr());
}
Map<String, List<Float>> series = new LinkedHashMap<String, List<Float>>();
series.put("In_Ho_Sucr", inHoSucrList);
series.put("Og_Ho_Sucr", ogHoSucrList);
model.addAttribute("chart", Chart.basicLine("BSC IBC HO " + bscid + " Daily Report", categories, series));
// checkBox
String[] checkColumns = { "ogHoAtt", "ogHoSuc", "ogHoSucr", "inHoAtt", "inHoSuc", "inHoSucr"};
model.addAttribute("checkColumns", Helper.checkColumns(checkColumns, 4));
String[] checkSeries = {"ogHoSucr", "inHoSucr"};
model.addAttribute("checkSeries", Chart.checkSeries(checkSeries));
}catch (ParseException e) {
saveError(request, e.toString());
}
return "dyBscHoIbcDetails";
}
@RequestMapping("/report/radio/ibc/bsc-ho/dy/bhDetails")
public String showReportBh(@RequestParam(required = false) String region,@RequestParam(required=true) String bscid,
@RequestParam(required = false) String startDate, @RequestParam(required = false) String endDate, ModelMap model, HttpServletRequest request) {
long currentTime = System.currentTimeMillis();
try {
Date startDay;
Date endDay;
Calendar cal = Calendar.getInstance();
if(endDate==null){
endDay = new Date(currentTime - 24 * 60 * 60 * 1000);
cal.add(Calendar.DATE, -30);
startDay = cal.getTime();
}else{
endDay = df.parse(endDate);
if (startDate == null) {
cal.setTime(endDay);
cal.add(Calendar.DATE, -30);
startDay = cal.getTime();
}
else{
startDay = df.parse(startDate);
}
}
model.addAttribute("startDate", df.format(startDay));
model.addAttribute("endDate", df.format(endDay));
List<HProvincesCode> regionList = hProvincesCodeDao.getAllRegion();
model.addAttribute("regionList", regionList);
List<Bsc> bscList = bscDao.getAll();
model.addAttribute("bscList", bscList);
if (region == null)
region = "";
List<VRpDyBscHoBhIbc> vRpDyBscHoBhIbcDetails = vRpDyBscHoBhIbcDao.filterDetails(df.format(startDay), df.format(endDay), bscid, region);
model.addAttribute("vRpDyBscHoBhIbcDetails", vRpDyBscHoBhIbcDetails);
model.addAttribute("bscid", bscid);
model.addAttribute("region", region);
/* Chart */
List<String> categories = new ArrayList<String>();
List<Float> inHoSucrList = new ArrayList<Float>();
List<Float> ogHoSucrList = new ArrayList<Float>();
for (VRpDyBscHoBhIbc vRpDyBscHoBhIbc : vRpDyBscHoBhIbcDetails) {
categories.add(df.format(vRpDyBscHoBhIbc.getDay()));
inHoSucrList.add(vRpDyBscHoBhIbc.getBhInHoSucr());
ogHoSucrList.add(vRpDyBscHoBhIbc.getBhOgHoSucr());
}
Map<String, List<Float>> series = new LinkedHashMap<String, List<Float>>();
series.put("Bh_In_Ho_Sucr", inHoSucrList);
series.put("Bh_Og_Ho_Sucr", ogHoSucrList);
model.addAttribute("chart", Chart.basicLine("BSC IBC HO BH " + bscid + " Daily Report", categories, series));
// checkBox
String[] checkColumns = { "bhOgHoAtt","bhOgHoSuc","bhOgHoSucr","bhInHoAtt","bhInHoSuc","bhInHoSucr"};
model.addAttribute("checkColumns", Helper.checkColumns(checkColumns, 6));
String[] checkSeries = {"bhOgHoSucr", "bhInHoSucr"};
model.addAttribute("checkSeries", Chart.checkSeries(checkSeries));
}catch (ParseException e) {
saveError(request, e.toString());
}
return "dyBscHoBhIbcDetails";
}
}
|
[
"trungnq@vhc.com.vn"
] |
trungnq@vhc.com.vn
|
a1c2d8134a843e03fdd2bbc63f4ecf78c672e73e
|
816ba712151078e85be5a6a0a4eba2876d8d3049
|
/lib_xmlparser_compiler/src/main/java/com/d/lib/xmlparser/compiler/XmlParserProcessor.java
|
9d901a70c8778641a022fb41eacae704065ce714
|
[] |
no_license
|
Dsiner/XmlParser
|
815573983ea16219b8a0d631c1f2243651676a5a
|
70eb5ab12b17621089b4e010fcc1317943dff7c2
|
refs/heads/master
| 2021-04-18T19:13:25.668855
| 2020-12-23T12:27:03
| 2020-12-23T12:27:03
| 126,829,744
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,559
|
java
|
package com.d.lib.xmlparser.compiler;
import com.d.lib.xmlparser.compiler.utils.ParseHelper;
import com.d.lib.xmlparser.compiler.utils.Util;
import com.d.lib.xmlparser.compiler.utils.VerifyHelper;
import com.google.auto.service.AutoService;
import java.io.IOException;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;
import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.Filer;
import javax.annotation.processing.Messager;
import javax.annotation.processing.ProcessingEnvironment;
import javax.annotation.processing.Processor;
import javax.annotation.processing.RoundEnvironment;
import javax.lang.model.SourceVersion;
import javax.lang.model.element.Element;
import javax.lang.model.element.ElementKind;
import javax.lang.model.element.TypeElement;
import javax.lang.model.util.Elements;
import javax.lang.model.util.Types;
@AutoService(Processor.class)
public class XmlParserProcessor extends AbstractProcessor {
private Types typeUtils;
private Elements elementUtils;
private Filer filer;
private Messager messager;
private ParseHelper parseHelper;
@Override
public synchronized void init(ProcessingEnvironment processingEnv) {
super.init(processingEnv);
this.typeUtils = processingEnv.getTypeUtils();
this.elementUtils = processingEnv.getElementUtils();
this.filer = processingEnv.getFiler();
this.messager = processingEnv.getMessager();
this.parseHelper = new ParseHelper(processingEnv);
}
@Override
public Set<String> getSupportedAnnotationTypes() {
Set<String> annotations = new LinkedHashSet<>();
annotations.add(com.d.lib.xmlparser.annotations.Root.class.getCanonicalName());
annotations.add(com.d.lib.xmlparser.annotations.Element.class.getCanonicalName());
annotations.add(com.d.lib.xmlparser.annotations.ElementList.class.getCanonicalName());
return annotations;
}
@Override
public SourceVersion getSupportedSourceVersion() {
return SourceVersion.latestSupported();
}
@Override
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
// 保存包含注解元素的目标类,注意是使用注解的外围类,主要用来处理父类继承
Set<TypeElement> erasedTargetNames = new LinkedHashSet<>();
// TypeElement 使用注解的外围类,BindingNode 对应一个要生成的类
Map<TypeElement, BindingNode> targetClassMap = new LinkedHashMap<>();
// 处理Root
Set<? extends Element> roots = roundEnv.getElementsAnnotatedWith(com.d.lib.xmlparser.annotations.Root.class);
if (roots != null) {
for (Element element : roots) {
if (VerifyHelper.verifyRoot(element, messager)) {
parseHelper.parseRoot((TypeElement) element, targetClassMap, erasedTargetNames);
}
}
}
// 处理Element
Set<? extends Element> elements = roundEnv.getElementsAnnotatedWith(com.d.lib.xmlparser.annotations.Element.class);
if (elements != null) {
for (Element element : elements) {
if (VerifyHelper.verifyElement(element, messager)) {
parseHelper.parseElement(element, targetClassMap, erasedTargetNames);
}
}
}
// 处理ElementList
Set<? extends Element> elementLists = roundEnv.getElementsAnnotatedWith(com.d.lib.xmlparser.annotations.ElementList.class);
if (elementLists != null) {
for (Element element : elementLists) {
if (VerifyHelper.verifyElementList(element, messager)) {
parseHelper.parseElementList(element, targetClassMap, erasedTargetNames);
}
}
}
for (Map.Entry<TypeElement, BindingNode> entry : targetClassMap.entrySet()) {
TypeElement typeElement = entry.getKey();
BindingNode bindingNode = entry.getValue();
if (typeElement.getKind() != ElementKind.CLASS) {
continue;
}
try {
// 生成Java文件
bindingNode.brewJava().writeTo(filer);
} catch (IOException e) {
Util._error(messager, typeElement, "Unable to write xml binder for type %s: %s", typeElement,
e.getMessage());
}
}
return true;
}
}
|
[
"s90789@outlook.com"
] |
s90789@outlook.com
|
8bb2da18d4b2df98785ae68c64e58d955d7d8336
|
58c0529be1ee5ad274292184cc0fc19c7d0e0fd2
|
/HHTask/src/com/task/entity/Gantt.java
|
b1ad8615a62797020226a9744b707127cd2e8b88
|
[] |
no_license
|
hbliyafei/nianfojishu
|
6dc348fdca415d2e7aa328c76f0cbfb9b3aba9c3
|
0a8a125e661f0d582245a4c2586d57f85e496399
|
refs/heads/master
| 2023-03-17T15:03:03.247703
| 2019-05-14T07:56:20
| 2019-05-14T07:56:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,373
|
java
|
package com.task.entity;
import java.util.List;
/**
* 甘特图类 :(ta_Gantt)
* @author 马逗逗
*
*/
public class Gantt implements java.io.Serializable{
private static final long serialVersionUID =1L;
private Integer id;
private String projectName;//项目名称
private String peopleStr;//
private String peopleIds;//项目负责人Ids,以“,”隔开
private String peopleName;//项目负责人姓名,以“,”隔开
private List<Users> peopleList;//项目负责人对象集合
private Long startTime;//开始时间
private Long endTime;//结束时间
private String className;
private Integer classId;
private String startDate;
private String endDate;
private String detail;//详情
private String status;//(未启动,进行中,完成)
//树形显示
private Integer fatherId;//父节点
private Integer rootId;//根节点
private Integer belongLayer;//当前层
private Long childLength;//孩子节点数量
private List<Integer> allChildInt;//递归查找子节点以及子节点的字节点Integer
private List<Integer> allParentInt;//递归查找父节点以及父节点的父节点Integer
private Integer maxCengNum;//最大层数
private Boolean isShowFlag;//是否显示子节点标志
private Float corrCount;
public Integer getFatherId() {
return fatherId;
}
public void setFatherId(Integer fatherId) {
this.fatherId = fatherId;
}
public Integer getRootId() {
return rootId;
}
public void setRootId(Integer rootId) {
this.rootId = rootId;
}
public Integer getBelongLayer() {
return belongLayer;
}
public void setBelongLayer(Integer belongLayer) {
this.belongLayer = belongLayer;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getProjectName() {
return projectName;
}
public void setProjectName(String projectName) {
this.projectName = projectName;
}
public String getPeopleStr() {
return peopleStr;
}
public void setPeopleStr(String peopleStr) {
this.peopleStr = peopleStr;
}
public String getPeopleIds() {
return peopleIds;
}
public void setPeopleIds(String peopleIds) {
this.peopleIds = peopleIds;
}
public String getPeopleName() {
return peopleName;
}
public void setPeopleName(String peopleName) {
this.peopleName = peopleName;
}
public List<Users> getPeopleList() {
return peopleList;
}
public void setPeopleList(List<Users> peopleList) {
this.peopleList = peopleList;
}
public Long getStartTime() {
return startTime;
}
public void setStartTime(Long startTime) {
this.startTime = startTime;
}
public Long getEndTime() {
return endTime;
}
public void setEndTime(Long endTime) {
this.endTime = endTime;
}
public String getClassName() {
return className;
}
public void setClassName(String className) {
this.className = className;
}
public Integer getClassId() {
return classId;
}
public void setClassId(Integer classId) {
this.classId = classId;
}
public String getStartDate() {
return startDate;
}
public void setStartDate(String startDate) {
this.startDate = startDate;
}
public String getEndDate() {
return endDate;
}
public void setEndDate(String endDate) {
this.endDate = endDate;
}
public String getDetail() {
return detail;
}
public void setDetail(String detail) {
this.detail = detail;
}
public void setChildLength(Long childLength) {
this.childLength = childLength;
}
public Long getChildLength() {
return childLength;
}
public void setAllChildInt(List<Integer> allChildInt) {
this.allChildInt = allChildInt;
}
public List<Integer> getAllChildInt() {
return allChildInt;
}
public void setMaxCengNum(Integer maxCengNum) {
this.maxCengNum = maxCengNum;
}
public Integer getMaxCengNum() {
return maxCengNum;
}
public void setAllParentInt(List<Integer> allParentInt) {
this.allParentInt = allParentInt;
}
public List<Integer> getAllParentInt() {
return allParentInt;
}
public void setIsShowFlag(Boolean isShowFlag) {
this.isShowFlag = isShowFlag;
}
public Boolean getIsShowFlag() {
return isShowFlag;
}
public void setCorrCount(Float corrCount) {
this.corrCount = corrCount;
}
public Float getCorrCount() {
return corrCount;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
}
|
[
"horsexming.sina.com"
] |
horsexming.sina.com
|
0681fd799bf43951b7dda57b5762a00078ccdfcb
|
1527bab61ace9ed16a139e6e84f6e1e646058f0f
|
/src/main/java/com/github/lucene/store/database/datasource/DataSourceUtils.java
|
cec0a6b0a6809387ecdfa5e567c3299d471adf0a
|
[
"Apache-2.0"
] |
permissive
|
unkascrack/lucene-databasedirectory
|
29d88bbb5d5520cca510ec6cac6578fb4a537132
|
d09038cf8b1f3a85aa4a56447515ec11ef0b398e
|
refs/heads/master
| 2020-06-05T02:30:02.875955
| 2015-09-17T10:11:43
| 2015-09-17T10:11:43
| 42,127,831
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,757
|
java
|
package com.github.lucene.store.database.datasource;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import javax.sql.DataSource;
import com.github.lucene.store.database.DatabaseDirectoryException;
public class DataSourceUtils {
private DataSourceUtils() {
}
/**
* Returns <code>true</code> if the connection was created by the {@link TransactionAwareDataSourceProxy} and it
* controls the connection (i.e. it is the most outer connection created).
*
* @param connection
* @return
*/
private static boolean isControlConnection(final Connection connection) {
return connection instanceof ConnectionProxy && ((ConnectionProxy) connection).isControlConnection();
}
/**
* Returns a jdbc connection, and in case of failure, wraps the sql exception with a Jdbc device exception.
*
* @param dataSource
* @return
* @throws DatabaseDirectoryException
*/
public static Connection getConnection(final DataSource dataSource) throws DatabaseDirectoryException {
try {
return dataSource.getConnection();
} catch (final SQLException e) {
throw new DatabaseDirectoryException("Failed to open jdbc connection", e);
}
}
/**
* Close the given JDBC connection and ignore any thrown exception. This is useful for typical finally blocks in
* manual JDBC code.
* <p/>
* Will only close the connection under two conditions: If the connection was not created by the
* {@link TransactionAwareDataSourceProxy}, or if it was created by {@link TransactionAwareDataSourceProxy}, and the
* connection controls the connection (i.e. it is the most outer connection created).
*
* @param connection
* @throws DatabaseDirectoryException
*/
public static void releaseConnection(final Connection connection) throws DatabaseDirectoryException {
if (connection == null) {
return;
}
if (!(connection instanceof ConnectionProxy) || isControlConnection(connection)) {
try {
connection.close();
} catch (final SQLException e) {
throw new DatabaseDirectoryException("Failed to release jdbc connection", e);
}
}
}
/**
* Commits the connection only if the connection is controlled by us. The connection is controlled if it is the
* <code>TransactionAwareDataSourceProxy</code> and it is the most outer connection in the tree of connections the
* <code>TransactionAwareDataSourceProxy</code> returned.
*
* @param connection
* @throws DatabaseDirectoryException
*/
public static void commitConnection(final Connection connection) throws DatabaseDirectoryException {
try {
if (connection != null && isControlConnection(connection)) {
connection.commit();
}
} catch (final SQLException e) {
rollbackConnection(connection);
throw new DatabaseDirectoryException("Failed to commit jdbc connection", e);
}
}
/**
* Rollbacks the connection only if the connection is controlled by us. The connection is controlled if it is the
* <code>TransactionAwareDataSourceProxy</code> and it is the most outer connection in the tree of connections the
* <code>TransactionAwareDataSourceProxy</code> returned.
*
* @param connection
*/
public static void rollbackConnection(final Connection connection) {
try {
if (connection != null && isControlConnection(connection)) {
connection.rollback();
}
} catch (final SQLException e) {
// do nothing
}
}
/**
* Close the given JDBC Statement and ignore any thrown exception. This is useful for typical finally blocks in
* manual JDBC code.
*
* @param statement
* the JDBC Statement to close
*/
public static void closeStatement(final Statement statement) {
if (statement != null) {
try {
statement.close();
} catch (final SQLException ex) {
}
}
}
/**
* Close the given JDBC ResultSet and ignore any thrown exception. This is useful for typical finally blocks in
* manual JDBC code.
*
* @param resultSet
* the JDBC ResultSet to close
*/
public static void closeResultSet(final ResultSet resultSet) {
if (resultSet != null) {
try {
resultSet.close();
} catch (final SQLException ex) {
}
}
}
}
|
[
"carlos.alonso.gonzalez@gmail.com"
] |
carlos.alonso.gonzalez@gmail.com
|
2286f81478b217fad69a471ea18ae114442d35fc
|
ed5159d056e98d6715357d0d14a9b3f20b764f89
|
/src/irvine/oeis/a053/A053611.java
|
54b80bbaec37dfe325daf60da2b106ee2d179b1e
|
[] |
no_license
|
flywind2/joeis
|
c5753169cf562939b04dd246f8a2958e97f74558
|
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
|
refs/heads/master
| 2020-09-13T18:34:35.080552
| 2019-11-19T05:40:55
| 2019-11-19T05:40:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 327
|
java
|
package irvine.oeis.a053;
import irvine.oeis.FiniteSequence;
/**
* A053611 Numbers k such that <code>1 + 4 + 9 + ... + k^2 = 1 + 2 + 3 + ... +</code> m for some m.
* @author Georg Fischer
*/
public class A053611 extends FiniteSequence {
/** Construct the sequence. */
public A053611() {
super(1, 5, 6, 85);
}
}
|
[
"sean.irvine@realtimegenomics.com"
] |
sean.irvine@realtimegenomics.com
|
f91c650c375917a7aaece52983e9497201d42a8f
|
6d9d90789f91d4010c30344409aad49fa99099e3
|
/lucene-core/src/main/java/org/apache/lucene/store/Lock.java
|
f56dd1d9511ffee23a64e6fe906f299bf8e3d586
|
[
"Apache-2.0"
] |
permissive
|
bighaidao/lucene
|
8c2340f399c60742720e323a0b0c0a70b2651147
|
bd5d75e31526b599296c3721bc2081a3bde3e251
|
refs/heads/master
| 2021-08-07T07:01:42.438869
| 2012-08-22T09:16:08
| 2012-08-22T09:16:08
| 8,878,381
| 1
| 2
|
Apache-2.0
| 2021-08-02T17:05:32
| 2013-03-19T12:48:16
|
Java
|
UTF-8
|
Java
| false
| false
| 5,118
|
java
|
package org.apache.lucene.store;
/**
* 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.
*/
import org.apache.lucene.util.ThreadInterruptedException;
import java.io.IOException;
/** An interprocess mutex lock.
* <p>Typical use might look like:<pre>
* new Lock.With(directory.makeLock("my.lock")) {
* public Object doBody() {
* <i>... code to execute while locked ...</i>
* }
* }.run();
* </pre>
*
* @see Directory#makeLock(String)
*/
public abstract class Lock {
/** How long {@link #obtain(long)} waits, in milliseconds,
* in between attempts to acquire the lock. */
public static long LOCK_POLL_INTERVAL = 1000;
/** Pass this value to {@link #obtain(long)} to try
* forever to obtain the lock. */
public static final long LOCK_OBTAIN_WAIT_FOREVER = -1;
/** Attempts to obtain exclusive access and immediately return
* upon success or failure.
* @return true iff exclusive access is obtained
*/
public abstract boolean obtain() throws IOException;
/**
* If a lock obtain called, this failureReason may be set
* with the "root cause" Exception as to why the lock was
* not obtained.
*/
protected Throwable failureReason;
/** Attempts to obtain an exclusive lock within amount of
* time given. Polls once per {@link #LOCK_POLL_INTERVAL}
* (currently 1000) milliseconds until lockWaitTimeout is
* passed.
* @param lockWaitTimeout length of time to wait in
* milliseconds or {@link
* #LOCK_OBTAIN_WAIT_FOREVER} to retry forever
* @return true if lock was obtained
* @throws LockObtainFailedException if lock wait times out
* @throws IllegalArgumentException if lockWaitTimeout is
* out of bounds
* @throws IOException if obtain() throws IOException
*/
public boolean obtain(long lockWaitTimeout) throws LockObtainFailedException, IOException {
failureReason = null;
boolean locked = obtain();
if (lockWaitTimeout < 0 && lockWaitTimeout != LOCK_OBTAIN_WAIT_FOREVER)
throw new IllegalArgumentException("lockWaitTimeout should be LOCK_OBTAIN_WAIT_FOREVER or a non-negative number (got " + lockWaitTimeout + ")");
long maxSleepCount = lockWaitTimeout / LOCK_POLL_INTERVAL;
long sleepCount = 0;
while (!locked) {
if (lockWaitTimeout != LOCK_OBTAIN_WAIT_FOREVER && sleepCount++ >= maxSleepCount) {
String reason = "Lock obtain timed out: " + this.toString();
if (failureReason != null) {
reason += ": " + failureReason;
}
LockObtainFailedException e = new LockObtainFailedException(reason);
if (failureReason != null) {
e.initCause(failureReason);
}
throw e;
}
try {
Thread.sleep(LOCK_POLL_INTERVAL);
} catch (InterruptedException ie) {
throw new ThreadInterruptedException(ie);
}
locked = obtain();
}
return locked;
}
/** Releases exclusive access. */
public abstract void release() throws IOException;
/** Returns true if the resource is currently locked. Note that one must
* still call {@link #obtain()} before using the resource. */
public abstract boolean isLocked() throws IOException;
/** Utility class for executing code with exclusive access. */
public abstract static class With {
private Lock lock;
private long lockWaitTimeout;
/** Constructs an executor that will grab the named lock. */
public With(Lock lock, long lockWaitTimeout) {
this.lock = lock;
this.lockWaitTimeout = lockWaitTimeout;
}
/** Code to execute with exclusive access. */
protected abstract Object doBody() throws IOException;
/** Calls {@link #doBody} while <i>lock</i> is obtained. Blocks if lock
* cannot be obtained immediately. Retries to obtain lock once per second
* until it is obtained, or until it has tried ten times. Lock is released when
* {@link #doBody} exits.
* @throws LockObtainFailedException if lock could not
* be obtained
* @throws IOException if {@link Lock#obtain} throws IOException
*/
public Object run() throws LockObtainFailedException, IOException {
boolean locked = false;
try {
locked = lock.obtain(lockWaitTimeout);
return doBody();
} finally {
if (locked)
lock.release();
}
}
}
}
|
[
"joergprante@gmail.com"
] |
joergprante@gmail.com
|
a93ad09435973abc8e82de09da8712dde1277ab9
|
13d740d4da78c0db44322dd07b4f129faab9435c
|
/src/main/java/qng/tabular/Table.java
|
2fdf8ee548b4628dfcca47eb02cf59f90b527710
|
[] |
no_license
|
hardcoder02/invenio-workflow
|
cdc6a9e6906a49c99ceee6b4603feba60d1fbf9a
|
dcd0585e0a0fee8da00eb30ab8b2f077d83fbc3d
|
refs/heads/master
| 2020-03-11T15:19:03.968126
| 2018-04-18T15:16:58
| 2018-04-18T15:16:58
| 130,080,666
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 215
|
java
|
package qng.tabular;
import java.util.Iterator;
import java.util.List;
public interface Table {
Schema getSchema();
int getSize();
Iterator<? extends Tuple> getIterator();
List<? extends Tuple> getTuples();
}
|
[
"hardcoder02@yahoo.com"
] |
hardcoder02@yahoo.com
|
746c4e7087e49699842252c33824c15398ec31cd
|
7992fc70ac93a52891d99e6fe23879e5158d0371
|
/src/main/java/com/tvd12/ezyfox/sfs2x/command/impl/UpdateBuddyPropertiesImpl.java
|
4fdc6171ee74af3606bdbf4294c50beef19f1d92
|
[
"Apache-2.0"
] |
permissive
|
youngmonkeys/ezyfox-sfs2x
|
d95526361b2939d90bda524b7a45bc45c03f375e
|
bc93e479f4ed522b7b9c31931efda7d0f9b272d3
|
refs/heads/master
| 2021-12-26T07:02:49.687419
| 2021-12-21T02:25:51
| 2021-12-21T02:25:51
| 60,058,366
| 3
| 10
| null | 2017-10-27T15:20:25
| 2016-05-31T04:33:38
|
Java
|
UTF-8
|
Java
| false
| false
| 4,317
|
java
|
package com.tvd12.ezyfox.sfs2x.command.impl;
import static com.tvd12.ezyfox.sfs2x.serializer.BuddyAgentSerializer.buddyAgentSerializer;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.smartfoxserver.v2.SmartFoxServer;
import com.smartfoxserver.v2.api.ISFSApi;
import com.smartfoxserver.v2.buddylist.BuddyVariable;
import com.smartfoxserver.v2.entities.User;
import com.smartfoxserver.v2.exceptions.SFSBuddyListException;
import com.smartfoxserver.v2.extensions.ISFSExtension;
import com.tvd12.ezyfox.core.command.UpdateBuddyProperties;
import com.tvd12.ezyfox.core.entities.ApiBaseUser;
import com.tvd12.ezyfox.core.structure.BuddyClassUnwrapper;
import com.tvd12.ezyfox.sfs2x.content.impl.AppContextImpl;
/**
* @see UpdateBuddyProperties
*
* @author tavandung12
* Created on May 27, 2016
*
*/
public class UpdateBuddyPropertiesImpl extends BaseCommandImpl implements UpdateBuddyProperties {
private ApiBaseUser owner;
private boolean fireClientEvent = true;
private boolean fireServerEvent = true;
private List<String> includedVars = new ArrayList<>();
private List<String> excludedVars = new ArrayList<>();
/**
* @param context the context
* @param api the api
* @param extension the extension
*/
public UpdateBuddyPropertiesImpl(AppContextImpl context, ISFSApi api, ISFSExtension extension) {
super(context, api, extension);
}
/* (non-Javadoc)
* @see com.tvd12.ezyfox.core.command.BaseCommand#execute()
*/
@SuppressWarnings("unchecked")
@Override
public Boolean execute() {
BuddyClassUnwrapper unwrapper = context.getUserAgentClass(owner.getClass())
.getBuddyClass().getUnwrapper();
List<BuddyVariable> variables = buddyAgentSerializer().serialize(unwrapper, owner);
List<BuddyVariable> answer = variables;
if(includedVars.size() > 0)
answer = getVariables(variables, includedVars);
answer.removeAll(getVariables(answer, excludedVars));
try {
User sfsUser = CommandUtil.getSfsUser(owner, api);
SmartFoxServer.getInstance().getAPIManager().getBuddyApi()
.setBuddyVariables(sfsUser, answer,
fireClientEvent, fireServerEvent);
} catch (SFSBuddyListException e) {
throw new IllegalStateException(e);
}
return Boolean.TRUE;
}
private List<BuddyVariable> getVariables(List<BuddyVariable> variables, List<String> varnames) {
List<BuddyVariable> answer = new ArrayList<>();
for(String ic : varnames) {
BuddyVariable var = null;
for(BuddyVariable v : variables) {
if(v.getName().equals(ic)) {
var = v; break;
}
}
if(var != null) answer.add(var);
}
return answer;
}
/* (non-Javadoc)
* @see com.tvd12.ezyfox.core.command.UpdateBuddyProperties#owner(com.tvd12.ezyfox.core.entities.ApiBaseUser)
*/
@Override
public UpdateBuddyProperties owner(ApiBaseUser user) {
this.owner = user;
return this;
}
/* (non-Javadoc)
* @see com.tvd12.ezyfox.core.command.UpdateBuddyProperties#fireClientEvent(boolean)
*/
@Override
public UpdateBuddyProperties fireClientEvent(boolean value) {
this.fireClientEvent = value;
return this;
}
/* (non-Javadoc)
* @see com.tvd12.ezyfox.core.command.UpdateBuddyProperties#fireServerEvent(boolean)
*/
@Override
public UpdateBuddyProperties fireServerEvent(boolean value) {
this.fireServerEvent = value;
return this;
}
/* (non-Javadoc)
* @see com.tvd12.ezyfox.core.command.UpdateBuddyProperties#include(java.lang.String[])
*/
@Override
public UpdateBuddyProperties include(String... varnames) {
this.includedVars.addAll(Arrays.asList(varnames));
return this;
}
/* (non-Javadoc)
* @see com.tvd12.ezyfox.core.command.UpdateBuddyProperties#exclude(java.lang.String[])
*/
@Override
public UpdateBuddyProperties exclude(String... varnames) {
this.excludedVars.addAll(Arrays.asList(varnames));
return this;
}
}
|
[
"dungtv@puppetteam.com"
] |
dungtv@puppetteam.com
|
232a1a4f54591c5c33d61bb4f64cff768f7456ae
|
984142b31b636f285413296426aa5c46d7e7b726
|
/app/src/main/java/com/app/mak/cellular/AirtimeSales/InfoView.java
|
50e2192b52d7307035af4c4f2343e894790e8fd1
|
[] |
no_license
|
priyankagiri14/mak_cellular
|
c02eb00c3ff532b47fb4a6380c0f9d8a36dd3769
|
a5d85cc6c7e7a6a4a9b1a89a6415f2ffc2aa018d
|
refs/heads/master
| 2020-09-25T14:08:36.655883
| 2020-02-18T11:53:53
| 2020-02-18T11:53:53
| 226,019,832
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,058
|
java
|
package com.app.mak.cellular.AirtimeSales;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import android.widget.Button;
import android.widget.TextView;
import com.mindorks.placeholderview.annotations.Click;
import com.mindorks.placeholderview.annotations.Layout;
import com.mindorks.placeholderview.annotations.Resolve;
import com.mindorks.placeholderview.annotations.View;
import com.mindorks.placeholderview.annotations.expand.ChildPosition;
import com.mindorks.placeholderview.annotations.expand.ParentPosition;
import com.app.mak.cellular.AirtimeSales.model.get_data_plans.Product;
import com.app.mak.cellular.R;
@Layout(R.layout.feed_item)
public class InfoView {
@ParentPosition
public int mParentPosition;
@ChildPosition
public int mChildPosition;
@View(R.id.titlePack)
public TextView titlePack;
@View(R.id.titleRetail)
public TextView titleRetail;
@View(R.id.buttonProceed)
public Button buttonProceed;
public Product mInfo;
public Context mContext;
public InfoView(Context context, Product info) {
mContext = context;
mInfo = info;
}
@Resolve
public void onResolved() {
Log.d("AirtimeSales", "onResolved: called ");
Double rv=99999.99;
titlePack.setText(mInfo.getDescription());
if(mInfo.getRetailValue().equals(rv))
{
titleRetail.setText("R2-R1000");
}
else {
titleRetail.setText("R" + " " + mInfo.getRetailValue() + "");
}
}
@Click(R.id.buttonProceed)
public void onClick()
{
Log.d("AirtimeSales", "onClick: "+mInfo.getId());
String productId=mInfo.getId()+"";
Intent i=new Intent(mContext,AirtimeRechargeActivity.class);
i.putExtra("product_id",productId);
i.putExtra("retail_value",mInfo.getRetailValue());
i.putExtra("recharge_description",mInfo.getDescription());
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
mContext.startActivity(i);
}
}
|
[
"priyanka@ontrackis.com"
] |
priyanka@ontrackis.com
|
82352af838b1d1941907c511a27bc5b681b70bdd
|
8a19527ddbe93750f80a3ca37bfdeca83a43d3c7
|
/src/main/java/io/swagger/petstore/controller/OrderController.java
|
04a9b26c65cf31762cc4a76c783f92e55f6fd7db
|
[
"Apache-2.0"
] |
permissive
|
swagger-api/swagger-petstore
|
c40e254a7fcc60df3b278ea5682737f1381839ea
|
b8e2f32236d4332a131bf01e16e39f7c9e6323bd
|
refs/heads/master
| 2023-08-09T13:51:39.875030
| 2023-03-30T10:57:39
| 2023-03-30T10:57:39
| 206,982,975
| 170
| 316
|
Apache-2.0
| 2023-08-02T06:55:53
| 2019-09-07T14:54:31
|
Java
|
UTF-8
|
Java
| false
| false
| 3,634
|
java
|
/**
* Copyright 2018 SmartBear Software
* <p>
* 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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.swagger.petstore.controller;
import io.swagger.oas.inflector.models.RequestContext;
import io.swagger.oas.inflector.models.ResponseContext;
import io.swagger.petstore.data.OrderData;
import io.swagger.petstore.model.Order;
import io.swagger.petstore.utils.Util;
import org.joda.time.DateTime;
import javax.ws.rs.core.Response;
import java.util.Date;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaInflectorServerCodegen", date = "2017-04-08T15:48:56.501Z")
public class OrderController {
private static OrderData orderData = new OrderData();
public ResponseContext getInventory(final RequestContext request) {
return new ResponseContext()
.contentType(Util.getMediaType(request))
.entity(orderData.getCountByStatus());
}
public ResponseContext getOrderById(final RequestContext request, final Long orderId) {
if (orderId == null) {
return new ResponseContext()
.status(Response.Status.BAD_REQUEST)
.entity("No orderId provided. Try again?");
}
final Order order = orderData.getOrderById(orderId);
if (order != null) {
return new ResponseContext()
.contentType(Util.getMediaType(request))
.entity(order);
}
return new ResponseContext().status(Response.Status.NOT_FOUND).entity("Order not found");
}
public ResponseContext placeOrder(final RequestContext request, final Order order) {
if (order == null) {
return new ResponseContext()
.status(Response.Status.BAD_REQUEST)
.entity("No Order provided. Try again?");
}
orderData.addOrder(order);
return new ResponseContext()
.contentType(Util.getMediaType(request))
.entity(order);
}
public ResponseContext placeOrder(final RequestContext request, final Long id, final Long petId, final Integer quantity, final DateTime shipDate,
final String status, final Boolean complete) {
final Order order = OrderData.createOrder(id, petId, quantity, new Date(), status, complete);
return placeOrder(request,order);
}
public ResponseContext deleteOrder(final RequestContext request, final Long orderId) {
if (orderId == null) {
return new ResponseContext()
.status(Response.Status.BAD_REQUEST)
.entity("No orderId provided. Try again?");
}
orderData.deleteOrderById(orderId);
final Order order = orderData.getOrderById(orderId);
if (null == order) {
return new ResponseContext()
.contentType(Util.getMediaType(request))
.entity(order);
} else {
return new ResponseContext().status(Response.Status.NOT_MODIFIED).entity("Order couldn't be deleted.");
}
}
}
|
[
"frantuma@yahoo.com"
] |
frantuma@yahoo.com
|
e5bdd6b6be778b0e16886fc8fb923c4708026f97
|
9d5ee746925d19d2c2ce4f23f1c6ec3719c30e69
|
/src/main/java/org/rookit/mongodb/queries/AbstractPlayableQuery.java
|
2586daa63fb9a3093a62a0f43b093bcf41264c82
|
[
"MIT"
] |
permissive
|
JPDSousa/rookit-mongodb
|
cf68457e15526239f2a2d4304d76e6c71d7d226f
|
42f641dd6a319dde5765885c887df7b979723c86
|
refs/heads/master
| 2023-06-22T13:00:59.798379
| 2023-03-14T10:58:52
| 2023-03-15T11:03:41
| 102,255,541
| 0
| 0
|
MIT
| 2023-06-07T10:58:35
| 2017-09-03T10:00:21
|
Java
|
UTF-8
|
Java
| false
| false
| 4,118
|
java
|
/*******************************************************************************
* Copyright (C) 2017 Joao Sousa
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
******************************************************************************/
package org.rookit.mongodb.queries;
import static org.rookit.api.dm.play.able.Playable.*;
import java.time.Duration;
import java.time.LocalDate;
import org.mongodb.morphia.Datastore;
import org.mongodb.morphia.query.Query;
import org.rookit.api.dm.play.able.Playable;
import org.rookit.api.storage.queries.PlayableQuery;
@SuppressWarnings("javadoc")
public abstract class AbstractPlayableQuery<E extends Playable, Q extends PlayableQuery<E, Q>> extends AbstractRookitQuery<Q, E> implements PlayableQuery<E, Q> {
protected AbstractPlayableQuery(Datastore datastore, Query<E> query) {
super(datastore, query);
}
@SuppressWarnings("unchecked")
@Override
public Q playedMoreThan(long plays) {
query.field(PLAYS).greaterThan(plays);
return (Q) this;
}
@SuppressWarnings("unchecked")
@Override
public Q playedLessThan(long plays) {
query.field(PLAYS).lessThan(plays);
return (Q) this;
}
@SuppressWarnings("unchecked")
@Override
public Q playedBetween(long min, long max) {
query.and(
query.criteria(PLAYS).greaterThan(min),
query.criteria(PLAYS).lessThan(max)
);
return (Q) this;
}
@SuppressWarnings("unchecked")
@Override
public Q lastPlayedBefore(LocalDate date) {
query.field(LAST_PLAYED).lessThan(date);
return (Q) this;
}
@SuppressWarnings("unchecked")
@Override
public Q lastPlayedAfter(LocalDate date) {
query.field(LAST_PLAYED).greaterThan(date);
return (Q) this;
}
@SuppressWarnings("unchecked")
@Override
public Q skippedMoreThan(long skipped) {
query.field(SKIPPED).greaterThan(skipped);
return (Q) this;
}
@SuppressWarnings("unchecked")
@Override
public Q skippedLessThan(long skipped) {
query.field(SKIPPED).lessThan(skipped);
return (Q) this;
}
@SuppressWarnings("unchecked")
@Override
public Q skippedBetween(long min, long max) {
query.and(
query.criteria(SKIPPED).greaterThan(min),
query.criteria(SKIPPED).lessThan(max)
);
return (Q) this;
}
@SuppressWarnings("unchecked")
@Override
public Q lastSkippedBefore(LocalDate date) {
query.field(LAST_SKIPPED).lessThan(date);
return (Q) this;
}
@SuppressWarnings("unchecked")
@Override
public Q lastSkippedAfter(LocalDate date) {
query.field(LAST_SKIPPED).greaterThan(date);
return (Q) this;
}
@SuppressWarnings("unchecked")
@Override
public Q withDurationGreaterThan(Duration duration) {
query.field(DURATION).greaterThan(duration);
return (Q) this;
}
@SuppressWarnings("unchecked")
@Override
public Q withDurationSmallerThan(Duration duration) {
query.field(DURATION).lessThan(duration);
return (Q) this;
}
@SuppressWarnings("unchecked")
@Override
public Q withDurationBetween(Duration min, Duration max) {
query.and(
query.criteria(DURATION).greaterThan(min),
query.criteria(DURATION).lessThan(max)
);
return (Q) this;
}
}
|
[
"jpd.sousa@campus.fct.unl.pt"
] |
jpd.sousa@campus.fct.unl.pt
|
96fca410093e880cad5513a42db626351fd18277
|
9b75d8540ff2e55f9ff66918cc5676ae19c3bbe3
|
/bazaar8.apk-decompiled/sources/kotlin/InitializedLazyImpl.java
|
99eefda0fa4452c97041fafecc50cb1964f02134
|
[] |
no_license
|
BaseMax/PopularAndroidSource
|
a395ccac5c0a7334d90c2594db8273aca39550ed
|
bcae15340907797a91d39f89b9d7266e0292a184
|
refs/heads/master
| 2020-08-05T08:19:34.146858
| 2019-10-06T20:06:31
| 2019-10-06T20:06:31
| 212,433,298
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 400
|
java
|
package kotlin;
import h.c;
import java.io.Serializable;
/* compiled from: Lazy.kt */
public final class InitializedLazyImpl<T> implements c<T>, Serializable {
public final T value;
public InitializedLazyImpl(T t) {
this.value = t;
}
public T getValue() {
return this.value;
}
public String toString() {
return String.valueOf(getValue());
}
}
|
[
"MaxBaseCode@gmail.com"
] |
MaxBaseCode@gmail.com
|
eb9c8c21b760f1fa0bb4a19b1b43fbfd7972c641
|
97fd02f71b45aa235f917e79dd68b61c62b56c1c
|
/src/main/java/com/tencentcloudapi/dsgc/v20190723/models/DescribeRDBAssetSensitiveDistributionRequest.java
|
2b3bf433f42a166908c25726db4e5c20fe6439f8
|
[
"Apache-2.0"
] |
permissive
|
TencentCloud/tencentcloud-sdk-java
|
7df922f7c5826732e35edeab3320035e0cdfba05
|
09fa672d75e5ca33319a23fcd8b9ca3d2afab1ec
|
refs/heads/master
| 2023-09-04T10:51:57.854153
| 2023-09-01T03:21:09
| 2023-09-01T03:21:09
| 129,837,505
| 537
| 317
|
Apache-2.0
| 2023-09-13T02:42:03
| 2018-04-17T02:58:16
|
Java
|
UTF-8
|
Java
| false
| false
| 3,568
|
java
|
/*
* Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.tencentcloudapi.dsgc.v20190723.models;
import com.tencentcloudapi.common.AbstractModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;
public class DescribeRDBAssetSensitiveDistributionRequest extends AbstractModel{
/**
* dspa实例id
*/
@SerializedName("DspaId")
@Expose
private String DspaId;
/**
* 合规组id
*/
@SerializedName("ComplianceId")
@Expose
private Long ComplianceId;
/**
* 查询的资产信息列表
*/
@SerializedName("AssetList")
@Expose
private AssetList [] AssetList;
/**
* Get dspa实例id
* @return DspaId dspa实例id
*/
public String getDspaId() {
return this.DspaId;
}
/**
* Set dspa实例id
* @param DspaId dspa实例id
*/
public void setDspaId(String DspaId) {
this.DspaId = DspaId;
}
/**
* Get 合规组id
* @return ComplianceId 合规组id
*/
public Long getComplianceId() {
return this.ComplianceId;
}
/**
* Set 合规组id
* @param ComplianceId 合规组id
*/
public void setComplianceId(Long ComplianceId) {
this.ComplianceId = ComplianceId;
}
/**
* Get 查询的资产信息列表
* @return AssetList 查询的资产信息列表
*/
public AssetList [] getAssetList() {
return this.AssetList;
}
/**
* Set 查询的资产信息列表
* @param AssetList 查询的资产信息列表
*/
public void setAssetList(AssetList [] AssetList) {
this.AssetList = AssetList;
}
public DescribeRDBAssetSensitiveDistributionRequest() {
}
/**
* NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
* and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
*/
public DescribeRDBAssetSensitiveDistributionRequest(DescribeRDBAssetSensitiveDistributionRequest source) {
if (source.DspaId != null) {
this.DspaId = new String(source.DspaId);
}
if (source.ComplianceId != null) {
this.ComplianceId = new Long(source.ComplianceId);
}
if (source.AssetList != null) {
this.AssetList = new AssetList[source.AssetList.length];
for (int i = 0; i < source.AssetList.length; i++) {
this.AssetList[i] = new AssetList(source.AssetList[i]);
}
}
}
/**
* Internal implementation, normal users should not use it.
*/
public void toMap(HashMap<String, String> map, String prefix) {
this.setParamSimple(map, prefix + "DspaId", this.DspaId);
this.setParamSimple(map, prefix + "ComplianceId", this.ComplianceId);
this.setParamArrayObj(map, prefix + "AssetList.", this.AssetList);
}
}
|
[
"tencentcloudapi@tencent.com"
] |
tencentcloudapi@tencent.com
|
83c8aa9cbf10d4e8520f896d61a4ba6b5114d5f4
|
e06df16478bc1ecd396319cfde5b6e1076581781
|
/app/src/main/java/com/jinke/housekeeper/service/biz/MemberlistActivityBiz.java
|
1bd88891cfd60c02a3f79c99f0b1fdd8ec103d3b
|
[] |
no_license
|
632215/HouseKeeper
|
52c44ec439ea29e23c16f5a35e1c05d9799b6a87
|
05ba37d8e3f127b0ea46c96c43cda7c438f37cd2
|
refs/heads/master
| 2020-03-21T12:01:25.883436
| 2018-06-25T02:20:32
| 2018-06-25T02:20:32
| 138,533,070
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 362
|
java
|
package com.jinke.housekeeper.service.biz;
import com.jinke.housekeeper.service.listener.MemberlistActivityListener;
import java.util.SortedMap;
/**
* Created by Administrator on 2017/9/7.
*/
public interface MemberlistActivityBiz {
void getMenberList(SortedMap<String, String> map, MemberlistActivityListener listener, boolean isShow);
}
|
[
"weishaung@example.com"
] |
weishaung@example.com
|
7c76a140403b669d4859b018e1a0798166e87e50
|
748ba12fcad7d809ec8e3ba16db014803c52ba8c
|
/src/main/java/com/curso/springboot/domain/Pessoa.java
|
2d1917a65ccdf9daf51b552de23a14cf05626ea1
|
[] |
no_license
|
raelAndrade/SpringBoot-teste
|
6b2d5f4a8f80404559762a2c1e36426affc780f4
|
97fa582cc5c3dac2eaf5247a4cfda3a3d2950f32
|
refs/heads/master
| 2020-04-09T03:44:17.474376
| 2018-12-01T23:07:24
| 2018-12-01T23:07:24
| 159,994,859
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,409
|
java
|
package com.curso.springboot.domain;
import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Entity
public class Pessoa implements Serializable{
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
private Long id;
private String nome;
private String sobrenome;
private int idade;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getNome() {
return nome;
}
public void setNome(String nome) {
this.nome = nome;
}
public String getSobrenome() {
return sobrenome;
}
public void setSobrenome(String sobrenome) {
this.sobrenome = sobrenome;
}
public int getIdade() {
return idade;
}
public void setIdade(int idade) {
this.idade = idade;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((id == null) ? 0 : id.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Pessoa other = (Pessoa) obj;
if (id == null) {
if (other.id != null)
return false;
} else if (!id.equals(other.id))
return false;
return true;
}
}
|
[
"israelg.andrade@bol.com.br"
] |
israelg.andrade@bol.com.br
|
6b8884e239178dd17d35ba4f30f6df9196e9de4b
|
3b305d6e4fbd18c65504291c4e61155e62e75d53
|
/app/src/main/java/org/huaanwater/work/function/FunctionUserPoint.java
|
04ccd231751ba977be375be50d1485ef68f594b7
|
[] |
no_license
|
AliesYangpai/HuaAnWater
|
cb9ae3a26e02141b896ba6b8df2ff7a975158053
|
91e5d57f9325a07d10b9a96261019f055e4c50d9
|
refs/heads/master
| 2020-03-29T22:45:18.591335
| 2018-09-26T14:25:45
| 2018-09-26T14:25:45
| 150,438,904
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,253
|
java
|
package org.huaanwater.work.function;
import org.huaanwater.work.constant.ConstHz;
import org.huaanwater.work.constant.ConstLocalData;
import org.huaanwater.work.entity.ErrorEntity;
import org.huaanwater.work.http.HttpConst;
/**
* Created by Alie on 2018/2/28.
* 类描述
* 版本
*/
public class FunctionUserPoint {
/**
* 流水方向 汉字
* @param flow_direction
* @return
*/
public String getHzFlowDirection(String flow_direction) {
String hz = ConstHz.INCOME;
if(flow_direction.equals(ConstLocalData.INCOME)){
hz = ConstHz.INCOME;
}else if(flow_direction.equals(ConstLocalData.OUTLAY)) {
hz = ConstHz.OUTLAY;
}
return hz;
}
/**
* 操作类型汉字
* @param handle_type
* @return
*/
public String getHzHandleType(String handle_type) {
String hz = ConstHz.RECHARGE;
if(handle_type.equals(ConstLocalData.SIGNIN)){
hz = ConstHz.SIGNIN;
}else if(handle_type.equals(ConstLocalData.CONSUMPTION)) {
hz = ConstHz.CONSUMPTION;
}else if(handle_type.equals(ConstLocalData.RECHARGE)) {
hz = ConstHz.RECHARGE;
}
return hz;
}
}
|
[
"yangpai_beibei@163.com"
] |
yangpai_beibei@163.com
|
4632f5ba1afc46f3bcd4839dd94d7333c47d53a8
|
7ae0e08a6bf05dc4b5e690f46d72997225e7d42d
|
/src/main/java/org/gwtproject/i18n/client/impl/cldr/LocalizedNamesImpl_sr_Latn_XK.java
|
595b0a8073abecdeaafd5afca70564d236e62dae
|
[] |
no_license
|
niloc132/gwt-i18n-cldr
|
776521e18f8a43f2d72b72b5b4b76e0ec6103571
|
c57796a071a73b1bbeff678c14a4be57fa20005a
|
refs/heads/master
| 2020-08-14T05:30:26.612739
| 2019-10-13T08:54:05
| 2019-10-13T08:54:05
| 215,106,442
| 0
| 0
| null | 2019-10-14T17:34:21
| 2019-10-14T17:34:21
| null |
UTF-8
|
Java
| false
| false
| 5,088
|
java
|
/*
* Copyright 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package org.gwtproject.i18n.client.impl.cldr;
// DO NOT EDIT - GENERATED FROM CLDR DATA
/**
* Localized names for the "sr_Latn_XK" locale.
*/
public class LocalizedNamesImpl_sr_Latn_XK extends LocalizedNamesImpl_sr_Latn {
@Override
public String[] loadSortedRegionCodes() {
return new String[] {
"AL",
"DZ",
"VI",
"AS",
"AD",
"AO",
"AI",
"AQ",
"AG",
"AR",
"AW",
"AU",
"AT",
"AF",
"AZ",
"BS",
"BH",
"BD",
"BB",
"BE",
"BZ",
"BY",
"BJ",
"BM",
"BW",
"BO",
"BA",
"CX",
"BR",
"VG",
"IO",
"BN",
"BG",
"BF",
"BI",
"BT",
"TD",
"CF",
"CZ",
"CL",
"ME",
"DK",
"DG",
"DM",
"DO",
"JE",
"DJ",
"EG",
"EC",
"GQ",
"ER",
"EE",
"ET",
"EU",
"EZ",
"FO",
"FJ",
"PH",
"FI",
"FK",
"FR",
"GF",
"PF",
"TF",
"GA",
"GM",
"GH",
"GG",
"GI",
"GR",
"GD",
"GL",
"GE",
"GU",
"GP",
"GY",
"GT",
"GN",
"GW",
"HT",
"NL",
"HN",
"HR",
"IN",
"ID",
"IQ",
"IR",
"IE",
"IS",
"IT",
"IL",
"JM",
"JP",
"YE",
"AM",
"JO",
"GS",
"KR",
"SS",
"ZA",
"CV",
"KY",
"KH",
"CM",
"CA",
"IC",
"BQ",
"QA",
"KZ",
"KE",
"CN",
"CY",
"KG",
"KI",
"CC",
"CO",
"KM",
"CG",
"CD",
"XK",
"CR",
"CU",
"CK",
"CW",
"KW",
"LA",
"LS",
"LV",
"LB",
"LR",
"LY",
"LI",
"LT",
"LU",
"MG",
"YT",
"MK",
"MW",
"MV",
"MY",
"ML",
"MT",
"UM",
"MA",
"MH",
"MQ",
"MU",
"MR",
"HU",
"MX",
"MM",
"FM",
"MD",
"MC",
"MN",
"MS",
"MZ",
"NA",
"NR",
"DE",
"NP",
"NE",
"NG",
"NI",
"NU",
"NO",
"NC",
"NZ",
"CI",
"QO",
"AX",
"OM",
"TC",
"AC",
"BV",
"HM",
"CP",
"IM",
"NF",
"PK",
"PW",
"PS",
"PA",
"PG",
"PY",
"PE",
"PN",
"PL",
"PR",
"PT",
"RE",
"RW",
"RO",
"RU",
"SV",
"WS",
"SM",
"ST",
"HK",
"MO",
"SA",
"SC",
"SN",
"EA",
"KP",
"MP",
"SL",
"SG",
"SY",
"US",
"SK",
"SI",
"SB",
"SO",
"ES",
"RS",
"LK",
"SD",
"SR",
"CH",
"SJ",
"SZ",
"SE",
"SH",
"LC",
"BL",
"KN",
"MF",
"SX",
"PM",
"VC",
"TJ",
"TH",
"TW",
"TZ",
"TL",
"TG",
"TK",
"TO",
"TT",
"TA",
"TN",
"TM",
"TR",
"TV",
"UG",
"UN",
"AE",
"GB",
"UA",
"UY",
"UZ",
"WF",
"VU",
"VA",
"VE",
"VN",
"XA",
"XB",
"ZM",
"EH",
"ZW",
};
}
@Override
protected void loadNameMap() {
super.loadNameMap();
namesMap.put("CG", "Kongo");
namesMap.put("CV", "Kabo Verde");
namesMap.put("CZ", "Češka Republika");
namesMap.put("HK", "SAR Hongkong");
namesMap.put("KN", "Sveti Kits i Nevis");
namesMap.put("MO", "SAR Makao");
namesMap.put("PM", "Sveti Pjer i Mikelon");
namesMap.put("RE", "Reunion");
namesMap.put("UM", "Manja udaljena ostrva SAD");
namesMap.put("VC", "Sveti Vinsent i Grenadini");
}
}
|
[
"akabme@gmail.com"
] |
akabme@gmail.com
|
2009d691a9c276c4d7f5387d916cc74562c46407
|
0ceafc2afe5981fd28ce0185e0170d4b6dbf6241
|
/AlgoKit (3rdp)/Code-store v1.0/yaal/lib/test/on2013_08/on2013_08_09_Codeforces_Round__195/D___Bear_Vasily_and_Beautiful_Strings/Main.java
|
2f78e3ff2d1b9b733b7a4c6d04caf7e28a16d495
|
[] |
no_license
|
brainail/.happy-coooding
|
1cd617f6525367133a598bee7efb9bf6275df68e
|
cc30c45c7c9b9164095905cc3922a91d54ecbd15
|
refs/heads/master
| 2021-06-09T02:54:36.259884
| 2021-04-16T22:35:24
| 2021-04-16T22:35:24
| 153,018,855
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 436
|
java
|
package on2013_08.on2013_08_09_Codeforces_Round__195.D___Bear_Vasily_and_Beautiful_Strings;
import net.egork.chelper.tester.NewTester;
import org.junit.Assert;
import org.junit.Test;
public class Main {
@Test
public void test() throws Exception {
if (!NewTester.test("lib/test/on2013_08/on2013_08_09_Codeforces_Round__195/D___Bear_Vasily_and_Beautiful_Strings/D - Bear Vasily and Beautiful Strings.task"))
Assert.fail();
}
}
|
[
"wsemirz@gmail.com"
] |
wsemirz@gmail.com
|
9f72b8dcbdb1c9364e04e64f082cc4853e22adde
|
8ad56249a238e7ea250e379f1565545ebdea8348
|
/core/src/main/java/org/easytravelapi/cms/GetActivityAvailabilityCalendarRS.java
|
9dc191329770b512bb120a2fad2d158198f97467
|
[] |
no_license
|
miguelperezcolom/easytravelapi
|
566bbcd1b4d8610ec139dac3b0126721db46a28b
|
74e32e9dd4a4ffafda99f3156ce225736a339a57
|
refs/heads/master
| 2022-12-15T01:06:36.192422
| 2021-12-31T13:42:24
| 2021-12-31T13:42:24
| 103,146,281
| 0
| 1
| null | 2022-12-09T00:41:25
| 2017-09-11T14:28:51
|
Java
|
UTF-8
|
Java
| false
| false
| 796
|
java
|
package org.easytravelapi.cms;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.easytravelapi.common.AbstractRS;
import java.util.ArrayList;
import java.util.List;
/**
* Created by miguel on 26/7/17.
*/
@ApiModel(description = "Container for the getavailability response")
public class GetActivityAvailabilityCalendarRS extends AbstractRS {
@ApiModelProperty(value = "List of available hotels, including prices")
private List<ActivityAvailabilityCalendarMonth> months = new ArrayList<ActivityAvailabilityCalendarMonth>();
public List<ActivityAvailabilityCalendarMonth> getMonths() {
return months;
}
public void setMonths(List<ActivityAvailabilityCalendarMonth> months) {
this.months = months;
}
}
|
[
"miguelperezcolom@gmail.com"
] |
miguelperezcolom@gmail.com
|
4fff72bf2b7e9cba9a50e57d33e6c0a183cd35d3
|
288cfde56612f9935f84846737d9ee631ddd25b5
|
/TFS.IRP.V8 Project/Project/src/com/tfs/irp/tag/dao/IrpTagTypeDAO.java
|
695d53753ba7e63f39be09075d5237139fd03ad5
|
[] |
no_license
|
tfsgaotong/irpv8
|
b97d42e616a71d8d4f4260b27d2b26dc391d4acc
|
6d2548544903dcfbcb7dfdb8e95e8f73937691f2
|
refs/heads/master
| 2021-05-15T07:25:15.874960
| 2017-11-22T09:51:27
| 2017-11-22T09:51:27
| 111,659,185
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,587
|
java
|
package com.tfs.irp.tag.dao;
import com.tfs.irp.tag.entity.IrpTagType;
import com.tfs.irp.tag.entity.IrpTagTypeExample;
import com.tfs.irp.util.PageUtil;
import java.sql.SQLException;
import java.util.List;
public interface IrpTagTypeDAO {
/**
* This method was generated by Apache iBATIS ibator.
* This method corresponds to the database table IRP_TAG_TYPE
*
* @ibatorgenerated Sat Nov 22 11:42:06 CST 2014
*/
int countByExample(IrpTagTypeExample example) throws SQLException;
/**
* This method was generated by Apache iBATIS ibator.
* This method corresponds to the database table IRP_TAG_TYPE
*
* @ibatorgenerated Sat Nov 22 11:42:06 CST 2014
*/
int deleteByExample(IrpTagTypeExample example) throws SQLException;
/**
* This method was generated by Apache iBATIS ibator.
* This method corresponds to the database table IRP_TAG_TYPE
*
* @ibatorgenerated Sat Nov 22 11:42:06 CST 2014
*/
int deleteByPrimaryKey(Long typeid) throws SQLException;
/**
* This method was generated by Apache iBATIS ibator.
* This method corresponds to the database table IRP_TAG_TYPE
*
* @ibatorgenerated Sat Nov 22 11:42:06 CST 2014
*/
void insert(IrpTagType record) throws SQLException;
/**
* This method was generated by Apache iBATIS ibator.
* This method corresponds to the database table IRP_TAG_TYPE
*
* @ibatorgenerated Sat Nov 22 11:42:06 CST 2014
*/
void insertSelective(IrpTagType record) throws SQLException;
/**
* This method was generated by Apache iBATIS ibator.
* This method corresponds to the database table IRP_TAG_TYPE
*
* @ibatorgenerated Sat Nov 22 11:42:06 CST 2014
*/
List<IrpTagType> selectByExample(IrpTagTypeExample example) throws SQLException;
List<IrpTagType> selectByExample(IrpTagTypeExample example, PageUtil pageUtil) throws SQLException;
/**
* This method was generated by Apache iBATIS ibator.
* This method corresponds to the database table IRP_TAG_TYPE
*
* @ibatorgenerated Sat Nov 22 11:42:06 CST 2014
*/
IrpTagType selectByPrimaryKey(Long typeid) throws SQLException;
/**
* This method was generated by Apache iBATIS ibator.
* This method corresponds to the database table IRP_TAG_TYPE
*
* @ibatorgenerated Sat Nov 22 11:42:06 CST 2014
*/
int updateByExampleSelective(IrpTagType record, IrpTagTypeExample example) throws SQLException;
/**
* This method was generated by Apache iBATIS ibator.
* This method corresponds to the database table IRP_TAG_TYPE
*
* @ibatorgenerated Sat Nov 22 11:42:06 CST 2014
*/
int updateByExample(IrpTagType record, IrpTagTypeExample example) throws SQLException;
/**
* This method was generated by Apache iBATIS ibator.
* This method corresponds to the database table IRP_TAG_TYPE
*
* @ibatorgenerated Sat Nov 22 11:42:06 CST 2014
*/
int updateByPrimaryKeySelective(IrpTagType record) throws SQLException;
/**
* This method was generated by Apache iBATIS ibator.
* This method corresponds to the database table IRP_TAG_TYPE
*
* @ibatorgenerated Sat Nov 22 11:42:06 CST 2014
*/
int updateByPrimaryKey(IrpTagType record) throws SQLException;
List<IrpTagType> selectHotByExample(IrpTagTypeExample example, PageUtil pageUtil) throws SQLException;
}
|
[
"gao.tong@ruisiming.com.cn"
] |
gao.tong@ruisiming.com.cn
|
ce8778010ee7d7ee08453f3f51ea494b95b379ad
|
745b525c360a2b15b8d73841b36c1e8d6cdc9b03
|
/jun_java_plugins/jun_okhttp/src/main/java/com/mzlion/easyokhttp/response/handle/StringDataHandler.java
|
5f2e792275cff20ba57ef0c80c8aa39e1d9930e8
|
[
"Apache-2.0"
] |
permissive
|
wujun728/jun_java_plugin
|
1f3025204ef5da5ad74f8892adead7ee03f3fe4c
|
e031bc451c817c6d665707852308fc3b31f47cb2
|
refs/heads/master
| 2023-09-04T08:23:52.095971
| 2023-08-18T06:54:29
| 2023-08-18T06:54:29
| 62,047,478
| 117
| 42
| null | 2023-08-21T16:02:15
| 2016-06-27T10:23:58
|
Java
|
UTF-8
|
Java
| false
| false
| 2,152
|
java
|
/*
* Copyright (C) 2016-2017 mzlion(mzllon@qq.com).
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.mzlion.easyokhttp.response.handle;
import okhttp3.Response;
import java.io.IOException;
import java.nio.charset.Charset;
/**
* 字符串数据处理器
*
* @author mzlion on 2016/12/14.
*/
public class StringDataHandler implements DataHandler<String> {
/**
* 返回字符串数据处理器
*
* @return 字符串数据处理器
*/
public static StringDataHandler create() {
return Holder.handler;
}
/**
* 单例Holder
*
* @author mzlion
*/
private static class Holder {
/**
* 因为{@linkplain StringDataHandler}使用频率非常高,所以这里直接缓存
*/
private static StringDataHandler handler = new StringDataHandler();
}
/**
* 字符编码
*/
private Charset charset;
/**
* 获取字符编码
*
* @return 字符编码
*/
public Charset getCharset() {
return charset;
}
/**
* 设置字符编码
*
* @param charset 字符编码
*/
public void setCharset(Charset charset) {
this.charset = charset;
}
/**
* 得到相应结果后,将相应数据转为需要的数据格式
*
* @param response 需要转换的对象
* @return 转换结果
*/
@Override
public String handle(Response response) throws IOException {
if (this.charset != null) {
return new String(response.body().bytes());
}
return response.body().string();
}
}
|
[
"wujun728@163.com"
] |
wujun728@163.com
|
d598ab52d7db2425ace3543d01977790fa5e1618
|
ab0c6e545ee926d87731d78a881b3d47b6bac9ab
|
/javacode/KafkaConsumer.java
|
e29815a95b55d66d094b876adc6c552b799a9dab
|
[] |
no_license
|
un-knower/spark_data_process
|
5de011dd8bbd27d5c6ab428fcef4df3171e1f8f9
|
7098ec7997ccb189c82d15f56cb09efd7e7250e6
|
refs/heads/master
| 2020-03-26T11:43:27.221934
| 2018-05-30T02:06:12
| 2018-05-30T02:06:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,277
|
java
|
package javacode;
/**
* Created by lenovo on 2017/12/29.
*/
import kafka.consumer.Consumer;
import kafka.consumer.ConsumerConfig;
import kafka.consumer.ConsumerIterator;
import kafka.consumer.KafkaStream;
import kafka.javaapi.consumer.ConsumerConnector;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.*;
import java.util.HashMap;
import java.util.Properties;
import com.google.gson.JsonArray;
import com.google.gson.JsonIOException;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.google.gson.JsonSyntaxException;
public class KafkaConsumer {
//private Consumer consumer;
private static final String TOPIC = "TP_C017_E01";
private static final int THREAD_AMOUNT = 1;
private static String brokerlist = "10.162.2.83:2181,10.162.2.84:2181,10.162.2.85:2181,10.162.2.83:9092,10.162.2.84:9092,10.162.2.85:9092,10.162.2.86:9092,10.162.2.87:9092,10.162.20.27:18284";
private Properties getProperties()
{
Properties prop = new Properties();
//prop.put("zookeeper_connect","cdh1,cdh3,cdh4");
prop.put("group.id","1229_lyh");
//prop.put("zookeeper.session.timeout.ms","");
//prop.put("auto.commit.interval.ms","");
prop.put("auto.offset.reset","smallest");
//prop.put("rebalance.max.retries","");
//prop.put("rebalance.backoff.ms","");
prop.put("key.serializer", "org.apache.kafka.common.serialization.StringSerializer");
prop.put("value.serializer", "org.apache.kafka.common.serialization.StringSerializer");
prop.put("metadata.broker.list", brokerlist);
return prop;
}
private int consume() throws IOException
{
Properties props = getProperties();
Map<String, Integer> topicCountMap = new HashMap<String, Integer>();
// 一个线程
topicCountMap.put(TOPIC,new Integer(1));
ConsumerConnector consumer = Consumer.createJavaConsumerConnector(new ConsumerConfig(props));
Map<String, List<KafkaStream<byte[], byte[]>>> msgStreams = consumer.createMessageStreams(topicCountMap );
List<KafkaStream<byte[], byte[]>> msgStreamList = msgStreams.get(TOPIC);
// 理论上应该是多线程处理,不想写多线程,先写一个线程吧。
// for(int i =0; i <msgStreamList.size();i++)
// {
//
// }
KafkaStream<byte[],byte[]> kstream = msgStreamList.get(0);//因为只有已给线程,所以,就取第一个
ConsumerIterator<byte[],byte[]> iterator = kstream.iterator();
int linescount =0;
int Filecount = 1;
File outfile = new File("./out/output"+Filecount);
BufferedWriter bw = new BufferedWriter(new FileWriter(outfile));
StringBuilder strbui =new StringBuilder();
while(iterator.hasNext())
{
if(linescount % 10000000 == 0) //每1000万行,写一个文件
{
bw.write(strbui.toString());
bw.flush();
bw.close();
Filecount++;
System.out.println("File " + Filecount + " has been save in path //out//output ");
outfile = new File("./out/output"+Filecount);
bw = new BufferedWriter(new FileWriter(outfile));
strbui =new StringBuilder();
}
String message= new String(iterator.next().message());
strbui.append(message);
strbui.append("|||");
linescount++;
}
//剩余部分,写入文件
bw.write(strbui.toString());
bw.flush();
bw.close();
consumer.commitOffsets();
return Filecount;
}
public static void main(String[] args)
{
KafkaConsumer consumer = new KafkaConsumer();
int i= 0;
try {
i= consumer.consume();
}
catch (Exception ex)
{
System.out.println("Exception: " + ex.getMessage());
}
System.out.printf("%d files has been saved.===========Programme Done!==========\n",i);
}
}
|
[
"root@localhost.localdomain"
] |
root@localhost.localdomain
|
c9845e8f4e646d63e441a50c4def29fe080d1555
|
a9f2721a6f09d15112561dc53432da7bb2fa7174
|
/spring-cache1-common/src/main/java/com/abin/lee/spring/cache/common/context/XmlWebApplicationContext.java
|
0c0c82a9e8950a72f8b50572d1e6941daeec7562
|
[] |
no_license
|
zondahuman/spring-cache1
|
b10bcefddb15a2ca708e57e9fafcac4b16114993
|
ab8005cbd8a2b36637be2ca4ff19ec5d75393735
|
refs/heads/master
| 2021-01-22T01:11:34.664015
| 2017-09-06T02:28:59
| 2017-09-06T02:28:59
| 102,209,046
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 956
|
java
|
package com.abin.lee.spring.cache.common.context;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.beans.factory.config.SingletonBeanRegistry;
import org.springframework.beans.factory.support.DefaultSingletonBeanRegistry;
public class XmlWebApplicationContext extends org.springframework.web.context.support.XmlWebApplicationContext {
public void setBean(String beanName, Object obj) {
ConfigurableListableBeanFactory configurableListableBeanFactory = getBeanFactory();
configurableListableBeanFactory.registerSingleton(beanName, obj);
if (((obj instanceof DisposableBean)) && ((configurableListableBeanFactory instanceof SingletonBeanRegistry)))
((DefaultSingletonBeanRegistry) configurableListableBeanFactory).registerDisposableBean(beanName,
(DisposableBean) obj);
}
}
|
[
"zondahuman@gmail.com"
] |
zondahuman@gmail.com
|
680e86072c0fb90c0bee7cf57e1f88e49ee1e651
|
21b736028889a32f1dcba96e8236f80cc9973df5
|
/src/com/microsoft/schemas/_2003/_10/serialization/impl/UnsignedByteDocumentImpl.java
|
0c1f16d23f01d7dee2fc4c5d3a953ccc8d31987b
|
[] |
no_license
|
nbuddharaju/Java2CRMCRUD
|
3cfcf487ce9fe9c8791484387f32da2e83ccef15
|
aaba26757df088dda780aa6fe873c7d8356f4d56
|
refs/heads/master
| 2021-01-19T04:07:07.528318
| 2016-05-28T08:52:28
| 2016-05-28T08:52:28
| 59,885,531
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,120
|
java
|
/*
* An XML document type.
* Localname: unsignedByte
* Namespace: http://schemas.microsoft.com/2003/10/Serialization/
* Java type: com.microsoft.schemas._2003._10.serialization.UnsignedByteDocument
*
* Automatically generated - do not modify.
*/
package com.microsoft.schemas._2003._10.serialization.impl;
/**
* A document containing one unsignedByte(@http://schemas.microsoft.com/2003/10/Serialization/) element.
*
* This is a complex type.
*/
public class UnsignedByteDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.microsoft.schemas._2003._10.serialization.UnsignedByteDocument
{
private static final long serialVersionUID = 1L;
public UnsignedByteDocumentImpl(org.apache.xmlbeans.SchemaType sType)
{
super(sType);
}
private static final javax.xml.namespace.QName UNSIGNEDBYTE$0 =
new javax.xml.namespace.QName("http://schemas.microsoft.com/2003/10/Serialization/", "unsignedByte");
/**
* Gets the "unsignedByte" element
*/
public short getUnsignedByte()
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.SimpleValue target = null;
target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(UNSIGNEDBYTE$0, 0);
if (target == null)
{
return 0;
}
return target.getShortValue();
}
}
/**
* Gets (as xml) the "unsignedByte" element
*/
public org.apache.xmlbeans.XmlUnsignedByte xgetUnsignedByte()
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.XmlUnsignedByte target = null;
target = (org.apache.xmlbeans.XmlUnsignedByte)get_store().find_element_user(UNSIGNEDBYTE$0, 0);
return target;
}
}
/**
* Tests for nil "unsignedByte" element
*/
public boolean isNilUnsignedByte()
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.XmlUnsignedByte target = null;
target = (org.apache.xmlbeans.XmlUnsignedByte)get_store().find_element_user(UNSIGNEDBYTE$0, 0);
if (target == null) return false;
return target.isNil();
}
}
/**
* Sets the "unsignedByte" element
*/
public void setUnsignedByte(short unsignedByte)
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.SimpleValue target = null;
target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(UNSIGNEDBYTE$0, 0);
if (target == null)
{
target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(UNSIGNEDBYTE$0);
}
target.setShortValue(unsignedByte);
}
}
/**
* Sets (as xml) the "unsignedByte" element
*/
public void xsetUnsignedByte(org.apache.xmlbeans.XmlUnsignedByte unsignedByte)
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.XmlUnsignedByte target = null;
target = (org.apache.xmlbeans.XmlUnsignedByte)get_store().find_element_user(UNSIGNEDBYTE$0, 0);
if (target == null)
{
target = (org.apache.xmlbeans.XmlUnsignedByte)get_store().add_element_user(UNSIGNEDBYTE$0);
}
target.set(unsignedByte);
}
}
/**
* Nils the "unsignedByte" element
*/
public void setNilUnsignedByte()
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.XmlUnsignedByte target = null;
target = (org.apache.xmlbeans.XmlUnsignedByte)get_store().find_element_user(UNSIGNEDBYTE$0, 0);
if (target == null)
{
target = (org.apache.xmlbeans.XmlUnsignedByte)get_store().add_element_user(UNSIGNEDBYTE$0);
}
target.setNil();
}
}
}
|
[
"ravi.buddharaju@aviso.com"
] |
ravi.buddharaju@aviso.com
|
504d81dc041ee69ed570b8e72306c2fed92c7f0c
|
ab6c0bc74dff2b522618ae4192b63ca879f3d07a
|
/utp-trade-ht/utp-common/src/main/java/cn/kingnet/utp/trade/common/exception/BaseResponseException.java
|
ac9912ba08bf3edaa98d85c624a9adf928c07977
|
[] |
no_license
|
exyangbang/learngit
|
9669cb329c9686db96bd250a6ceceaf44f02e945
|
12c92df41a6b778a9db132c37dd136bedfd5b56f
|
refs/heads/master
| 2023-02-16T20:49:57.437363
| 2021-01-16T07:45:17
| 2021-01-16T07:45:17
| 330,107,905
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,871
|
java
|
package cn.kingnet.utp.trade.common.exception;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import java.time.LocalDateTime;
/**
* @author zhongli
*/
@Slf4j
@Setter
@Getter
@ToString
public abstract class BaseResponseException extends RuntimeException{
private final int status;
private final String exception;
private final String message;
private final LocalDateTime timestamp;
public BaseResponseException(Throwable e) {
super(e);
this.exception = e.getClass().getName();
this.status = 500;
this.message = e.getMessage();
this.timestamp = LocalDateTime.now();
}
public BaseResponseException(Throwable e,String exception) {
super(e);
this.exception = exception;
this.status = 500;
this.message = e.getMessage();
this.timestamp = LocalDateTime.now();
}
public BaseResponseException(int status, String exception, String message) {
this.status = status;
this.exception = exception;
this.message = message;
this.timestamp = LocalDateTime.now();
}
public BaseResponseException(int status, String message) {
super(String.format("%s:%s", status, message));
this.status = status;
this.message = message;
this.exception = this.getClass().getName();
this.timestamp = LocalDateTime.now();
}
public BaseResponseException(HttpStatus status, String exception, String message) {
this(status.value(), exception, message);
}
public BaseResponseException(HttpStatus status) {
this(status.value(), status.getReasonPhrase());
}
public BaseResponseException(HttpStatus status, String message) {
this(status.value(), message);
}
}
|
[
"945288603@qq.com"
] |
945288603@qq.com
|
68e1ab25d080b408a7dbfe791741c48003a1757a
|
fe6807af952b1c0a5672ab088b4c0850c5c85138
|
/dal-client/src/test/java/test/com/ctrip/platform/dal/dao/annotation/normal/TransactionAnnoClassOracle.java
|
2236ca0c4f87249e9535508c09819b983379752b
|
[
"Apache-2.0"
] |
permissive
|
hoku850/dal
|
01c2af428f52aebf6467b5e807abbe11cf2f5e4d
|
64696b96e67524874c7e747b1fe0bee50b387a1c
|
refs/heads/master
| 2021-09-23T23:36:14.343795
| 2018-09-29T08:42:09
| 2018-09-29T08:42:09
| 70,295,088
| 0
| 0
|
Apache-2.0
| 2018-09-29T08:42:10
| 2016-10-08T01:40:57
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 3,840
|
java
|
package test.com.ctrip.platform.dal.dao.annotation.normal;
import java.sql.SQLException;
import test.com.ctrip.platform.dal.dao.unitbase.OracleDatabaseInitializer;
import com.ctrip.platform.dal.dao.DalHints;
import com.ctrip.platform.dal.dao.annotation.Shard;
import com.ctrip.platform.dal.dao.annotation.Transactional;
public class TransactionAnnoClassOracle extends BaseTransactionAnnoClass {
public static final String DB_NAME = OracleDatabaseInitializer.DATABASE_NAME;
public static final String DB_NAME_SHARD = "dao_test_oracle_dbShard";
public TransactionAnnoClassOracle() {
super(DB_NAME, DB_NAME_SHARD, "select 1 from dual");
}
@Transactional(logicDbName = DB_NAME)
public String perform() {
return super.perform();
}
@Transactional(logicDbName = DB_NAME)
public String performFail() {
return super.performFail();
}
@Transactional(logicDbName = DB_NAME)
public String performNest() {
return super.performNest();
}
public String performNest2() {
return super.performNest2();
}
public String performNest3() throws InstantiationException, IllegalAccessException {
return super.performNest3();
}
@Transactional(logicDbName = DB_NAME)
public String performNestDistributedTransaction() {
return super.performNestDistributedTransaction();
}
@Transactional(logicDbName = DB_NAME)
public String performDistributedTransaction() {
return super.performDistributedTransaction();
}
@Transactional(logicDbName = DB_NAME_SHARD)
public String perform(@Shard String id) {
return super.perform(id);
}
@Transactional(logicDbName = DB_NAME_SHARD)
public String perform(@Shard Integer id) {
return super.perform(id);
}
@Transactional(logicDbName = DB_NAME_SHARD)
public String perform(@Shard int id) {
return super.perform(id);
}
@Transactional(logicDbName = DB_NAME_SHARD)
public String perform(String id, DalHints hints) {
return super.perform(id, hints);
}
@Transactional(logicDbName = DB_NAME_SHARD)
public String performFail(String id, DalHints hints) {
return super.performFail(id, hints);
}
@Transactional(logicDbName = DB_NAME_SHARD)
public String performWitShard(@Shard String id, DalHints hints) {
return super.performWitShard(id, hints);
}
@Transactional(logicDbName = DB_NAME_SHARD)
public String performWitShardNest(@Shard String id, DalHints hints) {
return super.performWitShardNest(id, hints);
}
@Transactional(logicDbName = DB_NAME_SHARD)
public String performWitShardNestConflict(@Shard String id, DalHints hints) {
return super.performWitShardNestConflict(id, hints);
}
@Transactional(logicDbName = DB_NAME_SHARD)
public String performWitShardNestFail(@Shard String id, DalHints hints) {
return super.performWitShardNestFail(id, hints);
}
@Transactional(logicDbName = DB_NAME_SHARD)
public String performCommandWitShardNest(final @Shard String id, DalHints hints) throws SQLException {
return super.performCommandWitShardNest(id, hints);
}
@Transactional(logicDbName = DB_NAME_SHARD)
public String performCommandWitShardNestFail(final @Shard String id, DalHints hints) throws SQLException {
return super.performCommandWitShardNestFail(id, hints);
}
@Transactional(logicDbName = DB_NAME_SHARD)
public String performDetectDistributedTransaction(final @Shard String id, DalHints hints) throws SQLException {
return super.performDetectDistributedTransaction(id, hints);
}
}
|
[
"he_jiehui@163.com"
] |
he_jiehui@163.com
|
f01eb5092c2c9423e31f5c5a799588bb51118320
|
46b85208c7dfd1249ff5c2f263cdb0e742bff8da
|
/solon-projects/solon-logging/solon.logging.log4j2/src/main/java/org/apache/logging/log4j/solon/SolonTagsConverter.java
|
118050db670c6c6afcc1410f3ba10ecb617224af
|
[
"Apache-2.0"
] |
permissive
|
noear/solon
|
1c0a78c5ab2bec45a67fcf772f582f9cb4894fab
|
63f3f49cddcbfa8bd6d596998735f0704e8d43f8
|
refs/heads/master
| 2023-08-31T09:10:32.303640
| 2023-08-30T14:13:27
| 2023-08-30T14:13:27
| 140,086,420
| 1,687
| 187
|
Apache-2.0
| 2023-09-10T10:31:54
| 2018-07-07T13:23:50
|
Java
|
UTF-8
|
Java
| false
| false
| 1,356
|
java
|
package org.apache.logging.log4j.solon;
import org.apache.logging.log4j.core.LogEvent;
import org.apache.logging.log4j.core.config.plugins.Plugin;
import org.apache.logging.log4j.core.pattern.ConverterKeys;
import org.apache.logging.log4j.core.pattern.LogEventPatternConverter;
import org.apache.logging.log4j.core.pattern.PatternConverter;
import org.apache.logging.log4j.util.ReadOnlyStringMap;
/**
* @author noear
* @since 1.6
*/
@Plugin(name = "tags", category = PatternConverter.CATEGORY)
@ConverterKeys({"tags","tags"})
public class SolonTagsConverter extends LogEventPatternConverter {
private static final SolonTagsConverter INSTANCE =
new SolonTagsConverter();
/**
* 创建实体,这个函数必须有
*/
public static SolonTagsConverter newInstance(
final String[] options) {
return INSTANCE;
}
private SolonTagsConverter() {
super("tags", "tags");
}
@Override
public void format(LogEvent event, StringBuilder toAppendTo) {
ReadOnlyStringMap eData = event.getContextData();
if (eData != null) {
eData.forEach((tag, val) -> {
if ("traceId".equals(tag) == false) {
toAppendTo.append("[@").append(tag).append(":").append(val).append("]");
}
});
}
}
}
|
[
"noear@live.cn"
] |
noear@live.cn
|
4a1785fc451c415370f3b3b5906e4242f44c3693
|
6906f3d0fb42c7523f31f72ef860b9fd029f5f8b
|
/src/main/java/com/kiselev/enemy/network/instagram/api/internal2/requests/feed/FeedReelsMediaRequest.java
|
d6bf9ad933070a18b7639c71c9ecf3a28dba852f
|
[
"MIT"
] |
permissive
|
vadim8kiselev/public-enemy
|
e8e8b429cc3420c99c74908cbfbceec4f0eee8f5
|
e1a9fe8008228249858c258a001e79c908bb65c0
|
refs/heads/master
| 2023-04-10T09:49:32.664986
| 2021-04-14T17:40:38
| 2021-04-14T17:40:38
| 274,445,031
| 1
| 0
|
MIT
| 2021-04-26T20:42:34
| 2020-06-23T15:41:55
|
Java
|
UTF-8
|
Java
| false
| false
| 1,038
|
java
|
package com.kiselev.enemy.network.instagram.api.internal2.requests.feed;
import com.kiselev.enemy.network.instagram.api.internal2.IGClient;
import com.kiselev.enemy.network.instagram.api.internal2.models.IGPayload;
import com.kiselev.enemy.network.instagram.api.internal2.requests.IGPostRequest;
import com.kiselev.enemy.network.instagram.api.internal2.responses.IGResponse;
import lombok.Getter;
import java.util.stream.Stream;
public class FeedReelsMediaRequest extends IGPostRequest<IGResponse> {
private String[] _ids;
public FeedReelsMediaRequest(Object... ids) {
_ids = Stream.of(ids).map(Object::toString).toArray(String[]::new);
}
@Override
protected IGPayload getPayload(IGClient client) {
return new IGPayload() {
@Getter
private String[] user_ids = _ids;
};
}
@Override
public String path() {
return "feed/reels_media/";
}
@Override
public Class<IGResponse> getResponseType() {
return IGResponse.class;
}
}
|
[
"vadim8kiselev@gmail.com"
] |
vadim8kiselev@gmail.com
|
48be5e8a7d833d470ebf70ebecc62a6f18116748
|
32af18f81cd56db0acbf73d5e00ed0085e031870
|
/parser/src/main/java/com/steadystate/css/parser/selectors/SelectorFactoryImpl.java
|
c44b431a3f53794b3599f7a97024a8700ebbfcdb
|
[] |
no_license
|
dvaosta/Loboevolution
|
d3792ecc7e6a9cf99fc166e864290b9723cf7ff8
|
6128712dd754c4b8a814d36a9dca29108e473125
|
refs/heads/master
| 2021-01-12T02:51:27.338661
| 2017-01-04T17:54:53
| 2017-01-04T17:54:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,533
|
java
|
/*
* Copyright (C) 1999-2016 David Schweinsberg. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.steadystate.css.parser.selectors;
import org.w3c.css.sac.CSSException;
import org.w3c.css.sac.CharacterDataSelector;
import org.w3c.css.sac.Condition;
import org.w3c.css.sac.ConditionalSelector;
import org.w3c.css.sac.DescendantSelector;
import org.w3c.css.sac.ElementSelector;
import org.w3c.css.sac.NegativeSelector;
import org.w3c.css.sac.ProcessingInstructionSelector;
import org.w3c.css.sac.Selector;
import org.w3c.css.sac.SelectorFactory;
import org.w3c.css.sac.SiblingSelector;
import org.w3c.css.sac.SimpleSelector;
/**
*
* @author <a href="mailto:davidsch@users.sourceforge.net">David Schweinsberg</a>
*/
public class SelectorFactoryImpl implements SelectorFactory {
public ConditionalSelector createConditionalSelector(
final SimpleSelector selector,
final Condition condition) throws CSSException {
return new ConditionalSelectorImpl(selector, condition);
}
public SimpleSelector createAnyNodeSelector() throws CSSException {
throw new CSSException(CSSException.SAC_NOT_SUPPORTED_ERR);
}
public SimpleSelector createRootNodeSelector() throws CSSException {
throw new CSSException(CSSException.SAC_NOT_SUPPORTED_ERR);
}
public NegativeSelector createNegativeSelector(final SimpleSelector selector) throws CSSException {
throw new CSSException(CSSException.SAC_NOT_SUPPORTED_ERR);
}
public ElementSelector createElementSelector(final String namespaceURI, final String localName)
throws CSSException {
if (namespaceURI != null) {
throw new CSSException(CSSException.SAC_NOT_SUPPORTED_ERR);
}
return new ElementSelectorImpl(localName);
}
public ElementSelector createSyntheticElementSelector() throws CSSException {
return new SyntheticElementSelectorImpl();
}
public CharacterDataSelector createTextNodeSelector(final String data) throws CSSException {
throw new CSSException(CSSException.SAC_NOT_SUPPORTED_ERR);
}
public CharacterDataSelector createCDataSectionSelector(final String data)
throws CSSException {
throw new CSSException(CSSException.SAC_NOT_SUPPORTED_ERR);
}
public ProcessingInstructionSelector createProcessingInstructionSelector(
final String target,
final String data) throws CSSException {
throw new CSSException(CSSException.SAC_NOT_SUPPORTED_ERR);
}
public CharacterDataSelector createCommentSelector(final String data) throws CSSException {
throw new CSSException(CSSException.SAC_NOT_SUPPORTED_ERR);
}
public ElementSelector createPseudoElementSelector(
final String namespaceURI,
final String pseudoName) throws CSSException {
if (namespaceURI != null) {
throw new CSSException(CSSException.SAC_NOT_SUPPORTED_ERR);
}
return new PseudoElementSelectorImpl(pseudoName);
}
public DescendantSelector createDescendantSelector(
final Selector parent,
final SimpleSelector descendant) throws CSSException {
return new DescendantSelectorImpl(parent, descendant);
}
public DescendantSelector createChildSelector(
final Selector parent,
final SimpleSelector child) throws CSSException {
return new ChildSelectorImpl(parent, child);
}
public SiblingSelector createDirectAdjacentSelector(
final short nodeType,
final Selector child,
final SimpleSelector directAdjacent) throws CSSException {
return new DirectAdjacentSelectorImpl(nodeType, child, directAdjacent);
}
public SiblingSelector createGeneralAdjacentSelector(
final short nodeType,
final Selector child,
final SimpleSelector directAdjacent) throws CSSException {
return new GeneralAdjacentSelectorImpl(nodeType, child, directAdjacent);
}
}
|
[
"ivan.difrancesco@yahoo.it"
] |
ivan.difrancesco@yahoo.it
|
f438c40729417d1648a149e0290e78e5680fe846
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project7/src/main/java/org/gradle/test/performance7_4/Production7_303.java
|
06f115dc38ee4e3df536e712977e07605f53e8c6
|
[] |
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
| 300
|
java
|
package org.gradle.test.performance7_4;
public class Production7_303 extends org.gradle.test.performance5_4.Production5_303 {
private final String property;
public Production7_303() {
this.property = "foo";
}
public String getProperty() {
return property;
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
8f9b2af5c0d3fd8ab2109b65720b5f8b93e8f79a
|
c82bfe5797f1104a6c3fa59762fd065b089489ea
|
/src/test/java/ch/ethz/idsc/sophus/crv/clothoid/PolarClothoidsTest.java
|
fae76ba8141a3b1745496c86b47cb20eba585ed1
|
[] |
no_license
|
etarakci-hvl/owl
|
208f6bf6be98717dbdd62ab369dd654bdbf4343a
|
60790bdb31741b8368001e892a941bded7fcbfb9
|
refs/heads/master
| 2022-03-02T00:22:24.167829
| 2019-11-17T09:15:23
| 2019-11-17T09:15:23
| 279,145,425
| 1
| 0
| null | 2020-07-12T20:47:38
| 2020-07-12T20:47:37
| null |
UTF-8
|
Java
| false
| false
| 914
|
java
|
// code by jph
package ch.ethz.idsc.sophus.crv.clothoid;
import ch.ethz.idsc.tensor.RationalScalar;
import ch.ethz.idsc.tensor.Tensor;
import ch.ethz.idsc.tensor.Tensors;
import ch.ethz.idsc.tensor.alg.Range;
import ch.ethz.idsc.tensor.opt.Pi;
import ch.ethz.idsc.tensor.opt.ScalarTensorFunction;
import ch.ethz.idsc.tensor.sca.Chop;
import junit.framework.TestCase;
public class PolarClothoidsTest extends TestCase {
public void testAngles() {
Tensor pxy = Tensors.vector(0, 0).unmodifiable();
Tensor qxy = Tensors.vector(1, 0).unmodifiable();
Tensor angles = Range.of(-3, 4).map(Pi.TWO::multiply);
for (Tensor angle : angles) {
ScalarTensorFunction curve = //
PolarClothoids.INSTANCE.curve(pxy.copy().append(angle), qxy.copy().append(angle));
Tensor r = curve.apply(RationalScalar.HALF);
Chop._12.requireClose(r, Tensors.vector(0.5, 0).append(angle));
}
}
}
|
[
"jan.hakenberg@gmail.com"
] |
jan.hakenberg@gmail.com
|
c4d7b097fd1837e04bcf7f8d22f5c7611b9a455f
|
81911c5ef40f84edf327d4e507f2e991ce23620d
|
/nautilus/game/arcade/kit/perks/PerkFletcher.java
|
b135e267a88332a506335de5e97ab9b2e41e0016
|
[] |
no_license
|
gabrielvicenteYT/MineplexArcade
|
45400b2e4b78095d290e98604e9b611bbc43c810
|
9a15762665d836b80b7554a9be2738fc061f1239
|
refs/heads/master
| 2022-11-27T03:29:22.557995
| 2020-07-26T00:58:03
| 2020-07-26T00:58:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,413
|
java
|
package nautilus.game.arcade.kit.perks;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilInv;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.itemstack.ItemStackFactory;
import mineplex.core.recharge.Recharge;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import nautilus.game.arcade.game.Game;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.kit.Perk;
import org.bukkit.GameMode;
import org.bukkit.Material;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.entity.EntityShootBowEvent;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.event.entity.ProjectileHitEvent;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.player.PlayerDropItemEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory;
public class PerkFletcher extends Perk
{
private HashSet<Entity> _fletchArrows = new HashSet();
private int _max = 0;
private int _time = 0;
private boolean _remove;
public PerkFletcher(int time, int max, boolean remove)
{
super("Fletcher", new String[] {mineplex.core.common.util.C.cGray + "Receive 1 Arrow every " + time + " seconds. Maximum of " + max + "." });
this._time = time;
this._max = max;
this._remove = remove;
}
@EventHandler
public void FletchShootBow(EntityShootBowEvent event)
{
if (!(event.getEntity() instanceof Player)) {
return;
}
Player player = (Player)event.getEntity();
if (!this.Kit.HasKit(player)) {
return;
}
for (int i = 0; i <= 8; i++) {
if ((player.getInventory().getItem(i) != null) &&
(UtilInv.IsItem(player.getInventory().getItem(i), Material.ARROW, (byte)1)))
{
this._fletchArrows.add(event.getProjectile());
return;
}
}
}
@EventHandler
public void FletchProjectileHit(ProjectileHitEvent event) {
if ((this._remove) &&
(this._fletchArrows.remove(event.getEntity()))) {
event.getEntity().remove();
}
}
@EventHandler
public void Fletch(UpdateEvent event) {
if (event.getType() != UpdateType.FAST) {
return;
}
for (Player cur : mineplex.core.common.util.UtilServer.getPlayers())
{
if (cur.getGameMode() == GameMode.SURVIVAL)
{
if (this.Kit.HasKit(cur))
{
if (this.Manager.GetGame().IsAlive(cur))
{
if (Recharge.Instance.use(cur, GetName(), this._time * 1000, false, false))
{
if (!UtilInv.contains(cur, Material.ARROW, (byte)1, this._max))
{
cur.getInventory().addItem(new ItemStack[] { ItemStackFactory.Instance.CreateStack(262, 1, 1, F.item("Fletched Arrow")) });
cur.playSound(cur.getLocation(), org.bukkit.Sound.ITEM_PICKUP, 2.0F, 1.0F);
} } } } }
}
}
@EventHandler
public void FletchDrop(PlayerDropItemEvent event) {
if (event.isCancelled()) {
return;
}
if (!UtilInv.IsItem(event.getItemDrop().getItemStack(), Material.ARROW, (byte)1)) {
return;
}
event.setCancelled(true);
UtilPlayer.message(event.getPlayer(), F.main(GetName(), "You cannot drop " + F.item("Fletched Arrow") + "."));
}
@EventHandler
public void FletchDeathRemove(PlayerDeathEvent event)
{
HashSet<ItemStack> remove = new HashSet();
for (ItemStack item : event.getDrops()) {
if (UtilInv.IsItem(item, Material.ARROW, (byte)1))
remove.add(item);
}
for (ItemStack item : remove) {
event.getDrops().remove(item);
}
}
@EventHandler
public void FletchInvClick(InventoryClickEvent event) {
UtilInv.DisallowMovementOf(event, "Fletched Arrow", Material.ARROW, (byte)1, true);
}
@EventHandler
public void FletchClean(UpdateEvent event)
{
if (event.getType() != UpdateType.SEC) {
return;
}
for (Iterator<Entity> arrowIterator = this._fletchArrows.iterator(); arrowIterator.hasNext();)
{
Entity arrow = (Entity)arrowIterator.next();
if ((arrow.isDead()) || (!arrow.isValid())) {
arrowIterator.remove();
}
}
}
}
|
[
"48403150+ItsNeverAlan@users.noreply.github.com"
] |
48403150+ItsNeverAlan@users.noreply.github.com
|
61f291d4307df747c2fdc28571142358ca118f51
|
99e9bdbc81e6e5cb81878a3fd5bbe2e59ee51488
|
/app/src/main/java/com/ciba/wholefinancial/callback/OnCodeListsCallBack.java
|
d7cbc6fe4889dd9f288741b7049eea79236641e4
|
[] |
no_license
|
xumingda/WholeFinancial
|
7dd06c18b5863f67c4abe861a93f005db843ee99
|
f3063df95d7a8f77efdd80cb59e65ce43189c891
|
refs/heads/master
| 2020-07-03T10:53:43.608947
| 2019-08-14T06:28:59
| 2019-08-14T06:28:59
| 201,884,279
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 222
|
java
|
package com.ciba.wholefinancial.callback;
import com.ciba.wholefinancial.bean.CityCodeBean;
import java.util.List;
public interface OnCodeListsCallBack {
public void CallBackCityCodeList(List<CityCodeBean> list);
}
|
[
"317335277@qq.com"
] |
317335277@qq.com
|
95e0085d57f9454726fd1e6afa28c439b61e91ed
|
09d0ddd512472a10bab82c912b66cbb13113fcbf
|
/TestApplications/TF-BETA-THERMATK-v5.7.1/DecompiledCode/Fernflower/src/main/java/org/telegram/messenger/_$$Lambda$MessagesController$OUR20mf5_d9gsY1zs0m8SWbYyH8.java
|
162f45bd87fed89c3dc0b6a99fa24e5cadec9ffd
|
[] |
no_license
|
sgros/activity_flow_plugin
|
bde2de3745d95e8097c053795c9e990c829a88f4
|
9e59f8b3adacf078946990db9c58f4965a5ccb48
|
refs/heads/master
| 2020-06-19T02:39:13.865609
| 2019-07-08T20:17:28
| 2019-07-08T20:17:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 710
|
java
|
package org.telegram.messenger;
import java.util.ArrayList;
// $FF: synthetic class
public final class _$$Lambda$MessagesController$OUR20mf5_d9gsY1zs0m8SWbYyH8 implements Runnable {
// $FF: synthetic field
private final MessagesController f$0;
// $FF: synthetic field
private final int f$1;
// $FF: synthetic field
private final ArrayList f$2;
// $FF: synthetic method
public _$$Lambda$MessagesController$OUR20mf5_d9gsY1zs0m8SWbYyH8(MessagesController var1, int var2, ArrayList var3) {
this.f$0 = var1;
this.f$1 = var2;
this.f$2 = var3;
}
public final void run() {
this.f$0.lambda$generateJoinMessage$225$MessagesController(this.f$1, this.f$2);
}
}
|
[
"crash@home.home.hr"
] |
crash@home.home.hr
|
0346c03545299d5be625a1759915249a250e3134
|
bb51e5dba1d63de5c4e641f43aff1f3143c146a4
|
/0728_Board2/src/com/ict/model/Ans_write0_cmd.java
|
6b9f10dd7cd82e079dbf14ec80f7fb449819801b
|
[] |
no_license
|
woocharle/ict.edu.2020.jspstudy
|
959517b3e62ce39f2329163f0cf76dbb2dbf0617
|
86e3f916603e92f84c9570631a303cc4499289de
|
refs/heads/master
| 2022-11-23T09:26:34.055781
| 2020-08-05T09:24:59
| 2020-08-05T09:24:59
| 275,727,237
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 386
|
java
|
package com.ict.model;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class Ans_write0_cmd implements Command{
@Override
public String exec(HttpServletRequest request, HttpServletResponse response) {
String cPage = request.getParameter("cPage");
request.setAttribute("cPage", cPage);
return "view/ans_write.jsp";
}
}
|
[
"silvershots@naver.com"
] |
silvershots@naver.com
|
a8f9c6aa7dc43a48fca278d84a87491f1e042cc6
|
ac82c09fd704b2288cef8342bde6d66f200eeb0d
|
/projects/OG-Financial/src/main/java/com/opengamma/financial/analytics/model/credit/BucketedSpreadCurveFunction.java
|
f0178d1378c6c09b5abfacf7fa1bd08b3de889e4
|
[
"Apache-2.0"
] |
permissive
|
cobaltblueocean/OG-Platform
|
88f1a6a94f76d7f589fb8fbacb3f26502835d7bb
|
9b78891139503d8c6aecdeadc4d583b23a0cc0f2
|
refs/heads/master
| 2021-08-26T00:44:27.315546
| 2018-02-23T20:12:08
| 2018-02-23T20:12:08
| 241,467,299
| 0
| 2
|
Apache-2.0
| 2021-08-02T17:20:41
| 2020-02-18T21:05:35
|
Java
|
UTF-8
|
Java
| false
| false
| 5,876
|
java
|
/*
* Copyright (C) 2013 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
package com.opengamma.financial.analytics.model.credit;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Map;
import java.util.Set;
import org.threeten.bp.Instant;
import org.threeten.bp.LocalTime;
import org.threeten.bp.Period;
import org.threeten.bp.ZoneOffset;
import org.threeten.bp.ZonedDateTime;
import org.threeten.bp.format.DateTimeParseException;
import com.google.common.collect.Sets;
import com.opengamma.OpenGammaRuntimeException;
import com.opengamma.analytics.math.curve.NodalTenorDoubleCurve;
import com.opengamma.engine.ComputationTarget;
import com.opengamma.engine.ComputationTargetSpecification;
import com.opengamma.engine.function.AbstractFunction;
import com.opengamma.engine.function.CompiledFunctionDefinition;
import com.opengamma.engine.function.FunctionCompilationContext;
import com.opengamma.engine.function.FunctionExecutionContext;
import com.opengamma.engine.function.FunctionInputs;
import com.opengamma.engine.target.ComputationTargetType;
import com.opengamma.engine.value.ComputedValue;
import com.opengamma.engine.value.ValueProperties;
import com.opengamma.engine.value.ValuePropertyNames;
import com.opengamma.engine.value.ValueRequirement;
import com.opengamma.engine.value.ValueRequirementNames;
import com.opengamma.engine.value.ValueSpecification;
import com.opengamma.financial.analytics.ircurve.YieldCurveData;
import com.opengamma.id.ExternalId;
import com.opengamma.id.ExternalIdBundle;
import com.opengamma.util.async.AsynchronousExecution;
import com.opengamma.util.credit.CreditCurveIdentifier;
import com.opengamma.util.money.Currency;
import com.opengamma.util.time.Tenor;
/**
*
*/
public class BucketedSpreadCurveFunction extends AbstractFunction {
@Override
public CompiledFunctionDefinition compile(final FunctionCompilationContext compilationContext, final Instant atInstant) {
final ZonedDateTime atZDT = ZonedDateTime.ofInstant(atInstant, ZoneOffset.UTC);
return new AbstractInvokingCompiledFunction(atZDT.with(LocalTime.MIDNIGHT), atZDT.plusDays(1).with(LocalTime.MIDNIGHT).minusNanos(1000000)) {
@SuppressWarnings("synthetic-access")
@Override
public Set<ComputedValue> execute(final FunctionExecutionContext executionContext, final FunctionInputs inputs, final ComputationTarget target,
final Set<ValueRequirement> desiredValues) throws AsynchronousExecution {
final Object dataObject = inputs.getValue(ValueRequirementNames.YIELD_CURVE_DATA);
if (dataObject == null) {
throw new OpenGammaRuntimeException("Could not get spread curve bucket data");
}
final YieldCurveData data = (YieldCurveData) dataObject;
final ArrayList<Tenor> times = new ArrayList<>();
final ArrayList<Double> rates = new ArrayList<>();
for (final Map.Entry<ExternalIdBundle, Double> dataEntry : data.getDataPoints().entrySet()) {
// TODO: The original code here was based on there just being one external ID per point and that having a value which is a period. It would
// be better to use an id-scheme to tag such values just in case there are any other arbitrary tickers thrown into the bundle. The safest
// interim approach is to use the first parseable one
Period period = null;
for (final ExternalId id : dataEntry.getKey()) {
try {
period = Period.parse(id.getValue());
break;
} catch (final DateTimeParseException e) {
// ignore
}
}
if (period == null) {
throw new IllegalArgumentException(dataEntry.toString());
}
times.add(Tenor.of(period));
rates.add(dataEntry.getValue());
}
final NodalTenorDoubleCurve curve = new NodalTenorDoubleCurve(times.toArray(new Tenor[times.size()]), rates.toArray(new Double[rates.size()]), false);
final ValueProperties properties = createValueProperties().get();
final ValueSpecification spec = new ValueSpecification(ValueRequirementNames.BUCKETED_SPREADS, target.toSpecification(), properties);
return Collections.singleton(new ComputedValue(spec, curve));
}
@Override
public ComputationTargetType getTargetType() {
return ComputationTargetType.PRIMITIVE;
}
@Override
public boolean canApplyTo(final FunctionCompilationContext context, final ComputationTarget target) {
return target.getUniqueId().getScheme().equals(CreditCurveIdentifier.OBJECT_SCHEME);
}
@Override
public Set<ValueSpecification> getResults(final FunctionCompilationContext context, final ComputationTarget target) {
@SuppressWarnings("synthetic-access")
final ValueProperties properties = createValueProperties().get();
return Collections.singleton(new ValueSpecification(ValueRequirementNames.BUCKETED_SPREADS, target.toSpecification(), properties));
}
@Override
public Set<ValueRequirement> getRequirements(final FunctionCompilationContext context, final ComputationTarget target, final ValueRequirement desiredValue) {
final CreditCurveIdentifier curveId = CreditCurveIdentifier.of(target.toSpecification().getUniqueId());
final Currency ccy = curveId.getCurrency();
final ValueProperties properties = ValueProperties.builder()
.with(ValuePropertyNames.CURVE, curveId.toString()).get();
final Set<ValueRequirement> requirements = Sets.newHashSetWithExpectedSize(3);
requirements.add(new ValueRequirement(ValueRequirementNames.YIELD_CURVE_DATA, ComputationTargetSpecification.of(ccy), properties));
return requirements;
}
};
}
}
|
[
"cobaltblue.ocean@gmail.com"
] |
cobaltblue.ocean@gmail.com
|
3bc6e9831a51ca3a0ee96a7ea7321c906feb79f5
|
89ce74f7132847612aded67ff6468cb5d6a15112
|
/src/main/java/j7orm/internal/ConditionPool.java
|
ace0f7678c1246c6af2acb037497102f2ebcfc73
|
[
"Apache-2.0"
] |
permissive
|
marcoromagnolo/j7ORM
|
3e1d31825a09d04869799e7b7fc624546269d7f2
|
ffb508bf27bc63676c850e56f172a66de9d186b0
|
refs/heads/master
| 2021-05-10T09:21:45.891379
| 2018-01-25T14:27:56
| 2018-01-25T14:27:56
| 118,923,452
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,825
|
java
|
/**
* Copyright 2016 Marco Romagnolo
*
* 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 j7orm.internal;
import j7orm.type.LogicType;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* @author Marco Romagnolo
*/
public class ConditionPool {
private List<Condition> conditions = new ArrayList<>();
private ConditionPool pool;
private LogicType logic = LogicType.AND;
public ConditionPool(Condition condition) {
Collections.addAll(this.conditions, condition);
}
public LogicType getLogic() {
return logic;
}
public ConditionPool or(Condition condition) {
condition.setLogic(LogicType.OR);
Collections.addAll(this.conditions, condition);
return this;
}
public ConditionPool and(Condition condition) {
condition.setLogic(LogicType.AND);
Collections.addAll(this.conditions, condition);
return this;
}
public ConditionPool and(ConditionPool pool) {
this.pool = pool;
return this;
}
public ConditionPool or(ConditionPool pool) {
this.pool = pool;
return this;
}
public List<Condition> getConditions() {
return conditions;
}
public ConditionPool getPool() {
return pool;
}
}
|
[
"mail@marcoromagnolo.it"
] |
mail@marcoromagnolo.it
|
dba76088d5affa6a068185ff056eae1696d62286
|
f662526b79170f8eeee8a78840dd454b1ea8048c
|
/bbw.java
|
d2b37bc619ad1bb4519fa141849e1240f7eb93c2
|
[] |
no_license
|
jason920612/Minecraft
|
5d3cd1eb90726efda60a61e8ff9e057059f9a484
|
5bd5fb4dac36e23a2c16576118da15c4890a2dff
|
refs/heads/master
| 2023-01-12T17:04:25.208957
| 2020-11-26T08:51:21
| 2020-11-26T08:51:21
| 316,170,984
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,053
|
java
|
/* */ import com.google.common.collect.Lists;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class bbw
/* */ extends ayu
/* */ {
/* */ public bbw() {
/* 41 */ super((new ayu.a())
/* */
/* 43 */ .a(new bxr(au, an))
/* 44 */ .a(ayu.d.b)
/* 45 */ .a(ayu.b.l)
/* 46 */ .a(-1.0F)
/* 47 */ .b(0.1F)
/* 48 */ .c(0.5F)
/* 49 */ .d(0.5F)
/* 50 */ .a(4445678)
/* 51 */ .b(270131)
/* 52 */ .a((String)null));
/* */
/* */
/* 55 */ a(bqo.o, new bsc(bwt.b.a, 0.3F, 0.9F));
/* 56 */ a(bqo.f, new brt(0.004D, bru.b.a));
/* 57 */ a(bqo.k, new bsy(false));
/* */
/* 59 */ a(boq.a.a, a((bxj)b, new bsh(0.06666667F)));
/* 60 */ a(boq.a.a, a((bxj)d, new bsh(0.02F)));
/* 61 */ a(boq.a.b, a((bxj)e, new bsh(0.02F)));
/* 62 */ a(boq.a.b, a((bxj)f, new bsh(0.06666667F)));
/* */
/* 64 */ a();
/* 65 */ a(boq.b.b, a(bqo.am, new brm(bct.A), K, new bvj(4)));
/* 66 */ a(boq.b.b, a(bqo.am, new brm(bct.C), J, new bvj(80)));
/* 67 */ a(boq.b.c, a(bqo.ad, bqp.e, L, new bvm(8)));
/* 68 */ a(boq.b.e, a(bqo.an, new bsd(bsd.a, bct.j.p(), 33), t, new bpy(10, 0, 0, 256)));
/* 69 */ a(boq.b.e, a(bqo.an, new bsd(bsd.a, bct.F.p(), 33), t, new bpy(8, 0, 0, 256)));
/* 70 */ a(boq.b.e, a(bqo.an, new bsd(bsd.a, bct.c.p(), 33), t, new bpy(10, 0, 0, 80)));
/* 71 */ a(boq.b.e, a(bqo.an, new bsd(bsd.a, bct.e.p(), 33), t, new bpy(10, 0, 0, 80)));
/* 72 */ a(boq.b.e, a(bqo.an, new bsd(bsd.a, bct.g.p(), 33), t, new bpy(10, 0, 0, 80)));
/* 73 */ a(boq.b.e, a(bqo.an, new bsd(bsd.a, bct.I.p(), 17), t, new bpy(20, 0, 0, 128)));
/* 74 */ a(boq.b.e, a(bqo.an, new bsd(bsd.a, bct.H.p(), 9), t, new bpy(20, 0, 0, 64)));
/* 75 */ a(boq.b.e, a(bqo.an, new bsd(bsd.a, bct.G.p(), 9), t, new bpy(2, 0, 0, 32)));
/* 76 */ a(boq.b.e, a(bqo.an, new bsd(bsd.a, bct.cM.p(), 8), t, new bpy(8, 0, 0, 16)));
/* 77 */ a(boq.b.e, a(bqo.an, new bsd(bsd.a, bct.cm.p(), 8), t, new bpy(1, 0, 0, 16)));
/* 78 */ a(boq.b.e, a(bqo.an, new bsd(bsd.a, bct.aq.p(), 7), A, new bvc(1, 16, 16)));
/* 79 */ a(boq.b.e, a(bqo.ai, new bqe(bct.D, 7, 2, Lists.newArrayList((Object[])new bcs[] { bct.j, bct.i })), h, new bux(3)));
/* 80 */ a(boq.b.e, a(bqo.ai, new bqe(bct.cU, 4, 1, Lists.newArrayList((Object[])new bcs[] { bct.j, bct.cU })), h, new bux(1)));
/* 81 */ a(boq.b.e, a(bqo.ai, new bqe(bct.F, 6, 2, Lists.newArrayList((Object[])new bcs[] { bct.j, bct.i })), h, new bux(1)));
/* */
/* */
/* 84 */ a(boq.b.g, a(bqo.ap, new bsl((bqo<?>[])new bqo[] { bqo.s }, new bqp[] { bqp.e }, new float[] { 0.1F }, (bqo)bqo.C, (FC)bqp.e), s, new buz(0, 0.1F, 1)));
/* 85 */ a(boq.b.g, a(bqo.G, i, new bux(2)));
/* 86 */ a(boq.b.g, a(bqo.M, new btr(bct.aR.p()), j, new bux(1)));
/* 87 */ a(boq.b.g, a(bqo.ah, new bpj(bct.bz), p, new buw(4)));
/* 88 */ a(boq.b.g, a(bqo.ah, new bpj(bct.bA), p, new buw(8)));
/* 89 */ a(boq.b.g, a(bqo.Z, bqp.e, j, new bux(10)));
/* 90 */ a(boq.b.g, a(bqo.Y, bqp.e, p, new buw(32)));
/* 91 */ a(boq.b.g, a(bqo.at, new btg(byy.c), u, new bpy(50, 8, 8, 256)));
/* 92 */ a(boq.b.g, a(bqo.at, new btg(byy.e), v, new bpy(20, 8, 16, 256)));
/* 93 */ a(boq.b.g, a(bqo.aq, new btc((bqo<?>[])new bqo[] { bqo.aA, bqo.aC, bqo.aB }, new bqp[] { bqp.e, bqp.e, bqp.e }), D, new bva(20, 400.0D)));
/* 94 */ a(boq.b.g, a(bqo.ay, new bsx(80, 0.3D), B, bpx.e));
/* 95 */ a(boq.b.g, a(bqo.aD, new bpu(20), r, new buw(16)));
/* 96 */ a(boq.b.h, a(bqo.aa, bqp.e, n, bpx.e));
/* */
/* 98 */ a(afc.d, new ayu.e((aev)aev.as, 10, 4, 4));
/* 99 */ a(afc.d, new ayu.e((aev)aev.aa, 15, 1, 3));
/* 100 */ a(afc.d, new ayu.e((aev)aev.au, 25, 8, 8));
/* 101 */ a(afc.d, new ayu.e((aev)aev.m, 2, 1, 2));
/* 102 */ a(afc.c, new ayu.e((aev)aev.d, 10, 8, 8));
/* 103 */ a(afc.a, new ayu.e((aev)aev.ar, 100, 4, 4));
/* 104 */ a(afc.a, new ayu.e((aev)aev.aJ, 95, 4, 4));
/* 105 */ a(afc.a, new ayu.e((aev)aev.aL, 5, 1, 1));
/* 106 */ a(afc.a, new ayu.e((aev)aev.ak, 100, 4, 4));
/* 107 */ a(afc.a, new ayu.e((aev)aev.k, 100, 4, 4));
/* 108 */ a(afc.a, new ayu.e((aev)aev.am, 100, 4, 4));
/* 109 */ a(afc.a, new ayu.e((aev)aev.s, 10, 1, 4));
/* 110 */ a(afc.a, new ayu.e((aev)aev.aE, 5, 1, 1));
/* */ }
/* */ }
/* Location: F:\dw\server.jar!\bbw.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/
|
[
"jasonya2206@gmail.com"
] |
jasonya2206@gmail.com
|
f973a8f8b1a653e50a35fd152517d9f52c87cde4
|
c1801b90120249d4bf9327dcbcf8ac25fc4a0800
|
/ma-api/src/test/java/me/myarmy/controller/MailControllerTest.java
|
5b524a4706a61482527456d963513569b076b869
|
[] |
no_license
|
aj1155/MyArmy
|
5b525ef4507e5c74ce442b8cf8e1438b841246df
|
3c93a717fe3683f4076a0971218d7ffbc804ec19
|
refs/heads/master
| 2021-01-20T10:55:04.844068
| 2017-05-26T12:21:21
| 2017-05-26T12:21:21
| 83,799,209
| 0
| 0
| null | 2017-05-26T12:21:21
| 2017-03-03T13:09:59
|
Java
|
UTF-8
|
Java
| false
| false
| 1,595
|
java
|
package me.myarmy.controller;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.http.MediaType;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.MvcResult;
import static org.hamcrest.Matchers.is;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
/**
* Created by Manki Kim on 2017-04-30.
*/
@RunWith(SpringRunner.class)
@SpringBootTest
@AutoConfigureMockMvc
@Slf4j
public class MailControllerTest {
@Autowired
private MockMvc mockMvc;
@Test
public void testSendMail() throws Exception {
MvcResult result = mockMvc.perform(post("/api/v1/mail/send")
.param("email","aj1155@naver.com")
.accept(MediaType.APPLICATION_JSON)
.contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isOk())
.andExpect(jsonPath("$.code", is(200)))
.andReturn();
System.out.println("결과+:"+result);
log.debug("{}", result.getResponse().getContentAsString());
}
}
|
[
"aj1155@naver.com"
] |
aj1155@naver.com
|
8ce6164c1eda994148e42f5de966dc41b1becc74
|
f523fc24e675a256370074862301331619210761
|
/TIC10002/src/main/java/uff/ic/lleme/tic10002/heap/NewClass.java
|
3ad16d603522eb933ae4f370b62dfcb5d37e942c
|
[] |
no_license
|
emanuel0101/lleme
|
554433f0d17ed59501c2504c52bd734aa0de9522
|
6a87e503a4ce58d724642e9e91f8840ac8060001
|
refs/heads/master
| 2021-01-11T13:38:31.932540
| 2017-06-21T18:40:27
| 2017-06-21T18:40:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 464
|
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 uff.ic.lleme.tic10002.heap;
/**
*
* @author lapaesleme
*/
public class NewClass {
public static void main(String[] args) {
for (int i = 0; i < 32; i++)
System.out.println("" + i + "-" + (((int) (Math.log(i + 1) / Math.log(2))) + 1));
}
}
|
[
"lapaesleme@gmail.com"
] |
lapaesleme@gmail.com
|
c5e248e860f93455ea1f062dc81be97843db6d17
|
eb49904969531dd404c57dcb456bda91d7018fa9
|
/distributed-lock-core/src/test/java/com/github/alturkovic/lock/key/SpelKeyGeneratorTest.java
|
7c663273d21e6579fee8652e166504028808d6fa
|
[
"MIT"
] |
permissive
|
chenlingmin/distributed-lock
|
9498581f8885dbb9c59d42d04a4a44ddf45e1c89
|
10b1cff5ed2fff971d0dc4035cfbdb73aaeb8a10
|
refs/heads/master
| 2022-06-25T10:37:32.134628
| 2020-05-09T05:21:52
| 2020-05-09T05:21:52
| 262,494,147
| 0
| 0
|
MIT
| 2020-05-09T05:13:25
| 2020-05-09T05:13:24
| null |
UTF-8
|
Java
| false
| false
| 5,493
|
java
|
/*
* MIT License
*
* Copyright (c) 2018 Alen Turkovic
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package com.github.alturkovic.lock.key;
import com.github.alturkovic.lock.exception.EvaluationConvertException;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.junit.Test;
import org.springframework.core.convert.support.DefaultConversionService;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;
public class SpelKeyGeneratorTest {
private final KeyGenerator keyGenerator = new SpelKeyGenerator(new DefaultConversionService());
private final MessageService service = new MessageService();
private final Method sendMessageMethod;
public SpelKeyGeneratorTest() throws NoSuchMethodException {
sendMessageMethod = MessageService.class.getMethod("sendMessage", String.class);
}
@Test
public void shouldGenerateExecutionPath() {
assertThat(keyGenerator.resolveKeys("lock_", "#executionPath", service, sendMessageMethod, new Object[]{"hello"}))
.containsExactly("lock_com.github.alturkovic.lock.key.SpelKeyGeneratorTest.MessageService.sendMessage");
}
@Test
public void shouldGenerateSingleKeyFromContextAndVariables() {
assertThat(keyGenerator.resolveKeys("lock_", "#p0", service, sendMessageMethod, new Object[]{"hello"}))
.containsExactly("lock_hello");
assertThat(keyGenerator.resolveKeys("lock_", "#a0", service, sendMessageMethod, new Object[]{"hello"}))
.containsExactly("lock_hello");
assertThat(keyGenerator.resolveKeys("lock_", "#message", service, sendMessageMethod, new Object[]{"hello"}))
.containsExactly("lock_hello");
}
@Test
public void shouldGenerateMultipleKeysFromContextAndVariablesWithList() {
final String expression = "T(com.github.alturkovic.lock.key.SpelKeyGeneratorTest).generateKeys(#message)";
assertThat(keyGenerator.resolveKeys("lock_", expression, service, sendMessageMethod, new Object[]{"p_"}))
.containsExactly("lock_p_first", "lock_p_second");
}
@Test
public void shouldGenerateMultipleKeysFromContextAndVariablesWithArray() {
final String expression = "T(com.github.alturkovic.lock.key.SpelKeyGeneratorTest).generateArrayKeys(#message)";
assertThat(keyGenerator.resolveKeys("lock_", expression, service, sendMessageMethod, new Object[]{"p_"}))
.containsExactly("lock_p_first", "lock_15");
}
@Test
public void shouldGenerateMultipleKeysFromContextAndVariablesWithMixedTypeValues() {
final String expression = "T(com.github.alturkovic.lock.key.SpelKeyGeneratorTest).generateMixedKeys(#message)";
assertThat(keyGenerator.resolveKeys("lock_", expression, service, sendMessageMethod, new Object[]{"p_"}))
.containsExactly("lock_p_first", "lock_15");
}
@Test(expected = EvaluationConvertException.class)
public void shouldFailWithExpressionThatEvaluatesInNull() {
keyGenerator.resolveKeys("lock_", "null", service, sendMessageMethod, new Object[]{"hello"});
fail("Expected exception with expression that evaluated in null");
}
@Test(expected = EvaluationConvertException.class)
public void shouldFailWithExpressionThatEvaluatesInEmptyList() {
keyGenerator.resolveKeys("lock_", "T(java.util.Collections).emptyList()", service, sendMessageMethod, new Object[]{"hello"});
fail("Expected exception with expression that evaluated in empty list");
}
@Test(expected = EvaluationConvertException.class)
public void shouldFailWithExpressionThatEvaluatesInListWithNullValue() {
keyGenerator.resolveKeys("lock_", "T(java.util.Collections).singletonList(null)", service, sendMessageMethod, new Object[]{"hello"});
fail("Expected exception with expression that evaluated in a list with a null value");
}
@SuppressWarnings("unused")
public static List<String> generateKeys(final String prefix) {
return Arrays.asList(prefix + "first", prefix + "second");
}
@SuppressWarnings("unused")
public static Object[] generateArrayKeys(final String prefix) {
return new Object[] {prefix + "first", 15};
}
@SuppressWarnings("unused")
public static Set<Object> generateMixedKeys(final String prefix) {
return new HashSet<>(Arrays.asList(prefix + "first", 15));
}
@SuppressWarnings("unused")
private static class MessageService {
public void sendMessage(String message) {
}
}
}
|
[
"alturkovic@gmail.com"
] |
alturkovic@gmail.com
|
2c433efa1a0e21680b7d90fe1179ced032f10f85
|
93a846b54cbddc7431cd56a386d325097225a394
|
/daily-meeting-core/src/main/java/com/ast/dm/interactor/member/impl/MemberGetter.java
|
8bc2d872877b581809a159a1f7c6f0dfb90c1db6
|
[
"Apache-2.0"
] |
permissive
|
zaragozamartin91/simple-daily-meeting
|
3ac70452660bcb0f7891dfce473e0a4d84c5ac37
|
e63ebaa7179741af159681d8915c9418de84dfa2
|
refs/heads/master
| 2020-04-02T14:31:35.309654
| 2018-11-09T13:32:18
| 2018-11-09T13:32:18
| 154,528,056
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 988
|
java
|
package com.ast.dm.interactor.member.impl;
import com.ast.dm.entity.Member;
import com.ast.dm.gateway.MemberGateway;
import com.ast.dm.interactor.member.GetMembers;
import com.ast.dm.interactor.member.GetMembersResponse;
import javax.inject.Inject;
import javax.inject.Named;
import java.util.List;
import java.util.stream.Collectors;
@Named
public class MemberGetter implements GetMembers {
private final MemberGateway memberGateway;
@Inject
public MemberGetter(MemberGateway memberGateway) {
this.memberGateway = memberGateway;
}
@Override public GetMembersResponse execute() {
List<Member> members = memberGateway.findAll();
List<GetMembersResponse.MemberItem> memberItems = members
.stream()
.map(member -> new GetMembersResponse.MemberItem(member.id, member.username, member.name, member.role))
.collect(Collectors.toList());
return new GetMembersResponse(memberItems);
}
}
|
[
"zaragozamartin91@gmail.com"
] |
zaragozamartin91@gmail.com
|
a46a4617412c194eda127b50a5ff77b3ec3d8232
|
6baa09045c69b0231c35c22b06cdf69a8ce227d6
|
/modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/v201601/cm/RegionCodeError.java
|
12d7bffdba2ac8f0164da89631f1824c525347b4
|
[
"Apache-2.0"
] |
permissive
|
remotejob/googleads-java-lib
|
f603b47117522104f7df2a72d2c96ae8c1ea011d
|
a330df0799de8d8de0dcdddf4c317d6b0cd2fe10
|
refs/heads/master
| 2020-12-11T01:36:29.506854
| 2016-07-28T22:13:24
| 2016-07-28T22:13:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,388
|
java
|
/**
* RegionCodeError.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter.
*/
package com.google.api.ads.adwords.axis.v201601.cm;
/**
* A list of all errors associated with the
* @RegionCode constraints.
*/
public class RegionCodeError extends com.google.api.ads.adwords.axis.v201601.cm.ApiError implements java.io.Serializable {
/* The error reason represented by an enum. */
private com.google.api.ads.adwords.axis.v201601.cm.RegionCodeErrorReason reason;
public RegionCodeError() {
}
public RegionCodeError(
java.lang.String fieldPath,
java.lang.String trigger,
java.lang.String errorString,
java.lang.String apiErrorType,
com.google.api.ads.adwords.axis.v201601.cm.RegionCodeErrorReason reason) {
super(
fieldPath,
trigger,
errorString,
apiErrorType);
this.reason = reason;
}
/**
* Gets the reason value for this RegionCodeError.
*
* @return reason * The error reason represented by an enum.
*/
public com.google.api.ads.adwords.axis.v201601.cm.RegionCodeErrorReason getReason() {
return reason;
}
/**
* Sets the reason value for this RegionCodeError.
*
* @param reason * The error reason represented by an enum.
*/
public void setReason(com.google.api.ads.adwords.axis.v201601.cm.RegionCodeErrorReason reason) {
this.reason = reason;
}
private java.lang.Object __equalsCalc = null;
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof RegionCodeError)) return false;
RegionCodeError other = (RegionCodeError) obj;
if (obj == null) return false;
if (this == obj) return true;
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = super.equals(obj) &&
((this.reason==null && other.getReason()==null) ||
(this.reason!=null &&
this.reason.equals(other.getReason())));
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = super.hashCode();
if (getReason() != null) {
_hashCode += getReason().hashCode();
}
__hashCodeCalc = false;
return _hashCode;
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(RegionCodeError.class, true);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201601", "RegionCodeError"));
org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("reason");
elemField.setXmlName(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201601", "reason"));
elemField.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201601", "RegionCodeError.Reason"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
/**
* Get Custom Serializer
*/
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanSerializer(
_javaType, _xmlType, typeDesc);
}
/**
* Get Custom Deserializer
*/
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanDeserializer(
_javaType, _xmlType, typeDesc);
}
}
|
[
"jradcliff@google.com"
] |
jradcliff@google.com
|
aa55432f24f36700bf5309df85aacb2ff1b2937f
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project11/src/main/java/org/gradle/test/performance11_4/Production11_330.java
|
238f7cd13ba58573edc43e9f29b3cf5e7c793de7
|
[] |
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
| 303
|
java
|
package org.gradle.test.performance11_4;
public class Production11_330 extends org.gradle.test.performance8_4.Production8_330 {
private final String property;
public Production11_330() {
this.property = "foo";
}
public String getProperty() {
return property;
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
e0596b92d5e09c00bf04d46b2b07fcea56540684
|
46117100f28f2406b86875c2bcf367065e3817b7
|
/WeBankBlockchain-Data-Export-codegen/src/main/java/com/webank/blockchain/data/export/codegen/code/template/paras/EventCrawlImplParas.java
|
7ca08b8c5865ba1489e2786004d2937737803dac
|
[
"Apache-2.0",
"Apache-1.1"
] |
permissive
|
jangocheng/Data-Export
|
f4e878fb7d1e24590335ab9052ba05c7e52fe6e6
|
65647c5fed797485a9a1481b3a6d76ffa7700cc1
|
refs/heads/master
| 2023-02-04T17:53:18.078587
| 2020-12-08T08:51:36
| 2020-12-08T08:51:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,106
|
java
|
/**
* Copyright 2020 Webank.
*
* <p>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
*
* <p>http://www.apache.org/licenses/LICENSE-2.0
*
* <p>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.webank.blockchain.data.export.codegen.code.template.paras;
import java.util.List;
import java.util.Map;
import com.webank.blockchain.data.export.codegen.code.template.face.EventGenerateParas;
import com.webank.blockchain.data.export.codegen.constants.PackageConstants;
import com.webank.blockchain.data.export.codegen.constants.TemplateConstants;
import com.webank.blockchain.data.export.codegen.config.SystemEnvironmentConfig;
import com.webank.blockchain.data.export.codegen.vo.FieldVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;
import com.google.common.collect.Maps;
import com.webank.blockchain.data.export.codegen.tools.PackagePath;
import com.webank.blockchain.data.export.codegen.vo.EventMetaInfo;
/**
* EventCrawlImplParas to generate EventCrawler.
*
* @author maojiayu
* @data Dec 28, 2018 2:59:25 PM
*
*/
@Component
public class EventCrawlImplParas implements EventGenerateParas {
@Autowired
protected SystemEnvironmentConfig systemEnvironmentConfig;
@Override
public Map<String, Object> getMap(EventMetaInfo event) {
List<FieldVO> list = event.getList();
Map<String, Object> map = Maps.newLinkedHashMap();
map.put("list", list);
map.put("contractName", event.getContractName());
map.put("lowContractName", StringUtils.uncapitalize(event.getContractName()));
map.put("group", systemEnvironmentConfig.getGroup());
map.put("projectName", PackageConstants.PROJECT_PKG_NAME + "." + PackageConstants.SUB_PROJECT_PKG_PARSER);
map.put("contractPackName", systemEnvironmentConfig.getContractPackName());
map.put("eventName", event.getName());
String className = event.getContractName() + event.getName() + "BO";
map.put("class_name", className);
return map;
}
@Override
public String getTemplatePath() {
return TemplateConstants.CRAWLER_EVENT_IMPL_TEMPLATE_PATH;
}
@Override
public String getGeneratedFilePath(EventMetaInfo event) {
String packagePath = PackagePath.getPackagePath(PackageConstants.CRAWLER_EVENT_IMPL_PACKAGE_POSTFIX,
systemEnvironmentConfig.getGroup(), PackageConstants.SUB_PROJECT_PKG_PARSER);
String javaFilePath = packagePath + "/" + event.getContractName() + StringUtils.capitalize(event.getName())
+ "CrawlerImpl.java";
return javaFilePath;
}
}
|
[
"njumjy06@126.com"
] |
njumjy06@126.com
|
d6e49203a52f2df55588ff2fd1458ec09f0ef911
|
a08ad141a6369eae6ce27b7199990756d8024912
|
/1.JavaSyntax/src/com/javarush/task/task04/task0402/Solution.java
|
df355a6309429c1cb0673e7351ae13db5f27a585
|
[] |
no_license
|
sashamartian/JavaRushTasks
|
1a09af841d6525bb30bb46c9f3d3e8763e8b4f48
|
87a9a8327760f87a7287df09da8e78443b39f42e
|
refs/heads/master
| 2021-01-13T01:21:16.641944
| 2017-05-17T09:14:34
| 2017-05-17T09:14:34
| 81,511,809
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 581
|
java
|
package com.javarush.task.task04.task0402;
/*
Цена яблока
*/
public class Solution {
public static void main(String[] args) {
Apple apple = new Apple();
apple.addPrice(50);
Apple apple2 = new Apple();
apple2.addPrice(100);
System.out.println("Apples price is " + Apple.applesPrice);
}
public static class Apple {
public static int applesPrice = 0;
public static void addPrice(int appPrice) {
//напишите тут ваш код
applesPrice += appPrice;
}
}
}
|
[
"sasha.martian@yandex.ru"
] |
sasha.martian@yandex.ru
|
70b3136ed5b50f96924f0d34dd97490cfd5aee51
|
1faf3d7f807cb75f575232693868a1107b7b2d15
|
/bus-office/src/main/java/org/aoju/bus/office/Standard.java
|
ddd68c9f634285f837e46f7744712bcd978c0086
|
[
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
yangheqingvip/bus
|
77f14ffa5637fd139eeb03134b038f6f4cd41502
|
e90e890e3706747561454d4aa238a8db67a35a29
|
refs/heads/master
| 2020-09-22T18:33:06.154944
| 2019-12-01T15:26:46
| 2019-12-01T15:26:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,966
|
java
|
/*
* The MIT License
*
* Copyright (c) 2017 aoju.org All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package org.aoju.bus.office;
import com.sun.star.lang.XComponent;
import com.sun.star.lang.XServiceInfo;
import com.sun.star.util.XRefreshable;
import org.aoju.bus.core.lang.exception.InstrumentException;
import org.aoju.bus.office.magic.Formats;
import java.io.File;
import java.util.HashMap;
import java.util.Map;
import static org.aoju.bus.office.Builder.cast;
/**
* @author Kimi Liu
* @version 5.2.9
* @since JDK 1.8+
*/
public class Standard extends Storable {
private final Formats outputFormat;
private Map<String, ?> defaultLoadProperties;
private Formats inputFormat;
public Standard(File inputFile, File outputFile, Formats outputFormat) {
super(inputFile, outputFile);
this.outputFormat = outputFormat;
}
public static Formats.Type getDocumentFamily(XComponent document) throws InstrumentException {
XServiceInfo serviceInfo = cast(XServiceInfo.class, document);
if (serviceInfo.supportsService("com.sun.star.text.GenericTextDocument")) {
return Formats.Type.TEXT;
} else if (serviceInfo.supportsService("com.sun.star.sheet.SpreadsheetDocument")) {
return Formats.Type.SPREADSHEET;
} else if (serviceInfo.supportsService("com.sun.star.presentation.PresentationDocument")) {
return Formats.Type.PRESENTATION;
} else if (serviceInfo.supportsService("com.sun.star.drawing.DrawingDocument")) {
return Formats.Type.DRAWING;
} else {
throw new InstrumentException("document of unknown family: " + serviceInfo.getImplementationName());
}
}
public void setDefaultLoadProperties(Map<String, ?> defaultLoadProperties) {
this.defaultLoadProperties = defaultLoadProperties;
}
public void setInputFormat(Formats inputFormat) {
this.inputFormat = inputFormat;
}
@Override
protected void modifyDocument(XComponent document) throws InstrumentException {
XRefreshable refreshable = cast(XRefreshable.class, document);
if (refreshable != null) {
refreshable.refresh();
}
}
@Override
protected Map<String, ?> getLoadProperties(File inputFile) {
Map<String, Object> loadProperties = new HashMap<String, Object>();
if (defaultLoadProperties != null) {
loadProperties.putAll(defaultLoadProperties);
}
if (inputFormat != null && inputFormat.getLoadProperties() != null) {
loadProperties.putAll(inputFormat.getLoadProperties());
}
return loadProperties;
}
@Override
protected Map<String, ?> getStoreProperties(File outputFile, XComponent document) {
Formats.Type family = getDocumentFamily(document);
return outputFormat.getStoreProperties(family);
}
}
|
[
"839536@qq.com"
] |
839536@qq.com
|
3b5815ab72bc1731f941a63ae433afe606484285
|
d834398d37713784fd79d9ffad6be129eeaa2b61
|
/src/main/java/com/shop/entity/Item.java
|
a97245fa89e5dc186e34b1645c07c0d201a38691
|
[] |
no_license
|
byeungoo/shop
|
5bd8edf370206b4e19cf33a14f2e758d39f2cfe5
|
d540e0e411ce4d7bb505d91d1da4364eab8cef27
|
refs/heads/master
| 2023-02-07T18:55:57.995905
| 2020-12-28T06:22:25
| 2020-12-28T06:22:25
| 293,307,609
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,633
|
java
|
package com.shop.entity;
import com.shop.constant.ItemSellStatus;
import com.shop.dto.ItemFormDto;
import com.shop.exception.OutOfStockException;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import javax.persistence.*;
@Entity
@Table(name="item")
@Getter @Setter
@ToString
public class Item extends BaseEntity{
@Id
@Column(name="item_id")
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id; //상품 코드
@Column(nullable = false, length = 50)
private String itemNm; //상품명
@Column(name="price", nullable = false)
private int price; //가격
@Column(nullable = false)
private int stockNumber; //재고수량
@Lob
@Column(nullable = false)
private String itemDetail; //상품 상세 설명
@Enumerated(EnumType.STRING)
private ItemSellStatus itemSellStatus; //상품 판매 상태
public void updateItem(ItemFormDto itemFormDto){
this.itemNm = itemFormDto.getItemNm();
this.price = itemFormDto.getPrice();
this.stockNumber = itemFormDto.getStockNumber();
this.itemDetail = itemFormDto.getItemDetail();
this.itemSellStatus = itemFormDto.getItemSellStatus();
}
public void removeStock(int stockNumber){
int restStock = this.stockNumber - stockNumber;
if(restStock<0){
throw new OutOfStockException("상품의 재고가 부족 합니다. (현재 재고 수량: " + this.stockNumber + ")");
}
this.stockNumber = restStock;
}
public void addStock(int stockNumber){
this.stockNumber += stockNumber;
}
}
|
[
"dksekfldks65@naver.com"
] |
dksekfldks65@naver.com
|
77d7d8a19c7e04e22481445d52c8f7c28151e1dd
|
481efbc515bf9d0165f77a051bae6849dada2d1d
|
/src/main/java/org/springframework/web/reactive/view/freemarker/FreeMarkerView.java
|
9efd05265ba93141054b32f7a7ee92d41dc98a10
|
[
"Apache-2.0"
] |
permissive
|
d0lphin/spring-reactive
|
feb52bcdbcf9422a5b36a5f17e1de80db25fc101
|
8894ffc89494312e8a0193d1f3483e0bf12729ed
|
refs/heads/master
| 2020-12-13T23:29:07.429282
| 2016-05-12T08:36:28
| 2016-05-12T10:24:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,762
|
java
|
/*
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.web.reactive.view.freemarker;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.util.Locale;
import java.util.Map;
import freemarker.core.ParseException;
import freemarker.template.Configuration;
import freemarker.template.DefaultObjectWrapperBuilder;
import freemarker.template.ObjectWrapper;
import freemarker.template.SimpleHash;
import freemarker.template.Template;
import freemarker.template.Version;
import reactor.core.publisher.Flux;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactoryUtils;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import org.springframework.context.ApplicationContextException;
import org.springframework.core.io.buffer.DataBuffer;
import org.springframework.web.reactive.view.AbstractUrlBasedView;
import org.springframework.web.server.ServerWebExchange;
/**
* A {@code View} implementation that uses the FreeMarker template engine.
*
* <p>Depends on a single {@link FreeMarkerConfig} object such as
* {@link FreeMarkerConfigurer} being accessible in the application context.
* Alternatively set the FreeMarker configuration can be set directly on this
* class via {@link #setConfiguration}.
*
* <p>The {@link #setUrl(String) url} property is the location of the FreeMarker
* template relative to the FreeMarkerConfigurer's
* {@link FreeMarkerConfigurer#setTemplateLoaderPath templateLoaderPath}.
*
* <p>Note: Spring's FreeMarker support requires FreeMarker 2.3 or higher.
*
* @author Rossen Stoyanchev
*/
public class FreeMarkerView extends AbstractUrlBasedView {
private Configuration configuration;
private String encoding;
/**
* Set the FreeMarker Configuration to be used by this view.
* <p>Typically this property is not set directly. Instead a single
* {@link FreeMarkerConfig} is expected in the Spring application context
* which is used to obtain the FreeMarker configuration.
*/
public void setConfiguration(Configuration configuration) {
this.configuration = configuration;
}
/**
* Return the FreeMarker configuration used by this view.
*/
protected Configuration getConfiguration() {
return this.configuration;
}
/**
* Set the encoding of the FreeMarker template file.
* <p>By default {@link FreeMarkerConfigurer} sets the default encoding in
* the FreeMarker configuration to "UTF-8". It's recommended to specify the
* encoding in the FreeMarker Configuration rather than per template if all
* your templates share a common encoding.
*/
public void setEncoding(String encoding) {
this.encoding = encoding;
}
/**
* Return the encoding for the FreeMarker template.
*/
protected String getEncoding() {
return this.encoding;
}
@Override
public void afterPropertiesSet() throws Exception {
super.afterPropertiesSet();
if (getConfiguration() == null) {
FreeMarkerConfig config = autodetectConfiguration();
setConfiguration(config.getConfiguration());
}
}
/**
* Autodetect a {@link FreeMarkerConfig} object via the ApplicationContext.
* @return the Configuration instance to use for FreeMarkerViews
* @throws BeansException if no Configuration instance could be found
* @see #setConfiguration
*/
protected FreeMarkerConfig autodetectConfiguration() throws BeansException {
try {
return BeanFactoryUtils.beanOfTypeIncludingAncestors(
getApplicationContext(), FreeMarkerConfig.class, true, false);
}
catch (NoSuchBeanDefinitionException ex) {
throw new ApplicationContextException(
"Must define a single FreeMarkerConfig bean in this web application context " +
"(may be inherited): FreeMarkerConfigurer is the usual implementation. " +
"This bean may be given any name.", ex);
}
}
/**
* Check that the FreeMarker template used for this view exists and is valid.
* <p>Can be overridden to customize the behavior, for example in case of
* multiple templates to be rendered into a single view.
*/
@Override
public boolean checkResourceExists(Locale locale) throws Exception {
try {
// Check that we can get the template, even if we might subsequently get it again.
getTemplate(locale);
return true;
}
catch (FileNotFoundException ex) {
if (logger.isDebugEnabled()) {
logger.debug("No FreeMarker view found for URL: " + getUrl());
}
return false;
}
catch (ParseException ex) {
throw new ApplicationContextException(
"Failed to parse FreeMarker template for URL [" + getUrl() + "]", ex);
}
catch (IOException ex) {
throw new ApplicationContextException(
"Could not load FreeMarker template for URL [" + getUrl() + "]", ex);
}
}
@Override
protected Flux<DataBuffer> renderInternal(Map<String, Object> renderAttributes, ServerWebExchange exchange) {
// Expose all standard FreeMarker hash models.
SimpleHash freeMarkerModel = getTemplateModel(renderAttributes, exchange);
if (logger.isDebugEnabled()) {
logger.debug("Rendering FreeMarker template [" + getUrl() + "].");
}
Locale locale = Locale.getDefault(); // TODO
DataBuffer dataBuffer = getBufferAllocator().allocateBuffer();
try {
Writer writer = new OutputStreamWriter(dataBuffer.asOutputStream());
getTemplate(locale).process(freeMarkerModel, writer);
}
catch (IOException ex) {
String message = "Could not load FreeMarker template for URL [" + getUrl() + "]";
return Flux.error(new IllegalStateException(message, ex));
}
catch (Throwable ex) {
return Flux.error(ex);
}
return Flux.just(dataBuffer);
}
/**
* Build a FreeMarker template model for the given model Map.
* <p>The default implementation builds a {@link SimpleHash}.
* @param model the model to use for rendering
* @param exchange current exchange
* @return the FreeMarker template model, as a {@link SimpleHash} or subclass thereof
*/
protected SimpleHash getTemplateModel(Map<String, Object> model, ServerWebExchange exchange) {
SimpleHash fmModel = new SimpleHash(getObjectWrapper());
fmModel.putAll(model);
return fmModel;
}
/**
* Return the configured FreeMarker {@link ObjectWrapper}, or the
* {@link ObjectWrapper#DEFAULT_WRAPPER default wrapper} if none specified.
* @see freemarker.template.Configuration#getObjectWrapper()
*/
protected ObjectWrapper getObjectWrapper() {
ObjectWrapper ow = getConfiguration().getObjectWrapper();
Version version = Configuration.DEFAULT_INCOMPATIBLE_IMPROVEMENTS;
return (ow != null ? ow : new DefaultObjectWrapperBuilder(version).build());
}
/**
* Retrieve the FreeMarker template for the given locale,
* to be rendering by this view.
* <p>By default, the template specified by the "url" bean property
* will be retrieved.
* @param locale the current locale
* @return the FreeMarker template to render
*/
protected Template getTemplate(Locale locale) throws IOException {
return (getEncoding() != null ?
getConfiguration().getTemplate(getUrl(), locale, getEncoding()) :
getConfiguration().getTemplate(getUrl(), locale));
}
}
|
[
"rstoyanchev@pivotal.io"
] |
rstoyanchev@pivotal.io
|
6b52a230b6f26b3de49d1149ad6c899328309c0b
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Lang/52/org/apache/commons/lang/mutable/MutableDouble_decrement_186.java
|
eba6d4c57a1a4634215033ac7ecf9de041e2d826
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 451
|
java
|
org apach common lang mutabl
mutabl code code wrapper
doubl
version
mutabl doubl mutabledoubl number compar mutabl
decrement
common lang
decrement
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
34b95338e055ed0a7c7a1e5a4accfc699427a2ce
|
6b2a8dd202fdce77c971c412717e305e1caaac51
|
/solutions_5708284669460480_0/java/srmurali/MainClass.java
|
4f1388c08f9ab278c4727561b24eb800383f11e9
|
[] |
no_license
|
alexandraback/datacollection
|
0bc67a9ace00abbc843f4912562f3a064992e0e9
|
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
|
refs/heads/master
| 2021-01-24T18:27:24.417992
| 2017-05-23T09:23:38
| 2017-05-23T09:23:38
| 84,313,442
| 2
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,867
|
java
|
import java.io.File;
import java.util.Scanner;
import java.util.HashMap;
public class MainClass {
public static int countOccurrences(String haystack, char needle)
{
int count = 0;
for (int i=0; i < haystack.length(); i++)
{
if (haystack.charAt(i) == needle)
{
count++;
}
}
return count;
}
public static void main(String[] args) {
int T = 0;
try {
Scanner scan = new Scanner(new File("B-small-attempt0.in"));
T = scan.nextInt();
scan.nextLine();
//System.out.println("Number of test cases is " + T);
for(int i = 0; i < T; i++) {
HashMap <String, Integer> possibleChars = new HashMap<String, Integer>();
double answer = 0.0;
int K, L, S;
K = scan.nextInt();
L = scan.nextInt();
S = scan.nextInt();
scan.nextLine();
String keyboard = scan.nextLine();
String target = scan.nextLine();
boolean targetPossible = true;
double numBananas = 0.0;
for(char c : keyboard.toCharArray()) {
possibleChars.put(String.valueOf(c), 1);
}
for(char c : target.toCharArray()) {
if(!possibleChars.containsKey(String.valueOf(c))) {
targetPossible = false;
break;
}
}
if(targetPossible) {
numBananas = S / target.length();
double probabilityOfOneOccurence = 1.0;
for(char c : target.toCharArray()) {
double probOfCurrentChar = countOccurrences(keyboard, c) / (double)keyboard.length();
probabilityOfOneOccurence *= probOfCurrentChar;
}
double totalProbability = 0.0;
for(int j = 0; j < numBananas; j++)
totalProbability += probabilityOfOneOccurence;
answer = numBananas - totalProbability;
}
System.out.println("Case #" + (i+1) + ": " + answer);
}
}
catch(Exception e) {
e.printStackTrace();
}
}
}
|
[
"eewestman@gmail.com"
] |
eewestman@gmail.com
|
776a18aaa0940f14248894232e531a08b4811cfd
|
39fdbaa47bc18dd76ccc40bccf18a21e3543ab9f
|
/modules/activiti-engine/src/test/java/org/activiti/examples/bpmn/receivetask/ReceiveTaskTest.java
|
4ec6f2a77b3c56f98d93ee531a5be01061b7bea5
|
[] |
no_license
|
jpjyxy/Activiti-activiti-5.16.4
|
b022494b8f40b817a54bb1cc9c7f6fa41dadb353
|
ff22517464d8f9d5cfb09551ad6c6cbecff93f69
|
refs/heads/master
| 2022-12-24T14:51:08.868694
| 2017-04-14T14:05:00
| 2017-04-14T14:05:00
| 191,682,921
| 0
| 0
| null | 2022-12-16T04:24:04
| 2019-06-13T03:15:47
|
Java
|
UTF-8
|
Java
| false
| false
| 1,365
|
java
|
/* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.activiti.examples.bpmn.receivetask;
import org.activiti.engine.impl.test.PluggableActivitiTestCase;
import org.activiti.engine.runtime.Execution;
import org.activiti.engine.runtime.ProcessInstance;
import org.activiti.engine.test.Deployment;
/**
* @author Joram Barrez
*/
public class ReceiveTaskTest extends PluggableActivitiTestCase
{
@Deployment
public void testWaitStateBehavior()
{
ProcessInstance pi = runtimeService.startProcessInstanceByKey("receiveTask");
Execution execution =
runtimeService.createExecutionQuery().processInstanceId(pi.getId()).activityId("waitState").singleResult();
assertNotNull(execution);
runtimeService.signal(execution.getId());
assertProcessEnded(pi.getId());
}
}
|
[
"905280842@qq.com"
] |
905280842@qq.com
|
19c04a5d0e3e45ca548dfc3a36c17f52499b6f11
|
66879fb5e25987ec0374f05445859c3069c47290
|
/src/main/java/com/hs3/lotts/ssc/star2/last/group/SscStar2LastGroupAndPlayer.java
|
72e4326b95ff317c951a9adbce4008298b52c6bd
|
[] |
no_license
|
wangpiju/java-kernal
|
0aceb90aa7705e18175a660fa64fa8f3b998779b
|
17ef494cc4a1a3f86013f0330642d76965fc502c
|
refs/heads/master
| 2020-04-01T09:18:18.310531
| 2018-10-15T07:20:51
| 2018-10-15T07:20:51
| 153,069,500
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 542
|
java
|
package com.hs3.lotts.ssc.star2.last.group;
import com.hs3.lotts.ssc.star2.front.group.SscStar2FrontGroupAndPlayer;
public class SscStar2LastGroupAndPlayer
extends SscStar2FrontGroupAndPlayer {
protected int index() {
return 3;
}
protected void init() {
setRemark("所选数值等于开奖号码的后二位数字相加之和(不含对子)");
setExample("投注:和值1 开奖:***10(不限顺序) 即中奖");
}
public String getQunName() {
return "后二";
}
}
|
[
"wangpiju0420@gmail.com"
] |
wangpiju0420@gmail.com
|
46f6603ae294f59be474712029d6193a14f01419
|
1ca86d5d065372093c5f2eae3b1a146dc0ba4725
|
/spring-5-reactive/src/main/java/com/surya/reactive/errorhandling/handlers/Handler2.java
|
18233620ee403d76801be24dc4845bb2171a3376
|
[] |
no_license
|
Suryakanta97/DemoExample
|
1e05d7f13a9bc30f581a69ce811fc4c6c97f2a6e
|
5c6b831948e612bdc2d9d578a581df964ef89bfb
|
refs/heads/main
| 2023-08-10T17:30:32.397265
| 2021-09-22T16:18:42
| 2021-09-22T16:18:42
| 391,087,435
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,140
|
java
|
package com.surya.reactive.errorhandling.handlers;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;
@Component
public class Handler2 {
public Mono<ServerResponse> handleRequest2(ServerRequest request) {
return
sayHello(request)
.flatMap(s -> ServerResponse.ok()
.contentType(MediaType.TEXT_PLAIN)
.bodyValue(s))
.onErrorResume(e -> sayHelloFallback()
.flatMap(s -> ServerResponse.ok()
.contentType(MediaType.TEXT_PLAIN)
.bodyValue(s)));
}
private Mono<String> sayHello(ServerRequest request) {
try {
return Mono.just("Hello, " + request.queryParam("name")
.get());
} catch (Exception e) {
return Mono.error(e);
}
}
private Mono<String> sayHelloFallback() {
return Mono.just("Hello, Stranger");
}
}
|
[
"suryakanta97@github.com"
] |
suryakanta97@github.com
|
dc4d53d84a901b7e0cea935ac955e20d406cf4fa
|
e21c5f4f66e33747d7835e67b268bb4500635784
|
/app/src/main/java/com/ptit/kien/resizeimage/v3/Classifier.java
|
8860548356cb388547673192c77cf4f53469ff7b
|
[] |
no_license
|
HrBbCi/RealTimeCamera
|
9b7da784320f814b430cbf1acb751cc6f096b5a1
|
69728151e10dd81b32c8e72f08f001bf6cc8c38b
|
refs/heads/master
| 2020-07-04T22:46:33.470961
| 2019-09-19T02:07:57
| 2019-09-19T02:07:57
| 202,447,194
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 142
|
java
|
package com.ptit.kien.resizeimage.v3;
public interface Classifier {
String name();
Classification recognize(final int[] wordids);
}
|
[
"kienbtptit@gmail.com"
] |
kienbtptit@gmail.com
|
c8a689827d241eaadd6a798477a8eb990a8cc11e
|
eafae636c22b5d95db19e5271d58796bd7be4a66
|
/app-release-unsigned/sources/kotlinx/coroutines/flow/FlowKt__DelayKt$debounceInternal$1.java
|
084aef0b9d9b6a673d476908b7ae0e2e79ae180b
|
[] |
no_license
|
agustrinaldokurniawan/News_Kotlin_Native
|
5fb97e9c9199c464e64a6ef901b133c88da3db55
|
411f2ae0c01f2cc490f9b80a6b8f40196bc74176
|
refs/heads/main
| 2023-05-31T20:59:44.356059
| 2021-06-15T14:43:42
| 2021-06-15T14:43:42
| 377,077,236
| 0
| 0
| null | 2021-06-15T07:44:11
| 2021-06-15T07:38:27
| null |
UTF-8
|
Java
| false
| false
| 5,561
|
java
|
package kotlinx.coroutines.flow;
import androidx.exifinterface.media.ExifInterface;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function3;
import kotlinx.coroutines.CoroutineScope;
/* access modifiers changed from: package-private */
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u0016\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u0001\"\u0004\b\u0000\u0010\u0002*\u00020\u00032\f\u0010\u0004\u001a\b\u0012\u0004\u0012\u0002H\u00020\u0005H@¢\u0006\u0004\b\u0006\u0010\u0007"}, d2 = {"<anonymous>", "", ExifInterface.GPS_DIRECTION_TRUE, "Lkotlinx/coroutines/CoroutineScope;", "downstream", "Lkotlinx/coroutines/flow/FlowCollector;", "invoke", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"}, k = 3, mv = {1, 4, 0})
@DebugMetadata(c = "kotlinx.coroutines.flow.FlowKt__DelayKt$debounceInternal$1", f = "Delay.kt", i = {0, 0, 0, 0, 0, 1, 1, 1, 1, 1}, l = {354, 358}, m = "invokeSuspend", n = {"$this$scopedFlow", "downstream", "values", "lastValue", "timeoutMillis", "$this$scopedFlow", "downstream", "values", "lastValue", "timeoutMillis"}, s = {"L$0", "L$1", "L$2", "L$3", "L$4", "L$0", "L$1", "L$2", "L$3", "L$4"})
/* compiled from: Delay.kt */
public final class FlowKt__DelayKt$debounceInternal$1 extends SuspendLambda implements Function3<CoroutineScope, FlowCollector<? super T>, Continuation<? super Unit>, Object> {
final /* synthetic */ Flow $this_debounceInternal;
final /* synthetic */ Function1 $timeoutMillisSelector;
Object L$0;
Object L$1;
Object L$2;
Object L$3;
Object L$4;
Object L$5;
int label;
private CoroutineScope p$;
private FlowCollector p$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
FlowKt__DelayKt$debounceInternal$1(Flow flow, Function1 function1, Continuation continuation) {
super(3, continuation);
this.$this_debounceInternal = flow;
this.$timeoutMillisSelector = function1;
}
public final Continuation<Unit> create(CoroutineScope coroutineScope, FlowCollector<? super T> flowCollector, Continuation<? super Unit> continuation) {
FlowKt__DelayKt$debounceInternal$1 flowKt__DelayKt$debounceInternal$1 = new FlowKt__DelayKt$debounceInternal$1(this.$this_debounceInternal, this.$timeoutMillisSelector, continuation);
flowKt__DelayKt$debounceInternal$1.p$ = coroutineScope;
flowKt__DelayKt$debounceInternal$1.p$0 = flowCollector;
return flowKt__DelayKt$debounceInternal$1;
}
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object, java.lang.Object] */
@Override // kotlin.jvm.functions.Function3
public final Object invoke(CoroutineScope coroutineScope, Object obj, Continuation<? super Unit> continuation) {
return ((FlowKt__DelayKt$debounceInternal$1) create(coroutineScope, (FlowCollector) obj, continuation)).invokeSuspend(Unit.INSTANCE);
}
/* JADX DEBUG: Multi-variable search result rejected for r9v9, resolved type: boolean */
/* JADX DEBUG: Multi-variable search result rejected for r9v12, resolved type: boolean */
/* JADX DEBUG: Multi-variable search result rejected for r9v15, resolved type: boolean */
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARNING: Can't wrap try/catch for region: R(15:7|29|30|33|(4:35|(1:40)(1:39)|41|(2:43|44))|45|46|47|(5:49|50|51|52|53)(1:56)|57|58|63|(1:65)|(1:67)(2:68|69)|67) */
/* JADX WARNING: Can't wrap try/catch for region: R(5:49|50|51|52|53) */
/* JADX WARNING: Code restructure failed: missing block: B:54:0x0154, code lost:
r0 = th;
*/
/* JADX WARNING: Code restructure failed: missing block: B:55:0x0155, code lost:
r4 = r10;
*/
/* JADX WARNING: Code restructure failed: missing block: B:59:0x017b, code lost:
r0 = th;
*/
/* JADX WARNING: Code restructure failed: missing block: B:60:0x017d, code lost:
r0 = th;
*/
/* JADX WARNING: Code restructure failed: missing block: B:61:0x017e, code lost:
r8 = r10;
r19 = r11;
r20 = r12;
r21 = r11;
r4 = r10;
*/
/* JADX WARNING: Code restructure failed: missing block: B:62:0x0186, code lost:
r8.handleBuilderException(r0);
*/
/* JADX WARNING: Removed duplicated region for block: B:35:0x00f6 */
/* JADX WARNING: Removed duplicated region for block: B:49:0x0134 A[Catch:{ all -> 0x017d }] */
/* JADX WARNING: Removed duplicated region for block: B:56:0x0158 */
/* JADX WARNING: Removed duplicated region for block: B:65:0x0193 */
/* JADX WARNING: Removed duplicated region for block: B:67:0x0198 A[RETURN] */
/* JADX WARNING: Removed duplicated region for block: B:68:0x0199 */
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
/* Code decompiled incorrectly, please refer to instructions dump. */
public final java.lang.Object invokeSuspend(java.lang.Object r24) {
/*
// Method dump skipped, instructions count: 427
*/
throw new UnsupportedOperationException("Method not decompiled: kotlinx.coroutines.flow.FlowKt__DelayKt$debounceInternal$1.invokeSuspend(java.lang.Object):java.lang.Object");
}
}
|
[
"agust.kurniawan@Agust-Rinaldo-Kurniawan.local"
] |
agust.kurniawan@Agust-Rinaldo-Kurniawan.local
|
d1cc7f744508e6d4c951978dc99a7fcd79cf6dce
|
8949086d4a541035bd7bda226c0a07532650661c
|
/src/main/java/info/beastsoftware/beastfactions/factions/entity/IClaim.java
|
ab7337a6c614f5b125c1fc6176f01fcc04419d7e
|
[] |
no_license
|
Tominous/BeastFactionsWiki
|
9d007e1b8b3e2014f681de4e152ece23d4119cd9
|
100e11584bf37c3663b6dcf824986ccd82e4831b
|
refs/heads/master
| 2020-11-29T10:25:02.134354
| 2019-09-29T20:00:16
| 2019-09-29T20:00:16
| 230,090,324
| 1
| 0
| null | 2019-12-25T11:05:17
| 2019-12-25T11:05:17
| null |
UTF-8
|
Java
| false
| false
| 631
|
java
|
package info.beastsoftware.beastfactions.factions.entity;
import org.bukkit.Chunk;
import org.bukkit.World;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
public interface IClaim extends Serializable {
IFaction getFaction();
IFPlayer getClaimer();
Chunk getChunk();
IFChunk getFChunk();
World getWorld();
long getFactionId();
Date getClaimDate();
String getServerName();
void setServerName(String serverName);
int getX();
int getZ();
String getWorldName();
List<IFPlayer> getPlayersInside();
List<IFactionWarp> getWarpsInside();
}
|
[
"32720562+daniel097541@users.noreply.github.com"
] |
32720562+daniel097541@users.noreply.github.com
|
e8bdb21c584d212158fb0e12b32d9c1efd0b159a
|
60ffee4de5e1853aaa3735d0e5e7d73c1608672c
|
/src/ZZZ/problem2/GiftItem.java
|
9e7cf2b49a0ea3d9295a3c866c2396afebc44f37
|
[] |
no_license
|
roppel/CodingInterviewProblems
|
d903e23de6f67c9e64ba19ea65af63684878fc03
|
4e63ef308e380f0e1644da3473c383ad95bdfbe4
|
refs/heads/master
| 2023-01-31T18:06:09.428696
| 2020-12-13T19:29:54
| 2020-12-13T19:29:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 382
|
java
|
package ZZZ.problem2;
class GiftItem {
String name;
Integer value;
public GiftItem(String t, Integer v) {
this.name = t;
this.value =v;
}
public String getName() {
return name;
}
public Integer getValue() {
return value;
}
@Override
public String toString() {
return name + " " + value ;
}
}
|
[
"michaelperera32@gmail.com"
] |
michaelperera32@gmail.com
|
1ef1b1308e01d2d6bb6c9be5842452e5ad8bd26d
|
a52d6bb42e75ef0678cfcd291e5696a9e358fc4d
|
/af_webapp/src/main/java/org/kuali/kfs/gl/businessobject/LedgerSummaryTotalLine.java
|
7ef173c04eba2b012b872c9ccc1dd16bab9338be
|
[] |
no_license
|
Ariah-Group/Finance
|
894e39cfeda8f6fdb4f48a4917045c0bc50050c5
|
ca49930ca456799f99aad57e1e974453d8fe479d
|
refs/heads/master
| 2021-01-21T12:11:40.987504
| 2016-03-24T14:22:40
| 2016-03-24T14:22:40
| 26,879,430
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,974
|
java
|
/*
* Copyright 2009 The Kuali Foundation
*
* Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php
*
* 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.kuali.kfs.gl.businessobject;
import java.util.LinkedHashMap;
import org.kuali.kfs.sys.KFSKeyConstants;
import org.kuali.kfs.sys.context.SpringContext;
import org.kuali.rice.core.api.config.property.ConfigurationService;
import org.kuali.rice.core.api.util.type.KualiDecimal;
import org.kuali.rice.krad.bo.TransientBusinessObjectBase;
/**
* Summarizes Pending Entry data for the GLPE pending entry report.
*/
public class LedgerSummaryTotalLine extends TransientBusinessObjectBase {
private KualiDecimal debitAmount = KualiDecimal.ZERO;
private int debitCount = 0;
private KualiDecimal creditAmount = KualiDecimal.ZERO;
private int creditCount = 0;
private KualiDecimal budgetAmount = KualiDecimal.ZERO;
private int budgetCount = 0;
/**
* Gets the recordCount attribute.
* @return Returns the recordCount.
*/
public int getRecordCount() {
return debitCount + creditCount + budgetCount;
}
/**
* Gets the debitAmount attribute.
* @return Returns the debitAmount.
*/
public KualiDecimal getDebitAmount() {
return debitAmount;
}
/**
* Gets the debitCount attribute.
* @return Returns the debitCount.
*/
public int getDebitCount() {
return debitCount;
}
/**
* Gets the creditAmount attribute.
* @return Returns the creditAmount.
*/
public KualiDecimal getCreditAmount() {
return creditAmount;
}
/**
* Gets the creditCount attribute.
* @return Returns the creditCount.
*/
public int getCreditCount() {
return creditCount;
}
/**
* Gets the budgetAmount attribute.
* @return Returns the budgetAmount.
*/
public KualiDecimal getBudgetAmount() {
return budgetAmount;
}
/**
* Gets the budgetCount attribute.
* @return Returns the budgetCount.
*/
public int getBudgetCount() {
return budgetCount;
}
/**
* Adds a debit amount to the current debit total
* @param debitAmount the debit amount to add to the debit total
*/
public void addDebitAmount(KualiDecimal debitAmount) {
this.debitAmount = this.debitAmount.add(debitAmount);
this.debitCount += 1;
}
/**
* Adds a credit amount to current credit total
* @param creditAmount the amount to add to the credit total
*/
public void addCreditAmount(KualiDecimal creditAmount) {
this.creditAmount = this.creditAmount.add(creditAmount);
this.creditCount += 1;
}
/**
* Adds a budget amount to current budget total
* @param budgetAmount the amount to add to the budget total
*/
public void addBudgetAmount(KualiDecimal budgetAmount) {
this.budgetAmount = this.budgetAmount.add(budgetAmount);
this.budgetCount += 1;
}
/**
* @see org.kuali.rice.krad.bo.BusinessObjectBase#toStringMapper()
*/
protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
return new LinkedHashMap();
}
/**
* @return the summary for this summary total line
*/
public String getSummary() {
return SpringContext.getBean(ConfigurationService.class).getPropertyValueAsString(KFSKeyConstants.MESSAGE_REPORT_NIGHTLY_OUT_LEDGER_TOTAL);
}
}
|
[
"code@ariahgroup.org"
] |
code@ariahgroup.org
|
c3af008990cb6eb2e3eedf28391b1a283179b6c9
|
0ea271177f5c42920ac53cd7f01f053dba5c14e4
|
/5.3.5/sources/org/telegram/messenger/exoplayer2/upstream/cache/CacheDataSink$CacheDataSinkException.java
|
6e468c27e05df7af91619b80c83426c2ad447661
|
[] |
no_license
|
alireza-ebrahimi/telegram-talaeii
|
367a81a77f9bc447e729b2ca339f9512a4c2860e
|
68a67e6f104ab8a0888e63c605e8bbad12c4a20e
|
refs/heads/master
| 2020-03-21T13:44:29.008002
| 2018-12-09T10:30:29
| 2018-12-09T10:30:29
| 138,622,926
| 12
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 340
|
java
|
package org.telegram.messenger.exoplayer2.upstream.cache;
import java.io.IOException;
import org.telegram.messenger.exoplayer2.upstream.cache.Cache.CacheException;
public class CacheDataSink$CacheDataSinkException extends CacheException {
public CacheDataSink$CacheDataSinkException(IOException cause) {
super(cause);
}
}
|
[
"alireza.ebrahimi2006@gmail.com"
] |
alireza.ebrahimi2006@gmail.com
|
a282ac444fab9b2b28c134ce3c4c31fb1d46e557
|
fd297805b9f989ab3c036fad03ed588da858dd85
|
/src/main/java/com/tsixi/miner/center/web/been/CertifyInfo.java
|
6a70a2e5810853d125b6e628582baeab093ffe4a
|
[] |
no_license
|
ymw520369/center
|
6ce9a10c100eb87ab764c9cec5b936857dcfe664
|
b99f574d6514ef53f2ebade1cdd6db3328608a64
|
refs/heads/master
| 2021-01-18T18:35:16.845541
| 2017-08-21T17:40:56
| 2017-08-21T17:40:56
| 100,517,313
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 950
|
java
|
/**
* Copyright Chengdu Qianxing Technology Co.,LTD.
* All Rights Reserved.
*
* 2017年2月18日
*/
package com.tsixi.miner.center.web.been;
import org.alan.utils.JsonUtils;
/**
* 玩家TSDK登录信息数据结构
*
* @scene 1.0
*
* @author Alan
*
*/
public class CertifyInfo {
private String token;
private String userId;
private int platform;
private String channel;
public String getToken() {
return token;
}
public void setToken(String token) {
this.token = token;
}
public int getPlatform() {
return platform;
}
public void setPlatform(int platform) {
this.platform = platform;
}
public String getChannel() {
return channel;
}
public void setChannel(String channel) {
this.channel = channel;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
@Override
public String toString() {
return JsonUtils.toJson(this);
}
}
|
[
"mingweiyang@foxmail.com"
] |
mingweiyang@foxmail.com
|
3145f2ab05440573bcfe745843499dfab30b66d4
|
006576b09a56194796d7d7b21c633389ccbf246b
|
/testsuite/src/java/net/sf/ohla/rti/testsuite/hla/rti1516e/object/BaseInteractionTestNG.java
|
1ebfaa7fcc32c0be09b6a5e715b3618b52141634
|
[
"Apache-2.0"
] |
permissive
|
zhj149/OpenHLA
|
ca20ab74ff70404189b5bb606d36718e233c0155
|
1fed36211e54d5dc09cc30b92a1714d5a124b82d
|
refs/heads/master
| 2020-11-25T19:12:34.090527
| 2019-12-20T02:08:17
| 2019-12-20T02:08:17
| 228,805,204
| 2
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,875
|
java
|
package net.sf.ohla.rti.testsuite.hla.rti1516e.object;
import net.sf.ohla.rti.testsuite.hla.rti1516e.BaseTestNG;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import hla.rti1516e.InteractionClassHandle;
import hla.rti1516e.ParameterHandle;
import hla.rti1516e.ParameterHandleValueMap;
import hla.rti1516e.RTIambassador;
import hla.rti1516e.TransportationTypeHandle;
public abstract class BaseInteractionTestNG
extends BaseTestNG<InteractionFederateAmbassador>
{
protected TransportationTypeHandle reliableTransportationTypeHandle;
protected InteractionClassHandle testInteractionClassHandle;
protected InteractionClassHandle testInteractionClassHandle2;
protected ParameterHandleValueMap testParameterValues;
protected ParameterHandleValueMap testParameterValues2;
protected BaseInteractionTestNG(String federationName)
{
super(2, federationName);
}
protected BaseInteractionTestNG(int rtiAmbassadorCount, String federationName)
{
super(rtiAmbassadorCount, federationName);
}
@BeforeClass
public void baseInteractionSetup()
throws Exception
{
connect();
createFederationExecution();
joinFederationExecution();
reliableTransportationTypeHandle = rtiAmbassadors.get(0).getTransportationTypeHandle(HLA_RELIABLE);
testInteractionClassHandle = rtiAmbassadors.get(0).getInteractionClassHandle(TEST_INTERACTION);
ParameterHandle parameterHandle1 = rtiAmbassadors.get(0).getParameterHandle(testInteractionClassHandle, PARAMETER1);
ParameterHandle parameterHandle2 = rtiAmbassadors.get(0).getParameterHandle(testInteractionClassHandle, PARAMETER2);
ParameterHandle parameterHandle3 = rtiAmbassadors.get(0).getParameterHandle(testInteractionClassHandle, PARAMETER3);
testInteractionClassHandle2 = rtiAmbassadors.get(0).getInteractionClassHandle(TEST_INTERACTION2);
ParameterHandle parameterHandle4 = rtiAmbassadors.get(0).getParameterHandle(testInteractionClassHandle2, PARAMETER4);
ParameterHandle parameterHandle5 = rtiAmbassadors.get(0).getParameterHandle(testInteractionClassHandle2, PARAMETER5);
ParameterHandle parameterHandle6 = rtiAmbassadors.get(0).getParameterHandle(testInteractionClassHandle2, PARAMETER6);
testParameterValues = rtiAmbassadors.get(0).getParameterHandleValueMapFactory().create(3);
testParameterValues.put(parameterHandle1, PARAMETER1_VALUE.getBytes());
testParameterValues.put(parameterHandle2, PARAMETER2_VALUE.getBytes());
testParameterValues.put(parameterHandle3, PARAMETER3_VALUE.getBytes());
testParameterValues2 = rtiAmbassadors.get(0).getParameterHandleValueMapFactory().create(6);
testParameterValues2.put(parameterHandle1, PARAMETER1_VALUE.getBytes());
testParameterValues2.put(parameterHandle2, PARAMETER2_VALUE.getBytes());
testParameterValues2.put(parameterHandle3, PARAMETER3_VALUE.getBytes());
testParameterValues2.put(parameterHandle4, PARAMETER4_VALUE.getBytes());
testParameterValues2.put(parameterHandle5, PARAMETER5_VALUE.getBytes());
testParameterValues2.put(parameterHandle6, PARAMETER6_VALUE.getBytes());
rtiAmbassadors.get(0).publishInteractionClass(testInteractionClassHandle);
rtiAmbassadors.get(0).publishInteractionClass(testInteractionClassHandle2);
rtiAmbassadors.get(1).subscribeInteractionClass(testInteractionClassHandle);
rtiAmbassadors.get(2).subscribeInteractionClass(testInteractionClassHandle2);
synchronize(SYNCHRONIZATION_POINT_SETUP_COMPLETE, federateAmbassadors);
}
@AfterClass
public void baseInteractionTeardown()
throws Exception
{
resignFederationExecution();
destroyFederationExecution();
disconnect();
}
protected InteractionFederateAmbassador createFederateAmbassador(RTIambassador rtiAmbassador)
{
return new InteractionFederateAmbassador(rtiAmbassador);
}
}
|
[
"mnewcomb@c6f40f97-f50e-0410-af12-a330f67be530"
] |
mnewcomb@c6f40f97-f50e-0410-af12-a330f67be530
|
7ccd278115c4e6f958ee52c81633de35a9beaa7a
|
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
|
/program_data/JavaProgramData/15/36.java
|
37c58304411c868655def56ace057d30abbe76a9
|
[
"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
| 1,008
|
java
|
package <missing>;
public class GlobalMembers
{
public static int Main()
{
int i = 0;
int s;
int n;
int l;
int r;
String tempVar = ConsoleInput.scanfRead();
if (tempVar != null)
{
n = Integer.parseInt(tempVar);
}
if (n <= 10)
{
int[][] cancel = new int[10][10];
for (l = 0;l < n;l++)
{
for (r = 0;r < n;r++)
{
String tempVar2 = ConsoleInput.scanfRead();
if (tempVar2 != null)
{
cancel[l][r] = Integer.parseInt(tempVar2);
}
}
}
int r1;
int r2;
int l1;
int l2;
for (i = 0,l = 0;l < n;l++)
{
for (i = 0,r = 0;r < n;r++)
{
if (cancel[l][r] == 0)
{
l1 = l;
r1 = r;
i = 1;
break;
}
}
if (i == 1)
{
break;
}
}
for (l = 0;l < n;l++)
{
for (r = 0;r < n;r++)
{
if (cancel[l][r] == 0)
{
l2 = l;
r2 = r;
}
}
}
s = (l2 - l1 - 1) * (r2 - r1 - 1);
System.out.printf("%d",s);
}
return 0;
}
}
|
[
"y.yu@open.ac.uk"
] |
y.yu@open.ac.uk
|
591a462b3374f6ce07038a92d2b80ee6fd3ef7e6
|
1519fd020a6a3717114aa99c1799f5baa4c8640b
|
/orm/plugin/runtime/org.jboss.tools.hibernate.runtime.v_6_1/src/org/jboss/tools/hibernate/runtime/v_6_1/internal/legacy/IntegerType.java
|
495b194b42ae67852bedcdcbf2884cca2cc44afb
|
[] |
no_license
|
koentsje/jbosstools-hibernate
|
8718305dc571f2ee329a31eb2d9052db8b2d46ea
|
0f72a3b9296724f94252a50e907cf54b2758d13b
|
refs/heads/main
| 2023-08-22T12:50:01.656531
| 2023-08-11T07:17:32
| 2023-08-11T07:17:32
| 6,763,576
| 0
| 0
| null | 2013-01-26T06:18:05
| 2012-11-19T16:40:51
|
Java
|
UTF-8
|
Java
| false
| false
| 689
|
java
|
package org.jboss.tools.hibernate.runtime.v_6_1.internal.legacy;
import org.hibernate.type.AbstractSingleColumnStandardBasicType;
import org.hibernate.type.descriptor.java.IntegerJavaType;
import org.hibernate.type.descriptor.jdbc.IntegerJdbcType;
public class IntegerType extends AbstractSingleColumnStandardBasicType<Integer> {
public static final IntegerType INSTANCE = new IntegerType();
public IntegerType() {
super( IntegerJdbcType.INSTANCE, IntegerJavaType.INSTANCE );
}
@Override
public String getName() {
return "integer";
}
@Override
public String[] getRegistrationKeys() {
return new String[] {getName(), int.class.getName(), Integer.class.getName()};
}
}
|
[
"koen.aers@gmail.com"
] |
koen.aers@gmail.com
|
0f61e193fad14d9aa9d3a2134bc9a7ee02c3d0f0
|
0a20a3db6c959204c3dc2c6e9d48b3d01757e2db
|
/app/src/main/java/com/TBI/Client/Bluff/Utils/DecodeBitmapTask.java
|
1abe98ea67d4f7a216e348f13d28b8ed8003dc32
|
[] |
no_license
|
MeghaPatel2022/Blufff-Social-Media
|
60562661c2e49fe525119e145c76df162a76d5eb
|
c844ba06ee65b77bb3392ec790b93c1a03cea76b
|
refs/heads/master
| 2023-08-13T15:15:08.891655
| 2021-10-18T07:21:33
| 2021-10-18T07:21:33
| 418,386,265
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,615
|
java
|
package com.TBI.Client.Bluff.Utils;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
import android.graphics.Rect;
import android.graphics.RectF;
import android.os.AsyncTask;
import android.os.Build;
import androidx.annotation.DrawableRes;
import androidx.annotation.NonNull;
import com.TBI.Client.Bluff.R;
import java.lang.ref.Reference;
import java.lang.ref.WeakReference;
public class DecodeBitmapTask extends AsyncTask<Void, Void, Bitmap> {
private final BackgroundBitmapCache cache;
private final Resources resources;
private final int bitmapResId;
private final int reqWidth;
private final int reqHeight;
private final Reference<Listener> refListener;
public DecodeBitmapTask(Resources resources, @DrawableRes int bitmapResId,
int reqWidth, int reqHeight,
@NonNull Listener listener) {
this.cache = BackgroundBitmapCache.getInstance();
this.resources = resources;
this.bitmapResId = bitmapResId;
this.reqWidth = reqWidth;
this.reqHeight = reqHeight;
this.refListener = new WeakReference<>(listener);
}
public static Bitmap getRoundedCornerBitmap(Bitmap bitmap, float pixels, int width, int height) {
final Bitmap output = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
final Canvas canvas = new Canvas(output);
final int sourceWidth = bitmap.getWidth();
final int sourceHeight = bitmap.getHeight();
float xScale = (float) width / bitmap.getWidth();
float yScale = (float) height / bitmap.getHeight();
float scale = Math.max(xScale, yScale);
float scaledWidth = scale * sourceWidth;
float scaledHeight = scale * sourceHeight;
float left = (width - scaledWidth) / 2;
float top = (height - scaledHeight) / 2;
final int color = 0xff424242;
final Paint paint = new Paint();
final Rect rect = new Rect(0, 0, width, height);
final RectF rectF = new RectF(rect);
final RectF targetRect = new RectF(left, top, left + scaledWidth, top + scaledHeight);
paint.setAntiAlias(true);
canvas.drawARGB(0, 0, 0, 0);
paint.setColor(color);
canvas.drawRoundRect(rectF, pixels, pixels, paint);
paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN));
canvas.drawBitmap(bitmap, null, targetRect, paint);
return output;
}
@Override
protected Bitmap doInBackground(Void... voids) {
Bitmap cachedBitmap = cache.getBitmapFromBgMemCache(bitmapResId);
if (cachedBitmap != null) {
return cachedBitmap;
}
final BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;
BitmapFactory.decodeResource(resources, bitmapResId, options);
final int width = options.outWidth;
final int height = options.outHeight;
int inSampleSize = 1;
if (height > reqHeight || width > reqWidth) {
int halfWidth = width / 2;
int halfHeight = height / 2;
while ((halfHeight / inSampleSize) >= reqHeight && (halfWidth / inSampleSize) >= reqWidth
&& !isCancelled()) {
inSampleSize *= 2;
}
}
if (isCancelled()) {
return null;
}
options.inSampleSize = inSampleSize;
options.inJustDecodeBounds = false;
options.inPreferredConfig = Bitmap.Config.ARGB_8888;
final Bitmap decodedBitmap = BitmapFactory.decodeResource(resources, bitmapResId, options);
final Bitmap result;
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
result = getRoundedCornerBitmap(decodedBitmap,
resources.getDimension(R.dimen.card_corner_radius), reqWidth, reqHeight);
decodedBitmap.recycle();
} else {
result = decodedBitmap;
}
cache.addBitmapToBgMemoryCache(bitmapResId, result);
return result;
}
@Override
final protected void onPostExecute(Bitmap bitmap) {
final Listener listener = this.refListener.get();
if (listener != null) {
listener.onPostExecuted(bitmap);
}
}
public interface Listener {
void onPostExecuted(Bitmap bitmap);
}
}
|
[
"megha.bpatel2022@gmail.com"
] |
megha.bpatel2022@gmail.com
|
022a0d61a4acaab058765a91cfbdd7d0734ff8f8
|
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
|
/java/hazelcast/2016/8/AuthorizationOperation.java
|
691c21de75efedc49f953f8bdfb995d2e5032340
|
[] |
no_license
|
rosoareslv/SED99
|
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
|
a062c118f12b93172e31e8ca115ce3f871b64461
|
refs/heads/main
| 2023-02-22T21:59:02.703005
| 2021-01-28T19:40:51
| 2021-01-28T19:40:51
| 306,497,459
| 1
| 1
| null | 2020-11-24T20:56:18
| 2020-10-23T01:18:07
| null |
UTF-8
|
Java
| false
| false
| 2,028
|
java
|
/*
* Copyright (c) 2008-2016, Hazelcast, Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hazelcast.internal.cluster.impl.operations;
import com.hazelcast.config.GroupConfig;
import com.hazelcast.nio.ObjectDataInput;
import com.hazelcast.nio.ObjectDataOutput;
import com.hazelcast.spi.Operation;
import java.io.IOException;
public class AuthorizationOperation extends Operation implements JoinOperation {
private String groupName;
private String groupPassword;
private Boolean response = Boolean.TRUE;
public AuthorizationOperation() {
}
public AuthorizationOperation(String groupName, String groupPassword) {
this.groupName = groupName;
this.groupPassword = groupPassword;
}
@Override
public void run() {
GroupConfig groupConfig = getNodeEngine().getConfig().getGroupConfig();
if (!groupName.equals(groupConfig.getName())) {
response = Boolean.FALSE;
} else if (!groupPassword.equals(groupConfig.getPassword())) {
response = Boolean.FALSE;
}
}
@Override
public Object getResponse() {
return response;
}
@Override
protected void readInternal(ObjectDataInput in) throws IOException {
groupName = in.readUTF();
groupPassword = in.readUTF();
}
@Override
protected void writeInternal(ObjectDataOutput out) throws IOException {
out.writeUTF(groupName);
out.writeUTF(groupPassword);
}
}
|
[
"rodrigosoaresilva@gmail.com"
] |
rodrigosoaresilva@gmail.com
|
6642066b1374f4359e9132001def6f97a9c1683a
|
3a0bfd5e7c40d1b0b2917ad4a10e9f1680f18433
|
/MIO/AS2/src/main/java/com/asinfo/as2/dao/ImpuestoProductoPrefacturaClienteDao.java
|
626d4bb4b3fdc23a939c4f347c296fcd8fbb63c3
|
[] |
no_license
|
CynPa/gambaSoftware
|
983827a718058261c1f11eb63991d4be76423139
|
61ae4f46bc5fdf8d44ad678c4dd67a0a4a89aa6b
|
refs/heads/master
| 2021-09-03T16:42:41.120391
| 2018-01-10T14:25:24
| 2018-01-10T14:25:24
| 109,645,375
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 730
|
java
|
/* 1: */ package com.asinfo.as2.dao;
/* 2: */
/* 3: */ import com.asinfo.as2.entities.ImpuestoProductoPrefacturaCliente;
/* 4: */ import javax.ejb.Stateless;
/* 5: */
/* 6: */ @Stateless
/* 7: */ public class ImpuestoProductoPrefacturaClienteDao
/* 8: */ extends AbstractDaoAS2<ImpuestoProductoPrefacturaCliente>
/* 9: */ {
/* 10: */ public ImpuestoProductoPrefacturaClienteDao()
/* 11: */ {
/* 12:29 */ super(ImpuestoProductoPrefacturaCliente.class);
/* 13: */ }
/* 14: */ }
/* Location: C:\backups\AS2(26-10-2017)\WEB-INF\classes\
* Qualified Name: com.asinfo.as2.dao.ImpuestoProductoPrefacturaClienteDao
* JD-Core Version: 0.7.0.1
*/
|
[
"Gambalit@DESKTOP-0C2RSIN"
] |
Gambalit@DESKTOP-0C2RSIN
|
0afb979c496dcc464305a33292aafe9c274082b3
|
6c466d86b1e13f640b11b553d7139d3f037deae5
|
/fstcomp/examples/Modification/BerkeleyDB/project/src/com/sleepycat/bind/je/tree/Key.java
|
50008b661440f0af4f3dc487b74bdf86363ae6ea
|
[] |
no_license
|
seanhoots/formol-featurehouse
|
a30af2f517fdff6a95c0f4a6b4fd9902aeb46f96
|
0cddc85e061398d6d653e4a4607d7e0f4c28fcc4
|
refs/heads/master
| 2021-01-17T06:35:11.489248
| 2012-03-08T13:51:46
| 2012-03-08T13:51:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,305
|
java
|
package com.sleepycat.je.tree;
import java.util.Comparator;
import com.sleepycat.je.DatabaseEntry;
import de.ovgu.cide.jakutil.*;
public final class Key implements Comparable {
public static boolean DUMP_BINARY=true;
public static boolean DUMP_INT_BINDING=false;
public static final byte[] EMPTY_KEY=new byte[0];
private byte[] key;
public Key( byte[] key){ if (key == null) { this.key=null; } else { this.key=new byte[key.length]; System.arraycopy(key,0,this.key,0,key.length); } }
public static byte\[\] makeKey__wrappee__base( DatabaseEntry dbt){ byte[] entryKey=dbt.getData(); if (entryKey == null) { return EMPTY_KEY; } else { byte[] newKey=new byte[dbt.getSize()]; System.arraycopy(entryKey,dbt.getOffset(),newKey,0,dbt.getSize()); return newKey; } }
public static byte[] makeKey( DatabaseEntry dbt){ t.in(Thread.currentThread().getStackTrace()[1].toString()); makeKey__wrappee__base(); t.out(Thread.currentThread().getStackTrace()[1].toString()); }
public byte\[\] getKey__wrappee__base(){ return key; }
public byte[] getKey(){ t.in(Thread.currentThread().getStackTrace()[1].toString()); getKey__wrappee__base(); t.out(Thread.currentThread().getStackTrace()[1].toString()); }
public int compareTo__wrappee__base( Object o){ if (o == null) { throw new NullPointerException(); } Key argKey=(Key)o; return compareUnsignedBytes(this.key,argKey.key); }
public int compareTo( Object o){ t.in(Thread.currentThread().getStackTrace()[1].toString()); compareTo__wrappee__base(); t.out(Thread.currentThread().getStackTrace()[1].toString()); }
public boolean equals__wrappee__base( Object o){ return (o instanceof Key) && (compareTo(o) == 0); }
public boolean equals( Object o){ t.in(Thread.currentThread().getStackTrace()[1].toString()); equals__wrappee__base(); t.out(Thread.currentThread().getStackTrace()[1].toString()); }
public int hashCode__wrappee__base(){ int code=0; for (int i=0; i < key.length; i+=1) { code+=key[i]; } return code; }
public int hashCode(){ t.in(Thread.currentThread().getStackTrace()[1].toString()); hashCode__wrappee__base(); t.out(Thread.currentThread().getStackTrace()[1].toString()); }
public static int compareKeys__wrappee__base( byte[] key1, byte[] key2, Comparator comparator){ if (comparator != null) { return comparator.compare(key1,key2); } else { return compareUnsignedBytes(key1,key2); } }
public static int compareKeys( byte[] key1, byte[] key2, Comparator comparator){ t.in(Thread.currentThread().getStackTrace()[1].toString()); compareKeys__wrappee__base(); t.out(Thread.currentThread().getStackTrace()[1].toString()); }
private static int compareUnsignedBytes__wrappee__base( byte[] key1, byte[] key2){ int a1Len=key1.length; int a2Len=key2.length; int limit=Math.min(a1Len,a2Len); for (int i=0; i < limit; i++) { byte b1=key1[i]; byte b2=key2[i]; if (b1 == b2) { continue; } else { return (b1 & 0xff) - (b2 & 0xff); } } return (a1Len - a2Len); }
private static int compareUnsignedBytes( byte[] key1, byte[] key2){ t.in(Thread.currentThread().getStackTrace()[1].toString()); compareUnsignedBytes__wrappee__base(); t.out(Thread.currentThread().getStackTrace()[1].toString()); }
public static String dumpString__wrappee__base( byte[] key, int nspaces){ StringBuffer sb=new StringBuffer(); sb.append(TreeUtils.indent(nspaces)); sb.append("<key v=\""); if (DUMP_BINARY) { if (key == null) { sb.append("<null>"); } else { sb.append(TreeUtils.dumpByteArray(key)); } } else if (DUMP_INT_BINDING) { if (key == null) { sb.append("<null>"); } else { DatabaseEntry e=new DatabaseEntry(key); } } else { sb.append(key == null ? "" : new String(key)); } sb.append("\"/>"); return sb.toString(); }
public static String dumpString( byte[] key, int nspaces){ t.in(Thread.currentThread().getStackTrace()[1].toString()); dumpString__wrappee__base(); t.out(Thread.currentThread().getStackTrace()[1].toString()); }
public static String getNoFormatString__wrappee__base( byte[] key){ return "key=" + dumpString(key,0); }
public static String getNoFormatString( byte[] key){ t.in(Thread.currentThread().getStackTrace()[1].toString()); getNoFormatString__wrappee__base(); t.out(Thread.currentThread().getStackTrace()[1].toString()); }
private Tracer t = new Tracer();
public Tracer getTracer(){return t;}
}
|
[
"boxleitn"
] |
boxleitn
|
754498b2c55adc05b2a6c8b51e0e29170911a55e
|
fa93c9be2923e697fb8a2066f8fb65c7718cdec7
|
/sources/a2/a/a/b2/f1/j.java
|
ce8710d13ae693d19cf64689b22fba25ed941efe
|
[] |
no_license
|
Auch-Auch/avito_source
|
b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b
|
76fdcc5b7e036c57ecc193e790b0582481768cdc
|
refs/heads/master
| 2023-05-06T01:32:43.014668
| 2021-05-25T10:19:22
| 2021-05-25T10:19:22
| 370,650,685
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,021
|
java
|
package a2.a.a.b2.f1;
import com.avito.android.authorization.smart_lock.NeedResolveResultException;
import com.avito.android.profile.password_change.PasswordChangePresenter;
import com.avito.android.util.Logs;
import io.reactivex.functions.Consumer;
public final class j<T> implements Consumer<Throwable> {
public final /* synthetic */ k a;
public j(k kVar) {
this.a = kVar;
}
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // io.reactivex.functions.Consumer
public void accept(Throwable th) {
Throwable th2 = th;
if (th2 instanceof NeedResolveResultException) {
PasswordChangePresenter.Router router = this.a.a.b;
if (router != null) {
router.resolveSaveResult(((NeedResolveResultException) th2).getResult());
return;
}
return;
}
Logs.error(th2);
k kVar = this.a;
kVar.a.a(kVar.b);
}
}
|
[
"auchhunter@gmail.com"
] |
auchhunter@gmail.com
|
bbc2140963f79e2e33adc44e043bd5a7d7462398
|
b99e6f1b7953531743354f7c276425c4aaafa0f5
|
/MyStockChart_Lib_1.0/src/main/java/com/mystockchart_lib/charting/jobs/ZoomJob.java
|
553b170111b994bb04c24d347a12117f84f83b14
|
[] |
no_license
|
3105Jhm/4tr-mx
|
37fadd5d12e587e4b341785f9d01d0609fc81803
|
f256a9039f92b6ef134680f1721e3e4c6522ab9c
|
refs/heads/master
| 2022-06-24T05:33:07.018001
| 2020-05-11T06:34:25
| 2020-05-11T06:34:25
| 260,776,803
| 0
| 0
| null | 2020-05-11T06:30:09
| 2020-05-02T21:18:30
|
Java
|
UTF-8
|
Java
| false
| false
| 1,519
|
java
|
package com.mystockchart_lib.charting.jobs;
import android.graphics.Matrix;
import android.view.View;
import com.mystockchart_lib.charting.charts.BarLineChartBase;
import com.mystockchart_lib.charting.components.YAxis;
import com.mystockchart_lib.charting.utils.Transformer;
import com.mystockchart_lib.charting.utils.ViewPortHandler;
public class ZoomJob extends ViewPortJob {
protected float scaleX;
protected float scaleY;
protected YAxis.AxisDependency axisDependency;
public ZoomJob(ViewPortHandler viewPortHandler, float scaleX, float scaleY, float xValue, float yValue, Transformer trans, YAxis.AxisDependency axis, View v) {
super(viewPortHandler, xValue, yValue, trans, v);
this.scaleX = scaleX;
this.scaleY = scaleY;
this.axisDependency = axis;
}
@Override
public void run() {
Matrix save = mViewPortHandler.zoom(scaleX, scaleY);
mViewPortHandler.refresh(save, view, false);
float valsInView = ((BarLineChartBase) view).getDeltaY(axisDependency) / mViewPortHandler.getScaleY();
float xsInView = ((BarLineChartBase) view).getXAxis().getValues().size() / mViewPortHandler.getScaleX();
pts[0] = xValue - xsInView / 2f;
pts[1] = yValue + valsInView / 2f;
mTrans.pointValuesToPixel(pts);
save = mViewPortHandler.translate(pts);
mViewPortHandler.refresh(save, view, false);
((BarLineChartBase) view).calculateOffsets();
view.postInvalidate();
}
}
|
[
"932599583@qq.com"
] |
932599583@qq.com
|
fa4374bfe71738eb404078aa0c18d46f8e269454
|
c726f082cdec145f724246f5faf23a00704406b7
|
/xmlgraphics-commons-1.4/src/java/org/apache/xmlgraphics/image/loader/impl/imageio/ImageIOUtil.java
|
e81f426bce7c4973367b87dccb0be6e7d3ecbada
|
[
"Apache-2.0"
] |
permissive
|
freinhold/sqs
|
a8ef0b1a99b7891a676bd02f6040ef2080246efe
|
4c2b8fd41ec1ff18f4e2ac43c59860ff81950c6d
|
refs/heads/master
| 2020-09-09T12:58:58.287148
| 2012-05-04T08:04:23
| 2012-05-04T08:04:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,839
|
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.
*/
/* $Id: ImageIOUtil.java 696964 2008-09-19 07:48:30Z jeremias $ */
package org.apache.xmlgraphics.image.loader.impl.imageio;
import javax.imageio.metadata.IIOMetadata;
import javax.imageio.metadata.IIOMetadataFormatImpl;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Result;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.apache.xmlgraphics.image.loader.ImageSize;
import org.apache.xmlgraphics.util.UnitConv;
/**
* Helper and convenience methods for ImageIO.
*/
public class ImageIOUtil {
/** Key for ImageInfo's custom objects to embed the ImageIO metadata */
public static final Object IMAGEIO_METADATA = IIOMetadata.class;
/**
* Extracts the resolution information from the standard ImageIO metadata.
* @param iiometa the metadata provided by ImageIO
* @param size the image size object
*/
public static void extractResolution(IIOMetadata iiometa, ImageSize size) {
if (iiometa != null && iiometa.isStandardMetadataFormatSupported()) {
Element metanode = (Element)iiometa.getAsTree(
IIOMetadataFormatImpl.standardMetadataFormatName);
Element dim = getChild(metanode, "Dimension");
if (dim != null) {
Element child;
double dpiHorz = size.getDpiHorizontal();
double dpiVert = size.getDpiVertical();
child = getChild(dim, "HorizontalPixelSize");
if (child != null) {
float value = Float.parseFloat(child.getAttribute("value"));
if (value != 0 && !Float.isInfinite(value)) {
dpiHorz = UnitConv.IN2MM / value;
}
}
child = getChild(dim, "VerticalPixelSize");
if (child != null) {
float value = Float.parseFloat(child.getAttribute("value"));
if (value != 0 && !Float.isInfinite(value)) {
dpiVert = UnitConv.IN2MM / value;
}
}
size.setResolution(dpiHorz, dpiVert);
size.calcSizeFromPixels();
}
}
}
/**
* Returns a child element of another element or null if there's no such child.
* @param el the parent element
* @param name the name of the requested child
* @return the child or null if there's no such child
*/
public static Element getChild(Element el, String name) {
NodeList nodes = el.getElementsByTagName(name);
if (nodes.getLength() > 0) {
return (Element)nodes.item(0);
} else {
return null;
}
}
/**
* Dumps the content of an IIOMetadata instance to System.out.
* @param iiometa the metadata
*/
public static void dumpMetadataToSystemOut(IIOMetadata iiometa) {
String[] metanames = iiometa.getMetadataFormatNames();
for (int j = 0; j < metanames.length; j++) {
System.out.println("--->" + metanames[j]);
dumpNodeToSystemOut(iiometa.getAsTree(metanames[j]));
}
}
/**
* Serializes a W3C DOM node to a String and dumps it to System.out.
* @param node a W3C DOM node
*/
private static void dumpNodeToSystemOut(Node node) {
try {
Transformer trans = TransformerFactory.newInstance().newTransformer();
trans.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperty(OutputKeys.INDENT, "yes");
Source src = new DOMSource(node);
Result res = new StreamResult(System.out);
trans.transform(src, res);
} catch (Exception e) {
e.printStackTrace();
}
}
}
|
[
"chikoski@gmail.com"
] |
chikoski@gmail.com
|
2c2ec8ea65bd65a45671d29b35196df978ef4999
|
df11ce153308a702dd03789f8d02990a0793d452
|
/facete2-webapp/src/main/java/org/aksw/facete2/web/config/ConfigWebMvc.java
|
25233ecdccd9c4af4a845c4207476ae666dd143c
|
[] |
no_license
|
anukat2015/Facete2
|
7fd721097912d650db2ff1c6af15140231cabc56
|
df4d3dd0429377e208bae698974d81f0b3c7d3c3
|
refs/heads/master
| 2021-01-18T15:50:51.665666
| 2015-11-03T10:16:04
| 2015-11-03T10:16:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,571
|
java
|
package org.aksw.facete2.web.config;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.ServletContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.MediaType;
import org.springframework.web.accept.ContentNegotiationManager;
import org.springframework.web.servlet.ViewResolver;
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import org.springframework.web.servlet.view.ContentNegotiatingViewResolver;
import org.springframework.web.servlet.view.InternalResourceViewResolver;
import org.springframework.web.servlet.view.JstlView;
import org.springframework.web.servlet.view.UrlBasedViewResolver;
@Configuration
@EnableWebMvc
@ComponentScan(basePackages = {"org.aksw.facete2.web.api", "org.aksw.jena_sparql_api.web.servlets"})
public class ConfigWebMvc
extends WebMvcConfigurerAdapter
{
/* Did not solve the non-UTF8 encoding of json files
* Using the CharacterEncodingFilter worked
private static final Charset UTF8 = Charset.forName("UTF-8");
@Override
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
StringHttpMessageConverter stringConverter = new StringHttpMessageConverter();
stringConverter.setSupportedMediaTypes(Arrays.asList(new MediaType("text", "plain", UTF8)));
converters.add(stringConverter);
// Add other converters ...
}
*/
@Autowired
private ServletContext servletContext;
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
//registry.addResourceHandler("/resources/app/**").addResourceLocations("/resources/app/");
registry.addResourceHandler("/bower_components/**").addResourceLocations("/bower_components/");
registry.addResourceHandler("/scripts/**").addResourceLocations("/scripts/");
registry.addResourceHandler("/styles/**").addResourceLocations("/styles/");
// registry.addResourceHandler("/jsp/**").addResourceLocations("/jsp/");
// registry.addResourceHandler("*.js").addResourceLocations("/resources/snorql/");
// registry.addResourceHandler("/**/*.css").addResourceLocations("/resources/snorql/");
// registry.addResourceHandler("/**/snorql.css").addResourceLocations("/resources/snorql/");
}
@Override
public void addViewControllers(ViewControllerRegistry registry) {
// registry.addViewController("").setViewName("index-sparqlify-web-manager");
// registry.addViewController("/").setViewName("index-sparqlify-web-manager");
registry.addViewController("/index.do").setViewName("index");
}
// @Bean
// public ServletForwardingController endpointsFwdCtrl() {
// ServletForwardingController result = new ServletForwardingController();
// result.setServletName("sparqlify-endpoints");
//
// return result;
// }
// @Bean
// public SimpleUrlHandlerMapping urlMapping() {
// SimpleUrlHandlerMapping result = new SimpleUrlHandlerMapping();
//
//// ServletForwardingController fwd1 = new ServletForwardingController();
//// fwd1.setServletName("sparqlify-admin-api");
////
////
//// Map<String, Object> urlMap = new HashMap<String, Object>();
//// urlMap.put("/manager/*", fwd1);
//// urlMap.put("/endpoints/*", fwd2);
//// result.setUrlMap(urlMap);
//
// Properties mappings = new Properties();
// mappings.put("/endpoints/*", "endpointsFwdCtrl");
//
// result.setMappings(mappings);
//
// return result;
// }
//http://spring.io/blog/2013/05/11/content-negotiation-using-spring-mvc/
@Override
public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
Map<String, MediaType> mediaTypes = new HashMap<String, MediaType>();
mediaTypes.put("htm", MediaType.TEXT_HTML);
mediaTypes.put("html", MediaType.TEXT_HTML);
mediaTypes.put("json", MediaType.APPLICATION_JSON);
configurer.favorPathExtension(true);
configurer.favorParameter(true);
configurer.parameterName("mediaType");
configurer.ignoreAcceptHeader(false);
configurer.useJaf(false);
configurer.defaultContentType(MediaType.TEXT_HTML);
configurer.mediaTypes(mediaTypes);
}
@Bean
public ViewResolver contentNegotiatingViewResolver(ContentNegotiationManager manager) {
// Define the view resolvers
List<ViewResolver> resolvers = new ArrayList<ViewResolver>();
//resolvers.add(internalResourceViewResolverJsp());
//resolvers.add(urlBasedViewResolver());
resolvers.add(internalResourceViewResolverHtml());
// Create the CNVR plugging in the resolvers and the content-negotiation manager
ContentNegotiatingViewResolver resolver = new ContentNegotiatingViewResolver();
resolver.setViewResolvers(resolvers);
resolver.setContentNegotiationManager(manager);
return resolver;
}
public ViewResolver urlBasedViewResolver() {
UrlBasedViewResolver result = new InternalResourceViewResolver();
// result.setPrefix("/WEB-INF/jsp/");
// result.setSuffix(".jsp");
// result.setOrder(0);
return result;
}
//@Bean(name="viewResolverJsp")
public InternalResourceViewResolver internalResourceViewResolverJsp() {
InternalResourceViewResolver result = new InternalResourceViewResolver();
result.setPrefix("/WEB-INF/jsp/");
result.setSuffix(".jsp");
result.setViewClass(JstlView.class);
// result.setOrder(1);
return result;
}
//@Bean(name="viewResolverHtml")
public InternalResourceViewResolver internalResourceViewResolverHtml() {
InternalResourceViewResolver result = new InternalResourceViewResolver();
//result.setPrefix("/resources/app/");
result.setPrefix("");
result.setSuffix(".html");
// result.setOrder(2);
return result;
}
}
|
[
"cstadler@informatik.uni-leipzig.de"
] |
cstadler@informatik.uni-leipzig.de
|
7c26c3f34da0c32b9a15ba3806d53e72262aa446
|
8d1bc1fd1eacaa201a97acac6201dff244738b01
|
/immibis/beardedoctonemesis/mcp/McpBukkitMapping.java
|
fc5d90fb33d5c78c5becaad891896a92ad400f6c
|
[
"BSD-3-Clause"
] |
permissive
|
Chancebozey/bearded-octo-nemesis
|
44cf56325479f15cb4cf79316458185394ac3bed
|
d3aefa75375854d95b02196020ed12383eea39d2
|
refs/heads/master
| 2021-01-18T08:43:39.683166
| 2013-02-25T03:27:20
| 2013-02-25T03:27:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,399
|
java
|
package immibis.beardedoctonemesis.mcp;
import immibis.beardedoctonemesis.Mapping;
import java.util.*;
import java.io.File;
import java.io.IOException;
public class McpBukkitMapping extends McpMapping {
public McpBukkitMapping(File confDir, Side side, boolean reobf) throws IOException {
super(confDir, side, reobf);
}
public Mapping getMapping() {
Mapping m = super.getMapping();
for(Map.Entry<String, String> e : new HashMap<String, String>(m.classes).entrySet()) {
if(e.getKey().startsWith("net/minecraft/src/")) {
String newKey = e.getKey().replace("net/minecraft/src/", "net/minecraft/server/");
m.setClass(newKey, e.getValue());
m.classes.remove(e.getKey());
}
}
for(Map.Entry<String, String> e : new HashMap<String, String>(m.fields).entrySet()) {
if(e.getKey().startsWith("net/minecraft/src/")) {
String newKey = e.getKey().replace("net/minecraft/src/", "net/minecraft/server/");
m.fields.put(newKey, e.getValue());
m.fields.remove(e.getKey());
}
}
for(Map.Entry<String, String> e : new HashMap<String, String>(m.methods).entrySet()) {
if(e.getKey().startsWith("net/minecraft/src/")) {
String newKey = e.getKey().replace("net/minecraft/src/", "net/minecraft/server/");
m.methods.put(newKey, e.getValue());
m.methods.remove(e.getKey());
}
}
//throw new RuntimeException("boom");
return m;
}
}
|
[
"immibis@gmail.com"
] |
immibis@gmail.com
|
4ee8ce6ad00ae9fe6a281ac93e35b505200105b0
|
75dceb70fffb1819a935fc015fa1dc3f6073359f
|
/lang_interface/java/com/intel/daal/algorithms/cholesky/Method.java
|
2bf838ff51b1ffd30667c4d643f56cf33b05ab3f
|
[
"Apache-2.0",
"Intel"
] |
permissive
|
KalyanovD/daal
|
ae40c16cf0ef6e915c7418227ff8a77390e0ee8e
|
b354b68f83a213102bca6e03d7a11f55ab751f92
|
refs/heads/master
| 2022-06-06T00:47:05.309445
| 2019-11-29T10:46:38
| 2019-11-29T10:46:38
| 210,588,356
| 0
| 0
|
Apache-2.0
| 2019-09-24T12:16:15
| 2019-09-24T11:41:08
| null |
UTF-8
|
Java
| false
| false
| 1,698
|
java
|
/* file: Method.java */
/*******************************************************************************
* Copyright 2014-2019 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*******************************************************************************/
/**
* @ingroup cholesky
* @{
*/
package com.intel.daal.algorithms.cholesky;
import com.intel.daal.utils.*;
/**
* <a name="DAAL-CLASS-ALGORITHMS__CHOLESKY__METHOD"></a>
* @brief Available methods for Cholesky decomposition
*/
public final class Method {
/** @private */
static {
LibUtils.loadLibrary();
}
private int _value;
/**
* Constructs the method object using the provided value
* @param value Value corresponding to the method object
*/
public Method(int value) {
_value = value;
}
/**
* Returns the value corresponding to the method object
* @return Value corresponding to the method object
*/
public int getValue() {
return _value;
}
private static final int DefaultMethodValue = 0;
public static final Method defaultDense = new Method(DefaultMethodValue); /*!< Default method */
}
/** @} */
|
[
"nikolay.a.petrov@intel.com"
] |
nikolay.a.petrov@intel.com
|
53054943cabe3504a741bd25730373393d0f152c
|
c577f5380b4799b4db54722749cc33f9346eacc1
|
/BugSwarm/Azure-azure-sdk-for-java-134840154/buggy_files/azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/AccountListNodeAgentSkusNextOptions.java
|
1ffda7452fbbdc7167bd64f9553fa7a6bf42709a
|
[] |
no_license
|
tdurieux/BugSwarm-dissection
|
55db683fd95f071ff818f9ca5c7e79013744b27b
|
ee6b57cfef2119523a083e82d902a6024e0d995a
|
refs/heads/master
| 2020-04-30T17:11:52.050337
| 2019-05-09T13:42:03
| 2019-05-09T13:42:03
| 176,972,414
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,873
|
java
|
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/
package com.microsoft.azure.batch.protocol.models;
import com.microsoft.rest.DateTimeRfc1123;
import org.joda.time.DateTime;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Additional parameters for the ListNodeAgentSkusNext operation.
*/
public class AccountListNodeAgentSkusNextOptions {
/**
* The caller-generated request identity, in the form of a GUID with no
* decoration such as curly braces, e.g.
* 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0.
*/
@JsonProperty(value = "")
private String clientRequestId;
/**
* Whether the server should return the client-request-id identifier in
* the response.
*/
@JsonProperty(value = "")
private Boolean returnClientRequestId;
/**
* The time the request was issued. If not specified, this header will be
* automatically populated with the current system clock time.
*/
@JsonProperty(value = "")
private DateTimeRfc1123 ocpDate;
/**
* Get the clientRequestId value.
*
* @return the clientRequestId value
*/
public String clientRequestId() {
return this.clientRequestId;
}
/**
* Set the clientRequestId value.
*
* @param clientRequestId the clientRequestId value to set
* @return the AccountListNodeAgentSkusNextOptions object itself.
*/
public AccountListNodeAgentSkusNextOptions withClientRequestId(String clientRequestId) {
this.clientRequestId = clientRequestId;
return this;
}
/**
* Get the returnClientRequestId value.
*
* @return the returnClientRequestId value
*/
public Boolean returnClientRequestId() {
return this.returnClientRequestId;
}
/**
* Set the returnClientRequestId value.
*
* @param returnClientRequestId the returnClientRequestId value to set
* @return the AccountListNodeAgentSkusNextOptions object itself.
*/
public AccountListNodeAgentSkusNextOptions withReturnClientRequestId(Boolean returnClientRequestId) {
this.returnClientRequestId = returnClientRequestId;
return this;
}
/**
* Get the ocpDate value.
*
* @return the ocpDate value
*/
public DateTime ocpDate() {
if (this.ocpDate == null) {
return null;
}
return this.ocpDate.getDateTime();
}
/**
* Set the ocpDate value.
*
* @param ocpDate the ocpDate value to set
* @return the AccountListNodeAgentSkusNextOptions object itself.
*/
public AccountListNodeAgentSkusNextOptions withOcpDate(DateTime ocpDate) {
this.ocpDate = new DateTimeRfc1123(ocpDate);
return this;
}
}
|
[
"durieuxthomas@hotmail.com"
] |
durieuxthomas@hotmail.com
|
dac5d72927480cb8a5fa660476d5b3680fa9b45f
|
49efda948789c3abae84f833df3c3d971f101d9a
|
/src/main/java/org/zhenchao/algorithm/oj/leetcode/easy/ZigZagConversion.java
|
13c89e272acb5e7f9e07938ba5c09e5822598140
|
[] |
no_license
|
plotor/algorithm
|
f91cae2b46e4e24e58de1f461421aad2af904ce3
|
8495f1cae9bc282a68643500049653ccb1a64ead
|
refs/heads/master
| 2020-04-23T06:04:02.807975
| 2019-02-16T07:01:22
| 2019-02-16T07:01:22
| 170,961,021
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,573
|
java
|
package org.zhenchao.algorithm.oj.leetcode.easy;
/**
* No.6
*
* @author zhenchao.Wang 2016-8-29 22:13:06
*/
public class ZigZagConversion {
public String convert(String s, int numRows) {
if (numRows == 1) {
return s;
}
StringBuilder sb = new StringBuilder();
// 顺序存放下标
int[] indexs = new int[s.length()];
int n = 0;
for (int i = 0; i < numRows; i++) {
// 一行一行来
for (int j = 0; ; j++) {
// 计算每个列的下标值
if (j % 2 == 0) {
// 偶数列
int index = i + (numRows - 1) * j;
if (index >= s.length()) {
break;
}
indexs[n++] = index;
} else if (i > 0) {
// 奇数列
int index = i + (numRows - 1) * (j + 1) - 2 * i;
if (index >= s.length()) {
break;
}
if (index > indexs[n - 1]) {
indexs[n++] = index;
}
}
}
}
for (final int i : indexs) {
sb.append(s.charAt(i));
}
return sb.toString();
}
public static void main(String[] args) {
ZigZagConversion zzc = new ZigZagConversion();
String s = "PAYPALISHIRING";
int numRows = 3;
System.out.println(zzc.convert(s, numRows));
}
}
|
[
"zhenchao.wang@hotmail.com"
] |
zhenchao.wang@hotmail.com
|
195db1c40a811ced5f7f885103b5f4fbb45b6be8
|
092e79c1748652585e3acaa9d4c041ed8acd07aa
|
/src/com/syntax/Selenium06/alertDemo2.java
|
c24aa8c50d4e6d066106d081c37e14a096e43605
|
[] |
no_license
|
tugba54-test/selenium.batch
|
372f30fa38d7ce6c240d0125916735f14aae344f
|
d9c81680653a18b1ebb80fa443f99027899310d1
|
refs/heads/master
| 2022-10-01T08:28:25.148247
| 2020-06-07T15:33:02
| 2020-06-07T15:33:02
| 264,053,619
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 399
|
java
|
package com.syntax.Selenium06;
import com.Utilities.Ahmet.MyBase;
public class alertDemo2 extends MyBase{
public static String url="http://test:test@abcdatabase.com/basicauth";
//http://abcdatabase.com/basicauth-->actual adee
public static void main(String[] args) {
//browser base Alert
drivers("chrome");
driver.get(url);
driver.manage().window().maximize();
}
}
|
[
"akcatugba@yahoo.com"
] |
akcatugba@yahoo.com
|
09b0fd35a9d6aae305caba498c798169b5d6947d
|
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
|
/genny_JavaWithoutLambdasApi21/applicationModule/src/main/java/applicationModulepackageJava8/Foo748.java
|
b1e1659d47893dc7a8655364e45f92a74d8b076a
|
[] |
no_license
|
NikitaKozlov/generated-project-for-desugaring
|
0bc1443ab3ddc84cd289331c726761585766aea7
|
81506b3711004185070ca4bb9a93482b70011d36
|
refs/heads/master
| 2020-03-20T00:35:06.996525
| 2018-06-12T09:30:37
| 2018-06-12T09:30:37
| 137,049,317
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 346
|
java
|
package applicationModulepackageJava8;
public class Foo748 {
public void foo0() {
new applicationModulepackageJava8.Foo747().foo5();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
public void foo4() {
foo3();
}
public void foo5() {
foo4();
}
}
|
[
"nikita.e.kozlov@gmail.com"
] |
nikita.e.kozlov@gmail.com
|
f56dfd9dcee05518045aee28e8e7f2f6a2107ac3
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/22/22_8c242f823f3428493e3cf15adeeb8962d4df6a62/QueryPlan/22_8c242f823f3428493e3cf15adeeb8962d4df6a62_QueryPlan_s.java
|
41679de266b011ad8721ed24b25ef4326ba029cd
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 5,425
|
java
|
package niagaraGUI;
import java.util.*;
import org.jdom.*;
import java.io.FileWriter;
import java.io.IOException;
import org.jdom.Attribute;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.output.Format;
import org.jdom.output.XMLOutputter;
public class QueryPlan {
private String filename;
static private Hashtable<String, OperatorTemplate> opTemplates;//Table of operator templates indexed by operator name
private List<Operator> opList;//List of operator Instances in the current query plan
private Operator top;//reference to the top operator
private String queryName;//name of the query
private DTDInterpreter dtdInterp;
public QueryPlan(String name, String filename) {
opTemplates = new Hashtable<String, OperatorTemplate>();
dtdInterp = new DTDInterpreter(filename);
opTemplates = dtdInterp.getTemplates();
opList = new ArrayList<Operator>();
}
static public Hashtable<String, OperatorTemplate> getOpTemplates() {
return opTemplates;
}
static public OperatorTemplate addTemplate(OperatorTemplate opTemplate) {
return opTemplates.put(opTemplate.getName(), opTemplate);
}
public void generateXML(String filename) {
try{
String name;
String elements;
String comments;
Element plan = new Element("plan");
plan.setAttribute(new Attribute("top", "cons"));
Document doc1 = new Document(plan);
DocType type = new DocType("plan", "/stash/datalab/datastreams-student/bin/queryplan.dtd");
doc1.setDocType(type);
doc1.setRootElement(plan);
Iterator iterator;
iterator = opList.iterator();
Operator op;
HashMap<String, String> att;
while (iterator.hasNext()){
op = (Operator)iterator.next();
name = op.getName();
comments = op.getComments();
elements = op.getElements();
Element ele = new Element(name);
att = op.getAttributes();
Set set = att.entrySet();
Iterator i = set.iterator();
String str1;
String str2;
if(comments != null){
Comment com = new Comment(comments);
//ele.setContent(com);
doc1.getRootElement().addContent(com);
}
while(i.hasNext()) {
Map.Entry me = (Map.Entry)i.next();
str1 = (String)me.getKey();
str2 = (String)me.getValue();
if(str2 != null)
ele.setAttribute(new Attribute(str1,str2));
}
if(elements != null)
ele.addContent("\n" + elements + "\n");
doc1.getRootElement().addContent(ele);
}
XMLOutputter xmlOutput = new XMLOutputter();
xmlOutput.setFormat(Format.getPrettyFormat());
xmlOutput.output(doc1, new FileWriter(filename));
System.out.println("File Saved!");
}catch (IOException io) {
System.out.println(io.getMessage());
}
}
public String[] getOperatorNames(){
if (opTemplates != null){
Set<String> opNameSet = opTemplates.keySet();
String[] opNameAry = new String[opNameSet.size()];
opNameAry = opNameSet.toArray(opNameAry);
return opNameAry;
}
else return null;
}
public void setName(String name) {
queryName = name;
}
public String getName() {
//returns the name of this query plan
return queryName;
}
public boolean addOperatorInstance(Operator newOp){
//Adds a new instansiated operator to this queryplan
if (opList.contains(newOp)){
return false;
}
else{
opList.add(newOp);
return true;
}
}
public boolean removeOperatorInstance(Operator toRemove){
//removes an instansiated from Operator from this query plan
if (opList.contains(toRemove)){
opList.remove(toRemove);
return true;
}
else{
return false;
}
}
// This design pattern is in place to ease future import if
// additional types are added
public Boolean parse(String filename) {
return parseDTD(filename);
}
public Boolean parse(String filename, String docType) {
if(docType == null) {
docType = "DTD";
}
if(docType == "DTD") {
return parseDTD(filename);
} else return false;
}
private Boolean parseDTD(String filename) {
return false;
}
public String toString() {
return null;
}
public void setTop(Operator newTop){
if (top != null)
top.setTop(false);
top = newTop;
top.setTop(true);
}
public Operator getTop(){
return top;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
f3c64a43f58cae9f3d67f59c76ccd6cbd551a977
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/alibaba--druid/6e5fb2e7df052b283e7a8ff3843cd238f3d064db/before/OracleDataTypeIntervalDay.java
|
09efdd64e9e00b13a7448fb317ccfb18fd19b63b
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,884
|
java
|
/*
* Copyright 1999-2011 Alibaba Group Holding Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.druid.sql.dialect.oracle.ast;
import java.util.ArrayList;
import java.util.List;
import com.alibaba.druid.sql.ast.SQLDataTypeImpl;
import com.alibaba.druid.sql.ast.SQLExpr;
import com.alibaba.druid.sql.dialect.oracle.visitor.OracleASTVisitor;
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
public class OracleDataTypeIntervalDay extends SQLDataTypeImpl implements OracleSQLObject {
private static final long serialVersionUID = 1L;
private boolean toSecond = false;
protected final List<SQLExpr> fractionalSeconds = new ArrayList<SQLExpr>();
public OracleDataTypeIntervalDay(){
this.setName("INTERVAL DAY");
}
@Override
protected void accept0(SQLASTVisitor visitor) {
this.accept0((OracleASTVisitor) visitor);
}
@Override
public void accept0(OracleASTVisitor visitor) {
if (visitor.visit(this)) {
acceptChild(visitor, getArguments());
}
visitor.endVisit(this);
}
public boolean isToSecond() {
return toSecond;
}
public void setToSecond(boolean toSecond) {
this.toSecond = toSecond;
}
public List<SQLExpr> getFractionalSeconds() {
return fractionalSeconds;
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
f9fd43b87846e8e5f0a8b8534fe6cac219481deb
|
40a2835e8ca1c125a53d6071abff1365f87daaea
|
/src/main/java/com/netflix/astyanax/connectionpool/impl/BagOfConnectionsConnectionPoolImpl.java
|
7600aebe4bae179f33bdd1ac65012ef11bfdb129
|
[
"Apache-2.0",
"LicenseRef-scancode-public-domain"
] |
permissive
|
sbtourist/astyanax
|
98ee624ab7a131231d4a84f9aa829fce46718cde
|
1d3819e74f19df6b4b6f8b69a6b383f41190ca3d
|
refs/heads/master
| 2021-01-18T07:37:18.237640
| 2012-10-18T23:07:12
| 2012-10-18T23:07:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,385
|
java
|
package com.netflix.astyanax.connectionpool.impl;
import java.util.List;
import java.util.Random;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import com.netflix.astyanax.connectionpool.Connection;
import com.netflix.astyanax.connectionpool.ConnectionFactory;
import com.netflix.astyanax.connectionpool.ConnectionPoolConfiguration;
import com.netflix.astyanax.connectionpool.ConnectionPoolMonitor;
import com.netflix.astyanax.connectionpool.ExecuteWithFailover;
import com.netflix.astyanax.connectionpool.HostConnectionPool;
import com.netflix.astyanax.connectionpool.Operation;
import com.netflix.astyanax.connectionpool.exceptions.ConnectionException;
import com.netflix.astyanax.connectionpool.exceptions.IsDeadConnectionException;
import com.netflix.astyanax.connectionpool.exceptions.IsTimeoutException;
import com.netflix.astyanax.connectionpool.exceptions.NoAvailableHostsException;
import com.netflix.astyanax.connectionpool.exceptions.PoolTimeoutException;
/**
* Connection pool which puts all connections in a single queue. The load
* balancing is essentially random here.
*
* @author elandau
*
* @param <CL>
*/
public class BagOfConnectionsConnectionPoolImpl<CL> extends AbstractHostPartitionConnectionPool<CL> {
private final LinkedBlockingQueue<Connection<CL>> idleConnections = new LinkedBlockingQueue<Connection<CL>>();
private final AtomicInteger activeConnectionCount = new AtomicInteger(0);
private final Random randomIndex = new Random();
public BagOfConnectionsConnectionPoolImpl(ConnectionPoolConfiguration config, ConnectionFactory<CL> factory,
ConnectionPoolMonitor monitor) {
super(config, factory, monitor);
}
private <R> Connection<CL> borrowConnection(Operation<CL, R> op) throws ConnectionException {
long startTime = System.currentTimeMillis();
// Try to get an open connection from the bag
Connection<CL> connection = null;
boolean newConnection = false;
try {
connection = idleConnections.poll();
if (connection != null) {
return connection;
}
// Already reached max connections so just wait
if (activeConnectionCount.incrementAndGet() > config.getMaxConns()) {
activeConnectionCount.decrementAndGet();
try {
connection = idleConnections.poll(config.getMaxTimeoutWhenExhausted(), TimeUnit.MILLISECONDS);
if (connection == null) {
throw new PoolTimeoutException("Timed out waiting for connection from bag");
}
return connection;
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new RuntimeException("Interrupted waiting to borrow a connection");
}
}
// Try to create a new one
try {
newConnection = true;
// Find a random node and open a connection on it. If that node
// has been exhausted
// then try the next one in array order until a connection can
// be created
List<HostConnectionPool<CL>> pools = topology.getAllPools().getPools();
if (pools != null && pools.size() > 0) {
int index = randomIndex.nextInt(pools.size());
for (int i = 0; i < pools.size(); ++i, ++index) {
HostConnectionPool<CL> pool = pools.get(index % pools.size());
try {
connection = pool.borrowConnection(config.getConnectTimeout());
return connection;
}
catch (ConnectionException connectionException) {
// Ignore
}
}
throw new NoAvailableHostsException("Too many errors trying to open a connection");
}
else {
throw new NoAvailableHostsException("No hosts to borrow from");
}
}
finally {
if (connection == null)
activeConnectionCount.decrementAndGet();
}
}
finally {
if (connection != null && newConnection == false)
monitor.incConnectionBorrowed(connection.getHostConnectionPool().getHost(), System.currentTimeMillis()
- startTime);
}
}
protected boolean returnConnection(Connection<CL> connection) {
if (connection != null) {
if (connection.getHostConnectionPool().isReconnecting()
|| connection.getOperationCount() > config.getMaxOperationsPerConnection()) {
closeConnection(connection);
}
else {
ConnectionException ce = connection.getLastException();
if (ce != null && (ce instanceof IsDeadConnectionException || ce instanceof IsTimeoutException)) {
closeConnection(connection);
}
else if (!this.idleConnections.offer(connection)) {
closeConnection(connection);
}
else {
this.monitor.incConnectionReturned(connection.getHostConnectionPool().getHost());
}
}
return true;
}
return false;
}
private void closeConnection(Connection<CL> connection) {
connection.getHostConnectionPool().closeConnection(connection);
activeConnectionCount.decrementAndGet();
}
class BagExecuteWithFailover<R> extends AbstractExecuteWithFailoverImpl<CL, R> {
private int retryCountdown;
private HostConnectionPool<CL> pool = null;
private int size = 0;
public BagExecuteWithFailover(ConnectionPoolConfiguration config) throws ConnectionException {
super(config, monitor);
size = topology.getAllPools().getPools().size();
retryCountdown = Math.min(config.getMaxFailoverCount(), size);
if (retryCountdown < 0)
retryCountdown = size;
}
@Override
public HostConnectionPool<CL> getCurrentHostConnectionPool() {
return pool;
}
@Override
public Connection<CL> borrowConnection(Operation<CL, R> operation) throws ConnectionException {
pool = null;
connection = BagOfConnectionsConnectionPoolImpl.this.borrowConnection(operation);
pool = connection.getHostConnectionPool();
return connection;
}
@Override
public boolean canRetry() {
return --retryCountdown >= 0;
}
@Override
public void releaseConnection() {
BagOfConnectionsConnectionPoolImpl.this.returnConnection(connection);
connection = null;
}
}
@Override
public <R> ExecuteWithFailover<CL, R> newExecuteWithFailover(Operation<CL, R> op) throws ConnectionException {
return new BagExecuteWithFailover<R>(config);
}
}
|
[
"elandau@yahoo.com"
] |
elandau@yahoo.com
|
84390a373c8f0d26079dc44a6d2feabbb4f10ef7
|
0e181c0fb5ac746203ca45cba51dc7abd75e05bc
|
/src/vurfeclipse/user/projects/NewJourneyProject.java
|
94d805284e60df86375483b183069e5164bc01bd
|
[] |
no_license
|
doctea/vurfx
|
1a488b0d10e3952f4beefea6c4911e260a15ff82
|
a1a150a68d6b88e1018a2929e98b74c53263d814
|
refs/heads/master
| 2022-04-25T16:04:12.578618
| 2020-04-22T16:09:35
| 2020-04-22T16:09:35
| 257,947,698
| 6
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 789
|
java
|
package vurfeclipse.user.projects;
import vurfeclipse.filters.Filter;
import vurfeclipse.projects.SimpleProject;
import vurfeclipse.scenes.Scene;
import vurfeclipse.scenes.SimpleScene;
public class NewJourneyProject extends SimpleProject {
class Doobie extends Filter {
Doobie(Scene sc) {
super(sc);
// TODO Auto-generated constructor stub
}
@Override
public boolean applyMeatToBuffers() {
// TODO Auto-generated method stub
out.rect(50, 50, 50, 50);
return false;
}
}
public NewJourneyProject(int w, int h, String gfx_mode) {
super(w, h, gfx_mode);
// TODO Auto-generated constructor stub
}
@Override
public boolean setupScenes() {
Scene s = new SimpleScene(this, w, h);
s.addFilter(new Doobie(s));
this.addScene(s);
return true;
}
}
|
[
"devnull@localhost"
] |
devnull@localhost
|
d30a1069068f844db45baedc5822f323beb16fc6
|
647eef4da03aaaac9872c8b210e4fc24485e49dc
|
/TestMemory/wandoujia/src/main/java/com/wandoujia/p4/community/utils/e.java
|
3dfb22c0cf7bfd8ee3eb6ef215a9082022e95f3d
|
[] |
no_license
|
AlbertSnow/git_workspace
|
f2d3c68a7b6e62f41c1edcd7744f110e2bf7f021
|
a0b2cd83cfa6576182f440a44d957a9b9a6bda2e
|
refs/heads/master
| 2021-01-22T17:57:16.169136
| 2016-12-05T15:59:46
| 2016-12-05T15:59:46
| 28,154,580
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 618
|
java
|
package com.wandoujia.p4.community.utils;
import android.app.Activity;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import com.wandoujia.p4.community.b.x;
final class e
implements DialogInterface.OnClickListener
{
e(String paramString, Activity paramActivity)
{
}
public final void onClick(DialogInterface paramDialogInterface, int paramInt)
{
new x(this.a, this.b).execute();
}
}
/* Location: C:\WorkSpace\WandDouJiaNotificationBar\WanDou1.jar
* Qualified Name: com.wandoujia.p4.community.utils.e
* JD-Core Version: 0.6.0
*/
|
[
"zhaojialiang@conew.com"
] |
zhaojialiang@conew.com
|
72d1bda7b1605a7ab9b0b0cd6dd55d7c9bcfbf48
|
dba87418d2286ce141d81deb947305a0eaf9824f
|
/sources/com/iaai/android/bdt/feature/myAccount/toBePaid/BDTToBePaidFragment$subscribeToViewModel$2.java
|
389d320212ef5cf9638f3c71ef76b4045199d3ac
|
[] |
no_license
|
Sluckson/copyOavct
|
1f73f47ce94bb08df44f2ba9f698f2e8589b5cf6
|
d20597e14411e8607d1d6e93b632d0cd2e8af8cb
|
refs/heads/main
| 2023-03-09T12:14:38.824373
| 2021-02-26T01:38:16
| 2021-02-26T01:38:16
| 341,292,450
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,400
|
java
|
package com.iaai.android.bdt.feature.myAccount.toBePaid;
import androidx.lifecycle.Observer;
import com.iaai.android.bdt.extensions.Context_ExtensionKt;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
@Metadata(mo66931bv = {1, 0, 3}, mo66932d1 = {"\u0000\u0010\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u00012\u000e\u0010\u0002\u001a\n \u0004*\u0004\u0018\u00010\u00030\u0003H\n¢\u0006\u0002\b\u0005"}, mo66933d2 = {"<anonymous>", "", "it", "", "kotlin.jvm.PlatformType", "onChanged"}, mo66934k = 3, mo66935mv = {1, 1, 13})
/* compiled from: BDTToBePaidFragment.kt */
final class BDTToBePaidFragment$subscribeToViewModel$2<T> implements Observer<String> {
final /* synthetic */ BDTToBePaidFragment this$0;
BDTToBePaidFragment$subscribeToViewModel$2(BDTToBePaidFragment bDTToBePaidFragment) {
this.this$0 = bDTToBePaidFragment;
}
public final void onChanged(String str) {
Intrinsics.checkExpressionValueIsNotNull(str, "it");
Context_ExtensionKt.showToast(BDTToBePaidFragment.access$getBdtPaymentActivity$p(this.this$0), str);
try {
this.this$0.logIAAError(this.this$0.getSessionManager().getCurrentSessionUserId(), "acserviceswebapi/api/GetPayPalInfo/", "", str, "network failure");
} catch (Exception e) {
e.printStackTrace();
}
}
}
|
[
"lucksonsurprice94@gmail.com"
] |
lucksonsurprice94@gmail.com
|
4f05bf1c4a3d0eec2ee77caceb25ee27bb6ce964
|
e1cf409c1599d22d27084baca337a7e33a7241c9
|
/app/src/main/java/com/tutorsec/pentest/MainActivity.java
|
f87824ccd312325c0ce72340b98b994a64ab7b37
|
[] |
no_license
|
sk8er-tutorsec/android-pentest-tool
|
54b70468093aece359782c988e2fefca6124d27b
|
0d0eaa424334dc72d7589ef81b202c128ec6f697
|
refs/heads/master
| 2022-12-20T08:19:29.438231
| 2020-10-04T03:38:21
| 2020-10-04T03:38:21
| 301,032,747
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,565
|
java
|
package com.tutorsec.pentest;
import android.os.Bundle;
import android.view.View;
import android.view.Menu;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.snackbar.Snackbar;
import com.google.android.material.navigation.NavigationView;
import androidx.navigation.NavController;
import androidx.navigation.Navigation;
import androidx.navigation.ui.AppBarConfiguration;
import androidx.navigation.ui.NavigationUI;
import androidx.drawerlayout.widget.DrawerLayout;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
public class MainActivity extends AppCompatActivity {
private AppBarConfiguration mAppBarConfiguration;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
FloatingActionButton fab = findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
}
});
DrawerLayout drawer = findViewById(R.id.drawer_layout);
NavigationView navigationView = findViewById(R.id.nav_view);
// Passing each menu ID as a set of Ids because each
// menu should be considered as top level destinations.
mAppBarConfiguration = new AppBarConfiguration.Builder(
R.id.nav_shodan)
.setDrawerLayout(drawer)
.build();
NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment);
NavigationUI.setupActionBarWithNavController(this, navController, mAppBarConfiguration);
NavigationUI.setupWithNavController(navigationView, navController);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
@Override
public boolean onSupportNavigateUp() {
NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment);
return NavigationUI.navigateUp(navController, mAppBarConfiguration)
|| super.onSupportNavigateUp();
}
}
|
[
"root@localhost.localdomain"
] |
root@localhost.localdomain
|
4b385cda14f7888c1ac6d019ddf0efd6f4ccc2f6
|
e7fbe293a09f48848fb3b601ce250b1ba4933bbc
|
/protocol-manager/src/main/java/com/openclinica/pm/config/LoggingConfiguration.java
|
e178412b96e0dc6689d14aab435bd49cb9f392ad
|
[] |
no_license
|
kkrumlian/protocol-manager-poc
|
7c613724c029b50c0f56436f6aa9a4a5ca5d34ca
|
5eacacc8ac66b58d090caeedc69b64cf9d8c6f8b
|
refs/heads/master
| 2021-01-23T01:01:03.578897
| 2017-03-28T14:28:32
| 2017-03-28T14:28:32
| 85,859,760
| 0
| 2
| null | 2017-03-28T14:24:57
| 2017-03-22T17:57:43
|
Java
|
UTF-8
|
Java
| false
| false
| 4,169
|
java
|
package com.openclinica.pm.config;
import io.github.jhipster.config.JHipsterProperties;
import ch.qos.logback.classic.AsyncAppender;
import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.LoggerContext;
import ch.qos.logback.classic.spi.LoggerContextListener;
import ch.qos.logback.core.spi.ContextAwareBase;
import net.logstash.logback.appender.LogstashSocketAppender;
import net.logstash.logback.stacktrace.ShortenedThrowableConverter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
@Configuration
public class LoggingConfiguration {
private final Logger log = LoggerFactory.getLogger(LoggingConfiguration.class);
private LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();
@Value("${spring.application.name}")
private String appName;
@Value("${server.port}")
private String serverPort;
private final JHipsterProperties jHipsterProperties;
public LoggingConfiguration(JHipsterProperties jHipsterProperties) {
this.jHipsterProperties = jHipsterProperties;
if (jHipsterProperties.getLogging().getLogstash().isEnabled()) {
addLogstashAppender(context);
// Add context listener
LogbackLoggerContextListener loggerContextListener = new LogbackLoggerContextListener();
loggerContextListener.setContext(context);
context.addListener(loggerContextListener);
}
}
public void addLogstashAppender(LoggerContext context) {
log.info("Initializing Logstash logging");
LogstashSocketAppender logstashAppender = new LogstashSocketAppender();
logstashAppender.setName("LOGSTASH");
logstashAppender.setContext(context);
String customFields = "{\"app_name\":\"" + appName + "\",\"app_port\":\"" + serverPort + "\"}";
// Set the Logstash appender config from JHipster properties
logstashAppender.setSyslogHost(jHipsterProperties.getLogging().getLogstash().getHost());
logstashAppender.setPort(jHipsterProperties.getLogging().getLogstash().getPort());
logstashAppender.setCustomFields(customFields);
// Limit the maximum length of the forwarded stacktrace so that it won't exceed the 8KB UDP limit of logstash
ShortenedThrowableConverter throwableConverter = new ShortenedThrowableConverter();
throwableConverter.setMaxLength(7500);
throwableConverter.setRootCauseFirst(true);
logstashAppender.setThrowableConverter(throwableConverter);
logstashAppender.start();
// Wrap the appender in an Async appender for performance
AsyncAppender asyncLogstashAppender = new AsyncAppender();
asyncLogstashAppender.setContext(context);
asyncLogstashAppender.setName("ASYNC_LOGSTASH");
asyncLogstashAppender.setQueueSize(jHipsterProperties.getLogging().getLogstash().getQueueSize());
asyncLogstashAppender.addAppender(logstashAppender);
asyncLogstashAppender.start();
context.getLogger("ROOT").addAppender(asyncLogstashAppender);
}
/**
* Logback configuration is achieved by configuration file and API.
* When configuration file change is detected, the configuration is reset.
* This listener ensures that the programmatic configuration is also re-applied after reset.
*/
class LogbackLoggerContextListener extends ContextAwareBase implements LoggerContextListener {
@Override
public boolean isResetResistant() {
return true;
}
@Override
public void onStart(LoggerContext context) {
addLogstashAppender(context);
}
@Override
public void onReset(LoggerContext context) {
addLogstashAppender(context);
}
@Override
public void onStop(LoggerContext context) {
// Nothing to do.
}
@Override
public void onLevelChange(ch.qos.logback.classic.Logger logger, Level level) {
// Nothing to do.
}
}
}
|
[
"krikor.krumlian@gmail.com"
] |
krikor.krumlian@gmail.com
|
dc3f7e37fb0e66b1403f8bec2f55820900ee1e6e
|
c3ceb77a709a7c48e0fb04f41773d5a274da5a96
|
/src/main/java/com/wildlife/fody/web/rest/EggResource.java
|
f734fc78ad5431a981e13421d18c968dc97480e0
|
[] |
no_license
|
ikkeshramanna/wildlife-backend
|
89f1c8d1ab0f38aabadf5502c79047fb246ad5a4
|
d9643d9bd2427c5edc9bab76af357ec7792768b9
|
refs/heads/main
| 2023-01-21T16:37:21.123789
| 2020-11-23T09:18:37
| 2020-11-23T09:18:37
| 315,213,969
| 0
| 0
| null | 2020-11-23T09:11:03
| 2020-11-23T05:53:01
|
Java
|
UTF-8
|
Java
| false
| false
| 4,557
|
java
|
package com.wildlife.fody.web.rest;
import com.wildlife.fody.domain.Egg;
import com.wildlife.fody.repository.EggRepository;
import com.wildlife.fody.web.rest.errors.BadRequestAlertException;
import io.github.jhipster.web.util.HeaderUtil;
import io.github.jhipster.web.util.ResponseUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.ResponseEntity;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.List;
import java.util.Optional;
/**
* REST controller for managing {@link com.wildlife.fody.domain.Egg}.
*/
@RestController
@RequestMapping("/api")
@Transactional
public class EggResource {
private final Logger log = LoggerFactory.getLogger(EggResource.class);
private static final String ENTITY_NAME = "egg";
@Value("${jhipster.clientApp.name}")
private String applicationName;
private final EggRepository eggRepository;
public EggResource(EggRepository eggRepository) {
this.eggRepository = eggRepository;
}
/**
* {@code POST /eggs} : Create a new egg.
*
* @param egg the egg to create.
* @return the {@link ResponseEntity} with status {@code 201 (Created)} and with body the new egg, or with status {@code 400 (Bad Request)} if the egg has already an ID.
* @throws URISyntaxException if the Location URI syntax is incorrect.
*/
@PostMapping("/eggs")
public ResponseEntity<Egg> createEgg(@RequestBody Egg egg) throws URISyntaxException {
log.debug("REST request to save Egg : {}", egg);
if (egg.getId() != null) {
throw new BadRequestAlertException("A new egg cannot already have an ID", ENTITY_NAME, "idexists");
}
Egg result = eggRepository.save(egg);
return ResponseEntity.created(new URI("/api/eggs/" + result.getId()))
.headers(HeaderUtil.createEntityCreationAlert(applicationName, true, ENTITY_NAME, result.getId().toString()))
.body(result);
}
/**
* {@code PUT /eggs} : Updates an existing egg.
*
* @param egg the egg to update.
* @return the {@link ResponseEntity} with status {@code 200 (OK)} and with body the updated egg,
* or with status {@code 400 (Bad Request)} if the egg is not valid,
* or with status {@code 500 (Internal Server Error)} if the egg couldn't be updated.
* @throws URISyntaxException if the Location URI syntax is incorrect.
*/
@PutMapping("/eggs")
public ResponseEntity<Egg> updateEgg(@RequestBody Egg egg) throws URISyntaxException {
log.debug("REST request to update Egg : {}", egg);
if (egg.getId() == null) {
throw new BadRequestAlertException("Invalid id", ENTITY_NAME, "idnull");
}
Egg result = eggRepository.save(egg);
return ResponseEntity.ok()
.headers(HeaderUtil.createEntityUpdateAlert(applicationName, true, ENTITY_NAME, egg.getId().toString()))
.body(result);
}
/**
* {@code GET /eggs} : get all the eggs.
*
* @return the {@link ResponseEntity} with status {@code 200 (OK)} and the list of eggs in body.
*/
@GetMapping("/eggs")
public List<Egg> getAllEggs() {
log.debug("REST request to get all Eggs");
return eggRepository.findAll();
}
/**
* {@code GET /eggs/:id} : get the "id" egg.
*
* @param id the id of the egg to retrieve.
* @return the {@link ResponseEntity} with status {@code 200 (OK)} and with body the egg, or with status {@code 404 (Not Found)}.
*/
@GetMapping("/eggs/{id}")
public ResponseEntity<Egg> getEgg(@PathVariable Long id) {
log.debug("REST request to get Egg : {}", id);
Optional<Egg> egg = eggRepository.findById(id);
return ResponseUtil.wrapOrNotFound(egg);
}
/**
* {@code DELETE /eggs/:id} : delete the "id" egg.
*
* @param id the id of the egg to delete.
* @return the {@link ResponseEntity} with status {@code 204 (NO_CONTENT)}.
*/
@DeleteMapping("/eggs/{id}")
public ResponseEntity<Void> deleteEgg(@PathVariable Long id) {
log.debug("REST request to delete Egg : {}", id);
eggRepository.deleteById(id);
return ResponseEntity.noContent().headers(HeaderUtil.createEntityDeletionAlert(applicationName, true, ENTITY_NAME, id.toString())).build();
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
c6f9cd91375b95f424f36b27062953f7c829cf41
|
31f043184e2839ad5c3acbaf46eb1a26408d4296
|
/src/main/java/com/github/highcharts4gwt/model/highcharts/option/mock/plotoptions/scatter/point/MockMouseOverEvent.java
|
1b65ba2e23f785e368af6686f5e5714fb864fef7
|
[] |
no_license
|
highcharts4gwt/highchart-wrapper
|
52ffa84f2f441aa85de52adb3503266aec66e0ac
|
0a4278ddfa829998deb750de0a5bd635050b4430
|
refs/heads/master
| 2021-01-17T20:25:22.231745
| 2015-06-30T15:05:01
| 2015-06-30T15:05:01
| 24,794,406
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 453
|
java
|
package com.github.highcharts4gwt.model.highcharts.option.mock.plotoptions.scatter.point;
import com.github.highcharts4gwt.model.highcharts.option.api.plotoptions.scatter.point.MouseOverEvent;
public class MockMouseOverEvent
implements MouseOverEvent
{
private com.github.highcharts4gwt.model.highcharts.object.api.Point Point;
public com.github.highcharts4gwt.model.highcharts.object.api.Point point() {
return Point;
}
}
|
[
"ronan.quillevere@gmail.com"
] |
ronan.quillevere@gmail.com
|
58662a52469007a72d14c9d64a65c369dac83c7f
|
f0ec508f4b480d8d5399a2880e4cbb0533fc2fc1
|
/com.gzedu.xlims.pojo/src/main/java/com/gzedu/xlims/pojo/GjtSchoolAddress.java
|
78fcf0c2c713005df226c8ba67b8c44de49ea28a
|
[] |
no_license
|
lizm335/MyLizm
|
a327bd4d08a33c79e9b6ef97144d63dae7114a52
|
1bcca82395b54d431fb26817e61a294f9d7dd867
|
refs/heads/master
| 2020-03-11T17:25:25.687426
| 2018-04-19T03:10:28
| 2018-04-19T03:10:28
| 130,146,458
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,158
|
java
|
package com.gzedu.xlims.pojo;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
/**
* The persistent class for the GJT_SCHOOL_ADDRESS database table. 院校收货地址表
*/
@Entity
@Table(name = "GJT_SCHOOL_ADDRESS")
@NamedQuery(name = "GjtSchoolAddress.findAll", query = "SELECT g FROM GjtSchoolAddress g")
public class GjtSchoolAddress implements Serializable {
private static final long serialVersionUID = 1L;
@Id
private String addressId;
private String xxId;
private Integer type; // 收货地址类型 1-毕业生登记表收货地址
private String mobile; // 收货人手机号
private String receiver;// 收货人名字
private String provinceCode;
private String cityCode;
private String areaCode;
private String address; // 收货人详细地址
private String postcode; // 邮政编码
@Column(insertable = false)
private String isDeleted;
@Temporal(TemporalType.TIMESTAMP)
@Column(insertable = false, updatable = false)
private Date createdDt;
@Column(updatable = false)
private String createdBy;
@Temporal(TemporalType.TIMESTAMP)
@Column(insertable = false)
private Date updatedDt;
@Column(insertable = false)
private String updatedBy;
public String getAddressId() {
return addressId;
}
public void setAddressId(String addressId) {
this.addressId = addressId;
}
public String getXxId() {
return xxId;
}
public void setXxId(String xxId) {
this.xxId = xxId;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public String getReceiver() {
return receiver;
}
public void setReceiver(String receiver) {
this.receiver = receiver;
}
public String getProvinceCode() {
return provinceCode;
}
public void setProvinceCode(String provinceCode) {
this.provinceCode = provinceCode;
}
public String getCityCode() {
return cityCode;
}
public void setCityCode(String cityCode) {
this.cityCode = cityCode;
}
public String getAreaCode() {
return areaCode;
}
public void setAreaCode(String areaCode) {
this.areaCode = areaCode;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getIsDeleted() {
return isDeleted;
}
public void setIsDeleted(String isDeleted) {
this.isDeleted = isDeleted;
}
public Date getCreatedDt() {
return createdDt;
}
public void setCreatedDt(Date createdDt) {
this.createdDt = createdDt;
}
public String getCreatedBy() {
return createdBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public Date getUpdatedDt() {
return updatedDt;
}
public void setUpdatedDt(Date updatedDt) {
this.updatedDt = updatedDt;
}
public String getUpdatedBy() {
return updatedBy;
}
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
public String getPostcode() {
return postcode;
}
public void setPostcode(String postcode) {
this.postcode = postcode;
}
}
|
[
"lizengming@eenet.com"
] |
lizengming@eenet.com
|
5de2374fc9180512c9da4989ba7783ab8b8a0ff0
|
5892854d1e20f4c4f7e70f35e34ee59b35b98bb4
|
/source/whois/src/main/java/com/cnnic/whois/bean/QueryJoinType.java
|
72c12ff7a23ef373301635be7a2f2230f09056cd
|
[] |
no_license
|
cnnic/restfulwhois
|
a591a343f4993a35fb8e0c7d00eeb0cd84d40556
|
abbb2d186a2b562262143fb3189202797f835636
|
refs/heads/master
| 2018-12-27T23:15:34.992877
| 2014-07-17T08:27:24
| 2014-07-17T08:27:24
| 11,140,222
| 0
| 1
| null | 2014-04-16T13:50:38
| 2013-07-03T02:37:35
|
Java
|
UTF-8
|
Java
| false
| false
| 1,173
|
java
|
package com.cnnic.whois.bean;
/**
* query join type when query join table
* @author nic
*
*/
public enum QueryJoinType {
ENTITIES("entities"), NAMESERVER("nameServers"), DSDATA("dsData"), EVENTS(
"events"), KEYDATA("keyData"), DELEGATIONKEYS("delegationKeys"), PUBLICIDS(
"publicIds"), LINKS("links"), NOTICES("notices"), PHONES("phones"), POSTALADDRESS(
"postalAddress"), REMARKS("remarks"), SECUREDNS("secureDNS"), VARIANTS(
"variants");
private String name;
/**
* get query join type by name
* @param name
* @return
*/
public static QueryJoinType getQueryJoinType(String name) {
QueryJoinType[] queryJoinTypes = QueryJoinType.values();
for (QueryJoinType joinType : queryJoinTypes) {
if (joinType.getName().equals(name)) {
return joinType;
}
}
return null;
}
/**
* construction
* @param name
*/
private QueryJoinType(String name) {
this.setName(name);
}
/**
* get type name
* @return type name
*/
public String getName() {
return name;
}
/**
* set type name
* @param name
*/
public void setName(String name) {
this.name = name;
}
}
|
[
"jiashuo@cnnic.cn"
] |
jiashuo@cnnic.cn
|
d5eced8190c0b37b7deb08d50e835ed4fa0f5a37
|
a0dc6d239311f16455f0ed738bb3b7d63bf90ccb
|
/jdbc/jdbc-study1/src/step1/TestJDBC1.java
|
49e9cffb7058c9fb6655ee6a7013746f5e09f172
|
[] |
no_license
|
8story8/java
|
e433ed74d251859baa30038b2ad8f57f424f9db5
|
2f59794f50cee6241fed182cedcf2a3d49c8d125
|
refs/heads/master
| 2021-04-03T09:22:28.516512
| 2018-07-09T08:21:47
| 2018-07-09T08:21:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,049
|
java
|
package step1;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
public class TestJDBC1
{
public static void main(String[] args)
{
try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
System.out.println("Oracle Driver Loading Complete");
Connection con = DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1:1521:xe", "scott", "tiger");
System.out.println("Oracle DB Connection Complete");
PreparedStatement pstmt = con.prepareStatement("select * from member order by id asc");
ResultSet rs = pstmt.executeQuery();
while(rs.next())
{
System.out.println(rs.getString(1) + " " + rs.getString(2) + " " + rs.getString(3) + " " + rs.getString(4));
}
rs.close();
pstmt.close();
con.close();
}
catch (ClassNotFoundException ce)
{
ce.printStackTrace();
}
catch (SQLException se)
{
se.printStackTrace();
}
}
}
|
[
"8story8@naver.com"
] |
8story8@naver.com
|
ad8de664d88eaab6dc238f9847b3aa4379ca2120
|
eac0b43bd7bf55f9c59c6867cc52706f5a8b9c1c
|
/eshop-v3/eshop-order/src/main/java/com/zhss/eshop/order/state/OrderStateManagerImpl.java
|
bff99d27be067a11dcded695713b73afcdf0b8ce
|
[] |
no_license
|
fengqing90/Learn
|
b017fa9d40cb0592ee63f77f620a8a8f39f046b9
|
396f48eddb5b78a4fdb880d46ea1f2b109b707e4
|
refs/heads/master
| 2022-11-22T01:44:05.803929
| 2021-08-04T03:57:26
| 2021-08-04T03:57:26
| 144,801,377
| 0
| 3
| null | 2022-11-16T06:59:58
| 2018-08-15T03:29:15
|
Java
|
UTF-8
|
Java
| false
| false
| 6,405
|
java
|
package com.zhss.eshop.order.state;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.zhss.eshop.order.constant.OrderStatus;
import com.zhss.eshop.order.domain.OrderInfoDTO;
/**
* 订单状态管理器
* @author zhonghuashishan
*
*/
@Component
public class OrderStateManagerImpl implements OrderStateManager {
/**
* 待付款状态
*/
@Autowired
private WaitForPayOrderState waitForPayOrderState;
/**
* 已取消状态
*/
@Autowired
private CanceledOrderState canceledOrderState;
/**
* 待发货状态
*/
@Autowired
private WaitForDeliveryOrderState waitForDeliveryOrderState;
/**
* 待收货状态
*/
@Autowired
private WaitForReceiveOrderState waitForReceiveOrderState;
/**
* 已完成状态
*/
@Autowired
private FinishedOrderState finishedOrderState;
/**
* 等待退货申请审核状态
*/
@Autowired
private WaitForReturnGoodsApproveOrderState waitForReturnGoodsApproveOrderState;
/**
* 退货申请被拒状态
*/
@Autowired
private ReturnGoodsRejectedOrderState returnGoodsRejectedOrderState;
/**
* 待寄送退货商品状态
*/
@Autowired
private WaitForSendOutReturnGoodsOrderState waitForSendOutReturnGoodsOrderState;
/**
* 退货商品待收货状态
*/
@Autowired
private WaitForReceiveReturnGoodsOrderState waitForReceiveReturnGoodsOrderState;
/**
* 退货商品待入库状态
*/
@Autowired
private WaitForInputReturnGoodsOrderState waitForInputReturnGoodsOrderState;
/**
* 完成退货入库状态
*/
@Autowired
private FinishedInputReturnGoodsOrderState finishedInputReturnGoodsOrderState;
/**
* 完成退款状态
*/
@Autowired
private FinishedRefundOrderState finishedRefundOrderState;
/**
* 默认状态
*/
@Autowired
private DefaultOrderState defaultOrderState;
/**
* 创建订单
* @param order 订单
* @throws Exception
*/
@Override
public void create(OrderInfoDTO order) throws Exception {
waitForPayOrderState.doTransition(order);
}
/**
* 订单能否执行取消操作
* @param order 订单
* @return 能否执行取消操作
* @throws Exception
*/
@Override
public Boolean canCancel(OrderInfoDTO order) throws Exception {
return getOrderState(order).canCancel(order);
}
/**
* 执行取消订单操作
* @param order 订单
* @throws Exception
*/
@Override
public void cancel(OrderInfoDTO order) throws Exception {
canceledOrderState.doTransition(order);
}
/**
* 判断订单能否进行支付操作
* @param order 订单
* @return 能否进行支付操作
* @throws Exception
*/
@Override
public Boolean canPay(OrderInfoDTO order) throws Exception {
return getOrderState(order).canPay(order);
}
/**
* 执行支付订单操作
* @param order 订单
* @throws Exception
*/
@Override
public void pay(OrderInfoDTO order) throws Exception {
waitForDeliveryOrderState.doTransition(order);
}
/**
* 完成商品发货
* @param order 订单
* @throws Exception
*/
@Override
public void finishDelivery(OrderInfoDTO order) throws Exception {
waitForReceiveOrderState.doTransition(order);
}
/**
* 判断能否执行确认收货的操作
* @param order 订单
* @return 能否执行手动确认收货的操作
* @throws Exception
*/
@Override
public Boolean canConfirmReceipt(OrderInfoDTO order) throws Exception {
return getOrderState(order).canConfirmReceipt(order);
}
/**
* 确认收货
* @param order 订单
* @throws Exception
*/
@Override
public void confirmReceipt(OrderInfoDTO order) throws Exception {
finishedOrderState.doTransition(order);
}
/**
* 判断能否申请退货
* @param order 订单
* @return 能否申请退货
* @throws Exception
*/
@Override
public Boolean canApplyReturnGoods(OrderInfoDTO order) throws Exception {
return getOrderState(order).canApplyReturnGoods(order);
}
/**
* 申请退货
* @param order 订单
* @throws Exception
*/
@Override
public void applyReturnGoods(OrderInfoDTO order) throws Exception {
waitForReturnGoodsApproveOrderState.doTransition(order);
}
/**
* 拒绝退货申请
* @param order 订单
* @throws Exception
*/
@Override
public void rejectReturnGoodsApply(OrderInfoDTO order) throws Exception {
returnGoodsRejectedOrderState.doTransition(order);
}
/**
* 退货申请审核通过
* @param order 订单
* @throws Exception
*/
@Override
public void passedReturnGoodsApply(OrderInfoDTO order) throws Exception {
waitForSendOutReturnGoodsOrderState.doTransition(order);
}
/**
* 寄送退货商品
* @param order 订单
* @throws Exception
*/
@Override
public void sendOutReturnGoods(OrderInfoDTO order) throws Exception {
waitForReceiveReturnGoodsOrderState.doTransition(order);
}
/**
* 确认收到退货商品
* @param order 订单
* @throws Exception
*/
@Override
public void confirmReceivedReturnGoods(OrderInfoDTO order) throws Exception {
waitForInputReturnGoodsOrderState.doTransition(order);
}
/**
* 完成退货入库
* @param order 订单
* @throws Exception
*/
@Override
public void finishedInputReturnGoods(OrderInfoDTO order) throws Exception {
finishedInputReturnGoodsOrderState.doTransition(order);
}
/**
* 完成退款
* @param order 订单
* @throws Exception
*/
@Override
public void finishedRefund(OrderInfoDTO order) throws Exception {
finishedRefundOrderState.doTransition(order);
}
/**
* 获取订单状态组件
* @param order 订单
* @return 订单状态组件
* @throws Exception
*/
private OrderState getOrderState(OrderInfoDTO order) throws Exception {
if(OrderStatus.WAIT_FOR_PAY.equals(order.getOrderStatus())) {
return waitForPayOrderState;
} else if(OrderStatus.CANCELED.equals(order.getOrderStatus())) {
return canceledOrderState;
} else if(OrderStatus.WAIT_FOR_DELIVERY.equals(order.getOrderStatus())) {
return waitForDeliveryOrderState;
} else if(OrderStatus.WAIT_FOR_RECEIVE.equals(order.getOrderStatus())) {
return waitForReceiveOrderState;
} else if(OrderStatus.FINISHED.equals(order.getOrderStatus())) {
return finishedOrderState;
} else if(OrderStatus.WAIT_FOR_RETURN_GOODS_APPROVE.equals(order.getOrderStatus())) {
return waitForReturnGoodsApproveOrderState;
}
return defaultOrderState;
}
}
|
[
"fengqing@youxin.com"
] |
fengqing@youxin.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.