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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0f6f372afcd9214b10947c72a51c9a4308a8061f
|
777d41c7dc3c04b17dfcb2c72c1328ea33d74c98
|
/dongciSDK_android/src/main/java/com/dongci/sun/gpuimglibrary/gles/filter/filternew/GPUImageLightenBlendFilter.java
|
7c45c84da914dad02c61c334c5b4ca6290cd301e
|
[] |
no_license
|
foryoung2018/videoedit
|
00fc132c688be6565efb373cae4564874f61d52a
|
7a316996ce1be0f08dbf4c4383da2c091447c183
|
refs/heads/master
| 2020-04-08T04:56:42.930063
| 2018-11-25T14:27:43
| 2018-11-25T14:27:43
| 159,038,966
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,502
|
java
|
/*
* Copyright (C) 2012 CyberAgent
*
* 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.dongci.sun.gpuimglibrary.gles.filter.filternew;
public class GPUImageLightenBlendFilter extends GPUImageTwoInputFilter {
public static final String LIGHTEN_BLEND_FRAGMENT_SHADER = "varying highp vec2 textureCoordinate;\n" +
" varying highp vec2 textureCoordinate2;\n" +
"\n" +
" uniform sampler2D inputImageTexture;\n" +
" uniform sampler2D inputImageTexture2;\n" +
" \n" +
" void main()\n" +
" {\n" +
" lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate);\n" +
" lowp vec4 textureColor2 = texture2D(inputImageTexture2, textureCoordinate2);\n" +
" \n" +
" gl_FragColor = max(textureColor, textureColor2);\n" +
" }";
public GPUImageLightenBlendFilter() {
super(LIGHTEN_BLEND_FRAGMENT_SHADER);
}
}
|
[
"1184394624@qq.com"
] |
1184394624@qq.com
|
71fe5e74320a4bbb5b0ab57d3f76c7df8fccc2ef
|
289a3eadd2a26fc7f82ca0d58a29902b753dcee3
|
/craft3data/src/com/hiveworkshop/wc3/gui/modeledit/newstuff/VertexClusterDefinitions.java
|
7af43e330da97ae570d49bddb19b24c6c1f14540
|
[
"MIT"
] |
permissive
|
Retera/ReterasModelStudio
|
e6cfe3099eed1c6426dff34f2f965ca040597d34
|
2b7c9f0c223874381074f4e04f82442f03a8ec53
|
refs/heads/master
| 2023-08-30T19:26:33.917185
| 2023-06-02T03:00:14
| 2023-06-02T03:00:14
| 39,873,368
| 59
| 18
| null | 2021-05-30T21:14:35
| 2015-07-29T04:32:41
|
Java
|
UTF-8
|
Java
| false
| false
| 3,656
|
java
|
package com.hiveworkshop.wc3.gui.modeledit.newstuff;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.hiveworkshop.wc3.mdl.Geoset;
import com.hiveworkshop.wc3.mdl.GeosetVertex;
import com.hiveworkshop.wc3.mdl.EditableModel;
import com.hiveworkshop.wc3.mdl.Triangle;
import com.hiveworkshop.wc3.mdl.Vertex;
public class VertexClusterDefinitions {
private final Map<Vertex, Integer> vertexToClusterId = new HashMap<>();
private final int maxClusterIdKnown;
public VertexClusterDefinitions(final EditableModel model) {
final Map<HashableVector, List<GeosetVertex>> positionToVertices = new HashMap<>();
for (final Geoset geoset : model.getGeosets()) {
for (final GeosetVertex vertex : geoset.getVertices()) {
final HashableVector hashKey = new HashableVector(vertex);
List<GeosetVertex> verticesAtPoint = positionToVertices.get(hashKey);
if (verticesAtPoint == null) {
verticesAtPoint = new ArrayList<>();
positionToVertices.put(hashKey, verticesAtPoint);
}
verticesAtPoint.add(vertex);
}
}
int clusterId = 0;
for (final Geoset geoset : model.getGeosets()) {
for (final GeosetVertex vertex : geoset.getVertices()) {
if (vertexToClusterId.get(vertex) == null) {
// build component
assignConnected(vertex, clusterId, positionToVertices);
clusterId++;
}
}
}
maxClusterIdKnown = clusterId;
}
public int getMaxClusterIdKnown() {
return maxClusterIdKnown;
}
/**
* Returns the cluster ID of the vertex. Returns -1 for vertices added dynamically, so they should all be in a group
* together and not cause error.
*
* @param vertex
* @return
*/
public int getClusterId(final Vertex vertex) {
final Integer clusterId = vertexToClusterId.get(vertex);
if (clusterId == null) {
return -1;
}
return clusterId;
}
private void assignConnected(final GeosetVertex vertex, final int clusterId,
final Map<HashableVector, List<GeosetVertex>> positionToVertices) {
vertexToClusterId.put(vertex, clusterId);
for (final Triangle triangle : vertex.getTriangles()) {
for (final GeosetVertex neighborPosition : triangle.getVerts()) {
final List<GeosetVertex> neighbors = positionToVertices.get(new HashableVector(neighborPosition));
for (final GeosetVertex neighbor : neighbors) {
if (vertexToClusterId.get(neighbor) == null) {
assignConnected(neighbor, clusterId, positionToVertices);
}
}
}
}
}
private static final class HashableVector {
private final float x, y, z;
public HashableVector(final float x, final float y, final float z) {
this.x = x;
this.y = y;
this.z = z;
}
public HashableVector(final Vertex vertex) {
this.x = (float) vertex.x;
this.y = (float) vertex.y;
this.z = (float) vertex.z;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + Float.floatToIntBits(x);
result = prime * result + Float.floatToIntBits(y);
result = prime * result + Float.floatToIntBits(z);
return result;
}
@Override
public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final HashableVector other = (HashableVector) obj;
if (Float.floatToIntBits(x) != Float.floatToIntBits(other.x)) {
return false;
}
if (Float.floatToIntBits(y) != Float.floatToIntBits(other.y)) {
return false;
}
if (Float.floatToIntBits(z) != Float.floatToIntBits(other.z)) {
return false;
}
return true;
}
}
}
|
[
"retera@etheller.com"
] |
retera@etheller.com
|
08c4ec0d905e39df20a10697d7fa3ad5e74c3048
|
b4a38c89260922c897a956e8e8cdea991892ab7f
|
/src/main/java/com/mallowigi/idea/themes/MTAccentMode.java
|
dcc12c9e51b512452a8aa72e17849cf5db57b6c2
|
[
"LicenseRef-scancode-warranty-disclaimer"
] |
no_license
|
RaynLean/material-theme-jetbrains
|
5e5f3db89308a5494d56e45f284a92a802706162
|
4b3683f00cf2e0000a627ff05d80f38748f0baaa
|
refs/heads/master
| 2021-12-31T17:57:06.990723
| 2021-12-17T20:53:31
| 2021-12-17T20:53:31
| 126,278,219
| 0
| 0
|
NOASSERTION
| 2021-12-17T21:01:50
| 2018-03-22T04:11:43
|
Java
|
UTF-8
|
Java
| false
| false
| 4,706
|
java
|
/*
* The MIT License (MIT)
*
* Copyright (c) 2015 - 2020 Chris Magnussen and Elior Boukhobza
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*
*/
package com.mallowigi.idea.themes;
import com.google.common.collect.Sets;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.ui.JBColor;
import org.jetbrains.annotations.NonNls;
import java.awt.*;
import java.util.Collections;
import java.util.Set;
@SuppressWarnings({"HardCodedStringLiteral",
"DuplicateStringLiteralInspection",
"MagicNumber"})
public enum MTAccentMode {
ACCENTS;
public static final Set<String> SECOND_ACCENT_RESOURCES = Collections.unmodifiableSet(
Sets.newHashSet(
"CompletionPopup.matchForeground",
"CompletionPopup.matchSelectedForeground", // deprecated
"CompletionPopup.matchSelectionForeground",
"EditorTabs.active.underlineColor", // deprecated
"EditorTabs.inactiveUnderlineColor",
"EditorTabs.underlineColor",
"link.foreground",
"Link.activeForeground",
"Link.hoverForeground",
"Link.pressedForeground",
"Link.visitedForeground",
"Notification.MoreButton.foreground",
"Notification.linkForeground", // deprecated
"Notification.Link.foreground", //deprecated
"TabbedPane.underlineColor"
)
);
public static final Set<String> SELECTION_RESOURCES = Collections.unmodifiableSet(
Sets.newHashSet(
"DefaultTabs.underlinedTabForeground",
"EditorTabs.active.foreground", // deprecated
"EditorTabs.selectedForeground",
"EditorTabs.underlinedTabForeground",
"Notification.foreground",
"Tree.modifiedItemForeground",
"UIDesigner.motion.CSPanel.SelectedFocusBackground",
"WelcomeScreen.Projects.actions.selectionBackground"
)
);
@NonNls
public static final Set<String> ACCENT_EXTRA_RESOURCES = Collections.unmodifiableSet(
Sets.newHashSet(
"Autocomplete.selectionBackground",
"Button.default.endBackground",
"Button.default.startBackground",
"DebuggerTabs.underlinedTabBackground",
"DefaultTabs.hoverBackground",
"DefaultTabs.underlinedTabBackground",
"Dialog.titleColor",
"EditorTabs.active.background", // deprecated
"EditorTabs.hoverColor",
"EditorTabs.hoverMaskColor",
"EditorTabs.selectedBackground",
"EditorTabs.underlinedTabBackground",
"Github.List.tallRow.selectionBackground",
"Outline.focusedColor", // deprecated
"Plugins.Button.installFillBackground",
"Table.focusCellBackground",
"Table.highlightOuter",
"Table.lightSelectionBackground", // deprecated
"Table.selectionBackground",
"WelcomeScreen.Projects.selectionBackground"
));
@NonNls
public static final Set<String> ACCENT_TRANSPARENT_EXTRA_RESOURCES = Collections.unmodifiableSet(
Sets.newHashSet(
"CompletionPopup.selectionBackground",
"List.selectionBackground",
"Menu.selectionBackground",
"MenuItem.selectionBackground",
"Tree.selectionBackground",
"Toolbar.Floating.background"
));
@NonNls
public static final Set<String> DARKER_ACCENT_RESOURCES = Collections.unmodifiableSet(
Sets.newHashSet(
"EditorTabs.background",
"EditorTabs.borderColor",
"EditorTabs.inactiveColoredFileBackground",
"DefaultTabs.background",
"DefaultTabs.borderColor",
"Notification.background",
"Notification.borderColor"
));
public static MTAccentMode getInstance() {
return ServiceManager.getService(MTAccentMode.class);
}
public static Color getSelectionColor() {
return new JBColor(0x111111, 0xFFFFFF);
}
}
|
[
"heliosaian@gmail.com"
] |
heliosaian@gmail.com
|
b08980169e50b684a00a7e96d6d5d78f7270a985
|
c9e2035df0aa14ff2415250338540fcb2b9bf8d1
|
/sealtalk/src/main/java/com/caesar/rongcloudspeed/ui/dialog/MorePopWindow.java
|
6dd40d99eec7029b64be46011dd249cf1489499a
|
[] |
no_license
|
xmong123/sealtalk-android-speers
|
614052fb4108a4aed680bb86adbedc17684246a3
|
7bdfe4c2926d6ef52cf8fe0a06662f8b2bfaac14
|
refs/heads/master
| 2021-08-15T18:43:24.445183
| 2020-12-08T04:42:46
| 2020-12-08T04:42:46
| 230,228,818
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,594
|
java
|
package com.caesar.rongcloudspeed.ui.dialog;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.graphics.drawable.ColorDrawable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup.LayoutParams;
import android.widget.PopupWindow;
import com.caesar.rongcloudspeed.R;
public class MorePopWindow extends PopupWindow {
private OnPopWindowItemClickListener listener;
private View contentView;
public interface OnPopWindowItemClickListener {
void onStartChartClick();
void onCreateGroupClick();
void onAddFriendClick();
void onScanClick();
}
@SuppressLint("InflateParams")
public MorePopWindow(final Activity context, OnPopWindowItemClickListener listener) {
this.listener = listener;
LayoutInflater inflater = (LayoutInflater) context
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
contentView = inflater.inflate(R.layout.main_popup_title_more, null);
// 设置SelectPicPopupWindow的View
this.setContentView(contentView);
// 设置SelectPicPopupWindow弹出窗体的宽
this.setWidth(LayoutParams.WRAP_CONTENT);
// 设置SelectPicPopupWindow弹出窗体的高
this.setHeight(LayoutParams.WRAP_CONTENT);
// 设置SelectPicPopupWindow弹出窗体可点击
this.setFocusable(true);
this.setOutsideTouchable(true);
// 刷新状态
this.update();
// 实例化一个ColorDrawable颜色为半透明
ColorDrawable dw = new ColorDrawable(0000000000);
// 点back键和其他地方使其消失,设置了这个才能触发OnDismisslistener ,设置其他控件变化等操作
this.setBackgroundDrawable(dw);
// 设置SelectPicPopupWindow弹出窗体动画效果
this.setAnimationStyle(R.style.AnimationMainTitleMore);
contentView.findViewById(R.id.btn_start_chat).setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
if (listener != null) {
listener.onStartChartClick();
}
dismiss();
}
});
contentView.findViewById(R.id.btn_create_group).setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
if (listener != null) {
listener.onCreateGroupClick();
}
dismiss();
}
});
contentView.findViewById(R.id.btn_add_friends).setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
if (listener != null) {
listener.onAddFriendClick();
}
dismiss();
}
});
contentView.findViewById(R.id.btn_scan).setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
if (listener != null) {
listener.onScanClick();
}
dismiss();
}
});
}
/**
* 显示popupWindow
*
* @param parent
*/
public void showPopupWindow(View parent) {
if (!this.isShowing()) {
// 以下拉方式显示popupwindow
this.showAsDropDown(parent, 0, 0);
} else {
this.dismiss();
}
}
}
|
[
"87892505"
] |
87892505
|
86dd01112a2ec44af0b3932812ed7271c0c5cd20
|
d81829789fcdca5d930cab48aa024a0720e43c88
|
/GameDemo/src/com/atet/tvmarket/entity/dao/UserGiftInfo.java
|
45df6be6af16e0a095a7b2994954746306811a5a
|
[] |
no_license
|
clouse/gamedemo
|
e420cd2fc3138628ba31af779893e6f852a8ba21
|
e54a32a6441e9d8b973e40b1b262bf7c6b333468
|
refs/heads/master
| 2021-01-10T13:10:26.880391
| 2015-12-17T06:33:52
| 2015-12-17T06:33:52
| 48,152,894
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,067
|
java
|
package com.atet.tvmarket.entity.dao;
// THIS CODE IS GENERATED BY greenDAO, EDIT ONLY INSIDE THE "KEEP"-SECTIONS
// KEEP INCLUDES - put your custom includes here
// KEEP INCLUDES END
/**
* Entity mapped to table USER_GIFT_INFO.
*/
public class UserGiftInfo implements java.io.Serializable {
private String giftPackageid;
private String giftCode;
private String icon;
private String name;
private String gameName;
private String gameId;
private String content;
private String useMethod;
private Long receiveTime;
// KEEP FIELDS - put your custom fields here
private static final long serialVersionUID = 1L;
// KEEP FIELDS END
public UserGiftInfo() {
}
public UserGiftInfo(String giftPackageid) {
this.giftPackageid = giftPackageid;
}
public UserGiftInfo(String giftPackageid, String giftCode, String icon, String name, String gameName, String gameId, String content, String useMethod, Long receiveTime) {
this.giftPackageid = giftPackageid;
this.giftCode = giftCode;
this.icon = icon;
this.name = name;
this.gameName = gameName;
this.gameId = gameId;
this.content = content;
this.useMethod = useMethod;
this.receiveTime = receiveTime;
}
public String getGiftPackageid() {
return giftPackageid;
}
public void setGiftPackageid(String giftPackageid) {
this.giftPackageid = giftPackageid;
}
public String getGiftCode() {
return giftCode;
}
public void setGiftCode(String giftCode) {
this.giftCode = giftCode;
}
public String getIcon() {
return icon;
}
public void setIcon(String icon) {
this.icon = icon;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getGameName() {
return gameName;
}
public void setGameName(String gameName) {
this.gameName = gameName;
}
public String getGameId() {
return gameId;
}
public void setGameId(String gameId) {
this.gameId = gameId;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getUseMethod() {
return useMethod;
}
public void setUseMethod(String useMethod) {
this.useMethod = useMethod;
}
public Long getReceiveTime() {
return receiveTime;
}
public void setReceiveTime(Long receiveTime) {
this.receiveTime = receiveTime;
}
// KEEP METHODS - put your custom methods here
@Override
public String toString() {
return "UserGiftInfo [giftPackageid=" + giftPackageid + ", giftCode="
+ giftCode + ", icon=" + icon + ", name=" + name
+ ", gameName=" + gameName + ", gameId=" + gameId
+ ", content=" + content + ", useMethod=" + useMethod
+ ", receiveTime=" + receiveTime + "]";
}
// KEEP METHODS END
}
|
[
"clouse@yeah.net"
] |
clouse@yeah.net
|
e34590d627109f02deddc90bb8dd6363eb9e7780
|
b1c7d854d6a2257330b0ea137c5b4e24b2e5078d
|
/com/google/android/gms/fitness/request/zzaj.java
|
7e8dd5c900719779b7ff963fb36bce684bee3e14
|
[] |
no_license
|
nayebare/mshiriki_android_app
|
45fd0061332f5253584b351b31b8ede2f9b56387
|
7b6b729b5cbc47f109acd503b57574d48511ee70
|
refs/heads/master
| 2020-06-21T20:01:59.725854
| 2017-06-12T13:55:51
| 2017-06-12T13:55:51
| 94,205,275
| 1
| 1
| null | 2017-06-13T11:22:51
| 2017-06-13T11:22:51
| null |
UTF-8
|
Java
| false
| false
| 2,680
|
java
|
package com.google.android.gms.fitness.request;
import android.os.Binder;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.RemoteException;
import com.google.android.gms.fitness.data.zzag;
import com.google.android.gms.wearable.MessageApi;
public interface zzaj extends IInterface {
public static abstract class zza extends Binder implements zzaj {
private static class zza implements zzaj {
private IBinder zzrp;
zza(IBinder iBinder) {
this.zzrp = iBinder;
}
public IBinder asBinder() {
return this.zzrp;
}
public void zzb(zzag com_google_android_gms_fitness_data_zzag) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken("com.google.android.gms.fitness.request.IWearableSyncStatusListener");
if (com_google_android_gms_fitness_data_zzag != null) {
obtain.writeInt(1);
com_google_android_gms_fitness_data_zzag.writeToParcel(obtain, 0);
} else {
obtain.writeInt(0);
}
this.zzrp.transact(1, obtain, null, 1);
} finally {
obtain.recycle();
}
}
}
public static zzaj zzcO(IBinder iBinder) {
if (iBinder == null) {
return null;
}
IInterface queryLocalInterface = iBinder.queryLocalInterface("com.google.android.gms.fitness.request.IWearableSyncStatusListener");
return (queryLocalInterface == null || !(queryLocalInterface instanceof zzaj)) ? new zza(iBinder) : (zzaj) queryLocalInterface;
}
public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException {
switch (i) {
case MessageApi.FILTER_PREFIX /*1*/:
parcel.enforceInterface("com.google.android.gms.fitness.request.IWearableSyncStatusListener");
zzb(parcel.readInt() != 0 ? (zzag) zzag.CREATOR.createFromParcel(parcel) : null);
return true;
case 1598968902:
parcel2.writeString("com.google.android.gms.fitness.request.IWearableSyncStatusListener");
return true;
default:
return super.onTransact(i, parcel, parcel2, i2);
}
}
}
void zzb(zzag com_google_android_gms_fitness_data_zzag) throws RemoteException;
}
|
[
"cwanziguya@gmail.com"
] |
cwanziguya@gmail.com
|
e2b0b654abb476ee4d7945f80ddca1375c396399
|
f4a2e6193611874c184e89a850becc23d89e48a6
|
/src/main/java/com/jhipster/clx/service/dto/UserDTO.java
|
a7ecdabcccb6dd5078fecd402905affb895d78d6
|
[] |
no_license
|
mfang360/jhipster-sample-application
|
43f54858a0e1cfc420a0fbcd954dcdff2aba2891
|
37354f81c06eb24e2f9862758b69ec5cbf158502
|
refs/heads/master
| 2022-12-21T10:00:08.602231
| 2020-01-17T08:59:27
| 2020-01-17T08:59:27
| 234,510,261
| 0
| 0
| null | 2022-12-16T04:43:29
| 2020-01-17T08:59:14
|
Java
|
UTF-8
|
Java
| false
| false
| 4,525
|
java
|
package com.jhipster.clx.service.dto;
import com.jhipster.clx.config.Constants;
import com.jhipster.clx.domain.Authority;
import com.jhipster.clx.domain.User;
import javax.validation.constraints.*;
import java.time.Instant;
import java.util.Set;
import java.util.stream.Collectors;
/**
* A DTO representing a user, with his authorities.
*/
public class UserDTO {
private Long id;
@NotBlank
@Pattern(regexp = Constants.LOGIN_REGEX)
@Size(min = 1, max = 50)
private String login;
@Size(max = 50)
private String firstName;
@Size(max = 50)
private String lastName;
@Email
@Size(min = 5, max = 254)
private String email;
@Size(max = 256)
private String imageUrl;
private boolean activated = false;
@Size(min = 2, max = 10)
private String langKey;
private String createdBy;
private Instant createdDate;
private String lastModifiedBy;
private Instant lastModifiedDate;
private Set<String> authorities;
public UserDTO() {
// Empty constructor needed for Jackson.
}
public UserDTO(User user) {
this.id = user.getId();
this.login = user.getLogin();
this.firstName = user.getFirstName();
this.lastName = user.getLastName();
this.email = user.getEmail();
this.activated = user.getActivated();
this.imageUrl = user.getImageUrl();
this.langKey = user.getLangKey();
this.createdBy = user.getCreatedBy();
this.createdDate = user.getCreatedDate();
this.lastModifiedBy = user.getLastModifiedBy();
this.lastModifiedDate = user.getLastModifiedDate();
this.authorities = user.getAuthorities().stream()
.map(Authority::getName)
.collect(Collectors.toSet());
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getLogin() {
return login;
}
public void setLogin(String login) {
this.login = login;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getImageUrl() {
return imageUrl;
}
public void setImageUrl(String imageUrl) {
this.imageUrl = imageUrl;
}
public boolean isActivated() {
return activated;
}
public void setActivated(boolean activated) {
this.activated = activated;
}
public String getLangKey() {
return langKey;
}
public void setLangKey(String langKey) {
this.langKey = langKey;
}
public String getCreatedBy() {
return createdBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public Instant getCreatedDate() {
return createdDate;
}
public void setCreatedDate(Instant createdDate) {
this.createdDate = createdDate;
}
public String getLastModifiedBy() {
return lastModifiedBy;
}
public void setLastModifiedBy(String lastModifiedBy) {
this.lastModifiedBy = lastModifiedBy;
}
public Instant getLastModifiedDate() {
return lastModifiedDate;
}
public void setLastModifiedDate(Instant lastModifiedDate) {
this.lastModifiedDate = lastModifiedDate;
}
public Set<String> getAuthorities() {
return authorities;
}
public void setAuthorities(Set<String> authorities) {
this.authorities = authorities;
}
@Override
public String toString() {
return "UserDTO{" +
"login='" + login + '\'' +
", firstName='" + firstName + '\'' +
", lastName='" + lastName + '\'' +
", email='" + email + '\'' +
", imageUrl='" + imageUrl + '\'' +
", activated=" + activated +
", langKey='" + langKey + '\'' +
", createdBy=" + createdBy +
", createdDate=" + createdDate +
", lastModifiedBy='" + lastModifiedBy + '\'' +
", lastModifiedDate=" + lastModifiedDate +
", authorities=" + authorities +
"}";
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
24a7f92dca33e043dd766d6cfba0b92ee190420e
|
27721e886795df3e467756b8e0480f7afd6e66c4
|
/java/jpwr/jopg/src/CcmFunc.java
|
6017bef1fb2f10db8e09f8a4286cec7037433530
|
[] |
no_license
|
brunad-coder/proview
|
88722029f3614d0febc4a8e9e6dea4859cc87363
|
4d75b942c649b1da8797323fa40f7f20cff634f8
|
refs/heads/master
| 2020-07-15T14:52:59.275163
| 2020-03-02T23:40:11
| 2020-03-02T23:40:11
| 205,586,528
| 0
| 0
| null | 2019-08-31T19:15:34
| 2019-08-31T19:15:34
| null |
UTF-8
|
Java
| false
| false
| 1,832
|
java
|
/*
* ProviewR Open Source Process Control.
* Copyright (C) 2005-2018 SSAB EMEA AB.
*
* This file is part of ProviewR.
*
* This program 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 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with ProviewR. If not, see <http://www.gnu.org/licenses/>
*
* Linking ProviewR statically or dynamically with other modules is
* making a combined work based on ProviewR. Thus, the terms and
* conditions of the GNU General Public License cover the whole
* combination.
*
* In addition, as a special exception, the copyright holders of
* ProviewR give you permission to, from the build function in the
* ProviewR Configurator, combine ProviewR with modules generated by the
* ProviewR PLC Editor to a PLC program, regardless of the license
* terms of these modules. You may copy and distribute the resulting
* combined work under the terms of your choice, provided that every
* copy of the combined work is accompanied by a complete copy of
* the source code of ProviewR (the version used to produce the
* combined work), being distributed under the terms of the GNU
* General Public License plus this exception.
*/
package jpwr.jopg;
public class CcmFunc {
public CcmFunc() {
}
public String name;
public int decl;
public CcmLine start_line;
public CcmLine end_line;
}
|
[
"claes.sjofors@proview.se"
] |
claes.sjofors@proview.se
|
ea25eb38cb0710bf4c0d739621d3b7594524a268
|
9708815be9c65ee877abe9ea5b51170e9a636aaf
|
/algorithm/src/cn/xux/algorithm/leetcode/general/hard/AllOneDataStructure.java
|
2f11f6fbb37940abbd64fd93137f578acf29b9a4
|
[] |
no_license
|
xuxia0914/javaLearning
|
85c7fd8c506f2cc67b82fafd2dedb790dcf4555b
|
9bdaf6d9dbb7fc15291cf5c1b2c6989986ac08fe
|
refs/heads/master
| 2022-08-13T16:05:15.056330
| 2022-05-13T08:22:16
| 2022-05-13T08:22:16
| 204,140,887
| 0
| 0
| null | 2022-06-17T02:39:48
| 2019-08-24T10:11:57
|
Java
|
UTF-8
|
Java
| false
| false
| 4,899
|
java
|
package cn.xux.algorithm.leetcode.general.hard;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
/**
* 432. 全 O(1) 的数据结构
* 请你设计一个用于存储字符串计数的数据结构,并能够返回计数最小和最大的字符串。
* <p>
* 实现 AllOne 类:
* <p>
* AllOne() 初始化数据结构的对象。
* inc(String key) 字符串 key 的计数增加 1 。如果数据结构中尚不存在 key ,那么插入计数为 1 的 key 。
* dec(String key) 字符串 key 的计数减少 1 。如果 key 的计数在减少后为 0 ,那么需要将这个 key 从数据结构中删除。测试用例保证:在减少计数前,key 存在于数据结构中。
* getMaxKey() 返回任意一个计数最大的字符串。如果没有元素存在,返回一个空字符串 "" 。
* getMinKey() 返回任意一个计数最小的字符串。如果没有元素存在,返回一个空字符串 "" 。
* <p>
* <p>
* 示例:
* <p>
* 输入
* ["AllOne", "inc", "inc", "getMaxKey", "getMinKey", "inc", "getMaxKey", "getMinKey"]
* [[], ["hello"], ["hello"], [], [], ["leet"], [], []]
* 输出
* [null, null, null, "hello", "hello", null, "hello", "leet"]
* <p>
* 解释
* AllOne allOne = new AllOne();
* allOne.inc("hello");
* allOne.inc("hello");
* allOne.getMaxKey(); // 返回 "hello"
* allOne.getMinKey(); // 返回 "hello"
* allOne.inc("leet");
* allOne.getMaxKey(); // 返回 "hello"
* allOne.getMinKey(); // 返回 "leet"
* <p>
* <p>
* 提示:
* <p>
* 1 <= key.length <= 10
* key 由小写英文字母组成
* 测试用例保证:在每次调用 dec 时,数据结构中总存在 key
* 最多调用 inc、dec、getMaxKey 和 getMinKey 方法 5 * 104 次
*/
public class AllOneDataStructure {
class AllOne {
Node root;
Map<String, Node> nodes;
public AllOne() {
root = new Node();
root.pre = root;
// 初始化链表哨兵,下面判断节点的 next 若为 root,则表示 next 为空(prev 同理)
root.next = root;
nodes = new HashMap<String, Node>();
}
public void inc(String key) {
if (nodes.containsKey(key)) {
Node cur = nodes.get(key);
Node nxt = cur.next;
if (nxt == root || nxt.count > cur.count + 1) {
nodes.put(key, cur.insert(new Node(key, cur.count + 1)));
} else {
nxt.keys.add(key);
nodes.put(key, nxt);
}
cur.keys.remove(key);
if (cur.keys.isEmpty()) {
cur.remove();
}
} else {
// key 不在链表中
if (root.next == root || root.next.count > 1) {
nodes.put(key, root.insert(new Node(key, 1)));
} else {
root.next.keys.add(key);
nodes.put(key, root.next);
}
}
}
public void dec(String key) {
Node cur = nodes.get(key);
// key 仅出现一次,将其移出 nodes
if (cur.count == 1) {
nodes.remove(key);
} else {
Node pre = cur.pre;
if (pre == root || pre.count < cur.count - 1) {
nodes.put(key, cur.pre.insert(new Node(key, cur.count - 1)));
} else {
pre.keys.add(key);
nodes.put(key, pre);
}
}
cur.keys.remove(key);
if (cur.keys.isEmpty()) {
cur.remove();
}
}
public String getMaxKey() {
return root.pre != null ? root.pre.keys.iterator().next() : "";
}
public String getMinKey() {
return root.next != null ? root.next.keys.iterator().next() : "";
}
}
class Node {
Node pre;
Node next;
Set<String> keys;
int count;
public Node() {
this("", 0);
}
public Node(String key, int count) {
this.count = count;
keys = new HashSet<>();
keys.add(key);
}
// 在this后插入node
public Node insert(Node node) {
node.pre = this;
node.next = this.next;
node.pre.next = node;
node.next.pre = node;
return node;
}
public void remove() {
this.pre.next = this.next;
this.next.pre = this.pre;
}
}
}
/**
* Your AllOne object will be instantiated and called as such:
* AllOne obj = new AllOne();
* obj.inc(key);
* obj.dec(key);
* String param_3 = obj.getMaxKey();
* String param_4 = obj.getMinKey();
*/
|
[
"xux21@chinaunicom.cn"
] |
xux21@chinaunicom.cn
|
e5679ee615fca2aa805c99bd2c7f9f782b9863f7
|
07c473a7754057e99e6c81b00172b9a1a43c0e96
|
/src/main/java/com/google/devtools/build/lib/skyframe/serialization/MapEntryCodec.java
|
59f1ca95e47532e15d329f3e53d7ac3e3c390892
|
[
"Apache-2.0"
] |
permissive
|
chenshuo/bazel
|
ffd3f37331db1ce5979f43aa3d27b96a6efcd1a2
|
c2ba4a08a788097297da81b58e2fb9ffdb22a581
|
refs/heads/master
| 2020-04-29T20:13:31.491356
| 2019-03-18T21:51:45
| 2019-03-18T21:53:24
| 176,378,348
| 3
| 0
|
Apache-2.0
| 2019-03-18T22:18:32
| 2019-03-18T22:18:32
| null |
UTF-8
|
Java
| false
| false
| 2,316
|
java
|
// Copyright 2018 The Bazel Authors. 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.devtools.build.lib.skyframe.serialization;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Maps;
import com.google.protobuf.CodedInputStream;
import com.google.protobuf.CodedOutputStream;
import java.io.IOException;
import java.util.AbstractMap;
import java.util.Map;
import java.util.function.BiFunction;
@SuppressWarnings("rawtypes")
class MapEntryCodec implements ObjectCodec<Map.Entry> {
private final BiFunction<Object, Object, Map.Entry> factory;
private final Class<? extends Map.Entry> type;
private MapEntryCodec(BiFunction<Object, Object, Map.Entry> factory) {
this.factory = factory;
this.type = factory.apply(0, 0).getClass();
}
@Override
public Class<? extends Map.Entry> getEncodedClass() {
return type;
}
@Override
public void serialize(SerializationContext context, Map.Entry entry, CodedOutputStream codedOut)
throws IOException, SerializationException {
context.serialize(entry.getKey(), codedOut);
context.serialize(entry.getValue(), codedOut);
}
@Override
public Map.Entry deserialize(DeserializationContext context, CodedInputStream codedIn)
throws SerializationException, IOException {
return factory.apply(context.deserialize(codedIn), context.deserialize(codedIn));
}
private static class MapEntryCodecRegisterer implements CodecRegisterer<MapEntryCodec> {
@Override
public Iterable<MapEntryCodec> getCodecsToRegister() {
return ImmutableList.of(
new MapEntryCodec(Maps::immutableEntry),
new MapEntryCodec(AbstractMap.SimpleEntry::new),
new MapEntryCodec(AbstractMap.SimpleImmutableEntry::new));
}
}
}
|
[
"copybara-piper@google.com"
] |
copybara-piper@google.com
|
71557e9d329e7a6b11124214fdf134bf3041da66
|
4c6f0b967f5e69ac1db94668485071078b85f8e3
|
/src/main/java/mcjty/rftoolsbase/datagen/ItemTags.java
|
2c15a482903d3a0bb18040c20a14e64779998d6a
|
[
"MIT"
] |
permissive
|
McJtyMods/RFToolsBase
|
95b83155e534aea8b9de47ad0fc43f591dbdff70
|
956cd1444e0b1df31bcd6c48685f6f0142fa0767
|
refs/heads/1.16
| 2023-08-23T12:12:26.205002
| 2022-06-10T02:58:18
| 2022-06-10T02:58:18
| 192,222,652
| 26
| 24
|
MIT
| 2022-08-06T05:48:44
| 2019-06-16T18:14:54
|
Java
|
UTF-8
|
Java
| false
| false
| 1,408
|
java
|
package mcjty.rftoolsbase.datagen;
import mcjty.lib.varia.WrenchChecker;
import mcjty.rftoolsbase.RFToolsBase;
import mcjty.rftoolsbase.modules.various.VariousModule;
import mcjty.rftoolsbase.modules.worldgen.WorldGenModule;
import net.minecraft.data.BlockTagsProvider;
import net.minecraft.data.DataGenerator;
import net.minecraft.data.ItemTagsProvider;
import net.minecraftforge.common.Tags;
import net.minecraftforge.common.data.ExistingFileHelper;
import javax.annotation.Nonnull;
public class ItemTags extends ItemTagsProvider {
public ItemTags(DataGenerator generator, BlockTagsProvider blockTagsProvider, ExistingFileHelper helper) {
super(generator, blockTagsProvider, RFToolsBase.MODID, helper);
}
@Override
protected void addTags() {
tag(Tags.Items.ORES)
.add(WorldGenModule.DIMENSIONAL_SHARD_END_ITEM.get(), WorldGenModule.DIMENSIONAL_SHARD_NETHER_ITEM.get(), WorldGenModule.DIMENSIONAL_SHARD_OVERWORLD_ITEM.get());
tag(Tags.Items.DUSTS)
.add(VariousModule.DIMENSIONALSHARD.get());
tag(VariousModule.SHARDS_TAG)
.add(VariousModule.DIMENSIONALSHARD.get());
tag(WrenchChecker.WRENCH_TAG)
.add(VariousModule.SMARTWRENCH.get(), VariousModule.SMARTWRENCH_SELECT.get());
}
@Nonnull
@Override
public String getName() {
return "RFToolsBase Tags";
}
}
|
[
"mcjty1@gmail.com"
] |
mcjty1@gmail.com
|
ac5d7070636de8a62b4431088736979b265b786f
|
bfac99890aad5f43f4d20f8737dd963b857814c2
|
/reg4/v1/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/AdminAction.java
|
e74e109a29fd38835a2c6705332ba342dae4afc4
|
[] |
no_license
|
STAMP-project/dbug
|
3b3776b80517c47e5cac04664cc07112ea26b2a4
|
69830c00bba4d6b37ad649aa576f569df0965c72
|
refs/heads/master
| 2021-01-20T03:59:39.330218
| 2017-07-12T08:03:40
| 2017-07-12T08:03:40
| 89,613,961
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,833
|
java
|
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package com.xpn.xwiki.web;
import org.apache.velocity.VelocityContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.xpn.xwiki.XWikiContext;
import com.xpn.xwiki.XWikiException;
import com.xpn.xwiki.doc.XWikiDocument;
import com.xpn.xwiki.doc.XWikiLock;
/**
* Administration xwiki action.
*
* @version $Id: b52b72d97c4674bcb7a00cb5d9ca3e5941c50c50 $
*/
public class AdminAction extends XWikiAction
{
/** The logger. */
private static final Logger LOGGER = LoggerFactory.getLogger(AdminAction.class);
/**
* Default constructor.
*/
public AdminAction()
{
this.waitForXWikiInitialization = false;
}
@Override
public String render(XWikiContext context) throws XWikiException
{
XWikiRequest request = context.getRequest();
String content = request.getParameter("content");
XWikiDocument doc = context.getDoc();
XWikiForm form = context.getForm();
VelocityContext vcontext = (VelocityContext) context.get("vcontext");
synchronized (doc) {
XWikiDocument tdoc = (XWikiDocument) context.get("tdoc");
EditForm peform = (EditForm) form;
String parent = peform.getParent();
if (parent != null) {
doc.setParent(parent);
}
String creator = peform.getCreator();
if (creator != null) {
doc.setCreator(creator);
}
String defaultTemplate = peform.getDefaultTemplate();
if (defaultTemplate != null) {
doc.setDefaultTemplate(defaultTemplate);
}
String defaultLanguage = peform.getDefaultLanguage();
if ((defaultLanguage != null) && !defaultLanguage.equals("")) {
doc.setDefaultLanguage(defaultLanguage);
}
if (doc.getDefaultLanguage().equals("")) {
doc.setDefaultLanguage(context.getWiki().getLanguagePreference(context));
}
String language = context.getWiki().getLanguagePreference(context);
String languagefromrequest = context.getRequest().getParameter("language");
String languagetoedit =
((languagefromrequest == null) || (languagefromrequest.equals(""))) ? language : languagefromrequest;
if ((languagetoedit == null) || (languagetoedit.equals("default"))) {
languagetoedit = "";
}
if (doc.isNew() || (doc.getDefaultLanguage().equals(languagetoedit))) {
languagetoedit = "";
}
if (languagetoedit.equals("")) {
// In this case the created document is going to be the default document
tdoc = doc;
context.put("tdoc", doc);
vcontext.put("tdoc", vcontext.get("doc"));
if (doc.isNew()) {
doc.setDefaultLanguage(language);
doc.setLanguage("");
}
} else {
// If the translated doc object is the same as the doc object
// this means the translated doc did not exists so we need to create it
if ((tdoc == doc)) {
tdoc = new XWikiDocument(doc.getDocumentReference());
tdoc.setLanguage(languagetoedit);
tdoc.setContent(doc.getContent());
tdoc.setSyntax(doc.getSyntax());
tdoc.setAuthor(context.getUser());
tdoc.setStore(doc.getStore());
context.put("tdoc", tdoc);
vcontext.put("tdoc", tdoc.newDocument(context));
}
}
XWikiDocument tdoc2 = tdoc.clone();
if (content != null && !content.equals("")) {
tdoc2.setContent(content);
}
context.put("tdoc", tdoc2);
vcontext.put("tdoc", tdoc2.newDocument(context));
try {
tdoc2.readFromTemplate(peform, context);
} catch (XWikiException e) {
if (e.getCode() == XWikiException.ERROR_XWIKI_APP_DOCUMENT_NOT_EMPTY) {
context.put("exception", e);
return "docalreadyexists";
}
}
/* Setup a lock */
try {
XWikiLock lock = tdoc.getLock(context);
if ((lock == null) || (lock.getUserName().equals(context.getUser())) || (peform.isLockForce())) {
tdoc.setLock(context.getUser(), context);
}
} catch (Exception e) {
e.printStackTrace();
// Lock should never make XWiki fail
// But we should log any related information
LOGGER.error("Exception while setting up lock", e);
}
}
return "admin";
}
}
|
[
"caroline.landry@inria.fr"
] |
caroline.landry@inria.fr
|
7dfe853b3fb9c458345d076aefdb49d64678e40b
|
1e55b2e29e8a2526a5c23d964f9721b3eedfa7ba
|
/BlazarService/src/main/java/com/hubspot/blazar/listener/QueuedRepositoryBuildVisitor.java
|
003a704e709748e9ec9680fe854f770ad01fdc37
|
[
"Apache-2.0"
] |
permissive
|
pkdevboxy/Blazar
|
0c193ac1e53ccc97f39dd44294ed1d4e32a6cf2c
|
7847253492df4f484fcba87fd1b13f511f20117b
|
refs/heads/master
| 2020-12-25T05:52:25.422702
| 2016-02-08T16:24:48
| 2016-02-08T16:24:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,086
|
java
|
package com.hubspot.blazar.listener;
import com.google.common.base.Optional;
import com.hubspot.blazar.base.RepositoryBuild;
import com.hubspot.blazar.base.visitor.AbstractRepositoryBuildVisitor;
import com.hubspot.blazar.data.service.RepositoryBuildService;
import com.hubspot.blazar.data.util.BuildNumbers;
import com.hubspot.blazar.util.RepositoryBuildLauncher;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.inject.Inject;
import javax.inject.Singleton;
@Singleton
public class QueuedRepositoryBuildVisitor extends AbstractRepositoryBuildVisitor {
private static final Logger LOG = LoggerFactory.getLogger(QueuedRepositoryBuildVisitor.class);
private final RepositoryBuildService repositoryBuildService;
private final RepositoryBuildLauncher buildLauncher;
@Inject
public QueuedRepositoryBuildVisitor(RepositoryBuildService repositoryBuildService,
RepositoryBuildLauncher buildLauncher) {
this.repositoryBuildService = repositoryBuildService;
this.buildLauncher = buildLauncher;
}
@Override
protected void visitQueued(RepositoryBuild build) throws Exception {
BuildNumbers buildNumbers = repositoryBuildService.getBuildNumbers(build.getBranchId());
if (build.getBuildNumber() != buildNumbers.getPendingBuildNumber().or(-1)) {
LOG.info("Build {} is no longer pending for branch {}, not launching", build.getId().get(), build.getBranchId());
} else if (buildNumbers.getInProgressBuildId().isPresent()) {
LOG.info("In progress build for branch {}, not launching pending build {}", build.getBranchId(), build.getId().get());
} else {
LOG.info("Going to launch pending build {} for branch {}", build.getId().get(), build.getBranchId());
final Optional<RepositoryBuild> previous;
if (buildNumbers.getLastBuildId().isPresent()) {
previous = Optional.of(repositoryBuildService.get(buildNumbers.getLastBuildId().get()).get());
} else {
previous = Optional.absent();
}
buildLauncher.launch(build, previous);
}
}
}
|
[
"jhaber@hubspot.com"
] |
jhaber@hubspot.com
|
5bf69dfb058e1ea05a9b59bbc0fc31ffc16947fa
|
2494cf393a64dc9398ee7d9747270974d195a176
|
/src/main/java/io/nozemi/runescape/net/packets/models/npc/NpcAttack.java
|
8f16ceb904e8bffafbd7e068373fce7762f8431c
|
[] |
no_license
|
chollandcloud/Dodian-OSRS
|
927307430b3e41283b34001683ea2a3ce7316828
|
bc8b83366753de0d75a024508cd1db8f41a74758
|
refs/heads/master
| 2023-07-31T21:02:49.217981
| 2021-09-04T17:05:10
| 2021-09-04T17:05:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 778
|
java
|
package io.nozemi.runescape.net.packets.models.npc;
import io.nozemi.runescape.io.RSBuffer;
import io.nozemi.runescape.net.packets.GamePacket;
import io.nozemi.runescape.net.packets.PacketConstants;
import io.nozemi.runescape.net.packets.annotations.Opcodes;
@Opcodes(PacketConstants.NPC_ATTACK)
public class NpcAttack extends GamePacket {
private boolean run;
private int index;
@Override
public NpcAttack decode(RSBuffer buffer) {
this.index = buffer.readULEShortA();
this.run = buffer.readByteS() == 1;
return this;
}
@Override
public NpcAttack newInstance() {
return new NpcAttack();
}
public int getIndex() {
return index;
}
public boolean isRunning() {
return run;
}
}
|
[
"nozemi95@gmail.com"
] |
nozemi95@gmail.com
|
133235ebcc53aff29a7d907066e82437f318f681
|
4f0e33a5dab58c3b553c0189f03823f32068e13f
|
/modules/server/src/main/java/com/mindbox/pe/server/imexport/ReplacementDateSynonymProvider.java
|
ca9c9ec259935346042b3d4444d81d5267e8c29c
|
[] |
no_license
|
josfernandez-clgx/PowerEditor
|
6e2e1f098fa11c871e6a0b8da982cca2ab22e285
|
a4399706feb4dfb2d10c8209ead59d6639e98473
|
refs/heads/master
| 2023-06-08T01:48:26.053551
| 2020-06-02T22:15:00
| 2020-06-02T22:15:00
| 379,699,653
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 221
|
java
|
package com.mindbox.pe.server.imexport;
import com.mindbox.pe.model.DateSynonym;
public interface ReplacementDateSynonymProvider {
DateSynonym getReplacementDateSynonymForImport() throws ImportException;
}
|
[
"gkim@84317e12-416e-11ea-976c-191aa12963f2"
] |
gkim@84317e12-416e-11ea-976c-191aa12963f2
|
19839b13b8c3ba02226da05e63dcb432ea4fccac
|
50c407c3dfdaf4e40319352472a487614f167f7a
|
/JMPatrol/app/src/main/java/com/ecity/cswatersupply/emergency/menu/UnUsualReportOperater.java
|
a925fa866d172407f237f77a228810bd739ae55d
|
[] |
no_license
|
TonyTong1993/JiangMenPatrol
|
e8e966da912e993c3b6c99998968b79385f7b534
|
cae541cde1e5254efe6ecc3a7647912893d4d2c5
|
refs/heads/master
| 2020-03-27T17:42:19.462460
| 2018-09-07T10:16:12
| 2018-09-07T10:16:12
| 146,868,143
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,310
|
java
|
package com.ecity.cswatersupply.emergency.menu;
import java.util.List;
import java.util.Map;
import org.json.JSONObject;
import com.ecity.android.eventcore.ResponseEvent;
import com.ecity.cswatersupply.HostApplication;
import com.ecity.cswatersupply.emergency.network.request.ReportUnUsualFormParameter;
import com.ecity.cswatersupply.emergency.service.EmergencyService;
import com.ecity.cswatersupply.event.ResponseEventStatus;
import com.ecity.cswatersupply.menu.EventReportOperator1;
import com.ecity.cswatersupply.model.checkitem.InspectItem;
import com.ecity.cswatersupply.network.request.AReportInspectItemParameter;
import com.ecity.cswatersupply.network.response.eventreport.EventReportResponse;
import com.ecity.cswatersupply.service.ServiceUrlManager;
import com.ecity.cswatersupply.task.IExecuteAfterTaskDo;
import com.ecity.cswatersupply.ui.activities.CustomReportActivity1;
import com.ecity.cswatersupply.utils.CustomViewInflater;
import com.ecity.cswatersupply.utils.LoadingDialogUtil;
import com.ecity.cswatersupply.utils.ToastUtil;
/**
* 异常速报
* @author Gxx 2016-12-07
*/
public class UnUsualReportOperater extends EventReportOperator1 {
public static final String EARTHQUAKEID = "EARTHQUAKEID";
private List<InspectItem> mInspectItems;
private String tableCode;
private IExecuteAfterTaskDo iExecuteAfterTaskDo;
private String gid = "";
@Override
public List<InspectItem> getDataSource() {
return super.getDataSource();
}
@Override
public void submit2Server(List<InspectItem> mInspectItems) {
super.submit2Server(mInspectItems);
}
@Override
public void notifyBackEvent(final CustomReportActivity1 activity) {
super.notifyBackEvent(activity);
}
@Override
protected String getServiceUrl() {
return ServiceUrlManager.getInstance().getUnUsualReportFormEventUrl();
}
@Override
protected String getReportImageUrl() {
return ServiceUrlManager.getInstance().getUnUsualReportFileUrl();
}
@Override
protected AReportInspectItemParameter getRequestParameter() {
ReportUnUsualFormParameter parameter = new ReportUnUsualFormParameter(mInspectItems);
if(getActivity().getIntent().hasExtra(EARTHQUAKEID)){
String eqid = getActivity().getIntent().getStringExtra(EARTHQUAKEID);
parameter.setEqid(eqid);
}
parameter.setCode(getFunctionKey());
return parameter;
}
@Override
protected String getFunctionKey() {
tableCode = getActivity().getIntent().getExtras().getString(CustomViewInflater.EVENTTYPE);
return tableCode;
}
@Override
protected void requestDataSource() {
EmergencyService.getInstance().getUnUsualReportForm(getFunctionKey());
}
@Override
protected int getRequestId() {
return ResponseEventStatus.EMERGENCY_GET_UNUSUAL_REPORT_FORM;
}
@Override
protected String getUniqueCacheKey() {
return HostApplication.getApplication().getCurrentUser().getGid() + tableCode;
}
@Override
public String parserMediaGID(JSONObject jsonObject){
if(null == jsonObject){
return null;
}
gid = jsonObject.optString("gid");
return gid;
}
@Override
protected void fillFileUploadSimpleParameter(Map<String, String> param){
if(null == param){
return;
}
param.put("code", getFunctionKey());
param.put("gid", gid);
}
public void onEventMainThread(ResponseEvent event) {
LoadingDialogUtil.dismiss();
if (!event.isOK()) {
ToastUtil.showLong(event.getMessage());
return;
}
if (event.getId() == getRequestId()) {
handleGetUnUsualReportForm(event);
}
}
private void handleGetUnUsualReportForm(ResponseEvent event) {
LoadingDialogUtil.dismiss();
EventReportResponse response = event.getData();
mInspectItems = response.getItems();
iExecuteAfterTaskDo = new EventReportExecuteAfterTaskDo(mInspectItems);
readCachedValue(iExecuteAfterTaskDo);
}
}
|
[
"zzht@ZZHTdeiMac.lan"
] |
zzht@ZZHTdeiMac.lan
|
f15dc98be0faa491985412b2c3c44c9d67888dc2
|
f5a8385b21aa67d1f1d74d8e013a43c8f1f88239
|
/src/main/java/com/exam/pojo/TestDO.java
|
3b8ba665151471ebf65c220ce3ec1445617648b6
|
[] |
no_license
|
jgsexam/ts_boot
|
d9a3075f128d609a015945fc7547c1eade0d7763
|
faaf284c17f42a2274c6473d9364200f23524f5d
|
refs/heads/master
| 2020-05-22T15:01:59.173767
| 2019-05-13T10:39:20
| 2019-05-13T10:39:20
| 186,399,655
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,799
|
java
|
package com.exam.pojo;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
/**
* <p>
* 考试表
* </p>
*
* @author 杨德石
* @since 2019-05-13
*/
@TableName("ts_test")
public class TestDO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId(value = "ts_id", type = IdType.AUTO)
private String tsId;
/**
* 考试日期
*/
private String tsDate;
/**
* 考场
*/
private String tsRoom;
/**
* 考试专业
*/
private String tsMajor;
/**
* 考试时间(分钟)
*/
private Integer tsTime;
/**
* 创建人
*/
private String tsCreateBy;
/**
* 0未开始,1已开始,2已结束
*/
private Integer tsState;
/**
* 乐观锁
*/
private Integer tsVersion;
/**
* 1正常0删除
*/
private Integer tsDelete;
public String getTsId() {
return tsId;
}
public void setTsId(String tsId) {
this.tsId = tsId;
}
public String getTsDate() {
return tsDate;
}
public void setTsDate(String tsDate) {
this.tsDate = tsDate;
}
public String getTsRoom() {
return tsRoom;
}
public void setTsRoom(String tsRoom) {
this.tsRoom = tsRoom;
}
public String getTsMajor() {
return tsMajor;
}
public void setTsMajor(String tsMajor) {
this.tsMajor = tsMajor;
}
public Integer getTsTime() {
return tsTime;
}
public void setTsTime(Integer tsTime) {
this.tsTime = tsTime;
}
public String getTsCreateBy() {
return tsCreateBy;
}
public void setTsCreateBy(String tsCreateBy) {
this.tsCreateBy = tsCreateBy;
}
public Integer getTsState() {
return tsState;
}
public void setTsState(Integer tsState) {
this.tsState = tsState;
}
public Integer getTsVersion() {
return tsVersion;
}
public void setTsVersion(Integer tsVersion) {
this.tsVersion = tsVersion;
}
public Integer getTsDelete() {
return tsDelete;
}
public void setTsDelete(Integer tsDelete) {
this.tsDelete = tsDelete;
}
@Override
public String toString() {
return "TestDO{" +
"tsId=" + tsId +
", tsDate=" + tsDate +
", tsRoom=" + tsRoom +
", tsMajor=" + tsMajor +
", tsTime=" + tsTime +
", tsCreateBy=" + tsCreateBy +
", tsState=" + tsState +
", tsVersion=" + tsVersion +
", tsDelete=" + tsDelete +
"}";
}
}
|
[
"1579106394@qq.com"
] |
1579106394@qq.com
|
5bf9c7ee01b9e03b8acb5135af7973296201b4fb
|
0e7f5c8b11c5872f0f43dd2cc9c1d28b1119679f
|
/flyerteaCafes/src/main/java/com/ideal/flyerteacafes/caff/FlyerApplication.java
|
a466054625de672bfb9d2608730b76bf39fc1575
|
[
"MIT"
] |
permissive
|
cody110/flyertea
|
7a05918afb1420906180af0462913023cfddc2c0
|
83a9af2ce40d3aebc600a10f8ff3375352c04f3c
|
refs/heads/master
| 2021-01-25T13:11:58.566008
| 2018-03-02T06:59:07
| 2018-03-02T06:59:07
| 123,540,848
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,076
|
java
|
package com.ideal.flyerteacafes.caff;
import android.app.Application;
import android.content.Context;
import android.content.Intent;
import android.support.multidex.MultiDex;
import com.flyer.tusdk.TuSdkManger;
import com.ideal.flyerteacafes.tinker.TinkerManager;
import com.ideal.flyerteacafes.utils.FinalUtils;
import com.ideal.flyerteacafes.utils.tools.IntentTools;
import com.ideal.flyerteacafes.utils.xutils.XutilsHelp;
import com.pgyersdk.crash.PgyCrashManager;
import com.tencent.smtt.sdk.QbSdk;
import com.tencent.tinker.anno.DefaultLifeCycle;
import com.tencent.tinker.loader.app.ApplicationLike;
import com.tencent.tinker.loader.shareutil.ShareConstants;
import com.umeng.analytics.MobclickAgent;
import com.umeng.socialize.Config;
import com.umeng.socialize.PlatformConfig;
import com.umeng.socialize.UMShareAPI;
import com.youzan.sdk.YouzanSDK;
import org.xutils.x;
import cn.jpush.android.api.JPushInterface;
/**
* tinker建议编写一个ApplicationLike的子类,你可以当成Application去使用,
* 注意顶部的注解:@DefaultLifeCycle,其application属性,会在编译期生成一个TeaApplication类。
*/
@DefaultLifeCycle(application = ".TeaApplication",
flags = ShareConstants.TINKER_ENABLE_ALL,
loadVerifyFlag = false)
public class FlyerApplication extends ApplicationLike {
public final static boolean isToLandingActivity = false;//跟新是否显示引导页
public static boolean wifiIsConnected = false;// wifi是否连接
public static boolean isNeedPgy = false;//是否需要蒲公英
public static boolean isNeedUm = true;//是否需要友盟统计
public static boolean LOGCAT_ENABLE = false;//配置logcat显示与否
private static Application mFlyApplication;
public FlyerApplication(Application application, int tinkerFlags,
boolean tinkerLoadVerifyFlag,
long applicationStartElapsedTime,
long applicationStartMillisTime,
Intent tinkerResultIntent) {
super(application, tinkerFlags, tinkerLoadVerifyFlag,
applicationStartElapsedTime, applicationStartMillisTime,
tinkerResultIntent);
mFlyApplication = application;
}
@Override
public void onBaseContextAttached(Context base) {
super.onBaseContextAttached(base);
//使应用支持分包
MultiDex.install(base);
TinkerManager.installTinker(this);
}
@Override
public void onCreate() {
// TODO Auto-generated method stub
super.onCreate();
// CrashHandler catchHandler = CrashHandler.getInstance();
// catchHandler.init(getApplicationContext());
//xutils 初始化
x.Ext.init(getApplication());
//数据库检查更新
XutilsHelp.getDbUtils();
// 友盟统计是否统计错误日志
MobclickAgent.setCatchUncaughtExceptions(isNeedUm);
// 激光推送设置
JPushInterface.setDebugMode(true);
JPushInterface.init(getContext());
//有赞
initYouzanSDK();
//分享
initShare();
//微信浏览器
initQbSdk();
//热修复
AndFixPatchManager.getInstance().initPatch(getContext());
if (isNeedPgy) {
//蒲公英
PgyCrashManager.register(getContext());
}
//又拍云视频
initTuSdk();
}
/**
* 初始化you拍云视频
*/
public void initTuSdk() {
com.flyer.tusdk.Config config = new com.flyer.tusdk.Config();
config.setLocalCachePath(CacheFileManger.getCacheImagePath());
TuSdkManger.getInstance().init(getContext(), config);
}
/**
* 初始化有赞
*/
private void initYouzanSDK() {
/**
* 初始化SDK
*
* @param Context application Context
* @param userAgent 用户代理 UA
*/
YouzanSDK.init(getContext(), "7f84d03fe05b11be081469587229030");
}
public static Context getContext() {
return mFlyApplication;
}
/**
* 搜集本地tbs内核信息并上报服务器,服务器返回结果决定使用哪个内核。
*/
private void initQbSdk() {
if (IntentTools.isAppInstalled(mFlyApplication, FinalUtils.WECHART_PACKAGE_NAME) && IntentTools.isAppInstalled(mFlyApplication, FinalUtils.QQ_PACKAGE_NAME)) {
QbSdk.initX5Environment(getContext(), null);
}
}
/**
* 友盟分享
*/
private void initShare() {
Config.DEBUG = false;
UMShareAPI.get(getContext());
//微信 appid appsecret
PlatformConfig.setWeixin("wxe3c42a32fb7853fa", "4dde1895fdd5e666715942f064626d51");
//新浪微博 appkey appsecret
PlatformConfig.setSinaWeibo("117568512", "c52f467c7879ccc480f169f23942659a", "http://sns.whalecloud.com");
// QQ和Qzone appid appkey;
PlatformConfig.setQQZone("1104775592", "rrdiIR6IBR7OOqqB");
}
}
|
[
"cody.feng@flyertea.com"
] |
cody.feng@flyertea.com
|
06fe50a41faeec4fd387e8962943c565951f5381
|
acba32c36b54f08eb5510a47e23046adc1cb9f71
|
/archervsworld-core/src/main/java/com/gemserk/games/archervsworld/controllers/CameraControllerLibgdxPointerImpl.java
|
ba91a34d1ab26eabf5b8709dd8f216580ea32f8b
|
[] |
no_license
|
gemserk/archervsworld
|
3f7a1b2553ca443ab8f1bc722deb7e8cd3c98eca
|
bfa98470922b900cc4fea11e3b91a12b7bd7e082
|
refs/heads/master
| 2020-06-05T05:56:41.839111
| 2012-04-03T15:41:21
| 2012-04-03T15:41:21
| 1,601,231
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,390
|
java
|
package com.gemserk.games.archervsworld.controllers;
import com.badlogic.gdx.math.Rectangle;
import com.badlogic.gdx.math.Vector2;
import com.gemserk.commons.gdx.camera.Camera;
import com.gemserk.commons.gdx.controllers.CameraController;
import com.gemserk.commons.gdx.input.LibgdxPointer;
import com.gemserk.commons.gdx.math.MathUtils2;
public class CameraControllerLibgdxPointerImpl implements CameraController {
private final Vector2 previousPosition = new Vector2();
private final LibgdxPointer libgdxPointer;
private final Vector2 tmp = new Vector2();
private final Rectangle area;
private boolean inside = true;
private Camera camera;
private int timeSamePosition = 0;
private int timeToZoom = 1000;
private boolean zooming = false;
private float currentZoom;
private float maxZoom;
private float minZoom;
@Override
public Camera getCamera() {
return camera;
}
public CameraControllerLibgdxPointerImpl(Camera camera, LibgdxPointer libgdxPointer, Rectangle area) {
this.camera = camera;
this.area = area;
this.libgdxPointer = libgdxPointer;
this.maxZoom = camera.getZoom() * 1.5f;
this.minZoom = camera.getZoom() * 0.5f;
}
@Override
public void update(int delta) {
if (libgdxPointer.wasReleased)
zooming = false;
if (libgdxPointer.wasPressed) {
previousPosition.set(libgdxPointer.getPressedPosition());
inside = MathUtils2.inside(area, previousPosition);
currentZoom = camera.getZoom();
return;
}
if (!libgdxPointer.touched || !inside)
return;
Vector2 pointerPosition = libgdxPointer.getPosition();
tmp.set(previousPosition);
tmp.sub(pointerPosition);
tmp.mul(1f / camera.getZoom());
if (tmp.len() <= 0f) {
timeSamePosition += delta;
} else {
timeSamePosition = 0;
}
if (timeSamePosition > timeToZoom)
zooming = true;
if (zooming) {
tmp.set(previousPosition);
tmp.sub(pointerPosition);
camera.setZoom(currentZoom - tmp.x * 0.1f);
// if (camera.getZoom() > maxZoom)
// camera.setZoom(maxZoom);
camera.setZoom(MathUtils2.truncate(camera.getZoom(), minZoom, maxZoom));
} else {
camera.setPosition(camera.getX() + tmp.x, camera.getY() + tmp.y);
previousPosition.set(pointerPosition);
}
// System.out.println(MessageFormat.format("position=({0},{1}), zoom={2}, angle={3}", camera.getX(), camera.getY(), camera.getZoom(), camera.getAngle()));
}
}
|
[
"ariel.coppes@gemserk.com"
] |
ariel.coppes@gemserk.com
|
efbb741913637ab66316972223842e9711daa7e3
|
75cc796c3b80da675d248c4071fde6edd1cbce7b
|
/sjk-stacktrace/src/main/java/org/gridkit/jvmtool/stacktrace/analytics/ThreadIdAggregatorFactory.java
|
c700c064b9d66093e289f825f14a0d6151abdf98
|
[
"Apache-2.0"
] |
permissive
|
showkawa/jvm-tools
|
44e9e3af5873813c084588fa0fee4d9388fddb70
|
b522137b691e946d7f7db53c11a7f5e9fbaea29b
|
refs/heads/master
| 2022-01-20T17:01:34.836311
| 2022-01-13T13:36:30
| 2022-01-13T13:36:30
| 226,477,550
| 1
| 0
|
Apache-2.0
| 2022-01-13T13:36:31
| 2019-12-07T08:10:18
|
Java
|
UTF-8
|
Java
| false
| false
| 518
|
java
|
package org.gridkit.jvmtool.stacktrace.analytics;
import org.gridkit.jvmtool.stacktrace.ThreadSnapshot;
class ThreadIdAggregatorFactory implements ThreadDumpAggregator, ThreadDumpAggregatorFactory {
@Override
public ThreadDumpAggregator newInstance() {
return new ThreadIdAggregatorFactory();
}
long id = -1;
@Override
public void aggregate(ThreadSnapshot threadInfo) {
id = threadInfo.threadId();
}
@Override
public Object info() {
return id;
}
}
|
[
"alexey.ragozin@gmail.com"
] |
alexey.ragozin@gmail.com
|
ad61d3a3d7bcfe270cd11e86b9336e6f6ac4b0bc
|
16052b34ae3a89033c457a971730845da500792a
|
/src/main/java/io/github/jhipster/application/config/AsyncConfiguration.java
|
39dff8ba9bb015dc6ba4ba390724f1a2571512fb
|
[] |
no_license
|
alexseptimus/jhipsterTEST
|
4288fef03a95d6133e7b5c041dda61e49aecafae
|
0fcf9e713e05728045c1dbbd51544db92c71d368
|
refs/heads/master
| 2020-03-18T19:27:39.991973
| 2018-05-28T12:06:12
| 2018-05-28T12:06:12
| 135,155,697
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,795
|
java
|
package io.github.jhipster.application.config;
import io.github.jhipster.async.ExceptionHandlingAsyncTaskExecutor;
import io.github.jhipster.config.JHipsterProperties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
import org.springframework.aop.interceptor.SimpleAsyncUncaughtExceptionHandler;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.*;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import java.util.concurrent.Executor;
@Configuration
@EnableAsync
@EnableScheduling
public class AsyncConfiguration implements AsyncConfigurer {
private final Logger log = LoggerFactory.getLogger(AsyncConfiguration.class);
private final JHipsterProperties jHipsterProperties;
public AsyncConfiguration(JHipsterProperties jHipsterProperties) {
this.jHipsterProperties = jHipsterProperties;
}
@Override
@Bean(name = "taskExecutor")
public Executor getAsyncExecutor() {
log.debug("Creating Async Task Executor");
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(jHipsterProperties.getAsync().getCorePoolSize());
executor.setMaxPoolSize(jHipsterProperties.getAsync().getMaxPoolSize());
executor.setQueueCapacity(jHipsterProperties.getAsync().getQueueCapacity());
executor.setThreadNamePrefix("jhipster-test-Executor-");
return new ExceptionHandlingAsyncTaskExecutor(executor);
}
@Override
public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() {
return new SimpleAsyncUncaughtExceptionHandler();
}
}
|
[
"jhipster-bot@users.noreply.github.com"
] |
jhipster-bot@users.noreply.github.com
|
254f8b16bbc7c3fad58779f44f1b85d3adf20675
|
9254e7279570ac8ef687c416a79bb472146e9b35
|
/ddoscoo-20200101/src/main/java/com/aliyun/ddoscoo20200101/models/DescribeInstanceStatusResponse.java
|
30121eb7493779285272400c96e679aceb8229cd
|
[
"Apache-2.0"
] |
permissive
|
lquterqtd/alibabacloud-java-sdk
|
3eaa17276dd28004dae6f87e763e13eb90c30032
|
3e5dca8c36398469e10cdaaa34c314ae0bb640b4
|
refs/heads/master
| 2023-08-12T13:56:26.379027
| 2021-10-19T07:22:15
| 2021-10-19T07:22:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,128
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.ddoscoo20200101.models;
import com.aliyun.tea.*;
public class DescribeInstanceStatusResponse extends TeaModel {
@NameInMap("headers")
@Validation(required = true)
public java.util.Map<String, String> headers;
@NameInMap("body")
@Validation(required = true)
public DescribeInstanceStatusResponseBody body;
public static DescribeInstanceStatusResponse build(java.util.Map<String, ?> map) throws Exception {
DescribeInstanceStatusResponse self = new DescribeInstanceStatusResponse();
return TeaModel.build(map, self);
}
public DescribeInstanceStatusResponse setHeaders(java.util.Map<String, String> headers) {
this.headers = headers;
return this;
}
public java.util.Map<String, String> getHeaders() {
return this.headers;
}
public DescribeInstanceStatusResponse setBody(DescribeInstanceStatusResponseBody body) {
this.body = body;
return this;
}
public DescribeInstanceStatusResponseBody getBody() {
return this.body;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
c04ac22fbd1286b2ebe26d8d6a46ff22d7eeceab
|
0f9e3b5a061f343065483bdd031a5dc8c8fb09af
|
/org.xpect.ui/src/org/xpect/ui/util/TestDataUIUtil.java
|
6d48ebaa065b50d27059b6a285af335ce57fe9d1
|
[] |
no_license
|
joergreichert/Xpect
|
ed1296af1d155ecc983cf5a5d28276b7e20241fe
|
fde2c38359ec59f3415cad7d6e83d6efa66c22f5
|
refs/heads/master
| 2021-01-16T21:13:04.910708
| 2013-08-23T15:40:04
| 2013-08-23T15:40:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,442
|
java
|
package org.xpect.ui.util;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.emf.common.util.URI;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.junit.model.ITestCaseElement;
import org.eclipse.jdt.junit.model.ITestElement;
import org.eclipse.jdt.junit.model.ITestSuiteElement;
/**
*
* @author Moritz Eysholdt
*/
public class TestDataUIUtil {
public static class TestElementInfo {
private String clazz;
private String title;
private IFile file;
private URI uri;
private IJavaProject javaProject;
public IJavaProject getJavaProject() {
return javaProject;
}
public String getTitle() {
return title;
}
public String getClazz() {
return clazz;
}
public IFile getFile() {
return file;
}
public String getMethod() {
if (title == null)
return null;
int i = 0;
while (i < title.length() && Character.isJavaIdentifierPart(title.charAt(i)))
i++;
return title.substring(0, i);
}
public URI getURI() {
return uri;
}
}
protected static IFile findFile(ITestElement ele, String filename) {
IProject project = ele.getTestRunSession().getLaunchedProject().getProject();
IResource resource = project.findMember(filename);
if (resource == null || !resource.exists())
throw new IllegalStateException("File " + resource + " does not exist.");
if (!(resource instanceof IFile))
throw new IllegalStateException(resource + " is not a file, but a " + resource.getClass().getSimpleName());
return (IFile) resource;
}
public static TestElementInfo parse(ITestElement element) {
TestElementInfo result = new TestElementInfo();
result.javaProject = element.getTestRunSession().getLaunchedProject();
String project = result.javaProject.getProject().getName();
if (element instanceof ITestCaseElement) {
ITestCaseElement tce = (ITestCaseElement) element;
result.clazz = tce.getTestClassName();
String methodName = tce.getTestMethodName();
if (methodName.contains("~")) {
int colon = methodName.indexOf(':');
String description;
URI uri;
if (colon >= 0) {
description = methodName.substring(colon + 1).trim();
uri = URI.createURI(methodName.substring(0, colon).trim());
} else {
description = null;
uri = URI.createURI(methodName);
}
URI base = URI.createPlatformResourceURI(project + "/", true);
result.uri = uri.resolve(base);
result.file = findFile(element, uri.trimFragment().toString());
String name = uri.fragment();
int tilde = name.indexOf('~');
if (tilde >= 0)
name = name.substring(0, tilde);
if (description != null)
result.title = name + ": " + description;
else
result.title = name;
} else {
result.title = tce.getTestMethodName();
}
} else if (element instanceof ITestSuiteElement) {
ITestSuiteElement tse = (ITestSuiteElement) element;
String name = tse.getSuiteTypeName();
result.title = tse.getSuiteTypeName();
if (name.contains(":")) {
int colon = name.indexOf(':');
String filename = name.substring(0, colon).trim();
String path = name.substring(colon + 1).trim();
result.uri = URI.createPlatformResourceURI(project + "/" + path + "/" + filename, true);
result.file = findFile(element, path + "/" + filename);
} else {
result.clazz = name;
}
}
return result;
}
}
|
[
"moritz.eysholdt@itemis.de"
] |
moritz.eysholdt@itemis.de
|
f7f5c96bc53dead03f15e86be0dfde3d408f4aa9
|
7d1609b510e3c97b2f00568e91cd9a51438275c8
|
/Java/JavaDB/02.Databases Frameworks - Hibernate & Spring Data - October 2018/08.Homework_Spring_Data_Auto_Mapping_Objects/game_store/src/main/java/game_store/model/validators/password_matches/PasswordMatches.java
|
a47c216ee7e220562cac0aeb8f4903dd2fbd0d3e
|
[
"MIT"
] |
permissive
|
mgpavlov/SoftUni
|
80a5d2cbd0348e895f6538651e86fcff65dcebf5
|
cef1a7e4e475c69bbeb7bfdcaf7b3e64c88d604c
|
refs/heads/master
| 2021-01-24T12:36:57.475329
| 2019-04-30T00:06:15
| 2019-04-30T00:06:15
| 123,138,723
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 720
|
java
|
package game_store.model.validators.password_matches;
import game_store.constants.ValidationMessages;
import org.springframework.stereotype.Component;
import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Component
@Constraint(validatedBy = PasswordMatchesValidator.class)
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface PasswordMatches {
String message() default ValidationMessages.PASSWORD_CONFIRM_INVALID;
Class<?>[] groups() default {};
Class<? extends Payload>[] payload() default {};
}
|
[
"30524177+mgpavlov@users.noreply.github.com"
] |
30524177+mgpavlov@users.noreply.github.com
|
c434236d109141a78115846395d9cb8cdb7e64da
|
dce4ff9edbef476d218c79cec4acd8861b09642c
|
/xenon-android-library/src/main/java/com/abubusoft/xenon/interpolations/InterpolationStrongOut.java
|
5cd50e69ff18ab8f3e1bdb20f8d8b28df52d65c7
|
[] |
no_license
|
skykying/xenon
|
d3e1cdc79932892d2a396926f9d21962ddef0568
|
619cc533e602307a62ceaf739daea76f88c37994
|
refs/heads/master
| 2021-09-16T04:22:45.416370
| 2018-06-16T09:01:28
| 2018-06-16T09:01:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,839
|
java
|
package com.abubusoft.xenon.interpolations;
/**
* (c) 2010 Nicolas Gramlich
* (c) 2011 Zynga Inc.
*
* @author Gil
* @author Nicolas Gramlich
* @since 16:52:11 - 26.07.2010
*/
public class InterpolationStrongOut implements Interpolation {
// ===========================================================
// Constants
// ===========================================================
// ===========================================================
// Fields
// ===========================================================
private static InterpolationStrongOut INSTANCE;
// ===========================================================
// Constructors
// ===========================================================
private InterpolationStrongOut() {
}
public static InterpolationStrongOut getInstance() {
if(INSTANCE == null) {
INSTANCE = new InterpolationStrongOut();
}
return INSTANCE;
}
// ===========================================================
// Getter & Setter
// ===========================================================
// ===========================================================
// Methods for/from SuperClass/Interfaces
// ===========================================================
@Override
public float getPercentage(final float pSecondsElapsed, final float pDuration) {
return InterpolationStrongOut.getValue(pSecondsElapsed / pDuration);
}
// ===========================================================
// Methods
// ===========================================================
public static float getValue(final float pPercentage) {
final float t = pPercentage - 1;
return 1 + (t * t * t * t * t);
}
// ===========================================================
// Inner and Anonymous Classes
// ===========================================================
}
|
[
"abubusoft@gmail.com"
] |
abubusoft@gmail.com
|
a6f936b2acc5d968c9597dc41de90b86d3e55d36
|
96670d2b28a3fb75d2f8258f31fc23d370af8a03
|
/reverse_engineered/sources/com/beastbikes/android/modules/user/ui/FollowSearchResultActivity$1.java
|
d4208bff25b83aec219dd15666af9a94d530cb7d
|
[] |
no_license
|
P79N6A/speedx
|
81a25b63e4f98948e7de2e4254390cab5612dcbd
|
800b6158c7494b03f5c477a8cf2234139889578b
|
refs/heads/master
| 2020-05-30T18:43:52.613448
| 2019-06-02T07:57:10
| 2019-06-02T08:15:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,451
|
java
|
package com.beastbikes.android.modules.user.ui;
import android.os.AsyncTask;
import com.beastbikes.android.dialog.C1802i;
import com.beastbikes.android.modules.social.im.dto.FriendDTO;
import java.util.List;
class FollowSearchResultActivity$1 extends AsyncTask<Void, Void, List<FriendDTO>> {
/* renamed from: a */
final /* synthetic */ C1802i f11676a;
/* renamed from: b */
final /* synthetic */ FollowSearchResultActivity f11677b;
FollowSearchResultActivity$1(FollowSearchResultActivity followSearchResultActivity, C1802i c1802i) {
this.f11677b = followSearchResultActivity;
this.f11676a = c1802i;
}
protected /* synthetic */ Object doInBackground(Object[] objArr) {
return m12474a((Void[]) objArr);
}
protected /* synthetic */ void onPostExecute(Object obj) {
m12475a((List) obj);
}
protected void onPreExecute() {
if (this.f11676a != null) {
this.f11676a.show();
}
}
/* renamed from: a */
protected List<FriendDTO> m12474a(Void... voidArr) {
try {
return this.f11677b.c();
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
/* renamed from: a */
protected void m12475a(List<FriendDTO> list) {
if (this.f11676a != null) {
this.f11676a.dismiss();
}
FollowSearchResultActivity.a(this.f11677b, list);
}
}
|
[
"Gith1974"
] |
Gith1974
|
c54b126743be5433ca11799e95a8bb837c121578
|
8182073783733eaff0de2d35a1ba09c57a2aed8b
|
/app/src/main/java/com/vnpt/hotel/manager/domain/repository/AppState.java
|
65fdf8ab7539a502ac9dc2b69ff568504adfa753
|
[] |
no_license
|
minhdn7/VnptQuanLyHotel
|
99b541aa56a3de8a2c4f3c4560bde65596c8daa6
|
19e25f7c2e421f9606e8daa31790263af6c1a84e
|
refs/heads/master
| 2020-03-06T22:56:05.144787
| 2018-04-05T10:30:57
| 2018-04-05T10:31:06
| 127,118,530
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,708
|
java
|
package com.vnpt.hotel.manager.domain.repository;
/**
* Created by LiKaLi on 3/5/2018.
*/
public class AppState {
public static final String PREF_KEY_USER_PASS_WORD = "com.vnpt.hotel.manager.USER_PASS_WORD";
public static final String PREF_KEY_USER_PHONE_NUMBER =
"com.vnpt.hotel.manager.USER_PHONE_NUMBER";
public static final String PREF_KEY_USER_ROLES = "com.vnpt.hotel.manager.USER_ROLES";
public static final String PREF_KEY_USER_TOKEN_FIRE_BASE = "com.vnpt.hotel.manager.TOKEN_FIRE_BASE";
public static final String PREF_KEY_USER_TOKEN_ID = "com.vnpt.hotel.manager.TOKEN_ID";
public static final String PREF_KEY_USER_ID = "com.vnpt.hotel.manager.USER_ID";
public static final String PREF_KEY_CREATE_ROOM_TYPE = "com.vnpt.hotel.manager.CREATE_ROOM_TYPE";
public static final String PREF_KEY_CREATE_CUSTOMER = "com.vnpt.hotel.manager.CREATE_CREATE_CUSTOMER";
private Preferences preferences;
public AppState(Preferences preferences) {
this.preferences = preferences;
}
public String getUserNumber() {
return preferences.getString(PREF_KEY_USER_PHONE_NUMBER, "");
}
public void putUserNumber(String phoneNumber) {
preferences.putString(PREF_KEY_USER_PHONE_NUMBER, phoneNumber);
}
public String getUserPassword() {
return preferences.getString(PREF_KEY_USER_PASS_WORD, "");
}
public void putUserPassword(String passWord) {
preferences.putString(PREF_KEY_USER_PASS_WORD, passWord);
}
public String getUserRoles() {
return preferences.getString(PREF_KEY_USER_ROLES, "");
}
public void putUserRoles(String roles) {
preferences.putString(PREF_KEY_USER_ROLES, roles);
}
public String getTokenFireBase() {
return preferences.getString(PREF_KEY_USER_TOKEN_FIRE_BASE, "");
}
public void putTokenFireBase(String roles) {
preferences.putString(PREF_KEY_USER_TOKEN_FIRE_BASE, roles);
}
public String getTokenId() {
return preferences.getString(PREF_KEY_USER_TOKEN_ID, "");
}
public void putTokenId(String tokenId) {
preferences.putString(PREF_KEY_USER_TOKEN_ID, tokenId);
}
public int getUserId() {
return preferences.getInt(PREF_KEY_USER_ID, 0);
}
public void putUserId(int userId) {
preferences.putInt(PREF_KEY_USER_ID, userId);
}
public boolean getCreateRoomType() {
return preferences.getBoolean(PREF_KEY_CREATE_ROOM_TYPE, false);
}
public void putCreateRoomType(boolean customer) {
preferences.putBoolean(PREF_KEY_CREATE_ROOM_TYPE, customer);
}
public int getCreateCustomer() {
return preferences.getInt(PREF_KEY_CREATE_CUSTOMER, 0);
}
public void putCreateCustomer(int customer) {
preferences.putInt(PREF_KEY_CREATE_CUSTOMER, customer);
}
}
|
[
"minhdn231@gmail.com"
] |
minhdn231@gmail.com
|
f1f2dc7f6cea9192d4bdd5b34c9edcb079a6732c
|
333c266e481dadd0deec6a10d355c979a7ec3528
|
/app/src/main/java/cn/com/taodaji/ui/activity/employeeManagement/EmployeesManagementActivity.java
|
2b418e8f97f93f139d8cabcc02d81237eeb2008c
|
[] |
no_license
|
wyh1234/tdj
|
488adaeedd4eac182cc8daa0d81d4c2d28d7eea5
|
6d3f50220cf0043dbce51f44531ad51f1c48a2af
|
refs/heads/master
| 2023-02-20T22:48:24.297098
| 2021-01-18T07:34:45
| 2021-01-18T07:34:45
| 330,588,026
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,207
|
java
|
package cn.com.taodaji.ui.activity.employeeManagement;
import android.content.Intent;
import android.os.Bundle;
import android.os.Parcelable;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import com.base.retrofit.RequestCallback;
import com.base.utils.UIUtils;
import com.base.utils.ViewUtils;
import com.chad.library.adapter.base.entity.MultiItemEntity;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import java.util.ArrayList;
import java.util.List;
import cn.com.taodaji.R;
import cn.com.taodaji.common.PublicCache;
import cn.com.taodaji.model.entity.EmployeesListBean;
import cn.com.taodaji.model.entity.ShopAddressItem;
import cn.com.taodaji.model.entity.ShopEmployeeItem;
import cn.com.taodaji.model.entity.ShopEmployeeList;
import cn.com.taodaji.model.event.DeleteCustomeEvent;
import cn.com.taodaji.model.presenter.RequestPresenter;
import cn.com.taodaji.viewModel.adapter.ChainShopAdapter;
import cn.com.taodaji.viewModel.adapter.EmployeesManagementAdapter;
import tools.activity.SimpleToolbarActivity;
public class EmployeesManagementActivity extends SimpleToolbarActivity implements View.OnClickListener {
private View mainView;
private RecyclerView recyclerView;
private Button addEmployee;
private EmployeesManagementAdapter adapter;
private ArrayList<MultiItemEntity> data = new ArrayList<>();
private ArrayList<ShopEmployeeList> shopList = new ArrayList<>();
public int shopNumber=0;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EventBus.getDefault().register(this);
}
@Override
public void titleSetting(Toolbar toolbar){
setStatusBarColor();
setToolBarColor();
simple_title.setText("员工管理");
right_icon_text.setText("创建总部");
right_icon.setVisibility(View.VISIBLE);
right_icon.setImageResource(R.mipmap.create_headquarters);
right_onclick_line.setOnClickListener(this);
}
@Override
public void initMainView(){
mainView = getLayoutView(R.layout.activity_employees_management);
body_other.addView(mainView);
recyclerView = ViewUtils.findViewById(mainView,R.id.rv_shop_employees_list);
recyclerView.setLayoutManager(new LinearLayoutManager(this));
adapter = new EmployeesManagementAdapter(data);
recyclerView.setAdapter(adapter);
addEmployee = ViewUtils.findViewById(mainView,R.id.btn_add_new_employee);
addEmployee.setOnClickListener(this);
iniData();
}
@Override
protected void onRestart(){
super.onRestart();
iniData();
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onEvent(DeleteCustomeEvent event) {
switch (event.getFlag()) {
case 0:
UIUtils.showToastSafesShort(event.getMsg());
break;
case 1:
UIUtils.showToastSafesShort(event.getMsg());
iniData();
break;
case 2:
UIUtils.showToastSafesShort(event.getMsg());
break;
case 3:
UIUtils.showToastSafesShort(event.getMsg());
break;
default:
break;
}
}
@Override
protected void onDestroy() {
super.onDestroy();
if(EventBus.getDefault().isRegistered(this)) {
EventBus.getDefault().unregister(this);
}
}
@Override
public void onClick(View view){
switch (view.getId()){
case R.id.btn_add_new_employee:
if (PublicCache.loginPurchase.getEmpRole()==0||PublicCache.loginPurchase.getEmpRole()==3||PublicCache.loginPurchase.getEmpRole()==4){
Intent intent1 = new Intent(this,AddEmployeeActivity.class);
startActivity(intent1);}
else {
UIUtils.showToastSafesShort("您没有权限进行该操作");
}
break;
case R.id.right_onclick_line:
if (PublicCache.loginPurchase.getEmpRole()==0||PublicCache.loginPurchase.getEmpRole()==3){
Intent intent = new Intent(this,CreateHeadquartersActivity.class);
intent.putExtra("title","");
startActivity(intent);}
else {
UIUtils.showToastSafesShort("您没有权限进行该操作");
}
break;
default:break;
}
}
public void iniData() {
data.clear();
shopList.clear();
shopNumber=0;
RequestPresenter.getInstance().getEmployeesList(PublicCache.loginPurchase.getLoginUserId(), new RequestCallback<EmployeesListBean>() {
@Override
protected void onSuc(EmployeesListBean body) {
for (int k=0;k<body.getData().getGmoList().size();k++){
ShopEmployeeList employeeList = new ShopEmployeeList();
employeeList.setId(body.getData().getGmoList().get(k).getCustomerEntityId());
employeeList.setTitle(body.getData().getGmoList().get(k).getEnterpriseCode());
employeeList.setEmployeesNum(body.getData().getGmoList().get(k).getEmpCount());
employeeList.setChain(true);
employeeList.setOwnStores(body.getData().getGmoList().get(k).getOwnedStores());
shopList.add(employeeList);
data.add(employeeList);
shopNumber++;
}
for (int i = 0; i < body.getData().getList().size(); i++) {
ShopEmployeeList employeeList = new ShopEmployeeList();
employeeList.setId(body.getData().getList().get(i).getCustomerEntityId());
employeeList.setTitle(body.getData().getList().get(i).getEnterpriseCode());
employeeList.setEmployeesNum(body.getData().getList().get(i).getEmpCount());
employeeList.setChain(false);
if (body.getData().getList().get(i).getEmpFlag() == 0){
for (int j = 0; j < body.getData().getList().get(i).getSubInfoList().size(); j++) {
ShopEmployeeItem item = new ShopEmployeeItem();
item.setCreator(body.getData().getList().get(i).getSubInfoList().get(j).getIsCreater().equals("Y"));
item.setPosition(body.getData().getList().get(i).getSubInfoList().get(j).getRole());
item.setName(body.getData().getList().get(i).getSubInfoList().get(j).getWorkName());
item.setPhone(body.getData().getList().get(i).getSubInfoList().get(j).getPhone());
item.setPid(body.getData().getList().get(i).getSubInfoList().get(j).getParentCustomerEntityId());
item.setId(body.getData().getList().get(i).getSubInfoList().get(j).getCustomerEntityId());
item.setLeader(body.getData().getList().get(i).getSubInfoList().get(j).getIsLeader().equals("Y"));
item.setEnterpriseCode(body.getData().getList().get(i).getSubInfoList().get(j).getEnterpriseCode());
item.setMarkCode(body.getData().getList().get(i).getSubInfoList().get(j).getMarkCode());
item.setRole(body.getData().getList().get(i).getSubInfoList().get(j).getRole());
employeeList.addSubItem(item);
}
}
shopList.add(employeeList);
data.add(employeeList);
shopNumber++;
}
if (shopNumber<=1){
right_onclick_line.setVisibility(View.INVISIBLE);
}
adapter.notifyDataSetChanged();
}
});
}
}
|
[
"744478963@qq.com"
] |
744478963@qq.com
|
3273fb4f55f61038e1a6e5f9b8cd8ce7c2dfb111
|
8ec2fe863c7f40214136ba95e7ab89b1dca80995
|
/java/src/org/openqa/selenium/grid/commands/DefaultHubConfig.java
|
c9e728af50c88edd859be791541f370b2306ec44
|
[
"Apache-2.0"
] |
permissive
|
nadvolod/selenium
|
b9a8eeef600d7adb6e8ff82c40e7351c93307c48
|
87b4de808b41798c03a60f463ccf4958beff8049
|
refs/heads/master
| 2023-06-24T19:34:58.243445
| 2022-12-09T03:29:39
| 2022-12-14T14:34:31
| 88,666,707
| 1
| 1
|
Apache-2.0
| 2023-09-05T08:48:25
| 2017-04-18T20:17:12
|
Java
|
UTF-8
|
Java
| false
| false
| 1,356
|
java
|
// Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The SFC 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.openqa.selenium.grid.commands;
import com.google.common.collect.ImmutableMap;
import org.openqa.selenium.grid.config.MapConfig;
class DefaultHubConfig extends MapConfig {
DefaultHubConfig() {
super(ImmutableMap.of(
"events", ImmutableMap.of(
"publish", "tcp://*:4442",
"subscribe", "tcp://*:4443",
"bind", true),
"sessions", ImmutableMap.of(
"implementation", "org.openqa.selenium.grid.sessionmap.local.LocalSessionMap"),
"server", ImmutableMap.of(
"port", 4444)));
}
}
|
[
"simon.m.stewart@gmail.com"
] |
simon.m.stewart@gmail.com
|
bd07df088940143943c5e4f98142e1821ab1fd94
|
947fc9eef832e937f09f04f1abd82819cd4f97d3
|
/src/apk/io/intercom/android/sdk/views/AdminIsTypingView.java
|
9df63701139e206429515f6392b4b10382513f8c
|
[] |
no_license
|
thistehneisen/cifra
|
04f4ac1b230289f8262a0b9cf7448a1172d8f979
|
d46c6f4764c9d4f64e45c56fa42fddee9b44ff5a
|
refs/heads/master
| 2020-09-22T09:35:57.739040
| 2019-12-01T19:39:59
| 2019-12-01T19:39:59
| 225,136,583
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,557
|
java
|
package io.intercom.android.sdk.views;
import android.animation.Animator;
import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import io.intercom.android.sdk.R;
import java.util.concurrent.TimeUnit;
public class AdminIsTypingView extends LinearLayout {
private static final int ANIMATION_DELAY_MS = 100;
private static final int ANIMATION_DURATION_MS = 200;
private static final float FADED_ALPHA = 0.7f;
private static final int IS_TYPING_DURATION_SECONDS = 10;
private static final float SMALL_SCALE = 0.4f;
final Runnable animateDots;
boolean animating;
final ImageView[] dots;
final Animator[] dotsAnimations;
final Runnable endAnimation;
/* access modifiers changed from: private */
public Listener listener;
public interface Listener {
void onAdminTypingAnimationEnded(AdminIsTypingView adminIsTypingView);
}
public AdminIsTypingView(Context context) {
this(context, null);
}
private void setupEndCondition() {
postDelayed(this.endAnimation, TimeUnit.SECONDS.toMillis(10));
}
public void beginAnimation() {
if (!this.animating) {
this.animating = true;
this.animateDots.run();
}
}
public void cancelTypingAnimation() {
this.endAnimation.run();
}
public void renewTypingAnimation() {
removeCallbacks(this.endAnimation);
setupEndCondition();
}
public void setListener(Listener listener2) {
this.listener = listener2;
}
public AdminIsTypingView(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.dots = new ImageView[3];
this.dotsAnimations = new Animator[3];
this.animating = false;
this.animateDots = new Runnable() {
public void run() {
int i2 = 0;
while (true) {
AdminIsTypingView adminIsTypingView = AdminIsTypingView.this;
if (i2 < adminIsTypingView.dots.length) {
adminIsTypingView.dotsAnimations[i2].start();
i2++;
} else {
adminIsTypingView.postDelayed(adminIsTypingView.animateDots, TimeUnit.SECONDS.toMillis(1));
return;
}
}
}
};
this.endAnimation = new Runnable() {
public void run() {
AdminIsTypingView adminIsTypingView = AdminIsTypingView.this;
adminIsTypingView.animating = false;
adminIsTypingView.removeCallbacks(adminIsTypingView.animateDots);
AdminIsTypingView adminIsTypingView2 = AdminIsTypingView.this;
adminIsTypingView2.removeCallbacks(adminIsTypingView2.endAnimation);
if (AdminIsTypingView.this.listener != null) {
AdminIsTypingView.this.listener.onAdminTypingAnimationEnded(AdminIsTypingView.this);
}
for (Animator cancel : AdminIsTypingView.this.dotsAnimations) {
cancel.cancel();
}
}
};
LinearLayout.inflate(getContext(), R.layout.intercom_admin_is_typing, this);
this.dots[0] = (ImageView) findViewById(R.id.dot1);
this.dots[1] = (ImageView) findViewById(R.id.dot2);
this.dots[2] = (ImageView) findViewById(R.id.dot3);
PropertyValuesHolder ofFloat = PropertyValuesHolder.ofFloat(View.SCALE_X, new float[]{SMALL_SCALE, 1.0f});
PropertyValuesHolder ofFloat2 = PropertyValuesHolder.ofFloat(View.SCALE_Y, new float[]{SMALL_SCALE, 1.0f});
PropertyValuesHolder ofFloat3 = PropertyValuesHolder.ofFloat(View.ALPHA, new float[]{FADED_ALPHA, 1.0f});
for (int i2 = 0; i2 < this.dotsAnimations.length; i2++) {
ObjectAnimator ofPropertyValuesHolder = ObjectAnimator.ofPropertyValuesHolder(this.dots[i2], new PropertyValuesHolder[]{ofFloat3, ofFloat, ofFloat2});
ofPropertyValuesHolder.setRepeatCount(1);
ofPropertyValuesHolder.setRepeatMode(2);
ofPropertyValuesHolder.setDuration(200);
ofPropertyValuesHolder.setStartDelay((long) (i2 * 100));
this.dotsAnimations[i2] = ofPropertyValuesHolder;
}
setupEndCondition();
}
}
|
[
"putnins@nils.digital"
] |
putnins@nils.digital
|
941df63207fd4994bd237062ab51c045b6e6068b
|
ed58225e220e7860f79a7ddaedfe62c5373e6f9d
|
/GOLauncher1.5_main_screen/GOLauncher1.5_main_screen/src/com/golauncher/message/IDeleteZoneMsgId.java
|
b390d8bea25a2ed13c58aa607e1dbb72bfb60e83
|
[] |
no_license
|
led-os/samplea1
|
f453125996384ef5453c3dca7c42333cc9534853
|
e55e57f9d5c7de0e08c6795851acbc1b1679d3a1
|
refs/heads/master
| 2021-08-30T05:37:00.963358
| 2017-12-03T08:55:00
| 2017-12-03T08:55:00
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 352
|
java
|
package com.golauncher.message;
/**
*
* @author yangguanxiang
*
*/
public interface IDeleteZoneMsgId {
public final static int BASE_ID = 50000;
/**
* 继续删除动画
*/
public static final int DELETE_ZONE_CONTINUE_DELETE_ANIMATION = 50001;
/**
* 关闭垃圾桶
*/
public static final int DELETE_ZONE_CLOSE_TRASHCAN = 50002;
}
|
[
"clteir28410@chacuo.net"
] |
clteir28410@chacuo.net
|
a767d3f554eefe7a6047ef2f0bf79548e0872103
|
f56b9013728ca5c35c932ebbdd35225ae20a6200
|
/core/cas-server-core-util/src/main/java/org/apereo/cas/util/serialization/TicketIdSanitizationUtils.java
|
a59de4b76ef88120bc2523a26bb640ea05953f90
|
[
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
seasnail/cas
|
2eb667c544680b84a8210ef5fe9bd2ed86ce4566
|
eebddc116173008390815a8509e6a4bdf8ec706d
|
refs/heads/master
| 2021-10-13T06:52:54.926486
| 2017-02-16T21:58:54
| 2017-02-16T21:58:54
| 82,248,906
| 0
| 1
|
Apache-2.0
| 2021-09-28T07:23:40
| 2017-02-17T02:35:26
|
Java
|
UTF-8
|
Java
| false
| false
| 1,867
|
java
|
package org.apereo.cas.util.serialization;
import org.apache.commons.lang3.StringUtils;
import org.apereo.cas.ticket.TicketGrantingTicket;
import org.apereo.cas.ticket.proxy.ProxyGrantingTicket;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* This is {@link TicketIdSanitizationUtils} which attempts to remove
* sensitive ticket ids from a given String.
*
* @author Misagh Moayyed
* @since 5.0.0
*/
public final class TicketIdSanitizationUtils {
private static final Pattern TICKET_ID_PATTERN = Pattern.compile('(' + TicketGrantingTicket.PREFIX + '|'
+ ProxyGrantingTicket.PROXY_GRANTING_TICKET_IOU_PREFIX + '|' + ProxyGrantingTicket.PROXY_GRANTING_TICKET_PREFIX
+ ")(-)*(\\w)*(-)*(\\w)*");
/**
* Specifies the ending tail length of the ticket id that would still be visible in the output
* for troubleshooting purposes.
*/
private static final int VISIBLE_TAIL_LENGTH = 10;
private TicketIdSanitizationUtils() {}
/**
* Remove ticket id from the message.
*
* @param msg the message
* @return the modified message with tgt id removed
*/
public static String sanitize(final String msg) {
String modifiedMessage = msg;
if (StringUtils.isNotBlank(msg) && !Boolean.getBoolean("CAS_TICKET_ID_SANITIZE_SKIP")) {
final Matcher matcher = TICKET_ID_PATTERN.matcher(msg);
while (matcher.find()) {
final String match = matcher.group();
final String newId = matcher.group(1) + '-'
+ StringUtils.repeat("*", match.length() - VISIBLE_TAIL_LENGTH)
+ StringUtils.right(match, VISIBLE_TAIL_LENGTH);
modifiedMessage = modifiedMessage.replaceAll(match, newId);
}
}
return modifiedMessage;
}
}
|
[
"mmoayyed@unicon.net"
] |
mmoayyed@unicon.net
|
db87339035a9e1c1408272e8729ac670781b2477
|
62e334192393326476756dfa89dce9f0f08570d4
|
/tk_code/course-server/course-web-server/src/main/java/com/huatu/tiku/course/spring/conf/base/RedisQueueConfig.java
|
e4e9b0864bf03b43bab5dc8753690ae01295274e
|
[] |
no_license
|
JellyB/code_back
|
4796d5816ba6ff6f3925fded9d75254536a5ddcf
|
f5cecf3a9efd6851724a1315813337a0741bd89d
|
refs/heads/master
| 2022-07-16T14:19:39.770569
| 2019-11-22T09:22:12
| 2019-11-22T09:22:12
| 223,366,837
| 1
| 2
| null | 2022-06-30T20:21:38
| 2019-11-22T09:15:50
|
Java
|
UTF-8
|
Java
| false
| false
| 413
|
java
|
package com.huatu.tiku.course.spring.conf.base;
import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig;
import org.springframework.context.annotation.Configuration;
import static com.huatu.common.consts.ApolloConfigConsts.NAMESPACE_HT_REDIS_QUEUE;
/**
* @author hanchao
* @date 2017/11/1 2:07
*/
@Configuration
@EnableApolloConfig(NAMESPACE_HT_REDIS_QUEUE)
public class RedisQueueConfig {
}
|
[
"jelly_b@126.com"
] |
jelly_b@126.com
|
80069855906aad1f64bd17c637d91e6fddc8245f
|
3c59c21350a9d87519a7707d02d4b59decfa2e09
|
/org.geocraft.io.ascii/src/org/geocraft/io/ascii/aoi/SeismicSurvey2dAOIReaderWriter.java
|
8861a0279825fd630b2a6b7aafe55567166b0d3f
|
[] |
no_license
|
duncanchild/geocraft
|
e7455751b4d3dcf0b17979fa8f0cabdacb2cc109
|
b301c0c96ebfeaf36b8a0ec141f342cfc91c0ecb
|
refs/heads/master
| 2021-01-15T08:05:36.041473
| 2015-05-15T17:17:30
| 2015-05-15T17:17:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,000
|
java
|
/*
* Copyright (C) ConocoPhillips 2008 All Rights Reserved.
*/
package org.geocraft.io.ascii.aoi;
import java.io.File;
import java.io.IOException;
import java.sql.Timestamp;
import java.util.HashMap;
import java.util.Map;
import org.eclipse.swt.graphics.RGB;
import org.geocraft.core.common.xml.XmlIO;
import org.geocraft.core.common.xml.XmlUtils;
import org.geocraft.core.model.aoi.SeismicSurvey2dAOI;
import org.geocraft.core.model.datatypes.FloatRange;
import org.geocraft.core.model.datatypes.Unit;
import org.geocraft.core.model.preferences.UnitPreferences;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
/**
* This class provides methods for reading/writing a
* <code>SeismicSurvey2dAOI</code> in a custom GeoCraft XML format.
*/
public class SeismicSurvey2dAOIReaderWriter implements AsciiAOIConstants {
public void readFromStore(final SeismicSurvey2dAOI aoi, final String filePath) throws IOException {
final Unit xyUnit = UnitPreferences.getInstance().getHorizontalDistanceUnit();
XmlIO xmlio = new XmlIO() {
public void setXML(final Document doc, final Node parent) throws Exception {
Element aoiNode = null;
// Look for the AOI node.
NodeList nodeList = doc.getElementsByTagName(AOI_NODE);
int nodeCount = nodeList.getLength();
if (nodeCount > 0) {
for (int i = 0; i < nodeCount; i++) {
Element node = (Element) nodeList.item(i);
if (node.getAttribute(TYPE_ATTR).equals(LINE_SHOTPOINT_AOI)) {
aoiNode = node;
break;
}
}
}
if (aoiNode == null) {
throw new IOException("Error: No valid line/CDP ranges defined in the file.");
}
// Look for an optional z range.
MapPolygonAOIReaderWriter.readOptionalZRangeNode(aoi, aoiNode);
// Look for the survey element of the AOI.
NodeList surveyNodeList = aoiNode.getElementsByTagName(SURVEY_NODE);
if (surveyNodeList.getLength() == 0) {
throw new IOException("Error: The AOI does not define a survey.");
}
// Take the 1st survey found, although there may be more than one.
Element surveyNode = (Element) surveyNodeList.item(0);
// Look for the inline element of the survey.
NodeList lineNodeList = surveyNode.getElementsByTagName(LINE_NODE);
if (lineNodeList.getLength() == 0) {
throw new IOException("Error: The AOI does not define any lines.");
}
Map<String, FloatRange> cdpRanges = new HashMap<String, FloatRange>();
for (int i = 0; i < lineNodeList.getLength(); i++) {
Element lineNode = (Element) lineNodeList.item(i);
String lineName = lineNode.getAttribute(NAME_ATTR);
NodeList cdpRangeNodeList = lineNode.getElementsByTagName(CDP_NODE);
if (cdpRangeNodeList.getLength() == 0) {
throw new IOException("Error: The AOI does not define a CDP range for line " + lineName);
}
Element cdpRangeNode = (Element) cdpRangeNodeList.item(0);
float cdpStart = Float.parseFloat(cdpRangeNode.getAttribute(START_ATTR));
float cdpEnd = Float.parseFloat(cdpRangeNode.getAttribute(END_ATTR));
float cdpDelta = Float.parseFloat(cdpRangeNode.getAttribute(DELTA_ATTR));
FloatRange cdpRange = new FloatRange(cdpStart, cdpEnd, cdpDelta);
cdpRanges.put(lineName, cdpRange);
}
aoi.setCdpRanges(cdpRanges);
aoi.setDirty(false);
}
public void getXML(final Document doc, final Node parent) throws Exception {
// TODO Auto-generated method stub
}
};
File file = new File(filePath);
try {
XmlUtils.readXML(file, xmlio);
Timestamp lastModifiedDate = new Timestamp(file.lastModified());
aoi.setLastModifiedDate(lastModifiedDate);
aoi.setDisplayColor(new RGB(255, 0, 0));
aoi.setDirty(false);
} catch (Exception ex) {
throw new IOException("Error reading AOI file: " + ex.getMessage(), ex);
}
}
public void updateInStore(final SeismicSurvey2dAOI aoi, final String filePath) throws IOException {
final Unit xyUnit = UnitPreferences.getInstance().getHorizontalDistanceUnit();
XmlIO xmlio = new XmlIO() {
public void getXML(final Document doc, final Node parent) throws Exception {
// Add the AOI node.
Element aoiNode = XmlUtils.addElement(doc, parent, AOI_NODE);
XmlUtils.addAttribute(doc, aoiNode, TYPE_ATTR, LINE_SHOTPOINT_AOI);
// Add the optional z-range.
MapPolygonAOIReaderWriter.writeOptionalZRangeNode(aoi, doc, aoiNode);
// Add the survey node and its x,y unit of measurement.
Element surveyNode = XmlUtils.addElement(doc, aoiNode, SURVEY_NODE);
Map<String, FloatRange> cdpRanges = aoi.getCdpRanges();
for (String lineName : cdpRanges.keySet()) {
FloatRange cdpRange = cdpRanges.get(lineName);
// Add the inline,xline range of the survey.
Element lineNode = XmlUtils.addElement(doc, surveyNode, LINE_NODE);
XmlUtils.addAttribute(doc, lineNode, NAME_ATTR, lineName);
Element cdpRangeNode = XmlUtils.addElement(doc, lineNode, CDP_NODE);
XmlUtils.addAttribute(doc, cdpRangeNode, START_ATTR, Float.toString(cdpRange.getStart()));
XmlUtils.addAttribute(doc, cdpRangeNode, END_ATTR, Float.toString(cdpRange.getEnd()));
XmlUtils.addAttribute(doc, cdpRangeNode, DELTA_ATTR, Float.toString(cdpRange.getDelta()));
}
}
public void setXML(final Document doc, final Node parent) throws Exception {
// TODO Auto-generated method stub
}
};
File file = new File(filePath);
try {
XmlUtils.writeXML(file, xmlio);
} catch (Exception ex) {
throw new IOException("Error writing AOI file: " + ex.getMessage(), ex);
}
}
}
|
[
"eric.geordi@gmail.com"
] |
eric.geordi@gmail.com
|
0386e8506088103947dd1843d9760509ea8615f9
|
294a3b4ba75e870be61be25e5c03d91d0aede9fe
|
/java-multithread/src/main/java/com/brianway/learning/java/multithread/supplement/example2/MyThread.java
|
cdaa8d13765ca95702f460d1ce775a7355038589
|
[
"Apache-2.0"
] |
permissive
|
hanpang8983/java-learning
|
e23235658bb119baee9e22e4d27b3765d019821e
|
9732c15d5f45d6a51cff199e42e35ffbcc655600
|
refs/heads/master
| 2021-01-22T11:41:44.257168
| 2016-04-17T11:33:56
| 2016-04-17T11:33:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,672
|
java
|
package com.brianway.learning.java.multithread.supplement.example2;
import sun.security.provider.SHA;
/**
* Created by Brian on 2016/4/17.
*/
/**
* 取消System.out.println的注释能看到更多细节
*/
public class MyThread extends Thread {
private Object lock;
private String showChar;
private int showNumPosition;
private int printCount = 0;//统计打印了几个字母
volatile private static int addNumber = 1;
public MyThread(Object lock, String showChar, int showNumPosition) {
this.lock = lock;
this.showChar = showChar;
this.showNumPosition = showNumPosition;
}
@Override
public void run() {
try {
synchronized (lock){
//System.out.println("ThreadName="+ Thread.currentThread().getName()+" get the lock");
while (true){
if(addNumber % 3 == showNumPosition){
System.out.println("ThreadName="+ Thread.currentThread().getName()
+" runCount = "+addNumber+ " "+ showChar);
lock.notifyAll();
addNumber++;
printCount++;
if(printCount == 3){break;}
}else {
//System.out.println("ThreadName="+ Thread.currentThread().getName()+" will await");
lock.wait();
//System.out.println("ThreadName="+ Thread.currentThread().getName()+" after await");
}
}
}
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
|
[
"250902678@qq.com"
] |
250902678@qq.com
|
086bd0b5316fe6a4f8e30a9cf487d9a3464e8178
|
fb10774d7a7adb669fb95064fde48051d8496e11
|
/source/openapi-sdk-message-1.3.4.20170608-sources/com/yiji/openapi/message/common/pact/SignmanybankResponse.java
|
910da6ca87cace3206cfb0adf20dd08c79b8e7e2
|
[] |
no_license
|
jtyjty99999/yiji-nodejs
|
9297339138df66590d02b637c76a62e54f0747ca
|
0e3e2e66f89bcc2f6de7466b1adf892b2d903d09
|
refs/heads/master
| 2021-01-22T22:35:31.766945
| 2017-06-25T15:16:36
| 2017-06-25T15:16:36
| 85,558,620
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,182
|
java
|
/*
* www.yiji.com Inc.
* Copyright (c) 2014 All Rights Reserved
*/
/*
* 修订记录:
* xiyang@yiji.com 2015-04-07 11:32 创建
*
*/
package com.yiji.openapi.message.common.pact;
import com.yiji.openapi.sdk.common.annotation.OpenApiField;
import com.yiji.openapi.sdk.common.annotation.OpenApiMessage;
import com.yiji.openapi.sdk.common.enums.ApiMessageType;
import com.yiji.openapi.sdk.common.message.ApiResponse;
/**
* @author xiyang@yiji.com
*/
@OpenApiMessage(service = "signmanybank", type = ApiMessageType.Response)
public class SignmanybankResponse extends ApiResponse {
@OpenApiField(desc = "用户ID")
private String userId;
@OpenApiField(desc = "真实姓名")
private String realName;
@OpenApiField(desc = "身份证号")
private String certNo;
@OpenApiField(desc = "gid")
private String gid;
@OpenApiField(desc = "用户ID")
private String purpose = "DEDUCT";
@OpenApiField(desc = "银行编号")
private String bankCode;
@OpenApiField(desc = "银行卡号")
private String cardNo;
@OpenApiField(desc = "入口编码")
private String inlet = "01";
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getRealName() {
return realName;
}
public void setRealName(String realName) {
this.realName = realName;
}
public String getCertNo() {
return certNo;
}
public void setCertNo(String certNo) {
this.certNo = certNo;
}
public String getGid() {
return gid;
}
public void setGid(String gid) {
this.gid = gid;
}
public String getPurpose() {
return purpose;
}
public void setPurpose(String purpose) {
this.purpose = purpose;
}
public String getBankCode() {
return bankCode;
}
public void setBankCode(String bankCode) {
this.bankCode = bankCode;
}
public String getCardNo() {
return cardNo;
}
public void setCardNo(String cardNo) {
this.cardNo = cardNo;
}
public String getInlet() {
return inlet;
}
public void setInlet(String inlet) {
this.inlet = inlet;
}
}
|
[
"tianyi.jiangty@alibaba-inc.com"
] |
tianyi.jiangty@alibaba-inc.com
|
a1ce23da16e1d1261f1868fdc811bf92563ee9e0
|
aa23c80733abfdada3a4700a54234491baba1817
|
/project/hs-interface-impl/src/main/java/com/neusoft/hs/engine/order/OrderExecuteDTOUtil.java
|
57e89eff7e47a6c3e183fb9f9d662ac46b8aeb77
|
[] |
no_license
|
lixiangqi-github/hospital
|
de9cf3ae2e8b1370debf256dd9e980cb6b6ec888
|
7bbb4e9a45f234d3c116c179ce83b302de3670bc
|
refs/heads/master
| 2021-05-16T03:59:50.958735
| 2017-09-30T09:14:46
| 2017-09-30T09:14:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,872
|
java
|
package com.neusoft.hs.engine.order;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.beanutils.BeanUtils;
import org.springframework.stereotype.Service;
import com.neusoft.hs.domain.cost.ChargeRecord;
import com.neusoft.hs.domain.order.DrugOrderExecute;
import com.neusoft.hs.domain.order.OrderExecute;
import com.neusoft.hs.domain.order.OrderExecuteChargeItemRecord;
@Service
public class OrderExecuteDTOUtil {
public OrderExecuteDTO convert(OrderExecute execute) throws IllegalAccessException, InvocationTargetException {
OrderExecuteDTO executeDTO = new OrderExecuteDTO();
BeanUtils.copyProperties(executeDTO, execute);
executeDTO.setVisitId(execute.getVisit().getId());
executeDTO.setOrderId(execute.getOrder().getId());
executeDTO.setBelongDeptId(execute.getBelongDept().getId());
if (execute.getExecuteDept() != null) {
executeDTO.setExecuteDeptId(execute.getExecuteDept().getId());
}
if (execute.getActualExecutor() != null) {
executeDTO.setActualExecutorId(execute.getActualExecutor().getId());
}
if (execute.getChargeDept() != null) {
executeDTO.setChargeDeptId(execute.getChargeDept().getId());
}
if (execute.getCompsiteOrder() != null) {
executeDTO.setCompsiteOrderId(execute.getCompsiteOrder().getId());
}
if (execute.getTeam() != null) {
executeDTO.setTeamId(execute.getTeam().getId());
}
List<OrderExecuteChargeItemRecord> chargeItemRecords = execute.getChargeItemRecords();
if (chargeItemRecords != null) {
List<OrderExecuteChargeItemRecordDTO> chargeItemRecordDTOs = new ArrayList<OrderExecuteChargeItemRecordDTO>();
OrderExecuteChargeItemRecordDTO chargeItemRecordDTO;
for (OrderExecuteChargeItemRecord chargeItemRecord : chargeItemRecords) {
chargeItemRecordDTO = new OrderExecuteChargeItemRecordDTO();
chargeItemRecordDTO.setId(chargeItemRecord.getChargeItem().getId());
chargeItemRecordDTO.setCode(chargeItemRecord.getChargeItem().getCode());
chargeItemRecordDTO.setName(chargeItemRecord.getChargeItem().getName());
chargeItemRecordDTO.setCount(chargeItemRecord.getCount());
chargeItemRecordDTOs.add(chargeItemRecordDTO);
}
executeDTO.setChargeItemRecords(chargeItemRecordDTOs);
}
List<ChargeRecord> chargeRecords = execute.getChargeRecords();
if (chargeRecords != null) {
for (ChargeRecord chargeRecord : chargeRecords) {
executeDTO.addChargeRecordId(chargeRecord.getId());
}
}
if (execute instanceof DrugOrderExecute) {
DrugOrderExecute drugOrderExecute = (DrugOrderExecute) execute;
executeDTO.setDrugTypeSpecId(drugOrderExecute.getDrugTypeSpec().getId());
executeDTO.setDrugTypeSpecName(drugOrderExecute.getDrugTypeSpec().getName());
}
return executeDTO;
}
}
|
[
"wangdg@neusoft.com"
] |
wangdg@neusoft.com
|
21b27c38b507d920d744587db10e4db4f112a089
|
6d36213d2afb8e54315cd4c2a8e13d08c3870f5e
|
/src/LC801_900/LC863.java
|
db0be6c7be97720fe6cbf842d4c455719a3822bb
|
[] |
no_license
|
sksaikia/LeetCode
|
04823f569e1f23af2c87195d9c0ce1f82732fff9
|
27aacd711e198248c09939b6112e7df5ca9e7f8c
|
refs/heads/main
| 2023-04-13T02:33:39.888735
| 2021-05-04T13:24:00
| 2021-05-04T13:24:00
| 325,792,959
| 7
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,821
|
java
|
package LC801_900;
import java.util.*;
public class LC863 {
HashMap<TreeNode,TreeNode> hashMap ;
public List<Integer> distanceK(TreeNode root, TreeNode target, int K) {
hashMap = new HashMap<>();
dfs(root,null);
Queue<TreeNode> queue = new LinkedList<>();
queue.add(target);
Set<TreeNode> seen = new HashSet<>();
seen.add(target);
int level = 0;
ArrayList<Integer> list = new ArrayList<>();
if(K==0){
list.add(target.val);
return list;
}
while(!queue.isEmpty()){
int size = queue.size();
while(size>0){
TreeNode node = queue.poll();
if(!seen.contains(node.left) && node.left!=null){
seen.add(node.left);
queue.add(node.left);
}
if(!seen.contains(node.right) && node.right!=null){
seen.add(node.right);
queue.add(node.right);
}
TreeNode parent = hashMap.get(node);
if(!seen.contains(parent) && parent!=null){
seen.add(parent);
queue.add(parent);
}
size--;
}
level++;
if(level==K){
while(!queue.isEmpty())
list.add(queue.poll().val);
}
}
return list;
}
private void dfs(TreeNode root,TreeNode parent){
if(root==null)
return;
hashMap.put(root,parent);
dfs(root.left,root);
dfs(root.right,root);
}
public class TreeNode {
int val;
TreeNode left;
TreeNode right;
TreeNode(int x) { val = x; }
}
}
|
[
"saikiasourav48@gmail.com"
] |
saikiasourav48@gmail.com
|
f0b8644876fcafedf0c31a695d80bd783e1682a2
|
191fed5c90fa70fd668dac1b34f18514a294ee27
|
/src/main/java/com/xianjinxia/cashman/domain/PaymentRequestConfig.java
|
e08a3461da8cf0761f83360b51a1b3c63ee4d7b9
|
[
"Apache-2.0"
] |
permissive
|
happyjianguo/largeloan-app
|
01790b303831c1655dd24c7d60ee1f6ced0fbda7
|
05d495cbf23000f73d07dbaff6caf6c9bb267ae7
|
refs/heads/master
| 2020-07-03T02:31:02.021638
| 2018-05-28T03:31:05
| 2018-05-28T03:31:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,266
|
java
|
package com.xianjinxia.cashman.domain;
import java.util.Date;
public class PaymentRequestConfig {
private Long id;
private String md5Salt;
private Integer expireMinutes;
private Date createdTime;
private Date updatedTime;
private String remark;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getMd5Salt() {
return md5Salt;
}
public void setMd5Salt(String md5Salt) {
this.md5Salt = md5Salt == null ? null : md5Salt.trim();
}
public Integer getExpireMinutes() {
return expireMinutes;
}
public void setExpireMinutes(Integer expireMinutes) {
this.expireMinutes = expireMinutes;
}
public Date getCreatedTime() {
return createdTime;
}
public void setCreatedTime(Date createdTime) {
this.createdTime = createdTime;
}
public Date getUpdatedTime() {
return updatedTime;
}
public void setUpdatedTime(Date updatedTime) {
this.updatedTime = updatedTime;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim();
}
}
|
[
"wjj@xianjinxia.com"
] |
wjj@xianjinxia.com
|
c48026b082b045e88bc8ad480da456de75619264
|
98bd09233229554d0824b89feff9448d58b6f3c4
|
/hsapi/src/main/java/com/huashi/bill/order/constant/TradeOrderContext.java
|
def4965f5b52b933913c58eb189285092b8d072b
|
[] |
no_license
|
arraycto/hspaas
|
6cb308c76a4e77bd06106c686f98d20fba685505
|
29c2ecf904f3fcc7b2965edb5b74a11908a25c49
|
refs/heads/master
| 2020-12-10T14:18:40.245824
| 2019-07-05T08:45:47
| 2019-07-05T08:45:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,602
|
java
|
package com.huashi.bill.order.constant;
public class TradeOrderContext {
// 针对支付宝或者微信支付,用户选择站内充值产品名称
public static final String TRADE_ORDER_SUBJECT_TRANS_REG = "华时融合平台账户充值%s元";
/**
*
* TODO 交易类型
*
* @author zhengying
* @version V1.0.0
* @date 2016年9月16日 上午1:27:32
*/
public enum TradeType {
PRODUCT_COMBO_PAY(0, "产品套餐购买"), ACCOUNT_MONEY_CHARGE(1, "站内账户充值");
private int value;
private String title;
private TradeType(int value, String title) {
this.value = value;
this.title = title;
}
public int getValue() {
return value;
}
public String getTitle() {
return title;
}
public static TradeType parse(int value){
for(TradeType tt : TradeType.values()) {
if(tt.getValue() == value) {
{
return tt;
}
}
}
return TradeType.PRODUCT_COMBO_PAY;
}
}
/**
*
* TODO 订单状态
*
* @author zhengying
* @version V1.0.0
* @date 2016年9月16日 上午1:27:23
*/
public enum TradeOrderStatus {
WAIT_PAY(0, "待支付"), PAYED(1, "支付完成,待处理"), PAY_FAILED(2, "支付失败"), COMPLETED(
3, "处理完成,已竣工"), DEAL_FAILED(4, "数据异常竣工");
private int value;
private String title;
private TradeOrderStatus(int value, String title) {
this.value = value;
this.title = title;
}
public int getValue() {
return value;
}
public String getTitle() {
return title;
}
}
}
|
[
"ying1_zheng@bestsign.cn"
] |
ying1_zheng@bestsign.cn
|
23a8f5c9d0eaf9d879e98a50f4a54705831b65bb
|
4b75bc0d8c00b9f22653d7895f866efd086147a2
|
/apache/mina/src/main/java/com/evangel/example/sumup/message/ResultMessage.java
|
7def5afcd263a21f39f4645bc41bcf04d2b85a6c
|
[
"Apache-2.0"
] |
permissive
|
King-Maverick007/websites
|
90e40eeb13ba4086ee1d78e755d8a1e9fc3f7c85
|
fd5ddf7f79ce12658e95e26cd58e3488c90749e2
|
refs/heads/master
| 2022-12-19T01:25:54.795195
| 2019-02-19T06:04:40
| 2019-02-19T06:04:40
| 300,188,105
| 0
| 0
|
Apache-2.0
| 2020-10-01T07:33:49
| 2020-10-01T07:30:32
| null |
UTF-8
|
Java
| false
| false
| 1,558
|
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 com.evangel.example.sumup.message;
/**
* <code>RESULT</code> message in SumUp protocol.
*
* @author <a href="http://mina.apache.org">Apache MINA Project</a>
*/
public class ResultMessage extends AbstractMessage {
private static final long serialVersionUID = 7371210248110219946L;
private boolean ok;
private int value;
public ResultMessage() {
}
public boolean isOk() {
return ok;
}
public void setOk(boolean ok) {
this.ok = ok;
}
public int getValue() {
return value;
}
public void setValue(int value) {
this.value = value;
}
@Override
public String toString() {
if (ok) {
return getSequence() + ":RESULT(" + value + ')';
} else {
return getSequence() + ":RESULT(ERROR)";
}
}
}
|
[
"evangel_a@sina.com"
] |
evangel_a@sina.com
|
2be8607ac496c99de43b33be5e1c999e46773339
|
050d0468e1cf6ba421819af539575f85ef215770
|
/authorization-independent-server/src/main/java/com/huayutech/authorizationindependentserver/AuthorizationIndependentServerApplication.java
|
93a5473d3df66f4569de37e286e4b791a9dddd63
|
[] |
no_license
|
yoyoyosiyu/spring-boot-oauth2
|
c5b998ee930dfaa12093f2831f2695a92cb51132
|
5b8fd2c895b92e87965b8e85e3543399b80d5fbf
|
refs/heads/master
| 2020-03-16T10:42:59.954246
| 2018-05-25T09:53:58
| 2018-05-25T09:53:58
| 132,637,550
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 855
|
java
|
package com.huayutech.authorizationindependentserver;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.security.Principal;
import java.util.LinkedHashMap;
import java.util.Map;
@SpringBootApplication
@RestController
public class AuthorizationIndependentServerApplication {
@RequestMapping({ "/user", "/me" })
public Map<String, String> user(Principal principal) {
Map<String, String> map = new LinkedHashMap<>();
map.put("name", principal.getName());
return map;
}
public static void main(String[] args) {
SpringApplication.run(AuthorizationIndependentServerApplication.class, args);
}
}
|
[
"gogs@fake.local"
] |
gogs@fake.local
|
bfadabff33d12324f9f2e21e0f7118c5e7f128df
|
0c78484f9bcf6f5c24bcf5bdc2d4e84a1dfcd78d
|
/src/main/java/io/github/jhipster/application/config/WebConfigurer.java
|
6ef1444dc3faf4dc545548d1a224037441398092
|
[] |
no_license
|
glip80/jhipsterSimpleApplication
|
7e18eab4baa8abb26bb01a50a42af1232b19b07c
|
b3ea0b4a9be00f4c94e26856eb3d5f5079a3a7d3
|
refs/heads/master
| 2021-08-09T08:44:54.647814
| 2017-11-12T07:10:51
| 2017-11-12T07:10:51
| 110,412,683
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,540
|
java
|
package io.github.jhipster.application.config;
import io.github.jhipster.config.JHipsterConstants;
import io.github.jhipster.config.JHipsterProperties;
import io.github.jhipster.web.filter.CachingHttpHeadersFilter;
import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.servlet.InstrumentedFilter;
import com.codahale.metrics.servlets.MetricsServlet;
import com.hazelcast.core.HazelcastInstance;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.embedded.*;
import org.springframework.boot.context.embedded.undertow.UndertowEmbeddedServletContainerFactory;
import io.undertow.UndertowOptions;
import org.springframework.boot.web.servlet.ServletContextInitializer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
import org.springframework.web.filter.CorsFilter;
import java.io.File;
import java.nio.file.Paths;
import java.util.*;
import javax.servlet.*;
/**
* Configuration of web application with Servlet 3.0 APIs.
*/
@Configuration
public class WebConfigurer implements ServletContextInitializer, EmbeddedServletContainerCustomizer {
private final Logger log = LoggerFactory.getLogger(WebConfigurer.class);
private final Environment env;
private final JHipsterProperties jHipsterProperties;
private final HazelcastInstance hazelcastInstance;
private MetricRegistry metricRegistry;
public WebConfigurer(Environment env, JHipsterProperties jHipsterProperties, HazelcastInstance hazelcastInstance) {
this.env = env;
this.jHipsterProperties = jHipsterProperties;
this.hazelcastInstance = hazelcastInstance;
}
@Override
public void onStartup(ServletContext servletContext) throws ServletException {
if (env.getActiveProfiles().length != 0) {
log.info("Web application configuration, using profiles: {}", (Object[]) env.getActiveProfiles());
}
EnumSet<DispatcherType> disps = EnumSet.of(DispatcherType.REQUEST, DispatcherType.FORWARD, DispatcherType.ASYNC);
initMetrics(servletContext, disps);
if (env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_PRODUCTION)) {
initCachingHttpHeadersFilter(servletContext, disps);
}
log.info("Web application fully configured");
}
/**
* Customize the Servlet engine: Mime types, the document root, the cache.
*/
@Override
public void customize(ConfigurableEmbeddedServletContainer container) {
MimeMappings mappings = new MimeMappings(MimeMappings.DEFAULT);
// IE issue, see https://github.com/jhipster/generator-jhipster/pull/711
mappings.add("html", "text/html;charset=utf-8");
// CloudFoundry issue, see https://github.com/cloudfoundry/gorouter/issues/64
mappings.add("json", "text/html;charset=utf-8");
container.setMimeMappings(mappings);
// When running in an IDE or with ./mvnw spring-boot:run, set location of the static web assets.
setLocationForStaticAssets(container);
/*
* Enable HTTP/2 for Undertow - https://twitter.com/ankinson/status/829256167700492288
* HTTP/2 requires HTTPS, so HTTP requests will fallback to HTTP/1.1.
* See the JHipsterProperties class and your application-*.yml configuration files
* for more information.
*/
if (jHipsterProperties.getHttp().getVersion().equals(JHipsterProperties.Http.Version.V_2_0) &&
container instanceof UndertowEmbeddedServletContainerFactory) {
((UndertowEmbeddedServletContainerFactory) container)
.addBuilderCustomizers(builder ->
builder.setServerOption(UndertowOptions.ENABLE_HTTP2, true));
}
}
private void setLocationForStaticAssets(ConfigurableEmbeddedServletContainer container) {
File root;
String prefixPath = resolvePathPrefix();
if (env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_PRODUCTION)) {
root = new File(prefixPath + "target/www/");
} else {
root = new File(prefixPath + "src/main/webapp/");
}
if (root.exists() && root.isDirectory()) {
container.setDocumentRoot(root);
}
}
/**
* Resolve path prefix to static resources.
*/
private String resolvePathPrefix() {
String fullExecutablePath = this.getClass().getResource("").getPath();
String rootPath = Paths.get(".").toUri().normalize().getPath();
String extractedPath = fullExecutablePath.replace(rootPath, "");
int extractionEndIndex = extractedPath.indexOf("target/");
if(extractionEndIndex <= 0) {
return "";
}
return extractedPath.substring(0, extractionEndIndex);
}
/**
* Initializes the caching HTTP Headers Filter.
*/
private void initCachingHttpHeadersFilter(ServletContext servletContext,
EnumSet<DispatcherType> disps) {
log.debug("Registering Caching HTTP Headers Filter");
FilterRegistration.Dynamic cachingHttpHeadersFilter =
servletContext.addFilter("cachingHttpHeadersFilter",
new CachingHttpHeadersFilter(jHipsterProperties));
cachingHttpHeadersFilter.addMappingForUrlPatterns(disps, true, "/content/*");
cachingHttpHeadersFilter.addMappingForUrlPatterns(disps, true, "/app/*");
cachingHttpHeadersFilter.setAsyncSupported(true);
}
/**
* Initializes Metrics.
*/
private void initMetrics(ServletContext servletContext, EnumSet<DispatcherType> disps) {
log.debug("Initializing Metrics registries");
servletContext.setAttribute(InstrumentedFilter.REGISTRY_ATTRIBUTE,
metricRegistry);
servletContext.setAttribute(MetricsServlet.METRICS_REGISTRY,
metricRegistry);
log.debug("Registering Metrics Filter");
FilterRegistration.Dynamic metricsFilter = servletContext.addFilter("webappMetricsFilter",
new InstrumentedFilter());
metricsFilter.addMappingForUrlPatterns(disps, true, "/*");
metricsFilter.setAsyncSupported(true);
log.debug("Registering Metrics Servlet");
ServletRegistration.Dynamic metricsAdminServlet =
servletContext.addServlet("metricsServlet", new MetricsServlet());
metricsAdminServlet.addMapping("/management/metrics/*");
metricsAdminServlet.setAsyncSupported(true);
metricsAdminServlet.setLoadOnStartup(2);
}
@Bean
public CorsFilter corsFilter() {
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
CorsConfiguration config = jHipsterProperties.getCors();
if (config.getAllowedOrigins() != null && !config.getAllowedOrigins().isEmpty()) {
log.debug("Registering CORS filter");
source.registerCorsConfiguration("/api/**", config);
source.registerCorsConfiguration("/v2/api-docs", config);
}
return new CorsFilter(source);
}
@Autowired(required = false)
public void setMetricRegistry(MetricRegistry metricRegistry) {
this.metricRegistry = metricRegistry;
}
}
|
[
"jhipster-bot@users.noreply.github.com"
] |
jhipster-bot@users.noreply.github.com
|
39ce708497b5eb333a6455a8feb6ad3340cbfb4a
|
89f3af52f5634bce05aaecc742b1e4bb0a009ff2
|
/trunk/fmps-web/src/main/java/cn/com/fubon/webservice/commands/client/InnerRequestConvertToExternalRequest.java
|
d0580f1fc8fc4b768042285ff2d8ca71c2a3d3bf
|
[] |
no_license
|
cash2one/fmps
|
d331391b7d6cb5b50645e823e1606c6ea236b8a2
|
b57c463943fec0da800e5374f306176914a39079
|
refs/heads/master
| 2021-01-21T06:42:45.275421
| 2016-06-21T12:47:46
| 2016-06-21T12:47:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,290
|
java
|
/**
*
*/
package cn.com.fubon.webservice.commands.client;
import org.apache.commons.chain.Command;
import org.apache.commons.chain.Context;
import org.apache.log4j.Logger;
import org.dozer.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import cn.com.fubon.webservice.WsConstants;
import cn.com.fubon.webservice.entity.request.FbWSRequest;
/**
* 内部请求类型转换为外部请求类型
*
* @author binbin.wang
*
*/
public class InnerRequestConvertToExternalRequest implements Command {
private static final Logger logger = Logger.getLogger(InnerRequestConvertToExternalRequest.class);
@Autowired
private Mapper mapper;
/**
*
*/
public InnerRequestConvertToExternalRequest() {
}
@SuppressWarnings("unchecked")
@Override
public boolean execute(Context context) throws Exception {
FbWSRequest fbWsRequest = (FbWSRequest)context.get(WsConstants.CHAIN_CONTEXT_KEY_WS_REQUEST);
String externlClassName = (String)context.get(WsConstants.CHAIN_CONTEXT_KEY_EXTERNL_REQEUST_CLASS_NAME);
Object externlRequest = mapper.map(fbWsRequest, Class.forName(externlClassName));
//将外部请求对象传递到下一个节点
context.put(WsConstants.CHAIN_CONTEXT_KEY_WS_EXTERNL_REQUEST, externlRequest);
return false;
}
}
|
[
"fangfang.guo@fubon.com.cn"
] |
fangfang.guo@fubon.com.cn
|
26987930e3a6bab3ca6a59d8133d04ea74d2f7ff
|
19a8b94ce59195b9d7d8c5115a8f3731fe281ff3
|
/app/src/main/java/com/example/test/utils/ConnectionUtils.java
|
ddfc55bd20b405facb6cc2483f4aead64f150312
|
[] |
no_license
|
hphat123/LapTDD
|
190fc1c4b331fb15a5176e88d7d87088bdf1ecc2
|
d83ee04111b7d76e8df6ca8be36c4f4afc7f4970
|
refs/heads/main
| 2023-02-07T13:20:02.067767
| 2020-12-23T05:38:16
| 2020-12-23T05:38:16
| 323,811,504
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 797
|
java
|
package com.example.test.utils;
import android.content.Context;
import android.net.ConnectivityManager;
import java.net.InetAddress;
public class ConnectionUtils {
/**
* @param context
* @return
*/
public static boolean isNetworkConnected(Context context) {
ConnectivityManager cm = (ConnectivityManager)
context.getSystemService(Context.CONNECTIVITY_SERVICE);
return cm.getActiveNetworkInfo() != null;
}
/**
* @return
*/
public static boolean isInternetAvailable() {
try {
InetAddress ipAddr = InetAddress.getByName("google.com");
//You can replace it with your name
return !ipAddr.equals("");
} catch (Exception e) {
return false;
}
}
}
|
[
"="
] |
=
|
e9f7dc89e0ad781296bc9e7d025e649a26b06b02
|
60384d7047a01fb2794d4c9bf14072f2e57cad84
|
/easeui/src/androidTest/java/com/hyphenate/easeui/ExampleInstrumentedTest.java
|
0248547a085fd17fc7b3fe293e8938c73649a2f0
|
[
"MIT"
] |
permissive
|
sophiemarceau/bte_Android
|
d88703209aa2a2d9f473938d9c6aadcad590a0f6
|
e950ca0bc5a7f6b6386af1e7614a5bf8d70cf66e
|
refs/heads/master
| 2020-08-27T11:03:35.250973
| 2019-10-25T02:05:14
| 2019-10-25T02:05:14
| 217,342,335
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 760
|
java
|
package com.hyphenate.easeui;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.assertEquals;
/**
* Instrumentation test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.hyphenate.easeui.test", appContext.getPackageName());
}
}
|
[
"sophiemarceauqu@gmail.com"
] |
sophiemarceauqu@gmail.com
|
50e1346eb641351db2b2c11ef771fcbdfcad4f5f
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-12482-10-29-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/xwiki/query/internal/ScriptQuery_ESTest.java
|
08dc6d2c51666668b9154445894d5a5a8c05df1a
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 553
|
java
|
/*
* This file was automatically generated by EvoSuite
* Sun Apr 05 19:10:30 UTC 2020
*/
package org.xwiki.query.internal;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class ScriptQuery_ESTest extends ScriptQuery_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
13ce98f17aba5e216f7d3080726611755c22f485
|
3130765f287269f474dde937930a6adc00f0806a
|
/src/main/java/net/minecraft/server/PacketPlayOutKeepAlive.java
|
b05432ea96cf889b1527be534ebc8bc4fca2b7a2
|
[] |
no_license
|
airidas338/mc-dev
|
928e105789567d1f0416028f1f0cb75a729bd0ec
|
7b23ae7f3ba52ba8405d14cdbfed8da9f5f7092a
|
refs/heads/master
| 2016-09-05T22:12:23.138874
| 2014-09-26T03:57:07
| 2014-09-26T03:57:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 462
|
java
|
package net.minecraft.server;
public class PacketPlayOutKeepAlive implements Packet {
private int a;
public PacketPlayOutKeepAlive() {}
public PacketPlayOutKeepAlive(int var1) {
this.a = var1;
}
public void a(PacketListener var1) {
((PacketPlayOutListener)var1).a(this);
}
public void a(PacketDataSerializer var1) {
this.a = var1.e();
}
public void b(PacketDataSerializer var1) {
var1.b(this.a);
}
}
|
[
"sam.sun469@gmail.com"
] |
sam.sun469@gmail.com
|
8eefeebabb353682ccedb94f045a73aa75e59203
|
eec187d2c3230b8f2d3838c054325e9ec82b5d8a
|
/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/merge/MergeUtils.java
|
6d443b4424b88bb47c3e43087d777c07d2d63cba
|
[] |
no_license
|
xwiki-contrib/xwiki-platform-wiki30
|
53f8cefe213a2d568f0bc7aaf1939f6c2957795c
|
bbc33321b1efd0d08d776c9d8f1bd0b7edb7af80
|
refs/heads/master
| 2020-12-25T12:07:37.389650
| 2015-07-03T16:34:24
| 2015-07-03T16:34:24
| 1,864,244
| 1
| 0
| null | 2015-07-03T16:34:48
| 2011-06-08T08:24:17
|
Java
|
UTF-8
|
Java
| false
| false
| 5,673
|
java
|
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package com.xpn.xwiki.internal.merge;
import java.io.IOException;
import java.io.StringReader;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.xwiki.diff.DiffManager;
import org.xwiki.diff.MergeException;
import com.xpn.xwiki.doc.merge.MergeResult;
import com.xpn.xwiki.web.Utils;
/**
* Provide some 3 ways merging related methods.
*
* @version $Id$
* @since 4.1M1
*/
public final class MergeUtils
{
/**
* Used to do the actual merge.
*/
private static DiffManager diffManager = Utils.getComponent(DiffManager.class);
/**
* Utility class.
*/
private MergeUtils()
{
}
/**
* Merge String at lines level.
*
* @param previousStr previous version of the string
* @param newStr new version of the string
* @param currentStr current version of the string
* @param mergeResult the merge report
* @return the merged string or the provided current string if the merge fail
*/
public static String mergeLines(String previousStr, String newStr, String currentStr, MergeResult mergeResult)
{
org.xwiki.diff.MergeResult<String> result;
try {
result = diffManager.merge(toLines(previousStr), toLines(currentStr), toLines(newStr), null);
mergeResult.getLog().addAll(result.getLog());
String resultStr = fromLines(result.getMerged());
if (StringUtils.equals(resultStr, currentStr)) {
mergeResult.setModified(true);
}
return resultStr;
} catch (MergeException e) {
mergeResult.getLog().error("Failed to execute merge lines", e);
}
return currentStr;
}
/**
* Merge String at characters level.
*
* @param previousStr previous version of the string
* @param newStr new version of the string
* @param currentStr current version of the string
* @param mergeResult the merge report
* @return the merged string or the provided current string if the merge fail
*/
public static String mergeCharacters(String previousStr, String newStr, String currentStr, MergeResult mergeResult)
{
org.xwiki.diff.MergeResult<Character> result;
try {
result = diffManager.merge(toCharacters(previousStr), toCharacters(currentStr), toCharacters(newStr), null);
mergeResult.getLog().addAll(result.getLog());
String resultStr = fromCharacters(result.getMerged());
if (StringUtils.equals(resultStr, currentStr)) {
mergeResult.setModified(true);
}
return resultStr;
} catch (MergeException e) {
mergeResult.getLog().error("Failed to execute merge characters", e);
}
return currentStr;
}
/**
* Merge a {@link List}.
*
* @param <T> the type of the lists elements
* @param commonAncestor previous version of the collection
* @param next new version of the collection
* @param current current version of the collection to modify
* @param mergeResult the merge report
*/
public static <T> void mergeList(List<T> commonAncestor, List<T> next, List<T> current, MergeResult mergeResult)
{
org.xwiki.diff.MergeResult<T> result;
try {
result = diffManager.merge(commonAncestor, current, next, null);
current.clear();
current.addAll(result.getMerged());
} catch (MergeException e) {
mergeResult.getLog().error("Failed to execute merge lists", e);
}
}
/**
* @param lines the lines
* @return the multilines text
*/
private static String fromLines(List<String> lines)
{
return StringUtils.join(lines, '\n');
}
/**
* @param str the multilines text
* @return the lines
*/
private static List<String> toLines(String str)
{
try {
return IOUtils.readLines(new StringReader(str));
} catch (IOException e) {
// Should never happen
return null;
}
}
/**
* @param characters the characters
* @return the single line text
*/
private static String fromCharacters(List<Character> characters)
{
return StringUtils.join(characters, null);
}
/**
* @param str the single line text
* @return the lines
*/
private static List<Character> toCharacters(String str)
{
List<Character> characters = new ArrayList<Character>(str.length());
for (char c : str.toCharArray()) {
characters.add(c);
}
return characters;
}
}
|
[
"thomas.mortagne@gmail.com"
] |
thomas.mortagne@gmail.com
|
de9ecdc7b01612b20f951ee884272c89e795913e
|
51b299957d2347d7f353481eff1458edfd6f9931
|
/app/src/main/java/com/lida/cloud/bean/ComparatorSalesVolume.java
|
84e145b84ed08e3dbeeae67109d3fb75ec85a6fe
|
[] |
no_license
|
StormFeng/YunZhongLi
|
adee3a54f6bd7527c83a6c8a52d2d606c4f40f4f
|
eea5ad46a676cfa5d89659a9c11abac275b5fa19
|
refs/heads/master
| 2021-07-04T00:59:35.272986
| 2017-09-26T02:13:10
| 2017-09-26T02:13:10
| 104,295,721
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 777
|
java
|
package com.lida.cloud.bean;
import java.text.Collator;
import java.util.Comparator;
import java.util.Locale;
/**
* Created by xkr on 2017/9/7.
*/
public class ComparatorSalesVolume implements Comparator {
@Override
public int compare(Object o1, Object o2) {
ActivityAgentCenterSVBean.DataBean.ListBean bean1 = (ActivityAgentCenterSVBean.DataBean.ListBean) o1;
ActivityAgentCenterSVBean.DataBean.ListBean bean2 = (ActivityAgentCenterSVBean.DataBean.ListBean) o2;
if (bean1.getPaydate() != null && bean2.getPaydate() != null)
{
return Collator.getInstance(Locale.CHINA).compare(bean1.getPaydate(), bean2.getPaydate());
}
// int flag=bean1.toString().compareTo(bean2.toString());
return -1;
}
}
|
[
"1170017470@qq.com"
] |
1170017470@qq.com
|
f64969aa3048624a72def01e7e7c0cd18b2404e0
|
a5f890fbd4fce4dfef4957fd9939e37babf15d39
|
/oim-fx/oim-client-ui-fx/src/main/java/com/oim/ui/fx/classics/FileTransferFrame.java
|
92d698b7d833470b609230dc5277fdd580083c9f
|
[
"MIT"
] |
permissive
|
shanfeng929/oim-qq
|
913a54d2ea86027cbe7e9ac163e7cb761b4680b5
|
aad830eeda424514ffadf17c231d780c468b6b11
|
refs/heads/master
| 2022-12-21T05:20:01.371240
| 2018-06-25T07:23:31
| 2018-06-25T07:23:31
| 138,557,408
| 0
| 1
| null | 2022-12-16T08:00:17
| 2018-06-25T07:17:59
|
Java
|
UTF-8
|
Java
| false
| false
| 1,858
|
java
|
package com.oim.ui.fx.classics;
import com.oim.fx.ui.list.ListRootPanel;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
/**
* @author: XiaHui
* @date: 2017年4月22日 上午10:12:12
*/
public class FileTransferFrame extends CommonStage {
BorderPane rootPane = new BorderPane();
VBox rootBox = new VBox();
ListRootPanel listPane = new ListRootPanel();
HBox topBox = new HBox();
HBox bottomBox = new HBox();
Button cancelButton = new Button();
Label titleLabel = new Label();
public FileTransferFrame() {
initComponent();
iniEvent();
}
private void initComponent() {
this.setTitle("");
this.setTitlePaneStyle(2);
this.setWidth(390);
this.setHeight(520);
this.setRadius(5);
this.setCenter(rootPane);
this.setResizable(false);
cancelButton.setText("关闭");
cancelButton.setPrefWidth(80);
bottomBox.setStyle("-fx-background-color:#c9e1e9");
bottomBox.setAlignment(Pos.BASELINE_RIGHT);
bottomBox.setPadding(new Insets(5, 10, 5, 10));
bottomBox.setSpacing(10);
bottomBox.getChildren().add(cancelButton);
rootPane.setTop(topBox);
rootPane.setCenter(listPane);
rootPane.setBottom(bottomBox);
}
private void iniEvent() {
cancelButton.setOnAction(a -> {
FileTransferFrame.this.hide();
});
}
public void setLabelTitle(String value) {
titleLabel.setText(value);
this.setTitle(value);
}
public void addNode(Node node) {
listPane.addNode(node);
}
public void addNode(int index, Node node) {
listPane.addNode(index, node);
}
public void removeNode(Node node) {
listPane.removeNode(node);
}
public void removeNode(int index) {
listPane.removeNode(index);
}
}
|
[
"shanfeng929@163.com"
] |
shanfeng929@163.com
|
69561cdadd77c2633bbe198df632169600a81e5d
|
81d49c3d19fd3ee5ef20d47f0fedc02537566d98
|
/2020/BatPwn/Divided/divided_source_from_JADX/sources/androidx/constraintlayout/widget/Constraints.java
|
d16158d21ca7cf504740b9590db0ce6be0c2eb1c
|
[] |
no_license
|
wr47h/CTF-Writeups
|
8f4ba241c7c9786741ace6bed98b0656c509aa71
|
e95325f43959a52237c04b62f0241bb4d6027fb4
|
refs/heads/master
| 2022-10-28T05:49:13.212970
| 2022-10-08T06:56:13
| 2022-10-08T06:56:13
| 107,017,690
| 6
| 7
| null | 2022-10-08T06:56:14
| 2017-10-15T14:06:41
|
Java
|
UTF-8
|
Java
| false
| false
| 4,997
|
java
|
package androidx.constraintlayout.widget;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.util.Log;
import android.view.ViewGroup;
public class Constraints extends ViewGroup {
public static final String TAG = "Constraints";
ConstraintSet myConstraintSet;
public static class LayoutParams extends androidx.constraintlayout.widget.ConstraintLayout.LayoutParams {
public float alpha = 1.0f;
public boolean applyElevation = false;
public float elevation = 0.0f;
public float rotation = 0.0f;
public float rotationX = 0.0f;
public float rotationY = 0.0f;
public float scaleX = 1.0f;
public float scaleY = 1.0f;
public float transformPivotX = 0.0f;
public float transformPivotY = 0.0f;
public float translationX = 0.0f;
public float translationY = 0.0f;
public float translationZ = 0.0f;
public LayoutParams(int width, int height) {
super(width, height);
}
public LayoutParams(LayoutParams source) {
super((androidx.constraintlayout.widget.ConstraintLayout.LayoutParams) source);
}
public LayoutParams(Context c, AttributeSet attrs) {
super(c, attrs);
TypedArray a = c.obtainStyledAttributes(attrs, C0011R.styleable.ConstraintSet);
int N = a.getIndexCount();
for (int i = 0; i < N; i++) {
int attr = a.getIndex(i);
if (attr == C0011R.styleable.ConstraintSet_android_alpha) {
this.alpha = a.getFloat(attr, this.alpha);
} else if (attr == C0011R.styleable.ConstraintSet_android_elevation) {
this.elevation = a.getFloat(attr, this.elevation);
this.applyElevation = true;
} else if (attr == C0011R.styleable.ConstraintSet_android_rotationX) {
this.rotationX = a.getFloat(attr, this.rotationX);
} else if (attr == C0011R.styleable.ConstraintSet_android_rotationY) {
this.rotationY = a.getFloat(attr, this.rotationY);
} else if (attr == C0011R.styleable.ConstraintSet_android_rotation) {
this.rotation = a.getFloat(attr, this.rotation);
} else if (attr == C0011R.styleable.ConstraintSet_android_scaleX) {
this.scaleX = a.getFloat(attr, this.scaleX);
} else if (attr == C0011R.styleable.ConstraintSet_android_scaleY) {
this.scaleY = a.getFloat(attr, this.scaleY);
} else if (attr == C0011R.styleable.ConstraintSet_android_transformPivotX) {
this.transformPivotX = a.getFloat(attr, this.transformPivotX);
} else if (attr == C0011R.styleable.ConstraintSet_android_transformPivotY) {
this.transformPivotY = a.getFloat(attr, this.transformPivotY);
} else if (attr == C0011R.styleable.ConstraintSet_android_translationX) {
this.translationX = a.getFloat(attr, this.translationX);
} else if (attr == C0011R.styleable.ConstraintSet_android_translationY) {
this.translationY = a.getFloat(attr, this.translationY);
} else if (attr == C0011R.styleable.ConstraintSet_android_translationZ) {
this.translationX = a.getFloat(attr, this.translationZ);
}
}
}
}
public Constraints(Context context) {
super(context);
super.setVisibility(8);
}
public Constraints(Context context, AttributeSet attrs) {
super(context, attrs);
init(attrs);
super.setVisibility(8);
}
public Constraints(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
init(attrs);
super.setVisibility(8);
}
public LayoutParams generateLayoutParams(AttributeSet attrs) {
return new LayoutParams(getContext(), attrs);
}
/* access modifiers changed from: protected */
public LayoutParams generateDefaultLayoutParams() {
return new LayoutParams(-2, -2);
}
private void init(AttributeSet attrs) {
Log.v(TAG, " ################# init");
}
/* access modifiers changed from: protected */
public android.view.ViewGroup.LayoutParams generateLayoutParams(android.view.ViewGroup.LayoutParams p) {
return new androidx.constraintlayout.widget.ConstraintLayout.LayoutParams(p);
}
public ConstraintSet getConstraintSet() {
if (this.myConstraintSet == null) {
this.myConstraintSet = new ConstraintSet();
}
this.myConstraintSet.clone(this);
return this.myConstraintSet;
}
/* access modifiers changed from: protected */
public void onLayout(boolean changed, int l, int t, int r, int b) {
}
}
|
[
"shreyansh.pettswood@yahoo.com"
] |
shreyansh.pettswood@yahoo.com
|
856e7be521a3b243fa0922762cf82d7bed5ee5e9
|
76401cecf159eb74eb8d4a5a9a4891789a5bdfad
|
/src/test/java/com/tfs/learningsystems/ui/VectorizerManagerImplTest.java
|
6b83c5ae4fefc43903e7670a1dc4032e71895442
|
[] |
no_license
|
Girish027/MWB
|
71c7799d90b67879b49cd87c8d422d11d262ed5a
|
ef36c432d80259632a61e6fbba17405ed6ba5fb5
|
refs/heads/main
| 2023-08-18T02:45:28.297578
| 2021-10-13T18:59:43
| 2021-10-13T18:59:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,913
|
java
|
package com.tfs.learningsystems.ui;
import com.tfs.learningsystems.auth.AuthValidationBaseTest;
import com.tfs.learningsystems.db.*;
import com.tfs.learningsystems.testutil.ModelUtils;
import com.tfs.learningsystems.ui.model.PatchDocument;
import com.tfs.learningsystems.ui.model.PatchRequest;
import com.tfs.learningsystems.ui.model.error.InvalidRequestException;
import com.tfs.learningsystems.util.Constants;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit4.SpringRunner;
import java.util.ArrayList;
import java.util.List;
import static org.junit.Assert.*;
@ActiveProfiles("test")
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class VectorizerManagerImplTest extends AuthValidationBaseTest {
private ClientBO testClient;
private ProjectBO testProject;
private PreferencesBO testPreference;
private VectorizerBO testVectorizer;
private VectorizerBO testVectorizerUse;
private PreferencesBO testPreferenceUse;
@Autowired
@Qualifier("vectorizerManagerBean")
private VectorizerManager vectorizerManager;
private String modelTechnology = "n-gram";
private String modelTechnologyUse = "use_large";
private String level = "model";
private String clientLevel = "client";
@Before
public void setUp() throws Exception {
super.setUp();
String clsName = Thread.currentThread().getStackTrace()[1].getClassName();
String name = clsName + "_" + Long.toString(System.currentTimeMillis() % 10000000);
String currentUserId = "mwb_user";
this.testClient = ModelUtils.getTestClientObject(name);
this.testClient.create();
testProject = ModelUtils.getTestProjectObject(testClient.getId(), currentUserId, name);
testProject.create();
testVectorizer = ModelUtils.getVectorizer(modelTechnology);
testVectorizer.create();
testVectorizerUse = ModelUtils.getVectorizer(modelTechnologyUse);
testVectorizerUse.create();
testPreferenceUse = ModelUtils.getPreference(testClient.getId(), testClient.getId().toString(), clientLevel, Constants.VECTORIZER_TYPE, testVectorizerUse.getId());
testPreferenceUse.create();
testPreference = ModelUtils.getPreference(testClient.getId(), testProject.getId().toString(), level, Constants.VECTORIZER_TYPE, testVectorizer.getId());
testPreference.create();
}
@After
public void tearDown() {
testProject.delete();
testClient.delete();
testVectorizer.delete();
testPreference.delete();
testVectorizerUse.delete();
testPreferenceUse.delete();
}
@Test (expected = Test.None.class)
public void testGetLatestVectorizerByTechnologySuccess() {
vectorizerManager.getLatestVectorizerByTechnology(modelTechnology);
}
@Test (expected = InvalidRequestException.class)
public void testGetLatestVectorizerByTechnologyFailureCase1() {
testVectorizer.setIsLatest(VectorizerBO.IsLatest.ZERO);
testVectorizer.update();
vectorizerManager.getLatestVectorizerByTechnology(testPreference.getType());
testVectorizer.setIsLatest(VectorizerBO.IsLatest.ONE);
testVectorizer.update();
}
@Test (expected = InvalidRequestException.class)
public void testGetLatestVectorizerByTechnologyFailureCase2() {
testPreference.setType("ABC");
testPreference.update();
vectorizerManager.getLatestVectorizerByTechnology(testPreference.getType());
testPreference.setType(modelTechnology);
testPreference.update();
}
@Test
public void testCreateVectorizerSuccess() {
VectorizerBO testVectorizerNgram;
testVectorizerNgram = vectorizerManager.addVectorizer(modelTechnology, null);
assertEquals(testVectorizerNgram.getType(), modelTechnology);
assertEquals(testVectorizerNgram.getVersion(), null);
testVectorizerNgram.delete();
}
@Test (expected = InvalidRequestException.class)
public void getVectorizerByIdFailure() {
vectorizerManager.getVectorizerById("0");
}
@Test
public void getVectorizerByIdSuccess() {
VectorizerBO testVectorizerOne;
testVectorizerOne = vectorizerManager.getVectorizerById(String.valueOf(testVectorizer.getId()));
assertEquals(testVectorizer, testVectorizerOne);
testVectorizerOne.delete();
}
@Test
public void getAllVectorizersSuccess() {
List<VectorizerBO> testList = vectorizerManager.getAllVectorizers();
assertTrue(testList.size() >= 2);
}
@Test
public void TestUpdateVectorizerSuccess() {
VectorizerBO testVectorizerOne;
PatchRequest patchRequest = new PatchRequest();
PatchDocument patchDocument = new PatchDocument();
patchDocument.setOp(PatchDocument.OpEnum.REPLACE);
patchDocument.setPath("/" + "isLatest");
patchDocument.setValue(VectorizerBO.IsLatest.ZERO);
patchRequest.add(patchDocument);
testVectorizerOne = vectorizerManager.updateVectorizers(String.valueOf(testVectorizer.getId()), patchRequest);
assertEquals("0", testVectorizerOne.getIsLatest().toString());
testVectorizer.setIsLatest(VectorizerBO.IsLatest.ONE);
testVectorizer.update();
}
@Test (expected = InvalidRequestException.class)
public void TestUpdateVectorizerFailure() {
PatchRequest patchRequest = new PatchRequest();
PatchDocument patchDocument = new PatchDocument();
patchDocument.setOp(PatchDocument.OpEnum.REPLACE);
patchDocument.setPath("/" + "isLatest");
patchDocument.setValue(VectorizerBO.IsLatest.ZERO);
patchRequest.add(patchDocument);
vectorizerManager.updateVectorizers("0", patchRequest);
}
@Test
public void TestgetVectorizerByClientProjectSuccessForNonexistentProject() {
VectorizerBO testVectorizerOne;
testVectorizer.setIsLatest(VectorizerBO.IsLatest.ONE);
testVectorizerOne = vectorizerManager.getVectorizerByClientProject(String.valueOf(testClient.getId()), null);
assertEquals(testVectorizerUse, testVectorizerOne);
}
@Test
public void TestgetVectorizerByClientProjectSuccessForProject() {
VectorizerBO testVectorizerOne;
testVectorizerOne = vectorizerManager.getVectorizerByClientProject(String.valueOf(testClient.getId()), String.valueOf(testProject.getId()));
assertEquals(testVectorizer, testVectorizerOne);
}
}
|
[
"41387899+Girish027@users.noreply.github.com"
] |
41387899+Girish027@users.noreply.github.com
|
c063a94e5c522a17eaf0fd92617ad0fcecf23414
|
7d0945868b491ec90a2018c05ed7f934d797b581
|
/design/aaron-design-pattern/src/main/java/com/atguigu/factory/absfactory/pizzastore/order/PizzaStore.java
|
db5325e643a907b5c5061b4fd5d01c95dff4e8c7
|
[] |
no_license
|
agilego99/spring-cloud-aaron
|
761dc937f5e6504d41b9b5e1e530b0954e6a375a
|
ba42d96bd40fedaf9bfca80a3777741b4cea0463
|
refs/heads/master
| 2022-12-20T11:22:58.250243
| 2021-02-01T06:05:14
| 2021-02-01T06:05:14
| 214,135,914
| 1
| 0
| null | 2022-12-10T03:56:24
| 2019-10-10T09:02:54
|
Java
|
UTF-8
|
Java
| false
| false
| 253
|
java
|
package com.atguigu.factory.absfactory.pizzastore.order;
public class PizzaStore {
public static void main(String[] args) {
// TODO Auto-generated method stub
//new OrderPizza(new BJFactory());
new OrderPizza(new LDFactory());
}
}
|
[
"agilego99@gmail.com"
] |
agilego99@gmail.com
|
37e1c45a4e00479d72a6dde36f8a6cd1c0f289f4
|
e32eb170db5419fd849058ba0a7fd63d3e35f16a
|
/persistence/shards/src/main/java/org/hibernate/shards/session/SetCacheModeOpenSessionEvent.java
|
1684b4139824b73da5ce8d5c558bb98a03b72db9
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
nikelin/Redshape-AS
|
9803f6825e310fdc0b0870513c977fea06d1c069
|
252d10988daadb9ca5972b61da2ef9d84eedafac
|
refs/heads/3.1.6
| 2022-09-02T23:48:47.958888
| 2012-11-13T10:02:03
| 2012-11-13T10:02:03
| 6,657,575
| 0
| 1
|
Apache-2.0
| 2022-09-01T22:51:08
| 2012-11-12T17:39:26
|
Java
|
UTF-8
|
Java
| false
| false
| 1,096
|
java
|
/*
* Copyright 2012 Cyril A. Karpenko
*
* 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.hibernate.shards.session;
import org.hibernate.CacheMode;
import org.hibernate.Session;
/**
* OpenSessionEvent which sets the CacheMode.
*
* @author maxr@google.com (Max Ross)
*/
class SetCacheModeOpenSessionEvent implements OpenSessionEvent {
private final CacheMode cacheMode;
public SetCacheModeOpenSessionEvent(CacheMode cacheMode) {
this.cacheMode = cacheMode;
}
public void onOpenSession(Session session) {
session.setCacheMode(cacheMode);
}
}
|
[
"self@nikelin.ru"
] |
self@nikelin.ru
|
1de28f900439239a87d54f35266b4f25804bb9e7
|
0bbd91c9d231ee201db5964a8b6b14856dc2af4c
|
/android/src/gnu/kawa/slib/srfi1$frame11.java
|
b940dc5fcad1f33f0d039a56212ec974710a04a7
|
[] |
no_license
|
mafeosza/alertasTempranas_android
|
338d025e52b0b1dc2a94b095f3490fbd7c7c97b7
|
9721d2e0a2a41a9a618ddf273cc72cb8a8299c4f
|
refs/heads/master
| 2021-01-01T16:25:57.753339
| 2015-05-18T23:02:54
| 2015-05-18T23:02:54
| 35,839,030
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 699
|
java
|
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package gnu.kawa.slib;
import gnu.expr.ModuleBody;
import gnu.mapping.Procedure;
import kawa.lib.lists;
// Referenced classes of package gnu.kawa.slib:
// srfi1
public class extends ModuleBody
{
Procedure f;
public Object lambda21recur(Object obj, Object obj1)
{
Object obj2 = obj;
if (lists.isPair(obj1))
{
obj2 = f.apply2(obj, lambda21recur(lists.car.apply1(obj1), lists.cdr.apply1(obj1)));
}
return obj2;
}
public ()
{
}
}
|
[
"fercha0202@hotmail.com"
] |
fercha0202@hotmail.com
|
d4b39d154423fa5efd911dcd97a182e61ac92f7d
|
f816add68ec1390455a9f021bb9387197fd80d98
|
/code/.svn/pristine/8a/8a66515953602da6c99cfb66e11b172780052429.svn-base
|
5acc3e72f2969d3a96900a32d1f8c1e3c5c2140a
|
[] |
no_license
|
daviiz/DOSL-Study
|
5ae384e5361a86a7e7f4a6a78c459044e96c1c9c
|
6e6de2864b6b4b9c57133e23bb32e75e50bbf257
|
refs/heads/master
| 2020-04-14T15:28:55.163746
| 2019-01-18T08:34:51
| 2019-01-18T08:34:51
| 163,928,266
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,916
|
package nl.tudelft.simulation.jstats.math;
/**
* The ProbMath class defines some very basic probabilistic mathematical functions.
* <p>
* Copyright (c) 2004-2019 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights
* reserved. See for project information <a href="https://simulation.tudelft.nl/" target="_blank">
* https://simulation.tudelft.nl</a>. The DSOL project is distributed under a three-clause BSD-style license, which can
* be found at <a href="https://simulation.tudelft.nl/dsol/3.0/license.html" target="_blank">
* https://simulation.tudelft.nl/dsol/3.0/license.html</a>.
* </p>
* @author <a href="https://www.tudelft.nl/averbraeck" target="_blank"> Alexander Verbraeck</a>
*/
public final class ProbMath
{
/**
* constructs a new ProbMath.
*/
private ProbMath()
{
super();
// unreachable code for the utility class
}
/**
* computes the faculty of n.
* @param n int; is the input
* @return faculty of n
*/
public static double faculty(final int n)
{
if (n < 0)
{
throw new IllegalArgumentException("n! with n<0 is invalid");
}
if (n > 170)
{
throw new IllegalArgumentException("n! with n>170 is infinitely");
}
double result = 1.0;
for (int i = 1; i <= n; i++)
{
result = result * i;
}
return result;
}
/**
* computes the permutations of n over m.
* @param n int; the first parameter
* @param m int; the second parameter
* @return the permutations of n over m
*/
public static double permutations(final int n, final int m)
{
if (m > n)
{
throw new IllegalArgumentException("permutations of (n,m) with m>n ?...");
}
return faculty(n) / (faculty(m) * faculty(n - m));
}
}
|
[
"daviiz1117@163.com"
] |
daviiz1117@163.com
|
|
20d882e6806b4496fdea518cc25ccc04f2d92c44
|
7c6ed9e72c028a6617ee94589e6eb44df50ea516
|
/bundle_framework/src/ddth/dasp/framework/model/CombinedClassLoader.java
|
57d8c99bbded3f9713600d2c068a97a5446e6025
|
[
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
DDTH/DASP
|
0dd9ef38c547da08705f3f3ed31edbfa0551647c
|
53bcb0cacde3acd9f8d22cd0f5a62a7b77e2aa3f
|
refs/heads/master
| 2016-09-05T13:25:35.759393
| 2013-10-15T16:16:09
| 2013-10-15T16:16:09
| 7,310,748
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,527
|
java
|
package ddth.dasp.framework.model;
import java.net.URL;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class CombinedClassLoader extends ClassLoader {
private final Logger LOGGER = LoggerFactory.getLogger(CombinedClassLoader.class);
private Set<ClassLoader> loaders = new HashSet<ClassLoader>();
public CombinedClassLoader() {
}
public CombinedClassLoader(Collection<ClassLoader> classLoaders) {
for (ClassLoader classLoader : classLoaders) {
addLoader(classLoader);
}
}
public void addLoader(ClassLoader loader) {
if (loader != null) {
loaders.add(loader);
}
}
public void addLoader(Class<?> clazz) {
addLoader(clazz.getClassLoader());
}
public Class<?> findClass(String name) throws ClassNotFoundException {
for (ClassLoader loader : loaders) {
try {
return loader.loadClass(name);
} catch (ClassNotFoundException cnfe) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug(cnfe.getMessage());
}
}
}
throw new ClassNotFoundException(name);
}
public URL getResource(String name) {
for (ClassLoader loader : loaders) {
URL url = loader.getResource(name);
if (url != null) {
return url;
}
}
return null;
}
}
|
[
"btnguyen2k@gmail.com"
] |
btnguyen2k@gmail.com
|
bc7eac7bfca29cd76bec1ba95959c3203547f696
|
3b76056bebbf834d29cbf82ed57fd273d442f39f
|
/pptviewer/app/src/main/java/org/openxmlformats/schemas/drawingml/x2006/main/STDgmBuildStep.java
|
5687a95c64e33e13a892d99305f7a425c99debae
|
[] |
no_license
|
PetarPeric/pptviewer
|
52dc428e2eb2bc3e3d82deaff11d8be0fc06cf96
|
533c0b504e5139779fbf61fa75c403b0b3190399
|
refs/heads/master
| 2020-03-27T19:56:32.669031
| 2018-10-10T10:39:27
| 2018-10-10T10:39:27
| 147,023,279
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,115
|
java
|
/*
* XML Type: ST_DgmBuildStep
* Namespace: http://schemas.openxmlformats.org/drawingml/2006/main
* Java type: org.openxmlformats.schemas.drawingml.x2006.main.STDgmBuildStep
*
* Automatically generated - do not modify.
*/
package org.openxmlformats.schemas.drawingml.x2006.main;
/**
* An XML ST_DgmBuildStep(@http://schemas.openxmlformats.org/drawingml/2006/main).
*
* This is an atomic type that is a restriction of org.openxmlformats.schemas.drawingml.x2006.main.STDgmBuildStep.
*/
public interface STDgmBuildStep extends org.apache.xmlbeans.XmlToken
{
public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)
org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(STDgmBuildStep.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sE130CAA0A01A7CDE5A2B4FEB8B311707").resolveHandle("stdgmbuildstepbb5btype");
org.apache.xmlbeans.StringEnumAbstractBase enumValue();
void set(org.apache.xmlbeans.StringEnumAbstractBase e);
static final Enum SP = Enum.forString("sp");
static final Enum BG = Enum.forString("bg");
static final int INT_SP = Enum.INT_SP;
static final int INT_BG = Enum.INT_BG;
/**
* Enumeration value class for org.openxmlformats.schemas.drawingml.x2006.main.STDgmBuildStep.
* These enum values can be used as follows:
* <pre>
* enum.toString(); // returns the string value of the enum
* enum.intValue(); // returns an int value, useful for switches
* // e.g., case Enum.INT_SP
* Enum.forString(s); // returns the enum value for a string
* Enum.forInt(i); // returns the enum value for an int
* </pre>
* Enumeration objects are immutable singleton objects that
* can be compared using == object equality. They have no
* public constructor. See the constants defined within this
* class for all the valid values.
*/
static final class Enum extends org.apache.xmlbeans.StringEnumAbstractBase
{
/**
* Returns the enum value for a string, or null if none.
*/
public static Enum forString(java.lang.String s)
{ return (Enum)table.forString(s); }
/**
* Returns the enum value corresponding to an int, or null if none.
*/
public static Enum forInt(int i)
{ return (Enum)table.forInt(i); }
private Enum(java.lang.String s, int i)
{ super(s, i); }
static final int INT_SP = 1;
static final int INT_BG = 2;
public static final org.apache.xmlbeans.StringEnumAbstractBase.Table table =
new org.apache.xmlbeans.StringEnumAbstractBase.Table
(
new Enum[]
{
new Enum("sp", INT_SP),
new Enum("bg", INT_BG),
}
);
private static final long serialVersionUID = 1L;
private java.lang.Object readResolve() { return forInt(intValue()); }
}
/**
* A factory class with static methods for creating instances
* of this type.
*/
}
|
[
"petarperic93@gmail.com"
] |
petarperic93@gmail.com
|
586a6dc3e64aa1f45645e96716549bd51085da51
|
9b2b28ac9bf206ad44371d43add285b872a594e8
|
/src/main/java/org/dasein/cloud/aws/storage/S3Exception.java
|
fbe0d9667b2606381b8aab86095a9781fe2803e7
|
[
"Apache-2.0"
] |
permissive
|
timf/dasein-cloud-aws
|
6e04b91e5484b8848e28fd7fc73e13fcf6a1ce32
|
37d01f761ee5b51814e649bd9207691c1799e703
|
refs/heads/master
| 2021-01-21T20:50:07.886529
| 2013-03-08T02:04:00
| 2013-03-08T02:04:00
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,451
|
java
|
/**
* Copyright (C) 2009-2012 enStratus Networks Inc
*
* ====================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ====================================================================
*/
package org.dasein.cloud.aws.storage;
public class S3Exception extends Exception {
private static final long serialVersionUID = -1187862739180492610L;
private String code = null;
private String requestId = null;
private int status = 0;
public S3Exception(int status, String requestId, String code, String message) {
super(message);
this.requestId = requestId;
this.code = code;
this.status = status;
}
public String getCode() {
return code;
}
public String getRequestId() {
return requestId;
}
public int getStatus() {
return status;
}
public String getSummary() {
return (status + "/" + requestId + "/" + code + ": " + getMessage());
}
}
|
[
"george.reese@imaginary.com"
] |
george.reese@imaginary.com
|
1f36a6ab57a98d47fe2523bacbb018ee4c431c56
|
6f024865f86614117e73ff1ad784398884edf765
|
/src/main/java/com/inteliclinic/neuroon/views/calendar/SleepDatesCalendarMonthView$$ViewInjector.java
|
d60e94579749778e31a4999cb89d1c80ffd9ea12
|
[] |
no_license
|
chakaponden/neuroon-classic-app
|
0df0ef593dd3e55bbffc325cdd0a399265dffb73
|
aa337afe4764a3af5094b3a0bc8cea54aa23dd34
|
refs/heads/main
| 2022-12-25T21:52:49.184564
| 2020-10-09T15:42:36
| 2020-10-09T15:42:36
| 302,444,442
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 716
|
java
|
package com.inteliclinic.neuroon.views.calendar;
import butterknife.ButterKnife;
import com.inteliclinic.neuroon.R;
import com.inteliclinic.neuroon.views.BoldTextView;
public class SleepDatesCalendarMonthView$$ViewInjector {
public static void inject(ButterKnife.Finder finder, SleepDatesCalendarMonthView target, Object source) {
target.monthName = (BoldTextView) finder.findRequiredView(source, R.id.month_name, "field 'monthName'");
target.mMonthView = (SleepDatesMonthView) finder.findRequiredView(source, R.id.month, "field 'mMonthView'");
}
public static void reset(SleepDatesCalendarMonthView target) {
target.monthName = null;
target.mMonthView = null;
}
}
|
[
"motometalor@gmail.com"
] |
motometalor@gmail.com
|
ab19cc64b95afad9eebf10b89554bab6560597c5
|
64d3e1ede86f393d20f45bf5689ec97cfebf01da
|
/src/main/java/ch/ethz/systems/netbench/ext/basic/PerfectSimpleLink.java
|
f8a5fcfa99f9ee71fb47d65ef9bbc85427d64c60
|
[
"MIT"
] |
permissive
|
ibuystuff/netbench
|
efd8b492c6ffa33dc319bc0ac98f6f1a6e502564
|
e3ce5de28e6ef1940685d396adeb4fda86c82a48
|
refs/heads/master
| 2023-06-21T20:06:54.704052
| 2017-08-09T10:01:29
| 2017-08-09T10:01:29
| 121,750,449
| 0
| 0
|
MIT
| 2020-10-24T03:24:55
| 2018-02-16T12:51:18
|
Shell
|
UTF-8
|
Java
| false
| false
| 894
|
java
|
package ch.ethz.systems.netbench.ext.basic;
import ch.ethz.systems.netbench.core.network.Link;
public class PerfectSimpleLink extends Link {
private final long delayNs;
private final long bandwidthBitPerNs;
/**
* Perfect simple link that never drops a packet.
*
* @param delayNs Delay of each packet in nanoseconds
* @param bandwidthBitPerNs Bandwidth of the link (maximum line rate) in bits/ns
*/
PerfectSimpleLink(long delayNs, long bandwidthBitPerNs) {
this.delayNs = delayNs;
this.bandwidthBitPerNs = bandwidthBitPerNs;
}
@Override
public long getDelayNs() {
return delayNs;
}
@Override
public long getBandwidthBitPerNs() {
return bandwidthBitPerNs;
}
@Override
public boolean doesNextTransmissionFail(long packetSizeBits) {
return false;
}
}
|
[
"s.a.kassing@gmail.com"
] |
s.a.kassing@gmail.com
|
4604de3637fbc3e0322fb9db61acd48f81cf2ef2
|
12563229bd1c69d26900d4a2ea34fe4c64c33b7e
|
/nan21.dnet.module.pj/nan21.dnet.module.pj.business.api/src/main/java/net/nan21/dnet/module/pj/base/business/service/IIssueResolutionService.java
|
1065bf8861678732b10f48ab3e37a3a59abc3e1c
|
[] |
no_license
|
nan21/nan21.dnet.modules
|
90b002c6847aa491c54bd38f163ba40a745a5060
|
83e5f02498db49e3d28f92bd8216fba5d186dd27
|
refs/heads/master
| 2023-03-15T16:22:57.059953
| 2012-08-01T07:36:57
| 2012-08-01T07:36:57
| 1,918,395
| 0
| 1
| null | 2012-07-24T03:23:00
| 2011-06-19T05:56:03
|
Java
|
UTF-8
|
Java
| false
| false
| 482
|
java
|
/*
* DNet eBusiness Suite
* Copyright: 2008-2012 Nan21 Electronics SRL. All rights reserved.
* Use is subject to license terms.
*/
package net.nan21.dnet.module.pj.base.business.service;
import net.nan21.dnet.core.api.service.IEntityService;
import net.nan21.dnet.module.pj.base.domain.entity.IssueResolution;
public interface IIssueResolutionService extends
IEntityService<IssueResolution> {
public IssueResolution findByName(String name);
}
|
[
"mathe_attila@yahoo.com"
] |
mathe_attila@yahoo.com
|
a73401d339caa43022c21b54d608a9b5b1e32c84
|
863acb02a064a0fc66811688a67ce3511f1b81af
|
/sources/com/smaato/soma/exception/ParserException.java
|
40bc2ce95b10f839aaa5b36fce1ea9253095c718
|
[
"MIT"
] |
permissive
|
Game-Designing/Custom-Football-Game
|
98d33eb0c04ca2c48620aa4a763b91bc9c1b7915
|
47283462b2066ad5c53b3c901182e7ae62a34fc8
|
refs/heads/master
| 2020-08-04T00:02:04.876780
| 2019-10-06T06:55:08
| 2019-10-06T06:55:08
| 211,914,568
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 262
|
java
|
package com.smaato.soma.exception;
public class ParserException extends Exception {
public ParserException(String message) {
super(message);
}
public ParserException(String message, Throwable cause) {
super(message, cause);
}
}
|
[
"tusharchoudhary0003@gmail.com"
] |
tusharchoudhary0003@gmail.com
|
5dbe1ca0969310a2ecd3eda181500d6669d7f89e
|
6066fc9f54fb8955d8e763ae1569a2c06aef28e9
|
/src/main/java/core/Thread/DeadLockDemo.java
|
fcf62ff3fcde4d77c6444cdb8eda23fffc587a2a
|
[] |
no_license
|
raju1982/educative
|
d33a70f5e63746af98247e48d37326fb1ce438ae
|
1d0a7f97285540e25a2c05a80b39c9f71e53f430
|
refs/heads/master
| 2021-07-20T23:36:01.452828
| 2021-07-08T06:29:22
| 2021-07-08T06:29:22
| 180,651,995
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,401
|
java
|
package core.Thread;
//Deadlock in multi-threading describes a situation where two or more threads are blocked forever, waiting for each other.
//https://netjs.blogspot.com/2015/07/deadlock-in-java-multi-threading.html
public class DeadLockDemo {
private final String name;
public DeadLockDemo(String name){
this.name = name;
}
public String getName() {
return this.name;
}
public synchronized void call(DeadLockDemo caller){
System.out.println(this.getName() + " has asked to call me " + caller.getName());
try {
// Introducing some delay
Thread.sleep(100);
} catch (InterruptedException e) {
e.printStackTrace();
}
//Calling another synchronized method
caller.callMe(this);
}
public synchronized void callMe(DeadLockDemo caller){
System.out.println(this.getName() + " has called me " + caller.getName());
}
public static void main(String[] args) {
DeadLockDemo caller1 = new DeadLockDemo("caller-1");
DeadLockDemo caller2 = new DeadLockDemo("caller-2");
// Thread 1
new Thread(new Runnable() {
public void run() { caller1.call(caller2); }
}).start();
//Thread 2
new Thread(new Runnable() {
public void run() { caller2.call(caller1); }
}).start();
}
}
|
[
"rakeshkandpal1982@gmail.com"
] |
rakeshkandpal1982@gmail.com
|
8630e3cf011a92cef5594bbe1ac142787fb39e0a
|
b6e99b0346572b7def0e9cdd1b03990beb99e26f
|
/src/gcom/gui/micromedicao/RemoverLocalArmazenagemHidrometroAction.java
|
469c0ddf43d745f0e79f02809b2e05995eabc185
|
[] |
no_license
|
prodigasistemas/gsan
|
ad64782c7bc991329ce5f0bf5491c810e9487d6b
|
bfbf7ad298c3c9646bdf5d9c791e62d7366499c1
|
refs/heads/master
| 2023-08-31T10:47:21.784105
| 2023-08-23T17:53:24
| 2023-08-23T17:53:24
| 14,600,520
| 19
| 20
| null | 2015-07-29T19:39:10
| 2013-11-21T21:24:16
|
Java
|
ISO-8859-1
|
Java
| false
| false
| 1,847
|
java
|
package gcom.gui.micromedicao;
import gcom.fachada.Fachada;
import gcom.gui.ActionServletException;
import gcom.gui.GcomAction;
import gcom.gui.ManutencaoRegistroActionForm;
import gcom.micromedicao.hidrometro.HidrometroLocalArmazenagem;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
/**
* @author Arthur Carvalho
* @date 06/08/2008
*/
public class RemoverLocalArmazenagemHidrometroAction extends GcomAction {
public ActionForward execute(ActionMapping actionMapping,
ActionForm actionForm, HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse) {
ManutencaoRegistroActionForm manutencaoRegistroActionForm = (ManutencaoRegistroActionForm) actionForm;
String[] ids = manutencaoRegistroActionForm.getIdRegistrosRemocao();
ActionForward retorno = actionMapping.findForward("telaSucesso");
Fachada fachada = Fachada.getInstancia();
if (ids == null || ids.length == 0) {
throw new ActionServletException("atencao.registros.nao_selecionados");
}
fachada.remover(ids, HidrometroLocalArmazenagem.class.getName(),
null, null);
if (retorno.getName().equalsIgnoreCase("telaSucesso")) {
montarPaginaSucesso(httpServletRequest,
ids.length + " Local(is) de Armazenagem do Hidrômetro(s) removido(s) com sucesso.",
"Realizar outra Manutenção de Local de Armazenagem do Hidrômetro",
"exibirFiltrarLocalArmazenagemHidrometroAction.do?menu=sim");
}
return retorno;
}
}
|
[
"piagodinho@gmail.com"
] |
piagodinho@gmail.com
|
0bfcb849b92b1572bf745da2761a3562fe75c835
|
746572ba552f7d52e8b5a0e752a1d6eb899842b9
|
/JDK8Source/src/main/java/com/sun/org/apache/xerces/internal/impl/xs/models/XSAllCM.java
|
e6fa59013417697f933c2d26b50f31ff0457d35b
|
[] |
no_license
|
lobinary/Lobinary
|
fde035d3ce6780a20a5a808b5d4357604ed70054
|
8de466228bf893b72c7771e153607674b6024709
|
refs/heads/master
| 2022-02-27T05:02:04.208763
| 2022-01-20T07:01:28
| 2022-01-20T07:01:28
| 26,812,634
| 7
| 5
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,569
|
java
|
/***** Lobxxx Translate Finished ******/
/*
* Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
/*
* Copyright 1999-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* <p>
* 版权所有1999-2004 Apache软件基金会。
*
* 根据Apache许可证2.0版("许可证")授权;您不能使用此文件,除非符合许可证。您可以通过获取许可证的副本
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* 除非适用法律要求或书面同意,否则根据许可证分发的软件按"原样"分发,不附带任何明示或暗示的担保或条件。请参阅管理许可证下的权限和限制的特定语言的许可证。
*
*/
package com.sun.org.apache.xerces.internal.impl.xs.models;
import com.sun.org.apache.xerces.internal.xni.QName;
import com.sun.org.apache.xerces.internal.impl.xs.XSElementDecl;
import com.sun.org.apache.xerces.internal.impl.xs.SubstitutionGroupHandler;
import com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaException;
import com.sun.org.apache.xerces.internal.impl.xs.XSConstraints;
import java.util.Vector;
import java.util.ArrayList;
/**
* XSAllCM implements XSCMValidator and handles <all>.
*
* @xerces.internal
*
* <p>
* XSAllCM实现XSCMValidator并处理< all> ;.
*
* @ xerces.internal
*
*
* @author Pavani Mukthipudi, Sun Microsystems Inc.
* @version $Id: XSAllCM.java,v 1.10 2010-11-01 04:39:58 joehw Exp $
*/
public class XSAllCM implements XSCMValidator {
//
// Constants
//
// start the content model: did not see any children
private static final short STATE_START = 0;
private static final short STATE_VALID = 1;
private static final short STATE_CHILD = 1;
//
// Data
//
private XSElementDecl fAllElements[];
private boolean fIsOptionalElement[];
private boolean fHasOptionalContent = false;
private int fNumElements = 0;
//
// Constructors
//
public XSAllCM (boolean hasOptionalContent, int size) {
fHasOptionalContent = hasOptionalContent;
fAllElements = new XSElementDecl[size];
fIsOptionalElement = new boolean[size];
}
public void addElement (XSElementDecl element, boolean isOptional) {
fAllElements[fNumElements] = element;
fIsOptionalElement[fNumElements] = isOptional;
fNumElements++;
}
//
// XSCMValidator methods
//
/**
* This methods to be called on entering a first element whose type
* has this content model. It will return the initial state of the
* content model
*
* <p>
* 在输入类型具有此内容模型的第一个元素时调用此方法。它将返回内容模型的初始状态
*
*
* @return Start state of the content model
*/
public int[] startContentModel() {
int[] state = new int[fNumElements + 1];
for (int i = 0; i <= fNumElements; i++) {
state[i] = STATE_START;
}
return state;
}
// convinient method: when error occurs, to find a matching decl
// from the candidate elements.
Object findMatchingDecl(QName elementName, SubstitutionGroupHandler subGroupHandler) {
Object matchingDecl = null;
for (int i = 0; i < fNumElements; i++) {
matchingDecl = subGroupHandler.getMatchingElemDecl(elementName, fAllElements[i]);
if (matchingDecl != null)
break;
}
return matchingDecl;
}
/**
* The method corresponds to one transition in the content model.
*
* <p>
* 该方法对应于内容模型中的一个转换。
*
*
* @param elementName
* @param currentState Current state
* @return an element decl object
*/
public Object oneTransition (QName elementName, int[] currentState, SubstitutionGroupHandler subGroupHandler) {
// error state
if (currentState[0] < 0) {
currentState[0] = XSCMValidator.SUBSEQUENT_ERROR;
return findMatchingDecl(elementName, subGroupHandler);
}
// seen child
currentState[0] = STATE_CHILD;
Object matchingDecl = null;
for (int i = 0; i < fNumElements; i++) {
// we only try to look for a matching decl if we have not seen
// this element yet.
if (currentState[i+1] != STATE_START)
continue;
matchingDecl = subGroupHandler.getMatchingElemDecl(elementName, fAllElements[i]);
if (matchingDecl != null) {
// found the decl, mark this element as "seen".
currentState[i+1] = STATE_VALID;
return matchingDecl;
}
}
// couldn't find the decl, change to error state.
currentState[0] = XSCMValidator.FIRST_ERROR;
return findMatchingDecl(elementName, subGroupHandler);
}
/**
* The method indicates the end of list of children
*
* <p>
* 该方法指示子节点列表的结尾
*
*
* @param currentState Current state of the content model
* @return true if the last state was a valid final state
*/
public boolean endContentModel (int[] currentState) {
int state = currentState[0];
if (state == XSCMValidator.FIRST_ERROR || state == XSCMValidator.SUBSEQUENT_ERROR) {
return false;
}
// If <all> has minOccurs of zero and there are
// no children to validate, it is trivially valid
if (fHasOptionalContent && state == STATE_START) {
return true;
}
for (int i = 0; i < fNumElements; i++) {
// if one element is required, but not present, then error
if (!fIsOptionalElement[i] && currentState[i+1] == STATE_START)
return false;
}
return true;
}
/**
* check whether this content violates UPA constraint.
*
* <p>
* 检查此内容是否违反UPA约束。
*
*
* @param subGroupHandler the substitution group handler
* @return true if this content model contains other or list wildcard
*/
public boolean checkUniqueParticleAttribution(SubstitutionGroupHandler subGroupHandler) throws XMLSchemaException {
// check whether there is conflict between any two leaves
for (int i = 0; i < fNumElements; i++) {
for (int j = i+1; j < fNumElements; j++) {
if (XSConstraints.overlapUPA(fAllElements[i], fAllElements[j], subGroupHandler)) {
// REVISIT: do we want to report all errors? or just one?
throw new XMLSchemaException("cos-nonambig", new Object[]{fAllElements[i].toString(),
fAllElements[j].toString()});
}
}
}
return false;
}
/**
* Check which elements are valid to appear at this point. This method also
* works if the state is in error, in which case it returns what should
* have been seen.
*
* <p>
* 检查哪些元素在此时显示有效。如果状态是错误的,这种方法也工作,在这种情况下,它返回应该已经看到的。
*
* @param state the current state
* @return a Vector whose entries are instances of
* either XSWildcardDecl or XSElementDecl.
*/
public Vector whatCanGoHere(int[] state) {
Vector ret = new Vector();
for (int i = 0; i < fNumElements; i++) {
// we only try to look for a matching decl if we have not seen
// this element yet.
if (state[i+1] == STATE_START)
ret.addElement(fAllElements[i]);
}
return ret;
}
public ArrayList checkMinMaxBounds() {
return null;
}
} // class XSAllCM
|
[
"919515134@qq.com"
] |
919515134@qq.com
|
21c2dc2c6bbf5012bc385881fb73ba094de1261c
|
930c207e245c320b108e9699bbbb036260a36d6a
|
/BRICK-RDF4J/generatedCode/src/main/java/brickschema/org/schema/_1_0_2/Brick/ISupply_Air_Temperature_Reset_High.java
|
09325258e6981ab3b6c933ba536e826164bec4d8
|
[] |
no_license
|
InnovationSE/BRICK-Generated-By-OLGA
|
24d278f543471e1ce622f5f45d9e305790181fff
|
7874dfa450a8a2b6a6f9927c0f91f9c7d2abd4d2
|
refs/heads/master
| 2021-07-01T14:13:11.302860
| 2017-09-21T12:44:17
| 2017-09-21T12:44:17
| 104,251,784
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 557
|
java
|
/**
* This file is automatically generated by OLGA
* @author OLGA
* @version 1.0
*/
package brickschema.org.schema._1_0_2.Brick;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.rdf4j.model.IRI;
import org.eclipse.rdf4j.model.vocabulary.RDF;
import brickschema.org.schema._1_0_2.Brick.IAir_Temperature_High_Reset;
import brickschema.org.schema._1_0_2.Brick.ISupply_Air_Temperature;
public interface ISupply_Air_Temperature_Reset_High extends IAir_Temperature_High_Reset, ISupply_Air_Temperature {
public IRI iri();
}
|
[
"Andre.Ponnouradjane@non.schneider-electric.com"
] |
Andre.Ponnouradjane@non.schneider-electric.com
|
079755aa482eb230b3042df868d69c64e8737854
|
70103ef5ed97bad60ee86c566c0bdd14b0050778
|
/src/test/java/com/hackaton/smarthack/domain/PostTest.java
|
ee65ccc623dc742a57e2fe9755dbdbcc134d42b5
|
[] |
no_license
|
alexjilavu/Smarthack-2021
|
7a127166cef52bfc9ee08ef1840c0fde2d2b79aa
|
564abdc14df4981cdcad984a661f105327758559
|
refs/heads/master
| 2023-08-29T18:34:44.280519
| 2021-11-07T10:42:00
| 2021-11-07T10:42:00
| 423,957,218
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 627
|
java
|
package com.hackaton.smarthack.domain;
import static org.assertj.core.api.Assertions.assertThat;
import com.hackaton.smarthack.web.rest.TestUtil;
import org.junit.jupiter.api.Test;
class PostTest {
@Test
void equalsVerifier() throws Exception {
TestUtil.equalsVerifier(Post.class);
Post post1 = new Post();
post1.setId(1L);
Post post2 = new Post();
post2.setId(post1.getId());
assertThat(post1).isEqualTo(post2);
post2.setId(2L);
assertThat(post1).isNotEqualTo(post2);
post1.setId(null);
assertThat(post1).isNotEqualTo(post2);
}
}
|
[
"alexjilavu17@gmail.com"
] |
alexjilavu17@gmail.com
|
7254abdf736e15885cfaf3737718e6feed033e22
|
3d69a9fed0127e675b29d782a5ed7eb4979287d6
|
/framework/java/connector-framework/src/test/java/org/identityconnectors/common/script/ScriptTests.java
|
104a7dbaab57c3e7d3293d7a5ddb3c50a7787236
|
[] |
no_license
|
Evolveum/openicf
|
b933a9b21464282c6eab1c34ac87c0db6b34f6ba
|
48645668a4fb6aafcc2f40813d8959e9149368e5
|
refs/heads/master
| 2023-09-03T22:23:53.215181
| 2023-08-27T06:49:03
| 2023-08-27T06:49:03
| 18,093,759
| 8
| 14
| null | 2023-09-11T08:25:39
| 2014-03-25T08:39:32
|
Java
|
UTF-8
|
Java
| false
| false
| 2,592
|
java
|
/*
* ====================
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright 2008-2009 Sun Microsystems, Inc. All rights reserved.
*
* The contents of this file are subject to the terms of the Common Development
* and Distribution License("CDDL") (the "License"). You may not use this file
* except in compliance with the License.
*
* You can obtain a copy of the License at
* http://opensource.org/licenses/cddl1.php
* See the License for the specific language governing permissions and limitations
* under the License.
*
* When distributing the Covered Code, include this CDDL Header Notice in each file
* and include the License file at http://opensource.org/licenses/cddl1.php.
* If applicable, add the following below this CDDL Header, with the fields
* enclosed by brackets [] replaced by your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
* ====================
*/
package org.identityconnectors.common.script;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.fail;
import org.testng.annotations.Test;
public class ScriptTests {
@Test
public void testBasic() {
Script s1 = new Script("Groovy", "print 'foo'");
assertEquals(s1.getScriptLanguage(), "Groovy");
assertEquals(s1.getScriptText(), "print 'foo'");
Script s2 =
new ScriptBuilder().setScriptLanguage("Groovy").setScriptText("print 'foo'")
.build();
assertEquals(s1, s2);
assertEquals(s1.hashCode(), s2.hashCode());
}
@Test
public void testLanguageNotBlank() {
try {
new ScriptBuilder().setScriptText("print 'foo'").build();
fail();
} catch (IllegalArgumentException e) {
// OK.
}
try {
new ScriptBuilder().setScriptText("print 'foo'").setScriptLanguage("").build();
fail();
} catch (IllegalArgumentException e) {
// OK.
}
try {
new ScriptBuilder().setScriptText("print 'foo'").setScriptLanguage(" ").build();
fail();
} catch (IllegalArgumentException e) {
// OK.
}
}
@Test
public void testTextNotNull() {
try {
new ScriptBuilder().setScriptLanguage("Groovy").build();
fail();
} catch (NullPointerException e) {
// OK.
}
// The text can be empty.
new ScriptBuilder().setScriptLanguage("Groovy").setScriptText("").build();
}
}
|
[
"laszlo.hordos@forgerock.com"
] |
laszlo.hordos@forgerock.com
|
19ef1f6cf65c57c8e435a7ec1779778e32da44bf
|
1630d71d9056506193393d3ca6b7bf5daa769574
|
/src/com/google/android/apps/lightcycle/storage/LocalSessionStorage.java
|
37b9f1ce562ac0aba4430d82577583e2d50b7e24
|
[] |
no_license
|
Denis-chen/gallerygoogle.apk.decode
|
1f834635242eca6bf4d3980c12e732e7da80cf7f
|
ba3774f237dc4a830d558a45b7ee9f71d999a1b5
|
refs/heads/master
| 2020-04-06T06:50:26.529081
| 2013-09-13T05:12:04
| 2013-09-13T05:12:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 927
|
java
|
package com.google.android.apps.lightcycle.storage;
import android.net.Uri;
import java.io.Serializable;
public class LocalSessionStorage
implements Serializable
{
public Uri imageUri;
public String metadataFilePath;
public String mosaicFilePath;
public String orientationFilePath;
public String previewMosaicFilePath;
public String sessionDir;
public String sessionId;
public String thumbnailFilePath;
public String toString()
{
return "Session ID : " + this.sessionId + "\n SessionDir : " + this.sessionDir + "\n mosaic : " + this.mosaicFilePath + "\n thumbnail : " + this.thumbnailFilePath + "\n metadata : " + this.metadataFilePath + "\n orientationFile : " + this.orientationFilePath;
}
}
/* Location: D:\camera42_patched_v2\dex2jar-0.0.9.15\classes_dex2jar.jar
* Qualified Name: com.google.android.apps.lightcycle.storage.LocalSessionStorage
* JD-Core Version: 0.5.4
*/
|
[
"rainius@163.com"
] |
rainius@163.com
|
2a421b5d650467f5fad72f461b2f741cb58eeecb
|
9b294c3bf262770e9bac252b018f4b6e9412e3ee
|
/camerazadas/source/apk/com.sonyericsson.android.camera/src-cfr/com/google/android/gms/maps/model/IndoorBuilding.java
|
4bf35e7d3c1e683e97db8b51cee97f650e8c49a1
|
[] |
no_license
|
h265/camera
|
2c00f767002fd7dbb64ef4dc15ff667e493cd937
|
77b986a60f99c3909638a746c0ef62cca38e4235
|
refs/heads/master
| 2020-12-30T22:09:17.331958
| 2015-08-25T01:22:25
| 2015-08-25T01:22:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,499
|
java
|
/*
* Decompiled with CFR 0_100.
*/
package com.google.android.gms.maps.model;
import android.os.IBinder;
import android.os.RemoteException;
import com.google.android.gms.common.internal.o;
import com.google.android.gms.maps.model.IndoorLevel;
import com.google.android.gms.maps.model.RuntimeRemoteException;
import com.google.android.gms.maps.model.internal.d;
import com.google.android.gms.maps.model.internal.e;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public final class IndoorBuilding {
private final d ajW;
public IndoorBuilding(d d) {
this.ajW = o.i(d);
}
public boolean equals(Object object) {
if (!(object instanceof IndoorBuilding)) {
return false;
}
try {
boolean bl = this.ajW.b(((IndoorBuilding)object).ajW);
return bl;
}
catch (RemoteException var1_2) {
throw new RuntimeRemoteException(var1_2);
}
}
public int getActiveLevelIndex() {
try {
int n = this.ajW.getActiveLevelIndex();
return n;
}
catch (RemoteException var2_2) {
throw new RuntimeRemoteException(var2_2);
}
}
public int getDefaultLevelIndex() {
try {
int n = this.ajW.getActiveLevelIndex();
return n;
}
catch (RemoteException var2_2) {
throw new RuntimeRemoteException(var2_2);
}
}
public List<IndoorLevel> getLevels() {
ArrayList<IndoorLevel> arrayList;
try {
Object object = this.ajW.getLevels();
arrayList = new ArrayList<IndoorLevel>(object.size());
object = object.iterator();
while (object.hasNext()) {
arrayList.add(new IndoorLevel(e.a.bt((IBinder)object.next())));
}
}
catch (RemoteException var1_3) {
throw new RuntimeRemoteException(var1_3);
}
return arrayList;
}
public int hashCode() {
try {
int n = this.ajW.hashCodeRemote();
return n;
}
catch (RemoteException var2_2) {
throw new RuntimeRemoteException(var2_2);
}
}
public boolean isUnderground() {
try {
boolean bl = this.ajW.isUnderground();
return bl;
}
catch (RemoteException var2_2) {
throw new RuntimeRemoteException(var2_2);
}
}
}
|
[
"jmrm@ua.pt"
] |
jmrm@ua.pt
|
96fe02a48876c0dde09cfb56c7ec9161d705b543
|
f7ec23eb91389884d128fd9f28aa4eecee5a6a69
|
/wemall-v2/wemall-foundation/src/main/java/com/wemall/foundation/domain/Transport.java
|
8e349b70f8289518fc27d1b3c030eb14bde10ea7
|
[] |
no_license
|
springwindyike/wemall
|
e6c607719b1c11bd256d7c4c9b1ab8b670b64ff2
|
5765ea058615d3d63897be28a3122e2dfa04e026
|
refs/heads/master
| 2020-09-16T14:59:43.207420
| 2019-03-28T16:56:12
| 2019-03-28T16:56:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,929
|
java
|
package com.wemall.foundation.domain;
import com.wemall.core.domain.IdEntity;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import javax.persistence.*;
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@Entity
@Table(name = "wemall_transport")
public class Transport extends IdEntity {
//运送名称
private String trans_name;
//运送时间
@Column(columnDefinition = "int default 0")
private int trans_time;
//运送类型
@Column(columnDefinition = "int default 0")
private int trans_type;
//店铺
@ManyToOne(fetch = FetchType.LAZY)
private Store store;
//是否支持运送邮件
private boolean trans_mail;
//运送邮件信息
@Column(columnDefinition = "LongText")
private String trans_mail_info;
//是否为特快运送
private boolean trans_express;
//特快运送信息
@Column(columnDefinition = "LongText")
private String trans_express_info;
//是否为ems运送
private boolean trans_ems;
//ems运送信息
@Column(columnDefinition = "LongText")
private String trans_ems_info;
public int getTrans_time(){
return this.trans_time;
}
public void setTrans_time(int trans_time){
this.trans_time = trans_time;
}
public int getTrans_type(){
return this.trans_type;
}
public void setTrans_type(int trans_type){
this.trans_type = trans_type;
}
public boolean isTrans_mail(){
return this.trans_mail;
}
public void setTrans_mail(boolean trans_mail){
this.trans_mail = trans_mail;
}
public boolean isTrans_express(){
return this.trans_express;
}
public void setTrans_express(boolean trans_express){
this.trans_express = trans_express;
}
public boolean isTrans_ems(){
return this.trans_ems;
}
public void setTrans_ems(boolean trans_ems){
this.trans_ems = trans_ems;
}
public String getTrans_name(){
return this.trans_name;
}
public void setTrans_name(String trans_name){
this.trans_name = trans_name;
}
public String getTrans_mail_info(){
return this.trans_mail_info;
}
public void setTrans_mail_info(String trans_mail_info){
this.trans_mail_info = trans_mail_info;
}
public String getTrans_express_info(){
return this.trans_express_info;
}
public void setTrans_express_info(String trans_express_info){
this.trans_express_info = trans_express_info;
}
public String getTrans_ems_info(){
return this.trans_ems_info;
}
public void setTrans_ems_info(String trans_ems_info){
this.trans_ems_info = trans_ems_info;
}
public Store getStore(){
return this.store;
}
public void setStore(Store store){
this.store = store;
}
}
|
[
"qiaozhi_china@163.com"
] |
qiaozhi_china@163.com
|
40c77da99505059b8f5c3a0416ecff8bd6334ed0
|
72f8a2e1a50ba269dc01c03473bb54fefaa5cab5
|
/[1020G1]_Social_Network/src/main/java/c1020g1/social_network/controller/LocationController.java
|
7c7bb0ed102cdc519e044bf9ef1fe600728bc713
|
[] |
no_license
|
duong1007/Test
|
7e7b84308665c187545105bd8b896c0f73ac5cf6
|
c9f0289663daafa93fa772c741bbf6cc16166700
|
refs/heads/main
| 2023-04-10T05:34:53.870229
| 2021-04-28T15:08:48
| 2021-04-28T15:08:48
| 345,876,276
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,653
|
java
|
package c1020g1.social_network.controller;
import c1020g1.social_network.model.District;
import c1020g1.social_network.model.Province;
import c1020g1.social_network.model.Ward;
import c1020g1.social_network.service.DistrictService;
import c1020g1.social_network.service.ProvinceService;
import c1020g1.social_network.service.WardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/location")
@CrossOrigin("http://localhost:4200")
public class LocationController {
@Autowired
private ProvinceService provinceService;
@Autowired
private DistrictService districtService;
@Autowired
private WardService wardService;
@GetMapping("/province")
public ResponseEntity<Iterable<Province>> listProvinces() {
Iterable<Province> provinces = provinceService.getAllProvince();
return new ResponseEntity<>(provinces, HttpStatus.OK);
}
@GetMapping("/district/{id}")
public ResponseEntity<Iterable<District>> listDistrictByProvinceId(@PathVariable("id") int provinceId) {
Iterable<District> districts = districtService.getDistrictByProvinceId(provinceId);
return new ResponseEntity<>(districts, HttpStatus.OK);
}
@GetMapping("/ward/{id}")
public ResponseEntity<Iterable<Ward>> listWardByDistrictId(@PathVariable("id") int districtId) {
Iterable<Ward> wards = wardService.getWardByDistrictId(districtId);
return new ResponseEntity<>(wards, HttpStatus.OK);
}
}
|
[
"maybiluyena@gmail.com"
] |
maybiluyena@gmail.com
|
861394b557ce6e76ec316770b5a0f29629f1b69d
|
a97de7663e08d32d43bd71ae3bd01e21d39087e0
|
/Twist/sahi/test/net/sf/sahi/report/SahiReporterTest.java
|
18420d15aba1104e6cf635e6087f5c5a3ab8cbc9
|
[] |
no_license
|
lilepp87/Twist
|
1ef444a0e2553c9728285724010a61717c1eb911
|
68bbe9b828d741c2ad95fbdc54741faf7dca2150
|
refs/heads/master
| 2020-04-23T03:12:33.677735
| 2018-11-21T07:14:13
| 2018-11-21T07:14:13
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,228
|
java
|
package net.sf.sahi.report;
import java.util.ArrayList;
import net.sf.sahi.config.Configuration;
import net.sf.sahi.test.TestLauncher;
import net.sf.sahi.util.Utils;
import org.jmock.Mock;
import org.jmock.MockObjectTestCase;
/**
* Sahi - Web Automation and Test Tool
*
* Copyright 2006 V Narayan Raman
*
* 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.
*/
/**
* User: dlewis
* Date: Dec 11, 2006
* Time: 4:50:00 PM
*/
public class SahiReporterTest extends MockObjectTestCase {
private static final long serialVersionUID = 564123747953708945L;
static {
Configuration.init();
}
private SahiReporter reporter;
private Mock mockFormatter;
protected void setUp() throws Exception {
super.setUp();
mockFormatter = mock(Formatter.class);
reporter = new SahiReporter("", (Formatter) mockFormatter.proxy()) {
public boolean createSuiteLogFolder() {
return false;
}
};
}
public void testGenerateSuiteReport() {
mockFormatter.expects(once()).method("getSuiteLogFileName");
mockFormatter.expects(once()).method("getFileName").will(returnValue("testFile"));
mockFormatter.expects(once()).method("getHeader").will(returnValue("data"));
mockFormatter.expects(once()).method("getSummaryHeader").after("getHeader").will(returnValue("data"));
mockFormatter.expects(once()).method("getSummaryFooter").after("getSummaryHeader").will(returnValue("data"));
mockFormatter.expects(once()).method("getFooter").after("getSummaryFooter").will(returnValue("data"));
reporter.generateSuiteReport(new ArrayList<TestLauncher>());
}
public void xtestGenerateTestReport() {
mockFormatter.expects(once()).method("getFileName").will(returnValue("testFile"));
mockFormatter.expects(once()).method("getHeader").will(returnValue("data"));
mockFormatter.expects(once()).method("getSummaryHeader").after("getHeader").will(returnValue("data"));
mockFormatter.expects(once()).method("getSummaryData").after("getSummaryHeader").will(returnValue("data"));
mockFormatter.expects(once()).method("getSummaryFooter").after("getSummaryData").will(returnValue("data"));
mockFormatter.expects(once()).method("getStartScript").after("getSummaryFooter").will(returnValue("data"));
mockFormatter.expects(once()).method("getResultData").after("getStartScript").will(returnValue("data"));
mockFormatter.expects(once()).method("getStopScript").after("getResultData").will(returnValue("data"));
mockFormatter.expects(once()).method("getFooter").after("getStopScript").will(returnValue("data"));
Report report = new Report("",new ArrayList<SahiReporter>());
report.setTestSummary(new TestSummary());
reporter.generateTestReport(report, "");
}
public void testGetLogDirForNullLogDir() {
assertEquals(Configuration.getPlayBackLogsRoot(), reporter.getLogDir());
}
public void testGetLogDirForCustomLogDir() {
reporter.setLogDir("customDir");
assertEquals("customDir", reporter.getLogDir());
}
public void testGetLogDirForNullLogDirWithCreateSuiteFolderSetToTrue() {
reporter = new SahiReporter("", (Formatter) mockFormatter.proxy()) {
public boolean createSuiteLogFolder() {
return true;
}
};
reporter.setSuiteName("junit");
if(Utils.isWindows())
assertTrue(reporter.getLogDir().startsWith(Configuration.getPlayBackLogsRoot() + "\\junit__"));
else
assertTrue(reporter.getLogDir().startsWith(Configuration.getPlayBackLogsRoot() + "/junit__"));
}
}
|
[
"100711@suneraindia.com"
] |
100711@suneraindia.com
|
5d7d294f1078408a1962a2531222e8c0f35e1c55
|
e1af7696101f8f9eb12c0791c211e27b4310ecbc
|
/MCP/temp/src/minecraft/net/minecraft/item/ItemCloth.java
|
b596a42b46cc7bbee7fab8a4edeac4afff70c941
|
[] |
no_license
|
VinmaniaTV/Mania-Client
|
e36810590edf09b1d78b8eeaf5cbc46bb3e2d8ce
|
7a12b8bad1a8199151b3f913581775f50cc4c39c
|
refs/heads/main
| 2023-02-12T10:31:29.076263
| 2021-01-13T02:29:35
| 2021-01-13T02:29:35
| 329,156,099
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 508
|
java
|
package net.minecraft.item;
import net.minecraft.block.Block;
public class ItemCloth extends ItemBlock {
public ItemCloth(Block p_i45358_1_) {
super(p_i45358_1_);
this.func_77656_e(0);
this.func_77627_a(true);
}
public int func_77647_b(int p_77647_1_) {
return p_77647_1_;
}
public String func_77667_c(ItemStack p_77667_1_) {
return super.func_77658_a() + "." + EnumDyeColor.func_176764_b(p_77667_1_.func_77960_j()).func_176762_d();
}
}
|
[
"vinmaniamc@gmail.com"
] |
vinmaniamc@gmail.com
|
baf1e5d18e5134fc1a335fa4caa2837db4b04dff
|
e32479a53c8ade548fd7e100e6dd4ceba9f92f8e
|
/experiments/subjects/math_10/fuzzing/src/test/org/apache/commons/math3/analysis/UnivariateMatrixFunction.java
|
c7ca4ffe63b14828b192e4642aa51a0c79656026
|
[
"MIT"
] |
permissive
|
yannicnoller/hydiff
|
5d4981006523c6a7ce6afcc0f44017799359c65c
|
4df7df1d2f00bf28d6fb2e2ed7a14103084c39f3
|
refs/heads/master
| 2021-08-28T03:42:09.297288
| 2021-08-09T07:02:18
| 2021-08-09T07:02:18
| 207,993,923
| 24
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,191
|
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 test.org.apache.commons.math3.analysis;
/**
* An interface representing a univariate matrix function.
*
* @version $Id$
* @since 2.0
*/
public interface UnivariateMatrixFunction {
/**
* Compute the value for the function.
* @param x the point for which the function value should be computed
* @return the value
*/
double[][] value(double x);
}
|
[
"nolleryc@gmail.com"
] |
nolleryc@gmail.com
|
e3312fd5b5defebd67a99543c9c3e923af667f26
|
6252c165657baa6aa605337ebc38dd44b3f694e2
|
/org.eclipse.epsilon.egl.sync/Scalability-Tests/boiler-To-Generate-1000-Files/boiler-To-Generate-1000-Files/syncregions-1000Files/BoilerActuator4829.java
|
c186cacf58c9621ed9b61229b5c040fc1ff516e1
|
[] |
no_license
|
soha500/EglSync
|
00fc49bcc73f7f7f7fb7641d0561ca2b9a8ea638
|
55101bc781349bb14fefc178bf3486e2b778aed6
|
refs/heads/master
| 2021-06-23T02:55:13.464889
| 2020-12-11T19:10:01
| 2020-12-11T19:10:01
| 139,832,721
| 0
| 1
| null | 2019-05-31T11:34:02
| 2018-07-05T10:20:00
|
Java
|
UTF-8
|
Java
| false
| false
| 267
|
java
|
package syncregions;
public class BoilerActuator4829 {
public int execute(int temperatureDifference4829, boolean boilerStatus4829) {
//sync _bfpnGUbFEeqXnfGWlV4829, behaviour
Half Change - return temperature - targetTemperature;
//endSync
}
}
|
[
"sultanalmutairi@172.20.10.2"
] |
sultanalmutairi@172.20.10.2
|
35022b0afce3183cc3cc1ffac6efc039db058b91
|
ecce6f70285a1a50da00835b8ceaf6e0651ecfa8
|
/Atlas/competitive-objectives/src/main/java/net/avicus/atlas/sets/competitve/objectives/listeners/SoundListener.java
|
b34b7272e399b8433aabf16d5aebf84d5ab232e1
|
[
"MIT"
] |
permissive
|
Avicus/AvicusNetwork
|
d59b69f5ee726c54edf73fb89149cd3624a4e0cd
|
26c2320788807b2452f69d6f5b167a2fbb2df698
|
refs/heads/master
| 2022-06-14T22:55:45.083832
| 2022-01-23T06:21:43
| 2022-01-23T06:21:43
| 119,120,459
| 25
| 20
|
MIT
| 2022-05-20T20:53:20
| 2018-01-27T01:10:39
|
Java
|
UTF-8
|
Java
| false
| false
| 1,458
|
java
|
package net.avicus.atlas.sets.competitve.objectives.listeners;
import net.avicus.atlas.component.visual.SoundComponent;
import net.avicus.atlas.sets.competitve.objectives.destroyable.leakable.event.LeakableLeakEvent;
import net.avicus.atlas.sets.competitve.objectives.destroyable.monument.event.MonumentDestroyEvent;
import net.avicus.atlas.sets.competitve.objectives.flag.events.FlagCaptureEvent;
import net.avicus.atlas.sets.competitve.objectives.hill.event.HillCaptureEvent;
import net.avicus.atlas.sets.competitve.objectives.wool.event.WoolPlaceEvent;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
public class SoundListener implements Listener {
private final SoundComponent soundComponent;
public SoundListener(SoundComponent soundComponent) {
this.soundComponent = soundComponent;
}
@EventHandler
public void leakableLeak(final LeakableLeakEvent event) {
this.soundComponent.objectiveComplete();
}
@EventHandler
public void monumentDestroy(final MonumentDestroyEvent event) {
this.soundComponent.objectiveComplete();
}
@EventHandler
public void flagCapture(final FlagCaptureEvent event) {
this.soundComponent.objectiveComplete();
}
@EventHandler
public void hillCapture(final HillCaptureEvent event) {
this.soundComponent.objectiveComplete();
}
@EventHandler
public void woolPlace(final WoolPlaceEvent event) {
this.soundComponent.objectiveComplete();
}
}
|
[
"keenan@keenant.com"
] |
keenan@keenant.com
|
5bfa3845438dc859109223bc295d573382b650cd
|
479ed5dfe8fa7941097c7b3f2911919a8c8d1509
|
/general/src/main/java/com/pageBuild/EntityUpdatePage.java
|
4a8bd3d318b0457c7d89691e60080921d40d97fb
|
[] |
no_license
|
3332932/work
|
40425ba727410e1f632aa5d1b0b1100ef639e4df
|
068de2779d4134b9ba2d1779c14d387d56b815c2
|
refs/heads/master
| 2020-03-19T10:54:02.621815
| 2019-08-05T03:05:51
| 2019-08-05T03:05:51
| 99,878,216
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,213
|
java
|
package com.pageBuild;
import com.Helper;
import com.Properties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.sql.rowset.CachedRowSet;
import java.sql.SQLException;
@Component
public class EntityUpdatePage {
@Autowired
private Properties properties;
public void getService(String tableName, CachedRowSet resultSetColumn, String primaryKey) throws SQLException {
String entityObj = Helper.getFormatString(tableName, false);
String entity = Helper.getFormatString(tableName, true);
StringBuffer entityName= new StringBuffer();
while(resultSetColumn.next()) {
String columnName1 = resultSetColumn.getString("COLUMN_NAME");
;
if (columnName1.equals(Helper.getFormatString(primaryKey,false)) ){
continue;
}
columnName1 = Helper.getFormatString(columnName1, false);
entityName.append(" <li><span>"+columnName1+":</span>\n" +
" <input type=\"text\" name=\""+columnName1+"\" id=\""+columnName1+"\" value=\"${item."+columnName1+"}\"/>\n" +
" </li>\n");
}
StringBuffer sb= new StringBuffer();
sb.append("<%@ page language=\"java\" contentType=\"text/html; charset=UTF-8\"\n" +
" pageEncoding=\"UTF-8\" %>\n" +
"<%@include file=\"../layout/tablib.jsp\" %>\n" +
"<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n" +
"<html>\n" +
"<head>\n" +
" <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n" +
" <title>Insert title here</title>\n" +
" <script type=\"text/javascript\">\n" +
" </script>\n" +
"\n" +
"</head>\n" +
"<body>\n" +
"<section class=\"content\" style=\"border:none;\">\n" +
" <form action=\"${ctx}/rest/"+entityObj+"/update\" method=\"post\" id=\"dataForm\">\n" +
" <ul class=\"userinfo row\">\n" +
" <input type=\"hidden\" name=\"id\" id=\"id\" value=\"${item.id}\">\n");
sb.append(entityName);
sb.append(
" <li>\n" +
" <span></span>\n" +
" <a target=\"contentF\" class=\"public_btn bg2\" id=\"save\" onclick=\"updateData()\">更新</a>\n" +
" <a style=\"margin-left: 20px\" class=\"public_btn bg3\" id=\"cancel\" onclick=\"closeWin();\">取消</a>\n" +
" </li>\n" +
" </ul>\n" +
"\n" +
" </form>\n" +
"</section>\n" +
"\n" +
"<script type=\"text/javascript\">\n" +
" //保存数据\n" +
" function updateData() {\n" +
" var data = $(\"#dataForm\").serialize();\n" +
" debugger;\n" +
" $.ajax({\n" +
" type: \"post\",\n" +
" url: \"${ctx}/rest/"+entityObj+"/update\",\n" +
" async: false, // 此处必须同步\n" +
" dataType: \"json\",\n" +
" data: data,\n" +
" success: function (data) {\n" +
" if (data.state == 0) {\n" +
" layer.msg(\"保存成功!!!\", {icon: 1});\n" +
" $('#save').removeAttr(\"onclick\");\n" +
" setTimeout(function () {\n" +
" parent.location.reload();\n" +
" }, 1000);\n" +
"\n" +
" } else {\n" +
" layer.msg(\"保存失败!\", {icon: 2});\n" +
" }\n" +
" },\n" +
" error: function () {\n" +
" layer.msg(\"保存失败!\", {icon: 2});\n" +
" }\n" +
" });\n" +
" }\n" +
"\n" +
" //取消\n" +
" function closeWin() {\n" +
" var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引\n" +
" parent.layer.close(index);\n" +
" }\n" +
"</script>\n" +
"</body>\n" +
"</html>");
Helper.outputToFile(Helper.getFilePath(properties.getPageRoot(),properties.getPagePackageName())+"/"+entityObj,"update"+entity+".jsp", sb.toString());
}
}
|
[
"admin@example.com"
] |
admin@example.com
|
e09c3568a584aa788adcb579f5550c356f81fece
|
7dbbe21b902fe362701d53714a6a736d86c451d7
|
/BzenStudio-5.6/Source/com/zend/ide/cb/h.java
|
3a10ec1021a5ee5f12f9a5d1590a8acf07885f92
|
[] |
no_license
|
HS-matty/dev
|
51a53b4fd03ae01981549149433d5091462c65d0
|
576499588e47e01967f0c69cbac238065062da9b
|
refs/heads/master
| 2022-05-05T18:32:24.148716
| 2022-03-20T16:55:28
| 2022-03-20T16:55:28
| 196,147,486
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 442
|
java
|
package com.zend.ide.cb;
import java.sql.ResultSet;
import java.sql.SQLException;
public abstract interface h extends g
{
public abstract v a();
public abstract boolean b();
public abstract void a(boolean paramBoolean);
public abstract ResultSet c()
throws SQLException;
}
/* Location: C:\Program Files\Zend\ZendStudio-5.5.1\bin\ZendIDE.jar
* Qualified Name: com.zend.ide.cb.h
* JD-Core Version: 0.6.0
*/
|
[
"byqdes@gmail.com"
] |
byqdes@gmail.com
|
efece257a828606f195d1ab59b19a4276b929d1c
|
4c9267852167e427130f19b89e21adb478a8c82c
|
/IntelliJ-Core/src/main/java/com/intellij/patterns/PatternCondition.java
|
77fc2150586a51287c8fb3f1e0425a6c1bd9ea28
|
[] |
no_license
|
EmmyLua/EmmyLua-LanguageServer
|
25e7a9e5cddb9d7794eb8e82b68be9277147701c
|
3d2222b6607ba688d0321903b65cd1c894a77ce0
|
refs/heads/master
| 2023-07-07T01:22:59.500791
| 2023-07-04T03:07:52
| 2023-07-04T03:07:52
| 126,278,783
| 153
| 44
| null | 2023-07-04T03:07:54
| 2018-03-22T04:19:30
|
Java
|
UTF-8
|
Java
| false
| false
| 4,623
|
java
|
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
* 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.intellij.patterns;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.util.PairProcessor;
import com.intellij.util.ProcessingContext;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.Collection;
/**
* @author peter
*/
public abstract class PatternCondition<T> {
private static final Logger LOG = Logger.getInstance("#com.intellij.patterns.PatternCondition");
@NonNls
private static final String PARAMETER_FIELD_PREFIX = "val$";
private final String myDebugMethodName;
public PatternCondition(@Nullable @NonNls String debugMethodName) {
myDebugMethodName = debugMethodName;
}
public String getDebugMethodName() {
return myDebugMethodName;
}
private static void appendValue(final StringBuilder builder, final String indent, final Object obj) {
if (obj instanceof ElementPattern) {
((ElementPattern)obj).getCondition().append(builder, indent + " ");
} else if (obj instanceof Object[]) {
appendArray(builder, indent, (Object[])obj);
} else if (obj instanceof Collection) {
appendArray(builder, indent, ((Collection) obj).toArray());
}
else if (obj instanceof String) {
builder.append('\"').append(obj).append('\"');
}
else {
builder.append(obj);
}
}
protected static void appendArray(final StringBuilder builder, final String indent, final Object[] objects) {
builder.append("[");
boolean first = true;
for (final Object o : objects) {
if (!first) {
builder.append(", ");
}
first = false;
appendValue(builder, indent, o);
}
builder.append("]");
}
public abstract boolean accepts(@NotNull T t, final ProcessingContext context);
@NonNls
public String toString() {
final StringBuilder builder = new StringBuilder();
append(builder, "");
return builder.toString();
}
public void append(StringBuilder builder, String indent) {
builder.append(myDebugMethodName);
builder.append("(");
appendParams(builder, indent);
builder.append(")");
}
private void appendParams(final StringBuilder builder, final String indent) {
processParameters(new PairProcessor<String, Object>() {
int count;
String prevName;
int prevOffset;
@Override
public boolean process(String name, Object value) {
count ++;
if (count == 2) builder.insert(prevOffset, prevName +"=");
if (count > 1) builder.append(", ");
prevOffset = builder.length();
if (count > 1) builder.append(name).append("=");
appendValue(builder, indent, value);
prevName = name;
return true;
}
});
}
// this code eats CPU, for debug purposes ONLY
public boolean processParameters(final PairProcessor<String, Object> processor) {
for (Class aClass = getClass(); aClass != null; aClass = aClass.getSuperclass()) {
for (final Field field : aClass.getDeclaredFields()) {
if (!Modifier.isStatic(field.getModifiers()) &&
(!field.isSynthetic() && !aClass.equals(PatternCondition.class)
|| field.getName().startsWith(PARAMETER_FIELD_PREFIX))) {
final String name = field.getName();
final String fixedName = name.startsWith(PARAMETER_FIELD_PREFIX) ?
name.substring(PARAMETER_FIELD_PREFIX.length()) : name;
final Object value = getFieldValue(field);
if (!processor.process(fixedName, value)) return false;
}
}
}
return true;
}
private Object getFieldValue(Field field) {
final boolean accessible = field.isAccessible();
try {
field.setAccessible(true);
return field.get(this);
}
catch (IllegalAccessException e) {
LOG.error(e);
}
finally {
field.setAccessible(accessible);
}
return null;
}
}
|
[
"272669294@qq.com"
] |
272669294@qq.com
|
ecf5a4344aef5ae8b9dd3893bae58ba52d3b42eb
|
816e53ced1f741006ed5dd568365aba0ec03f0cf
|
/TeamBattle/temp/src/minecraft/net/minecraft/network/play/server/S06PacketUpdateHealth.java
|
db9bedc5e82eff7b3e98b0cd6d2555ff1797c7ba
|
[] |
no_license
|
TeamBattleClient/TeamBattleRemake
|
ad4eb8379ebc673ef1e58d0f2c1a34e900bd85fe
|
859afd1ff2cd7527abedfbfe0b3d1dae09d5cbbc
|
refs/heads/master
| 2021-03-12T19:41:51.521287
| 2015-03-08T21:34:32
| 2015-03-08T21:34:32
| 31,624,440
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,715
|
java
|
package net.minecraft.network.play.server;
import java.io.IOException;
import net.minecraft.network.INetHandler;
import net.minecraft.network.Packet;
import net.minecraft.network.PacketBuffer;
import net.minecraft.network.play.INetHandlerPlayClient;
public class S06PacketUpdateHealth extends Packet {
private float field_149336_a;
private int field_149334_b;
private float field_149335_c;
private static final String __OBFID = "CL_00001332";
public S06PacketUpdateHealth() {}
public S06PacketUpdateHealth(float p_i45223_1_, int p_i45223_2_, float p_i45223_3_) {
this.field_149336_a = p_i45223_1_;
this.field_149334_b = p_i45223_2_;
this.field_149335_c = p_i45223_3_;
}
public void func_148837_a(PacketBuffer p_148837_1_) throws IOException {
this.field_149336_a = p_148837_1_.readFloat();
this.field_149334_b = p_148837_1_.readShort();
this.field_149335_c = p_148837_1_.readFloat();
}
public void func_148840_b(PacketBuffer p_148840_1_) throws IOException {
p_148840_1_.writeFloat(this.field_149336_a);
p_148840_1_.writeShort(this.field_149334_b);
p_148840_1_.writeFloat(this.field_149335_c);
}
public void func_148833_a(INetHandlerPlayClient p_148833_1_) {
p_148833_1_.func_147249_a(this);
}
public float func_149332_c() {
return this.field_149336_a;
}
public int func_149330_d() {
return this.field_149334_b;
}
public float func_149331_e() {
return this.field_149335_c;
}
// $FF: synthetic method
// $FF: bridge method
public void func_148833_a(INetHandler p_148833_1_) {
this.func_148833_a((INetHandlerPlayClient)p_148833_1_);
}
}
|
[
"honzajurak@hotmail.co.uk"
] |
honzajurak@hotmail.co.uk
|
dc37b78262efc159253fcabb4d7df11b405e6193
|
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
|
/java/neo4j/2015/8/ConsistencyCheckTool.java
|
09da6e5c4032f9c8dcbab6b5f798b3d8c353c631
|
[] |
no_license
|
rosoareslv/SED99
|
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
|
a062c118f12b93172e31e8ca115ce3f871b64461
|
refs/heads/main
| 2023-02-22T21:59:02.703005
| 2021-01-28T19:40:51
| 2021-01-28T19:40:51
| 306,497,459
| 1
| 1
| null | 2020-11-24T20:56:18
| 2020-10-23T01:18:07
| null |
UTF-8
|
Java
| false
| false
| 8,152
|
java
|
/*
* Copyright (c) 2002-2015 "Neo Technology,"
* Network Engine for Objects in Lund AB [http://neotechnology.com]
*
* This file is part of Neo4j.
*
* Neo4j 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.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.consistency;
import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
import java.util.List;
import java.util.Map;
import org.neo4j.consistency.checking.full.ConsistencyCheckIncompleteException;
import org.neo4j.graphdb.factory.GraphDatabaseFactory;
import org.neo4j.graphdb.factory.GraphDatabaseSettings;
import org.neo4j.helpers.Args;
import org.neo4j.helpers.collection.MapUtil;
import org.neo4j.helpers.progress.ProgressMonitorFactory;
import org.neo4j.io.fs.DefaultFileSystemAbstraction;
import org.neo4j.io.fs.FileSystemAbstraction;
import org.neo4j.io.pagecache.PageCache;
import org.neo4j.kernel.configuration.Config;
import org.neo4j.kernel.impl.pagecache.StandalonePageCacheFactory;
import org.neo4j.kernel.impl.recovery.RecoveryRequiredChecker;
import org.neo4j.logging.FormattedLogProvider;
import org.neo4j.logging.LogProvider;
import static org.neo4j.helpers.collection.MapUtil.stringMap;
public class ConsistencyCheckTool
{
private static final String RECOVERY = "recovery";
private static final String CONFIG = "config";
private static final String PROP_OWNER = "propowner";
interface ExitHandle
{
ExitHandle SYSTEM_EXIT = new ExitHandle()
{
@Override
public void pull()
{
System.exit( 1 );
}
};
void pull();
}
public static void main( String[] args ) throws IOException
{
ConsistencyCheckTool tool = new ConsistencyCheckTool( new ConsistencyCheckService(), new GraphDatabaseFactory(),
new DefaultFileSystemAbstraction(), System.err, ExitHandle.SYSTEM_EXIT );
try
{
tool.run( args );
}
catch ( ToolFailureException e )
{
e.exitTool();
}
}
private final ConsistencyCheckService consistencyCheckService;
private final GraphDatabaseFactory dbFactory;
private final PrintStream systemError;
private final ExitHandle exitHandle;
private FileSystemAbstraction fs;
ConsistencyCheckTool( ConsistencyCheckService consistencyCheckService,
GraphDatabaseFactory dbFactory, FileSystemAbstraction fs, PrintStream systemError, ExitHandle exitHandle )
{
this.consistencyCheckService = consistencyCheckService;
this.dbFactory = dbFactory;
this.fs = fs;
this.systemError = systemError;
this.exitHandle = exitHandle;
}
void run( String... args ) throws ToolFailureException, IOException
{
Args arguments = Args.withFlags( RECOVERY, PROP_OWNER ).parse( args );
File storeDir = determineStoreDirectory( arguments );
Config tuningConfiguration = readTuningConfiguration( arguments );
attemptRecoveryOrCheckStateOfLogicalLogs( arguments, storeDir, tuningConfiguration );
LogProvider logProvider = FormattedLogProvider.toOutputStream( System.out );
try
{
consistencyCheckService.runFullConsistencyCheck( storeDir, tuningConfiguration,
ProgressMonitorFactory.textual( System.err ), logProvider );
}
catch ( ConsistencyCheckIncompleteException e )
{
throw new ToolFailureException( "Check aborted due to exception", e );
}
}
private void attemptRecoveryOrCheckStateOfLogicalLogs( Args arguments, File storeDir, Config tuningConfiguration )
{
if ( arguments.getBoolean( RECOVERY, false, true ) )
{
dbFactory.newEmbeddedDatabase( storeDir ).shutdown();
}
else
{
try ( PageCache pageCache = StandalonePageCacheFactory.createPageCache( fs, tuningConfiguration ) )
{
if ( new RecoveryRequiredChecker( fs, pageCache ).isRecoveryRequiredAt( storeDir ) )
{
systemError.print( lines(
"Active logical log detected, this might be a source of inconsistencies.",
"Consider allowing the database to recover before running the consistency check.",
"Consistency checking will continue, abort if you wish to perform recovery first.",
"To perform recovery before checking consistency, use the '--recovery' flag." ) );
exitHandle.pull();
}
}
catch ( IOException e )
{
systemError.printf( "Failure when checking for recovery state: '%s', continuing as normal.%n", e );
}
}
}
private File determineStoreDirectory( Args arguments ) throws ToolFailureException
{
List<String> unprefixedArguments = arguments.orphans();
if ( unprefixedArguments.size() != 1 )
{
throw new ToolFailureException( usage() );
}
File storeDir = new File( unprefixedArguments.get( 0 ) );
if ( !storeDir.isDirectory() )
{
throw new ToolFailureException( lines( String.format( "'%s' is not a directory", storeDir ) ) + usage() );
}
return storeDir;
}
private Config readTuningConfiguration( Args arguments ) throws ToolFailureException
{
Map<String,String> specifiedProperties = stringMap();
String propertyFilePath = arguments.get( CONFIG, null );
if ( propertyFilePath != null )
{
File propertyFile = new File( propertyFilePath );
try
{
specifiedProperties = MapUtil.load( propertyFile );
}
catch ( IOException e )
{
throw new ToolFailureException( String.format( "Could not read configuration properties file [%s]",
propertyFilePath ), e );
}
}
return new Config( specifiedProperties, GraphDatabaseSettings.class, ConsistencyCheckSettings.class );
}
private String usage()
{
return lines(
Args.jarUsage( getClass(), "[-propowner] [-recovery] [-config <neo4j.properties>] <storedir>" ),
"WHERE: <storedir> is the path to the store to check",
" -recovery to perform recovery on the store before checking",
" <neo4j.properties> is the location of an optional properties file",
" containing tuning parameters for the consistency check"
);
}
private static String lines( String... content )
{
StringBuilder result = new StringBuilder();
for ( String line : content )
{
result.append( line ).append( System.getProperty( "line.separator" ) );
}
return result.toString();
}
class ToolFailureException extends Exception
{
ToolFailureException( String message )
{
super( message );
}
ToolFailureException( String message, Throwable cause )
{
super( message, cause );
}
void exitTool()
{
System.err.println( getMessage() );
if ( getCause() != null )
{
getCause().printStackTrace( System.err );
}
exitHandle.pull();
}
}
}
|
[
"rodrigosoaresilva@gmail.com"
] |
rodrigosoaresilva@gmail.com
|
447b2e9430d7fa39ef9b9424d2c7b6274013b987
|
183274046d06dac00d523de62698815269cd9114
|
/app/src/main/java/com/maxlife/data/GalleryData.java
|
4d2373d6a14204dbbfb8de82dff23628b15ed87b
|
[] |
no_license
|
devrath123/Maxlife
|
69db7173b9d38b16c12da27ce49f242bb4a3113f
|
219d1d13a9f8952908ee57e7e5388885716d9df6
|
refs/heads/master
| 2020-04-06T11:24:18.427872
| 2018-11-13T17:08:10
| 2018-11-13T17:17:18
| 157,415,428
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,266
|
java
|
package com.maxlife.data;
import android.os.Parcel;
import android.os.Parcelable;
/**
* Created by anshul.mittal on 8/6/16.
*/
public class GalleryData implements Parcelable {
public ImageGalleryData imageData;
public VideoGalleryData videoData;
public boolean isImage;
public long date_added;
public GalleryData(Parcel in) {
imageData = in.readParcelable(ImageGalleryData.class.getClassLoader());
videoData = in.readParcelable(VideoGalleryData.class.getClassLoader());
isImage = in.readByte() != 0;
date_added = in.readLong();
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeParcelable(imageData, flags);
dest.writeParcelable(videoData, flags);
dest.writeByte((byte) (isImage ? 1 : 0));
dest.writeLong(date_added);
}
@Override
public int describeContents() {
return 0;
}
public static final Creator<GalleryData> CREATOR = new Creator<GalleryData>() {
@Override
public GalleryData createFromParcel(Parcel in) {
return new GalleryData(in);
}
@Override
public GalleryData[] newArray(int size) {
return new GalleryData[size];
}
};
}
|
[
"dev.rathee2010@gmail.com"
] |
dev.rathee2010@gmail.com
|
c00cefe1a93f99db673692017a165f24bcce6db3
|
0e0b9c6ab7c09ad92af642a779a98c28238d6d97
|
/src/com/junpenghe/java/basic/object/inheritance/Shape.java
|
ca48010521677f8b392bb5dafb499f71dee451c6
|
[] |
no_license
|
Junpengalaitp/java-learning-note
|
0d141ba11f04d1bc27222fb91a621e1fd3514f3b
|
218271f06707f0abeba302c1f0979ec27c874ec4
|
refs/heads/master
| 2023-04-08T05:25:43.384366
| 2021-04-26T09:39:11
| 2021-04-26T09:39:11
| 305,915,215
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 642
|
java
|
package com.junpenghe.java.basic.object.inheritance;
public class Shape {
public static String shapeString = "shapeString";
private String color = "shapeColor";
public void draw() {
System.out.println("parent draw " + this.getClass().getSimpleName());
}
public void erase() {
System.out.println("parent erase " + this.getClass().getSimpleName());
}
public void move() {
System.out.println("parent move " + this.getClass().getSimpleName());
}
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
}
|
[
"hejunpeng2012@hotmail.com"
] |
hejunpeng2012@hotmail.com
|
f20f7399440a247aa4ffd98aacd0a316c1f0fb35
|
ba37ea2565d2b3fc7041039ef99ad865849c99b2
|
/sql-processor-hibernate/src/main/java/org/sqlproc/engine/hibernate/type/HibernateTimestampType.java
|
6e434beb570007a598af129a715d01525cdca9cf
|
[] |
no_license
|
optimuse/sql-processor
|
4c63bb2a93c39092d0a5ba0b7e0176b702b0c7f7
|
154db7fb269f73993c8ff4b664c3bbeb3a8cda51
|
refs/heads/master
| 2021-01-22T01:51:17.351289
| 2016-06-23T13:11:58
| 2016-06-23T13:11:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 602
|
java
|
package org.sqlproc.engine.hibernate.type;
import org.hibernate.type.TimestampType;
import org.sqlproc.engine.type.SqlTimestampType;
/**
* The Hibernate META type TIMESTAMP.
*
* @author <a href="mailto:Vladimir.Hudec@gmail.com">Vladimir Hudec</a>
*/
public class HibernateTimestampType extends SqlTimestampType {
/**
* {@inheritDoc}
*/
@Override
public Object getProviderSqlType() {
return TimestampType.INSTANCE;
}
/**
* {@inheritDoc}
*/
@Override
public Object getProviderSqlNullType() {
return TimestampType.INSTANCE;
}
}
|
[
"Vladimir.Hudec@gmail.com"
] |
Vladimir.Hudec@gmail.com
|
38a1e31f0e5ab9b1886d7458d9db551aa56c5c94
|
6ef4869c6bc2ce2e77b422242e347819f6a5f665
|
/devices/google/Pixel 2/29/QPP6.190730.005/src/framework/android/hardware/camera2/params/BlackLevelPattern.java
|
164fa8676d0840b08314befaf74073627cda3064
|
[] |
no_license
|
hacking-android/frameworks
|
40e40396bb2edacccabf8a920fa5722b021fb060
|
943f0b4d46f72532a419fb6171e40d1c93984c8e
|
refs/heads/master
| 2020-07-03T19:32:28.876703
| 2019-08-13T03:31:06
| 2019-08-13T03:31:06
| 202,017,534
| 2
| 0
| null | 2019-08-13T03:33:19
| 2019-08-12T22:19:30
|
Java
|
UTF-8
|
Java
| false
| false
| 2,062
|
java
|
/*
* Decompiled with CFR 0.145.
*/
package android.hardware.camera2.params;
import com.android.internal.util.Preconditions;
import java.util.Arrays;
public final class BlackLevelPattern {
public static final int COUNT = 4;
private final int[] mCfaOffsets;
public BlackLevelPattern(int[] arrn) {
if (arrn != null) {
if (arrn.length >= 4) {
this.mCfaOffsets = Arrays.copyOf(arrn, 4);
return;
}
throw new IllegalArgumentException("Invalid offsets array length");
}
throw new NullPointerException("Null offsets array passed to constructor");
}
public void copyTo(int[] arrn, int n) {
Preconditions.checkNotNull(arrn, "destination must not be null");
if (n >= 0) {
if (arrn.length - n >= 4) {
for (int i = 0; i < 4; ++i) {
arrn[n + i] = this.mCfaOffsets[i];
}
return;
}
throw new ArrayIndexOutOfBoundsException("destination too small to fit elements");
}
throw new IllegalArgumentException("Null offset passed to copyTo");
}
public boolean equals(Object object) {
if (object == null) {
return false;
}
if (this == object) {
return true;
}
if (object instanceof BlackLevelPattern) {
return Arrays.equals(((BlackLevelPattern)object).mCfaOffsets, this.mCfaOffsets);
}
return false;
}
public int getOffsetForIndex(int n, int n2) {
if (n2 >= 0 && n >= 0) {
return this.mCfaOffsets[(n2 & 1) << 1 | n & 1];
}
throw new IllegalArgumentException("column, row arguments must be positive");
}
public int hashCode() {
return Arrays.hashCode(this.mCfaOffsets);
}
public String toString() {
return String.format("BlackLevelPattern([%d, %d], [%d, %d])", this.mCfaOffsets[0], this.mCfaOffsets[1], this.mCfaOffsets[2], this.mCfaOffsets[3]);
}
}
|
[
"me@paulo.costa.nom.br"
] |
me@paulo.costa.nom.br
|
8a5a970402548a5ad6f0c355b8a77f6df27bbd6c
|
b2719a28a1b43461218dc9fc86c77145444429d4
|
/src/main/java/com/ldbc/socialnet/workload/Domain.java
|
655ee9ce29655c810bb07e9fc9614146c29e041c
|
[] |
no_license
|
alainkaegi/ldbc_socialnet_bm_neo4j
|
d1580dca89c5037402bfd92d672a3b8dcbeaaaa0
|
d75addf4faef7018fbe00419acaaa837eb7fc4fc
|
refs/heads/master
| 2020-05-21T10:12:59.469977
| 2013-10-15T21:27:28
| 2013-10-15T21:27:28
| 54,839,322
| 0
| 0
| null | 2016-03-27T17:11:15
| 2016-03-27T17:11:15
| null |
UTF-8
|
Java
| false
| false
| 4,862
|
java
|
package com.ldbc.socialnet.workload;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.neo4j.graphdb.Label;
import org.neo4j.graphdb.RelationshipType;
import com.ldbc.driver.util.Pair;
public class Domain
{
public static Iterable<Pair<Label, String>> labelPropertyPairsToIndex()
{
List<Pair<Label, String>> labelPropertyPairsToIndex = new ArrayList<Pair<Label, String>>();
labelPropertyPairsToIndex.add( new Pair<Label, String>( Node.TAG, Tag.NAME ) );
labelPropertyPairsToIndex.add( new Pair<Label, String>( Node.PERSON, Person.ID ) );
labelPropertyPairsToIndex.add( new Pair<Label, String>( Node.PERSON, Person.FIRST_NAME ) );
labelPropertyPairsToIndex.add( new Pair<Label, String>( Node.PERSON, Person.LAST_NAME ) );
labelPropertyPairsToIndex.add( new Pair<Label, String>( Node.PLACE, Place.NAME ) );
labelPropertyPairsToIndex.add( new Pair<Label, String>( Place.Type.CITY, Place.NAME ) );
labelPropertyPairsToIndex.add( new Pair<Label, String>( Place.Type.COUNTRY, Place.NAME ) );
return labelPropertyPairsToIndex;
}
public static Set<Label> labelsToIndex()
{
Set<Label> labelsToIndex = new HashSet<Label>();
for ( Pair<Label, String> labelPropertyPair : labelPropertyPairsToIndex() )
{
labelsToIndex.add( labelPropertyPair._1() );
}
return labelsToIndex;
}
public enum Rel implements RelationshipType
{
STUDY_AT,
REPLY_OF,
IS_LOCATED_IN,
IS_PART_OF,
KNOWS,
HAS_MODERATOR,
HAS_CREATOR,
WORKS_AT,
HAS_INTEREST,
HAS_EMAIL_ADDRESS,
ANNOTATED_WITH,
LIKES,
HAS_MEMBER,
CONTAINER_OF,
HAS_TAG,
HAS_TYPE,
IS_SUBCLASS_OF
}
public enum Node implements Label
{
COMMENT,
POST,
PERSON,
FORUM,
TAG,
TAG_CLASS,
ORGANISATION,
LANGUAGE,
PLACE,
EMAIL_ADDRESS
}
/*
* Nodes
*/
public static class Comment
{
public static final String CREATION_DATE = "creationDate";
public static final String LOCATION_IP = "locationIP";
public static final String BROWSER_USED = "browserUsed";
public static final String CONTENT = "content";
}
public static class Post
{
public static final String IMAGE_FILE = "imageFile";
public static final String CREATION_DATE = "creationDate";
public static final String LOCATION_IP = "locationIP";
public static final String BROWSER_USED = "browserUsed";
public static final String LANGUAGE = "language";
public static final String CONTENT = "content";
}
public static class Person
{
public static final String ID = "id";
public static final String FIRST_NAME = "firstName";
public static final String LAST_NAME = "lastName";
public static final String GENDER = "gender";
public static final String BIRTHDAY = "birthday";
public static final String CREATION_DATE = "creationDate";
public static final String LOCATION_IP = "locationIP";
public static final String BROWSER_USED = "browserUsed";
public static final String LANGUAGES = "language";
public static final String EMAIL_ADDRESSES = "email";
}
public static class Forum
{
public static final String TITLE = "title";
public static final String CREATION_DATE = "creationDate";
}
public static class Tag
{
public static final String NAME = "name";
public static final String URL = "url";
}
public static class TagClass
{
public static final String NAME = "name";
public static final String URL = "url";
}
public static class Organisation
{
public enum Type implements Label
{
UNIVERSITY,
COMPANY
}
public static final String NAME = "name";
}
public static class Place
{
public enum Type implements Label
{
COUNTRY,
CITY,
CONTINENT
}
public static final String NAME = "name";
public static final String URL = "url";
}
/*
* Relationships
*/
public static class StudiesAt
{
public static final String CLASS_YEAR = "classYear";
}
public static class WorksAt
{
public static final String WORK_FROM = "workFrom";
}
public static class Likes
{
public static final String CREATION_DATE = "creationDate";
}
public static class HasMember
{
public static final String JOIN_DATE = "joinDate";
}
}
|
[
"alex.averbuch@gmail.com"
] |
alex.averbuch@gmail.com
|
663d4059208474c29d82d21b97b4a1c0e5566af1
|
db2cd2a4803e546d35d5df2a75b7deb09ffadc01
|
/nemo-novacroft-common/src/main/java/com/novacroft/nemo/common/domain/CommonAddress.java
|
5c1adf077cad37ba9b5c0b001d8f65fbd4894415
|
[] |
no_license
|
balamurugan678/nemo
|
66d0d6f7062e340ca8c559346e163565c2628814
|
1319daafa5dc25409ae1a1872b1ba9b14e5a297e
|
refs/heads/master
| 2021-01-19T17:47:22.002884
| 2015-06-18T12:03:43
| 2015-06-18T12:03:43
| 37,656,983
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,714
|
java
|
package com.novacroft.nemo.common.domain;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;
import org.hibernate.envers.Audited;
/**
* Common address attributes that will be inherited by all implementations.
*/
@Audited
@MappedSuperclass()
public abstract class CommonAddress extends AbstractBaseEntity {
private static final long serialVersionUID = -3866265491093829377L;
protected String houseNameNumber;
protected String street;
protected String town;
protected String county;
protected Country country;
protected String postcode;
public CommonAddress() {
setCreated();
}
public String getHouseNameNumber() {
return houseNameNumber;
}
public void setHouseNameNumber(String houseNameNumber) {
this.houseNameNumber = houseNameNumber;
}
public String getStreet() {
return street;
}
public void setStreet(String street) {
this.street = street;
}
public String getTown() {
return town;
}
public void setTown(String town) {
this.town = town;
}
public String getCounty() {
return county;
}
public void setCounty(String county) {
this.county = county;
}
@ManyToOne
@JoinColumn(name ="COUNTRY_ID")
public Country getCountry() {
return country;
}
public void setCountry(Country country) {
this.country = country;
}
public String getPostcode() {
return postcode;
}
public void setPostcode(String postcode) {
this.postcode = postcode;
}
}
|
[
"balamurugan678@yahoo.co.in"
] |
balamurugan678@yahoo.co.in
|
67c65cd2379e5704b98002f743679d1c5b942665
|
ce988d107f9fcd55b99394f3c5c44968dcf25359
|
/trakt-api/src/main/java/net/simonvt/cathode/api/enumeration/ListItemType.java
|
af081ca54e371ef6aac012a9c5535aaee9031f2a
|
[
"Apache-2.0"
] |
permissive
|
adneal/cathode
|
fabb4a138a02a697ea39aaa21373d00b1a189b67
|
48f9dbd62973dc4680197f73a1f51acf1d2aea69
|
refs/heads/master
| 2021-01-14T13:58:01.291205
| 2014-01-14T18:42:22
| 2014-01-14T18:42:22
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 733
|
java
|
package net.simonvt.cathode.api.enumeration;
import java.util.HashMap;
import java.util.Map;
public enum ListItemType {
Movie("movie"),
TvShow("show"),
TvShowSeason("season"),
TvShowEpisode("episode");
private final String value;
private ListItemType(String value) {
this.value = value;
}
@Override public String toString() {
return value;
}
private static final Map<String, ListItemType> STRING_MAPPING =
new HashMap<String, ListItemType>();
static {
for (ListItemType via : ListItemType.values()) {
STRING_MAPPING.put(via.toString().toUpperCase(), via);
}
}
public static ListItemType fromValue(String value) {
return STRING_MAPPING.get(value.toUpperCase());
}
}
|
[
"simonvt@gmail.com"
] |
simonvt@gmail.com
|
13bffef029c337dfb7f3dd83b2daec49dbd02003
|
3180c5a659d5bfdbf42ab07dfcc64667f738f9b3
|
/src/unk/com/zing/zalo/stickers/ax.java
|
c6e1a52d4f937642f68af004675563e41eed82ff
|
[] |
no_license
|
tinyx3k/ZaloRE
|
4b4118c789310baebaa060fc8aa68131e4786ffb
|
fc8d2f7117a95aea98a68ad8d5009d74e977d107
|
refs/heads/master
| 2023-05-03T16:21:53.296959
| 2013-05-18T14:08:34
| 2013-05-18T14:08:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 791
|
java
|
package unk.com.zing.zalo.stickers;
import android.view.View;
import android.view.View.OnClickListener;
import com.zing.zalo.social.UpdateStatusActivity;
import com.zing.zalo.ui.ChatActivity;
import com.zing.zalo.ui.EmoticonImageView;
class ax
implements View.OnClickListener
{
ax(aw paramaw)
{
}
public void onClick(View paramView)
{
String str = ((EmoticonImageView)paramView).getEmoticon();
if ((aw.a(this.WJ) instanceof ChatActivity))
((ChatActivity)aw.a(this.WJ)).db(str);
while (!(aw.a(this.WJ) instanceof UpdateStatusActivity))
return;
((UpdateStatusActivity)aw.a(this.WJ)).db(str);
}
}
/* Location: /home/danghvu/0day/Zalo/Zalo_1.0.8_dex2jar.jar
* Qualified Name: com.zing.zalo.stickers.ax
* JD-Core Version: 0.6.2
*/
|
[
"danghvu@gmail.com"
] |
danghvu@gmail.com
|
d9e46f067d36500bbd9eb43314e33a156db9e708
|
5b55c12f1e60ea2c0f094bf6e973e9150bbda57f
|
/clouddbservice_device/src/main/java/com/ssitcloud/system/DownDeviceRunConfig.java
|
96fdef7820f52a0fff06c7542bb74d992d768c9d
|
[] |
no_license
|
huguodong/Cloud-4
|
f18a8f471efbb2167e639e407478bf808d1830c2
|
3facaf5fc3d585c938ecc93e89a6a4a7d35e5bcc
|
refs/heads/master
| 2020-03-27T22:59:41.109723
| 2018-08-24T01:42:39
| 2018-08-24T01:43:04
| 147,279,899
| 0
| 0
| null | 2018-09-04T02:54:28
| 2018-09-04T02:54:28
| null |
UTF-8
|
Java
| false
| false
| 3,424
|
java
|
package com.ssitcloud.system;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.springframework.stereotype.Component;
import com.ssitcloud.common.entity.ResultEntity;
import com.ssitcloud.common.util.ExceptionHelper;
import com.ssitcloud.dao.DeviceConfigDao;
import com.ssitcloud.dao.DeviceDao;
import com.ssitcloud.dao.DeviceRunConfDao;
import com.ssitcloud.entity.DeviceConfigEntity;
import com.ssitcloud.entity.DeviceEntity;
import com.ssitcloud.entity.DeviceRunConfigEntity;
import com.ssitcloud.entity.DownloadCfgSyncEntity;
import com.ssitcloud.system.entity.DeviceRunConfigRemoteEntity;
import com.ssitcloud.utils.MBeanUtil;
@Component(value="device_run_config")
public class DownDeviceRunConfig implements TableCommand {
@Resource
private DeviceRunConfDao confDao;
@Resource
private DeviceConfigDao configDao;
@Resource
private DeviceDao deviceDao;
/**
* device_run_config
*
* @methodName: execute
* @param downcfgSync
* @return
* @author: liuBh
* @description: TODO
*/
@Override
public ResultEntity execute(DownloadCfgSyncEntity downcfgSync) {
ResultEntity result=new ResultEntity();
try {
String library_idx=downcfgSync.getLibrary_id();
String device_id=downcfgSync.getDevice_id();
String tableName=downcfgSync.getTable();
downcfgSync.getdBName();
downcfgSync.getKeyName();
//查询模板信息
Map<String, Object> map = new HashMap<>();
map.put("device_id", device_id);
map.put("library_id", library_idx);
List<DeviceConfigEntity> devconfs = configDao.queryDeviceConfigByDevIdAndLibIdx(map);
//one
if(devconfs!=null&&devconfs.size()>0){
DeviceConfigEntity deviceConf=devconfs.get(0);
if(deviceConf!=null){
Integer run_tpl_flg=deviceConf.getDevice_run_tpl_flg();
DeviceRunConfigEntity deviceRunConfig=new DeviceRunConfigEntity();
if(DeviceConfigEntity.IS_MODEL.equals(run_tpl_flg)){
//模板,则获取模板ID
Integer run_tpl_idx=deviceConf.getDevice_run_tpl_idx();
//模板注释掉library_idx
//deviceRunConfig.setLibrary_idx(Integer.parseInt(library_idx));
deviceRunConfig.setDevice_run_id(run_tpl_idx);
deviceRunConfig.setDevice_tpl_type(DeviceRunConfigEntity.DEVICE_TPL_TYPE_IS_MODEL);
List<DeviceRunConfigRemoteEntity> devRunsConfigs=confDao.queryDeviceRunConfigByDown(deviceRunConfig);
if(devRunsConfigs!=null){
result.setResult(MBeanUtil.makeReturnResultEntityFromList(devRunsConfigs,tableName));
result.setState(true);
}
}else if(DeviceConfigEntity.IS_NOT_MODEL.equals(run_tpl_flg)){
//不是模板
String device_idx=deviceDao.selectDeviceIdx(new DeviceEntity(device_id));
deviceRunConfig.setLibrary_idx(Integer.parseInt(library_idx));
deviceRunConfig.setDevice_run_id(Integer.parseInt(device_idx));
deviceRunConfig.setDevice_tpl_type(DeviceRunConfigEntity.DEVICE_TPL_TYPE_IS_DATA);
List<DeviceRunConfigRemoteEntity> devRunsConfigs=confDao.queryDeviceRunConfigByDown(deviceRunConfig);
if(devRunsConfigs!=null){
result.setResult(MBeanUtil.makeReturnResultEntityFromList(devRunsConfigs,tableName));
result.setState(true);
}
}
}
}
} catch (Exception e) {
ExceptionHelper.afterException(result, Thread.currentThread().getStackTrace()[0].getMethodName(), e);
}
return result;
}
}
|
[
"chenkun141@163com"
] |
chenkun141@163com
|
eb19b803c09df6480728ab48cd8cebe94c0ae293
|
4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849
|
/aliyun-java-sdk-dms-enterprise/src/main/java/com/aliyuncs/dms_enterprise/transform/v20181101/ListDataImportSQLTypeResponseUnmarshaller.java
|
8534bfee6d87abce8e6878338dc671761a42d0a9
|
[
"Apache-2.0"
] |
permissive
|
aliyun/aliyun-openapi-java-sdk
|
a263fa08e261f12d45586d1b3ad8a6609bba0e91
|
e19239808ad2298d32dda77db29a6d809e4f7add
|
refs/heads/master
| 2023-09-03T12:28:09.765286
| 2023-09-01T09:03:00
| 2023-09-01T09:03:00
| 39,555,898
| 1,542
| 1,317
|
NOASSERTION
| 2023-09-14T07:27:05
| 2015-07-23T08:41:13
|
Java
|
UTF-8
|
Java
| false
| false
| 1,826
|
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.dms_enterprise.transform.v20181101;
import java.util.ArrayList;
import java.util.List;
import com.aliyuncs.dms_enterprise.model.v20181101.ListDataImportSQLTypeResponse;
import com.aliyuncs.transform.UnmarshallerContext;
public class ListDataImportSQLTypeResponseUnmarshaller {
public static ListDataImportSQLTypeResponse unmarshall(ListDataImportSQLTypeResponse listDataImportSQLTypeResponse, UnmarshallerContext _ctx) {
listDataImportSQLTypeResponse.setRequestId(_ctx.stringValue("ListDataImportSQLTypeResponse.RequestId"));
listDataImportSQLTypeResponse.setSuccess(_ctx.booleanValue("ListDataImportSQLTypeResponse.Success"));
listDataImportSQLTypeResponse.setErrorMessage(_ctx.stringValue("ListDataImportSQLTypeResponse.ErrorMessage"));
listDataImportSQLTypeResponse.setErrorCode(_ctx.stringValue("ListDataImportSQLTypeResponse.ErrorCode"));
List<String> sqlTypeResult = new ArrayList<String>();
for (int i = 0; i < _ctx.lengthValue("ListDataImportSQLTypeResponse.SqlTypeResult.Length"); i++) {
sqlTypeResult.add(_ctx.stringValue("ListDataImportSQLTypeResponse.SqlTypeResult["+ i +"]"));
}
listDataImportSQLTypeResponse.setSqlTypeResult(sqlTypeResult);
return listDataImportSQLTypeResponse;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
516f4e04e65c9e5d8a42a25128b497635106156e
|
7df83744484caddfcb81a12f7e102b0e664851ae
|
/rio-resolver/resolver-aether/src/main/java/org/rioproject/resolver/aether/util/ConsoleRepositoryListener.java
|
0fb775690bb166e8ed2031faa85adb488e60584a
|
[
"Apache-2.0"
] |
permissive
|
dreedyman/Rio
|
e3f2c5dfcd5bd59f8cff435611494abd27ac8cba
|
0872068d3a955f4cfc5687f241b72a7ebbdf70cb
|
refs/heads/master
| 2022-05-03T22:13:22.385969
| 2022-03-10T22:13:34
| 2022-03-10T22:13:34
| 1,068,402
| 15
| 15
|
Apache-2.0
| 2021-01-27T15:43:40
| 2010-11-10T14:26:52
|
Java
|
UTF-8
|
Java
| false
| false
| 4,319
|
java
|
/*
* Copyright to 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.rioproject.resolver.aether.util;
import org.eclipse.aether.AbstractRepositoryListener;
import org.eclipse.aether.RepositoryEvent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.PrintStream;
/**
* A simplistic repository listener that logs events to the console.
*/
public class ConsoleRepositoryListener extends AbstractRepositoryListener {
private final PrintStream out;
private final static Logger logger = LoggerFactory.getLogger(ConsoleRepositoryListener.class.getName());
public ConsoleRepositoryListener() {
this(null);
}
public ConsoleRepositoryListener(PrintStream out) {
this.out = (out != null) ? out : System.err;
}
public void artifactDeployed(RepositoryEvent event) {
logger.info("Deployed " + event.getArtifact() + " to " + event.getRepository());
}
public void artifactDeploying(RepositoryEvent event) {
//out.println("Deploying " + event.getArtifact() + " to " + event.getRepository());
}
public void artifactDescriptorInvalid(RepositoryEvent event) {
logger.info("Invalid artifact descriptor for " + event.getArtifact() + ": "
+ event.getException().getMessage());
}
public void artifactDescriptorMissing(RepositoryEvent event) {
logger.info("Missing artifact descriptor for " + event.getArtifact());
}
public void artifactInstalled(RepositoryEvent event) {
out.println("Installed " + event.getArtifact() + " to " + event.getFile());
}
public void artifactInstalling(RepositoryEvent event) {
//out.println("Installing " + event.getArtifact() + " to " + event.getFile());
}
public void artifactResolved(RepositoryEvent event) {
if(logger.isDebugEnabled())
logger.debug("Resolved artifact " + event.getArtifact() + " from " + event.getRepository());
}
public void artifactDownloading(RepositoryEvent event) {
if(logger.isTraceEnabled())
logger.trace("Downloading artifact " + event.getArtifact() + " from " + event.getRepository());
}
public void artifactDownloaded(RepositoryEvent event) {
if(logger.isTraceEnabled())
logger.trace("Downloaded artifact " + event.getArtifact() + " from " + event.getRepository());
}
public void artifactResolving(RepositoryEvent event) {
if(logger.isTraceEnabled())
logger.trace("Resolving artifact " + event.getArtifact());
}
public void metadataDeployed(RepositoryEvent event) {
logger.info("Deployed " + event.getMetadata() + " to " + event.getRepository());
}
public void metadataDeploying(RepositoryEvent event) {
//out.println("Deploying " + event.getMetadata() + " to " + event.getRepository());
}
public void metadataInstalled(RepositoryEvent event) {
logger.info("Installed " + event.getMetadata() + " to " + event.getFile());
}
public void metadataInstalling(RepositoryEvent event) {
//out.println("Installing " + event.getMetadata() + " to " + event.getFile());
}
public void metadataInvalid(RepositoryEvent event) {
if(logger.isDebugEnabled())
logger.debug("Invalid metadata " + event.getMetadata());
}
public void metadataResolved(RepositoryEvent event) {
if(logger.isDebugEnabled())
logger.debug("Resolved metadata " + event.getMetadata() + " from " + event.getRepository());
}
public void metadataResolving(RepositoryEvent event) {
if(logger.isTraceEnabled())
logger.trace("Resolving metadata " + event.getMetadata() + " from " + event.getRepository());
}
}
|
[
"dennis.reedy@gmail.com"
] |
dennis.reedy@gmail.com
|
8c17614ba0a9189040dc33bbe28c763c59357ca5
|
db3d6eaaeec63c01fe8ff8d92ee541e54dd24c62
|
/Lucky/lucky-framework/src/main/java/org/luckyframework/context/annotation/ConditionContextImpl.java
|
27219473ee3d2a2a2e8a8dc85c8f5ca199f56f36
|
[] |
no_license
|
FK7075/Lucky-v3
|
5e63f4fa03f526c3cf60ff6287dbff095f638942
|
98d7d58eaa7195f5fe22fb6d172f41a093ecbece
|
refs/heads/main
| 2023-04-15T23:38:09.789688
| 2021-04-22T10:08:49
| 2021-04-22T10:08:49
| 346,982,704
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,778
|
java
|
package org.luckyframework.context.annotation;
import com.lucky.utils.annotation.Nullable;
import com.lucky.utils.fileload.ResourceLoader;
import org.luckyframework.beans.BeanDefinitionRegistry;
import org.luckyframework.beans.factory.ListableBeanFactory;
import org.luckyframework.context.ApplicationContext;
import org.luckyframework.environment.Environment;
/**
* @author fk
* @version 1.0
* @date 2021/3/26 0026 14:47
*/
public class ConditionContextImpl implements ConditionContext {
private final BeanDefinitionRegistry registry;
private final Environment environment;
private final ClassLoader loader;
private final ListableBeanFactory beanFactory;
private final ResourceLoader resourceLoader;
public ConditionContextImpl(BeanDefinitionRegistry registry, Environment environment, ListableBeanFactory beanFactory, ResourceLoader resourceLoader) {
this.registry = registry;
this.environment = environment;
this.beanFactory = beanFactory;
this.resourceLoader = resourceLoader;
this.loader = resourceLoader.getClassLoader();
}
public ConditionContextImpl(Environment environment, ApplicationContext context) {
this(context,environment,context,context);
}
@Override
public BeanDefinitionRegistry getRegistry() {
return this.registry;
}
@Override
public Environment getEnvironment() {
return this.environment;
}
@Nullable
@Override
public ListableBeanFactory getBeanFactory() {
return this.beanFactory;
}
@Override
public ResourceLoader getResourceLoader() {
return this.resourceLoader;
}
@Nullable
@Override
public ClassLoader getClassLoader() {
return this.loader;
}
}
|
[
"1814375626@qq.com"
] |
1814375626@qq.com
|
7d53bf87a2cbfc99d48d0df4dfb43268175c2100
|
48ed2a3f0ababafea22d93c96dd4818ae682c181
|
/src/main/java/com/couchbase/connect/kafka/sink/DocumentMode.java
|
8bb31e616798025e56cbbd47b8369648db573de5
|
[
"Apache-2.0"
] |
permissive
|
werkins/kafka-connect-couchbase
|
a6976257a765f76c297f247037f4a7756afa5f7c
|
3ff55f030bbb689d890c784605e5bd11fe363c89
|
refs/heads/master
| 2020-03-13T04:03:36.646062
| 2018-02-20T19:44:49
| 2018-04-23T20:30:19
| 130,956,021
| 0
| 0
|
Apache-2.0
| 2018-04-25T05:40:32
| 2018-04-25T05:40:32
| null |
UTF-8
|
Java
| false
| false
| 335
|
java
|
package com.couchbase.connect.kafka.sink;
public enum DocumentMode {
DOCUMENT("document"),
SUBDOCUMENT("subdocument"),
N1QL("n1ql");
private final String schemaName;
DocumentMode(String schemaName) {
this.schemaName = schemaName;
}
public String schemaName() {
return schemaName;
}
}
|
[
"david.nault@couchbase.com"
] |
david.nault@couchbase.com
|
1fbe0577ebf37937194222e4ddb92072744c8170
|
b1bf45c0b10e04abc96b94c5f63157ad8971e533
|
/src/main/java/com/boboface/advice/LogAdvice.java
|
855ba3f09fe486b5983a7c6cd58ffd827d49fd75
|
[] |
no_license
|
zowbman/boboface_server
|
0a3a437acf54af322b68dd62d184809a0025b4e8
|
e128a861dff47511900f9a109783c517280392f4
|
refs/heads/master
| 2020-04-12T08:06:39.894762
| 2017-05-10T10:19:48
| 2017-05-10T10:19:48
| 65,720,947
| 0
| 0
| null | 2016-11-04T02:02:59
| 2016-08-15T09:29:31
|
Java
|
UTF-8
|
Java
| false
| false
| 1,758
|
java
|
package com.boboface.advice;
import java.lang.annotation.Annotation;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import com.boboface.base.model.vo.PubRetrunMsg;
/**
*
* Title:LogAdvice
* Description:Spring aop全局日志管理
* @author zwb
* @date 2016年9月12日 下午2:02:31
*
*/
@Aspect
@Component
public class LogAdvice {
private Logger logger = LoggerFactory.getLogger(LogAdvice.class);
@Around("@annotation(rm)")
public Object logAdvice(ProceedingJoinPoint pjp,RequestMapping rm) throws Throwable{
Object responseBody = pjp.proceed();
if(responseBody instanceof PubRetrunMsg){
//url
String[] lTypeStrArr = null;
Annotation[] annotations = pjp.getSourceLocation().getWithinType().getAnnotations();
for (Annotation annotation : annotations) {
if(annotation instanceof RequestMapping){
lTypeStrArr = new String[((RequestMapping)annotation).value().length];
lTypeStrArr = ((RequestMapping)annotation).value();
}
}
String[] strArr = rm.value();
String serviceName = "";
if(strArr != null && strArr.length > 0){
serviceName = strArr[0];
}
if(lTypeStrArr != null && lTypeStrArr.length > 0){
serviceName = lTypeStrArr[0] + serviceName;
}
PubRetrunMsg pubRetrunMsg = (PubRetrunMsg) responseBody;
if(pubRetrunMsg.getCode() != 100000){
logger.error("url:" + serviceName + ",code:" + pubRetrunMsg.getCode() + ",logMsg:" + pubRetrunMsg.getLogMsg());//
}
}
return responseBody;
}
}
|
[
"zhangweibao@kugou.net"
] |
zhangweibao@kugou.net
|
ed28a2e07de334ac2a4a3241611ce4b806432cee
|
69c5ff4291795fa85a4062cf53d54652fa6b72fd
|
/Day70,71_01_HelloSpring/src/main/java/org/kh/spring/controller/DependencyServlet.java
|
4391dc6a170fd7270ac4546dae19605ed31fa48c
|
[] |
no_license
|
ajtwls1256/Spring-workspace
|
f31bfa8149cb8a9c9339b96bc525314abc74e8f2
|
6c71d5b7fb1208631b7dbb55d990387aab165d97
|
refs/heads/master
| 2022-12-22T16:28:25.782045
| 2019-11-26T08:12:36
| 2019-11-26T08:12:36
| 224,137,267
| 0
| 0
| null | 2022-12-16T00:41:35
| 2019-11-26T08:12:42
|
Java
|
UTF-8
|
Java
| false
| false
| 2,225
|
java
|
package org.kh.spring.controller;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.kh.spring.model.vo.BeanFactory;
import org.kh.spring.model.vo.LgTV;
import org.kh.spring.model.vo.SamsungTV;
import org.kh.spring.model.vo.TV;
import org.kh.spring.model.vo.TVmgr;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.GenericXmlApplicationContext;
/**
* Servlet implementation class DependencyServlet
*/
public class DependencyServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public DependencyServlet() {
super();
// TODO Auto-generated constructor stub
}
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
/*LgTV ltv = new LgTV();
ltv.turnOn();
ltv.soundUp();
ltv.soundDown();
ltv.turnOff();*/
/* TV tV = new SamsungTV();
tV.powerOn();
tV.volumUp();
tV.volumDown();
tV.powerOff();*/
/* String brand = request.getParameter("brand");
TV tV = (TV)BeanFactory.getBean(brand);
tV.powerOn();
tV.volumUp();
tV.volumDown();
tV.powerOff();*/
// 해당 경로에 있는 xml파일을 가져와서 위의 BeanFactory클래스처럼 사용할 수 있게 해주는 코드
AbstractApplicationContext cntx = new GenericXmlApplicationContext("/sampleContext.xml");
// getBean 메소드를 통해 생성한 id에 해당하는 클래스를 가져와 사용할 수 있다.
TV tV = (cntx.getBean("tvMgr", TVmgr.class)).getTv();
tV.powerOn();
tV.volumUp();
tV.volumDown();
tV.powerOff();
}
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
doGet(request, response);
}
}
|
[
"ajtwls1256@gmail.com"
] |
ajtwls1256@gmail.com
|
5d7f8836534a95b938be2c79bee8dba78ee816a5
|
90fb26416b5f5665952e1ab0e26c46c93934750b
|
/base-core/src/main/java/com/application/base/core/datasource/api/EsDataSessionFactory.java
|
e2a022a6af9876e3b34a79713a0441ba35e48259
|
[] |
no_license
|
jiangxialz/base-parent
|
27cbbb8a53d49c7531c497dbb7f28d91b6f3ba00
|
e664ecfa39a72a2db1d64444bec6f0187a1c23a5
|
refs/heads/master
| 2020-09-21T13:49:46.225795
| 2019-11-29T08:05:04
| 2019-11-29T08:05:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 345
|
java
|
package com.application.base.core.datasource.api;
import com.application.base.core.datasource.session.EsSession;
/**
* @NAME: EsDataSessionFactory
* @DESC: elasticsearch 的操作实例工厂.
* @USER: 孤狼
**/
public interface EsDataSessionFactory {
/**
* 获取操作的实例
* @return
*/
EsSession getElasticSession();
}
|
[
"supingemail@126.com"
] |
supingemail@126.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.