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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ce2977d17eadcdbb2b214672c478f40be44b186b
|
832adcdeb34c5ba6ba7d9ac6f1be01619711579d
|
/src/day170724/MyMouseListener.java
|
50b1d8e1fa8a16620b3a7d7f4a9c9a995d5d5631
|
[] |
no_license
|
Duelist256/CoreJava
|
208d5281988350e3a178ddefbebdba21ed6473b9
|
1fb5461691a7ac47ebd97577a8d5dd22171adb74
|
refs/heads/master
| 2021-01-21T15:19:44.807973
| 2017-09-10T13:51:19
| 2017-09-10T13:51:19
| 95,383,213
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 628
|
java
|
package day170724;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
class MyMouseListener implements MouseListener {
@Override
public void mouseClicked(MouseEvent e) {
System.out.println(e);
}
@Override
public void mousePressed(MouseEvent e) {
System.out.println(e);
}
@Override
public void mouseReleased(MouseEvent e) {
System.out.println(e);
}
@Override
public void mouseEntered(MouseEvent e) {
System.out.println(e);
}
@Override
public void mouseExited(MouseEvent e) {
System.out.println(e);
}
}
|
[
"selykov.iw@yandex.ru"
] |
selykov.iw@yandex.ru
|
03d0db3feedc83652f70a1f2550ac2ede0f67735
|
1ec73a5c02e356b83a7b867580a02b0803316f0a
|
/java/bj/DesignPattern/JavaPattern/_23_门面模式/section2/ModenPostOffice.java
|
2bcc0650242382684831235c600172349364f53a
|
[] |
no_license
|
jxsd0084/JavaTrick
|
f2ee8ae77638b5b7654c3fcf9bceea0db4626a90
|
0bb835fdac3c2f6d1a29d1e6e479b553099ece35
|
refs/heads/master
| 2021-01-20T18:54:37.322832
| 2016-06-09T03:22:51
| 2016-06-09T03:22:51
| 60,308,161
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 610
|
java
|
package bj.DesignPattern.JavaPattern._23_门面模式.section2;
/**
* @author cbf4Life cbf4life@126.com
* I'm glad to share my knowledge with you all.
*/
public class ModenPostOffice {
private ILetterProcess letterProcess = new LetterProcessImpl();
// 写信,封装,投递,一体化了
public void sendLetter( String context, String address ) {
// 帮你写信
letterProcess.writeContext( context );
// 写好信封
letterProcess.fillEnvelope( address );
// 把信放到信封中
letterProcess.letterInotoEnvelope();
// 邮递信件
letterProcess.sendLetter();
}
}
|
[
"chenlong88882001@163.com"
] |
chenlong88882001@163.com
|
86e07a6344094cc956bb628dd329ac0ba05281f7
|
4468800dd72174adada7c612b4343b9be4898a6d
|
/java01/src/step08/Test07_7.java
|
9e75d2d01078abe3e054ba32b4394cce1e273d48
|
[] |
no_license
|
sharryhong/java93-hs
|
be793ea5d1e692c62939b001eba9d7a314f42be1
|
ec73dbe0669d26073ec0fd7e7db99548c466cee9
|
refs/heads/master
| 2021-01-23T04:34:06.551942
| 2017-06-23T09:13:33
| 2017-06-23T09:13:33
| 86,209,572
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,699
|
java
|
/* 컬렉션(Collection) 클래스 : java.util.HashSet
* => 저장하려는 객체에 대해 hashCode()를 호출하여, 그 리턴 값을 가지고 저장할 위치(인덱스)를 계산 */
package step08;
import java.sql.Date;
import java.util.HashSet;
import java.util.Iterator;
public class Test07_7 {
static class Book {
String title;
String press;
int page;
public Book(String title, String press, int page) {
this.title = title;
this.press = press;
this.page = page;
}
// 오버라이딩. 하지않으면 Object의 toString()사용으로 step08.Test07_5$Book@7852e922 이런 형식으로 class명..@hashcode로 나온다.
public String toString() {
return String.format("%s, %s, %d", title, press, page);
}
/* hashCode()뿐만 아니라 equals()도 오버라이딩 해야한다.
* hashCode만 같다고해서 같다고 판단하지 않는다. equals도
*/
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + page;
result = prime * result + ((press == null) ? 0 : press.hashCode());
result = prime * result + ((title == null) ? 0 : title.hashCode());
return result;
}
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Book other = (Book) obj;
if (page != other.page)
return false;
if (press == null) {
if (other.press != null)
return false;
} else if (!press.equals(other.press))
return false;
if (title == null) {
if (other.title != null)
return false;
} else if (!title.equals(other.title))
return false;
return true;
}
}
public static void main(String[] args) {
HashSet set = new HashSet();
set.add(new Book("aaa", "비트출판사", 100));
set.add(new Book("bbb", "비트출판사", 200));
set.add(new Book("ccc", "비트출판사", 300));
set.add(new Book("ddd", "비트출판사", 400));
set.add(new Book("eee", "비트출판사", 500));
set.add(new Book("fff", "비트출판사", 600));
set.add(new Book("fff", "비트출판사", 600));
Iterator iterator = set.iterator();
while (iterator.hasNext()) {
System.out.println(iterator.next());
}
System.out.println(new Book("fff", "비트출판사", 600).hashCode());
System.out.println(new Book("fff", "비트출판사", 600).hashCode());
System.out.println(new Book("fff", "비트출판사", 600).hashCode());
}
}
|
[
"kshopzoa15@gmail.com"
] |
kshopzoa15@gmail.com
|
4f15f5c64fbcc4c6706f090096f8ec0301a4d9f9
|
6aceceeff2e520abd97577d2af558f69b30b1322
|
/server3/src/main/java/com/tchl/server3/http/apitest/bean/GanHuoData.java
|
d22e9ae693a7ac4a5baa3baa51592d8f9a192e66
|
[] |
no_license
|
whtchl/mvp_template2
|
8058e63efdf21c34dea3ab729f9abfce847356e6
|
a72b32c58f80bee0adfc12ee79559e8eeccda224
|
refs/heads/master
| 2021-08-31T00:48:55.984541
| 2017-12-20T02:04:07
| 2017-12-20T02:04:07
| 114,724,470
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,054
|
java
|
package com.tchl.server3.http.apitest.bean;
import java.io.Serializable;
import java.util.List;
/**
* Created by happen on 2017/12/18.
*/
public class GanHuoData implements Serializable {
public abstract static class Image {
}
public abstract static class Text {
}
public abstract static class Meizhi {
}
public abstract static class DailyItem {
}
private String _id;
private String createdAt;
private String desc;
private String publishedAt;
private String source;
private String type;
private String url;
private boolean used;
private String who;
private List<String> images;
public String get_id() {
return _id;
}
public void set_id(String _id) {
this._id = _id;
}
public String getCreatedAt() {
return createdAt;
}
public void setCreatedAt(String createdAt) {
this.createdAt = createdAt;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
public String getPublishedAt() {
return publishedAt;
}
public void setPublishedAt(String publishedAt) {
this.publishedAt = publishedAt;
}
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public boolean isUsed() {
return used;
}
public void setUsed(boolean used) {
this.used = used;
}
public String getWho() {
return who;
}
public void setWho(String who) {
this.who = who;
}
public List<String> getImages() {
return images;
}
public void setImages(List<String> images) {
this.images = images;
}
}
|
[
"whtchl@126.com"
] |
whtchl@126.com
|
ab2a4391603a295c8899e1386edd17c89996686f
|
7f3a30d910f5073de7e8335b336b0f6cf002f03c
|
/PlusubLibExample/src/main/java/com/plusub/lib/example/activity/tab2/Tab2Fragment.java
|
9604408c7308e5ab62a933e1b6cc7eedb7f2d3c6
|
[
"Apache-2.0"
] |
permissive
|
haodynasty/BasePlusubLib
|
847e6d57c0c573e19d0a5431c59b61af8d745557
|
b05e479cdfed23b40b87fbd409a57b7352e1e47d
|
refs/heads/master
| 2016-09-14T10:33:46.270260
| 2016-04-20T12:03:52
| 2016-04-20T12:03:52
| 56,658,012
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,728
|
java
|
/*
* FileName: Tab1Fragment.java
* Copyright (C) 2014 Plusub Tech. Co. Ltd. All Rights Reserved <admin@plusub.com>
*
* Licensed under the Plusub License, Version 1.0 (the "License");
* 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.
*
* author : service@plusub.com
* date : 2014-12-12 下午4:56:53
* last modify author :
* version : 1.0
*/
package com.plusub.lib.example.activity.tab2;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.AbsListView;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;
import com.melnykov.fab.FloatingActionButton;
import com.melnykov.fab.ScrollDirectionListener;
import com.plusub.lib.activity.BaseFragment;
import com.plusub.lib.annotate.BindView;
import com.plusub.lib.constant.ErrorCode;
import com.plusub.lib.example.R;
import com.plusub.lib.example.activity.adapter.BookAdapter;
import com.plusub.lib.example.activity.tab1.BrowserActivity;
import com.plusub.lib.example.entity.BookEntity;
import com.plusub.lib.example.http.RequestTaskConstant;
import com.plusub.lib.example.service.RequestService;
import com.plusub.lib.example.view.HeaderLayout;
import com.plusub.lib.example.view.HeaderLayout.HeaderStyle;
import com.plusub.lib.net.util.RequestParams;
import com.plusub.lib.task.TaskEntity;
import com.plusub.lib.task.TaskMessage;
import com.plusub.lib.util.LogUtils;
import com.plusub.lib.view.ViewInjectUtils;
import java.util.List;
/**
* 测试使用BaseArrayListAdapter,重写BaseAdapter但是更方便
* 测试网络请求的使用方法
* @ClassName: Tab1Fragment
* @Description: TODO
* @author blakequ@gmail.com
* @date:
* <b>文件创建时间:</b>2014-12-12 下午4:56:53<br>
* <b>最后修改时间:</b>2014-12-12 下午4:56:53
* @version v1.0
*/
public class Tab2Fragment extends BaseFragment {
private BookAdapter adapter;
@BindView(id = R.id.common_listview)
private ListView mList;
@BindView(id = R.id.common_head_layout)
private HeaderLayout mHeader;
@BindView(id = R.id.fab)
private FloatingActionButton mFloatingButton;
@Override
public void refresh(TaskMessage msg, Object... param) {
// TODO Auto-generated method stub
ViewInjectUtils.dismissLoadingDialog();
if (msg.errorCode != ErrorCode.DEFAULT_VALUE) {
ViewInjectUtils.showCustomToast(getActivity(), "请求错误");
return;
}
switch (msg.what) {
case RequestTaskConstant.TASK_DOUBAN:
List<BookEntity> list = (List<BookEntity>) msg.obj;
if (list != null) {
adapter.refreshData(list);
}
break;
default:
break;
}
}
@Override
public void initData() {
// TODO Auto-generated method stub
getBookOfDouban("哈利波特", 10);
ViewInjectUtils.showLoadingDialog(getActivity(), "正在请求数据...");
}
@Override
public void initEvent() {
// TODO Auto-generated method stub
mList.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
// TODO Auto-generated method stub
BookEntity book = (BookEntity) adapter.getItem(position);
if (book != null) {
BrowserActivity.launch(getActivity(), book.getUrl());
}
}
});
}
@Override
protected View inflaterView(LayoutInflater inflater, ViewGroup container,
Bundle bundle) {
// TODO Auto-generated method stub
return inflater.inflate(R.layout.fragment_tab_2, null);
}
@Override
protected void initView(View parentView) {
// TODO Auto-generated method stub
adapter = new BookAdapter(getApplicationContext());
mHeader.init(HeaderStyle.TITLE_MIDDLE_TEXT);
mHeader.setMiddleTitle("网络数据请求");
mList.setAdapter(adapter);
mFloatingButton.attachToListView(mList, new ScrollDirectionListener() {
@Override
public void onScrollDown() {
LogUtils.d("ListViewFragment", "onScrollDown()");
}
@Override
public void onScrollUp() {
LogUtils.d("ListViewFragment", "onScrollUp()");
}
}, new AbsListView.OnScrollListener() {
@Override
public void onScrollStateChanged(AbsListView view, int scrollState) {
LogUtils.d("ListViewFragment", "onScrollStateChanged()");
}
@Override
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
LogUtils.d("ListViewFragment", "onScroll()");
}
});
mFloatingButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
System.out.println("----");
getBookOfDouban("哈利波特", 10);
}
});
}
/**
* 发送服务器请求
* <p>Title: getBookOfDouban
* <p>Description:
* @param queryString
* @param count
*/
private void getBookOfDouban(String queryString, int count){
//请求参数
RequestParams params = new RequestParams();
params.put("q", queryString);
params.put("count", count+"");
//请求实体
TaskEntity task = new TaskEntity(this);
task.setTaskID(RequestTaskConstant.TASK_DOUBAN);
task.setTaskObj(params);
//将请求添加到请求任务列表
RequestService.addNewTask(task);
}
}
|
[
"blakequ@gmail.com"
] |
blakequ@gmail.com
|
757507629ef62ad1de98ea495b4726ab01e6c8dd
|
1eaaf8cabfc2fd7f7f562cc6d9ca168bb80e6b54
|
/app/src/main/java/com/hippo/drawable/TextDrawable.java
|
4aefc9f126e6552662a71f3686e4b82423c49070
|
[
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer",
"MIT",
"OFL-1.1",
"LicenseRef-scancode-unknown-license-reference",
"IJG",
"Zlib",
"EPL-1.0",
"Libpng",
"BSD-3-Clause"
] |
permissive
|
onlymash/EhViewer
|
9036365b0fb94251817cfde15f7b9a5c24154e20
|
49c51d001f7c048ae52e75854624fee4c6ac8063
|
refs/heads/master
| 2021-09-16T05:59:35.384177
| 2018-05-14T14:16:26
| 2018-05-14T14:16:26
| 121,543,695
| 18
| 1
|
Apache-2.0
| 2018-03-27T11:05:13
| 2018-02-14T18:07:09
|
Java
|
UTF-8
|
Java
| false
| false
| 4,022
|
java
|
/*
* Copyright 2017 Hippo Seven
*
* 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.hippo.drawable;
/*
* Created by Hippo on 2017/9/6.
*/
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.ColorFilter;
import android.graphics.Paint;
import android.graphics.PixelFormat;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.support.annotation.IntRange;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.text.TextUtils;
public class TextDrawable extends Drawable {
private static final float STANDARD_TEXT_SIZE = 1000.0f;
private static final Paint STANDARD_PAINT = new Paint();
static {
STANDARD_PAINT.setTextSize(STANDARD_TEXT_SIZE);
}
private String text;
private float contentPercent;
private Paint backgroundPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
private Paint textPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
private int textColor = Color.BLACK;
private int backgroundColor = Color.BLACK;
private float x = 0.0f;
private float y = 0.0f;
private boolean textSizeDirty = false;
private Rect textBounds = new Rect();
public TextDrawable(String text, float contentPercent) {
this.text = text;
this.contentPercent = contentPercent;
STANDARD_PAINT.getTextBounds(text, 0, text.length(), textBounds);
}
public int getTextColor() {
return textColor;
}
public void setTextColor(int textColor) {
if (this.textColor != textColor) {
this.textColor = textColor;
invalidateSelf();
}
}
public int getBackgroundColor() {
return backgroundColor;
}
public void setBackgroundColor(int backgroundColor) {
if (this.backgroundColor != backgroundColor) {
this.backgroundColor = backgroundColor;
invalidateSelf();
}
}
@Override
protected void onBoundsChange(Rect bounds) {
super.onBoundsChange(bounds);
textSizeDirty = true;
}
private void updateTextSizeIfDirty(Rect bounds) {
if (!textSizeDirty) {
return;
}
textSizeDirty = false;
int contentWidth = (int) (bounds.width() * contentPercent);
int contentHeight = (int) (bounds.height() * contentPercent);
float widthRatio = (float) contentWidth / (float) textBounds.width();
float heightRatio = (float) contentHeight / (float) textBounds.height();
float ratio = Math.min(widthRatio, heightRatio);
float textSize = STANDARD_TEXT_SIZE * ratio;
textPaint.setTextSize(textSize);
x = (bounds.width() - textBounds.width() * ratio) / 2 - textBounds.left * ratio;
y = (bounds.height() - textBounds.height() * ratio) / 2 - textBounds.top * ratio;
}
@Override
public void draw(@NonNull Canvas canvas) {
Rect bounds = getBounds();
if (!bounds.isEmpty()) {
// Draw background
backgroundPaint.setColor(backgroundColor);
canvas.drawRect(bounds, backgroundPaint);
if (!TextUtils.isEmpty(text)) {
// Draw text
updateTextSizeIfDirty(bounds);
textPaint.setColor(textColor);
canvas.drawText(text, x, y, textPaint);
}
}
}
@Override
public void setAlpha(@IntRange(from = 0, to = 255) int alpha) {}
@Override
public void setColorFilter(@Nullable ColorFilter colorFilter) {
backgroundPaint.setColorFilter(colorFilter);
textPaint.setColorFilter(colorFilter);
invalidateSelf();
}
@Override
public int getOpacity() {
return PixelFormat.TRANSLUCENT;
}
}
|
[
"seven332@163.com"
] |
seven332@163.com
|
8b282c905d84c94b477e8d381306003aaab18d63
|
099300976dbb68a9164b2f0ed682f0cc65673601
|
/snap-tree/src/main/java/org/snapscript/tree/variable/ObjectPointer.java
|
392c78b6679b67ca527dc4c86248f8c0a3e9f51e
|
[] |
no_license
|
flynny75/snap
|
58e831db5318dbeeb4bd221663e096d879fb3979
|
c05792886c3efcc9979c04bb77192efa96678285
|
refs/heads/master
| 2021-07-05T20:20:59.601713
| 2017-09-29T22:42:42
| 2017-09-29T22:42:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,531
|
java
|
package org.snapscript.tree.variable;
import java.util.List;
import java.util.Set;
import java.util.concurrent.atomic.AtomicReference;
import org.snapscript.core.Context;
import org.snapscript.core.Module;
import org.snapscript.core.Scope;
import org.snapscript.core.Type;
import org.snapscript.core.TypeExtractor;
import org.snapscript.core.Value;
import org.snapscript.core.property.ConstantPropertyBuilder;
import org.snapscript.core.property.Property;
import org.snapscript.core.property.PropertyValue;
public class ObjectPointer implements VariablePointer<Object> {
private final AtomicReference<Property> reference;
private final ConstantPropertyBuilder builder;
private final ConstantResolver resolver;
private final String name;
public ObjectPointer(ConstantResolver resolver, String name) {
this.reference = new AtomicReference<Property>();
this.builder = new ConstantPropertyBuilder();
this.resolver = resolver;
this.name = name;
}
@Override
public Value get(Scope scope, Object left) {
Property accessor = reference.get();
if(accessor == null) {
Property match = match(scope, left);
if(match != null) {
reference.set(match);
return new PropertyValue(match, left, name);
}
return null;
}
return new PropertyValue(accessor, left, name);
}
public Property match(Scope scope, Object left) {
Class type = left.getClass();
Module module = scope.getModule();
Type source = module.getType(type);
if(source != null) {
Context context = module.getContext();
TypeExtractor extractor = context.getExtractor();
Set<Type> list = extractor.getTypes(source);
for(Type base : list) {
Property match = match(scope, left, base);
if(match != null) {
return match;
}
}
}
return null;
}
public Property match(Scope scope, Object left, Type type) {
List<Property> properties = type.getProperties();
for(Property property : properties){
String field = property.getName();
if(field.equals(name)) {
return property;
}
}
Scope outer = type.getScope();
Object value = resolver.resolve(outer, name);
if(value != null) {
return builder.createConstant(name, value);
}
return null;
}
}
|
[
"gallagher_niall@yahoo.com"
] |
gallagher_niall@yahoo.com
|
29d575ee5ab5f6bbda1baad557d878b59225737b
|
6761422890ba1e0a6c0db98f5f7c7d39feaca427
|
/camera/src/main/java/danke/utils/BitmapUtil.java
|
d98316a53ff60380a28171789ba926807ac72e06
|
[] |
no_license
|
yecjl/Danke_MyDemo
|
1da01ddb7ac9569f81f61a17ae0099df0b610fb9
|
e255eed745ff162cbce91bda4ddc7b9f68972d67
|
refs/heads/master
| 2021-01-12T11:07:51.901128
| 2017-05-15T05:49:56
| 2017-05-15T05:49:56
| 72,839,041
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,738
|
java
|
package danke.utils;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Matrix;
import android.widget.ImageView;
/**
* 功能:图片工具类
* Created by danke on 2017/2/7.
*/
public class BitmapUtil {
/**
* 从文件中加载bitmap
*
* @param url
* @param matrix 对图像的操作
* @return
*/
public static Bitmap decodeFile(String url, Matrix matrix) {
// 从文件中加载图片
Bitmap bitmap = BitmapFactory.decodeFile(url);
if (matrix != null) {
// 根据 matrix 对图片进行操作
Bitmap newBitmap = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true);
// 释放之前的图片资源
bitmap.recycle();
return newBitmap;
} else {
return bitmap;
}
}
/**
* 从文件中加载bitmap
*
* @param url
* @return
*/
public static Bitmap decodeFile(String url) {
return decodeFile(url, null);
}
/**
* 从像素点中加载bitmap
* @param width
* @param height
* @param pixels
* @return
*/
public static Bitmap decodePixels(int width, int height, int[] pixels) {
Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.RGB_565);
bitmap.setPixels(pixels, 0, width, 0, 0, width, height);
return bitmap;
}
/**
* 根据bitmap 获取像素集合
*
* @param bitmap
* @return
*/
public static int[] getPixels(Bitmap bitmap) {
int width = bitmap.getWidth();
int height = bitmap.getHeight();
int[] pixels = new int[width * height];
bitmap.getPixels(pixels, 0, width, 0, 0, width, height);
return pixels;
}
/**
* 将文件中加载的bitmap,显示到ImageView
* @param url
* @param matrix
* @param imageView
*/
public static void decodeFileShow(String url, Matrix matrix, ImageView imageView) {
Bitmap bitmap = decodeFile(url, matrix);
show(bitmap, imageView);
}
/**
* 将文件中加载的bitmap,显示到ImageView
* @param url
* @param imageView
*/
public static void decodeFileShow(String url, ImageView imageView) {
Bitmap bitmap = decodeFile(url);
show(bitmap, imageView);
}
/**
* 将bitmap显示到ImageView
* @param bitmap
* @param imageView
*/
public static void show(Bitmap bitmap, ImageView imageView) {
if (bitmap != null && imageView != null) {
imageView.setImageBitmap(bitmap);
}
}
// FIXME (zxing) 如果没有使用到二维码识别 请去掉这里的内容 begin-------------------------------------------
// /**
// * 解析BitMatrix到Bitmap中 二维码使用(zxing)
// *
// * @param matrix
// * @return
// */
// public static Bitmap bitMatrix2Bitmap(BitMatrix matrix) {
// int w = matrix.getWidth();
// int h = matrix.getHeight();
// int[] rawData = new int[w * h];
// for (int i = 0; i < w; i++) {
// for (int j = 0; j < h; j++) {
// int color = Color.WHITE;
// if (matrix.get(i, j)) {
// color = Color.BLACK; // 自定义其他颜色会导致解析不出来
// }
// rawData[i + (j * w)] = color;
// }
// }
//
// return decodePixels(w, h, rawData);
// }
//
// /**
// * 根据bitmap 解析二维码(zxing)
// * @param bitmap
// * @return
// */
// public static Result scanningImage(Bitmap bitmap) {
// int width = bitmap.getWidth();
// int height = bitmap.getHeight();
// RGBLuminanceSource source = new RGBLuminanceSource(width, height, getPixels(bitmap));
// BinaryBitmap binaryBitmap = new BinaryBitmap(new HybridBinarizer(source));
// Map<DecodeHintType, String> hints = new HashMap<>();
// hints.put(DecodeHintType.CHARACTER_SET, "utf-8");
// Result result = null;
// try {
// result = new MultiFormatReader().decode(binaryBitmap, hints);
// } catch (NotFoundException e) {
// e.printStackTrace();
// }
//
// return result;
// }
//
// /**
// * 根据图片路径 解析二维码(zxing)
// * @param path
// * @return
// */
// public static Result scanningImage(String path) {
// return scanningImage(BitmapUtil.decodeFile(path));
// }
// FIXME (zxing) 如果没有使用到二维码识别 请去掉这里的内容 end-------------------------------------------
}
|
[
"danke@example.com"
] |
danke@example.com
|
ae3471dbae17e774171b400baa5a8d07dd5fc5de
|
38a6baa05cd79d7971f89c8efd9a9869fcdc6325
|
/src/main/java/world/World.java
|
fedc791a3c1f89623789a795098ed13001b7bf46
|
[] |
no_license
|
kangnwh/CarGame-PartC
|
a6c1bd52d865fa95eb76a1f182cdc6187857af83
|
9bab98aa7685ffa749f1f6b780d4314dc517cef1
|
refs/heads/master
| 2020-03-18T23:10:21.842499
| 2018-05-30T04:25:08
| 2018-05-30T04:25:08
| 135,386,752
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,250
|
java
|
package world;
import java.util.HashMap;
import java.util.List;
import java.util.ArrayList;
import java.util.Collections;
import java.lang.reflect.Constructor;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.maps.tiled.TiledMap;
import com.badlogic.gdx.maps.tiled.TiledMapTileLayer;
import com.badlogic.gdx.maps.tiled.TiledMapTileLayer.Cell;
import controller.CarController;
import tiles.MapTile;
import tiles.TrapTile;
import tiles.LavaTrap;
import utilities.Coordinate;
/**
* This class provides functionality for use within the simulation system. It is NOT intended to be
* read or understood for SWEN30006 Part C. The lack of comments is intended to reinforce this.
* We take no responsibility if you use time unproductively trying to understand this code.
*/
public class World {
private Car car;
// Car's controller
private static CarController controller;
private static TiledMap map;
public static int MAP_PIXEL_SIZE = 32;
public static int MAP_HEIGHT;
public static int MAP_WIDTH;
private static String[] LAYER_NAME = {"Road","Utility","Trap","Wall"};
private static HashMap<Coordinate,MapTile> mapTiles = new HashMap<Coordinate,MapTile>();
private static HashMap<Coordinate,MapTile> providedMapTiles = new HashMap<Coordinate,MapTile>();
private static Coordinate start, carStart;
private static List<Coordinate> finish = new ArrayList<Coordinate>();
public World(TiledMap map, String controllerName){
World.map = map;
TiledMapTileLayer roadLayer = (TiledMapTileLayer) getTiledMap().getLayers().get("Road");
MAP_HEIGHT = roadLayer.getHeight();
MAP_WIDTH = roadLayer.getWidth();
int key = initializeMap(map);
car = new Car(new Sprite(new Texture("sprites/car2.png")));
car.setKey(key); // Set the car key to the key that will unlock the key with the highest number
// Set car size relative to the map scaling.
car.setSize(car.getWidth()*(1f/MAP_PIXEL_SIZE), car.getHeight()*(1f/MAP_PIXEL_SIZE));
car.setOriginCenter();
// Add the car controller
try {
Class<?> clazz = Class.forName(controllerName);
Class [] params = new Class[] { Car.class };
Constructor<?> constructor = clazz.getConstructor(params);
controller = (CarController) constructor.newInstance(car);
} catch (Exception e) {
e.printStackTrace();
System.exit(1);
}
}
private int initializeMap(TiledMap map2) { // Returns max(key in map) + 1
// Need to check that the keys are a sequence
ArrayList<Integer> keys = new ArrayList<Integer>();
// Iterate through all layer names
for(String layerName : LAYER_NAME){
// Set the layer
TiledMapTileLayer layer = (TiledMapTileLayer) getTiledMap().getLayers().get(layerName);
// Iterate through the layers and input them into the hashtable
// System.out.println(layerName+" width: "+layer.getWidth()+" height: "+layer.getHeight());
for(int x = 0; x < layer.getWidth(); x++){
for(int y = 0; y < layer.getHeight(); y++){
Cell cell = layer.getCell(x, y);
if(cell != null){
MapTile newTile = null; // Only stays null if exception/exit
int reverseYAxis = layer.getHeight()-y;
Coordinate newCoord = new Coordinate(x, reverseYAxis);
// System.out.println(layerName+" - Coord: "+newCoord+" ID: "+cell.getTile().getId());
switch(layerName) {
case "Trap":
// assert(cell.getTile().getProperties().get("type") != null);
String className = MapTile.tileNameSpace + (String) cell.getTile().getProperties().get("type");
try {
newTile = (TrapTile) Class.forName( className ).newInstance();
if (((TrapTile) newTile).getTrap() == "lava") {
int key = cell.getTile().getProperties().get("key", 0, Integer.class);
((LavaTrap) newTile).setKey(key);
if (key != 0) keys.add(key);
}
} catch (Exception e) {
e.printStackTrace();
System.exit(1);
}
break;
case "Utility":
if(cell.getTile().getProperties().get("exit") != null){
newTile = new MapTile(MapTile.Type.FINISH);
finish.add(newCoord);
} else {
newTile = new MapTile(MapTile.Type.START);
assert(null == start);
carStart = new Coordinate(x, y);
start = newCoord;
// System.out.println("World Start - Coord: "+World.getStart());
}
break;
case "Road":
newTile = new MapTile(MapTile.Type.ROAD);
break;
case "Wall":
newTile = new MapTile(MapTile.Type.WALL);
break;
}
mapTiles.put(newCoord, newTile);
}
}
}
}
// Check that keys are a sequence
Collections.sort(keys);
for (int i = 0; i < keys.size(); i++) assert(keys.get(i) == i+1);
assert(null != start);
assert(finish.size() > 0);
return keys.size()+1; // the key that will unlock the key with the highest number
}
public void update(float delta){
controller.update(delta);
// Update the car
car.update(delta);
}
public void render(Batch batch){
car.draw(batch);
}
protected static Coordinate getCarStart() {
return carStart;
}
protected static Coordinate getStart() {
return start;
}
protected static List<Coordinate> getFinish() {
return finish;
}
protected static TiledMap getTiledMap(){
return map;
}
protected static MapTile lookUp(double futureX, double futureY){
int x = (int) Math.round(futureX);
int y = MAP_HEIGHT - (int) Math.round(futureY); // Convert Y coordinate
Coordinate coord = new Coordinate(x,y);
return mapTiles.containsKey(coord) ? mapTiles.get(coord) : new MapTile(MapTile.Type.EMPTY);
}
public Car getCar(){
return this.car;
}
public static HashMap<Coordinate,MapTile> getMap(){
if(providedMapTiles.keySet().size() == 0){ // Lazy initialisation
for(Coordinate coord : mapTiles.keySet()){
int reverseYAxis = MAP_HEIGHT-coord.y;
Coordinate newCoord = new Coordinate(coord.x, reverseYAxis);
MapTile current = mapTiles.get(coord);
if (current.isType(MapTile.Type.TRAP)) current = new MapTile(MapTile.Type.ROAD);
providedMapTiles.put(newCoord, current);
}
}
return providedMapTiles;
}
}
|
[
"396426364@qq.com"
] |
396426364@qq.com
|
d78d3796f95d590b24a5d33cd8843f22787a8c20
|
6ee92ecc85ba29f13769329bc5a90acea6ef594f
|
/bizcore/WEB-INF/retailscm_core_src/com/doublechaintech/retailscm/view/ViewVersionChangedException.java
|
d92e557cb7429dfb5c53acc0db2ea2862c7ad0b1
|
[] |
no_license
|
doublechaintech/scm-biz-suite
|
b82628bdf182630bca20ce50277c41f4a60e7a08
|
52db94d58b9bd52230a948e4692525ac78b047c7
|
refs/heads/master
| 2023-08-16T12:16:26.133012
| 2023-05-26T03:20:08
| 2023-05-26T03:20:08
| 162,171,043
| 1,387
| 500
| null | 2023-07-08T00:08:42
| 2018-12-17T18:07:12
|
Java
|
UTF-8
|
Java
| false
| false
| 311
|
java
|
package com.doublechaintech.retailscm.view;
import com.doublechaintech.retailscm.EntityNotFoundException;
public class ViewVersionChangedException extends ViewManagerException {
private static final long serialVersionUID = 1L;
public ViewVersionChangedException(String string) {
super(string);
}
}
|
[
"zhangxilai@doublechaintech.com"
] |
zhangxilai@doublechaintech.com
|
49622836834622a5580d36d55bb794deb12570ff
|
dfdcabb891e69aaefe6aeab2304b9f4741b4a5af
|
/reactive-jhipster/gateway/src/main/java/com/okta/developer/gateway/web/rest/errors/BadRequestAlertException.java
|
3f5ef872738c242f5e0d91c0d4da18445b04ce04
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] |
permissive
|
StefanScherer/java-microservices-examples
|
23a0b9aaca5ece13ca46f24bcdbb0341bf715c79
|
64df95742c71d55f297b32faa3c3789edb3aba35
|
refs/heads/main
| 2023-04-20T01:33:13.537920
| 2021-04-29T15:15:41
| 2021-04-29T15:15:41
| 365,267,825
| 1
| 1
|
Apache-2.0
| 2021-05-07T14:56:06
| 2021-05-07T14:56:05
| null |
UTF-8
|
Java
| false
| false
| 1,328
|
java
|
package com.okta.developer.gateway.web.rest.errors;
import java.net.URI;
import java.util.HashMap;
import java.util.Map;
import org.zalando.problem.AbstractThrowableProblem;
import org.zalando.problem.Status;
public class BadRequestAlertException extends AbstractThrowableProblem {
private static final long serialVersionUID = 1L;
private final String entityName;
private final String errorKey;
public BadRequestAlertException(String defaultMessage, String entityName, String errorKey) {
this(ErrorConstants.DEFAULT_TYPE, defaultMessage, entityName, errorKey);
}
public BadRequestAlertException(URI type, String defaultMessage, String entityName, String errorKey) {
super(type, defaultMessage, Status.BAD_REQUEST, null, null, null, getAlertParameters(entityName, errorKey));
this.entityName = entityName;
this.errorKey = errorKey;
}
public String getEntityName() {
return entityName;
}
public String getErrorKey() {
return errorKey;
}
private static Map<String, Object> getAlertParameters(String entityName, String errorKey) {
Map<String, Object> parameters = new HashMap<>();
parameters.put("message", "error." + errorKey);
parameters.put("params", entityName);
return parameters;
}
}
|
[
"matt.raible@okta.com"
] |
matt.raible@okta.com
|
9c09f442ff14da5f3fc8cac336d522edcde9f82c
|
24d8cf871b092b2d60fc85d5320e1bc761a7cbe2
|
/PMD/rev5929-6425/right-trunk-6425/src/net/sourceforge/pmd/lang/java/rule/basic/BrokenNullCheckRule.java
|
cee32eb60495980d1623d63ee8bc01e03e9fac4a
|
[] |
no_license
|
joliebig/featurehouse_fstmerge_examples
|
af1b963537839d13e834f829cf51f8ad5e6ffe76
|
1a99c1788f0eb9f1e5d8c2ced3892d00cd9449ad
|
refs/heads/master
| 2016-09-05T10:24:50.974902
| 2013-03-28T16:28:47
| 2013-03-28T16:28:47
| 9,080,611
| 3
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,811
|
java
|
package net.sourceforge.pmd.lang.java.rule.basic;
import java.util.ArrayList;
import java.util.List;
import net.sourceforge.pmd.lang.ast.Node;
import net.sourceforge.pmd.lang.java.ast.ASTAssignmentOperator;
import net.sourceforge.pmd.lang.java.ast.ASTClassOrInterfaceType;
import net.sourceforge.pmd.lang.java.ast.ASTConditionalAndExpression;
import net.sourceforge.pmd.lang.java.ast.ASTConditionalOrExpression;
import net.sourceforge.pmd.lang.java.ast.ASTEqualityExpression;
import net.sourceforge.pmd.lang.java.ast.ASTExpression;
import net.sourceforge.pmd.lang.java.ast.ASTIfStatement;
import net.sourceforge.pmd.lang.java.ast.ASTLiteral;
import net.sourceforge.pmd.lang.java.ast.ASTName;
import net.sourceforge.pmd.lang.java.ast.ASTNullLiteral;
import net.sourceforge.pmd.lang.java.ast.ASTPrimaryExpression;
import net.sourceforge.pmd.lang.java.ast.ASTPrimaryPrefix;
import net.sourceforge.pmd.lang.java.ast.ASTPrimarySuffix;
import net.sourceforge.pmd.lang.java.rule.AbstractJavaRule;
public class BrokenNullCheckRule extends AbstractJavaRule {
@Override
public Object visit(ASTIfStatement node, Object data) {
ASTExpression expression = (ASTExpression)node.jjtGetChild(0);
ASTConditionalAndExpression conditionalAndExpression = expression.getFirstDescendantOfType(ASTConditionalAndExpression.class);
if (conditionalAndExpression != null) {
checkForViolations(node, data, conditionalAndExpression);
}
ASTConditionalOrExpression conditionalOrExpression = expression.getFirstDescendantOfType(ASTConditionalOrExpression.class);
if (conditionalOrExpression != null) {
checkForViolations(node, data, conditionalOrExpression);
}
return super.visit(node, data);
}
private void checkForViolations(ASTIfStatement node, Object data, Node conditionalExpression) {
ASTEqualityExpression equalityExpression = conditionalExpression.getFirstChildOfType(ASTEqualityExpression.class);
if (equalityExpression == null) {
return;
}
if (conditionalExpression instanceof ASTConditionalAndExpression &&
!"==".equals(equalityExpression.getImage())) {
return;
}
if (conditionalExpression instanceof ASTConditionalOrExpression &&
!"!=".equals(equalityExpression.getImage())) {
return;
}
ASTNullLiteral nullLiteral = equalityExpression.getFirstDescendantOfType(ASTNullLiteral.class);
if (nullLiteral == null) {
return;
}
if (conditionalExpression.hasDescendantOfType(ASTAssignmentOperator.class)) {
return;
}
ASTPrimaryExpression nullCompareExpression = findNullCompareExpression(equalityExpression);
if (nullCompareExpression == null) {
return;
}
for (int i = 0; i < conditionalExpression.jjtGetNumChildren(); i++) {
Node conditionalSubnode = conditionalExpression.jjtGetChild(i);
ASTEqualityExpression nullEqualityExpression = nullLiteral.getFirstParentOfType(ASTEqualityExpression.class);
if (conditionalSubnode.equals(nullEqualityExpression)) {
continue;
}
ASTPrimaryExpression conditionalPrimaryExpression;
if (conditionalSubnode instanceof ASTPrimaryExpression) {
conditionalPrimaryExpression = (ASTPrimaryExpression)conditionalSubnode;
} else {
conditionalPrimaryExpression = conditionalSubnode
.getFirstDescendantOfType(ASTPrimaryExpression.class);
}
if (primaryExpressionsAreEqual(nullCompareExpression, conditionalPrimaryExpression)) {
addViolation(data, node);
}
}
}
private boolean primaryExpressionsAreEqual(ASTPrimaryExpression nullCompareVariable, ASTPrimaryExpression expressionUsage) {
List<String> nullCompareNames = new ArrayList<String>();
findExpressionNames(nullCompareVariable, nullCompareNames);
List<String> expressionUsageNames = new ArrayList<String>();
findExpressionNames(expressionUsage, expressionUsageNames);
for (int i = 0; i < nullCompareNames.size(); i++) {
if (expressionUsageNames.size() == i) {
return false;
}
String nullCompareExpressionName = nullCompareNames.get(i);
String expressionUsageName = expressionUsageNames.get(i);
if (!nullCompareExpressionName.equals(expressionUsageName) &&
!expressionUsageName.startsWith(nullCompareExpressionName + ".")) {
return false;
}
}
return true;
}
private void findExpressionNames(Node nullCompareVariable, List<String> results) {
for (int i = 0; i < nullCompareVariable.jjtGetNumChildren(); i++) {
Node child = nullCompareVariable.jjtGetChild(i);
if (child.getClass().equals(ASTName.class)) {
results.add( ((ASTName)child).getImage() );
} else if (child.getClass().equals(ASTLiteral.class)) {
String literalImage = ((ASTLiteral)child).getImage();
if (literalImage != null) {
results.add( literalImage );
}
} else if (child.getClass().equals(ASTPrimarySuffix.class)) {
String name = ((ASTPrimarySuffix)child).getImage();
if (name != null && !name.equals("")) {
results.add(name);
}
} else if (child.getClass().equals(ASTClassOrInterfaceType.class)) {
String name = ((ASTClassOrInterfaceType)child).getImage();
results.add(name);
}
if (child.jjtGetNumChildren() > 0) {
findExpressionNames(child, results);
}
}
}
private ASTPrimaryExpression findNullCompareExpression(ASTEqualityExpression equalityExpression) {
List<ASTPrimaryExpression> primaryExpressions = equalityExpression.findDescendantsOfType(ASTPrimaryExpression.class);
for (ASTPrimaryExpression primaryExpression: primaryExpressions) {
List<ASTPrimaryPrefix> primaryPrefixes = primaryExpression.findDescendantsOfType(ASTPrimaryPrefix.class);
for (ASTPrimaryPrefix primaryPrefix: primaryPrefixes) {
if (primaryPrefix.hasDescendantOfType(ASTName.class)) {
return primaryExpression;
}
}
}
return null;
}
}
|
[
"joliebig@fim.uni-passau.de"
] |
joliebig@fim.uni-passau.de
|
34a1d771c1b5191eec2c1f1d2ac2cfa67fd74b26
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/17/17_4a6f462343e6e3133509e0a26e2787c2fbb53f3a/EntityBase/17_4a6f462343e6e3133509e0a26e2787c2fbb53f3a_EntityBase_s.java
|
c1c55690b7dd13e77156c95faef03f7db94daa7d
|
[] |
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
| 1,968
|
java
|
package com.book.identification.model;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import javax.persistence.Transient;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlID;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
<<<<<<< HEAD
=======
import org.codehaus.jackson.annotate.JsonIgnore;
import org.codehaus.jackson.annotate.JsonProperty;
>>>>>>> ca8384b2302b765f848963af6d96aa3c02ef1b26
import org.hibernate.search.annotations.DocumentId;
@MappedSuperclass
@XmlRootElement
public abstract class EntityBase {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@DocumentId
private Long entityId;
@XmlTransient
public Long getEntityId() {
return entityId;
}
public void setEntityId(Long id) {
this.entityId = id;
}
@Transient
@XmlID
@XmlElement(name = "id")
public String getEntityXmlId() {
return Long.toString(entityId);
}
public void setEntityXmlId(final String entityXmlId) {
entityId = Long.parseLong(entityXmlId);
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result
+ ((entityId == null) ? 0 : entityId.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;
EntityBase other = (EntityBase) obj;
if (entityId == null) {
if (other.entityId != null)
return false;
} else if (!entityId.equals(other.entityId))
return false;
return true;
}
@Override
public String toString() {
return "EntityBase [entityId=" + entityId + "]";
}
@Transient
@XmlTransient
public boolean isPersisted() {
return getEntityId() != null;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
34e4f596033f0ad1d56872f40a8ee4bc88882df3
|
55565da1c2931189af33b81b4b2e2db100fbf6fe
|
/owl-web/src/main/java/com/owl/web/common/exception/GlobalExceptionHandler.java
|
c416dfe94d7c7b06e45a7290f629ec788c80f81d
|
[
"Apache-2.0"
] |
permissive
|
yinchuanwang/owl
|
58f4bded24668c6b2f697ced22313a9509e2a399
|
1138d14b8ebb45a0c97881cab3c51903ed7f0c07
|
refs/heads/master
| 2023-06-29T12:52:16.534216
| 2021-07-27T10:27:31
| 2021-07-27T10:27:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,754
|
java
|
package com.owl.web.common.exception;
import com.owl.web.common.ResponseCode;
import com.owl.web.model.ResponseResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import org.springframework.web.method.annotation.MethodArgumentTypeMismatchException;
import javax.servlet.http.HttpServletRequest;
@ResponseBody
@RestControllerAdvice
public class GlobalExceptionHandler {
private static final Logger logger = LoggerFactory.getLogger(GlobalExceptionHandler.class);
@Autowired
private HttpServletRequest request;
@ExceptionHandler(Exception.class)
@ResponseStatus(HttpStatus.OK)
public ResponseResult exceptionHandler(Exception exception) {
logger.debug("trace error, uri: {}", request.getRequestURI(), exception);
if (exception instanceof MethodArgumentTypeMismatchException) {
throw (MethodArgumentTypeMismatchException) exception;
} else if (exception instanceof BizException) {
BizException ex = (BizException) exception;
return new ResponseResult().setRetCode(ex.getCode()).setRetMsg(ex.getMessage());
} else {
logger.error("trace error, uri: {}", request.getRequestURI(), exception);
return new ResponseResult()
.setRetCode(ResponseCode.UNDEFINED.code)
.setRetMsg(ResponseCode.UNDEFINED.message);
}
}
}
|
[
"di.wang@eoitek.com"
] |
di.wang@eoitek.com
|
c98cf8ceb10746f402c2be90af8e3bc96d2fd65e
|
3f605d058523f0b1e51f6557ed3c7663d5fa31d6
|
/core/org.ebayopensource.vjet.core.jsnative/src/org/ebayopensource/dsf/jsnative/anno/JstExclude.java
|
a1a99d85b19996e6260d9847ab92b72aeff243a2
|
[] |
no_license
|
vjetteam/vjet
|
47e21a13978cd860f1faf5b0c2379e321a9b688c
|
ba90843b89dc40d7a7eb289cdf64e127ec548d1d
|
refs/heads/master
| 2020-12-25T11:05:55.420303
| 2012-08-07T21:56:30
| 2012-08-07T21:56:30
| 3,181,492
| 3
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 851
|
java
|
/*******************************************************************************
* Copyright (c) 2005-2011 eBay Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
*******************************************************************************/
package org.ebayopensource.dsf.jsnative.anno;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.FIELD})
public @interface JstExclude {
}
|
[
"pwang@27f4aac7-f869-4a38-a8c2-f1a995e726e6"
] |
pwang@27f4aac7-f869-4a38-a8c2-f1a995e726e6
|
49a463aae34e1f75722395556aef2c859af8e79d
|
3e040ccb1d3f313760d1027096f858bf1c729663
|
/hapi-fhir-base/src/main/java/ca/uhn/fhir/validation/LSInputImpl.java
|
f4ff6ff1ee515d0a7d200c6a27be45ab5e904a0b
|
[
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
rshnaper/hapi-fhir
|
0e75cbd0fd5d24bcb150cee97710ca7baa1377e0
|
57550e7b3c4ede1fcf3e25fcfaceebefc4966f56
|
refs/heads/master
| 2022-12-21T04:43:55.722490
| 2022-02-06T02:40:29
| 2022-02-06T02:40:29
| 109,552,362
| 0
| 0
|
Apache-2.0
| 2022-12-19T14:47:31
| 2017-11-05T04:43:10
|
Java
|
UTF-8
|
Java
| false
| false
| 2,410
|
java
|
package ca.uhn.fhir.validation;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 - 2021 Smile CDR, 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.
* #L%
*/
import java.io.InputStream;
import java.io.Reader;
import org.w3c.dom.ls.LSInput;
class LSInputImpl implements LSInput {
private Reader myCharacterStream;
private InputStream myByteStream;
private String myStringData;
private String mySystemId;
private String myPublicId;
private String myBaseURI;
private String myEncoding;
private boolean myCertifiedText;
@Override
public Reader getCharacterStream() {
return myCharacterStream;
}
@Override
public void setCharacterStream(Reader theCharacterStream) {
myCharacterStream=theCharacterStream;
}
@Override
public InputStream getByteStream() {
return myByteStream;
}
@Override
public void setByteStream(InputStream theByteStream) {
myByteStream=theByteStream;
}
@Override
public String getStringData() {
return myStringData;
}
@Override
public void setStringData(String theStringData) {
myStringData=theStringData;
}
@Override
public String getSystemId() {
return mySystemId;
}
@Override
public void setSystemId(String theSystemId) {
mySystemId=theSystemId;
}
@Override
public String getPublicId() {
return myPublicId;
}
@Override
public void setPublicId(String thePublicId) {
myPublicId=thePublicId;
}
@Override
public String getBaseURI() {
return myBaseURI;
}
@Override
public void setBaseURI(String theBaseURI) {
myBaseURI=theBaseURI;
}
@Override
public String getEncoding() {
return myEncoding;
}
@Override
public void setEncoding(String theEncoding) {
myEncoding=theEncoding;
}
@Override
public boolean getCertifiedText() {
return myCertifiedText;
}
@Override
public void setCertifiedText(boolean theCertifiedText) {
myCertifiedText=theCertifiedText;
}
}
|
[
"jamesagnew@gmail.com"
] |
jamesagnew@gmail.com
|
f29b011d7948d5f7b7c5870771c1e5b4fbfc0fac
|
6baf1fe00541560788e78de5244ae17a7a2b375a
|
/hollywood/com.oculus.browser-base/sources/defpackage/WX.java
|
5d600af24df1591b4fff5cb31400458d90e5db6c
|
[] |
no_license
|
phwd/quest-tracker
|
286e605644fc05f00f4904e51f73d77444a78003
|
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
|
refs/heads/main
| 2023-03-29T20:33:10.959529
| 2021-04-10T22:14:11
| 2021-04-10T22:14:11
| 357,185,040
| 4
| 2
| null | 2021-04-12T12:28:09
| 2021-04-12T12:28:08
| null |
UTF-8
|
Java
| false
| false
| 922
|
java
|
package defpackage;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.LayerDrawable;
/* renamed from: WX reason: default package */
/* compiled from: chromium-OculusBrowser.apk-stable-281887347 */
public class WX extends LayerDrawable {
public WX(Drawable[] drawableArr) {
super(drawableArr);
}
public static WX a(Context context) {
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(new int[]{16843284});
Drawable drawable = obtainStyledAttributes.getDrawable(0);
obtainStyledAttributes.recycle();
return new WX(new Drawable[]{drawable});
}
public void onBoundsChange(Rect rect) {
setLayerInset(0, 0, rect.height() - getDrawable(0).getIntrinsicHeight(), 0, 0);
super.onBoundsChange(rect);
}
}
|
[
"cyuubiapps@gmail.com"
] |
cyuubiapps@gmail.com
|
d2b33026734ce95b59909041a0bfe21bbdf54348
|
a4178e5042f43f94344789794d1926c8bdba51c0
|
/iwxxm2Converter/src/test/resources/iwxxm/2.1/output/net/opengis/gml/v_3_2_1/CurveInterpolationType.java
|
2077eaf0f01c997ba679e6fc9162415a0deba039
|
[
"Apache-2.0"
] |
permissive
|
moryakovdv/iwxxmConverter
|
c6fb73bc49765c4aeb7ee0153cca04e3e3846ab0
|
5c2b57e57c3038a9968b026c55e381eef0f34dad
|
refs/heads/master
| 2023-07-20T06:58:00.317736
| 2023-07-05T10:10:10
| 2023-07-05T10:10:10
| 128,777,786
| 11
| 7
|
Apache-2.0
| 2023-07-05T10:03:12
| 2018-04-09T13:38:59
|
Java
|
UTF-8
|
Java
| false
| false
| 2,742
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2018.02.27 at 12:41:52 PM MSK
//
package net.opengis.gml.v_3_2_1;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for CurveInterpolationType.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="CurveInterpolationType">
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="linear"/>
* <enumeration value="geodesic"/>
* <enumeration value="circularArc3Points"/>
* <enumeration value="circularArc2PointWithBulge"/>
* <enumeration value="circularArcCenterPointWithRadius"/>
* <enumeration value="elliptical"/>
* <enumeration value="clothoid"/>
* <enumeration value="conic"/>
* <enumeration value="polynomialSpline"/>
* <enumeration value="cubicSpline"/>
* <enumeration value="rationalSpline"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "CurveInterpolationType")
@XmlEnum
public enum CurveInterpolationType {
@XmlEnumValue("linear")
LINEAR("linear"),
@XmlEnumValue("geodesic")
GEODESIC("geodesic"),
@XmlEnumValue("circularArc3Points")
CIRCULAR_ARC_3_POINTS("circularArc3Points"),
@XmlEnumValue("circularArc2PointWithBulge")
CIRCULAR_ARC_2_POINT_WITH_BULGE("circularArc2PointWithBulge"),
@XmlEnumValue("circularArcCenterPointWithRadius")
CIRCULAR_ARC_CENTER_POINT_WITH_RADIUS("circularArcCenterPointWithRadius"),
@XmlEnumValue("elliptical")
ELLIPTICAL("elliptical"),
@XmlEnumValue("clothoid")
CLOTHOID("clothoid"),
@XmlEnumValue("conic")
CONIC("conic"),
@XmlEnumValue("polynomialSpline")
POLYNOMIAL_SPLINE("polynomialSpline"),
@XmlEnumValue("cubicSpline")
CUBIC_SPLINE("cubicSpline"),
@XmlEnumValue("rationalSpline")
RATIONAL_SPLINE("rationalSpline");
private final String value;
CurveInterpolationType(String v) {
value = v;
}
public String value() {
return value;
}
public static CurveInterpolationType fromValue(String v) {
for (CurveInterpolationType c: CurveInterpolationType.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}
|
[
"moryakovdv@gmail.com"
] |
moryakovdv@gmail.com
|
48ec7cd3270792140ff1aa7cd4d15048c5046108
|
8979fc82ea7b34410b935fbea0151977a0d46439
|
/src/all_problems/P1176_DietPlanPerformance.java
|
a0de0398f6ba893b4204870206cdf4d49d3c9f1e
|
[
"MIT"
] |
permissive
|
YC-S/LeetCode
|
6fa3f4e46c952b3c6bf5462a8ee0c1186ee792bd
|
452bb10e45de53217bca52f8c81b3034316ffc1b
|
refs/heads/master
| 2021-11-06T20:51:31.554936
| 2021-10-31T03:39:38
| 2021-10-31T03:39:38
| 235,529,949
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 736
|
java
|
package all_problems;
public class P1176_DietPlanPerformance {
public int dietPlanPerformance(int[] calories, int k, int lower, int upper) {
int point = 0;
for (int i = 0, win = 0; i < calories.length; ++i) {
win += calories[i];
if (i >= k - 1) { // reach a k sequence already.
if (i > k - 1) {
win -= calories[i - k];
} // more than k sequence already
if (win < lower) {
--point;
} else if (win > upper) {
++point;
}
}
}
return point;
}
}
|
[
"yuanchenshi@gmail.com"
] |
yuanchenshi@gmail.com
|
c30575537dc5d71c2c4a731bf29b4cdc326101e7
|
d77377ed91ff791419eee2dee4c1602360597100
|
/core/src/main/java/com/vmware/action/git/SubmitToDepot.java
|
832abd587f7701fa4a5df71631b60e3a3b307b48
|
[
"LGPL-2.0-or-later",
"GPL-1.0-or-later",
"LicenseRef-scancode-other-permissive",
"Apache-2.0"
] |
permissive
|
vmware/workflowTools
|
ee5d8aa6198d56b4b896b6f4a64369337e183eaa
|
b76efd9a8e067c5dab77f8ddc7dbd7ea72b0356f
|
refs/heads/master
| 2023-08-31T18:03:46.701341
| 2023-08-29T02:46:18
| 2023-08-29T02:46:22
| 21,996,028
| 25
| 14
|
Apache-2.0
| 2023-05-19T00:20:21
| 2014-07-18T22:16:00
|
Java
|
UTF-8
|
Java
| false
| false
| 943
|
java
|
package com.vmware.action.git;
import com.vmware.action.base.BaseCommitAction;
import com.vmware.config.ActionDescription;
import com.vmware.config.WorkflowConfig;
import com.vmware.util.StringUtils;
@ActionDescription("Uses git p4 submit to checkin a commit to the perforce depot.")
public class SubmitToDepot extends BaseCommitAction {
public SubmitToDepot(WorkflowConfig config) {
super(config);
}
@Override
protected void failWorkflowIfConditionNotMet() {
if (StringUtils.isEmpty(git.configValue("git-p4.skipsubmitedit"))) {
exitDueToFailureCheck("git config value git-p4.skipsubmitedit needs to be set to true, run [git config git-p4.skipsubmitedit true]");
}
}
@Override
public void process() {
log.info("Submitting changes diffed against tracking branch {}", gitRepoConfig.trackingBranchPath());
git.submit(gitRepoConfig.trackingBranchPath());
}
}
|
[
"dbiggs@vmware.com"
] |
dbiggs@vmware.com
|
baed71b5dc1a21b21f54daafb2ed75a61a305322
|
1c0fd7788057250076b89a2950296c6dd634235f
|
/src/test/java/org/assertj/core/internal/PropertySupport_propertyValues_with_mocks_Test.java
|
b60247d42f349baef5b22d1e730bbc410b5d83ef
|
[
"Apache-2.0"
] |
permissive
|
cybernetics/assertj-core
|
ee34de8afd26add2224f8fe64f56302ec972c6a6
|
15cc375a8975a98cd98f1bc4c1e6b1112094d4b1
|
refs/heads/master
| 2021-01-22T12:44:24.856925
| 2014-02-23T21:40:10
| 2014-02-23T21:40:10
| 17,436,955
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,715
|
java
|
/*
* Created on Feb 22, 2011
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS"
* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
* Copyright @2011 the original author or authors.
*/
package org.assertj.core.internal;
import static junit.framework.Assert.*;
import static org.assertj.core.util.Lists.newArrayList;
import static org.assertj.core.util.introspection.Introspection.getProperty;
import static org.junit.Assert.fail;
import static org.mockito.Mockito.*;
import java.beans.PropertyDescriptor;
import java.util.*;
import org.assertj.core.internal.JavaBeanDescriptor;
import org.assertj.core.internal.PropertySupport;
import org.assertj.core.test.Name;
import org.assertj.core.util.introspection.IntrospectionError;
import org.junit.*;
/**
* Tests for <code>{@link PropertySupport#propertyValues(String, Collection)}</code>.
*
* @author Yvonne Wang
* @author Mikhail Mazursky
*/
public class PropertySupport_propertyValues_with_mocks_Test {
private static org.assertj.core.test.Employee yoda;
private static List<org.assertj.core.test.Employee> employees;
@BeforeClass
public static void setUpOnce() {
yoda = new org.assertj.core.test.Employee(6000L, new Name("Yoda"), 800);
employees = newArrayList(yoda);
}
private JavaBeanDescriptor descriptor;
private PropertySupport propertySupport;
@Before
public void setUp() {
descriptor = mock(JavaBeanDescriptor.class);
propertySupport = new PropertySupport();
propertySupport.javaBeanDescriptor = descriptor;
}
@Test
public void should_throw_error_if_PropertyDescriptor_cannot_invoke_read_method() throws Exception {
RuntimeException thrownOnPurpose = new RuntimeException("Thrown on purpose");
PropertyDescriptor real = getProperty("age", yoda);
when(descriptor.invokeReadMethod(real, yoda)).thenThrow(thrownOnPurpose);
try {
propertySupport.propertyValues("age", Long.class, employees);
fail("expecting an IntrospectionError to be thrown");
} catch (IntrospectionError expected) {
assertSame(thrownOnPurpose, expected.getCause());
String msg = String.format("Unable to obtain the value of the property <'age'> from <%s>", yoda.toString());
assertEquals(msg, expected.getMessage());
}
}
}
|
[
"joel.costigliola@gmail.com"
] |
joel.costigliola@gmail.com
|
e0a437301d0860cd9a3dda18f03024e0203a2966
|
20eb62855cb3962c2d36fda4377dfd47d82eb777
|
/IntroClassJava/dataset/digits/317aa7055d3b7337ab43b73863692d1288ca246c473f9fd176bc737a7c3e1e08c37a15603cfb7bfc86f7bc2dcc239967b79b605aec11f86ae3ab90dc140b540f/002/mutations/14/digits_317aa705_002.java
|
78da0f6e01f47b521b3487ef92602c696d000cb8
|
[] |
no_license
|
ozzydong/CapGen
|
356746618848065cce4e253e5d3c381baa85044a
|
0ba0321b6b1191443276021f1997833342f02515
|
refs/heads/master
| 2023-03-18T20:12:02.923428
| 2020-08-21T03:08:28
| 2020-08-21T03:08:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,979
|
java
|
package introclassJava;
class IntObj {
public int value;
public IntObj () {
} public IntObj (int i) {
value = i;
}
}
class FloatObj {
public float value;
public FloatObj () {
} public FloatObj (float i) {
value = i;
}
}
class LongObj {
public long value;
public LongObj () {
} public LongObj (long i) {
value = i;
}
}
class DoubleObj {
public double value;
public DoubleObj () {
} public DoubleObj (double i) {
value = i;
}
}
class CharObj {
public char value;
public CharObj () {
} public CharObj (char i) {
value = i;
}
}
public class digits_317aa705_002 {
public java.util.Scanner scanner;
public String output = "";
public static void main (String[]args) throws Exception {
digits_317aa705_002 mainClass = new digits_317aa705_002 ();
String output;
if (args.length > 0) {
mainClass.scanner = new java.util.Scanner (args[0]);
} else {
mainClass.scanner = new java.util.Scanner (System.in);
}
mainClass.exec ();
System.out.println (mainClass.output);
}
public void exec () throws Exception {
IntObj negative = new IntObj (), integer = new IntObj (), i =
new IntObj (), digit = new IntObj ();
output += (String.format ("\nEnter an integer > "));
integer.value = scanner.nextInt ();
negative.value = integer.value;
for (i.value = 1; i.value <= 10; i.value += 1) {
if ((i.value != 10) && (negative.value < 0)) {
digit.value = (-1 * integer.value) % 10;
} else {
digit.value = integer.value % 10;
}
integer.value = integer.value / 10;
output += (String.format ("\n%d", i.value));
}
output += (String.format ("\nThat's all, have a nice day!\n"));
if (true)
return;;
}
}
|
[
"justinwm@163.com"
] |
justinwm@163.com
|
8bfa5fe87caca0ca8282f9ffd722ce336fbde99b
|
20eb62855cb3962c2d36fda4377dfd47d82eb777
|
/IntroClassJava/dataset/grade/f5b56c79c624eac7c37c45c1540916bb9b5f5db93e2a426a282a5d0eacde86b4b1e5d1d119eeb06f0ead94d2e4f228dca8dde4ef511af4bc59a18d272d820a0e/010/mutations/50/grade_f5b56c79_010.java
|
132af4b6207caae653ed8087e9fc067db69fc245
|
[] |
no_license
|
ozzydong/CapGen
|
356746618848065cce4e253e5d3c381baa85044a
|
0ba0321b6b1191443276021f1997833342f02515
|
refs/heads/master
| 2023-03-18T20:12:02.923428
| 2020-08-21T03:08:28
| 2020-08-21T03:08:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,502
|
java
|
package introclassJava;
class IntObj {
public int value;
public IntObj () {
} public IntObj (int i) {
value = i;
}
}
class FloatObj {
public float value;
public FloatObj () {
} public FloatObj (float i) {
value = i;
}
}
class LongObj {
public long value;
public LongObj () {
} public LongObj (long i) {
value = i;
}
}
class DoubleObj {
public double value;
public DoubleObj () {
} public DoubleObj (double i) {
value = i;
}
}
class CharObj {
public char value;
public CharObj () {
} public CharObj (char i) {
value = i;
}
}
public class grade_f5b56c79_010 {
public java.util.Scanner scanner;
public String output = "";
public static void main (String[]args) throws Exception {
grade_f5b56c79_010 mainClass = new grade_f5b56c79_010 ();
String output;
if (args.length > 0) {
mainClass.scanner = new java.util.Scanner (args[0]);
} else {
mainClass.scanner = new java.util.Scanner (System.in);
}
mainClass.exec ();
System.out.println (mainClass.output);
}
public void exec () throws Exception {
FloatObj A = new FloatObj (), B = new FloatObj (), C =
new FloatObj (), D = new FloatObj (), score = new FloatObj ();
output += (String.format ("Enter thresholds for A, B, C, D\n"));
output += (String.format ("in that order, decreasing percentages > "));
A.value = scanner.nextFloat ();
if (true) return ;
B.value = scanner.nextFloat ();
C.value = scanner.nextFloat ();
D.value = scanner.nextFloat ();
output +=
(String.format ("Thank you. Now enter student score (percent) >"));
score.value = scanner.nextFloat ();
if (score.value >= A.value) {
output += (String.format ("Stdent has an A grade\n"));
} else if (score.value < A.value && score.value >= B.value) {
output += (String.format ("Student has an B grade\n"));
} else if (score.value < B.value && score.value >= C.value) {
output += (String.format ("Student has an C grade\n"));
} else if (score.value < C.value && score.value >= D.value) {
output += (String.format ("Student has an D grade\n"));
} else {
output += (String.format ("Student has failed the course\n"));
}
if (true)
return;;
}
}
|
[
"justinwm@163.com"
] |
justinwm@163.com
|
9435a16cca0e5ce0b8af37179c450c3b3f14f053
|
11ecf62c1399f72e898a5a6cfe71b36978c6b140
|
/spring-boot-docs/src/main/java/org/springframework/boot/context/EnvironmentPostProcessorExample.java
|
cb94961c5ea23297010658911667fa9a7306c883
|
[
"Apache-2.0"
] |
permissive
|
rstoyanchev/spring-boot
|
215e15c4d9b2951588d460c6b58ebde95dbaa6ea
|
f6b613b0d43ca589920998183d720822f149ee87
|
refs/heads/master
| 2022-10-28T20:56:50.626555
| 2017-06-29T18:33:56
| 2017-06-29T18:33:56
| 95,816,277
| 3
| 1
| null | 2017-06-29T20:21:18
| 2017-06-29T20:21:18
| null |
UTF-8
|
Java
| false
| false
| 2,081
|
java
|
/*
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.context;
import java.io.IOException;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.env.EnvironmentPostProcessor;
import org.springframework.boot.env.YamlPropertySourceLoader;
import org.springframework.core.env.ConfigurableEnvironment;
import org.springframework.core.env.PropertySource;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
/**
* An {@link EnvironmentPostProcessor} example that loads a YAML file.
*
* @author Stephane Nicoll
*/
// tag::example[]
public class EnvironmentPostProcessorExample
implements EnvironmentPostProcessor {
private final YamlPropertySourceLoader loader
= new YamlPropertySourceLoader();
@Override
public void postProcessEnvironment(ConfigurableEnvironment environment,
SpringApplication application) {
Resource path = new ClassPathResource("com/example/myapp/config.yml");
PropertySource<?> propertySource = loadYaml(path);
environment.getPropertySources().addLast(propertySource);
}
private PropertySource<?> loadYaml(Resource path) {
if (!path.exists()) {
throw new IllegalArgumentException("Resource " + path
+ " does not exist");
}
try {
return this.loader.load("custom-resource", path, null);
}
catch (IOException ex) {
throw new IllegalStateException("Failed to load yaml configuration "
+ "from " + path, ex);
}
}
}
// end::example[]
|
[
"snicoll@pivotal.io"
] |
snicoll@pivotal.io
|
7618d7036d342bee7c655cb0c3dcce3c27d0addb
|
0ff1d0ee1f9ea1e1b46fbd65d1d457ba2760e543
|
/src/main/java/com/sen/concurrency3/juc/utils/semaphore/SemaphoreExample1.java
|
ea560b08a5621addd72dae522f121536bb2cb13f
|
[
"Apache-2.0"
] |
permissive
|
sumforest/concurrency
|
100abc27f3436d356d17f76d80f90293f5d1451a
|
2470277fa614e049400a6b33f38ebf6289d5b774
|
refs/heads/master
| 2021-06-24T04:54:00.159469
| 2021-05-23T12:09:26
| 2021-05-23T12:09:26
| 226,290,511
| 0
| 0
|
Apache-2.0
| 2020-10-13T18:13:08
| 2019-12-06T09:18:02
|
Java
|
UTF-8
|
Java
| false
| false
| 1,299
|
java
|
package com.sen.concurrency3.juc.utils.semaphore;
import java.util.concurrent.Semaphore;
import java.util.concurrent.TimeUnit;
/**
* @Author: Sen
* @Date: 2019/12/16 01:18
* @Description: 信号量 {@link Semaphore} 实现锁
*/
public class SemaphoreExample1 {
public static void main(String[] args) {
final SemaphoreLock lock = new SemaphoreLock();
for (int i = 0; i < 2; i++) {
new Thread(() -> {
System.out.println(Thread.currentThread().getName() + " start");
try {
lock.lock();
System.out.println(Thread.currentThread().getName() + " get the lock");
TimeUnit.SECONDS.sleep(5);
} catch (InterruptedException e) {
e.printStackTrace();
}finally {
lock.unlock();
System.out.println(Thread.currentThread().getName() + " release");
}
}).start();
}
}
private static class SemaphoreLock{
private final Semaphore semaphore = new Semaphore(1);
public void lock() throws InterruptedException {
semaphore.acquire();
}
public void unlock() {
semaphore.release();
}
}
}
|
[
"12345678"
] |
12345678
|
7770787d87617481369f99df38d4a96a2f8319dc
|
e4adc41c275c529ac9b6ede42bad72495314b1a3
|
/src/main/java/com/github/sebhoss/reguloj/Context.java
|
3e36dc7b957dccab072918f33ce320a0fd80e207
|
[
"WTFPL"
] |
permissive
|
praveeny1986/reguloj
|
a37298a5565c5a2dec6f3cb7b51fbcfd6fcc27cb
|
2a2b0157723f70770ee2ed8aaf90c30caa8d9396
|
refs/heads/master
| 2021-01-16T22:01:49.496475
| 2014-01-04T22:12:26
| 2014-01-04T22:12:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,438
|
java
|
/*
* Copyright © 2010 Sebastian Hoß <mail@shoss.de>
* This work is free. You can redistribute it and/or modify it under the
* terms of the Do What The Fuck You Want To Public License, Version 2,
* as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.
*/
package com.github.sebhoss.reguloj;
/**
* <p>
* An {@link Context} is used every time a set of rules shall be evaluated. The only available method in the generic
* version is {@link #getTopic()} which returns the main or focal point of your rules (if any).
* </p>
* <p>
* Note that no factory or builder is defined for the <code>Context</code> so you will have to implement the concrete
* implementation and create an instance out of it yourself.
* </p>
* <h1>Caveats</h1>
* <ul>
* <li>No Problems known</li>
* </ul>
* <h1>Examples</h1>
* <p>
* No examples so far - interface is too abstract for that.
* </p>
* <h1>How to help</h1>
* <ul>
* <li>Test the interface and write back about errors, bugs and wishes.</li>
* <li>Write an abstract implementation for this interface so others will have it easier to implement it themselves.</li>
* <li>Write an example of how to use an Context.</li>
* </ul>
*
* @param <TOPIC>
* The topic of the context.
*/
public interface Context<TOPIC> {
/**
* @return The topic of this inference context.
*/
TOPIC getTopic();
}
|
[
"mail@shoss.de"
] |
mail@shoss.de
|
8dd99bdf35bb501083653776118a9c358a24205b
|
d4506724ba8a4f2ae64b999d9e6631c7a149b45c
|
/src/main/java/yd/swig/SWIGTYPE_p_f_p__GInetAddress__p_unsigned_char.java
|
d4d7dbdf34a8ba4f191bc7ff3548fb0dfeb22b7a
|
[] |
no_license
|
ydaniels/frida-java
|
6dc70b327ae8e8a6d808a0969e861225dcc0192b
|
cf3c198b2a4b7c7a3a186359b5c8c768deacb285
|
refs/heads/master
| 2022-12-08T21:28:27.176045
| 2019-10-24T09:51:44
| 2019-10-24T09:51:44
| 214,268,850
| 2
| 1
| null | 2022-11-25T19:46:38
| 2019-10-10T19:30:26
|
Java
|
UTF-8
|
Java
| false
| false
| 853
|
java
|
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package yd.swig;
public class SWIGTYPE_p_f_p__GInetAddress__p_unsigned_char {
private transient long swigCPtr;
protected SWIGTYPE_p_f_p__GInetAddress__p_unsigned_char(long cPtr, @SuppressWarnings("unused") boolean futureUse) {
swigCPtr = cPtr;
}
protected SWIGTYPE_p_f_p__GInetAddress__p_unsigned_char() {
swigCPtr = 0;
}
protected static long getCPtr(SWIGTYPE_p_f_p__GInetAddress__p_unsigned_char obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
}
|
[
"yomi@erpsoftapp.com"
] |
yomi@erpsoftapp.com
|
fb1a2fda4089bc10d190330e71e4465d93b114b8
|
f9b9b154b2e3f89af48b2844ae8147dd5a997f06
|
/src/library/algorithm/Mathematical/CombProb.java
|
b9e63236322be48236035114c43b04895915a75d
|
[] |
no_license
|
YutaNishino/competitive_programming
|
610116fb2d6b3bc32c4e3a33defc5ba948e1a7d4
|
bc01870c3ce47f04b77cd9add5d03f2746f1c7fd
|
refs/heads/master
| 2018-09-10T09:37:45.656683
| 2018-06-23T11:55:33
| 2018-06-23T11:55:33
| 119,142,962
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 435
|
java
|
package library.algorithm.Mathematical;
public class CombProb {
static double[][] combProb(int num) {
double[][] comb = new double[num][num];
comb[0][0] = 1;
for (int i = 1; i < comb.length; i++) {
for (int j = 0; j <= i; j++) {
comb[i][j] = (comb[i - 1][j] +
(j > 0 ? comb[i - 1][j - 1] : 0)) * 0.5;
}
}
return comb;
}
}
|
[
"ynishino.omoikane@gmail.com"
] |
ynishino.omoikane@gmail.com
|
b51439f3e6d92fd1f7f44e7b535960b543c7feaf
|
52c04ffd7714c69e77996adb32707592ad3b7e49
|
/src/org/redkale/net/http/WebServlet.java
|
18e990426951d8ea0457f0bc83b440ee2f2e3e6a
|
[
"Apache-2.0"
] |
permissive
|
beckhoho/redkale
|
4fa56f7fa358504037c9040be59e1e1565298935
|
fb51997c6b8151164149d321e752e8ed660e6136
|
refs/heads/master
| 2021-01-10T22:43:25.930920
| 2016-10-08T10:42:01
| 2016-10-08T10:42:01
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 758
|
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 org.redkale.net.http;
import java.lang.annotation.*;
/**
* 功能同JSR 315 (java-servlet 3.0) 规范中的 @WebServlet
*
*
* <p>
* 详情见: http://redkale.org
*
* @author zhangjx
*/
@Documented
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface WebServlet {
String name() default "";
boolean repair() default true;
String[] value() default {};
int moduleid() default 0;
WebInitParam[] initParams() default {};
String comment() default ""; //备注描述
}
|
[
"22250530@qq.com"
] |
22250530@qq.com
|
72071f4583d323af9731d496018834bdbe229d3a
|
774b50fe5091754f23ef556c07a4d1aab56efe27
|
/oag/src/main/java/org/oagis/model/v101/OnlineSessionExtensionType.java
|
bbb6aff53286dcd5e4583a68db20dfd3c6d533fb
|
[] |
no_license
|
otw1248/thirdpartiess
|
daa297c2f44adb1ffb6530f88eceab6b7f37b109
|
4cbc4501443d807121656e47014d70277ff30abc
|
refs/heads/master
| 2022-12-07T17:10:17.320160
| 2022-11-28T10:56:19
| 2022-11-28T10:56:19
| 33,661,485
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,165
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2015.04.09 at 05:00:28 PM CST
//
package org.oagis.model.v101;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for OnlineSessionExtensionType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="OnlineSessionExtensionType">
* <complexContent>
* <extension base="{http://www.openapplications.org/oagis/10}AllExtensionType">
* <sequence>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "OnlineSessionExtensionType")
public class OnlineSessionExtensionType
extends AllExtensionType
{
}
|
[
"otw1248@otw1248.com"
] |
otw1248@otw1248.com
|
a12fb71baeea87307de8fe0a90ed685f325603cd
|
bceba483c2d1831f0262931b7fc72d5c75954e18
|
/src/qubed/corelogic/RegulatoryProductSourceBase.java
|
b24a6eaba0631ee13d779b797a36fed52f3fda53
|
[] |
no_license
|
Nigel-Qubed/credit-services
|
6e2acfdb936ab831a986fabeb6cefa74f03c672c
|
21402c6d4328c93387fd8baf0efd8972442d2174
|
refs/heads/master
| 2022-12-01T02:36:57.495363
| 2020-08-10T17:26:07
| 2020-08-10T17:26:07
| 285,552,565
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,632
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2020.08.05 at 04:46:29 AM CAT
//
package qubed.corelogic;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for RegulatoryProductSourceBase.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="RegulatoryProductSourceBase">
* <restriction base="{http://www.mismo.org/residential/2009/schemas}MISMOEnum_Base">
* <enumeration value="OFAC"/>
* <enumeration value="Other"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "RegulatoryProductSourceBase")
@XmlEnum
public enum RegulatoryProductSourceBase {
/**
* Office of Foreign Asset Control
*
*/
OFAC("OFAC"),
@XmlEnumValue("Other")
OTHER("Other");
private final String value;
RegulatoryProductSourceBase(String v) {
value = v;
}
public String value() {
return value;
}
public static RegulatoryProductSourceBase fromValue(String v) {
for (RegulatoryProductSourceBase c: RegulatoryProductSourceBase.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}
|
[
"vectorcrael@yahoo.com"
] |
vectorcrael@yahoo.com
|
0aad6098434a78ae488fb51aa3067b0a3b5dab3b
|
d8bae6238185215e02e12c16c94c3ac77c0d7508
|
/nitrite/src/main/java/org/dizitart/no2/fulltext/languages/Basque.java
|
b426f10786bf5fbbce3265318d6939e60659e7bb
|
[
"Apache-2.0"
] |
permissive
|
ikbhal/nitrite-database
|
2224f061ebfb95f92efad69cf12ec2154a818fff
|
7901cdba7ec6d99f1172e828c1b95c777943be9b
|
refs/heads/master
| 2020-03-24T07:11:49.023896
| 2018-07-25T12:44:10
| 2018-07-25T12:44:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,456
|
java
|
/*
*
* Copyright 2017 Nitrite 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.dizitart.no2.fulltext.languages;
import org.dizitart.no2.fulltext.Language;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
/**
* Basque stop words
*
* @since 2.1.0
* @author Anindya Chatterjee
*/
public class Basque implements Language {
@Override
public Set<String> stopWords() {
return new HashSet<>(Arrays.asList(
"al",
"anitz",
"arabera",
"asko",
"baina",
"bat",
"batean",
"batek",
"bati",
"batzuei",
"batzuek",
"batzuetan",
"batzuk",
"bera",
"beraiek",
"berau",
"berauek",
"bere",
"berori",
"beroriek",
"beste",
"bezala",
"da",
"dago",
"dira",
"ditu",
"du",
"dute",
"edo",
"egin",
"ere",
"eta",
"eurak",
"ez",
"gainera",
"gu",
"gutxi",
"guzti",
"haiei",
"haiek",
"haietan",
"hainbeste",
"hala",
"han",
"handik",
"hango",
"hara",
"hari",
"hark",
"hartan",
"hau",
"hauei",
"hauek",
"hauetan",
"hemen",
"hemendik",
"hemengo",
"hi",
"hona",
"honek",
"honela",
"honetan",
"honi",
"hor",
"hori",
"horiei",
"horiek",
"horietan",
"horko",
"horra",
"horrek",
"horrela",
"horretan",
"horri",
"hortik",
"hura",
"izan",
"ni",
"noiz",
"nola",
"non",
"nondik",
"nongo",
"nor",
"nora",
"ze",
"zein",
"zen",
"zenbait",
"zenbat",
"zer",
"zergatik",
"ziren",
"zituen",
"zu",
"zuek",
"zuen",
"zuten"
));
}
}
|
[
"anidotnet@gmail.com"
] |
anidotnet@gmail.com
|
ad09beec240aee7cfeac120292184d8fb7dcf160
|
3b91ed788572b6d5ac4db1bee814a74560603578
|
/com/tencent/mm/plugin/label/ui/widget/InputClearablePreference$3.java
|
041ce5235fedd33e77634b2c770e73da90933523
|
[] |
no_license
|
linsir6/WeChat_java
|
a1deee3035b555fb35a423f367eb5e3e58a17cb0
|
32e52b88c012051100315af6751111bfb6697a29
|
refs/heads/master
| 2020-05-31T05:40:17.161282
| 2018-08-28T02:07:02
| 2018-08-28T02:07:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 639
|
java
|
package com.tencent.mm.plugin.label.ui.widget;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
class InputClearablePreference$3 implements OnTouchListener {
final /* synthetic */ InputClearablePreference kCq;
InputClearablePreference$3(InputClearablePreference inputClearablePreference) {
this.kCq = inputClearablePreference;
}
public final boolean onTouch(View view, MotionEvent motionEvent) {
if (InputClearablePreference.b(this.kCq) != null) {
InputClearablePreference.b(this.kCq).clearFocus();
}
return false;
}
}
|
[
"707194831@qq.com"
] |
707194831@qq.com
|
b99eaa9dd83ad411a05f89a480220a23393014b8
|
8196d4a595970d91d160b965503171aaaa12620f
|
/cevo-framework/src/test/java/put/ci/cevo/framework/model/ParametrizedModelTest.java
|
9a70275f7128809d7c0f5da4e5d947270323e47e
|
[] |
no_license
|
wjaskowski/mastering-2048
|
d3c1657143625c8260aba4cd6c108e4125b85ac6
|
cb9b92b16adb278a9716faffd2f9a6e3db075ec1
|
refs/heads/master
| 2020-07-26T22:22:22.747845
| 2017-03-04T12:03:48
| 2017-03-04T12:03:48
| 73,711,911
| 10
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,096
|
java
|
package put.ci.cevo.framework.model;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
public class ParametrizedModelTest {
private static class FinalFields {
@SuppressWarnings("unused")
private final String a;
@SuppressWarnings("unused")
private final int b;
public FinalFields(String a, int b) {
this.a = a;
this.b = b;
}
}
@Test
public void testParametersExtraction() {
FinalFields finalFields = new FinalFields("test", 10);
ParametrizedModel parametrizedModel = new ParametrizedModel(finalFields);
assertEquals("test", parametrizedModel.getCachedParameter("a"));
assertEquals(10, parametrizedModel.getCachedParameter("b"));
}
@Test
public void testParametersChange() {
FinalFields finalFields = new FinalFields("test", 10);
ParametrizedModel parametrizedModel = new ParametrizedModel(finalFields);
parametrizedModel.setParameter("a", "changed!");
parametrizedModel.setParameter("b", 1024);
assertEquals("changed!", parametrizedModel.getParameter("a"));
assertEquals(1024, parametrizedModel.getParameter("b"));
}
}
|
[
"wojciech.jaskowski@gmail.com"
] |
wojciech.jaskowski@gmail.com
|
6354e7780a002e106757564d9a820761ca099e88
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/7/7_3699324642c06b7a6d2f55580671752a2ecefdf3/VisitorAction/7_3699324642c06b7a6d2f55580671752a2ecefdf3_VisitorAction_t.java
|
4bec76226e1e94b587dad6df16133502dcc0283e
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 4,381
|
java
|
// ========================================================================
// Copyright (C) zeroth Project Team. All rights reserved.
// GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007
// http://www.gnu.org/licenses/agpl-3.0.txt
// ========================================================================
package zeroth.actor.screen.iface.jsf.session;
import java.io.Serializable;
import java.util.Collection;
import java.util.Date;
import java.util.Map;
import java.util.logging.Logger;
import javax.ejb.EJB;
import javax.enterprise.context.Conversation;
import javax.enterprise.context.SessionScoped;
import javax.faces.context.FacesContext;
import javax.inject.Inject;
import javax.inject.Named;
import zeroth.actor.service.app.actor.MemberApplication;
import zeroth.actor.service.domain.ActorFilterFactory;
import zeroth.actor.service.domain.Member;
import zeroth.framework.screen.iface.jsf.FacesHelper;
/**
* Visitor controller.
* @author nilcy
*/
@Named("visitorAction")
@SessionScoped
// @ServletSecurity(value = @HttpConstraint(rolesAllowed = { SPONSOR, DIRECTOR,
// CREATOR, EDITOR,
// AUDITOR, READER }))
public class VisitorAction implements Serializable {
/** 製品番号 */
private static final long serialVersionUID = -6272066593466089850L;
/** member. */
private Member member;
/** logged in date. */
private Date loggedInDate;
/** member service Local-I/F. */
@EJB
private MemberApplication memberApplication;
/** conversation. */
@Inject
private Conversation conversation;
/** ロガー */
// @Inject
// private Logger log;
private static Logger log = Logger.getGlobal();
/** コンストラクタ */
public VisitorAction() {
super();
}
/**
* Determine if logged-in.
* @return true if logged-in
*/
@SuppressWarnings("static-method")
public boolean isLoggedIn() {
log.info("getUserPrincipal = " + FacesHelper.getExternalContext().getUserPrincipal());
return FacesHelper.getExternalContext().getUserPrincipal() != null;
}
/**
* {@link #member}.
* @return {@link #member}
*/
public Member getMember() {
if ((member == null) && isLoggedIn()) {
final String account = FacesHelper.getExternalContext().getRemoteUser();
log.info("account = " + account);
final Collection<Member> members = memberApplication.findMany(ActorFilterFactory
.createMemberFilter(account));
member = members.iterator().next();
loggedInDate = new Date();
// InfraHelper.addSuccessBundleMessage("LoggedIn");
// InfraHelper.keepMessage();
} else if (!isLoggedIn()) {
member = null;
loggedInDate = null;
}
return member;
}
/**
* {@link #loggedInDate}.
* @return {@link #loggedInDate}
*/
public Date getLoggedInDate() {
return loggedInDate;
}
/**
* Determine if user in role.
* @param aRole role
* @return true if user in role
*/
@SuppressWarnings("static-method")
public boolean hasRole(final String aRole) {
return FacesHelper.getExternalContext().isUserInRole(aRole);
}
/**
* stack-trace.
* @return stack-trace
*/
@SuppressWarnings("static-method")
public String getStackTrace() {
final FacesContext context = FacesContext.getCurrentInstance();
final Map<String, Object> map = context.getExternalContext().getRequestMap();
final Throwable throwable = (Throwable) map.get("javax.servlet.error.exception");
final StringBuilder builder = new StringBuilder();
final String lf = "<br/>";
builder.append(throwable.getMessage()).append(lf);
for (final StackTraceElement element : throwable.getStackTrace()) {
builder.append(element).append(lf);
}
return builder.toString();
}
/**
* {@link #conversation}.
* @return {@link #conversation}
*/
public Conversation getConversation() {
return conversation;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
d5c666e0520c41442e48aae8dbfbfdcf63889bd6
|
e27942cce249f7d62b7dc8c9b86cd40391c1ddd4
|
/modules/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201708/cm/AdGroupExtensionSettingServiceInterfacegetResponse.java
|
960771103d5d9eddd790c96c6df23b34e541292e
|
[
"Apache-2.0"
] |
permissive
|
mo4ss/googleads-java-lib
|
b4b6178747d25d16ae6aa0c80d80ee18a2dfe01a
|
efaa9c3bd8a46a3ed4b00963dc9760c6dd8bd641
|
refs/heads/master
| 2022-12-05T00:30:56.740813
| 2022-11-16T10:47:15
| 2022-11-16T10:47:15
| 108,132,394
| 0
| 0
|
Apache-2.0
| 2022-11-16T10:47:16
| 2017-10-24T13:41:43
|
Java
|
UTF-8
|
Java
| false
| false
| 2,255
|
java
|
// Copyright 2017 Google 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.google.api.ads.adwords.jaxws.v201708.cm;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for getResponse element declaration.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <element name="getResponse">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="rval" type="{https://adwords.google.com/api/adwords/cm/v201708}AdGroupExtensionSettingPage" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"rval"
})
@XmlRootElement(name = "getResponse")
public class AdGroupExtensionSettingServiceInterfacegetResponse {
protected AdGroupExtensionSettingPage rval;
/**
* Gets the value of the rval property.
*
* @return
* possible object is
* {@link AdGroupExtensionSettingPage }
*
*/
public AdGroupExtensionSettingPage getRval() {
return rval;
}
/**
* Sets the value of the rval property.
*
* @param value
* allowed object is
* {@link AdGroupExtensionSettingPage }
*
*/
public void setRval(AdGroupExtensionSettingPage value) {
this.rval = value;
}
}
|
[
"jradcliff@users.noreply.github.com"
] |
jradcliff@users.noreply.github.com
|
f23c9369bc47e9f6b2caae46932121570a073d50
|
0590cbc9069654046c1ea7c47d3b041a61fb690b
|
/app/src/main/java/com/example/letsdineapp/letsdineapp/Main2Activity.java
|
9887183a1949a7285d659ae51d37f830169714c3
|
[] |
no_license
|
ArnasKarciauskas/LetsDineApp
|
43566a02d1158c59e8fab98cd026ef37a64a1933
|
e618cc78a22f86085dcbea76cbca5adbcb0bbc3e
|
refs/heads/master
| 2020-03-09T06:32:38.090296
| 2018-04-08T13:17:26
| 2018-04-08T13:17:26
| 128,641,997
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,518
|
java
|
package com.example.letsdineapp.letsdineapp;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.view.View;
import android.support.design.widget.NavigationView;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
public class Main2Activity extends AppCompatActivity
implements NavigationView.OnNavigationItemSelectedListener {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main2);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
FloatingActionButton fab = (FloatingActionButton) 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 = (DrawerLayout) findViewById(R.id.drawer_layout);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
drawer.addDrawerListener(toggle);
toggle.syncState();
NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
navigationView.setNavigationItemSelectedListener(this);
}
@Override
public void onBackPressed() {
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
if (drawer.isDrawerOpen(GravityCompat.START)) {
drawer.closeDrawer(GravityCompat.START);
} else {
super.onBackPressed();
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main2, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
@SuppressWarnings("StatementWithEmptyBody")
@Override
public boolean onNavigationItemSelected(MenuItem item) {
// Handle navigation view item clicks here.
int id = item.getItemId();
if (id == R.id.nav_camera) {
// Handle the camera action
} else if (id == R.id.nav_gallery) {
} else if (id == R.id.nav_slideshow) {
} else if (id == R.id.nav_manage) {
} else if (id == R.id.nav_share) {
} else if (id == R.id.nav_send) {
}
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
drawer.closeDrawer(GravityCompat.START);
return true;
}
}
|
[
"you@example.com"
] |
you@example.com
|
4bcc0993dc1c3ba667c516e2d5c817d3a38a9584
|
3509f8bbbdaa5f5f85a3932486fa94149fb4a97e
|
/rdf/core/src/test/java/org/apache/clerezza/rdf/core/access/providers/WeightedA.java
|
624a80de7bad7ec6896aa7a5d92e23d6581d3bda
|
[
"Apache-2.0"
] |
permissive
|
saurabhacellere/clerezza
|
2baf54b5450bd6a5e0283431f83e2ecbba50a734
|
617fee1e93e8f3d7b71010451ee3f5cf18da7b1c
|
refs/heads/master
| 2020-06-14T01:36:11.292365
| 2018-11-20T07:23:52
| 2018-11-20T07:23:52
| 194,852,357
| 0
| 0
|
Apache-2.0
| 2019-07-02T11:43:55
| 2019-07-02T11:43:55
| null |
UTF-8
|
Java
| false
| false
| 3,373
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.clerezza.rdf.core.access.providers;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import org.apache.clerezza.commons.rdf.ImmutableGraph;
import org.apache.clerezza.commons.rdf.Graph;
import org.apache.clerezza.commons.rdf.IRI;
import org.apache.clerezza.rdf.core.access.EntityUndeletableException;
import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
import org.apache.clerezza.rdf.core.access.WeightedTcProvider;
import org.apache.clerezza.rdf.core.access.TcManagerTest;
import org.apache.clerezza.commons.rdf.impl.utils.simple.SimpleMGraph;
import org.apache.clerezza.commons.rdf.impl.utils.TripleImpl;
/**
*
* @author reto
*/
public class WeightedA implements WeightedTcProvider {
private Set<IRI> mGraphList = new HashSet<IRI>();
@Override
public int getWeight() {
return 5;
}
@Override
public ImmutableGraph getImmutableGraph(IRI name) throws NoSuchEntityException {
if (name.equals(TcManagerTest.uriRefA)) {
Graph mResult = new SimpleMGraph();
mResult.add(new TripleImpl(TcManagerTest.uriRefA,
TcManagerTest.uriRefA, TcManagerTest.uriRefA));
mGraphList.add(name);
return mResult.getImmutableGraph();
}
throw new NoSuchEntityException(name);
}
@Override
public Graph getMGraph(IRI name) throws NoSuchEntityException {
throw new NoSuchEntityException(name);
}
@Override
public Graph getGraph(IRI name) throws NoSuchEntityException {
return getImmutableGraph(name);
}
@Override
public Graph createGraph(IRI name) {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public ImmutableGraph createImmutableGraph(IRI name, Graph triples) {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void deleteGraph(IRI name) throws NoSuchEntityException,
EntityUndeletableException {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public Set<IRI> getNames(ImmutableGraph ImmutableGraph) {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public Set<IRI> listGraphs() {
return Collections.singleton(TcManagerTest.uriRefA);
}
@Override
public Set<IRI> listMGraphs() {
return mGraphList;
}
@Override
public Set<IRI> listImmutableGraphs() {
return listGraphs();
}
}
|
[
"reto@apache.org"
] |
reto@apache.org
|
b89db5d3c9e23f1b7efb45493198e6c11ef14958
|
fb83241bce8d6e500ae6b58363d0cae77529d973
|
/src/com/reason/merlin/types/MerlinErrorType.java
|
7befc69c4a8b4bd0516f69d094704f697b066c05
|
[
"MIT"
] |
permissive
|
okonet/reasonml-idea-plugin
|
37b93f2c8d57116851ca401608fdec9ad8252e20
|
dc95e0051e31df68b7837b85726cbd61aede713e
|
refs/heads/master
| 2023-08-25T18:53:48.989038
| 2017-09-14T07:14:30
| 2017-09-14T07:14:30
| 103,940,022
| 0
| 0
| null | 2017-09-18T13:04:31
| 2017-09-18T13:04:31
| null |
UTF-8
|
Java
| false
| false
| 133
|
java
|
package com.reason.merlin.types;
public enum MerlinErrorType {
type,
error,
parser,
env,
warning,
unknown
}
|
[
"giraud.contact@yahoo.fr"
] |
giraud.contact@yahoo.fr
|
3e7621f3bec6dfcb979229a45d4e8d692c9e31a4
|
fe676a794bd5584ba1d4435aa4555cf116e47dea
|
/src/main/java/org/bian/dto/SDRewardPointsAccountRetrieveOutputModelRewardPointsAccountOfferedServiceRewardPointsAccountServiceRecord.java
|
f4ec9ab2022697793f977bb355c5f77cea030d24
|
[
"Apache-2.0"
] |
permissive
|
bianapis/sd-reward-points-account-v3
|
3fa56d6ca2c88217c88b99cc84b0ef7048a694f6
|
f1ab810c35e41fdd4f5c96b90a5c7e6574452a2d
|
refs/heads/master
| 2022-12-26T17:53:22.063157
| 2020-10-04T15:56:58
| 2020-10-04T15:56:58
| 301,148,866
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,026
|
java
|
package org.bian.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.bian.dto.SDRewardPointsAccountRetrieveOutputModelRewardPointsAccountOfferedServiceRewardPointsAccountServiceRecordRewardPointsAccountServicePoliciesandGuidelines;
import javax.validation.Valid;
/**
* SDRewardPointsAccountRetrieveOutputModelRewardPointsAccountOfferedServiceRewardPointsAccountServiceRecord
*/
public class SDRewardPointsAccountRetrieveOutputModelRewardPointsAccountOfferedServiceRewardPointsAccountServiceRecord {
private String rewardPointsAccountServiceType = null;
private String rewardPointsAccountServiceVersion = null;
private String rewardPointsAccountServiceDescription = null;
private SDRewardPointsAccountRetrieveOutputModelRewardPointsAccountOfferedServiceRewardPointsAccountServiceRecordRewardPointsAccountServicePoliciesandGuidelines rewardPointsAccountServicePoliciesandGuidelines = null;
private String rewardPointsAccountServiceSchedule = null;
/**
* `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Text general-info: Refers to the different types of services offered
* @return rewardPointsAccountServiceType
**/
public String getRewardPointsAccountServiceType() {
return rewardPointsAccountServiceType;
}
public void setRewardPointsAccountServiceType(String rewardPointsAccountServiceType) {
this.rewardPointsAccountServiceType = rewardPointsAccountServiceType;
}
/**
* `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Text general-info: The version details of the service when appropriate
* @return rewardPointsAccountServiceVersion
**/
public String getRewardPointsAccountServiceVersion() {
return rewardPointsAccountServiceVersion;
}
public void setRewardPointsAccountServiceVersion(String rewardPointsAccountServiceVersion) {
this.rewardPointsAccountServiceVersion = rewardPointsAccountServiceVersion;
}
/**
* `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Text general-info: Description of the offered service
* @return rewardPointsAccountServiceDescription
**/
public String getRewardPointsAccountServiceDescription() {
return rewardPointsAccountServiceDescription;
}
public void setRewardPointsAccountServiceDescription(String rewardPointsAccountServiceDescription) {
this.rewardPointsAccountServiceDescription = rewardPointsAccountServiceDescription;
}
/**
* Get rewardPointsAccountServicePoliciesandGuidelines
* @return rewardPointsAccountServicePoliciesandGuidelines
**/
public SDRewardPointsAccountRetrieveOutputModelRewardPointsAccountOfferedServiceRewardPointsAccountServiceRecordRewardPointsAccountServicePoliciesandGuidelines getRewardPointsAccountServicePoliciesandGuidelines() {
return rewardPointsAccountServicePoliciesandGuidelines;
}
public void setRewardPointsAccountServicePoliciesandGuidelines(SDRewardPointsAccountRetrieveOutputModelRewardPointsAccountOfferedServiceRewardPointsAccountServiceRecordRewardPointsAccountServicePoliciesandGuidelines rewardPointsAccountServicePoliciesandGuidelines) {
this.rewardPointsAccountServicePoliciesandGuidelines = rewardPointsAccountServicePoliciesandGuidelines;
}
/**
* `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Text general-info: Schedule defining when the accessed service is available
* @return rewardPointsAccountServiceSchedule
**/
public String getRewardPointsAccountServiceSchedule() {
return rewardPointsAccountServiceSchedule;
}
public void setRewardPointsAccountServiceSchedule(String rewardPointsAccountServiceSchedule) {
this.rewardPointsAccountServiceSchedule = rewardPointsAccountServiceSchedule;
}
}
|
[
"spabandara@Virtusa.com"
] |
spabandara@Virtusa.com
|
128e849eede6c6d326dbe7c51b0b0647f27881fc
|
354f9bb6cba05fe1837f4409a5c3b41ecd443791
|
/testprograms/gello-compilersource/Compiler/src/org/gello/grammar/node/PMethodInvocation.java
|
0d53fbd9b48f2785090a57970affa330daf464ac
|
[] |
no_license
|
ingoha/pwdt-ss10
|
915fe8279657a4f7e0de6750fded85d3a0165a12
|
fb40efa326cdda9051a28a09ce55b4d531e72813
|
refs/heads/master
| 2016-08-07T10:22:31.482185
| 2010-06-24T08:18:52
| 2010-06-24T08:18:52
| 32,255,798
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 185
|
java
|
/* This file was generated by SableCC (http://www.sablecc.org/). */
package org.gello.grammar.node;
public abstract class PMethodInvocation extends Node
{
// Empty body
}
|
[
"ingoha@users.noreply.github.com"
] |
ingoha@users.noreply.github.com
|
c1a166dc2e0ac7537a7769af035308b23db258e5
|
f7a25da32609d722b7ac9220bf4694aa0476f7b2
|
/net/minecraft/world/level/levelgen/feature/SimpleRandomFeatureConfig.java
|
540f705ffd36c494d4ff84e1ac602a4d9e22dc39
|
[] |
no_license
|
basaigh/temp
|
89e673227e951a7c282c50cce72236bdce4870dd
|
1c3091333f4edb2be6d986faaa026826b05008ab
|
refs/heads/master
| 2023-05-04T22:27:28.259481
| 2021-05-31T17:15:09
| 2021-05-31T17:15:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,745
|
java
|
package net.minecraft.world.level.levelgen.feature;
import java.util.Map;
import com.google.common.collect.ImmutableMap;
import com.mojang.datafixers.Dynamic;
import com.mojang.datafixers.types.DynamicOps;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.List;
public class SimpleRandomFeatureConfig implements FeatureConfiguration {
public final List<ConfiguredFeature<?>> features;
public SimpleRandomFeatureConfig(final List<ConfiguredFeature<?>> list) {
this.features = list;
}
public SimpleRandomFeatureConfig(final Feature<?>[] arr, final FeatureConfiguration[] arr) {
this((List<ConfiguredFeature<?>>)IntStream.range(0, arr.length).mapToObj(integer -> SimpleRandomFeatureConfig.<FeatureConfiguration>getConfiguredFeature((Feature<FeatureConfiguration>)arr[integer], arr[integer])).collect(Collectors.toList()));
}
private static <FC extends FeatureConfiguration> ConfiguredFeature<FC> getConfiguredFeature(final Feature<FC> cbn, final FeatureConfiguration cbo) {
return new ConfiguredFeature<FC>(cbn, (FC)cbo);
}
public <T> Dynamic<T> serialize(final DynamicOps<T> dynamicOps) {
return (Dynamic<T>)new Dynamic((DynamicOps)dynamicOps, dynamicOps.createMap((Map)ImmutableMap.of(dynamicOps.createString("features"), dynamicOps.createList(this.features.stream().map(cal -> cal.serialize(dynamicOps).getValue())))));
}
public static <T> SimpleRandomFeatureConfig deserialize(final Dynamic<T> dynamic) {
final List<ConfiguredFeature<?>> list2 = (List<ConfiguredFeature<?>>)dynamic.get("features").asList(ConfiguredFeature::deserialize);
return new SimpleRandomFeatureConfig(list2);
}
}
|
[
"mark70326511@gmail.com"
] |
mark70326511@gmail.com
|
06247c63048e1bd86ac63bb134ddd8ad51176a8f
|
ecf796983785c4e92a1377b3271b5b1cf66a6495
|
/Projects/消站vs沈毅/eshop/app/src/main/java/com/gfd/eshop/network/api/ApiUserInfo.java
|
55c4f375f7c49ff544ae4c05dd66c3ba4d736f35
|
[] |
no_license
|
rongcloud-community/RongCloud_Hackathon_2020
|
1b56de94b470229242d3680ac46d6a00c649c7d6
|
d4ef61d24cfed142cd90f7d1d8dcd19fb5cbf015
|
refs/heads/master
| 2022-07-27T18:24:19.210225
| 2020-10-16T01:14:41
| 2020-10-16T01:14:41
| 286,389,237
| 6
| 129
| null | 2020-10-16T05:44:11
| 2020-08-10T05:59:35
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 1,122
|
java
|
package com.gfd.eshop.network.api;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.gfd.eshop.network.core.ApiInterface;
import com.gfd.eshop.network.core.ApiPath;
import com.gfd.eshop.network.core.RequestParam;
import com.gfd.eshop.network.core.ResponseEntity;
import com.gfd.eshop.network.entity.User;
import com.google.gson.annotations.SerializedName;
/**
* 获取用户信息
*/
public class ApiUserInfo implements ApiInterface {
@NonNull
@Override public String getPath() {
return ApiPath.USER_INFO;
}
@Nullable
@Override public RequestParam getRequestParam() {
return new Req();
}
@NonNull @Override public Class<? extends ResponseEntity> getResponseType() {
return Rsp.class;
}
public static class Req extends RequestParam {
@Override protected int sessionUsage() {
return SESSION_MANDATORY;
}
}
public static class Rsp extends ResponseEntity {
@SerializedName("data") private User mUser;
public User getUser() {
return mUser;
}
}
}
|
[
"geekonline@126.com"
] |
geekonline@126.com
|
bbc09a8cc74797654f1ff7f84b62430375d32183
|
bcbd5cdbec730aec758a94fcd8b0136171f08663
|
/bench4bl/spring/shdp/sources/SHDP_2_1_1/spring-hadoop-store/src/test/java/org/springframework/data/hadoop/store/split/SlopBlockSplitterTests.java
|
9a23b02f2215c36550b8343fd2e2e0fc2ef4cb03
|
[
"Apache-2.0"
] |
permissive
|
RosePasta/BugTypeBasedIRBL
|
28c85e1d7f28b2da8a2f12cc4d9c24754a0afe90
|
55b0f82cf185a3a871926cc7a266072f8e497510
|
refs/heads/master
| 2022-05-06T08:38:38.138869
| 2022-04-20T06:34:38
| 2022-04-20T06:34:38
| 188,862,575
| 1
| 3
| null | 2019-11-21T09:48:44
| 2019-05-27T14:52:28
|
Java
|
UTF-8
|
Java
| false
| false
| 2,975
|
java
|
/*
* Copyright 2014 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.data.hadoop.store.split;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;
import java.util.List;
import org.apache.hadoop.fs.Path;
import org.junit.Test;
/**
* Tests for {@link SlopBlockSplitter}.
*
* @author Janne Valkealahti
*
*/
public class SlopBlockSplitterTests extends AbstractSplitterTests {
@Test
public void testOneBlockNoSplit() throws Exception {
Path path = mockWithFileSystem(1,100);
SlopBlockSplitter splitter = new SlopBlockSplitter(CONFIGURATION);
List<Split> splits = splitter.getSplits(path);
assertThat(splits, notNullValue());
assertThat(splits.size(), is(1));
}
@Test
public void testSlopOverflows() throws Exception {
Path path = mockWithFileSystem(1,100,10);
SlopBlockSplitter splitter = new SlopBlockSplitter(CONFIGURATION);
List<Split> splits = splitter.getSplits(path);
assertThat(splits, notNullValue());
assertThat(splits.size(), is(1));
}
@Test
public void testSlopRemainingBlockTooLarge() throws Exception {
Path path = mockWithFileSystem(1,100,11);
SlopBlockSplitter splitter = new SlopBlockSplitter(CONFIGURATION);
List<Split> splits = splitter.getSplits(path);
assertThat(splits, notNullValue());
assertThat(splits.size(), is(2));
}
@Test
public void testTwoBlocksSplitByBlock() throws Exception {
Path path = mockWithFileSystem(2,100);
SlopBlockSplitter splitter = new SlopBlockSplitter(CONFIGURATION);
List<Split> splits = splitter.getSplits(path);
assertThat(splits, notNullValue());
assertThat(splits.size(), is(2));
}
@Test
public void testTwoBlocksSlopOverflows() throws Exception {
Path path = mockWithFileSystem(2,100,10);
SlopBlockSplitter splitter = new SlopBlockSplitter(CONFIGURATION);
List<Split> splits = splitter.getSplits(path);
assertThat(splits, notNullValue());
assertThat(splits.size(), is(2));
}
@Test
public void testTwoBlocksSlopRemainingBlockTooLarge() throws Exception {
Path path = mockWithFileSystem(2,100,50);
SlopBlockSplitter splitter = new SlopBlockSplitter(CONFIGURATION);
List<Split> splits = splitter.getSplits(path);
assertThat(splits, notNullValue());
assertThat(splits.size(), is(3));
}
}
|
[
"MisooKim@github.com"
] |
MisooKim@github.com
|
05710c3932a35b94441062d6000777fe32296166
|
8160730dbfc837ba0f5882743c84e5ec22756879
|
/cloudnet-modules/cloudnet-bridge/src/main/java/de/dytanic/cloudnet/ext/bridge/nukkit/event/NukkitNetworkClusterNodeInfoUpdateEvent.java
|
d8bbcd6e8a9a105f427a8ffade3aaa42d1becd07
|
[] |
no_license
|
derrop/CloudNet-v3
|
60198fdbade1e6a532650811f61e3e939f326163
|
754a196b07efb2a4b8574001b996d9e0a133f30c
|
refs/heads/master
| 2020-07-25T23:00:44.559269
| 2019-06-21T12:28:55
| 2019-06-21T12:29:54
| 208,450,593
| 0
| 0
| null | 2019-12-22T12:40:04
| 2019-09-14T14:17:37
| null |
UTF-8
|
Java
| false
| false
| 523
|
java
|
package de.dytanic.cloudnet.ext.bridge.nukkit.event;
import cn.nukkit.event.HandlerList;
import de.dytanic.cloudnet.driver.network.cluster.NetworkClusterNodeInfoSnapshot;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
public final class NukkitNetworkClusterNodeInfoUpdateEvent extends NukkitCloudNetEvent {
@Getter
private static final HandlerList handlers = new HandlerList();
@Getter
private final NetworkClusterNodeInfoSnapshot networkClusterNodeInfoSnapshot;
}
|
[
"tarekhosni1410@hotmail.com"
] |
tarekhosni1410@hotmail.com
|
fbb50ea0f85ce7e7d1bd8c3186ba63e36b4a7536
|
9230f7878eb9c2c438aa0f5b39538f2b50b15547
|
/extra/src/java/Namaste/chatWindow (2020_11_27 05_50_42 UTC).java
|
abf1f8817213b7b9dbbefe86d3604dfc8a4b4676
|
[] |
no_license
|
Himanshu-abc/NetBeans_projects_2017
|
29d537855b19705c1e53009e97db5830652bac04
|
e8009d5f1d05223e092521f9a28acb42f879f268
|
refs/heads/master
| 2023-07-06T21:28:15.394202
| 2021-08-14T16:13:44
| 2021-08-14T16:13:44
| 396,056,163
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,959
|
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 Namaste;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
/**
*
* @author amansehgal
*/
@WebServlet(name = "chatWindow", urlPatterns = {"/chatWindow"})
public class chatWindow extends HttpServlet {
String username,tempName;
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
response.setContentType("text/html;charset=UTF-8");
try (PrintWriter out = response.getWriter())
{
/* TODO output your page here. You may use following sample code. */
String message = request.getParameter("txtMsg"); //Extract Message
String username = session.getAttribute("username").toString(); //Extract Username
//Display Chat Room
out.println("<html> <head> <body bgcolor=\"#7CFC00\"> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"> <title>Chat Room</title> </head>");
out.println("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"> <center>");
out.println("<h2>Hi ");
out.println(username);
out.println("<br> Welcome to ASAP Chat ");
out.println("</h2><br><hr>");
out.println(" <body>");
out.println(" <form name=\"chatWindow\" action=\"chatWindow\">");
out.println("Message: <input type=\"text\" name=\"txtMsg\" value=\"\" /><input type=\"submit\" value=\"Send\" name=\"cmdSend\"/>");
out.println("<br><br> <a href=\"chatWindow\">Refresh Chat Room</a>");
out.println("<br> <br>");
out.println("Messages in Chat Box:");
out.println("<br><br>");
out.println("<textarea readonly=\"readonly\" name=\"txtMessage\" rows=\"20\" cols=\"60\">");
//If eneterd message != null then insert into database
if(request.getParameter("txtMsg")!=null)
{
try
{
Class.forName("oracle.jdbc.OracleDriver");
java.sql.Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE","system","apocalypse");
Statement st=con.createStatement();
String sql = "insert into hello_message_f values ('"+username+"','"+message+"')";
st.executeUpdate(sql);
st.execute("commit");
}
catch(Exception ex1)
{
System.err.println(ex1.getMessage());
String messages = "No";
out.println(messages);
}
}
// Retrieve all messages from database
try
{
Class.forName("oracle.jdbc.OracleDriver");
java.sql.Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE","system","apocalypse");
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select *from hello_message_f");
// Print all retrieved messages
while(rs.next())
{
String messages =rs.getString(1)+ " : " + rs.getString(2);
out.println(messages);
}
con.close();
}
catch(Exception ex1)
{
System.err.println(ex1.getMessage());
}
out.println("</textarea>");
out.println("<hr>");
out.println("</form>");
out.println("</body>");
out.println("</html>");
}
}
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
//Session
session = request.getSession();
if(username!=null)
{
tempName=username;
}
processRequest(request, response);
}
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}
@Override
public String getServletInfo() {
return "Short description";
}// </editor-fold>
HttpSession session;
}
|
[
"himanshupatidar663@gmail.com"
] |
himanshupatidar663@gmail.com
|
5c40e56e8e2967942d814476be88f9c2f5649751
|
83e0a61589395877822df28a56b9099fdcbd636a
|
/android/agpIntegrationTestSrc/com/android/tools/idea/res/ModuleResourceRepositoryGradleTest.java
|
e470a54ab24f6bfd3d97b73ad174ed1fd71bd8ce
|
[
"Apache-2.0"
] |
permissive
|
jbeckers/android
|
1ce4e9c33490e3f91299ad70cace70f17569314f
|
b69d0674223461ac2129f762110d121205999ee1
|
refs/heads/master
| 2023-03-17T01:54:41.955844
| 2023-02-14T15:52:19
| 2023-02-15T10:16:53
| 62,634,667
| 0
| 0
| null | 2019-06-04T05:36:09
| 2016-07-05T12:22:35
|
Java
|
UTF-8
|
Java
| false
| false
| 4,244
|
java
|
/*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.tools.idea.res;
import static com.android.ide.common.rendering.api.ResourceNamespace.RES_AUTO;
import static com.android.tools.idea.testing.AndroidGradleTests.waitForSourceFolderManagerToProcessUpdates;
import static com.android.tools.idea.testing.TestProjectPaths.PROJECT_WITH_APPAND_LIB;
import static com.google.common.truth.Truth.assertThat;
import static com.intellij.testFramework.VfsTestUtil.createFile;
import com.android.ide.common.resources.ResourceItem;
import com.android.resources.ResourceType;
import com.android.tools.idea.testing.AndroidGradleTestCase;
import com.google.common.collect.Iterables;
import com.intellij.openapi.Disposable;
import com.intellij.openapi.project.ProjectUtil;
import com.intellij.openapi.util.Disposer;
import com.intellij.psi.PsiDocumentManager;
import java.util.List;
/** Tests for {@link ModuleResourceRepository} based on {@link AndroidGradleTestCase}. */
public class ModuleResourceRepositoryGradleTest extends AndroidGradleTestCase {
private void commitAllDocumentsAndWaitForUpdatesToPropagate() throws Exception {
PsiDocumentManager.getInstance(getProject()).commitAllDocuments();
waitForSourceFolderManagerToProcessUpdates(getProject());
}
/**
* This test provides additional coverage relative to ModuleResourceRepositoryTest.testOverlays by exercising
* the ModuleResourceRepository.forMainResources method that may affect resource overlay order. See http://b/117805863.
*/
public void testOverlayOrder() throws Exception {
loadProject(PROJECT_WITH_APPAND_LIB);
createFile(
ProjectUtil.guessProjectDir(getProject()),
"app/src/debug/res/values/strings.xml",
"" +
"<resources>\n" +
" <string name=\"app_name\">This app_name definition should win</string>\n" +
"</resources>");
commitAllDocumentsAndWaitForUpdatesToPropagate();
LocalResourceRepository repository = ResourceRepositoryManager.getModuleResources(myAndroidFacet);
List<ResourceItem> resources = repository.getResources(RES_AUTO, ResourceType.STRING, "app_name");
assertThat(resources).hasSize(1);
// Check that the debug version of app_name takes precedence over the default on.
assertThat(resources.get(0).getResourceValue().getValue()).isEqualTo("This app_name definition should win");
}
/**
* Checks that test res folders created between syncs are picked up by ResourceFolderManager and handled by ModuleResourceRepository.
*/
public void testTestFolders() throws Exception {
loadSimpleApplication();
LocalResourceRepository repository = ModuleResourceRepository.forTestResources(myAndroidFacet, RES_AUTO);
if (repository instanceof Disposable) {
Disposer.register(myAndroidFacet, (Disposable)repository);
}
assertThat(repository.getAllResources()).isEmpty();
createFile(
ProjectUtil.guessProjectDir(getProject()),
"app/src/androidTest/res/values/strings.xml",
"" +
"<resources>\n" +
" <string name=\"test_res\">test res value</string>\n" +
"</resources>");
commitAllDocumentsAndWaitForUpdatesToPropagate();
List<ResourceItem> newResources = repository.getAllResources();
assertThat(newResources).hasSize(1);
ResourceItem resourceItem = Iterables.getOnlyElement(newResources);
assertThat(resourceItem.getNamespace()).isEqualTo(RES_AUTO);
assertThat(resourceItem.getType()).isEqualTo(ResourceType.STRING);
assertThat(resourceItem.getName()).isEqualTo("test_res");
assertThat(resourceItem.getResourceValue().getValue()).isEqualTo("test res value");
}
}
|
[
"intellij-monorepo-bot-no-reply@jetbrains.com"
] |
intellij-monorepo-bot-no-reply@jetbrains.com
|
93b3ae632d4fd06ef89e8bd0a1cb5d95faa672f4
|
ff6bcd13f4d1c8715353ebb0460e851fdac0e30f
|
/app/src/main/java/nico/styTool/CmdFEAT.java
|
582b9535c3bba326715632fd1cd9baed94fd7c79
|
[
"Apache-2.0"
] |
permissive
|
xiao00kang/styT
|
1a00b8a5feffcb6abb5d43552b8e256fc0373824
|
aa35b6f2731b79bc883eba6c521358c77ed9925a
|
refs/heads/master
| 2021-05-14T12:23:28.009646
| 2018-01-05T08:44:22
| 2018-01-05T08:44:22
| 116,406,864
| 1
| 0
| null | 2018-01-05T16:51:40
| 2018-01-05T16:51:39
| null |
UTF-8
|
Java
| false
| false
| 1,229
|
java
|
/*
Copyright 2009 David Revell
This file is part of SwiFTP.
SwiFTP is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
SwiFTP is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with SwiFTP. If not, see <http://www.gnu.org/licenses/>.
*/
package nico.styTool;
public class CmdFEAT extends FtpCmd implements Runnable {
public static final String message = "TEMPLATE!!";
public CmdFEAT(SessionThread sessionThread, String input) {
super(sessionThread, CmdFEAT.class.toString());
}
public void run() {
//sessionThread.writeString("211 No extended features\r\n");
sessionThread.writeString("211-Features supported\r\n");
sessionThread.writeString(" UTF8\r\n"); // advertise UTF8 support (fixes bug 14)
sessionThread.writeString("211 End\r\n");
//.l(Log.DEBUG, "Gave FEAT response");
}
}
|
[
"root@localhost"
] |
root@localhost
|
1e3d6db796009eaef5e05a19a55ace349f8de221
|
0aaee0405b164a9d39709738dcee6d5fd9a5aed6
|
/src/main/com/pp/shopping/module/sys/dao/ReceiveAddressMapper.java
|
446ca859c821d202a015eb08b88e07fbf3bba121
|
[] |
no_license
|
eagle-peter/mall
|
7d5161e3324a1fe2e874a672c5d3419631c901df
|
33d8643041209e7534d28d91bf4f7ce872cb428b
|
refs/heads/master
| 2021-09-15T16:54:49.675173
| 2018-06-07T08:10:57
| 2018-06-07T08:10:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 692
|
java
|
/*
* ReceiveAddressMapper.java
* Copyright(C) 2016-2025 捷远公司
* All rights reserved.
* -----------------------------------------------
* 2018-04-04 Created
*/
package com.pp.shopping.module.sys.dao;
import com.pp.shopping.module.sys.model.ReceiveAddress;
import org.springframework.stereotype.Repository;
/**
* 收获地址mapper
*/
@Repository
public interface ReceiveAddressMapper {
int deleteByPrimaryKey(long id);
int insert(ReceiveAddress record);
int insertSelective(ReceiveAddress record);
ReceiveAddress selectByPrimaryKey(long id);
int updateByPrimaryKeySelective(ReceiveAddress record);
int updateByPrimaryKey(ReceiveAddress record);
}
|
[
"123456"
] |
123456
|
919ff47e8659a2c785ea5f00cf4dad0bedddf9c5
|
72cee097005539f1860cd2381d12108236741a03
|
/eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/test/java/org/apache/eagle/alert/engine/statecheck/TestStateCheckPolicy.java
|
1af8f92fafdcbce468f7deac15582af17ad65685
|
[
"Apache-2.0",
"MIT",
"BSD-2-Clause"
] |
permissive
|
phenixmzy/apache-eagle-0.5.0
|
f43247ff9c2aea85d2c066794ef5bb00a093f839
|
0598e55d027083838c013b9a7171c0d72a7072a1
|
refs/heads/master
| 2022-11-22T18:28:13.891207
| 2019-08-19T03:02:25
| 2019-08-19T03:02:25
| 182,820,976
| 0
| 1
|
Apache-2.0
| 2022-11-15T02:57:01
| 2019-04-22T15:58:42
|
Java
|
UTF-8
|
Java
| false
| false
| 7,183
|
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
* <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 org.apache.eagle.alert.engine.statecheck;
import org.apache.storm.task.GeneralTopologyContext;
import org.apache.storm.task.IOutputCollector;
import org.apache.storm.task.OutputCollector;
import org.apache.storm.tuple.Fields;
import org.apache.storm.tuple.Tuple;
import org.apache.storm.tuple.TupleImpl;
import org.apache.eagle.alert.coordination.model.AlertBoltSpec;
import org.apache.eagle.alert.engine.coordinator.PolicyDefinition;
import org.apache.eagle.alert.engine.coordinator.PublishPartition;
import org.apache.eagle.alert.engine.coordinator.StreamDefinition;
import org.apache.eagle.alert.engine.evaluator.impl.PolicyGroupEvaluatorImpl;
import org.apache.eagle.alert.engine.model.AlertStreamEvent;
import org.apache.eagle.alert.engine.model.PartitionedEvent;
import org.apache.eagle.alert.engine.model.StreamEvent;
import org.apache.eagle.alert.engine.router.TestAlertBolt;
import org.apache.eagle.alert.engine.runner.AlertBolt;
import org.apache.eagle.alert.utils.AlertConstants;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.core.type.TypeReference;
import org.jetbrains.annotations.NotNull;
import org.junit.Assert;
import org.junit.Test;
import org.mockito.Mockito;
import java.util.*;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.stream.Collectors;
/**
* Created on 8/4/16.
*/
public class TestStateCheckPolicy {
@Test
public void testStateCheck() throws Exception {
/*PolicyGroupEvaluatorImpl impl = new PolicyGroupEvaluatorImpl("test-statecheck-poicyevaluator");
AtomicBoolean verified = new AtomicBoolean(false);
OutputCollector collector = new OutputCollector(new IOutputCollector() {
@Override
public List<Integer> emit(String streamId, Collection<Tuple> anchors, List<Object> tuple) {
verified.set(true);
Assert.assertEquals("perfmon_latency_check_output2", ((PublishPartition) tuple.get(0)).getStreamId());
AlertStreamEvent event = (AlertStreamEvent) tuple.get(1);
System.out.println(String.format("collector received: [streamId=[%s], tuple=[%s] ", ((PublishPartition) tuple.get(0)).getStreamId(), tuple));
return null;
}
@Override
public void emitDirect(int taskId, String streamId, Collection<Tuple> anchors, List<Object> tuple) {
}
@Override
public void ack(Tuple input) {
}
@Override
public void fail(Tuple input) {
}
@Override
public void reportError(Throwable error) {
}
});
AlertBolt alertBolt = TestAlertBolt.createAlertBolt(collector);
AlertBoltSpec spec = createAlertSpec();
Map<String, StreamDefinition> definitionMap = createStreamMap();
List<PolicyDefinition> policies = mapper.readValue(TestStateCheckPolicy.class.getResourceAsStream("/statecheck/policies.json"),
new TypeReference<List<PolicyDefinition>>() {
});
List<StreamDefinition> streams = mapper.readValue(TestStateCheckPolicy.class.getResourceAsStream("/statecheck/streamdefinitions.json"),
new TypeReference<List<StreamDefinition>>() {
});
spec.addPublishPartition("perfmon_latency_check_output2", policies.get(0).getName(), "testPublishBolt", null);
alertBolt.onAlertBoltSpecChange(spec, definitionMap);
// send data now
sendData(alertBolt, definitionMap, spec.getBoltPoliciesMap().values().iterator().next().get(0));
Thread.sleep(3000);
Assert.assertTrue(verified.get());*/
}
private void sendData(AlertBolt alertBolt, Map<String, StreamDefinition> definitionMap, PolicyDefinition policyDefinition) {
StreamDefinition definition = definitionMap.get("perfmon_latency_stream");
long base = System.currentTimeMillis();
for (int i = 0; i < 2; i++) {
long time = base + i * 1000;
Map<String, Object> mapdata = new HashMap<>();
mapdata.put("host", "host-1");
mapdata.put("timestamp", time);
mapdata.put("metric", "perfmon_latency");
mapdata.put("pool", "raptor");
mapdata.put("value", 1000.0 + i * 1000.0);
mapdata.put("colo", "phx");
StreamEvent event = StreamEvent.builder().timestamep(time).attributes(mapdata, definition).build();
PartitionedEvent pEvent = new PartitionedEvent(event, policyDefinition.getPartitionSpec().get(0), 1);
GeneralTopologyContext mock = Mockito.mock(GeneralTopologyContext.class);
Mockito.when(mock.getComponentId(1)).thenReturn("taskId");
Mockito.when(mock.getComponentOutputFields("taskId", "test-stream-id")).thenReturn(new Fields(AlertConstants.FIELD_0));
TupleImpl ti = new TupleImpl(mock, Collections.singletonList(pEvent), 1, "test-stream-id");
alertBolt.execute(ti);
}
}
@NotNull
private Map<String, StreamDefinition> createStreamMap() throws Exception {
List<StreamDefinition> streams = mapper.readValue(TestStateCheckPolicy.class.getResourceAsStream("/statecheck/streamdefinitions.json"),
new TypeReference<List<StreamDefinition>>() {
});
return streams.stream().collect(Collectors.toMap(StreamDefinition::getStreamId, item -> item));
}
private static ObjectMapper mapper = new ObjectMapper();
static {
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
}
private AlertBoltSpec createAlertSpec() throws Exception {
AlertBoltSpec spec = new AlertBoltSpec();
spec.setVersion("version1");
spec.setTopologyName("testTopology");
List<PolicyDefinition> policies = mapper.readValue(TestStateCheckPolicy.class.getResourceAsStream("/statecheck/policies.json"),
new TypeReference<List<PolicyDefinition>>() {
});
Assert.assertTrue(policies.size() > 0);
spec.addBoltPolicy("alertBolt1", policies.get(0).getName());
spec.getBoltPoliciesMap().put("alertBolt1", new ArrayList<>(policies));
return spec;
}
}
|
[
"wingmazhiyong@gmail.com"
] |
wingmazhiyong@gmail.com
|
880e16c9e0fb6c77787fb4f838e2e8e5732212c8
|
2255f14624f426795e467465188d33f23868d045
|
/jobs/pacman-awsrules/src/main/java/com/tmobile/cloud/awsrules/guardduty/CheckGuardDutyFindingsExists.java
|
fdbae41abce32b1d4a369c4fc3cb964be7e702f5
|
[
"Apache-2.0"
] |
permissive
|
sajeer-nooh/pacbot
|
078a5178e08ccdfbca6c3a5d94b2ef19d9b40944
|
aa9afde5072ed19fe37a04ab25b5f87342b3f5ae
|
refs/heads/master
| 2020-04-30T22:57:14.193272
| 2020-01-21T08:15:00
| 2020-01-21T08:15:00
| 177,132,203
| 1
| 1
|
Apache-2.0
| 2020-01-21T08:15:01
| 2019-03-22T11:59:19
|
Java
|
UTF-8
|
Java
| false
| false
| 5,887
|
java
|
/*******************************************************************************
* Copyright 2018 T Mobile, Inc. or its affiliates. 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.
******************************************************************************/
/**
Copyright (C) 2017 T Mobile Inc - All Rights Reserve
Purpose:
Author :u55262
Modified Date: Sep 19, 2017
**/
package com.tmobile.cloud.awsrules.guardduty;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.MDC;
import com.amazonaws.util.StringUtils;
import com.tmobile.cloud.awsrules.utils.PacmanUtils;
import com.tmobile.cloud.constants.PacmanRuleConstants;
import com.tmobile.pacman.commons.PacmanSdkConstants;
import com.tmobile.pacman.commons.exception.InvalidInputException;
import com.tmobile.pacman.commons.rule.Annotation;
import com.tmobile.pacman.commons.rule.BaseRule;
import com.tmobile.pacman.commons.rule.PacmanRule;
import com.tmobile.pacman.commons.rule.RuleResult;
@PacmanRule(key = "check-guard-duty-findings-exists", desc = "checks guard duty findings exists for a given instance", severity = PacmanSdkConstants.SEV_HIGH, category = PacmanSdkConstants.GOVERNANCE)
public class CheckGuardDutyFindingsExists extends BaseRule {
private static final Logger logger = LoggerFactory
.getLogger(CheckGuardDutyFindingsExists.class);
/**
* The method will get triggered from Rule Engine with following parameters
*
* @param ruleParam
*
* ************* Following are the Rule Parameters********* <br>
* <br>
*
* severity : Enter the value of severity <br>
* <br>
*
* ruleCategory : Enter the value of category <br>
* <br>
*
* esGuardDutyUrl : Give the guard duty ES url's <br>
* <br>
*
* ruleKey : check-guard-duty-findings-exists <br>
* <br>
*
* threadsafe : if true , rule will be executed on multiple
* threads <br>
* <br>
*
* @param resourceAttributes
* this is a resource in context which needs to be scanned this
* is provided by execution engine
*
*/
public RuleResult execute(final Map<String, String> ruleParam,
Map<String, String> resourceAttributes) {
logger.debug("========CheckGuardDutyFindingsExists started=========");
String resourceId = null;
Annotation annotation = null;
String severity = ruleParam.get(PacmanRuleConstants.SEVERITY);
String category = ruleParam.get(PacmanRuleConstants.CATEGORY);
String guardDutyEsUrl = null;
String formattedUrl = PacmanUtils.formatUrl(ruleParam,PacmanRuleConstants.ES_GUARD_DUTY_URL);
if(!StringUtils.isNullOrEmpty(formattedUrl)){
guardDutyEsUrl = formattedUrl;
}
MDC.put("executionId", ruleParam.get("executionId"));
MDC.put("ruleId", ruleParam.get(PacmanSdkConstants.RULE_ID));
List<LinkedHashMap<String, Object>> issueList = new ArrayList();
LinkedHashMap<String, Object> issue = new LinkedHashMap<>();
if (!PacmanUtils.doesAllHaveValue(severity, category, guardDutyEsUrl)) {
logger.info(PacmanRuleConstants.MISSING_CONFIGURATION);
throw new InvalidInputException(PacmanRuleConstants.MISSING_CONFIGURATION);
}
if (resourceAttributes != null) {
resourceId = StringUtils.trim(resourceAttributes
.get(PacmanSdkConstants.RESOURCE_ID));
Boolean isGuardDutyFindingsExists = PacmanUtils
.isGuardDutyFindingsExists(resourceId, guardDutyEsUrl,
PacmanRuleConstants.GUARD_DUTY_INSTANCE_ATTR);
if (isGuardDutyFindingsExists) {
annotation = Annotation.buildAnnotation(ruleParam,
Annotation.Type.ISSUE);
annotation.put(PacmanSdkConstants.DESCRIPTION,
"Guard Duty findings exists!!");
annotation.put(PacmanRuleConstants.SEVERITY, severity);
annotation.put(PacmanRuleConstants.CATEGORY, category);
issue.put(PacmanRuleConstants.VIOLATION_REASON,
"Ec2 instance associated to a guard duty!!");
issueList.add(issue);
annotation.put("issueDetails", issueList.toString());
logger.debug("========CheckGuardDutyFindingsExists ended with annotation {} :=========",annotation);
return new RuleResult(PacmanSdkConstants.STATUS_FAILURE,
PacmanRuleConstants.FAILURE_MESSAGE, annotation);
}
}
logger.debug("========CheckGuardDutyFindingsExists ended=========");
return new RuleResult(PacmanSdkConstants.STATUS_SUCCESS,
PacmanRuleConstants.SUCCESS_MESSAGE);
}
public String getHelpText() {
return "This rule checks guard duty findings exists for a given instance";
}
}
|
[
"kumar.kamal@gmail.com"
] |
kumar.kamal@gmail.com
|
2fa37ec07a5b709edbb920fa1ff3997759210d2b
|
ff05965a1216a8b5f17285f438558e6ed06e0db4
|
/systests/jaxws/src/test/java/org/apache/cxf/systest/handlers/HandlerServer.java
|
82dce9ee35920aacdd080e25d143e57f0c9a7e14
|
[] |
no_license
|
liucong/jms4cxf2
|
5ba89e857e9c6a4c542dffe0a13b3f704a19be77
|
56f6d8211dba6704348ee7e7551aa1a1f2c4d889
|
refs/heads/master
| 2023-01-09T18:08:51.730922
| 2009-09-16T03:16:48
| 2009-09-16T03:16:48
| 194,633
| 1
| 4
| null | 2023-01-02T21:54:29
| 2009-05-07T03:43:06
|
Java
|
UTF-8
|
Java
| false
| false
| 1,766
|
java
|
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.cxf.systest.handlers;
import javax.xml.ws.Endpoint;
import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
public class HandlerServer extends AbstractBusTestServerBase {
protected void run() {
Object implementor = new AddNumbersImpl();
String address = "http://localhost:9025/handlers/AddNumbersService/AddNumbersPort";
Endpoint.publish(address, implementor);
Object implementor1 = new org.apache.hello_world_xml_http.wrapped.GreeterImpl();
String address1 = "http://localhost:9007/XMLService/XMLDispatchPort";
Endpoint.publish(address1, implementor1);
}
public static void main(String[] args) {
try {
HandlerServer s = new HandlerServer();
s.start();
} catch (Exception ex) {
ex.printStackTrace();
System.exit(-1);
} finally {
System.out.println("done!");
}
}
}
|
[
"liucong07@gmail.com"
] |
liucong07@gmail.com
|
da4095fe7924f7cc362fc2c3693e6528d537ff24
|
08330591e580e1fbb8af31890eaff79cc39734e2
|
/demos/src/main/java/gleem/TestMultiWin.java
|
df632887e3946c9c16967191eafd7eb09c5bbeb7
|
[] |
no_license
|
dmitrykolesnikovich/redbook
|
de536631cb461165af413c8cd16a9e3a6d35f0f3
|
6fae1078b0bf38485cb1e3cb19f10448c053e378
|
refs/heads/master
| 2020-03-07T15:58:41.431115
| 2018-04-03T17:25:11
| 2018-04-03T17:25:11
| 127,569,535
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,989
|
java
|
/*
* gleem -- OpenGL Extremely Easy-To-Use Manipulators.
* Copyright (C) 1998-2003 Kenneth B. Russell (kbrussel@alum.mit.edu)
*
* Copying, distribution and use of this software in source and binary
* forms, with or without modification, is permitted provided that the
* following conditions are met:
*
* Distributions of source code must reproduce the copyright notice,
* this list of conditions and the following disclaimer in the source
* code header files; and Distributions of binary code must reproduce
* the copyright notice, this list of conditions and the following
* disclaimer in the documentation, Read me file, license file and/or
* other materials provided with the software distribution.
*
* The names of Sun Microsystems, Inc. ("Sun") and/or the copyright
* holder may not be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED "AS IS," WITHOUT A WARRANTY OF ANY
* KIND. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
* WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, NON-INTERFERENCE, ACCURACY OF
* INFORMATIONAL CONTENT OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. THE
* COPYRIGHT HOLDER, SUN AND SUN'S LICENSORS SHALL NOT BE LIABLE FOR
* ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
* DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL THE
* COPYRIGHT HOLDER, SUN OR SUN'S LICENSORS BE LIABLE FOR ANY LOST
* REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL,
* CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND
* REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR
* INABILITY TO USE THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
* OF SUCH DAMAGES. YOU ACKNOWLEDGE THAT THIS SOFTWARE IS NOT
* DESIGNED, LICENSED OR INTENDED FOR USE IN THE DESIGN, CONSTRUCTION,
* OPERATION OR MAINTENANCE OF ANY NUCLEAR FACILITY. THE COPYRIGHT
* HOLDER, SUN AND SUN'S LICENSORS DISCLAIM ANY EXPRESS OR IMPLIED
* WARRANTY OF FITNESS FOR SUCH USES.
*/
package gleem;
import com.jogamp.opengl.*;
import com.jogamp.opengl.awt.AWTGLAutoDrawable;
import com.jogamp.opengl.awt.GLCanvas;
import com.jogamp.opengl.glu.GLU;
import gleem.linalg.Vec3f;
import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
/**
* Tests viewing manipulators in multiple winodws.
*/
public class TestMultiWin {
private static final int X_SIZE = 400;
private static final int Y_SIZE = 400;
private static HandleBoxManip manip;
private static void showFrame(String name, Point location) {
Frame frame = new Frame(name);
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
});
frame.setLayout(new BorderLayout());
GLCanvas canvas = new GLCanvas();
canvas.setSize(400, 400);
canvas.addGLEventListener(new Listener());
frame.add(canvas, BorderLayout.CENTER);
frame.pack();
frame.setLocation(location);
frame.setVisible(true);
}
public static void main(String[] args) {
// Instantiate HandleBoxManip
manip = new HandleBoxManip();
manip.setTranslation(new Vec3f(0, 0, -10));
showFrame("MultiWin Test 1/2", new Point(0, 0));
showFrame("MultiWin Test 2/2", new Point(400, 0));
}
static class HandleBoxManipBSphereProvider implements BSphereProvider {
private HandleBoxManip manip;
private HandleBoxManipBSphereProvider(HandleBoxManip manip) {
this.manip = manip;
}
public BSphere getBoundingSphere() {
BSphere bsph = new BSphere();
bsph.setCenter(manip.getTranslation());
Vec3f scale0 = manip.getScale();
Vec3f scale1 = manip.getGeometryScale();
Vec3f scale = new Vec3f();
scale.setX(2.0f * scale0.x() * scale1.x());
scale.setY(2.0f * scale0.y() * scale1.y());
scale.setZ(2.0f * scale0.z() * scale1.z());
bsph.setRadius(scale.length());
return bsph;
}
}
static class Listener implements GLEventListener {
private GLU glu = new GLU();
private CameraParameters params = new CameraParameters();
private ExaminerViewer viewer;
public void init(GLAutoDrawable drawable) {
GL2 gl = drawable.getGL().getGL2();
gl.glClearColor(0, 0, 0, 0);
float[] lightPosition = new float[]{1, 1, 1, 0};
float[] ambient = new float[]{0.0f, 0.0f, 0.0f, 1.0f};
float[] diffuse = new float[]{1.0f, 1.0f, 1.0f, 1.0f};
gl.glLightfv(GL2ES1.GL_LIGHT0, GL2ES1.GL_AMBIENT, ambient, 0);
gl.glLightfv(GL2ES1.GL_LIGHT0, GL2ES1.GL_DIFFUSE, diffuse, 0);
gl.glLightfv(GL2ES1.GL_LIGHT0, GL2ES1.GL_POSITION, lightPosition, 0);
gl.glEnable(GL2ES1.GL_LIGHTING);
gl.glEnable(GL2ES1.GL_LIGHT0);
gl.glEnable(GL.GL_DEPTH_TEST);
params.setPosition(new Vec3f(0, 0, 0));
params.setForwardDirection(Vec3f.NEG_Z_AXIS);
params.setUpDirection(Vec3f.Y_AXIS);
params.setVertFOV((float) (Math.PI / 8.0));
params.setImagePlaneAspectRatio(1);
params.xSize = X_SIZE;
params.ySize = Y_SIZE;
gl.glMatrixMode(GL2ES1.GL_PROJECTION);
gl.glLoadIdentity();
glu.gluPerspective(45, 1, 1, 100);
gl.glMatrixMode(GL2ES1.GL_MODELVIEW);
gl.glLoadIdentity();
// Register the window with the ManipManager
ManipManager manager = ManipManager.getManipManager();
manager.registerWindow((AWTGLAutoDrawable) drawable);
manager.showManipInWindow(manip, (AWTGLAutoDrawable) drawable);
// Instantiate ExaminerViewer
viewer = new ExaminerViewer();
viewer.setUpVector(Vec3f.Y_AXIS);
viewer.attach((AWTGLAutoDrawable) drawable, new HandleBoxManipBSphereProvider(manip));
viewer.viewAll(gl);
}
public void dispose(GLAutoDrawable drawable) {
}
public void display(GLAutoDrawable drawable) {
GL2 gl = drawable.getGL().getGL2();
gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
viewer.update(gl);
ManipManager.getManipManager().updateCameraParameters((AWTGLAutoDrawable) drawable, viewer.getCameraParameters());
ManipManager.getManipManager().render((AWTGLAutoDrawable) drawable, gl);
}
// Unused routines
public void reshape(GLAutoDrawable drawable, int x, int y, int w, int h) {
}
public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {
}
}
}
|
[
"kolesnikovichdn@gmail.com"
] |
kolesnikovichdn@gmail.com
|
e7c9b64b647b2e9d6b4d1dc46ff8f65444e0ed32
|
eb3a129479a5ea1bc722ffca10921c81b025f380
|
/cc-math/src/main/java/cc/creativecomputing/math/interpolate/CCCatmullroomInterpolator.java
|
d694047ec9d7fb46557dc5576480183815232073
|
[] |
no_license
|
texone/creativecomputing
|
855fe4116322c17aff576020f7c1ba11c3dc30dd
|
c276d2060a878f115db29bb7d2e7419f5de33e0a
|
refs/heads/master
| 2022-01-25T09:36:11.280953
| 2022-01-11T19:51:48
| 2022-01-11T19:51:48
| 42,046,027
| 8
| 3
| null | 2019-11-02T15:04:26
| 2015-09-07T10:10:58
|
Java
|
UTF-8
|
Java
| false
| false
| 403
|
java
|
package cc.creativecomputing.math.interpolate;
import cc.creativecomputing.math.CCMath;
public class CCCatmullroomInterpolator implements CCInterpolator{
@Override
public double interpolate(double theV0, double theV1, double theV2, double theV3, double theBlend, double... theparam) {
return CCMath.catmullRomBlend(theV0, theV1, theV2, theV3, theBlend,theparam.length > 0 ? theparam[0]:0);
}
}
|
[
"info@texone.org"
] |
info@texone.org
|
65498561a634d203c3c429ddf6e70f4180310ed3
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/76/org/apache/commons/math/linear/SingularValueDecompositionImpl_getCovariance_293.java
|
3cc8e28f6d3271006de205b86e849300ce854fdf
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 1,697
|
java
|
org apach common math linear
calcul compact truncat singular decomposit matrix
singular decomposit matrix set matric
sigma time sigma time
time matrix time orthogon matrix
sigma time diagon matrix posit diagon element
time orthogon matrix time
orthogon matrix size depend chosen algorithm
full svd support implement
compact svd rank matrix
number posit singular valu
truncat svd min user
note comput compact truncat svd
full svd singular valu comput posit
version revis date
singular decomposit impl singularvaluedecompositionimpl singular decomposit singularvaluedecomposit
inherit doc inheritdoc
real matrix realmatrix covari getcovari min singular minsingularvalu
number singular valu
singular valu singularvalu length
dimens
dimens singular valu singularvalu dimens min singular minsingularvalu
dimens
dimens
math runtim except mathruntimeexcept creat illeg argument except createillegalargumentexcept
cutoff singular
min singular minsingularvalu singular valu singularvalu
data dimens
getvt walk optim order walkinoptimizedord default real matrix preserv visitor defaultrealmatrixpreservingvisitor
inherit doc inheritdoc
overrid
visit row column
data row column singular valu singularvalu row
dimens
real matrix realmatrix array2 row real matrix array2drowrealmatrix data
transpos multipli
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
27f5be81913ccf3627c122fbb443d072d32e71ca
|
82c8cc33752a5d2b649fa23366c63320f6fd6a1c
|
/src/test/java/com/example/demo/bookexample/code4/atomic/AtomicReference.java
|
3c98cd1269d8c7a13603fbb99748625c150b62fd
|
[
"Apache-2.0"
] |
permissive
|
shootercheng/lfidemo
|
5d040a7fde31f29257dfa74a5de806f368f4a5ed
|
0da76efbfd76a142fca9ddd206431e076e806b43
|
refs/heads/master
| 2023-06-25T21:30:34.050841
| 2022-01-23T15:22:30
| 2022-01-23T15:22:30
| 200,360,034
| 0
| 0
|
Apache-2.0
| 2023-06-14T22:29:35
| 2019-08-03T10:00:57
|
Java
|
UTF-8
|
Java
| false
| false
| 132
|
java
|
package com.example.demo.bookexample.code4.atomic;
/**
* @author chengdu
* @date 2019/8/26.
*/
public class AtomicReference {
}
|
[
"3281328128@qq.com"
] |
3281328128@qq.com
|
9429359cb8f252cc626ab6a5ff28ad9ecdb8789f
|
fe9e1e526d2a103a023d01d907bef329569c1066
|
/disconnect-highcharts/src/main/java/com/github/fluorumlabs/disconnect/highcharts/PlotArearangeStatesOptions.java
|
66c88b317d8865cb4e7394487a88745b70a4754a
|
[
"Apache-2.0"
] |
permissive
|
Heap-leak/disconnect-project
|
0a7946b4c79ec25cb6a602ebb220a64b90f0db94
|
04f6d77d4db3c385bcbeb5b701c97bd411540059
|
refs/heads/master
| 2022-11-14T05:23:30.074640
| 2020-04-29T14:14:47
| 2020-04-29T14:14:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,650
|
java
|
package com.github.fluorumlabs.disconnect.highcharts;
import javax.annotation.Nullable;
import js.lang.Any;
import org.teavm.jso.JSProperty;
/**
* (Highcharts, Highstock) A wrapper object for all the series options in
* specific states.
*
* @see <a href="https://api.highcharts.com/highcharts/plotOptions.arearange.states">https://api.highcharts.com/highcharts/plotOptions.arearange.states</a>
* @see <a href="https://api.highcharts.com/highstock/plotOptions.arearange.states">https://api.highcharts.com/highstock/plotOptions.arearange.states</a>
*
*/
public interface PlotArearangeStatesOptions extends Any {
/**
* (Highcharts, Highstock) Options for the hovered series. These settings
* override the normal state options when a series is moused over or
* touched.
*
* @see <a href="https://api.highcharts.com/highcharts/plotOptions.arearange.states.hover">https://api.highcharts.com/highcharts/plotOptions.arearange.states.hover</a>
* @see <a href="https://api.highcharts.com/highstock/plotOptions.arearange.states.hover">https://api.highcharts.com/highstock/plotOptions.arearange.states.hover</a>
*
* @implspec hover?: PlotArearangeStatesHoverOptions;
*
*/
@JSProperty("hover")
@Nullable
PlotArearangeStatesHoverOptions getHover();
/**
* (Highcharts, Highstock) Options for the hovered series. These settings
* override the normal state options when a series is moused over or
* touched.
*
* @see <a href="https://api.highcharts.com/highcharts/plotOptions.arearange.states.hover">https://api.highcharts.com/highcharts/plotOptions.arearange.states.hover</a>
* @see <a href="https://api.highcharts.com/highstock/plotOptions.arearange.states.hover">https://api.highcharts.com/highstock/plotOptions.arearange.states.hover</a>
*
* @implspec hover?: PlotArearangeStatesHoverOptions;
*
*/
@JSProperty("hover")
void setHover(PlotArearangeStatesHoverOptions value);
/**
* (Highmaps) Overrides for the normal state.
*
* @see <a href="https://api.highcharts.com/highmaps/plotOptions.arearange.states.normal">https://api.highcharts.com/highmaps/plotOptions.arearange.states.normal</a>
*
* @implspec normal?: PlotArearangeStatesNormalOptions;
*
*/
@JSProperty("normal")
@Nullable
PlotArearangeStatesNormalOptions getNormal();
/**
* (Highmaps) Overrides for the normal state.
*
* @see <a href="https://api.highcharts.com/highmaps/plotOptions.arearange.states.normal">https://api.highcharts.com/highmaps/plotOptions.arearange.states.normal</a>
*
* @implspec normal?: PlotArearangeStatesNormalOptions;
*
*/
@JSProperty("normal")
void setNormal(PlotArearangeStatesNormalOptions value);
/**
* (Highmaps) Specific options for point in selected states, after being
* selected by allowPointSelect or programmatically.
*
* @see <a href="https://api.highcharts.com/highmaps/plotOptions.arearange.states.select">https://api.highcharts.com/highmaps/plotOptions.arearange.states.select</a>
*
* @implspec select?: PlotArearangeStatesSelectOptions;
*
*/
@JSProperty("select")
@Nullable
PlotArearangeStatesSelectOptions getSelect();
/**
* (Highmaps) Specific options for point in selected states, after being
* selected by allowPointSelect or programmatically.
*
* @see <a href="https://api.highcharts.com/highmaps/plotOptions.arearange.states.select">https://api.highcharts.com/highmaps/plotOptions.arearange.states.select</a>
*
* @implspec select?: PlotArearangeStatesSelectOptions;
*
*/
@JSProperty("select")
void setSelect(PlotArearangeStatesSelectOptions value);
}
|
[
"fluorumlabs@users.noreply.github.com"
] |
fluorumlabs@users.noreply.github.com
|
aea2a352146417a1d723373c0e958ea9717a539d
|
65c37921c5000bc01a428d36f059578ce02ebaab
|
/jooq/src/main/test/test/generated/pg_catalog/routines/CashRecv.java
|
d94be03a0fad00ba35380651fc9ccb4ced78ba01
|
[] |
no_license
|
azeredoA/projetos
|
05dde053aaba32f825f17f3e951d2fcb2d3034fc
|
7be5995edfaad4449ec3c68d422247fc113281d0
|
refs/heads/master
| 2021-01-11T05:43:21.466522
| 2013-06-10T15:39:42
| 2013-06-10T15:40:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,754
|
java
|
/**
* This class is generated by jOOQ
*/
package test.generated.pg_catalog.routines;
/**
* This class is generated by jOOQ.
*/
@javax.annotation.Generated(value = {"http://www.jooq.org", "2.6.0"},
comments = "This class is generated by jOOQ")
@java.lang.SuppressWarnings("all")
public class CashRecv extends org.jooq.impl.AbstractRoutine<java.math.BigDecimal> {
private static final long serialVersionUID = -1620958034;
/**
* The procedure parameter <code>pg_catalog.cash_recv.RETURN_VALUE</code>
*/
public static final org.jooq.Parameter<java.math.BigDecimal> RETURN_VALUE = createParameter("RETURN_VALUE", org.jooq.impl.SQLDataType.NUMERIC);
/**
* The procedure parameter <code>pg_catalog.cash_recv._1</code>
* <p>
* The SQL type of this item (internal) could not be mapped.<br/>
* Deserialising this field might not work!
*/
public static final org.jooq.Parameter<java.lang.Object> _1 = createParameter("_1", org.jooq.util.postgres.PostgresDataType.getDefaultDataType("internal"));
/**
* Create a new routine call instance
*/
public CashRecv() {
super("cash_recv", test.generated.pg_catalog.PgCatalog.PG_CATALOG, org.jooq.impl.SQLDataType.NUMERIC);
setReturnParameter(RETURN_VALUE);
addInParameter(_1);
}
/**
* Set the <code>_1</code> parameter IN value to the routine
*/
public void set__1(java.lang.Object value) {
setValue(test.generated.pg_catalog.routines.CashRecv._1, value);
}
/**
* Set the <code>_1</code> parameter to the function
* <p>
* Use this method only, if the function is called as a {@link org.jooq.Field} in a {@link org.jooq.Select} statement!
*/
public void set__1(org.jooq.Field<java.lang.Object> field) {
setField(_1, field);
}
}
|
[
"lindomar_reitz@hotmail.com"
] |
lindomar_reitz@hotmail.com
|
d78324ba85bdf2d760fe5b86e95f784ccb0a2384
|
b46f8b1d76444802fda3f4c2eb9aaaa323a34485
|
/schemacrawler-postgresql/src/test/java/schemacrawler/integration/test/PostgreSQLTest.java
|
457dd4de89e73818ece2d258ed97bcfafd99ce86
|
[
"BSD-3-Clause"
] |
permissive
|
SeppPenner/SchemaCrawler
|
64e2bd59ec0ad9f13df3f74f54f240adf98a648b
|
9f38b1e2b09b5028867f14bde0179df8eaef5301
|
refs/heads/master
| 2020-09-03T14:15:30.125028
| 2019-11-03T16:13:33
| 2019-11-03T16:13:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,472
|
java
|
/*
========================================================================
SchemaCrawler
http://www.schemacrawler.com
Copyright (c) 2000-2019, Sualeh Fatehi <sualeh@hotmail.com>.
All rights reserved.
------------------------------------------------------------------------
SchemaCrawler is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
SchemaCrawler and the accompanying materials are made available under
the terms of the Eclipse Public License v1.0, GNU General Public License
v3 or GNU Lesser General Public License v3.
You may elect to redistribute this code under any of these licenses.
The Eclipse Public License is available at:
http://www.eclipse.org/legal/epl-v10.html
The GNU General Public License v3 and the GNU Lesser General Public
License v3 are available at:
http://www.gnu.org/licenses/
========================================================================
*/
package schemacrawler.integration.test;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.IsEqual.equalTo;
import static schemacrawler.test.utility.ExecutableTestUtility.executableExecution;
import static schemacrawler.test.utility.FileHasContent.*;
import static sf.util.DatabaseUtility.checkConnection;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.testcontainers.containers.PostgreSQLContainer;
import org.testcontainers.junit.jupiter.Container;
import org.testcontainers.junit.jupiter.Testcontainers;
import schemacrawler.crawl.SchemaCrawler;
import schemacrawler.schema.Catalog;
import schemacrawler.schema.Property;
import schemacrawler.schemacrawler.*;
import schemacrawler.server.postgresql.PostgreSQLDatabaseConnector;
import schemacrawler.test.utility.BaseAdditionalDatabaseTest;
import schemacrawler.tools.databaseconnector.DatabaseConnector;
import schemacrawler.tools.executable.SchemaCrawlerExecutable;
import schemacrawler.tools.text.schema.SchemaTextOptions;
import schemacrawler.tools.text.schema.SchemaTextOptionsBuilder;
@Testcontainers
public class PostgreSQLTest
extends BaseAdditionalDatabaseTest
{
@Container
private PostgreSQLContainer dbContainer = new PostgreSQLContainer<>();
@BeforeEach
public void createDatabase()
throws SQLException, SchemaCrawlerException
{
createDataSource(dbContainer.getJdbcUrl(),
dbContainer.getUsername(),
dbContainer.getPassword());
createDatabase("/postgresql.scripts.txt");
}
@Test
public void testPostgreSQLCatalog()
throws Exception
{
final SchemaCrawlerOptionsBuilder schemaCrawlerOptionsBuilder = SchemaCrawlerOptionsBuilder
.builder();
schemaCrawlerOptionsBuilder
.withSchemaInfoLevel(SchemaInfoLevelBuilder.maximum())
.includeSchemas(new RegularExpressionInclusionRule("books"))
.includeAllSequences().includeAllSynonyms().includeAllRoutines()
.tableTypes("TABLE,VIEW,MATERIALIZED VIEW");
final SchemaCrawlerOptions options = schemaCrawlerOptionsBuilder
.toOptions();
final Connection connection = checkConnection(getConnection());
final DatabaseConnector postgreSQLDatabaseConnector = new PostgreSQLDatabaseConnector();
final SchemaRetrievalOptions schemaRetrievalOptions = postgreSQLDatabaseConnector
.getSchemaRetrievalOptionsBuilder(connection).toOptions();
final SchemaCrawler schemaCrawler = new SchemaCrawler(getConnection(),
schemaRetrievalOptions,
options);
final Catalog catalog = schemaCrawler.crawl();
final List<Property> serverInfo = new ArrayList<>(catalog.getDatabaseInfo()
.getServerInfo());
assertThat(serverInfo.size(), equalTo(1));
assertThat(serverInfo.get(0).getName(), equalTo("current_database"));
assertThat(serverInfo.get(0).getValue(), equalTo("test"));
}
@Test
public void testPostgreSQLWithConnection()
throws Exception
{
final SchemaCrawlerOptionsBuilder schemaCrawlerOptionsBuilder = SchemaCrawlerOptionsBuilder
.builder();
schemaCrawlerOptionsBuilder
.withSchemaInfoLevel(SchemaInfoLevelBuilder.maximum())
.includeSchemas(new RegularExpressionInclusionRule("books"))
.includeAllSequences().includeAllSynonyms().includeAllRoutines()
.tableTypes("TABLE,VIEW,MATERIALIZED VIEW");
final SchemaCrawlerOptions options = schemaCrawlerOptionsBuilder
.toOptions();
final SchemaTextOptionsBuilder textOptionsBuilder = SchemaTextOptionsBuilder
.builder();
textOptionsBuilder.showDatabaseInfo().showJdbcDriverInfo();
final SchemaTextOptions textOptions = textOptionsBuilder.toOptions();
final SchemaCrawlerExecutable executable = new SchemaCrawlerExecutable(
"details");
executable.setSchemaCrawlerOptions(options);
executable
.setAdditionalConfiguration(SchemaTextOptionsBuilder.builder(textOptions)
.toConfig());
assertThat(outputOf(executableExecution(getConnection(), executable)),
hasSameContentAs(classpathResource(
"testPostgreSQLWithConnection.txt")));
}
}
|
[
"sualeh@hotmail.com"
] |
sualeh@hotmail.com
|
bf2059789fccb44a7e9830a6e103d508dc6d634b
|
0b56b49b0a8d35621fe39178f1ad6323a237dfcc
|
/jcr-vfs/src/main/java/org/eclipse/stardust/vfs/jcr/ISessionFactory.java
|
1da1054b02b601bd331661cbbf25743c8ba8a44a
|
[] |
no_license
|
robsman/stardust.components
|
5af396bb83d5f4789254b85a24186a68d627b662
|
4e85ea10e61051f33204d17720e0f364c2a54826
|
refs/heads/master
| 2021-01-18T05:46:23.494968
| 2016-02-22T15:23:46
| 2016-02-22T15:23:46
| 68,415,869
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 993
|
java
|
/*******************************************************************************
* Copyright (c) 2012 SunGard CSA LLC and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* SunGard CSA LLC - initial API and implementation and/or initial documentation
*******************************************************************************/
/*
* $Id: ISessionFactory.java 54136 2012-02-29 12:33:54Z sven.rottstock $
* (C) 2000 - 2008 CARNOT AG
*/
package org.eclipse.stardust.vfs.jcr;
import javax.jcr.RepositoryException;
import javax.jcr.Session;
/**
* @author rsauer
* @version $Revision: 54136 $
*/
public interface ISessionFactory
{
Session getSession() throws RepositoryException;
void releaseSession(Session session);
}
|
[
"stephan.born@sungard.com"
] |
stephan.born@sungard.com
|
02c8c0c5c01bade9377a6734920ae242c871de5c
|
54c6bf3179cce122a1baaa2b070c465bc3c255b6
|
/app/src/main/java/co/ke/bsl/data/view/TypeOfServiceView.java
|
a0289d2c581698f969e0b1ba6f6c761c48a8f66a
|
[] |
no_license
|
koskcom/navigationdrawer
|
27a65d5bba315517e1fcc89c4828a1b5bfdd8926
|
275fb599c6953a30c0dac03ee01770aaa4579a04
|
refs/heads/master
| 2022-12-10T08:00:07.336464
| 2020-09-14T06:46:51
| 2020-09-14T06:46:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 286
|
java
|
package co.ke.bsl.data.view;
public class TypeOfServiceView {
public TypeOfServiceView(String name) {
Name = name;
}
public String getName() {
return Name;
}
public void setName(String name) {
Name = name;
}
public String Name;
}
|
[
"hosea.koskei@briskbusiness.co.ke"
] |
hosea.koskei@briskbusiness.co.ke
|
ff9e694b8e6c66dedfd35e53acd54b3ff424d8cc
|
ae08d6095daa2ca0b0ef0e9ef6d9aa80a1a13a8a
|
/src/main/java/com/programmers/kakao/Parentheses.java
|
1fd1641f66e029c6fb97a5c2f569918fa08732fa
|
[] |
no_license
|
kenshin579/tutorials-interview-questions
|
343096673e6f82b1388b7f46f88cea5e64d1dcca
|
bcea764cabc09d9f64816a813b1ee9d363a1a0a4
|
refs/heads/master
| 2022-01-12T13:59:57.878236
| 2021-03-19T04:05:07
| 2021-03-19T04:05:07
| 152,071,974
| 3
| 4
| null | 2021-03-19T04:05:07
| 2018-10-08T11:56:27
|
Java
|
UTF-8
|
Java
| false
| false
| 350
|
java
|
package com.programmers.kakao;
/**
* 2020 KAKAO BLIND RECRUITMENT 괄호 변환
* https://programmers.co.kr/learn/courses/30/lessons/60058
*/
@Deprecated
public class Parentheses {
/**
* Time Complexity :
*
* Algorithm :
*/
public String solution(String p) {
String answer = "";
return answer;
}
}
|
[
"frankyoh@tmon.co.kr"
] |
frankyoh@tmon.co.kr
|
125cb1514b0d54f6716e2f053dc0702ea482235d
|
3ebaee3a565d5e514e5d56b44ebcee249ec1c243
|
/assetBank 3.77 decomplied fixed/src/java/com/bright/assetbank/ecommerce/constant/PSPSettings.java
|
df2777ecec659c51d17ae67c0d0fea7a739bbc1b
|
[] |
no_license
|
webchannel-dev/Java-Digital-Bank
|
89032eec70a1ef61eccbef6f775b683087bccd63
|
65d4de8f2c0ce48cb1d53130e295616772829679
|
refs/heads/master
| 2021-10-08T19:10:48.971587
| 2017-11-07T09:51:17
| 2017-11-07T09:51:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 503
|
java
|
/* */ package com.bright.assetbank.ecommerce.constant;
/* */
/* */ import com.bright.framework.common.constant.Settings;
/* */
/* */ public class PSPSettings extends Settings
/* */ {
/* */ public PSPSettings(String a_sSettingsFilename)
/* */ {
/* 33 */ super(a_sSettingsFilename);
/* */ }
/* */ }
/* Location: C:\Users\mamatha\Desktop\com.zip
* Qualified Name: com.bright.assetbank.ecommerce.constant.PSPSettings
* JD-Core Version: 0.6.0
*/
|
[
"42003122+code7885@users.noreply.github.com"
] |
42003122+code7885@users.noreply.github.com
|
b3fd2a2abea1ac624ab3e0f63e1602c8f1597afb
|
6718a628809ea53c3b59a9178e1153da4fad7f4f
|
/src/main/java/com/dyenigma/service/impl/SysCompanyService.java
|
c5ebf5202fd0b125ecc564f17e007feaebd5a5ce
|
[] |
no_license
|
caosena5101/transformer
|
b96604987cc24c5eff588cb7f1fc8770459d3f52
|
9442661e0a2a47d6c8ca535c4cba8b10f7117944
|
refs/heads/master
| 2020-12-30T11:01:54.855953
| 2017-07-30T06:01:51
| 2017-07-30T06:01:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,796
|
java
|
package com.dyenigma.service.impl;
import com.dyenigma.dao.SysCompanyMapper;
import com.dyenigma.dao.SysDivisionMapper;
import com.dyenigma.dao.SysProjectMapper;
import com.dyenigma.entity.BaseDomain;
import com.dyenigma.entity.SysCompany;
import com.dyenigma.entity.SysDivision;
import com.dyenigma.entity.SysProject;
import com.dyenigma.model.TreeModel;
import com.dyenigma.service.ISysCompanyService;
import com.dyenigma.util.Constants;
import com.dyenigma.util.PageUtil;
import com.dyenigma.util.StringUtil;
import com.dyenigma.util.UUIDUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* Description:
* author dyenigma
* date 2017/07/21
*/
@Service
@Transactional
public class SysCompanyService extends BaseService<SysCompany> implements
ISysCompanyService {
@Autowired
private SysCompanyMapper sysCompanyMapper;
@Autowired
private SysDivisionMapper divisionMapper;
@Autowired
private SysProjectMapper projectMapper;
/**
* Description: 获取所有的公司名称和ID
* Name:getAllCoName
* Author:dyenigma
* Time:2016/4/26 10:19
* param:[]
* return:java.util.List<com.dyenigma.model.TreeModel>
*/
@Override
public List<TreeModel> getAllCoName() {
List<SysCompany> coList = mapper.selectAll();
return permToTree("0", coList);
}
//递归转化成菜单模型,支持无限级菜单
private List<TreeModel> permToTree(String id, List<SysCompany> list) {
List<TreeModel> menuList = new ArrayList<>();
list.stream().filter(co -> id.equals(co.getPrntId())).forEach(co -> {
TreeModel menu = new TreeModel();
menu.setState(Constants.TREE_STATUS_OPEN); //这里必须关闭节点,否则会出现无限节点
menu.setId(co.getCoId());
menu.setPid("0".equals(co.getPrntId()) ? "" : co.getPrntId());
menu.setIconCls(co.getIconCls());
menu.setText(co.getCoName());
menu.setChildren(permToTree(co.getCoId(), list));
menuList.add(menu);
});
return menuList;
}
@Override
public List<SysCompany> findComp(PageUtil pageUtil) {
logger.info("开始查找公司信息,分页显示");
List<SysCompany> compList = sysCompanyMapper.findAllByPage(pageUtil);
return compList;
}
@Override
public Integer getCount(Map<String, Object> paramMap) {
logger.info("开始查找公司信息的总条数");
return mapper.selectCountByCondition(paramMap);
}
@Override
public boolean delComp(String compId) {
List<SysDivision> divList = divisionMapper.findByCompId(compId);
List<SysCompany> coList = sysCompanyMapper.findByPid(compId);
List<SysProject> pList = projectMapper.getPrjByCoId(compId);
//如果公司下面有组织信息或子公司,则不能删除
if (divList.size() > 0 && coList.size() > 0 && pList.size() > 0) {
return false;
} else {
SysCompany co = mapper.selectByPrimaryKey(compId);
co.setStatus(Constants.PERSISTENCE_DELETE_STATUS);
return mapper.updateByPrimaryKey(co) > 0;
}
}
@Override
public boolean persistenceComp(SysCompany company) {
String userId = Constants.getCurrendUser().getUserId();
if (StringUtil.isEmpty(company.getCoId())) {
BaseDomain.createLog(company, userId);
company.setStatus(Constants.PERSISTENCE_STATUS);
company.setCoId(UUIDUtil.getUUID());
company.setState(Constants.TREE_STATUS_CLOSED);
company.setIconCls(Constants.COMPANY_ICON);
if (StringUtil.isEmpty(company.getPrntId())) {
company.setPrntId("0");
}
mapper.insert(company);
} else {
BaseDomain.editLog(company, userId);
mapper.updateByPrimaryKeySelective(company);
}
return true;
}
/**
* Description: 查询某个公司下所有的公司信息,包含下属多级公司
* Name:AllCoById
* Author:dyenigma
* Time:2016/4/28 11:10
* param:[coId]
* return:java.util.List<com.dyenigma.entity.Company>
*/
@Override
public List<SysCompany> AllCoById(String coId) {
List<SysCompany> returnList = new ArrayList<>();
returnList.add(mapper.selectByPrimaryKey(coId));
List<SysCompany> coList = new ArrayList<>();
coList.add(mapper.selectByPrimaryKey(coId));
returnList.addAll(findByPrntId(coId, coList).stream().collect(Collectors.toList()));
return returnList;
}
//递归获取所有的子公司信息
private List<SysCompany> findByPrntId(String coId, List<SysCompany> coList) {
List<SysCompany> allList = new ArrayList<>();
for (SysCompany company : coList) {
List<SysCompany> resultList = sysCompanyMapper.selectByPrntId(coId);
if (resultList.size() > 0) {
allList.addAll(resultList.stream().collect(Collectors.toList()));
findByPrntId(company.getCoId(), resultList);
}
}
return allList;
}
@Override
public List<SysCompany> findByPid(String pid) {
List<SysCompany> pList = StringUtil.isEmpty(pid) ?
sysCompanyMapper.findByPid("0") : sysCompanyMapper.findByPid(pid);
pList.stream().filter(Company -> StringUtil.isEmpty(pid)).forEach(Company -> Company.setPrntId("0"));
return pList;
}
}
|
[
"dyenigma@163.com"
] |
dyenigma@163.com
|
ef70bd952e475dc921e604385424909784cfc811
|
b21d13e05d144bf46e3b0f764378fc12d6bf55e6
|
/core/transport/src/main/java/hera/client/DecoratingRequester.java
|
57fad2b0a4698b80c25f71c5f9aa47a09bb72aa3
|
[
"MIT"
] |
permissive
|
aergoio/heraj
|
557ffda977598be6bc2fc613f9dd5a9d8860d9ce
|
7a3b3d5a54d654235419b44a6c64b7ee2d2ce5f4
|
refs/heads/develop
| 2022-09-23T07:24:53.788548
| 2022-06-16T02:17:19
| 2022-06-19T12:34:21
| 142,944,814
| 23
| 8
|
MIT
| 2023-09-04T09:39:29
| 2018-07-31T01:10:55
|
Java
|
UTF-8
|
Java
| false
| false
| 5,644
|
java
|
/*
* @copyright defined in LICENSE.txt
*/
package hera.client;
import static hera.client.ClientContextKeys.GRPC_AFTER_FAILURE;
import static hera.client.ClientContextKeys.GRPC_AFTER_SUCCESS;
import static hera.client.ClientContextKeys.GRPC_BEFORE_REQUEST;
import static hera.client.ClientContextKeys.GRPC_FAILOVER_HANDLER_CHAIN;
import static hera.client.ClientContextKeys.GRPC_REQUEST_TIMEOUT;
import static hera.util.ValidationUtils.assertNotNull;
import static org.slf4j.LoggerFactory.getLogger;
import hera.Context;
import hera.ContextHolder;
import hera.FailoverHandler;
import hera.Invocation;
import hera.Requester;
import hera.Response;
import hera.exception.HerajException;
import hera.strategy.InvocationStrategy;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.slf4j.Logger;
class DecoratingRequester implements Requester {
protected static final String ORIGIN_LINE = "------------ caused by ------------";
protected final transient Logger logger = getLogger(getClass());
protected final Map<String, Invocation<?>> method2Invocation = new ConcurrentHashMap<>();
protected final Object failoverHandlerLock = new Object();
protected volatile FailoverHandler cached;
DecoratingRequester() {
}
@Override
public <T> T request(final Invocation<T> invocation) throws Exception {
assertNotNull(invocation, "Invocation must not null");
logger.debug("Request with invocation: {}", invocation);
Response<T> response;
final Invocation<T> decorated = withDecorated(invocation);
logger.trace("Decorated: {}", decorated);
try {
final T value = decorated.invoke();
logger.debug("Success: {}", value);
response = Response.success(value);
} catch (Exception e) {
logger.debug("Failure: {}", e.toString());
response = Response.fail(e);
response = handleFailover(decorated, response);
}
if (null != response.getError()) {
// need to adjust stacktrace (current stack + origin stack)
final Exception error = response.getError();
error.setStackTrace(concatStackTrace(new Throwable().getStackTrace(),
error.getStackTrace()));
throw error;
}
return response.getValue();
}
@SuppressWarnings("unchecked")
protected <R> Invocation<R> withDecorated(final Invocation<R> invocation) {
final String name = invocation.getRequestMethod().getName();
if (null == name) {
throw new HerajException("Name of invocation must not null");
}
if (!method2Invocation.containsKey(name)) {
logger.trace("Decorated method is not cached. Make an new one");
Invocation<R> decorated = withTimeout(invocation);
decorated = withBefore(decorated);
decorated = withAfterSuccess(decorated);
decorated = withAtferFailure(decorated);
method2Invocation.put(name, decorated);
}
final Invocation<R> cached = (Invocation<R>) method2Invocation.get(name);
return cached.withParameters(invocation.getParameters());
}
protected <R> Invocation<R> withTimeout(final Invocation<R> invocation) {
final Context context = ContextHolder.current();
final InvocationStrategy strategy = context.get(GRPC_REQUEST_TIMEOUT);
if (null == strategy) {
return invocation;
}
logger.trace("With timeout: {}", strategy);
return strategy.apply(invocation);
}
protected <R> Invocation<R> withBefore(final Invocation<R> invocation) {
final Context context = ContextHolder.current();
final InvocationStrategy strategy = context.get(GRPC_BEFORE_REQUEST);
if (null == strategy) {
return invocation;
}
logger.trace("With before: {}", strategy);
return strategy.apply(invocation);
}
protected <R> Invocation<R> withAfterSuccess(final Invocation<R> invocation) {
final Context context = ContextHolder.current();
final InvocationStrategy strategy = context.get(GRPC_AFTER_SUCCESS);
if (null == strategy) {
return invocation;
}
logger.trace("With after success: {}", strategy);
return strategy.apply(invocation);
}
protected <R> Invocation<R> withAtferFailure(final Invocation<R> invocation) {
final Context context = ContextHolder.current();
final InvocationStrategy strategy = context.get(GRPC_AFTER_FAILURE);
if (null == strategy) {
return invocation;
}
logger.trace("With after failure: {}", strategy);
return strategy.apply(invocation);
}
protected <T> Response<T> handleFailover(final Invocation<T> invocation,
final Response<T> response) {
final FailoverHandler failoverHandler = getFailoverHandler();
if (null == failoverHandler) {
return response;
}
logger.trace("Handle failover by {}", failoverHandler);
return failoverHandler.handle(invocation, response);
}
protected FailoverHandler getFailoverHandler() {
if (null == cached) {
synchronized (failoverHandlerLock) {
if (null == cached) {
final Context context = ContextHolder.current();
cached = context.get(GRPC_FAILOVER_HANDLER_CHAIN);
}
}
}
return cached;
}
protected final StackTraceElement[] concatStackTrace(final StackTraceElement[] current,
final StackTraceElement[] cause) {
final StackTraceElement[] concated = new StackTraceElement[current.length + cause.length + 1];
System.arraycopy(current, 0, concated, 0, current.length);
concated[current.length] = new StackTraceElement("", ORIGIN_LINE, null, 0);
System.arraycopy(cause, 0, concated, current.length + 1, cause.length);
return concated;
}
}
|
[
"sibera21@gmail.com"
] |
sibera21@gmail.com
|
12cb583883e2d21c90cbe7023a3439103469b78f
|
a2df6764e9f4350e0d9184efadb6c92c40d40212
|
/aliyun-java-sdk-sofa/src/main/java/com/aliyuncs/sofa/transform/v20190815/GetDWSJdbcwriterRpsResponseUnmarshaller.java
|
121547e628ed9c25ec6664fa70af711ab35f8203
|
[
"Apache-2.0"
] |
permissive
|
warriorsZXX/aliyun-openapi-java-sdk
|
567840c4bdd438d43be6bd21edde86585cd6274a
|
f8fd2b81a5f2cd46b1e31974ff6a7afed111a245
|
refs/heads/master
| 2022-12-06T15:45:20.418475
| 2020-08-20T08:37:31
| 2020-08-26T06:17:49
| 290,450,773
| 1
| 0
|
NOASSERTION
| 2020-08-26T09:15:48
| 2020-08-26T09:15:47
| null |
UTF-8
|
Java
| false
| false
| 1,884
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.aliyuncs.sofa.transform.v20190815;
import java.util.ArrayList;
import java.util.List;
import com.aliyuncs.sofa.model.v20190815.GetDWSJdbcwriterRpsResponse;
import com.aliyuncs.sofa.model.v20190815.GetDWSJdbcwriterRpsResponse.DataItem;
import com.aliyuncs.transform.UnmarshallerContext;
public class GetDWSJdbcwriterRpsResponseUnmarshaller {
public static GetDWSJdbcwriterRpsResponse unmarshall(GetDWSJdbcwriterRpsResponse getDWSJdbcwriterRpsResponse, UnmarshallerContext _ctx) {
getDWSJdbcwriterRpsResponse.setRequestId(_ctx.stringValue("GetDWSJdbcwriterRpsResponse.RequestId"));
getDWSJdbcwriterRpsResponse.setResultCode(_ctx.stringValue("GetDWSJdbcwriterRpsResponse.ResultCode"));
getDWSJdbcwriterRpsResponse.setResultMessage(_ctx.stringValue("GetDWSJdbcwriterRpsResponse.ResultMessage"));
List<DataItem> data = new ArrayList<DataItem>();
for (int i = 0; i < _ctx.lengthValue("GetDWSJdbcwriterRpsResponse.Data.Length"); i++) {
DataItem dataItem = new DataItem();
dataItem.setTimestamp(_ctx.longValue("GetDWSJdbcwriterRpsResponse.Data["+ i +"].Timestamp"));
dataItem.setValue(_ctx.stringValue("GetDWSJdbcwriterRpsResponse.Data["+ i +"].Value"));
data.add(dataItem);
}
getDWSJdbcwriterRpsResponse.setData(data);
return getDWSJdbcwriterRpsResponse;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
5c4c52d5e630ae1be779423b30ea70fec058d8f8
|
c6d8dd7aba171163214253a3da841056ea2f6c87
|
/serenity-junit5/src/main/java/net/serenitybdd/junit5/utils/ClassUtil.java
|
258869c231d8b7cbf039f22a3523956a39b5fea7
|
[
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] |
permissive
|
serenity-bdd/serenity-core
|
602b8369f9527bea21a30104a45ba9b6e4d48238
|
ab6eaa5018e467b43e4f099e7682ce2924a9b12f
|
refs/heads/main
| 2023-09-01T22:37:02.079831
| 2023-09-01T17:24:41
| 2023-09-01T17:24:41
| 26,201,720
| 738
| 656
|
NOASSERTION
| 2023-09-08T14:33:06
| 2014-11-05T03:44:57
|
HTML
|
UTF-8
|
Java
| false
| false
| 7,357
|
java
|
package net.serenitybdd.junit5.utils;
import java.io.Closeable;
import java.io.Externalizable;
import java.io.Serializable;
import java.lang.reflect.Array;
import java.util.*;
public class ClassUtil {
private static final Map<Class<?>, Class<?>> primitiveWrapperTypeMap = new IdentityHashMap(9);
private static final Map<String, Class<?>> primitiveTypeNameMap = new HashMap(32);
private static final Map<Class<?>, Class<?>> primitiveTypeToWrapperMap = new IdentityHashMap<>(9);
private static final Map<String, Class<?>> commonClassCache = new HashMap(64);
/** Suffix for array class names: {@code "[]"}. */
public static final String ARRAY_SUFFIX = "[]";
/** Prefix for internal array class names: {@code "["}. */
private static final String INTERNAL_ARRAY_PREFIX = "[";
/** Prefix for internal non-primitive array class names: {@code "[L"}. */
private static final String NON_PRIMITIVE_ARRAY_PREFIX = "[L";
/** The package separator character: {@code '.'}. */
private static final char PACKAGE_SEPARATOR = '.';
/** The path separator character: {@code '/'}. */
private static final char PATH_SEPARATOR = '/';
/** The nested class separator character: {@code '$'}. */
private static final char NESTED_CLASS_SEPARATOR = '$';
/** The CGLIB class separator: {@code "$$"}. */
public static final String CGLIB_CLASS_SEPARATOR = "$$";
/** The ".class" file suffix. */
public static final String CLASS_FILE_SUFFIX = ".class";
public static Class<?> forName(String name, ClassLoader classLoader) throws ClassNotFoundException, LinkageError {
Class<?> clazz = resolvePrimitiveClassName(name);
if (clazz == null) {
clazz = commonClassCache.get(name);
}
if (clazz != null) {
return clazz;
}
// "java.lang.String[]" style arrays
if (name.endsWith(ARRAY_SUFFIX)) {
String elementClassName = name.substring(0, name.length() - ARRAY_SUFFIX.length());
Class<?> elementClass = forName(elementClassName, classLoader);
return Array.newInstance(elementClass, 0).getClass();
}
// "[Ljava.lang.String;" style arrays
if (name.startsWith(NON_PRIMITIVE_ARRAY_PREFIX) && name.endsWith(";")) {
String elementName = name.substring(NON_PRIMITIVE_ARRAY_PREFIX.length(), name.length() - 1);
Class<?> elementClass = forName(elementName, classLoader);
return Array.newInstance(elementClass, 0).getClass();
}
// "[[I" or "[[Ljava.lang.String;" style arrays
if (name.startsWith(INTERNAL_ARRAY_PREFIX)) {
String elementName = name.substring(INTERNAL_ARRAY_PREFIX.length());
Class<?> elementClass = forName(elementName, classLoader);
return Array.newInstance(elementClass, 0).getClass();
}
ClassLoader clToUse = classLoader;
if (clToUse == null) {
clToUse = getDefaultClassLoader();
}
try {
return Class.forName(name, false, clToUse);
}
catch (ClassNotFoundException ex) {
int lastDotIndex = name.lastIndexOf(PACKAGE_SEPARATOR);
if (lastDotIndex != -1) {
String nestedClassName =
name.substring(0, lastDotIndex) + NESTED_CLASS_SEPARATOR + name.substring(lastDotIndex + 1);
try {
return Class.forName(nestedClassName, false, clToUse);
}
catch (ClassNotFoundException ex2) {
// Swallow - let original exception get through
}
}
throw ex;
}
}
public static Class<?> resolvePrimitiveClassName( String name) {
Class<?> result = null;
if (name != null && name.length() <= 7) {
result = (Class<?>)primitiveTypeNameMap.get(name);
}
return result;
}
public static ClassLoader getDefaultClassLoader() {
ClassLoader cl = null;
try {
cl = Thread.currentThread().getContextClassLoader();
}
catch (Throwable ex) {
// Cannot access thread context ClassLoader - falling back...
}
if (cl == null) {
// No thread context class loader -> use class loader of this class.
cl = ClassUtil.class.getClassLoader();
if (cl == null) {
// getClassLoader() returning null indicates the bootstrap ClassLoader
try {
cl = ClassLoader.getSystemClassLoader();
}
catch (Throwable ex) {
// Cannot access system ClassLoader - oh well, maybe the caller can live with null...
}
}
}
return cl;
}
private static void registerCommonClasses(Class<?>... commonClasses) {
for (Class<?> clazz : commonClasses) {
commonClassCache.put(clazz.getName(), clazz);
}
}
static {
primitiveWrapperTypeMap.put(Boolean.class, boolean.class);
primitiveWrapperTypeMap.put(Byte.class, byte.class);
primitiveWrapperTypeMap.put(Character.class, char.class);
primitiveWrapperTypeMap.put(Double.class, double.class);
primitiveWrapperTypeMap.put(Float.class, float.class);
primitiveWrapperTypeMap.put(Integer.class, int.class);
primitiveWrapperTypeMap.put(Long.class, long.class);
primitiveWrapperTypeMap.put(Short.class, short.class);
primitiveWrapperTypeMap.put(Void.class, void.class);
// Map entry iteration is less expensive to initialize than forEach with lambdas
for (Map.Entry<Class<?>, Class<?>> entry : primitiveWrapperTypeMap.entrySet()) {
primitiveTypeToWrapperMap.put(entry.getValue(), entry.getKey());
registerCommonClasses(entry.getKey());
}
Set<Class<?>> primitiveTypes = new HashSet<>(32);
primitiveTypes.addAll(primitiveWrapperTypeMap.values());
Collections.addAll(primitiveTypes, boolean[].class, byte[].class, char[].class,
double[].class, float[].class, int[].class, long[].class, short[].class);
for (Class<?> primitiveType : primitiveTypes) {
primitiveTypeNameMap.put(primitiveType.getName(), primitiveType);
}
registerCommonClasses(Boolean[].class, Byte[].class, Character[].class, Double[].class,
Float[].class, Integer[].class, Long[].class, Short[].class);
registerCommonClasses(Number.class, Number[].class, String.class, String[].class,
Class.class, Class[].class, Object.class, Object[].class);
registerCommonClasses(Throwable.class, Exception.class, RuntimeException.class,
Error.class, StackTraceElement.class, StackTraceElement[].class);
registerCommonClasses(Enum.class, Iterable.class, Iterator.class, Enumeration.class,
Collection.class, List.class, Set.class, Map.class, Map.Entry.class, Optional.class);
Class<?>[] javaLanguageInterfaceArray = {Serializable.class, Externalizable.class,
Closeable.class, AutoCloseable.class, Cloneable.class, Comparable.class};
registerCommonClasses(javaLanguageInterfaceArray);
}
}
|
[
"john.smart@wakaleo.com"
] |
john.smart@wakaleo.com
|
1b31b1cd782775de04e3ba0b4946f481fe66b6b0
|
5afc1e039d0c7e0e98216fa265829ce2168100fd
|
/his-statistics/src/main/java/cn/honry/statistics/deptstat/internalCompare2/vo/FicDeptVO.java
|
f0920048352381fe3b72e4001dc9fb5142900729
|
[] |
no_license
|
konglinghai123/his
|
66dc0c1ecbde6427e70b8c1087cddf60f670090d
|
3dc3eb064819cb36ce4185f086b25828bb4bcc67
|
refs/heads/master
| 2022-01-02T17:05:27.239076
| 2018-03-02T04:16:41
| 2018-03-02T04:16:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,065
|
java
|
package cn.honry.statistics.deptstat.internalCompare2.vo;
public class FicDeptVO {
private String id;
private String name;
/**类型**/
private String type;
/**部门科室code**/
private String deptCode;
/**部门科室那么**/
private String deptName;
/**虚拟科室code**/
private String ficCode;
/**虚拟科室那么**/
private String ficName;
private String wb;
private String pinyin;
private String inputCode;
/**院区**/
private Integer district;
/**
* 院区名称
*/
private String districtName;
public String getDistrictName() {
return districtName;
}
public void setDistrictName(String districtName) {
this.districtName = districtName;
}
public Integer getDistrict() {
return district;
}
public void setDistrict(Integer district) {
this.district = district;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getDeptCode() {
return deptCode;
}
public void setDeptCode(String deptCode) {
this.deptCode = deptCode;
}
public String getDeptName() {
return deptName;
}
public void setDeptName(String deptName) {
this.deptName = deptName;
}
public String getFicCode() {
return ficCode;
}
public void setFicCode(String ficCode) {
this.ficCode = ficCode;
}
public String getFicName() {
return ficName;
}
public void setFicName(String ficName) {
this.ficName = ficName;
}
public String getWb() {
return wb;
}
public void setWb(String wb) {
this.wb = wb;
}
public String getPinyin() {
return pinyin;
}
public void setPinyin(String pinyin) {
this.pinyin = pinyin;
}
public String getInputCode() {
return inputCode;
}
public void setInputCode(String inputCode) {
this.inputCode = inputCode;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
|
[
"user3@163.com"
] |
user3@163.com
|
03d66c6c06493c0ea179be3b9f759c966d256745
|
6e498099b6858eae14bf3959255be9ea1856f862
|
/src/com/facebook/buck/features/filegroup/Filegroup.java
|
c0258a3584e3406c15e1324e86bb720c8baf96cb
|
[
"Apache-2.0"
] |
permissive
|
Bonnie1312/buck
|
2dcfb0791637db675b495b3d27e75998a7a77797
|
3cf76f426b1d2ab11b9b3d43fd574818e525c3da
|
refs/heads/master
| 2020-06-11T13:29:48.660073
| 2019-06-26T19:59:32
| 2019-06-26T21:06:24
| 193,979,660
| 2
| 0
|
Apache-2.0
| 2019-09-22T07:23:56
| 2019-06-26T21:24:33
|
Java
|
UTF-8
|
Java
| false
| false
| 3,124
|
java
|
/*
* Copyright 2012-present Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License. You may obtain
* a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package com.facebook.buck.features.filegroup;
import com.facebook.buck.core.build.context.BuildContext;
import com.facebook.buck.core.model.BuildTarget;
import com.facebook.buck.core.model.HasOutputName;
import com.facebook.buck.core.rulekey.AddToRuleKey;
import com.facebook.buck.core.rules.SourcePathRuleFinder;
import com.facebook.buck.core.sourcepath.SourcePath;
import com.facebook.buck.features.filebundler.CopyingFileBundler;
import com.facebook.buck.features.filebundler.FileBundler;
import com.facebook.buck.io.filesystem.ProjectFilesystem;
import com.facebook.buck.rules.modern.BuildCellRelativePathFactory;
import com.facebook.buck.rules.modern.Buildable;
import com.facebook.buck.rules.modern.ModernBuildRule;
import com.facebook.buck.rules.modern.OutputPath;
import com.facebook.buck.rules.modern.OutputPathResolver;
import com.facebook.buck.step.Step;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSortedSet;
import java.nio.file.Path;
/** A build rule that copies inputs provided in {@code srcs} to an output directory. */
public class Filegroup extends ModernBuildRule<Filegroup> implements HasOutputName, Buildable {
@AddToRuleKey private final String name;
@AddToRuleKey private final ImmutableSortedSet<SourcePath> srcs;
@AddToRuleKey private final OutputPath outputPath;
public Filegroup(
BuildTarget buildTarget,
ProjectFilesystem projectFilesystem,
SourcePathRuleFinder ruleFinder,
String name,
ImmutableSortedSet<SourcePath> srcs) {
super(buildTarget, projectFilesystem, ruleFinder, Filegroup.class);
this.name = name;
this.srcs = srcs;
outputPath = new OutputPath(name);
}
@Override
public ImmutableList<Step> getBuildSteps(
BuildContext buildContext,
ProjectFilesystem filesystem,
OutputPathResolver outputPathResolver,
BuildCellRelativePathFactory buildCellPathFactory) {
Path outputPath = outputPathResolver.resolvePath(this.outputPath);
FileBundler bundler = new CopyingFileBundler(filesystem, getBuildTarget());
ImmutableList.Builder<Step> steps = ImmutableList.builder();
bundler.copy(
filesystem,
buildCellPathFactory,
steps,
outputPath,
srcs,
buildContext.getSourcePathResolver());
return steps.build();
}
@Override
public SourcePath getSourcePathToOutput() {
return getSourcePath(outputPath);
}
@Override
public String getOutputName() {
return name;
}
}
|
[
"facebook-github-bot@users.noreply.github.com"
] |
facebook-github-bot@users.noreply.github.com
|
9783fb28cb5a454a528683f73b9a3ecf3e0c5639
|
5148293c98b0a27aa223ea157441ac7fa9b5e7a3
|
/Method_Scraping/xml_scraping/NicadOutputFile_t2_kafka_91_95/Nicad_t2_kafka_91_953.java
|
18169fd36725ee54a9d66c82e74e7bd21b748658
|
[] |
no_license
|
ryosuke-ku/TestCodeSeacherPlus
|
cfd03a2858b67a05ecf17194213b7c02c5f2caff
|
d002a52251f5461598c7af73925b85a05cea85c6
|
refs/heads/master
| 2020-05-24T01:25:27.000821
| 2019-08-17T06:23:42
| 2019-08-17T06:23:42
| 187,005,399
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 790
|
java
|
// clone pairs:713:93%
// 267:kafka/clients/src/main/java/org/apache/kafka/common/utils/ImplicitLinkedHashMultiCollection.java
public class Nicad_t2_kafka_91_953
{
int addInternal(Element newElement, Element[] addElements) {
int slot = slot(addElements, newElement);
for (int seen = 0; seen < addElements.length; seen++) {
Element element = addElements[slot];
if (element == null) {
addElements[slot] = newElement;
return slot;
}
if (element == newElement) {
return INVALID_INDEX;
}
slot = (slot + 1) % addElements.length;
}
throw new RuntimeException("Not enough hash table slots to add a new element.");
}
}
|
[
"naist1020@gmail.com"
] |
naist1020@gmail.com
|
7e3e8b65f4471a12cfe21cce66449d68b4c9554e
|
7fa9c6b0fa1d0726ae1cda0199716c811a1ea01b
|
/Crawler/data/PhoneInfoRepositoryTest.java
|
34ee0c30d768c0aab009cd35277a26c6abb73457
|
[] |
no_license
|
NayrozD/DD2476-Project
|
b0ca75799793d8ced8d4d3ba3c43c79bb84a72c0
|
94dfb3c0a470527b069e2e0fd9ee375787ee5532
|
refs/heads/master
| 2023-03-18T04:04:59.111664
| 2021-03-10T15:03:07
| 2021-03-10T15:03:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,025
|
java
|
21
https://raw.githubusercontent.com/southwind9801/phone_store_demo_springboot/master/src/test/java/com/southwind/phone_store_demo/repository/PhoneInfoRepositoryTest.java
package com.southwind.phone_store_demo.repository;
import com.southwind.phone_store_demo.entity.PhoneInfo;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import java.util.List;
import static org.junit.jupiter.api.Assertions.*;
@SpringBootTest
class PhoneInfoRepositoryTest {
@Autowired
private PhoneInfoRepository repository;
@Test
void findAll(){
List<PhoneInfo> list = repository.findAll();
for (PhoneInfo phoneInfo : list) {
System.out.println(phoneInfo);
}
}
@Test
void findAllByCategoryType(){
List<PhoneInfo> list = repository.findAllByCategoryType(1);
for (PhoneInfo phoneInfo : list) {
System.out.println(phoneInfo);
}
}
}
|
[
"veronika.cucorova@gmail.com"
] |
veronika.cucorova@gmail.com
|
72f692cbaafa2c64cbe8337c07b572ce0f426c74
|
eb9f655206c43c12b497c667ba56a0d358b6bc3a
|
/java/java-tests/testData/refactoring/extractClass/usedInInitializer/before/Test.java
|
888656880082881a1c7d0801b4b54fbdb10f78c7
|
[
"Apache-2.0"
] |
permissive
|
JetBrains/intellij-community
|
2ed226e200ecc17c037dcddd4a006de56cd43941
|
05dbd4575d01a213f3f4d69aa4968473f2536142
|
refs/heads/master
| 2023-09-03T17:06:37.560889
| 2023-09-03T11:51:00
| 2023-09-03T12:12:27
| 2,489,216
| 16,288
| 6,635
|
Apache-2.0
| 2023-09-12T07:41:58
| 2011-09-30T13:33:05
| null |
UTF-8
|
Java
| false
| false
| 128
|
java
|
class Test {
int myT;
{
myT = 0;
}
public int getMyT() {
return myT;
}
void bar(){
int i = myT;
}
}
|
[
"Anna.Kozlova@jetbrains.com"
] |
Anna.Kozlova@jetbrains.com
|
9edcd3800184f5af11c227cf80e502c04c4107a8
|
4645f0902adad06800f349d83790fa8563cf4de0
|
/intarsys-tools-runtime/src/main/java/de/intarsys/tools/expression/TaggedStringParser.java
|
64763e3e0bdd46f6e32a34585f04b3ee3c587037
|
[
"BSD-3-Clause"
] |
permissive
|
intarsys/runtime
|
51436fd883c1021238572a1967a1ca99177946a7
|
00afced0b6629dbdda4463e4b440ec962225b4ec
|
refs/heads/master
| 2023-09-03T02:50:13.190773
| 2023-07-25T12:52:50
| 2023-08-23T13:41:40
| 11,248,689
| 1
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,104
|
java
|
/*
* Copyright (c) 2007, intarsys GmbH
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of intarsys nor the names of its contributors may be used
* to endorse or promote products derived from this software without specific
* prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
package de.intarsys.tools.expression;
import java.io.IOException;
import java.io.Reader;
import java.io.StringReader;
import java.util.ArrayList;
import java.util.List;
import de.intarsys.tools.reader.DirectTagReader;
import de.intarsys.tools.reader.IDirectTagHandler;
import de.intarsys.tools.reader.ILocationProvider;
import de.intarsys.tools.stream.StreamTools;
import de.intarsys.tools.string.StringTools;
/**
* Create a "syntax tree" from a tagged string.
*
* The syntax tree is simply a list of {@link TaggedStringNode} instances.
*/
public class TaggedStringParser {
private boolean escape;
private IDirectTagHandler handler = new IDirectTagHandler() {
@Override
public Object endTag(String tagContent, Object context) throws IOException {
processtag(tagContent, (List<TaggedStringNode>) context);
return ""; //$NON-NLS-1$
}
@Override
public void setLocationProvider(ILocationProvider location) {
// ignore
}
@Override
public void startTag() {
//
}
};
private StringBuilder sb = new StringBuilder();
/**
*
*/
public TaggedStringParser() {
this(false);
}
public TaggedStringParser(boolean escape) {
super();
this.escape = escape;
}
public void declareVariables(TaggedStringVariables variables, String template) throws IOException {
if (StringTools.isEmpty(template)) {
return;
}
List<TaggedStringNode> nodes = parse(template);
for (TaggedStringNode node : nodes) {
if (node instanceof TaggedStringExpression) {
String expr = ((TaggedStringExpression) node).getExpression();
if (!variables.isDefined(expr)) {
variables.put(expr, "");
}
}
}
}
public boolean isEscape() {
return escape;
}
public List<TaggedStringNode> parse(String expression) throws IOException {
sb.setLength(0);
List<TaggedStringNode> list = new ArrayList<>();
Reader base = new StringReader(expression);
Reader reader = new DirectTagReader(base, handler, list, isEscape());
try {
int i = reader.read();
while (i != -1) {
sb.append((char) i);
i = reader.read();
}
if (sb.length() > 0) {
list.add(new TaggedStringLiteral(sb.toString()));
sb.setLength(0);
}
return list;
} finally {
StreamTools.close(reader);
}
}
protected void processtag(String expression, List<TaggedStringNode> context) {
if (sb.length() > 0) {
context.add(new TaggedStringLiteral(sb.toString()));
sb.setLength(0);
}
context.add(new TaggedStringExpression(expression));
}
public void setEscape(boolean escape) {
this.escape = escape;
}
}
|
[
"eheck@intarsys.de"
] |
eheck@intarsys.de
|
190f17d0e4c1dc9dcb3e9ef285260b3d2b8abe8d
|
be608e227e7e385cd8e68bdfae4c79283ee88595
|
/service-claimisubmision/target/generated-sources/xjc/org/delta/b2b/edi/t837/EREF01ReferenceIdentificationQualifier1.java
|
a3e348abe422bd9598e2b4d9636a9902d2ecbb90
|
[] |
no_license
|
msen2000/services
|
4867cdc3e2be12e9b5f54f2568e7c9844e91af25
|
cb84c48792aee88ab8533f407b8150430c5da2dd
|
refs/heads/master
| 2016-08-04T19:08:09.872078
| 2014-02-16T08:11:16
| 2014-02-16T08:11:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,232
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.5-b02-fcs
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2011.10.25 at 02:23:02 PM PDT
//
package org.delta.b2b.edi.t837;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* Code qualifying the Reference Identification
*
* <p>Java class for E-REF01-Reference_Identification_Qualifier_1 complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="E-REF01-Reference_Identification_Qualifier_1">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "E-REF01-Reference_Identification_Qualifier_1")
public class EREF01ReferenceIdentificationQualifier1 {
}
|
[
"msen2000@gmail.com"
] |
msen2000@gmail.com
|
8a779b819cfa6fc912b1aea235ca2a3109938b2c
|
0adb68bbf576340c8ba1d9d3c07320ab3bfdb95e
|
/regexlib/PoCs/Regexlib_Java_8/src/regexlib_8181.java
|
5f55cac6e82a7fb063390288013cfd656640aaeb
|
[
"MIT"
] |
permissive
|
agentjacker/ReDoS-Benchmarks
|
c7d6633a3b77d9e29e0ee2db98d5dfb60cde91c6
|
f5b5094d835649e957bf3fec6b8bd4f6efdb35fc
|
refs/heads/main
| 2023-05-10T13:57:48.491045
| 2021-05-21T11:19:39
| 2021-05-21T11:19:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,278
|
java
|
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class regexlib_8181 {
// /* 8181
// * <script.*/*>|</script>|<[a-zA-Z][^>]*=['"]+javascript:\w+.*['"]+>|<\w+[^>]*\son\w+=.*[ /]*>
// * POLYNOMIAL
// * nums:2
// * POLYNOMIAL AttackString:""+"<script"*5000+"! _1SLQ_2"
// */
public static void main(String[] args) throws InterruptedException {
String regex = "<script.*/*>|</script>|<[a-zA-Z][^>]*=[\'\"]+javascript:\\w+.*[\'\"]+>|<\\w+[^>]*\\son\\w+=.*[ /]*>";
for (int i = 0; i < 1000; i++) {
StringBuilder attackString = new StringBuilder();
// 前缀
attackString.append("");
// 歧义点
for (int j = 0; j < i * 10000; j++) {
attackString.append("<script");
}
// 后缀
attackString.append("! _1SLQ_2");
// System.out.println(attackString);
long time1 = System.nanoTime();
// boolean isMatch = Pattern.matches(regex, attackString);
boolean isMatch = Pattern.compile(regex).matcher(attackString).find();
long time2 = System.nanoTime();
System.out.println(i * 10000 + " " + isMatch + " " + (time2 - time1)/1e9);
}
}
}
|
[
"liyt@ios.ac.cn"
] |
liyt@ios.ac.cn
|
449534f7bc574d0496c47a651c1c8ffd77bad7dc
|
de325819e931c79b25fde0ec5db511e6235e98bd
|
/src/main/java/net/sagebits/tmp/isaac/rest/api1/data/logic/RestFeatureNode.java
|
a76ce9ebad55936709119959f5ef7bc4c3c72444
|
[
"Apache-2.0"
] |
permissive
|
Sagebits/uts-rest-api
|
d5f318d0be7de6b64801eb3478abc6911973ac88
|
65c749c16b5f8241bea4511b855e4274c330e0af
|
refs/heads/develop
| 2023-05-11T07:37:57.918343
| 2020-05-18T06:49:48
| 2020-05-18T06:49:48
| 157,817,215
| 0
| 0
|
Apache-2.0
| 2023-05-09T18:06:40
| 2018-11-16T05:29:17
|
Java
|
UTF-8
|
Java
| false
| false
| 6,641
|
java
|
/*
* Copyright 2018 VetsEZ Inc, Sagebits LLC
*
* 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.
*
* Contributions from 2015-2017 where performed either by US government
* employees, or under US Veterans Health Administration contracts.
*
* US Veterans Health Administration contributions by government employees
* are work of the U.S. Government and are not subject to copyright
* protection in the United States. Portions contributed by government
* employees are USGovWork (17USC §105). Not subject to copyright.
*
* Contribution by contractors to the US Veterans Health Administration
* during this period are contractually contributed under the
* Apache License, Version 2.0.
*
* See: https://www.usa.gov/government-works
*/
package net.sagebits.tmp.isaac.rest.api1.data.logic;
import javax.xml.bind.annotation.XmlElement;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import net.sagebits.tmp.isaac.rest.ExpandUtil;
import net.sagebits.tmp.isaac.rest.Util;
import net.sagebits.tmp.isaac.rest.api1.data.RestIdentifiedObject;
import net.sagebits.tmp.isaac.rest.api1.data.concept.RestConceptVersion;
import net.sagebits.tmp.isaac.rest.api1.data.enumerations.RestConcreteDomainOperatorsType;
import net.sagebits.tmp.isaac.rest.session.RequestInfo;
import sh.isaac.api.Get;
import sh.isaac.api.chronicle.LatestVersion;
import sh.isaac.api.component.concept.ConceptChronology;
import sh.isaac.api.component.concept.ConceptVersion;
import sh.isaac.api.coordinate.ManifoldCoordinate;
import sh.isaac.api.coordinate.StampCoordinate;
import sh.isaac.api.logic.NodeSemantic;
import sh.isaac.model.coordinate.ManifoldCoordinateImpl;
import sh.isaac.model.logic.ConcreteDomainOperators;
import sh.isaac.model.logic.node.external.FeatureNodeWithUuids;
import sh.isaac.model.logic.node.internal.FeatureNodeWithNids;
import sh.isaac.utility.Frills;
/**
*
* {@link RestFeatureNode}
*
* @author <a href="mailto:joel.kniaz.list@gmail.com">Joel Kniaz</a>
*
* The RestFeatureNode contains a RestConcreteDomainOperatorsType operator type,
* must have exactly 1 child node, which is one of the literal types like {@link NodeSemantic#LITERAL_BOOLEAN}
*
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY)
public class RestFeatureNode extends RestTypedConnectorNode
{
/**
* RestFeatureNode contains a RestConcreteDomainOperatorsType/ConcreteDomainOperators instance,
* which is an enumeration specifying a type of comparison
*
* RestFeatureNode must have exactly 1 child node.
*
* Available RestConcreteDomainOperatorsType/ConcreteDomainOperator values include
* EQUALS,
* LESS_THAN,
* LESS_THAN_EQUALS,
* GREATER_THAN,
* GREATER_THAN_EQUALS
*/
@XmlElement
RestConcreteDomainOperatorsType operator;
/**
* connectorTypeConcept the concept that tells you the unit type of a measure
*/
@XmlElement
RestIdentifiedObject measureSemanticConcept;
/**
* Optionally-populated RestConceptVersion for the measureSemanticConcept - pass expand=version
*/
@XmlElement
RestConceptVersion measureSemanticConceptVersion;
/**
* The String text description of the measureSemanticConcept. It is included as a convenience, as it may be retrieved
* based on the concept nid. This may be null depending on the stamps involved in the request if no description is available
* on the given path.
*/
@XmlElement
public String measureDescription;
protected RestFeatureNode()
{
// For JAXB
}
/**
* @param featureNodeWithNids
* @param coordForRead
*/
public RestFeatureNode(FeatureNodeWithNids featureNodeWithNids, ManifoldCoordinate coordForRead)
{
super(featureNodeWithNids, coordForRead);
setup(featureNodeWithNids.getOperator(), Get.concept(featureNodeWithNids.getMeasureSemanticNid()), coordForRead);
}
/**
* @param featureNodeWithUuids
* @param coordForRead
*/
public RestFeatureNode(FeatureNodeWithUuids featureNodeWithUuids, ManifoldCoordinate coordForRead)
{
super(featureNodeWithUuids, coordForRead);
setup(featureNodeWithUuids.getOperator(), Get.concept(featureNodeWithUuids.getMeasureSemanticUuid()), coordForRead);
}
private void setup(ConcreteDomainOperators cdo, ConceptChronology msc, ManifoldCoordinate coordForRead)
{
operator = new RestConcreteDomainOperatorsType(cdo);
measureSemanticConcept = new RestIdentifiedObject(msc);
Get.conceptService().getSnapshot(coordForRead).getDescriptionOptional(measureSemanticConcept.nid).ifPresent(dv -> measureDescription = dv.getText());
if (RequestInfo.get().shouldExpand(ExpandUtil.versionExpandable))
{
LatestVersion<ConceptVersion> olcv = msc.getLatestVersion(coordForRead.getStampCoordinate());
// TODO handle contradictions
if (olcv.isAbsent() && Frills.isMetadata(msc.getNid()))
{
LOG.info("Using latest version stamp to read metadata measure type concept");
//Use latest for metadata, cause its often newer, but we pretty much always need it in the graph refs.
StampCoordinate tweakedCoord = coordForRead.makeCoordinateAnalog(Long.MAX_VALUE);
olcv = msc.getLatestVersion(tweakedCoord);
//If the concept wasn't present, the description will be bad too.
Get.conceptService().getSnapshot(new ManifoldCoordinateImpl(tweakedCoord, coordForRead.getLanguageCoordinate()))
.getDescriptionOptional(measureSemanticConcept.nid).ifPresent(dv -> measureDescription = dv.getDescriptionType())
.ifAbsent(() -> measureDescription = Util.readBestDescription(measureSemanticConcept.nid));
}
if (olcv.isPresent())
{
measureSemanticConceptVersion = new RestConceptVersion(olcv.get(), true, RequestInfo.get().shouldExpand(ExpandUtil.includeParents),
RequestInfo.get().shouldExpand(ExpandUtil.countParents),
false, false, RequestInfo.get().getStated(), false, RequestInfo.get().shouldExpand(ExpandUtil.terminologyType), false);
}
else
{
LOG.info("No version of measure {} present at {} coordinate", measureSemanticConcept, coordForRead);
connectorTypeConceptVersion = null;
}
}
else
{
measureSemanticConceptVersion = null;
}
}
}
|
[
"daniel.armbrust.list@gmail.com"
] |
daniel.armbrust.list@gmail.com
|
f56abd7ae3ead77f796e160a5180c187b48ab969
|
ff5d53c0461ef7b2f4a59a1c526309ced1d3e76b
|
/app/src/main/java/com/my/broadcast/FinishBroadCastReceiver.java
|
a74cc7df638afac01f46a5305efb49e8efdeb0af
|
[] |
no_license
|
mengxiangqipa/LearningDriving_github
|
f77116fa153faa7b984c33d59af7dc0fed37037d
|
3743d1850b077b67efbdc9974c71005a907f9e5f
|
refs/heads/master
| 2021-01-17T16:47:39.890984
| 2017-05-22T04:03:06
| 2017-05-22T04:03:06
| 64,123,076
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 372
|
java
|
package com.my.broadcast;
import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
public class FinishBroadCastReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
// TODO Auto-generated method stub
((Activity) context).finish();
}
}
|
[
"mengxiangqipa@163.com"
] |
mengxiangqipa@163.com
|
d2cbcc24cead73a66e7762c4f2023451d5237310
|
4c32f2e91f2c4a2199c09e97c6109a70b301e804
|
/src/main/java/generated/CountryMetadataType.java
|
a9f87ecaf6d993840af1814f6c42206d2c960ba8
|
[] |
no_license
|
ejohnsonw/ndc-xsd-162
|
47f7b130b88d5af550a093529fa13a573ec628e0
|
76d0099233aad0c3d8663cc6e1c2cbf2435986f6
|
refs/heads/master
| 2020-12-30T13:28:16.667965
| 2017-05-14T02:56:01
| 2017-05-14T02:56:01
| 91,215,700
| 0
| 0
| null | 2017-05-14T02:47:21
| 2017-05-14T02:47:21
| null |
UTF-8
|
Java
| false
| false
| 3,021
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2017.05.13 at 10:55:06 PM EDT
//
package generated;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* A data type for COUNTRY Metadata.
*
* <p>Java class for CountryMetadataType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="CountryMetadataType">
* <complexContent>
* <extension base="{}MetadataObjectBaseType">
* <sequence>
* <element name="ICAO_Code" type="{}ICAO_LocSimpleType" minOccurs="0"/>
* <element name="Name" type="{}ProperNameSimpleType" minOccurs="0"/>
* <element ref="{}Position" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CountryMetadataType", propOrder = {
"icaoCode",
"name",
"position"
})
public class CountryMetadataType
extends MetadataObjectBaseType
{
@XmlElement(name = "ICAO_Code")
protected String icaoCode;
@XmlElement(name = "Name")
protected String name;
@XmlElement(name = "Position")
protected Position position;
/**
* Gets the value of the icaoCode property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getICAOCode() {
return icaoCode;
}
/**
* Sets the value of the icaoCode property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setICAOCode(String value) {
this.icaoCode = value;
}
/**
* Gets the value of the name property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getName() {
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setName(String value) {
this.name = value;
}
/**
* Gets the value of the position property.
*
* @return
* possible object is
* {@link Position }
*
*/
public Position getPosition() {
return position;
}
/**
* Sets the value of the position property.
*
* @param value
* allowed object is
* {@link Position }
*
*/
public void setPosition(Position value) {
this.position = value;
}
}
|
[
"ejohnson@ngeosone.com"
] |
ejohnson@ngeosone.com
|
8b6472fbc010d788373f60ca5ad8ed0bc76a09fd
|
185dcd933997e13aeaf19dc5a9febcb00dee09cd
|
/src/com/lvjinke/bit/Concurrency/WaxOMatic.java
|
605e43467fbdf1f0e1eee128af36aa353a7d9525
|
[] |
no_license
|
Yunobububu/ThinkInJava
|
7d7c42f8478425b6f2919ff9c4880c160e532345
|
f1833eac9aecfbe03a025680b8a2f1b1ac1d6d93
|
refs/heads/master
| 2020-03-08T13:07:12.928181
| 2018-04-28T11:10:46
| 2018-04-28T11:10:46
| 128,149,502
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,079
|
java
|
package com.lvjinke.bit.Concurrency;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
class Car{
private boolean waxOn = false;
public synchronized void waxed(){
waxOn = true;
notifyAll();
}
public synchronized void buffed(){
waxOn = false;
notifyAll();
}
public synchronized void waitingForWax() throws InterruptedException {
while(waxOn == false){
wait();
}
}
public synchronized void waitingForBuff() throws InterruptedException {
while(waxOn == true){
wait();
}
}
}
class WaxOn implements Runnable{
private Car car;
public WaxOn(Car car){ this.car = car;}
@Override
public void run() {
try {
while(!Thread.interrupted()){
System.out.println("WaxOn");
TimeUnit.MILLISECONDS.sleep(200);
car.waxed();
car.waitingForBuff();
}
} catch (InterruptedException e) {
System.out.println("Exiting via interrupt");
}
System.out.println("Ending Wax On task");
}
}
class WaxOff implements Runnable{
private Car car;
public WaxOff(Car car){this.car = car;}
@Override
public void run() {
try {
while(!Thread.interrupted()) {
car.waitingForWax();
System.out.println("Wax Off");
TimeUnit.MILLISECONDS.sleep(200);
car.buffed();
}
} catch (InterruptedException e) {
System.out.println("Exiting via interrupt");
}
System.out.println("Ending Wax Off task");
}
}
public class WaxOMatic {
public static void execute() throws InterruptedException {
Car car = new Car();
ExecutorService exec = Executors.newCachedThreadPool();
exec.execute(new WaxOff(car));
exec.execute(new WaxOn(car));
TimeUnit.SECONDS.sleep(10);
exec.shutdownNow();
}
}
|
[
"lvjinkebit@163.com"
] |
lvjinkebit@163.com
|
3118bc84024f2245a5bedcce8ef6619b417f0c77
|
c294fc6f0d9d910ee92d2f09c71548ca203dd497
|
/src/main/java/tk/withkid/userlog/controller/ErrorResponse.java
|
c6ea5b8e0924f68d26e2ac02b7a7c6b0d12b7b79
|
[] |
no_license
|
anomie7/withkid-ulog-server
|
6ab8a888e6f98fe8803fab5f250d83159cc0c1ff
|
984c0f9d68c17748bcb8b9075e3ad7d689798629
|
refs/heads/master
| 2020-04-28T04:38:56.192172
| 2019-03-20T09:13:08
| 2019-03-20T15:20:39
| 174,987,111
| 0
| 0
| null | 2019-03-20T15:20:41
| 2019-03-11T11:35:41
|
Java
|
UTF-8
|
Java
| false
| false
| 348
|
java
|
package tk.withkid.userlog.controller;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.springframework.http.HttpStatus;
@NoArgsConstructor
@AllArgsConstructor
@Getter
@Builder
class ErrorResponse {
private String name;
private String msg;
private HttpStatus status;
}
|
[
"anomie7777@gmail.com"
] |
anomie7777@gmail.com
|
24bdf414ecf27c4c0fb63975a2ca6a967948c88b
|
a1a9b1f8d6dd1cee9229943bd739995a482ba0ae
|
/subprojects/language-scala/src/main/java/org/gradle/language/scala/tasks/PlatformScalaCompile.java
|
71586ebd64c2c157c816ee69a1963b4a75981720
|
[] |
no_license
|
scott2014/gradle
|
400292f9537f73fed9c4372ef36b2e8cf6d71c02
|
a2d447fd4124a2d2ef19e63517f00af1d55f154b
|
refs/heads/master
| 2020-04-05T18:31:15.623174
| 2014-11-25T05:44:28
| 2014-11-25T05:44:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,109
|
java
|
/*
* Copyright 2014 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.gradle.language.scala.tasks;
import org.gradle.api.Incubating;
import org.gradle.api.tasks.scala.ScalaCompile;
import org.gradle.jvm.platform.JavaPlatform;
/**
* A platform-aware Scala compile task.
*/
@Incubating
public class PlatformScalaCompile extends ScalaCompile {
private JavaPlatform platform;
public JavaPlatform getPlatform() {
return platform;
}
public void setPlatform(JavaPlatform platform) {
this.platform = platform;
}
}
|
[
"rene@breskeby.com"
] |
rene@breskeby.com
|
8453f8ecb480b5a08139451200e21eee70789ace
|
28814debdd13ea4f4dba2bb7d98b9280e2bb2820
|
/b2c-cloud-test-parent-foundmental/b2c-cloud-test-eureka/src/main/java/com/csair/b2c/cloud/test/eurake/ServerController.java
|
132e4fa5052af89c44c0d442452945aefdcecf9c
|
[
"Unlicense"
] |
permissive
|
autumnFly/b2c
|
c0ddabcfbd82b488c0d428eebb448e0025cb4dea
|
68524604d39de2bc1bb4823de6a41878bdb238f1
|
refs/heads/master
| 2022-12-28T06:58:07.208736
| 2020-09-20T17:35:29
| 2020-09-20T17:35:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,580
|
java
|
package com.csair.b2c.cloud.test.eurake;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import java.util.Enumeration;
/**
* Created on 2018/11/9.<br/>
*
* @author yudong
*/
@RestController
public class ServerController {
@RequestMapping(method = {RequestMethod.GET, RequestMethod.POST}, produces = MediaType.TEXT_PLAIN_VALUE, value = "/getInfo")
public String handler(HttpServletRequest request) {
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(request.getMethod())
.append(" ")
.append(request.getRequestURL())
.append("?")
.append(request.getQueryString())
.append("\r\n");
Enumeration<String> enumeration = request.getHeaderNames();
while (enumeration.hasMoreElements()) {
String name = enumeration.nextElement();
Enumeration<String> enumeration1 = request.getHeaders(name);
StringBuilder value = new StringBuilder();
while (enumeration1.hasMoreElements()) {
value.append(enumeration1.nextElement()).append(" ");
}
stringBuilder.append(name)
.append(":")
.append(value)
.append("\r\n");
}
return stringBuilder.toString();
}
}
|
[
"liangyudong@bluemoon.com.cn"
] |
liangyudong@bluemoon.com.cn
|
72bf9495442b692d6dc2b4230e2405457b51bde9
|
05948ca1cd3c0d2bcd65056d691c4d1b2e795318
|
/classes2/com/unionpay/mobile/android/net/HttpNative.java
|
9e636173b7d6d7056515cd80f30c7cdbd67209bd
|
[] |
no_license
|
waterwitness/xiaoenai
|
356a1163f422c882cabe57c0cd3427e0600ff136
|
d24c4d457d6ea9281a8a789bc3a29905b06002c6
|
refs/heads/master
| 2021-01-10T22:14:17.059983
| 2016-10-08T08:39:11
| 2016-10-08T08:39:11
| 70,317,042
| 0
| 8
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 508
|
java
|
package com.unionpay.mobile.android.net;
public class HttpNative
{
private static HttpNative a = null;
public static HttpNative a()
{
if (a == null) {
a = new HttpNative();
}
return a;
}
public native String getIssuer(int paramInt);
public native String getSubject(int paramInt);
}
/* Location: E:\apk\xiaoenai2\classes2-dex2jar.jar!\com\unionpay\mobile\android\net\HttpNative.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"1776098770@qq.com"
] |
1776098770@qq.com
|
8bde17dd5814cebfc077f4da21a9c7b5036b479f
|
c8664fc194971e6e39ba8674b20d88ccfa7663b1
|
/com/tencent/mm/plugin/appbrand/ui/i.java
|
a45edd604e72f88f7f3d22c457bc5a50ccd257c1
|
[] |
no_license
|
raochuan/wexin1120
|
b926bc8d4143c4b523ed43e265cd20ef0c89ad40
|
1eaa71e1e3e7c9f9b9f96db8de56db3dfc4fb4d3
|
refs/heads/master
| 2020-05-17T23:57:00.000696
| 2017-11-03T02:33:27
| 2017-11-03T02:33:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 566
|
java
|
package com.tencent.mm.plugin.appbrand.ui;
import android.view.View;
import com.tencent.mm.plugin.appbrand.config.a.c;
public abstract interface i
{
public abstract void a(a.c paramc);
public abstract void aag();
public abstract void aah();
public abstract void bh(String paramString1, String paramString2);
public abstract View getView();
}
/* Location: /Users/xianghongyan/decompile/dex2jar/classes2-dex2jar.jar!/com/tencent/mm/plugin/appbrand/ui/i.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"15223790237@139.com"
] |
15223790237@139.com
|
e5f2c2fca4444ac68f4acaf2641ce8aae9e7e723
|
da29a66e7019058daa1c953e74221c8069fccfc7
|
/java_lib/src/main/java/com/example/java_lib/designpattern/prototypepattern/EnterpriseOrder.java
|
4ce2e4eeb7344ea24ed7958c99405043c78e1747
|
[] |
no_license
|
oceanhai/myframe2
|
47b6020c5df61a9868525417ed56394ed5b5ad62
|
b6ff304e4fa93f4d7ec1c0f8a2215a2356b4adb8
|
refs/heads/master
| 2023-08-04T09:12:25.042042
| 2023-07-31T05:58:46
| 2023-07-31T05:58:46
| 219,888,854
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,320
|
java
|
package com.example.java_lib.designpattern.prototypepattern;
/**
* 企业订单
* Created by Xionghu on 2017/7/5.
* Desc:
*/
public class EnterpriseOrder implements IOrder {
private String orderName;
private String orderCompany;
private int orderNumber;
public String getOrderName() {
return orderName;
}
public void setOrderName(String orderName) {
this.orderName = orderName;
}
public String getOrderCompany() {
return orderCompany;
}
public void setOrderCompany(String orderCompany) {
this.orderCompany = orderCompany;
}
@Override
public int getOrderNumber() {
return orderNumber;
}
@Override
public void setOrderNumber(int number) {
this.orderNumber = number;
}
@Override
public String toString() {
return "EnterpriseOrder{" +
"orderName='" + orderName + '\'' +
", orderCompany='" + orderCompany + '\'' +
", orderNumber=" + orderNumber +
'}';
}
@Override
public IOrder orderClone() {
EnterpriseOrder enterpriceOrder = new EnterpriseOrder();
enterpriceOrder.setOrderCompany(orderCompany);
enterpriceOrder.setOrderName(orderName);
return enterpriceOrder;
}
}
|
[
"wuhai@eq102.com"
] |
wuhai@eq102.com
|
555211649f3833aac4df2e66ba5a6cd1de780c47
|
8da06d3ad989d0092d7761a81f2ec184e0989f7d
|
/d2cmall-provider/d2cmall-order/d2cmall-order-api/src/main/java/com/d2c/order/third/payment/gongmall/sign/SignHelper.java
|
358e4a0046725e97b158353d502a98c1109b70b4
|
[] |
no_license
|
RoJinnSennSei/my_mall
|
e5234c631a30b17f2ffbfd4614ef9e8dc04a9869
|
dbec98edac0e679906668be1d5f37ea13f46975b
|
refs/heads/master
| 2020-04-08T15:48:40.090961
| 2018-11-14T10:04:36
| 2018-11-14T10:04:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,790
|
java
|
package com.d2c.order.third.payment.gongmall.sign;
import java.util.Map;
import java.util.SortedMap;
import java.util.TreeMap;
import com.d2c.common.base.utils.security.MD5Util;
public class SignHelper {
public static final String APPKEY = "appKey";
public static final String APPSECRET = "appSecret";
public static final String NONCE = "nonce";
public static final String TIMESTAMP = "timestamp";
public static final String SIGN = "sign";
/**
* 获取签名
*
* @param paramMap
* 包含业务参数,和appKey,nonce,timestamp这3个公共参数
* @param appSecret
* @return
*/
public static String getSign(Map<String, String> paramMap, String appSecret) {
String text = getUrlText(paramMap);
text += "&appSecret=" + appSecret;
return MD5Util.encodeMD5Hex(text).toUpperCase();
}
private static String getUrlText(Map<String, String> beanMap) {
beanMap = getSortedMap(beanMap);
StringBuilder builder = new StringBuilder();
for (String key : beanMap.keySet()) {
String value = beanMap.get(key).toString();
builder.append(key);
builder.append('=');
builder.append(value);
builder.append('&');
}
String text = builder.toString();
return text.substring(0, text.length() - 1);
}
/**
* 对普通map进行排序
*
* @param paramMap
* @return
*/
private static Map<String, String> getSortedMap(Map<String, String> paramMap) {
SortedMap<String, String> map = new TreeMap<String, String>();
for (String key : paramMap.keySet()) {
if (key != null && !APPSECRET.equals(key)) {
String value = paramMap.get(key);
if (value != null) {
String valueStr = String.valueOf(value);
if (valueStr != null && !"".equals(valueStr)) {
map.put(key, value);
}
}
}
}
return map;
}
}
|
[
"vicleo566@163.com"
] |
vicleo566@163.com
|
56d034a0b331329ad0e54514770a46cf7f0a23d4
|
9acb2dcaac7c7e59c982e4a7c67118e2eccab681
|
/src/main/java/net/sf/l2j/gameserver/model/actor/instance/VillageMasterOrc.java
|
053c7fc74b5ce9370d1472c2e34e93cf2affa05e
|
[] |
no_license
|
denismaster/midnight
|
d1356bdbb06e56d67afea2c3090fcbca5e3d6b3f
|
d8832e701d1ba1b8ffadab5ec8e258a34dea2340
|
refs/heads/develop
| 2020-03-23T03:46:56.864185
| 2018-08-26T21:29:46
| 2018-08-26T21:29:46
| 141,048,546
| 1
| 0
| null | 2018-08-26T21:29:58
| 2018-07-15T18:18:40
|
HTML
|
UTF-8
|
Java
| false
| false
| 543
|
java
|
package net.sf.l2j.gameserver.model.actor.instance;
import net.sf.l2j.gameserver.model.actor.template.NpcTemplate;
import net.sf.l2j.gameserver.model.base.ClassId;
import net.sf.l2j.gameserver.model.base.ClassRace;
public final class VillageMasterOrc extends VillageMaster
{
public VillageMasterOrc(int objectId, NpcTemplate template)
{
super(objectId, template);
}
@Override
protected final boolean checkVillageMasterRace(ClassId pclass)
{
if (pclass == null)
return false;
return pclass.getRace() == ClassRace.ORC;
}
}
|
[
"denismaster@outlook.com"
] |
denismaster@outlook.com
|
82ceba5a34839adfb479c835d6b32386f473cc0b
|
13f3c6c863188ed58dbd793cb3d65676eda7d751
|
/src/_033/_033.java
|
b72f83cc10e626df35a162eca6ce0d5b980e4571
|
[] |
no_license
|
vinchinzu/euler-1
|
b4990cb6212acfa0f3d5321f8f55290e05b91de6
|
71b5b25933c31180a1390c39c6bd829ccbe68027
|
refs/heads/master
| 2020-04-07T15:27:10.282963
| 2013-08-11T07:20:01
| 2013-08-11T07:20:01
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,339
|
java
|
package _033;
import lib.Numbers;
import main.AbstractProblem;
public class _033 extends AbstractProblem {
public static void main(String[] args) {
AbstractProblem p = new _033();
p.run();
System.out.println(p.answer());
}
public void run() {
int nf = 1;
int df = 1;
int n2, d2;
for(int n = 1; n < 100; n++) {
for(int d = n + 1; d < 100; d++) {
for(int i = 0; i < 10; i++) {
if(n == d || (n % 10 == 0 && d % 10 == 0)) {
continue;
}
if(containsDigit(n, i) && containsDigit(d, i)) {
n2 = strip(n, i);
d2 = strip(d, i);
// System.out.println(n + " " + d + " strip " + i + " => " + n2 + " " + d2);
if(equals((double) n / d, (double) n2 / d2 , 0.001)) {
// System.out.println(n + " / " + d);
nf *= n;
df *= d;
}
}
}
}
}
this.answer = df / Numbers.gcd(nf, df);
}
private int strip(int n, int digit) {
int i = 0;
int m = 1;
while(n > 0) {
if(n % 10 != digit) {
i += m * (n % 10);
m *= 10;
}
n /= 10;
}
if(i == 0) {
i = 1;
}
return i;
}
private boolean equals(double a, double b, double delta) {
return Math.abs(a - b) < delta;
}
private boolean containsDigit(int n, int digit) {
while(n > 0) {
if(n % 10 == digit) {
return true;
}
n /= 10;
}
return false;
}
}
|
[
"kenneth.cason@gmail.com"
] |
kenneth.cason@gmail.com
|
64108f207d6509ef8c9ac93455004835cdbf314d
|
154d7de32b17ea9e1b2eb889704012a2b0eeddd2
|
/src/com/rbao/east/pay/entity/OnlineRechargeHFB.java
|
18aab44b93feccc89a3f4e4d4e0eab34464cc616
|
[] |
no_license
|
shiyuanfunc/p2p_rt
|
89f8963357c28bd0a5cb9ef9b927e22363ecf2d3
|
e18b483fa150d3e044666fdf8550990b1645fe86
|
refs/heads/master
| 2022-05-18T06:50:54.861543
| 2017-09-25T08:31:45
| 2017-09-25T08:31:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,316
|
java
|
package com.rbao.east.pay.entity;
import java.io.Serializable;
public class OnlineRechargeHFB implements Serializable{
private static final long serialVersionUID = -3795694208058562353L;
private String gatewayUrl="";
private String version;//版本号1
private String payType;//支付类型
private String payCode;//支付类型编码
private String agentId;//商户编号
private String agentBillId;//商户系统内部的定单号(要保证唯一
private String payAmt;//订单总金额
private String notifyUrl;//支付后返回的商户处理页面,URL参数是以http://或https://开头的完整URL地址(后台处理)
private String returnUrl;//支付后返回的商户显示页面
private String userIp;//用户所在客户端的真实ip
private String agentBillTime;//提交单据的时间yyyyMMddHHmmss
private String goodsName;//商品名称,
private String remark;//商户自定义原样返回,
private String isTest;//是否测试,1=测试
private String sign;
@SuppressWarnings("unused")
private String signStr;//加密文
public String getGatewayUrl() {
return gatewayUrl;
}
public void setGatewayUrl(String gatewayUrl) {
this.gatewayUrl = gatewayUrl;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getPayType() {
return payType;
}
public void setPayType(String payType) {
this.payType = payType;
}
public String getPayCode() {
return payCode;
}
public void setPayCode(String payCode) {
this.payCode = payCode;
}
public String getAgentId() {
return agentId;
}
public void setAgentId(String agentId) {
this.agentId = agentId;
}
public String getAgentBillId() {
return agentBillId;
}
public void setAgentBillId(String agentBillId) {
this.agentBillId = agentBillId;
}
public String getPayAmt() {
return payAmt;
}
public void setPayAmt(String payAmt) {
this.payAmt = payAmt;
}
public String getNotifyUrl() {
return notifyUrl;
}
public void setNotifyUrl(String notifyUrl) {
this.notifyUrl = notifyUrl;
}
public String getReturnUrl() {
return returnUrl;
}
public void setReturnUrl(String returnUrl) {
this.returnUrl = returnUrl;
}
public String getUserIp() {
return userIp;
}
public void setUserIp(String userIp) {
this.userIp = userIp;
}
public String getAgentBillTime() {
return agentBillTime;
}
public void setAgentBillTime(String agentBillTime) {
this.agentBillTime = agentBillTime;
}
public String getGoodsName() {
return goodsName;
}
public void setGoodsName(String goodsName) {
this.goodsName = goodsName;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getIsTest() {
return isTest;
}
public void setIsTest(String isTest) {
this.isTest = isTest;
}
public String getSign() {
return sign;
}
public void setSign(String sign) {
this.sign = sign;
}
public String getSignStr() {
return "version="+version+"&agent_id="+agentId+"&agent_bill_id="+agentBillId+
"&agent_bill_time="+agentBillTime+"&pay_type="+payType+"&pay_amt="+payAmt+
"¬ify_url="+notifyUrl+"&return_url="+returnUrl+"&user_ip="+userIp+"&key=";
}
public void setSignStr(String signStr) {
this.signStr = signStr;
}
}
|
[
"songyh_1314@163.com"
] |
songyh_1314@163.com
|
693a364cc8146c23366953ca7e482c0bcaf04952
|
a9d6920a01003a80617e6f5e40cea36e66250888
|
/src/main/java/in/eventmap/common/hibernate/dialect/MySQLDialect.java
|
5260803a14ddd8f9aee1b06bd8a9ff4c03e0cdb6
|
[] |
no_license
|
t-kawatsu/old.eventmap
|
204c19d0d553417ecda0f7830e02cdb6b5eaacfd
|
2a2e408783039639acad4d8ed62195b3451a184d
|
refs/heads/master
| 2020-03-23T23:39:33.023829
| 2018-07-25T05:36:02
| 2018-07-25T05:36:02
| 142,247,401
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 774
|
java
|
package in.eventmap.common.hibernate.dialect;
import org.hibernate.dialect.function.StandardSQLFunction;
import org.hibernate.type.StandardBasicTypes;
import in.eventmap.common.hibernate.dialect.function.BitFlagFunction;
import in.eventmap.common.hibernate.dialect.function.MatchAgainstFunction;
public class MySQLDialect extends org.hibernate.dialect.MySQLDialect {
public MySQLDialect() {
super();
registerFunction("match_against", new MatchAgainstFunction());
registerFunction("bitflag", new BitFlagFunction());
registerFunction("find_in_set", new StandardSQLFunction("find_in_set",
StandardBasicTypes.INTEGER));
// registerFunction("match_against", new
// SQLFunctionTemplate(Hibernate.BOOLEAN,
// "match ?1 against (?2 in boolean mode)") );
}
}
|
[
"t-kawatsu@share.jogoj.com"
] |
t-kawatsu@share.jogoj.com
|
265a0db7a8a39c404052d7ced7a9eefd2fcd06f5
|
b6bfba71956589aa6f56729ec9ebce824a5fb8f4
|
/src/main/java/com/javapatterns/command/television/Invoker.java
|
ebec0237c899f5c9fdd0ef02869fa858f0cce2d4
|
[
"Apache-2.0"
] |
permissive
|
plotor/design-pattern
|
5d78d0ef7349a2d637bea5b7270c9557820e5f60
|
4614bab50921b61610693b9b1ed06feddcee9ce6
|
refs/heads/master
| 2022-12-20T17:49:13.396939
| 2020-10-13T14:37:14
| 2020-10-13T14:37:14
| 67,619,122
| 0
| 0
|
Apache-2.0
| 2020-10-13T14:37:15
| 2016-09-07T15:21:45
|
Java
|
UTF-8
|
Java
| false
| false
| 211
|
java
|
/* Generated by Together */
package com.javapatterns.command.television;
public interface Invoker {
void invoke();
/**
* @link aggregation
* @directed
*/
/*#Command lnkCommand;*/
}
|
[
"zhenchao.wang@hotmail.com"
] |
zhenchao.wang@hotmail.com
|
b57eb633b6d811fbb530e1630b85d1c367c6ac43
|
6fd2e54a712a8e2270a4b3bef59edb4ee9951342
|
/app/src/main/java/com/xuechuan/xcedu/adapter/ExamOldAdapter.java
|
b4cbe5fb825ef5c97c892793acb3ad445ea2496c
|
[] |
no_license
|
yufeilong92/textZZ
|
984fa294854f5b5517b34e125df8a960b34fd93c
|
213d3d04661406d8c7f09a1febd3256a5fa9a1ac
|
refs/heads/master
| 2020-03-23T11:40:36.547767
| 2018-07-19T02:42:32
| 2018-07-19T02:42:32
| 141,515,511
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,466
|
java
|
package com.xuechuan.xcedu.adapter;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.xuechuan.xcedu.R;
import com.xuechuan.xcedu.vo.ExamBeanVo;
import java.util.List;
/**
* @version V 1.0 xxxxxxxx
* @Title: xcedu
* @Package com.xuechuan.xcedu.adapter
* @Description: 模拟考试
* @author: L-BackPacker
* @date: 2018/5/4 14:21
* @verdescript 版本号 修改时间 修改人 修改的概要说明
* @Copyright: 2018
*/
public class ExamOldAdapter extends RecyclerView.Adapter<ExamOldAdapter.ViewHolder> implements View.OnClickListener {
private Context mContext;
private List<ExamBeanVo> mData;
private final LayoutInflater mInflater;
private onItemClickListener clickListener;
@Override
public void onClick(View v) {
if (clickListener!=null){
clickListener.onClickListener(v.getTag(),v.getId());
}
}
public interface onItemClickListener {
public void onClickListener(Object obj, int position);
}
public void setClickListener(onItemClickListener clickListener) {
this.clickListener = clickListener;
}
public ExamOldAdapter(Context mContext, List<ExamBeanVo> mData) {
this.mContext = mContext;
this.mData = mData;
mInflater = LayoutInflater.from(mContext);
}
@NonNull
@Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = mInflater.inflate(R.layout.item_exam_layout, null);
ViewHolder holder = new ViewHolder(view);
view.setOnClickListener(this);
return holder;
}
@Override
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
ExamBeanVo vo = mData.get(position);
holder.mTvExamTitle.setText(vo.getTitle());
holder.itemView.setTag(vo);
holder.itemView.setId(position);
}
@Override
public int getItemCount() {
return mData == null ? 0 : mData.size();
}
public class ViewHolder extends RecyclerView.ViewHolder {
public TextView mTvExamTitle;
public ViewHolder(View itemView) {
super(itemView);
this.mTvExamTitle = (TextView) itemView.findViewById(R.id.tv_exam_title);
}
}
}
|
[
"931697478@qq.com"
] |
931697478@qq.com
|
121774db9591a8166ad3392ad1569ea363843a9f
|
6395a4761617ad37e0fadfad4ee2d98caf05eb97
|
/.history/src/main/java/frc/robot/RobotMap_20191110150249.java
|
235923ff8d7960593cd4bebf6d8984f9dc03ab36
|
[] |
no_license
|
iNicole5/Cheesy_Drive
|
78383e3664cf0aeca42fe14d583ee4a8af65c1a1
|
80e1593512a92dbbb53ede8a8af968cc1efa99c5
|
refs/heads/master
| 2020-09-22T06:38:04.415411
| 2019-12-01T00:50:53
| 2019-12-01T00:50:53
| 225,088,973
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 802
|
java
|
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
/*----------------------------------------------------------------------------*/
package frc.robot;
/**
* The RobotMap is a mapping from the ports sensors and actuators are wired into
* to a variable name. This provides flexibility changing wiring, makes checking
* the wiring easier and significantly reduces the number of magic numbers
* floating around.
*/
public class RobotMap
{
}
|
[
"40499551+iNicole5@users.noreply.github.com"
] |
40499551+iNicole5@users.noreply.github.com
|
dd72e2e412ea34356060184e2fbc58181f6c4e21
|
3a5c444c96dd32bd327d5fe2892b9277e107d621
|
/POS/app/src/main/java/com/cesaas/android/pos/net/xutils/BaseValueNet.java
|
87f05371461e0b468b727fd393ec484be6f38867
|
[] |
no_license
|
FlyBiao/POS
|
3bcb375536b62e9508361e5111ccfae7fd3e6a90
|
bd330b1842a6251224d940a93cae84418a9879d1
|
refs/heads/master
| 2020-03-22T21:14:01.062654
| 2018-07-12T07:06:18
| 2018-07-12T07:06:18
| 140,669,508
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,163
|
java
|
package com.cesaas.android.pos.net.xutils;
import android.content.Context;
import android.util.Log;
import com.cesaas.android.pos.dialog.WaitDialog;
import com.cesaas.android.pos.global.App;
import com.cesaas.android.pos.global.Constant;
import com.cesaas.android.pos.global.Urls;
import com.cesaas.android.pos.net.xutils.utils.NetworkUtil;
import com.cesaas.android.pos.utils.AbDataPrefsUtil;
import com.cesaas.android.pos.utils.AbPrefsUtil;
import com.cesaas.android.pos.utils.MD5;
import com.cesaas.android.pos.utils.ToastUtils;
import com.lidroid.xutils.HttpUtils;
import com.lidroid.xutils.exception.HttpException;
import com.lidroid.xutils.http.RequestParams;
import com.lidroid.xutils.http.ResponseInfo;
import com.lidroid.xutils.http.callback.RequestCallBack;
import com.lidroid.xutils.http.client.HttpRequest.HttpMethod;
import com.lidroid.xutils.util.LogUtils;
import org.apache.http.entity.StringEntity;
import org.json.JSONObject;
/**
* 网络请求基类
*
* @author Evan
*
*/
public class BaseValueNet {
private static final String TAG = "BaseNet";
public Context mContext;
protected String uri;
protected JSONObject data;
private boolean ishow;
private WaitDialog dialog;
protected AbDataPrefsUtil abData;
public BaseValueNet(Context context, boolean show) {
this.mContext = context;
data = new JSONObject();
abData = AbDataPrefsUtil.getInstance();
this.ishow = show;
if (show)
dialog = new WaitDialog(context);
}
/**
* 获取授权
* @return
*/
public String getToken() {
StringBuffer sbuf = new StringBuffer();
sbuf.append(AbPrefsUtil.getInstance().getString(Constant.SPF_TOKEN))
.append("SW-AppAuthorizationToken")
.append(AbPrefsUtil.getInstance().getString(Constant.SPF_TIME, ""));
return new MD5().toMD5(sbuf.toString());
}
/**
* 开始请求网络
*/
public void mPostNet() {
if (App.mInstance().getNetType() != NetworkUtil.NO_NETWORK) {
RequestParams params = new RequestParams();
try {
params.setBodyEntity(new StringEntity(data.toString(), "UTF-8"));
params.addHeader("Content-Type", "application/json");
String token = this.getToken();
String time = AbPrefsUtil.getInstance().getString(Constant.SPF_TIME, "");
if (!"".equals(token) && !"".equals(time)) {
StringBuffer auth = new StringBuffer();
auth.append("SW-Authorization ").append(token).append(";").append(time);
params.addHeader("Authorization", auth.toString());
// Log.i(Constant.TAG, "auth=="+data+"auth=="+auth.toString());
}
} catch (Exception e) {
e.printStackTrace();
}
Log.i(Constant.TAG,"发送请求:" +"URL=:"+ Urls.SERVER + uri + "--数据参数=:" + data);
HttpUtils http = new HttpUtils();
http.send(HttpMethod.POST, Urls.SERVER + uri, params, new RequestCallBack<HttpUtils>() {
@Override
public void onLoading(long total, long current, boolean isUploading) {
super.onLoading(total, current, isUploading);
if (isUploading) {
} else {
}
}
//加载刷新
@Override
public void onStart() {
super.onStart();
if (ishow && dialog != null)
dialog.show();
}
@Override
public void onFailure(HttpException arg0, String arg1) {
try {
if (ishow && dialog != null)
dialog.dismiss();
} catch (Exception e) {
e.printStackTrace();
}
mFail(arg0, arg1);
}
@Override
public void onSuccess(ResponseInfo<HttpUtils> responseInfo) {
try {
if (ishow && dialog != null)
dialog.dismiss();
} catch (Exception e) {
e.printStackTrace();
}
mSuccess(responseInfo.result + "");
}
});
} else {
ToastUtils.show("未Intent网络,请检查后重试!");
}
}
public String getAccount() {
return AbPrefsUtil.getInstance().getString(Constant.SPF_ACCOUNT);
}
protected void mSuccess(String rJson) {
LogUtils.d("成功:" + rJson);
// Log.i("com.cesaas.android.ep.ekawuyou.global.BaseNet", "rJson==:"+rJson);
}
protected void mFail(HttpException e, String err) {
LogUtils.d("失败:" + err);
ToastUtils.show( "服务器连接或返回错误!");
}
}
|
[
"fengguangbiao@163.com"
] |
fengguangbiao@163.com
|
d1c8ab8206928450ead15478fcc927475ec2884c
|
fd0b41d779b8062d3720597af17a16fcb9601393
|
/src/main/java/com/smm/ctrm/bo/impl/Basis/BrokerServiceImpl.java
|
b753bd500723dae107c012c527c8f329615d0f96
|
[] |
no_license
|
pseudocodes/ctrm
|
a62bddc973b575d56e6ca874faa1be8e7c437387
|
02260333a1bb0c25e9d4799698c324cb5bceb6f6
|
refs/heads/master
| 2021-09-25T14:41:59.253752
| 2018-10-23T03:47:54
| 2018-10-23T03:47:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,017
|
java
|
package com.smm.ctrm.bo.impl.Basis;
import java.util.List;
import org.apache.log4j.Logger;
import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Restrictions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.smm.ctrm.bo.Basis.BrokerService;
import com.smm.ctrm.dao.HibernateRepository;
import com.smm.ctrm.domain.Basis.Broker;
import com.smm.ctrm.dto.res.ActionResult;
import com.smm.ctrm.util.MessageCtrm;
/**
* Created by hao.zheng on 2016/4/25.
*
*/
@Service
public class BrokerServiceImpl implements BrokerService {
private static final Logger logger=Logger.getLogger(BrokerServiceImpl.class);
@Autowired
private HibernateRepository<Broker> repository;
@Override
public ActionResult<Broker> Save(Broker broker) {
ActionResult<Broker> result= new ActionResult<>();
try{
this.repository.SaveOrUpdate(broker);
result.setSuccess(true);
result.setData(broker);
result.setMessage(MessageCtrm.SaveSuccess);
}catch (Exception e){
logger.error(e);
result.setSuccess(false);
result.setMessage(e.getMessage());
}
return result;
}
@Override
public ActionResult<String> Delete(String id) {
ActionResult<String> result= new ActionResult<>();
try{
this.repository.PhysicsDelete(id, Broker.class);
result.setSuccess(true);
result.setMessage(MessageCtrm.DeleteSuccess);
}catch (Exception e){
logger.error(e);
result.setSuccess(false);
result.setMessage(e.getMessage());
}
return result;
}
@Override
public ActionResult<List<Broker>> Brokers() {
DetachedCriteria where=DetachedCriteria.forClass(Broker.class);
where.add(Restrictions.eq("IsHidden", false));
List<Broker> list=this.repository.GetQueryable(Broker.class).where(where).toCacheList();
ActionResult<List<Broker>> result= new ActionResult<>();
result.setSuccess(true);
result.setData(list);
return result;
}
@Override
public ActionResult<List<Broker>> BackBrokers() {
List<Broker> list=this.repository.GetQueryable(Broker.class).toList();
ActionResult<List<Broker>> result= new ActionResult<>();
result.setSuccess(true);
result.setData(list);
return result;
}
@Override
public ActionResult<Broker> GetById(String id) {
ActionResult<Broker> result= new ActionResult<>();
try{
Broker broker=this.repository.getOneById(id, Broker.class);
result.setSuccess(true);
result.setData(broker);
}catch (Exception e){
logger.error(e);
result.setSuccess(false);
result.setMessage(e.getMessage());
}
return result;
}
}
|
[
"406701239@qq.com"
] |
406701239@qq.com
|
0a406ec71ea9f9f76b0550f3b47d9f1d279e0e5f
|
7d882c952f74d18e619bcaf62ac9c6314b162f68
|
/resources/common/org/webpki/saturn/common/CardSpecificData.java
|
043604a1b11db4169011fb370036641903b48bc7
|
[] |
no_license
|
canton-consulting/saturn
|
3e22b4fb5c2a74a21965dcfa41941a79914846a3
|
bfb6bc9e83c7a02653cbcdd81ed52ae465316099
|
refs/heads/master
| 2021-01-19T12:58:05.916401
| 2017-04-10T02:37:04
| 2017-04-10T02:37:04
| 88,058,863
| 0
| 0
| null | 2017-04-12T14:06:56
| 2017-04-12T14:06:56
| null |
UTF-8
|
Java
| false
| false
| 2,098
|
java
|
/*
* Copyright 2006-2016 WebPKI.org (http://webpki.org).
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.webpki.saturn.common;
import java.io.IOException;
import java.util.GregorianCalendar;
import org.webpki.json.JSONObjectReader;
import org.webpki.json.JSONObjectWriter;
// Holds card specific account data
public class CardSpecificData implements BaseProperties {
String accountHolder; // Name
GregorianCalendar expirationDate; // When the card expirationDate
String securityCode; // CCV or similar
public CardSpecificData(String accountHolder, GregorianCalendar expirationDate, String securityCode) throws IOException {
this.accountHolder = accountHolder;
this.expirationDate = expirationDate;
this.securityCode = securityCode;
}
public CardSpecificData(JSONObjectReader rd) throws IOException {
this(rd.getString(ACCOUNT_HOLDER_JSON), rd.getDateTime(EXPIRES_JSON), rd.getString(ACCOUNT_SECURITY_CODE_JSON));
}
public JSONObjectWriter writeData(JSONObjectWriter wr) throws IOException {
return wr.setString(ACCOUNT_HOLDER_JSON, accountHolder)
.setDateTime(EXPIRES_JSON, expirationDate, true)
.setString(ACCOUNT_SECURITY_CODE_JSON, securityCode);
}
public String getAccountHolder() {
return accountHolder;
}
public GregorianCalendar getExpirationDate() {
return expirationDate;
}
public String getSecurityCode() {
return securityCode;
}
}
|
[
"anders.rundgren.net@gmail.com"
] |
anders.rundgren.net@gmail.com
|
36737f156191421d6de11978d14e7bfa228d711c
|
0adcb787c2d7b3bbf81f066526b49653f9c8db40
|
/src/main/java/com/alipay/api/response/AlipayIserviceCognitiveBillInferenceQueryResponse.java
|
6c38443cb9cbd6eaadd9df67a4c60d6a0a302f85
|
[
"Apache-2.0"
] |
permissive
|
yikey/alipay-sdk-java-all
|
1cdca570c1184778c6f3cad16fe0bcb6e02d2484
|
91d84898512c5a4b29c707b0d8d0cd972610b79b
|
refs/heads/master
| 2020-05-22T13:40:11.064476
| 2019-04-11T14:11:02
| 2019-04-11T14:11:02
| 186,365,665
| 1
| 0
| null | 2019-05-13T07:16:09
| 2019-05-13T07:16:08
| null |
UTF-8
|
Java
| false
| false
| 1,185
|
java
|
package com.alipay.api.response;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.domain.BillInferenceResult;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.iservice.cognitive.bill.inference.query response.
*
* @author auto create
* @since 1.0, 2019-01-07 20:51:15
*/
public class AlipayIserviceCognitiveBillInferenceQueryResponse extends AlipayResponse {
private static final long serialVersionUID = 4115358554342836443L;
/**
* 发票识别内容详细信息
*/
@ApiField("result")
private BillInferenceResult result;
/**
* 信息抽取是否抽取成功
*/
@ApiField("ret")
private Long ret;
/**
* 开放平台trace_id
*/
@ApiField("trace_id")
private String traceId;
public void setResult(BillInferenceResult result) {
this.result = result;
}
public BillInferenceResult getResult( ) {
return this.result;
}
public void setRet(Long ret) {
this.ret = ret;
}
public Long getRet( ) {
return this.ret;
}
public void setTraceId(String traceId) {
this.traceId = traceId;
}
public String getTraceId( ) {
return this.traceId;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
c1bd7cb41d91ffa651650c44eeca829fc7b637dd
|
ad063462f74d94af10cd34ad6bfb39dd5a31760d
|
/src/main/java/com/library/datamodel/dsm_bridge/TbRolePrivilege.java
|
2aa8867b00aaeed795049974a72aff713246f372
|
[] |
no_license
|
smallgod/library-dbmodels
|
a32c282d7e8b0858d305703d91f60004b14c3c2e
|
a648200b0c983a20c759037c208829e616b2c71a
|
refs/heads/master
| 2021-08-18T21:21:08.216948
| 2017-11-23T21:06:59
| 2017-11-23T21:06:59
| 111,849,984
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,098
|
java
|
package com.library.datamodel.dsm_bridge;
// default package
// Generated Dec 17, 2016 3:58:36 PM by Hibernate Tools 4.3.5.Final
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* TbRolePrivilege generated by hbm2java
*/
@Entity
@Table(name = "tb_role_privilege")
public class TbRolePrivilege implements java.io.Serializable {
private TbRolePrivilegeId id;
public TbRolePrivilege() {
}
public TbRolePrivilege(TbRolePrivilegeId id) {
this.id = id;
}
@EmbeddedId
@AttributeOverrides({
@AttributeOverride(name = "cstmId", column = @Column(name = "CSTM_ID", nullable = false)),
@AttributeOverride(name = "roleId", column = @Column(name = "ROLE_ID", nullable = false)),
@AttributeOverride(name = "privilegeId", column = @Column(name = "PRIVILEGE_ID", nullable = false)) })
public TbRolePrivilegeId getId() {
return this.id;
}
public void setId(TbRolePrivilegeId id) {
this.id = id;
}
}
|
[
"davies.mugume@gmail.com"
] |
davies.mugume@gmail.com
|
ea1d18fe380e7ba9b8b5c32bf2ed1409738cdc1e
|
f33516ffd4ac82b741f936ae2f7ef974b5f7e2f9
|
/changedPlugins/org.emftext.language.java/src-gen/org/emftext/language/java/modifiers/Public.java
|
25116600665779e39a987adc6ad1c92f5e4d139a
|
[] |
no_license
|
ichupakhin/sdq
|
e8328d5fdc30482c2f356da6abdb154e948eba77
|
32cc990e32b761aa37420f9a6d0eede330af50e2
|
refs/heads/master
| 2023-01-06T13:33:20.184959
| 2020-11-01T13:29:04
| 2020-11-01T13:29:04
| 246,244,334
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 902
|
java
|
/**
* Copyright (c) 2006-2014
* Software Technology Group, Dresden University of Technology
* DevBoost GmbH, Berlin, Amtsgericht Charlottenburg, HRB 140026
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Software Technology Group - TU Dresden, Germany;
* DevBoost GmbH - Berlin, Germany
* - initial API and implementation
*
*/
package org.emftext.language.java.modifiers;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Public</b></em>'.
* <!-- end-user-doc -->
*
*
* @see org.emftext.language.java.modifiers.ModifiersPackage#getPublic()
* @model
* @generated
*/
public interface Public extends Modifier
{
} // Public
|
[
"bla@mail.com"
] |
bla@mail.com
|
15e52337285f25596e1a3381ee7e9d4173ba3dda
|
39fea05fd2428f920254368caab5ef4a07c4c36e
|
/spring-jms-integration-gateway/src/main/java/com/codenotfound/jms/OrderService.java
|
7f6741d8318205a0ec924df442bc1bf652d68eeb
|
[
"MIT"
] |
permissive
|
andymaier/spring-jms-artemis-demo
|
84a81eb46caefef2bda0e2d4605e91c951d3502e
|
39509d0748a881211a11646623052e15d4d1607c
|
refs/heads/master
| 2022-12-20T06:02:08.152267
| 2020-09-28T15:10:00
| 2020-09-28T15:10:00
| 299,270,860
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 709
|
java
|
package com.codenotfound.jms;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.messaging.Message;
import org.springframework.messaging.support.MessageBuilder;
public class OrderService {
private static final Logger LOGGER =
LoggerFactory.getLogger(OrderService.class);
public Message<?> order(Message<?> order) {
LOGGER.info("received order='{}'", order);
Message<?> status = MessageBuilder.withPayload("Accepted")
.setHeader("jms_correlationId",
order.getHeaders().get("jms_messageId"))
.setReplyChannelName("inboundOrderResponseChannel").build();
LOGGER.info("sending status='{}'", status);
return status;
}
}
|
[
"codenotfound.com@gmail.com"
] |
codenotfound.com@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.