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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bb93ac26ef8ab214a9f921fd66d2756e636e0c3c
|
461619a84c6617ceaf2b7913ef58c99ff32c0fb5
|
/java/Button/Button/src/Button/Button/src/MainClass.java
|
77d344d9b3234d5b638107fe9753fa3a1e94ccb3
|
[
"MIT"
] |
permissive
|
bg1bgst333/Sample
|
cf066e48facac8ecd203c56665251fa1aa103844
|
298a4253dd8123b29bc90a3569f2117d7f6858f8
|
refs/heads/master
| 2023-09-02T00:46:31.139148
| 2023-09-01T02:41:42
| 2023-09-01T02:41:42
| 27,908,184
| 9
| 10
|
MIT
| 2023-09-06T20:49:55
| 2014-12-12T06:22:49
|
Java
|
UTF-8
|
Java
| false
| false
| 2,384
|
java
|
// パッケージ・クラスのインポート
import java.awt.Button; // Buttonクラス(java.awtパッケージ)
import java.awt.Frame; // Frameクラス(java.awtパッケージ)
import java.awt.event.WindowAdapter; // WindowAdapterクラス(java.awt.eventパッケージ)
import java.awt.event.WindowEvent; // WindowEventクラス(java.awt.eventパッケージ)
// メインクラス
public class MainClass { // MainClassの定義
// Javaのエントリポイント
public static void main(String[] args){ // mainメソッドの定義
// フレームの生成
Frame frame = new Frame(); // Frameオブジェクトを生成し, frameに格納.
// サイズのセット.
frame.setSize(640, 480); // setSizeでサイズを(640, 480)にセット.
// デフォルトのレイアウトを無効にする.
frame.setLayout(null); // frameにセットされている既定のレイアウトをsetLayout(null)で無効にする.
// ボタンの生成
Button button = new Button("button"); // "button"と表示するButtonオブジェクトを生成し, インスタンスをbuttonに格納.
// ボタンの位置とサイズをセット.
button.setBounds(200, 200, 120, 80); // button.setBoundsでボタンの位置を(200, 200), サイズを(120, 80)にセット.
// フレームにボタンを配置.
frame.add(button); // frame.addでbuttonを追加.
// 表示状態のセット.
frame.setVisible(true); // setVisibleで表示状態をtrueにセット.
// ウィンドウリスナーのセット.
frame.addWindowListener(new WindowAdapter(){ // WindowAdapterを継承した匿名クラスとしてアダプタを定義し, 引数としてaddWindowListenerに渡す.
// windowClosedとwindowClosingのみオーバーライド. それ以外はWindowAdapterに既定の動作が定義されている.
// ウィンドウが閉じられた時.
public void windowClosed(WindowEvent e){ // windowClosedの定義
// アプリケーションの終了
System.exit(0); // System.exit(0)でアプリケーションを終了.
}
// ウィンドウが閉じられている時.
public void windowClosing(WindowEvent e){ // windowClosingの定義
// ウィンドウリソースの開放
e.getWindow().dispose(); // e.getWindowでWindowが取得できるので, そのWindowをdisposeで破棄する.
}
});
}
}
|
[
"bg1bgst333@gmail.com"
] |
bg1bgst333@gmail.com
|
96a4b7b8d0b935cabfdc8f4c3be5f3ff1d6cd0b3
|
e471c3990167e8674a943ad519cf33b3ef7a5c0f
|
/network/com/ankamagames/dofus/network/messages/game/context/mount/MountSetXpRatioRequestMessage.java
|
f2833e6199b6390e6b3a5a09bdfa326666d26875
|
[] |
no_license
|
Romain-P/Dofus-2.44.0-JProtocol
|
379f4008acc5a15cd536ce2a23458f5a57348215
|
db79dab05c3bacc6ec67b40d83741a16328a1fae
|
refs/heads/master
| 2021-05-15T17:33:24.510521
| 2017-10-20T08:24:03
| 2017-10-20T08:24:03
| 107,510,404
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,089
|
java
|
// Created by Heat the 2017-10-20 01:53:24+02:00
package com.ankamagames.dofus.network.messages.game.context.mount;
import org.heat.dofus.network.NetworkType;
import org.heat.dofus.network.NetworkMessage;
import org.heat.shared.io.DataWriter;
import org.heat.shared.io.DataReader;
import org.heat.shared.io.BooleanByteWrapper;
import com.ankamagames.dofus.network.InternalProtocolTypeManager;
@SuppressWarnings("all")
public class MountSetXpRatioRequestMessage extends NetworkMessage {
public static final int PROTOCOL_ID = 5989;
// i8
public byte xpRatio;
public MountSetXpRatioRequestMessage() {}
public MountSetXpRatioRequestMessage(byte xpRatio) {
this.xpRatio = xpRatio;
}
@Override
public int getProtocolId() {
return 5989;
}
@Override
public void serialize(DataWriter writer) {
writer.write_i8(this.xpRatio);
}
@Override
public void deserialize(DataReader reader) {
this.xpRatio = reader.read_i8();
}
@Override
public String toString() {
return "MountSetXpRatioRequestMessage(" + "xpRatio=" + this.xpRatio + ')';
}
}
|
[
"romain.pillot@epitech.eu"
] |
romain.pillot@epitech.eu
|
125dae01d7ff8be0f9eae7440ce3d9d1078b04b5
|
020765d9809f4276bdb03b3130ef27df4eda33cd
|
/structurizr-core/src/com/structurizr/view/ContainerView.java
|
3f828efedcca44a948f4b7402364838818a8df18
|
[
"Apache-2.0"
] |
permissive
|
devnoo/java
|
258d17c5a63e3d65e7f0f3c80a59d96de02234f0
|
99aefa9ba2bba451d2f606a74e3ad9bdebf86f66
|
refs/heads/master
| 2021-01-18T15:14:59.370682
| 2016-03-30T13:04:33
| 2016-03-30T13:04:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,526
|
java
|
package com.structurizr.view;
import com.structurizr.model.Container;
import com.structurizr.model.Element;
import com.structurizr.model.Person;
import com.structurizr.model.SoftwareSystem;
public class ContainerView extends StaticView {
ContainerView() {
}
ContainerView(SoftwareSystem softwareSystem, String description) {
super(softwareSystem, description);
}
@Override
public void add(SoftwareSystem softwareSystem) {
if (softwareSystem != null && !softwareSystem.equals(getSoftwareSystem())) {
addElement(softwareSystem, true);
}
}
/**
* Adds all containers in the software system to this view.
*/
public void addAllContainers() {
getSoftwareSystem().getContainers().forEach(this::add);
}
/**
* Adds an individual container to this view.
*
* @param container the Container to add
*/
public void add(Container container) {
addElement(container, true);
}
@Override
public String getName() {
return getSoftwareSystem().getName() + " - Containers";
}
@Override
public void addAllElements() {
addAllSoftwareSystems();
addAllPeople();
addAllContainers();
}
@Override
public void addNearestNeighbours(Element element) {
super.addNearestNeighbours(element, SoftwareSystem.class);
super.addNearestNeighbours(element, Person.class);
super.addNearestNeighbours(element, Container.class);
}
}
|
[
"simon.brown@codingthearchitecture.com"
] |
simon.brown@codingthearchitecture.com
|
da2de0b2bc12114a393d91ecd38b799af1039c98
|
ecd1b618074050cbac548b415f9a5df232809db9
|
/sdks/jreleaser-nexus2-java-sdk/src/main/java/org/jreleaser/sdk/nexus2/api/StagingRepository.java
|
ae98673e966fd4d2b6b763a9a5699d50589160ea
|
[
"MIT",
"CC0-1.0",
"BSD-2-Clause-Views",
"BSD-3-Clause",
"Apache-2.0",
"BSD-2-Clause"
] |
permissive
|
helpermethod/jreleaser
|
e179d80f08602a9d1f19c64a271c11a7e5b6b9e2
|
95f2efc2bbee7ffdd9d88370e70add13b6906828
|
refs/heads/main
| 2023-08-03T09:27:27.726252
| 2023-07-15T06:23:04
| 2023-07-15T06:23:04
| 394,959,951
| 0
| 0
|
Apache-2.0
| 2021-08-11T11:06:13
| 2021-08-11T11:06:12
| null |
UTF-8
|
Java
| false
| false
| 1,181
|
java
|
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2020-2023 The JReleaser 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
*
* https://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.jreleaser.sdk.nexus2.api;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
/**
* @author Andres Almiray
* @since 1.3.0
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class StagingRepository {
private String id;
private String name;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
|
[
"aalmiray@gmail.com"
] |
aalmiray@gmail.com
|
62c8721d1c6ff79212012d4b5041442efe11e08f
|
ea554f1a2f443b190cd88c00738c1e6c70f5c7fe
|
/modules/web/src/com/haulmont/sampler/web/ui/charts/charts/serial/smoothedline/SmootheredLineChartSample.java
|
c289f6ae3cb6bddfdc7933ebdefe3bc76cfd8389
|
[
"Apache-2.0"
] |
permissive
|
cuba-platform/sampler
|
36d3df46a49f451bae13ba8a7bc2f3bc771800a6
|
f2047016d2856d83acea076706b976b59c955120
|
refs/heads/master
| 2021-12-11T19:23:04.724659
| 2021-12-07T06:33:36
| 2021-12-07T06:33:36
| 127,406,182
| 6
| 9
|
Apache-2.0
| 2020-04-21T20:41:46
| 2018-03-30T08:57:35
|
Java
|
UTF-8
|
Java
| false
| false
| 443
|
java
|
package com.haulmont.sampler.web.ui.charts.charts.serial.smoothedline;
import com.haulmont.cuba.gui.screen.LoadDataBeforeShow;
import com.haulmont.cuba.gui.screen.ScreenFragment;
import com.haulmont.cuba.gui.screen.UiController;
import com.haulmont.cuba.gui.screen.UiDescriptor;
@UiController("smoothedline-chart")
@UiDescriptor("smoothedline-chart.xml")
@LoadDataBeforeShow
public class SmootheredLineChartSample extends ScreenFragment {
}
|
[
"glebfox@gmail.com"
] |
glebfox@gmail.com
|
2e529841fea6e4cda8f230e4635a3f57d1eb6d32
|
23d5894b723765b4200889da55aa05ec37e8ab69
|
/sellingpartner-product-fees-api/src/main/java/com/amazon/spapi/productfees/model/GetMyFeesEstimateResult.java
|
059365638ac23e01b9199bfcb8a3d573d7e8b430
|
[] |
no_license
|
penghaiping/selling-partner-sdk
|
420b5e2a48aa98189aa9e0d16514004377e53685
|
8a89d17b492f1fb1c319cc1fa5a7cc0a30abc8b9
|
refs/heads/master
| 2023-05-31T12:10:01.348630
| 2021-07-05T02:24:55
| 2021-07-05T02:24:55
| 322,236,368
| 19
| 8
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,797
|
java
|
/*
* Selling Partner API for Product Fees
* The Selling Partner API for Product Fees lets you programmatically retrieve estimated fees for a product. You can then account for those fees in your pricing.
*
* OpenAPI spec version: v0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package com.amazon.spapi.productfees.model;
import java.util.Objects;
import java.util.Arrays;
import com.amazon.spapi.productfees.model.FeesEstimateResult;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
/**
* Response schema.
*/
@ApiModel(description = "Response schema.")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-12-15T20:52:41.175+08:00")
public class GetMyFeesEstimateResult {
@SerializedName("FeesEstimateResult")
private FeesEstimateResult feesEstimateResult = null;
public GetMyFeesEstimateResult feesEstimateResult(FeesEstimateResult feesEstimateResult) {
this.feesEstimateResult = feesEstimateResult;
return this;
}
/**
* The item's estimated fees.
* @return feesEstimateResult
**/
@ApiModelProperty(value = "The item's estimated fees.")
public FeesEstimateResult getFeesEstimateResult() {
return feesEstimateResult;
}
public void setFeesEstimateResult(FeesEstimateResult feesEstimateResult) {
this.feesEstimateResult = feesEstimateResult;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetMyFeesEstimateResult getMyFeesEstimateResult = (GetMyFeesEstimateResult) o;
return Objects.equals(this.feesEstimateResult, getMyFeesEstimateResult.feesEstimateResult);
}
@Override
public int hashCode() {
return Objects.hash(feesEstimateResult);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class GetMyFeesEstimateResult {\n");
sb.append(" feesEstimateResult: ").append(toIndentedString(feesEstimateResult)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
|
[
"penghp@pingpongx.com"
] |
penghp@pingpongx.com
|
fef216d7ef15b831358e709d3ed58789ef010882
|
faad9426e40b868103f7995aad166f2328060f00
|
/TestModel/mymode/src/main/java/yuncar/aten/com/mymode/banner/transformer/ZoomInTransformer.java
|
b132e9f69547d886bea98c6925eb13b9d60cb6e7
|
[] |
no_license
|
jkabcd/TestModel
|
f46f193a3a688e35e1283e93263c01762ff0d8e9
|
6ea474ab4784475fc30f65d5a8f32cacbaf262b3
|
refs/heads/master
| 2020-03-23T12:05:24.058614
| 2018-08-03T09:03:46
| 2018-08-03T09:03:46
| 141,536,287
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,099
|
java
|
/*
* Copyright 2014 Toxic Bakery
*
* 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 yuncar.aten.com.mymode.banner.transformer;
import android.view.View;
public class ZoomInTransformer extends ABaseTransformer {
@Override
protected void onTransform(View view, float position) {
final float scale = position < 0 ? position + 1f : Math.abs(1f - position);
view.setScaleX(scale);
view.setScaleY(scale);
view.setPivotX(view.getWidth() * 0.5f);
view.setPivotY(view.getHeight() * 0.5f);
view.setAlpha(position < -1f || position > 1f ? 0f : 1f - (scale - 1f));
}
}
|
[
"610184089@qq.com"
] |
610184089@qq.com
|
891476f53c078a18fef352065ec3dead369d9a15
|
83e81c25b1f74f88ed0f723afc5d3f83e7d05da8
|
/core/java/android/bluetooth/BluetoothOutputStream.java
|
2579f78cfe43cf48a6747e5f0456cd5adbc1dc76
|
[
"Apache-2.0",
"LicenseRef-scancode-unicode"
] |
permissive
|
Ankits-lab/frameworks_base
|
8a63f39a79965c87a84e80550926327dcafb40b7
|
150a9240e5a11cd5ebc9bb0832ce30e9c23f376a
|
refs/heads/main
| 2023-02-06T03:57:44.893590
| 2020-11-14T09:13:40
| 2020-11-14T09:13:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,701
|
java
|
/*
* Copyright (C) 2009 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.bluetooth;
import java.io.IOException;
import java.io.OutputStream;
/**
* BluetoothOutputStream.
*
* Used to read from a Bluetooth socket.
*
* @hide
*/
/*package*/ final class BluetoothOutputStream extends OutputStream {
private BluetoothSocket mSocket;
/*package*/ BluetoothOutputStream(BluetoothSocket s) {
mSocket = s;
}
/**
* Close this output stream and the socket associated with it.
*/
public void close() throws IOException {
mSocket.close();
}
/**
* Writes a single byte to this stream. Only the least significant byte of
* the integer {@code oneByte} is written to the stream.
*
* @param oneByte the byte to be written.
* @throws IOException if an error occurs while writing to this stream.
* @since Android 1.0
*/
public void write(int oneByte) throws IOException {
byte[] b = new byte[1];
b[0] = (byte) oneByte;
mSocket.write(b, 0, 1);
}
/**
* Writes {@code count} bytes from the byte array {@code buffer} starting
* at position {@code offset} to this stream.
*
* @param b the buffer to be written.
* @param offset the start position in {@code buffer} from where to get bytes.
* @param count the number of bytes from {@code buffer} to write to this stream.
* @throws IOException if an error occurs while writing to this stream.
* @throws IndexOutOfBoundsException if {@code offset < 0} or {@code count < 0}, or if {@code
* offset + count} is bigger than the length of {@code buffer}.
* @since Android 1.0
*/
public void write(byte[] b, int offset, int count) throws IOException {
if (b == null) {
throw new NullPointerException("buffer is null");
}
if ((offset | count) < 0 || count > b.length - offset) {
throw new IndexOutOfBoundsException("invalid offset or length");
}
mSocket.write(b, offset, count);
}
}
|
[
"keneankit01@gmail.com"
] |
keneankit01@gmail.com
|
ecf79b3046bde2461695e2b7e481bc3362d83a07
|
2e079a270e0ceb1d2ad7f729c782947cd21a2cfb
|
/src/leetcode/_985.java
|
e2141f428bb4c36054ef450b772ff5c82038606c
|
[] |
no_license
|
lydxlx1/icpc
|
b07dbdb043697cb66bcc5527036bce59102248cc
|
b74678b46b8b43fdcf95568dc50e68d0187cdadb
|
refs/heads/master
| 2023-07-09T23:01:58.275507
| 2023-07-05T06:03:18
| 2023-07-05T06:03:18
| 89,440,141
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 672
|
java
|
package leetcode;
import java.util.stream.IntStream;
/**
* LeetCode 985 - Sum of Even Numbers After Queries
*/
public class _985 {
public int[] sumEvenAfterQueries(int[] A, int[][] queries) {
int[] res = new int[queries.length];
int sum = IntStream.of(A).filter(i -> i % 2 == 0).sum();
for (int i = 0; i < queries.length; i++) {
int val = queries[i][0], idx = queries[i][1];
if (A[idx] % 2 == 0) {
sum -= A[idx];
}
A[idx] += val;
if (A[idx] % 2 == 0) {
sum += A[idx];
}
res[i] = sum;
}
return res;
}
}
|
[
"4112003+lydxlx1@users.noreply.github.com"
] |
4112003+lydxlx1@users.noreply.github.com
|
afdd33b8de03509c76a8acdd0e177456065e8773
|
61fd833d2676ec21386f1b3b2634bbecfe574935
|
/ccl-codegen/src/main/java/com/ccl/rain/codegen/OverrideImpl.java
|
1187aa7342d5b91d710f78117d1380b4141d0017
|
[] |
no_license
|
freedom541/raindrop
|
7bff92421642a9a33671f0c295a0bec669ac099e
|
1131a4ae0a845b67e3feccc6a227eb6594e02340
|
refs/heads/master
| 2021-07-11T01:37:48.579479
| 2017-09-30T02:44:47
| 2017-09-30T02:44:47
| 101,834,248
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 274
|
java
|
package com.ccl.rain.codegen;
import java.lang.annotation.Annotation;
/**
* @author ccl
* @date 2017/8/27.
*/
public class OverrideImpl implements Override {
@Override
public Class<? extends Annotation> annotationType() {
return Override.class;
}
}
|
[
"chencl@jiagouyun.com"
] |
chencl@jiagouyun.com
|
0e63e6582d6485d6954791b72edd7c209c98d9de
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/single-large-project/src/main/java/org/gradle/test/performancenull_354/Productionnull_35336.java
|
d66bd004779df495ddba09051fbee127d026bc3e
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 588
|
java
|
package org.gradle.test.performancenull_354;
public class Productionnull_35336 {
private final String property;
public Productionnull_35336(String param) {
this.property = param;
}
public String getProperty() {
return property;
}
private String prop0;
public String getProp0() {
return prop0;
}
public void setProp0(String value) {
prop0 = value;
}
private String prop1;
public String getProp1() {
return prop1;
}
public void setProp1(String value) {
prop1 = value;
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
3e95b34015d99d067fbd17b679b73e0e024c2bdf
|
42709be4bd8f01618b69b4aa995193c13214ca2c
|
/src/main/java/pl/agh/jtp/lab03_home/visitor/Visitable.java
|
58a29bfe085c95d0e9e5f92970165ff1a16a9778
|
[] |
no_license
|
raduy/JTPII
|
74dd0fdfd6bd38feea65b93520d8805e1c5902e3
|
562cd53eb1b4b79d7e461e14141f73e59ff649e3
|
refs/heads/master
| 2016-09-05T22:40:34.444488
| 2013-09-02T16:10:35
| 2013-09-02T16:10:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 207
|
java
|
package pl.agh.jtp.lab03_home.visitor;
/**
* @author Lukasz Raduj <raduj.lukasz@gmail.com>
*/
public interface Visitable {
/**
*
* @param visitor
*/
void accept(Visitor visitor);
}
|
[
"raduj.lukasz@gmail.com"
] |
raduj.lukasz@gmail.com
|
b0bc78b5ff4335187f12f257405e713f6027602d
|
c36b3bacc4cf0d268d63d351b51a8a2517d571d1
|
/OM/src/com/rr/om/emea/exchange/ets/ETSSocketConfig.java
|
cd9be1d084ded82a86bfa52c6ecddd1438366f18
|
[] |
no_license
|
renicl/alphaProject
|
e4ced0c8de85b933f8b3af1903577bd0143a9acf
|
1785ecc8c7d930fda2c60452504a141e417712b6
|
refs/heads/master
| 2021-05-15T09:02:55.542649
| 2017-12-03T16:32:05
| 2017-12-03T16:32:05
| 108,066,861
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,617
|
java
|
/*******************************************************************************
* Copyright (c) 2015 Low Latency Trading Limited : Author Richard Rose
* 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.rr.om.emea.exchange.ets;
import com.rr.core.lang.ViewString;
import com.rr.core.lang.ZString;
import com.rr.core.recycler.MessageRecycler;
import com.rr.core.session.socket.SocketConfig;
import com.rr.core.utils.SMTRuntimeException;
import com.rr.model.generated.internal.events.factory.EventRecycler;
public class ETSSocketConfig extends SocketConfig implements ETSConfig {
private boolean _disconnectOnMissedHB = true;
private int _heartBeatIntSecs = 60;
private boolean _isRecoverFromLoginSeqNumTooLow = false;
private ZString _userName = new ViewString( "" );
public ETSSocketConfig() {
super( EventRecycler.class );
}
public ETSSocketConfig( boolean disconnectOnMissedHB,
Class<? extends MessageRecycler> recycler,
boolean isServer,
ZString host,
ZString adapter,
int port,
ZString userName ) {
super( recycler, isServer, host, adapter, port );
_disconnectOnMissedHB = disconnectOnMissedHB;
_userName = userName;
}
public ETSSocketConfig( Class<? extends MessageRecycler> recycler,
boolean isServer,
ZString host,
ZString adapter,
int port,
ZString userName ) {
super( recycler, isServer, host, adapter, port );
_disconnectOnMissedHB = true;
_userName = userName;
}
@Override
public String info() {
return super.info() + ", userName=" + _userName + ", recoverFromLowSeqNum=" + _isRecoverFromLoginSeqNumTooLow;
}
@Override
public boolean isDisconnectOnMissedHB() {
return _disconnectOnMissedHB;
}
@Override
public int getHeartBeatIntSecs() {
return _heartBeatIntSecs;
}
@Override
public void setHeartBeatIntSecs( int heartBeatIntSecs ) {
_heartBeatIntSecs = heartBeatIntSecs;
}
/**
* if other side send an nextSeqNum less than expected in log on message then can optionally truncate down automatically
*
* THIS IS NOT USUALLY ADVISABLE WITH EXCHANGE BUT MAYBE SO FOR CLIENTS
*
* @return true if should truncate down expected seq num from other side
*/
@Override
public boolean isRecoverFromLoginSeqNumTooLow() {
return _isRecoverFromLoginSeqNumTooLow;
}
@Override
public void setRecoverFromLoginSeqNumTooLow( boolean isRecoverFromLoginSeqNumTooLow ) {
_isRecoverFromLoginSeqNumTooLow = isRecoverFromLoginSeqNumTooLow;
}
@Override
public ZString getUserName() {
return _userName;
}
public void setDisconnectOnMissedHB( boolean disconnectOnMissedHB ) {
_disconnectOnMissedHB = disconnectOnMissedHB;
}
public void setUserName( ZString userName ) {
_userName = userName;
}
@Override
public void validate() throws SMTRuntimeException {
super.validate();
if ( isUnset( _userName ) ) throw new SMTRuntimeException( "ETSSocketConfig missing userName" );
}
private boolean isUnset( ZString val ) {
return val == null || val.toString().length() == 0;
}
@Override
public int getMaxSeqNum() {
return 0;
}
}
|
[
"lucasrenick@lucass-mbp.fios-router.home"
] |
lucasrenick@lucass-mbp.fios-router.home
|
b4734944a577976dccbe7be86953fa4b2e0c9bcf
|
f949f4d9ef4dac307fbdf479de59945958e70b23
|
/ismp-situation/src/main/java/org/infosec/ismp/situation/service/SituationEventService.java
|
37b7e03f3aef9d7b0caeca5ee1172333ab6b85dd
|
[] |
no_license
|
zhausong/ismp_manager
|
2828f89cdc643fe60573a2aaabffd1022fe7c49f
|
ef914b8728c614e144c888a15d45788ba1e67a85
|
refs/heads/master
| 2021-07-29T23:08:32.237372
| 2013-06-21T01:50:23
| 2013-06-21T01:50:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 368
|
java
|
package org.infosec.ismp.situation.service;
import java.util.List;
import org.infosec.ismp.situation.model.SituationEvent;
public interface SituationEventService {
/**
* 存入一个对象
* @param alarm
*/
void save(SituationEvent situationEvent);
/**
* 存入多个对象
* @param alarms
*/
void save(List<SituationEvent> situationEvents);
}
|
[
"lewking@foxmail.com"
] |
lewking@foxmail.com
|
d21eaf0ead02a7f634022569760ad9cfe41aefd6
|
8d8fb4dfd7be299076651e02d26eba6cd879428c
|
/agent-bridge/src/main/java/com/newrelic/agent/bridge/NoOpLogger.java
|
b2a692a5bd7f0a469c58a74a38884b848b7e2f68
|
[
"Apache-2.0"
] |
permissive
|
newrelic/newrelic-java-agent
|
db6dd20f6ba3f43909b004ce4a058f589dd4b017
|
eb298ecd8d31f93622388aa12d3ba1e68a58f912
|
refs/heads/main
| 2023-08-31T05:14:44.428903
| 2023-08-29T10:37:35
| 2023-08-30T18:08:38
| 275,016,355
| 177
| 150
|
Apache-2.0
| 2023-09-11T14:50:06
| 2020-06-25T21:13:42
|
Java
|
UTF-8
|
Java
| false
| false
| 3,331
|
java
|
/*
*
* * Copyright 2020 New Relic Corporation. All rights reserved.
* * SPDX-License-Identifier: Apache-2.0
*
*/
package com.newrelic.agent.bridge;
import com.newrelic.api.agent.Logger;
import java.util.logging.Level;
class NoOpLogger implements Logger {
static final Logger INSTANCE = new NoOpLogger();
private NoOpLogger() {
}
@Override
public boolean isLoggable(Level level) {
return false;
}
@Override
public void log(Level level, String pattern, Object[] msg) {
}
@Override
public void log(Level level, String pattern) {
}
@Override
public void log(Level level, Throwable t, String pattern) {
}
@Override
public void log(Level level, String pattern, Object part1) {
}
@Override
public void log(Level level, String pattern, Object part1, Object part2) {
}
@Override
public void log(Level level, String pattern, Object part1, Object part2, Object part3) {
}
@Override
public void log(Level level, String pattern, Object part1, Object part2, Object part3, Object part4) {
}
@Override
public void log(Level level, String pattern, Object part1, Object part2, Object part3, Object part4, Object part5) {
}
@Override
public void log(Level level, String pattern, Object part1, Object part2, Object part3, Object part4, Object part5,
Object part6) {
}
@Override
public void log(Level level, String pattern, Object part1, Object part2, Object part3, Object part4, Object part5,
Object part6, Object part7) {
}
@Override
public void log(Level level, String pattern, Object part1, Object part2, Object part3, Object part4, Object part5,
Object part6, Object part7, Object... otherParts) {
}
@Override
public void log(Level level, Throwable t, String pattern, Object[] msg) {
}
@Override
public void log(Level level, Throwable t, String pattern, Object part1) {
}
@Override
public void log(Level level, Throwable t, String pattern, Object part1, Object part2) {
}
@Override
public void log(Level level, Throwable t, String pattern, Object part1, Object part2, Object part3) {
}
@Override
public void log(Level level, Throwable t, String pattern, Object part1, Object part2, Object part3, Object part4) {
}
@Override
public void log(Level level, Throwable t, String pattern, Object part1, Object part2, Object part3, Object part4,
Object part5) {
}
@Override
public void log(Level level, Throwable t, String pattern, Object part1, Object part2, Object part3, Object part4,
Object part5, Object part6) {
}
@Override
public void log(Level level, Throwable t, String pattern, Object part1, Object part2, Object part3, Object part4,
Object part5, Object part6, Object part7) {
}
@Override
public void log(Level level, Throwable t, String pattern, Object part1, Object part2, Object part3, Object part4,
Object part5, Object part6, Object part7, Object... otherParts) {
}
@Override
public void logToChild(String childName, Level level, String pattern, Object part1, Object part2, Object part3,
Object part4) {
}
}
|
[
"49817386+jeffalder@users.noreply.github.com"
] |
49817386+jeffalder@users.noreply.github.com
|
bc1578201871d244ebbdbcd66526f001a712e80b
|
0124e565b2ca5d223fddd10dd9d851437ab59dc2
|
/myjdk/src/com/sun/corba/se/spi/activation/InvalidORBid.java
|
cefa4bc69852b2572fc7fed0281c29cd9d6a8381
|
[] |
no_license
|
lvcs123456/syncMore
|
331db4092017ba17b38ead80ab47fc4c6615683e
|
43074b41851cf6514e4b28037e2465fb806b46b1
|
refs/heads/master
| 2023-01-23T11:29:02.755417
| 2020-11-04T12:14:37
| 2020-11-04T12:14:37
| 309,552,899
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 647
|
java
|
package com.sun.corba.se.spi.activation;
/**
* com/sun/corba/se/spi/activation/InvalidORBid.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from c:/ade/jenkins/workspace/8-2-build-windows-i586-cygwin/jdk8u241/331/corba/src/share/classes/com/sun/corba/se/spi/activation/activation.idl
* Wednesday, December 11, 2019 10:25:11 AM UTC
*/
public final class InvalidORBid extends org.omg.CORBA.UserException
{
public InvalidORBid ()
{
super(InvalidORBidHelper.id());
} // ctor
public InvalidORBid (String $reason)
{
super(InvalidORBidHelper.id() + " " + $reason);
} // ctor
} // class InvalidORBid
|
[
"1731033071@qq.com"
] |
1731033071@qq.com
|
ecaa0218f49af3e981e8ac626dcb5443ce55b807
|
d900d565c0aa1baca50281ff3ab17748a1bd8825
|
/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/tables/T_639NumbersTable.java
|
06d681834761a5134145bac6c54ba27386e8772e
|
[
"Apache-2.0",
"BSD-3-Clause"
] |
permissive
|
rtvt123/jOOQ
|
61db17e27c88d39faead0977b1753051b4011c78
|
93fcf815c1a81c08e7f7940787b5ae95d6853733
|
refs/heads/master
| 2022-09-18T21:20:21.039490
| 2013-12-19T09:37:35
| 2013-12-19T09:37:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,040
|
java
|
/**
* This class is generated by jOOQ
*/
package org.jooq.test.mysql2.generatedclasses.tables;
/**
* This class is generated by jOOQ.
*/
@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class T_639NumbersTable extends org.jooq.impl.TableImpl<org.jooq.test.mysql2.generatedclasses.tables.records.T_639NumbersTableRecord> {
private static final long serialVersionUID = -240160998;
/**
* The singleton instance of <code>test2.t_639_numbers_table</code>
*/
public static final org.jooq.test.mysql2.generatedclasses.tables.T_639NumbersTable T_639_NUMBERS_TABLE = new org.jooq.test.mysql2.generatedclasses.tables.T_639NumbersTable();
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.test.mysql2.generatedclasses.tables.records.T_639NumbersTableRecord> getRecordType() {
return org.jooq.test.mysql2.generatedclasses.tables.records.T_639NumbersTableRecord.class;
}
/**
* The column <code>test2.t_639_numbers_table.ID</code>.
*/
public final org.jooq.TableField<org.jooq.test.mysql2.generatedclasses.tables.records.T_639NumbersTableRecord, java.lang.Integer> ID = createField("ID", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this);
/**
* The column <code>test2.t_639_numbers_table.BYTE</code>.
*/
public final org.jooq.TableField<org.jooq.test.mysql2.generatedclasses.tables.records.T_639NumbersTableRecord, java.lang.Byte> BYTE = createField("BYTE", org.jooq.impl.SQLDataType.TINYINT, this);
/**
* The column <code>test2.t_639_numbers_table.SHORT</code>.
*/
public final org.jooq.TableField<org.jooq.test.mysql2.generatedclasses.tables.records.T_639NumbersTableRecord, java.lang.Short> SHORT = createField("SHORT", org.jooq.impl.SQLDataType.SMALLINT, this);
/**
* The column <code>test2.t_639_numbers_table.INTEGER</code>.
*/
public final org.jooq.TableField<org.jooq.test.mysql2.generatedclasses.tables.records.T_639NumbersTableRecord, java.lang.Integer> INTEGER = createField("INTEGER", org.jooq.impl.SQLDataType.INTEGER, this);
/**
* The column <code>test2.t_639_numbers_table.LONG</code>.
*/
public final org.jooq.TableField<org.jooq.test.mysql2.generatedclasses.tables.records.T_639NumbersTableRecord, java.lang.Long> LONG = createField("LONG", org.jooq.impl.SQLDataType.BIGINT, this);
/**
* The column <code>test2.t_639_numbers_table.BYTE_DECIMAL</code>.
*/
public final org.jooq.TableField<org.jooq.test.mysql2.generatedclasses.tables.records.T_639NumbersTableRecord, java.lang.Byte> BYTE_DECIMAL = createField("BYTE_DECIMAL", org.jooq.impl.SQLDataType.TINYINT, this);
/**
* The column <code>test2.t_639_numbers_table.SHORT_DECIMAL</code>.
*/
public final org.jooq.TableField<org.jooq.test.mysql2.generatedclasses.tables.records.T_639NumbersTableRecord, java.lang.Short> SHORT_DECIMAL = createField("SHORT_DECIMAL", org.jooq.impl.SQLDataType.SMALLINT, this);
/**
* The column <code>test2.t_639_numbers_table.INTEGER_DECIMAL</code>.
*/
public final org.jooq.TableField<org.jooq.test.mysql2.generatedclasses.tables.records.T_639NumbersTableRecord, java.lang.Integer> INTEGER_DECIMAL = createField("INTEGER_DECIMAL", org.jooq.impl.SQLDataType.INTEGER, this);
/**
* The column <code>test2.t_639_numbers_table.LONG_DECIMAL</code>.
*/
public final org.jooq.TableField<org.jooq.test.mysql2.generatedclasses.tables.records.T_639NumbersTableRecord, java.lang.Long> LONG_DECIMAL = createField("LONG_DECIMAL", org.jooq.impl.SQLDataType.BIGINT, this);
/**
* The column <code>test2.t_639_numbers_table.BIG_INTEGER</code>.
*/
public final org.jooq.TableField<org.jooq.test.mysql2.generatedclasses.tables.records.T_639NumbersTableRecord, java.math.BigInteger> BIG_INTEGER = createField("BIG_INTEGER", org.jooq.impl.SQLDataType.DECIMAL_INTEGER.precision(22), this);
/**
* The column <code>test2.t_639_numbers_table.BIG_DECIMAL</code>.
*/
public final org.jooq.TableField<org.jooq.test.mysql2.generatedclasses.tables.records.T_639NumbersTableRecord, java.math.BigDecimal> BIG_DECIMAL = createField("BIG_DECIMAL", org.jooq.impl.SQLDataType.DECIMAL.precision(22, 5), this);
/**
* The column <code>test2.t_639_numbers_table.FLOAT</code>.
*/
public final org.jooq.TableField<org.jooq.test.mysql2.generatedclasses.tables.records.T_639NumbersTableRecord, java.lang.Double> FLOAT = createField("FLOAT", org.jooq.impl.SQLDataType.FLOAT, this);
/**
* The column <code>test2.t_639_numbers_table.DOUBLE</code>.
*/
public final org.jooq.TableField<org.jooq.test.mysql2.generatedclasses.tables.records.T_639NumbersTableRecord, java.lang.Double> DOUBLE = createField("DOUBLE", org.jooq.impl.SQLDataType.DOUBLE, this);
/**
* Create a <code>test2.t_639_numbers_table</code> table reference
*/
public T_639NumbersTable() {
super("t_639_numbers_table", org.jooq.test.mysql2.generatedclasses.Test2.TEST2);
}
/**
* Create an aliased <code>test2.t_639_numbers_table</code> table reference
*/
public T_639NumbersTable(java.lang.String alias) {
super(alias, org.jooq.test.mysql2.generatedclasses.Test2.TEST2, org.jooq.test.mysql2.generatedclasses.tables.T_639NumbersTable.T_639_NUMBERS_TABLE);
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.UniqueKey<org.jooq.test.mysql2.generatedclasses.tables.records.T_639NumbersTableRecord> getPrimaryKey() {
return org.jooq.test.mysql2.generatedclasses.Keys.KEY_T_639_NUMBERS_TABLE_PRIMARY;
}
/**
* {@inheritDoc}
*/
@Override
public java.util.List<org.jooq.UniqueKey<org.jooq.test.mysql2.generatedclasses.tables.records.T_639NumbersTableRecord>> getKeys() {
return java.util.Arrays.<org.jooq.UniqueKey<org.jooq.test.mysql2.generatedclasses.tables.records.T_639NumbersTableRecord>>asList(org.jooq.test.mysql2.generatedclasses.Keys.KEY_T_639_NUMBERS_TABLE_PRIMARY);
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.test.mysql2.generatedclasses.tables.T_639NumbersTable as(java.lang.String alias) {
return new org.jooq.test.mysql2.generatedclasses.tables.T_639NumbersTable(alias);
}
}
|
[
"lukas.eder@gmail.com"
] |
lukas.eder@gmail.com
|
3cd4e44876d1a0641f84ec0ec089dd244f269546
|
6baf1fe00541560788e78de5244ae17a7a2b375a
|
/hollywood/com.oculus.browser-base/sources/org/chromium/components/embedder_support/delegate/WebContentsDelegateAndroid.java
|
0ea67600c63e3bb0fead668df484f06ba91a617e
|
[] |
no_license
|
phwd/quest-tracker
|
286e605644fc05f00f4904e51f73d77444a78003
|
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
|
refs/heads/main
| 2023-03-29T20:33:10.959529
| 2021-04-10T22:14:11
| 2021-04-10T22:14:11
| 357,185,040
| 4
| 2
| null | 2021-04-12T12:28:09
| 2021-04-12T12:28:08
| null |
UTF-8
|
Java
| false
| false
| 2,203
|
java
|
package org.chromium.components.embedder_support.delegate;
import android.view.KeyEvent;
import org.chromium.content_public.browser.WebContents;
import org.chromium.content_public.common.ResourceRequestBody;
import org.chromium.url.GURL;
/* compiled from: chromium-OculusBrowser.apk-stable-281887347 */
public class WebContentsDelegateAndroid {
public int a() {
return 0;
}
public void activateContents() {
}
public boolean addMessageToConsole(int i, String str, int i2, String str2) {
return false;
}
public void closeContents() {
}
public void enterFullscreenModeForTab(boolean z) {
}
public void exitFullscreenModeForTab() {
}
public void fullscreenStateChangedForTab(boolean z) {
}
public int getBottomControlsHeight() {
return 0;
}
public int getBottomControlsMinHeight() {
return 0;
}
public final int getDisplayModeChecked() {
return a();
}
public int getTopControlsHeight() {
return 0;
}
public int getTopControlsMinHeight() {
return 0;
}
public void handleKeyboardEvent(KeyEvent keyEvent) {
}
public boolean isFullscreenForTabOrPending() {
return false;
}
public void loadingStateChanged(boolean z) {
}
public void navigationStateChanged(int i) {
}
public void onUpdateUrl(GURL gurl) {
}
public void openNewTab(GURL gurl, String str, ResourceRequestBody resourceRequestBody, int i, boolean z) {
}
public void rendererResponsive() {
}
public void rendererUnresponsive() {
}
public boolean shouldAnimateBrowserControlsHeightChanges() {
return false;
}
public boolean shouldBlockMediaRequest(GURL gurl) {
return false;
}
public boolean shouldCreateWebContents(GURL gurl) {
return true;
}
public void showRepostFormWarningDialog() {
}
public boolean takeFocus(boolean z) {
return false;
}
public void visibleSSLStateChanged() {
}
public void webContentsCreated(WebContents webContents, long j, long j2, String str, GURL gurl, WebContents webContents2) {
}
}
|
[
"cyuubiapps@gmail.com"
] |
cyuubiapps@gmail.com
|
41522e5a163943997b3a6aec03f0567c4c92f1ca
|
2dc55280583e54cd3745fad4145eb7a0712eb503
|
/stardust-engine-core/src/main/java/org/eclipse/stardust/engine/extensions/jaxws/addressing/AttributedURIType.java
|
530edcd7adaebd9d2c92ce95b067d4db87380ac2
|
[] |
no_license
|
markus512/stardust.engine
|
9d5f4fd7016a38c5b3a1fe09cc7a445c00a31b57
|
76e0b326446e440468b4ab54cfb8e26a6403f7d8
|
refs/heads/master
| 2022-02-06T23:03:21.305045
| 2016-03-09T14:56:01
| 2016-03-09T14:56:01
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,484
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-558
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2008.06.05 at 11:30:07 AM CEST
//
package org.eclipse.stardust.engine.extensions.jaxws.addressing;
import java.util.HashMap;
import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyAttribute;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
import javax.xml.namespace.QName;
/**
* <p>
* Java class for AttributedURIType complex type.
*
* <p>
* The following schema fragment specifies the expected content contained within this
* class.
*
* <pre>
* <complexType name="AttributedURIType">
* <simpleContent>
* <extension base="<http://www.w3.org/2001/XMLSchema>anyURI">
* </extension>
* </simpleContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "AttributedURIType", propOrder = {"value"})
public class AttributedURIType
{
@XmlValue
@XmlSchemaType(name = "anyURI")
protected String value;
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
/**
* Gets the value of the value property.
*
* @return possible object is {@link String }
*
*/
public String getValue()
{
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setValue(String value)
{
this.value = value;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this
* class.
*
* <p>
* the map is keyed by the name of the attribute and the value is the string value of
* the attribute.
*
* the map returned by this method is live, and you can add new attribute by updating
* the map directly. Because of this design, there's no setter.
*
*
* @return always non-null
*/
public Map<QName, String> getOtherAttributes()
{
return otherAttributes;
}
}
|
[
"roland.stamm@sungard.com"
] |
roland.stamm@sungard.com
|
78a1cfd8d70e4a78be46814598a30a6776e93f07
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/31/31_8e37c75753bebb713a7a39dbc1e5bf7010a78037/PosixJNAAffinity/31_8e37c75753bebb713a7a39dbc1e5bf7010a78037_PosixJNAAffinity_s.java
|
01af619ce02d73d1d08485be7736463ba430fef2
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 4,172
|
java
|
/*
* Copyright 2013 Peter Lawrey
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.openhft.affinity.impl;
import com.sun.jna.*;
import com.sun.jna.ptr.LongByReference;
import net.openhft.affinity.IAffinity;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* Implementation of {@link IAffinity} based on JNA call of
* sched_setaffinity(3)/sched_getaffinity(3) from 'c' library. Applicable for most
* linux/unix platforms
* <p/>
* TODO Support assignment to core 64 and above
*
* @author peter.lawrey
* @author BegemoT
*/
public enum PosixJNAAffinity implements IAffinity {
INSTANCE;
public static final boolean LOADED;
private static final Logger LOGGER = Logger.getLogger(PosixJNAAffinity.class.getName());
private static final String LIBRARY_NAME = Platform.isWindows() ? "msvcrt" : "c";
@Override
public long getAffinity() {
final CLibrary lib = CLibrary.INSTANCE;
// TODO where are systems with 64+ cores...
final LongByReference cpuset = new LongByReference(0L);
try {
final int ret = lib.sched_getaffinity(0, Long.SIZE / 8, cpuset);
if (ret < 0)
throw new IllegalStateException("sched_getaffinity((" + Long.SIZE / 8 + ") , &(" + cpuset + ") ) return " + ret);
return cpuset.getValue();
} catch (LastErrorException e) {
throw new IllegalStateException("sched_getaffinity((" + Long.SIZE / 8 + ") , &(" + cpuset + ") ) errorNo=" + e.getErrorCode(), e);
}
}
@Override
public void setAffinity(final long affinity) {
final CLibrary lib = CLibrary.INSTANCE;
try {
//fixme: where are systems with more then 64 cores...
final int ret = lib.sched_setaffinity(0, Long.SIZE / 8, new LongByReference(affinity));
if (ret < 0) {
throw new IllegalStateException("sched_setaffinity((" + Long.SIZE / 8 + ") , &(" + affinity + ") ) return " + ret);
}
} catch (LastErrorException e) {
throw new IllegalStateException("sched_getaffinity((" + Long.SIZE / 8 + ") , &(" + affinity + ") ) errorNo=" + e.getErrorCode(), e);
}
}
@Override
public int getCpu() {
final CLibrary lib = CLibrary.INSTANCE;
try {
final int ret = lib.sched_getcpu();
if (ret < 0)
throw new IllegalStateException("sched_getcpu( ) return " + ret);
return ret;
} catch (LastErrorException e) {
throw new IllegalStateException("sched_getcpu( ) errorNo=" + e.getErrorCode(), e);
}
}
/**
* @author BegemoT
*/
interface CLibrary extends Library {
CLibrary INSTANCE = (CLibrary)
Native.loadLibrary(LIBRARY_NAME, CLibrary.class);
int sched_setaffinity(final int pid,
final int cpusetsize,
final PointerType cpuset) throws LastErrorException;
int sched_getaffinity(final int pid,
final int cpusetsize,
final PointerType cpuset) throws LastErrorException;
int sched_getcpu() throws LastErrorException;
}
static {
boolean loaded = false;
try {
INSTANCE.getAffinity();
loaded = true;
} catch (UnsatisfiedLinkError e) {
LOGGER.log(Level.WARNING, "Unable to load jna library " + e);
}
LOADED = loaded;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
65f95e980cfb738a18409c555bc014d9b0c19c35
|
55359c1c80430b58c22fd2471f20afc94e7cdc3a
|
/src/main/java/com/sudoplay/math/TrigLUT.java
|
5875ac6c6a203c73422c483b0f600450f9fd2330
|
[
"Apache-2.0",
"CC-BY-3.0",
"BSD-3-Clause"
] |
permissive
|
SudoPlayGames/SudoMath
|
e27405152528626b569fae9b0b6de81f1dfe73df
|
dfa2b98c509a94c0f3e5563f4fcb6ea9d7001e38
|
refs/heads/master
| 2020-12-24T17:35:34.429788
| 2017-08-14T21:08:51
| 2017-08-14T21:08:51
| 20,983,597
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,141
|
java
|
/*
* Copyright (C) 2014 Jason Taylor.
* Released as open-source under the Apache License, Version 2.0.
*
* =\/==========================================================================
*
* Copyright (C) 2014 Jason Taylor
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* =============================================================================
*
* This class contains code from http://riven8192.blogspot.com, copyright Riven
* and licensed under CC BY 3.0.
*
* =\/==========================================================================
*
* Copyright (c) 2009, 2012 + any other year Riven
* All rights reserved.
*
* http://creativecommons.org/licenses/by/3.0/
*
*/
package com.sudoplay.math;
/**
* Thanks to Riven:
* <p>
* http://riven8192.blogspot.com/2009/08/fastmath-sincos-lookup-tables.html
* http://riven8192.blogspot.com/2009/08/fastmath-atan2-lookup-table.html
*
* @author Riven
*/
public class TrigLUT {
public static final float sin(float rad) {
return sin[(int) (rad * radToIndex) & SIN_MASK];
}
public static final float cos(float rad) {
return cos[(int) (rad * radToIndex) & SIN_MASK];
}
public static final float sinDeg(float deg) {
return sin[(int) (deg * degToIndex) & SIN_MASK];
}
public static final float cosDeg(float deg) {
return cos[(int) (deg * degToIndex) & SIN_MASK];
}
// private static final float RAD, DEG;
private static final int SIN_BITS, SIN_MASK, SIN_COUNT;
private static final float radFull, radToIndex;
private static final float degFull, degToIndex;
private static final float[] sin, cos;
static {
// RAD = (float) Math.PI / 180.0f;
// DEG = 180.0f / (float) Math.PI;
SIN_BITS = 12;
SIN_MASK = ~(-1 << SIN_BITS);
SIN_COUNT = SIN_MASK + 1;
radFull = (float) (Math.PI * 2.0);
degFull = (float) (360.0);
radToIndex = SIN_COUNT / radFull;
degToIndex = SIN_COUNT / degFull;
sin = new float[SIN_COUNT];
cos = new float[SIN_COUNT];
for (int i = 0; i < SIN_COUNT; i++) {
sin[i] = (float) Math.sin((i + 0.5f) / SIN_COUNT * radFull);
cos[i] = (float) Math.cos((i + 0.5f) / SIN_COUNT * radFull);
}
}
public static final float atan2(float y, float x) {
float add, mul;
if (x < 0.0f) {
if (y < 0.0f) {
x = -x;
y = -y;
mul = 1.0f;
} else {
x = -x;
mul = -1.0f;
}
add = -3.141592653f;
} else {
if (y < 0.0f) {
y = -y;
mul = -1.0f;
} else {
mul = 1.0f;
}
add = 0.0f;
}
float invDiv = ATAN2_DIM_MINUS_1 / ((x < y) ? y : x);
// int xi = (int) (x * invDiv);
// int yi = (int) (y * invDiv);
// potential solution for index out of bounds
int xi = Math.min((int) (x * invDiv), ATAN2_DIM);
int yi = Math.min((int) (y * invDiv), ATAN2_DIM);
return (atan2[yi * ATAN2_DIM + xi] + add) * mul;
}
private static final int ATAN2_BITS = 7;
private static final int ATAN2_BITS2 = ATAN2_BITS << 1;
private static final int ATAN2_MASK = ~(-1 << ATAN2_BITS2);
private static final int ATAN2_COUNT = ATAN2_MASK + 1;
private static final int ATAN2_DIM = (int) Math.sqrt(ATAN2_COUNT);
private static final float ATAN2_DIM_MINUS_1 = (ATAN2_DIM - 1);
private static final float[] atan2 = new float[ATAN2_COUNT];
static {
for (int i = 0; i < ATAN2_DIM; i++) {
for (int j = 0; j < ATAN2_DIM; j++) {
float x0 = (float) i / ATAN2_DIM;
float y0 = (float) j / ATAN2_DIM;
atan2[j * ATAN2_DIM + i] = (float) Math.atan2(y0, x0);
}
}
}
}
|
[
"jason@codetaylor.com"
] |
jason@codetaylor.com
|
fd30af5d7099e761469dff23628fa93785169736
|
36073e09d6a12a275cc85901317159e7fffa909e
|
/querydsl_querydsl/modifiedFiles/14/tests/ExtendedNamingStrategyTest.java
|
f4f36038ed7955fbb9493ced320fdd9debd408a3
|
[] |
no_license
|
monperrus/bug-fixes-saner16
|
a867810451ddf45e2aaea7734d6d0c25db12904f
|
9ce6e057763db3ed048561e954f7aedec43d4f1a
|
refs/heads/master
| 2020-03-28T16:00:18.017068
| 2018-11-14T13:48:57
| 2018-11-14T13:48:57
| 148,648,848
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,621
|
java
|
/*
* Copyright 2011, Mysema Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.mysema.query.sql;
import static org.junit.Assert.assertEquals;
import org.junit.Before;
import org.junit.Test;
import com.mysema.codegen.model.Types;
import com.mysema.query.codegen.EntityType;
public class ExtendedNamingStrategyTest {
private NamingStrategy namingStrategy = new ExtendedNamingStrategy();
private EntityType entityModel;
@Before
public void setUp(){
entityModel = new EntityType(Types.OBJECT);
//entityModel.addAnnotation(new TableImpl("OBJECT"));
entityModel.getData().put("table", "OBJECT");
}
@Test
public void GetClassName() {
assertEquals("UserData", namingStrategy.getClassName("user_data"));
assertEquals("U", namingStrategy.getClassName("u"));
assertEquals("Us",namingStrategy.getClassName("us"));
assertEquals("U", namingStrategy.getClassName("u_"));
assertEquals("Us",namingStrategy.getClassName("us_"));
}
@Test
public void GetPropertyName() {
assertEquals("whileCol", namingStrategy.getPropertyName("while", entityModel));
assertEquals("name", namingStrategy.getPropertyName("name", entityModel));
assertEquals("userId", namingStrategy.getPropertyName("user_id", entityModel));
assertEquals("accountEventId", namingStrategy.getPropertyName("accountEvent_id", entityModel));
}
@Test
public void GetPropertyName_For_Column_With_Spaces() {
assertEquals("userId", namingStrategy.getPropertyName("user id", entityModel));
}
@Test
public void GetPropertyNameForInverseForeignKey(){
assertEquals("_superiorFk", namingStrategy.getPropertyNameForInverseForeignKey("fk_superior", entityModel));
// fk_order_rows
assertEquals("rows", namingStrategy.getPropertyNameForInverseForeignKey("fk_order_rows", entityModel));
// fk_category_events
assertEquals("events", namingStrategy.getPropertyNameForInverseForeignKey("fk_category_events", entityModel));
}
@Test
public void GetPropertyNameForForeignKey(){
assertEquals("superiorFk", namingStrategy.getPropertyNameForForeignKey("fk_superior", entityModel));
assertEquals("superiorFk", namingStrategy.getPropertyNameForForeignKey("FK_SUPERIOR", entityModel));
// fk_order_rows
assertEquals("order", namingStrategy.getPropertyNameForForeignKey("fk_order_rows", entityModel));
// fk_category_events
assertEquals("category", namingStrategy.getPropertyNameForForeignKey("fk_category_events", entityModel));
}
@Test
public void GetPropertyNameForPrimaryKey(){
assertEquals("superiorPk", namingStrategy.getPropertyNameForPrimaryKey("pk_superior", entityModel));
assertEquals("superiorPk", namingStrategy.getPropertyNameForPrimaryKey("PK_SUPERIOR", entityModel));
}
@Test
public void GetDefaultVariableName(){
assertEquals("object", namingStrategy.getDefaultVariableName(entityModel));
}
}
|
[
"martin.monperrus@gnieh.org"
] |
martin.monperrus@gnieh.org
|
a3e3e72ab922217c5a32d7c3910bd53a6b122fef
|
e42afd54dcc0add3d2b8823ee98a18c50023a396
|
/java-compute/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/HttpJsonNodeGroupsCallableFactory.java
|
b3f102f98789dae715b5e97bfd0f1a1b30cba706
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
degloba/google-cloud-java
|
eea41ebb64f4128583533bc1547e264e730750e2
|
b1850f15cd562c659c6e8aaee1d1e65d4cd4147e
|
refs/heads/master
| 2022-07-07T17:29:12.510736
| 2022-07-04T09:19:33
| 2022-07-04T09:19:33
| 180,201,746
| 0
| 0
|
Apache-2.0
| 2022-07-04T09:17:23
| 2019-04-08T17:42:24
|
Java
|
UTF-8
|
Java
| false
| false
| 4,579
|
java
|
/*
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://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.cloud.compute.v1.stub;
import com.google.api.core.BetaApi;
import com.google.api.gax.httpjson.HttpJsonCallSettings;
import com.google.api.gax.httpjson.HttpJsonCallableFactory;
import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable;
import com.google.api.gax.httpjson.HttpJsonStubCallableFactory;
import com.google.api.gax.rpc.BatchingCallSettings;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.OperationCallSettings;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.PagedCallSettings;
import com.google.api.gax.rpc.ServerStreamingCallSettings;
import com.google.api.gax.rpc.ServerStreamingCallable;
import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.compute.v1.Operation;
import javax.annotation.Generated;
// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
* REST callable factory implementation for the NodeGroups service API.
*
* <p>This class is for advanced usage.
*/
@Generated("by gapic-generator-java")
@BetaApi
public class HttpJsonNodeGroupsCallableFactory
implements HttpJsonStubCallableFactory<Operation, ZoneOperationsStub> {
@Override
public <RequestT, ResponseT> UnaryCallable<RequestT, ResponseT> createUnaryCallable(
HttpJsonCallSettings<RequestT, ResponseT> httpJsonCallSettings,
UnaryCallSettings<RequestT, ResponseT> callSettings,
ClientContext clientContext) {
return HttpJsonCallableFactory.createUnaryCallable(
httpJsonCallSettings, callSettings, clientContext);
}
@Override
public <RequestT, ResponseT, PagedListResponseT>
UnaryCallable<RequestT, PagedListResponseT> createPagedCallable(
HttpJsonCallSettings<RequestT, ResponseT> httpJsonCallSettings,
PagedCallSettings<RequestT, ResponseT, PagedListResponseT> callSettings,
ClientContext clientContext) {
return HttpJsonCallableFactory.createPagedCallable(
httpJsonCallSettings, callSettings, clientContext);
}
@Override
public <RequestT, ResponseT> UnaryCallable<RequestT, ResponseT> createBatchingCallable(
HttpJsonCallSettings<RequestT, ResponseT> httpJsonCallSettings,
BatchingCallSettings<RequestT, ResponseT> callSettings,
ClientContext clientContext) {
return HttpJsonCallableFactory.createBatchingCallable(
httpJsonCallSettings, callSettings, clientContext);
}
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
@Override
public <RequestT, ResponseT, MetadataT>
OperationCallable<RequestT, ResponseT, MetadataT> createOperationCallable(
HttpJsonCallSettings<RequestT, Operation> httpJsonCallSettings,
OperationCallSettings<RequestT, ResponseT, MetadataT> callSettings,
ClientContext clientContext,
ZoneOperationsStub operationsStub) {
UnaryCallable<RequestT, Operation> innerCallable =
HttpJsonCallableFactory.createBaseUnaryCallable(
httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext);
HttpJsonOperationSnapshotCallable<RequestT, Operation> initialCallable =
new HttpJsonOperationSnapshotCallable<RequestT, Operation>(
innerCallable,
httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory());
return HttpJsonCallableFactory.createOperationCallable(
callSettings, clientContext, operationsStub.longRunningClient(), initialCallable);
}
@Override
public <RequestT, ResponseT>
ServerStreamingCallable<RequestT, ResponseT> createServerStreamingCallable(
HttpJsonCallSettings<RequestT, ResponseT> httpJsonCallSettings,
ServerStreamingCallSettings<RequestT, ResponseT> callSettings,
ClientContext clientContext) {
return HttpJsonCallableFactory.createServerStreamingCallable(
httpJsonCallSettings, callSettings, clientContext);
}
}
|
[
"neenushaji@google.com"
] |
neenushaji@google.com
|
36638d266b2a9d91cca03a17ec554360334c4519
|
17c7cc174a4212674a83206b08d43893b0c5c822
|
/src/main/java/gutenberg/itext/pegdown/TableInfos.java
|
611854b974a97bb31820eb86e480217e8529a003
|
[
"MIT"
] |
permissive
|
Arnauld/gutenberg
|
b321bb34dedd371820f359b0ca8c052d72c09767
|
18d761ddba378ee58a3f3dc6316f66742df8d985
|
refs/heads/master
| 2021-05-15T01:47:02.146235
| 2019-02-12T21:50:43
| 2019-02-12T21:50:43
| 22,622,311
| 3
| 3
|
MIT
| 2019-02-12T21:44:20
| 2014-08-04T22:36:02
|
Java
|
UTF-8
|
Java
| false
| false
| 1,040
|
java
|
package gutenberg.itext.pegdown;
import com.itextpdf.text.Element;
import com.itextpdf.text.pdf.PdfPTable;
import org.pegdown.ast.TableColumnNode;
import java.util.List;
/**
* @author <a href="http://twitter.com/aloyer">@aloyer</a>
*/
public class TableInfos {
private final PdfPTable table;
private final List<TableColumnNode> tableNodeColumns;
public TableInfos(PdfPTable table, List<TableColumnNode> tableNodeColumns) {
this.table = table;
this.tableNodeColumns = tableNodeColumns;
}
public PdfPTable getTable() {
return table;
}
public int columnAlignment(int col) {
TableColumnNode tcn = tableNodeColumns.get(col);
switch (tcn.getAlignment()) {
case Left:
return Element.ALIGN_LEFT;
case Right:
return Element.ALIGN_RIGHT;
case None:
return Element.ALIGN_UNDEFINED;
case Center:
default:
return Element.ALIGN_CENTER;
}
}
}
|
[
"arnauld.loyer@gmail.com"
] |
arnauld.loyer@gmail.com
|
01bd89c8b74bdd14feeaf8bfb7ae5a169748a07f
|
55efec1c96c8d1eaf8bbd70ab84621017c535c72
|
/src/main/java/kz/gelleson/findep/domain/JobHistory.java
|
eddfcbc912b8f15bcf623a88e3d0f15af5f7ae6f
|
[] |
no_license
|
ghistory/finance
|
388fa4a27ea0c7d9d274f72367e9e95c3e7a0636
|
c652c5dd4b760f67ee1b86065d8fa7bf0a27cbda
|
refs/heads/main
| 2023-01-14T20:19:01.274980
| 2020-11-23T19:05:09
| 2020-11-23T19:05:09
| 315,405,542
| 0
| 0
| null | 2022-04-13T07:44:25
| 2020-11-23T18:29:40
|
Java
|
UTF-8
|
Java
| false
| false
| 3,463
|
java
|
package kz.gelleson.findep.domain;
import javax.persistence.*;
import java.io.Serializable;
import java.time.Instant;
import kz.gelleson.findep.domain.enumeration.Language;
/**
* A JobHistory.
*/
@Entity
@Table(name = "job_history")
public class JobHistory implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator")
@SequenceGenerator(name = "sequenceGenerator")
private Long id;
@Column(name = "start_date")
private Instant startDate;
@Column(name = "end_date")
private Instant endDate;
@Enumerated(EnumType.STRING)
@Column(name = "language")
private Language language;
@OneToOne
@JoinColumn(unique = true)
private Job job;
@OneToOne
@JoinColumn(unique = true)
private Department department;
@OneToOne
@JoinColumn(unique = true)
private Employee employee;
// jhipster-needle-entity-add-field - JHipster will add fields here
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Instant getStartDate() {
return startDate;
}
public JobHistory startDate(Instant startDate) {
this.startDate = startDate;
return this;
}
public void setStartDate(Instant startDate) {
this.startDate = startDate;
}
public Instant getEndDate() {
return endDate;
}
public JobHistory endDate(Instant endDate) {
this.endDate = endDate;
return this;
}
public void setEndDate(Instant endDate) {
this.endDate = endDate;
}
public Language getLanguage() {
return language;
}
public JobHistory language(Language language) {
this.language = language;
return this;
}
public void setLanguage(Language language) {
this.language = language;
}
public Job getJob() {
return job;
}
public JobHistory job(Job job) {
this.job = job;
return this;
}
public void setJob(Job job) {
this.job = job;
}
public Department getDepartment() {
return department;
}
public JobHistory department(Department department) {
this.department = department;
return this;
}
public void setDepartment(Department department) {
this.department = department;
}
public Employee getEmployee() {
return employee;
}
public JobHistory employee(Employee employee) {
this.employee = employee;
return this;
}
public void setEmployee(Employee employee) {
this.employee = employee;
}
// jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof JobHistory)) {
return false;
}
return id != null && id.equals(((JobHistory) o).id);
}
@Override
public int hashCode() {
return 31;
}
// prettier-ignore
@Override
public String toString() {
return "JobHistory{" +
"id=" + getId() +
", startDate='" + getStartDate() + "'" +
", endDate='" + getEndDate() + "'" +
", language='" + getLanguage() + "'" +
"}";
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
f3eecd43fb7a487347b2e5853ddd00ba1f0da3ce
|
2448d6c8338ea5328aa44da6ca27cb54d37a2196
|
/broadleaf-profile/src/main/java/org/broadleafcommerce/profile/core/domain/PhoneImpl.java
|
201017e8bc12ebe3e07eb9d0f2422b0d261493fb
|
[] |
no_license
|
RDeztroyer/StartUP-master
|
8077240074816a3535eac309a009d9d0d5e36df6
|
5262bbd0a5225529a38e5a68eb651177b029050c
|
refs/heads/master
| 2023-03-05T20:08:52.418953
| 2013-07-06T17:44:38
| 2013-07-06T17:44:38
| 338,304,002
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,934
|
java
|
/*
* Copyright 2008-2012 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.broadleafcommerce.profile.core.domain;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;
import javax.persistence.TableGenerator;
import org.broadleafcommerce.common.presentation.AdminPresentation;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
@Entity
@Inheritance(strategy = InheritanceType.JOINED)
@Table(name = "BLC_PHONE")
@Cache(usage=CacheConcurrencyStrategy.NONSTRICT_READ_WRITE, region="blOrderElements")
public class PhoneImpl implements Phone {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(generator = "PhoneId", strategy = GenerationType.TABLE)
@TableGenerator(name = "PhoneId", table = "SEQUENCE_GENERATOR", pkColumnName = "ID_NAME", valueColumnName = "ID_VAL", pkColumnValue = "PhoneImpl", allocationSize = 50)
@Column(name = "PHONE_ID")
protected Long id;
@Column(name = "PHONE_NUMBER", nullable=false)
@AdminPresentation(friendlyName = "PhoneImpl_Phone_Number", order=1, group = "PhoneImpl_Phone")
protected String phoneNumber;
@Column(name = "IS_DEFAULT")
@AdminPresentation(friendlyName = "PhoneImpl_Default_Phone", order=2, group = "PhoneImpl_Phone")
protected boolean isDefault = false;
@Column(name = "IS_ACTIVE")
@AdminPresentation(friendlyName = "PhoneImpl_Active_Phone", order=3, group = "PhoneImpl_Phone")
protected boolean isActive = true;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getPhoneNumber() {
return phoneNumber;
}
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}
public boolean isDefault() {
return isDefault;
}
public void setDefault(boolean isDefault) {
this.isDefault = isDefault;
}
public boolean isActive() {
return isActive;
}
public void setActive(boolean isActive) {
this.isActive = isActive;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + (isActive ? 1231 : 1237);
result = prime * result + (isDefault ? 1231 : 1237);
result = prime * result + ((phoneNumber == null) ? 0 : phoneNumber.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
PhoneImpl other = (PhoneImpl) obj;
if (id != null && other.id != null) {
return id.equals(other.id);
}
if (isActive != other.isActive)
return false;
if (isDefault != other.isDefault)
return false;
if (phoneNumber == null) {
if (other.phoneNumber != null)
return false;
} else if (!phoneNumber.equals(other.phoneNumber))
return false;
return true;
}
}
|
[
"bharath.abcom@gmail.com"
] |
bharath.abcom@gmail.com
|
d0f12fa160eb465832cbb0838562184002d8b38b
|
cc70f0eac152553f0744954a1c4da8af67faa5ab
|
/PPA/src/examples/AllCodeSnippets/class_924.java
|
3a3c4af1afd7f0cec8e8471a498d0c776da2fb6b
|
[] |
no_license
|
islamazhar/Detecting-Insecure-Implementation-code-snippets
|
b49b418e637a2098027e6ce70c0ddf93bc31643b
|
af62bef28783c922a8627c62c700ef54028b3253
|
refs/heads/master
| 2023-02-01T10:48:31.815921
| 2020-12-11T00:21:40
| 2020-12-11T00:21:40
| 307,543,127
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,131
|
java
|
package examples.AllCodeSnippets;
public class class_924{
public static void main() {
private static String generateSasToken(String uri, String keyName, String key){
String ret = ";
// long tokenExpirationTime = (System.currentTimeMillis() / 1000) + (10 * 365 * 24 * 60 * 60);
Date now = new Date();
Date previousDate=new Date(1970);
long tokenExpirationTime = ((now.getTime() - previousDate.getTime()) / 1000 )+3600;
try {
String stringToSign = URLEncoder.encode(new URL(uri).toString(),java.nio.charset.StandardCharsets.UTF_8.toString()) + "\n" + tokenExpirationTime;
System.out.println(stringToSign);
SecretKey secretKey = null;
byte[] keyBytes = key.getBytes("UTF-8");
Mac mac = Mac.getInstance("HMACSHA256");
secretKey = new SecretKeySpec(keyBytes, mac.getAlgorithm());
mac.init(secretKey);
byte[] digest = mac.doFinal(stringToSign.getBytes());
//We then use the composite signing key to create an oauth_signature from the signature base string
String signature = Base64.encodeBase64String(digest);
System.out.println( URLEncoder.encode(signature, java.nio.charset.StandardCharsets.UTF_8.toString()));
// String signature = Base64.encodeBase64String(mac.doFinal(stringToSign.getBytes("UTF-8")));
ret = String.format("SharedAccessSignature sr=%s&sig=%s&se=%s&skn=%s",
URLEncoder.encode(uri, java.nio.charset.StandardCharsets.UTF_8.toString()),
URLEncoder.encode(signature, java.nio.charset.StandardCharsets.UTF_8.toString()),
String.valueOf(tokenExpirationTime),
keyName);
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (InvalidKeyException e) {
e.printStackTrace();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return ret;
}
}
}
|
[
"mislam9@wisc.edu"
] |
mislam9@wisc.edu
|
6cbe271b4c2d53acb724b06a3bdff60e1230bf53
|
13e443a64c99bf0028db2eb27224eb6406f6c1c2
|
/src/main/java/net/minecraft/client/renderer/entity/layers/IronGolenFlowerLayer.java
|
c97e93e5b227d0a5270a077eac8883e9ffc59846
|
[] |
no_license
|
NicholasBlackburn1/Robo_Hacker
|
5a779679d643250676c1c075d6697b10e8a7a9c5
|
02506e742d30df6a255ba63b240773a08c40bd74
|
refs/heads/main
| 2023-06-19T14:37:19.499548
| 2021-05-10T15:08:28
| 2021-05-10T15:08:28
| 353,691,155
| 2
| 2
| null | 2021-04-02T14:16:50
| 2021-04-01T12:23:15
|
Java
|
UTF-8
|
Java
| false
| false
| 1,927
|
java
|
package net.minecraft.client.renderer.entity.layers;
import com.mojang.blaze3d.matrix.MatrixStack;
import net.minecraft.block.Blocks;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.IRenderTypeBuffer;
import net.minecraft.client.renderer.entity.IEntityRenderer;
import net.minecraft.client.renderer.entity.model.IronGolemModel;
import net.minecraft.client.renderer.model.ModelRenderer;
import net.minecraft.client.renderer.texture.OverlayTexture;
import net.minecraft.entity.passive.IronGolemEntity;
import net.minecraft.util.math.vector.Vector3f;
public class IronGolenFlowerLayer extends LayerRenderer<IronGolemEntity, IronGolemModel<IronGolemEntity>>
{
public IronGolenFlowerLayer(IEntityRenderer<IronGolemEntity, IronGolemModel<IronGolemEntity>> p_i50935_1_)
{
super(p_i50935_1_);
}
public void render(MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int packedLightIn, IronGolemEntity entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch)
{
if (entitylivingbaseIn.getHoldRoseTick() != 0)
{
matrixStackIn.push();
ModelRenderer modelrenderer = this.getEntityModel().getArmHoldingRose();
modelrenderer.translateRotate(matrixStackIn);
matrixStackIn.translate(-1.1875D, 1.0625D, -0.9375D);
matrixStackIn.translate(0.5D, 0.5D, 0.5D);
float f = 0.5F;
matrixStackIn.scale(0.5F, 0.5F, 0.5F);
matrixStackIn.rotate(Vector3f.XP.rotationDegrees(-90.0F));
matrixStackIn.translate(-0.5D, -0.5D, -0.5D);
Minecraft.getInstance().getBlockRendererDispatcher().renderBlock(Blocks.POPPY.getDefaultState(), matrixStackIn, bufferIn, packedLightIn, OverlayTexture.NO_OVERLAY);
matrixStackIn.pop();
}
}
}
|
[
"nickblackburn02@gmail.com"
] |
nickblackburn02@gmail.com
|
f52da813ff900d53f12b0bb45f3f89881f53b608
|
ff0c33ccd3bbb8a080041fbdbb79e29989691747
|
/jdk.internal.vm.compiler/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/CompressionNode.java
|
ed96f97abb58231a3c88d4efd4273452d4972214
|
[] |
no_license
|
jiecai58/jdk15
|
7d0f2e518e3f6669eb9ebb804f3c89bbfb2b51f0
|
b04691a72e51947df1b25c31175071f011cb9bbe
|
refs/heads/main
| 2023-02-25T00:30:30.407901
| 2021-01-29T04:48:33
| 2021-01-29T04:48:33
| 330,704,930
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,168
|
java
|
/*
* Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package org.graalvm.compiler.nodes;
import static org.graalvm.compiler.core.common.GraalOptions.GeneratePIC;
import static org.graalvm.compiler.nodeinfo.NodeCycles.CYCLES_2;
import static org.graalvm.compiler.nodeinfo.NodeSize.SIZE_2;
import org.graalvm.compiler.core.common.CompressEncoding;
import org.graalvm.compiler.core.common.type.AbstractObjectStamp;
import org.graalvm.compiler.core.common.type.Stamp;
import org.graalvm.compiler.debug.GraalError;
import org.graalvm.compiler.graph.NodeClass;
import org.graalvm.compiler.graph.spi.CanonicalizerTool;
import org.graalvm.compiler.lir.gen.LIRGeneratorTool;
import org.graalvm.compiler.nodeinfo.NodeInfo;
import org.graalvm.compiler.nodes.calc.ConvertNode;
import org.graalvm.compiler.nodes.calc.UnaryNode;
import org.graalvm.compiler.nodes.spi.LIRLowerable;
import org.graalvm.compiler.nodes.spi.NodeLIRBuilderTool;
import org.graalvm.compiler.nodes.type.StampTool;
import jdk.vm.ci.meta.Constant;
import jdk.vm.ci.meta.JavaConstant;
import jdk.vm.ci.meta.ConstantReflectionProvider;
import jdk.vm.ci.meta.Value;
/**
* Compress or uncompress an oop or metaspace pointer.
*/
@NodeInfo(nameTemplate = "{p#op/s}", cycles = CYCLES_2, size = SIZE_2)
public abstract class CompressionNode extends UnaryNode implements ConvertNode, LIRLowerable {
public static final NodeClass<CompressionNode> TYPE = NodeClass.create(CompressionNode.class);
public enum CompressionOp {
Compress,
Uncompress
}
protected final CompressionOp op;
protected final CompressEncoding encoding;
public CompressionNode(NodeClass<? extends UnaryNode> c, CompressionOp op, ValueNode input, Stamp stamp, CompressEncoding encoding) {
super(c, stamp, input);
this.op = op;
this.encoding = encoding;
}
@Override
public Stamp foldStamp(Stamp newStamp) {
assert newStamp.isCompatible(getValue().stamp(NodeView.DEFAULT));
return mkStamp(newStamp);
}
protected abstract Constant compress(Constant c);
protected abstract Constant uncompress(Constant c);
public JavaConstant nullConstant() {
return JavaConstant.NULL_POINTER;
}
@Override
public Constant convert(Constant c, ConstantReflectionProvider constantReflection) {
switch (op) {
case Compress:
return compress(c);
case Uncompress:
return uncompress(c);
default:
throw GraalError.shouldNotReachHere();
}
}
@Override
public Constant reverse(Constant c, ConstantReflectionProvider constantReflection) {
switch (op) {
case Compress:
return uncompress(c);
case Uncompress:
return compress(c);
default:
throw GraalError.shouldNotReachHere();
}
}
@Override
public boolean isLossless() {
return true;
}
protected abstract Stamp mkStamp(Stamp input);
public CompressionOp getOp() {
return op;
}
public CompressEncoding getEncoding() {
return encoding;
}
@Override
public ValueNode canonical(CanonicalizerTool tool, ValueNode forValue) {
if (forValue.isConstant()) {
if (GeneratePIC.getValue(tool.getOptions())) {
// We always want uncompressed constants
return this;
}
ConstantNode constant = (ConstantNode) forValue;
return ConstantNode.forConstant(stamp(NodeView.DEFAULT), convert(constant.getValue(), tool.getConstantReflection()), constant.getStableDimension(), constant.isDefaultStable(),
tool.getMetaAccess());
} else if (forValue instanceof CompressionNode) {
CompressionNode other = (CompressionNode) forValue;
if (op != other.op && encoding.equals(other.encoding)) {
return other.getValue();
}
}
return this;
}
@Override
public void generate(NodeLIRBuilderTool gen) {
boolean nonNull;
if (value.stamp(NodeView.DEFAULT) instanceof AbstractObjectStamp) {
nonNull = StampTool.isPointerNonNull(value.stamp(NodeView.DEFAULT));
} else {
// metaspace pointers are never null
nonNull = true;
}
LIRGeneratorTool tool = gen.getLIRGeneratorTool();
Value result;
switch (op) {
case Compress:
result = tool.emitCompress(gen.operand(value), encoding, nonNull);
break;
case Uncompress:
result = tool.emitUncompress(gen.operand(value), encoding, nonNull);
break;
default:
throw GraalError.shouldNotReachHere();
}
gen.setResult(this, result);
}
@Override
public boolean mayNullCheckSkipConversion() {
return true;
}
}
|
[
"caijie2@tuhu.cn"
] |
caijie2@tuhu.cn
|
8b31273893d8ddfaa9dbba9bdabfaa7ce2453c12
|
f243daa0f6025e3e8721e0fbebdcf0518ea22d0a
|
/src/main/java/net/whg/match/Match.java
|
e005ac4a27bc4c9a74fbba9ac7785693e8277c81
|
[
"MIT"
] |
permissive
|
TheDudeFromCI/Spigot-BotDown
|
b6b81b7a918450426e3fb9858ae5952c2f0573fb
|
c969611f1a6babe524e399335fb66e943bf1288d
|
refs/heads/main
| 2023-02-19T19:20:09.039681
| 2021-01-21T04:14:58
| 2021-01-21T04:14:58
| 321,056,062
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,382
|
java
|
package net.whg.match;
import java.util.List;
import java.util.UUID;
import org.bukkit.entity.Player;
import net.whg.util.PartialReadonlyList;
/**
* Represents an active match.
*/
public class Match {
private final PartialReadonlyList<Player> players = new PartialReadonlyList<>();
private final UUID uuid;
private final int x;
private final int z;
private final int size;
private boolean active = false;
/**
* Creates a new, empty match object.
*
* @param x - The x world position of this match.
* @param z - The z world position of this match.
* @param size - The size of the match in blocks.
*/
Match(int x, int z, int size) {
this.x = x;
this.z = z;
this.size = size;
uuid = UUID.randomUUID();
}
/**
* Adds a new player to this match.
*/
void addPlayer(Player player) {
players.add(player);
}
/**
* Removes a player from this match.
*/
void removePlayer(Player player) {
players.remove(player);
}
/**
* Gets a list of all players currently in this match.
*
* @return A read-only list of all players.
*/
public List<Player> getPlayers() {
return players.readonly();
}
/**
* Starts this match.
*/
void start() {
active = true;
}
/**
* Ends this match.
*/
void end() {
active = false;
players.clear();
}
/**
* Gets whether or not this match is currently active.
*
* @return True if this match is active, false if the match has not yet started,
* or has already ended.
*/
public boolean isActive() {
return active;
}
/**
* Gets the UUID of this match.
*
* @return The uuid.
*/
public UUID getUUID() {
return uuid;
}
/**
* Gets the world x position of this match arena.
*
* @return The world x position.
*/
public int x() {
return x;
}
/**
* Gets the world z position of this match arena.
*
* @return The world z position.
*/
public int z() {
return z;
}
/**
* Gets the size of this match arena in blocks.
*
* @return The match size.
*/
public int size() {
return size;
}
}
|
[
"thedudefromci@gmail.com"
] |
thedudefromci@gmail.com
|
7d6f470de0847f16bf66af38b1a11f76d8a8f557
|
f7a25da32609d722b7ac9220bf4694aa0476f7b2
|
/net/minecraft/world/item/BowlFoodItem.java
|
e0735ad563ad6554a1f29f3eeda006bccd62ef47
|
[] |
no_license
|
basaigh/temp
|
89e673227e951a7c282c50cce72236bdce4870dd
|
1c3091333f4edb2be6d986faaa026826b05008ab
|
refs/heads/master
| 2023-05-04T22:27:28.259481
| 2021-05-31T17:15:09
| 2021-05-31T17:15:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 494
|
java
|
package net.minecraft.world.item;
import net.minecraft.world.level.ItemLike;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.level.Level;
public class BowlFoodItem extends Item {
public BowlFoodItem(final Properties a) {
super(a);
}
@Override
public ItemStack finishUsingItem(final ItemStack bcj, final Level bhr, final LivingEntity aix) {
super.finishUsingItem(bcj, bhr, aix);
return new ItemStack(Items.BOWL);
}
}
|
[
"mark70326511@gmail.com"
] |
mark70326511@gmail.com
|
f16967ce0fe2501e27090d8cb276bc931aea14bb
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XCOMMONS-1057-6-12-FEMO-WeightedSum:TestLen:CallDiversity/org/xwiki/extension/job/internal/UpgradePlanJob_ESTest_scaffolding.java
|
4cc3a93fca05816f983d44d5f39d20d51e176b64
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 451
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sat Apr 04 12:07:27 UTC 2020
*/
package org.xwiki.extension.job.internal;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class UpgradePlanJob_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
c470e4c619d22e9d2cc7ee12110be3b790e22b5d
|
95e944448000c08dd3d6915abb468767c9f29d3c
|
/sources/com/bytedance/android/live/core/rxutils/autodispose/C3286w.java
|
fdd9bf12c70005f8721b4290f881d48fa4fa536f
|
[] |
no_license
|
xrealm/tiktok-src
|
261b1faaf7b39d64bb7cb4106dc1a35963bd6868
|
90f305b5f981d39cfb313d75ab231326c9fca597
|
refs/heads/master
| 2022-11-12T06:43:07.401661
| 2020-07-04T20:21:12
| 2020-07-04T20:21:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,287
|
java
|
package com.bytedance.android.live.core.rxutils.autodispose;
import com.bytedance.android.live.core.rxutils.autodispose.p155b.C3251c;
import java.util.concurrent.atomic.AtomicReference;
import p346io.reactivex.C47557ad;
import p346io.reactivex.C7322c;
import p346io.reactivex.observers.C47865a;
import p346io.reactivex.p347b.C7321c;
/* renamed from: com.bytedance.android.live.core.rxutils.autodispose.w */
final class C3286w<T> implements C3251c<T> {
/* renamed from: a */
final AtomicReference<C7321c> f10011a = new AtomicReference<>();
/* renamed from: b */
final AtomicReference<C7321c> f10012b = new AtomicReference<>();
/* renamed from: c */
private final C7322c f10013c;
/* renamed from: d */
private final C47557ad<? super T> f10014d;
public final void dispose() {
C3254d.m12292a(this.f10012b);
C3254d.m12292a(this.f10011a);
}
public final boolean isDisposed() {
if (this.f10011a.get() == C3254d.DISPOSED) {
return true;
}
return false;
}
public final void onError(Throwable th) {
if (!isDisposed()) {
this.f10011a.lazySet(C3254d.DISPOSED);
C3254d.m12292a(this.f10012b);
this.f10014d.onError(th);
}
}
public final void onSuccess(T t) {
if (!isDisposed()) {
this.f10011a.lazySet(C3254d.DISPOSED);
C3254d.m12292a(this.f10012b);
this.f10014d.onSuccess(t);
}
}
public final void onSubscribe(C7321c cVar) {
C32871 r0 = new C47865a() {
public final void onComplete() {
C3286w.this.f10012b.lazySet(C3254d.DISPOSED);
C3254d.m12292a(C3286w.this.f10011a);
}
public final void onError(Throwable th) {
C3286w.this.f10012b.lazySet(C3254d.DISPOSED);
C3286w.this.onError(th);
}
};
if (C3275n.m12338a(this.f10012b, (C7321c) r0, getClass())) {
this.f10014d.onSubscribe(this);
this.f10013c.mo10176a(r0);
C3275n.m12338a(this.f10011a, cVar, getClass());
}
}
C3286w(C7322c cVar, C47557ad<? super T> adVar) {
this.f10013c = cVar;
this.f10014d = adVar;
}
}
|
[
"65450641+Xyzdesk@users.noreply.github.com"
] |
65450641+Xyzdesk@users.noreply.github.com
|
da4ebbfb632ea7eca1a40991be230bc878e18585
|
fc56fc9a0e418eb5da5265571a543a5d97ae0b13
|
/onlinebanking-hbci4java/src/main/java/de/adorsys/hbci4java/job/AccountInformationJob.java
|
9e3f295673e147229d3542358d5bf70477ec05e8
|
[] |
no_license
|
AKuzovchikov/multibanking
|
893cdd480f84f91b2a9531de8d3bc7fd255ad1cb
|
b2a1d1d837c9592ef791c6b527e21097a6c01ec4
|
refs/heads/master
| 2020-04-30T15:11:34.646218
| 2019-03-21T09:17:25
| 2019-03-21T09:17:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,262
|
java
|
/*
* Copyright 2018-2019 adorsys GmbH & Co KG
*
* 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 de.adorsys.hbci4java.job;
import de.adorsys.hbci4java.model.*;
import domain.BankAccount;
import domain.BankApi;
import domain.Product;
import domain.TanTransportType;
import domain.request.LoadAccountInformationRequest;
import domain.response.LoadAccountInformationResponse;
import exception.HbciException;
import de.adorsys.hbci4java.model.HbciCallback;
import de.adorsys.hbci4java.model.HbciDialogRequest;
import de.adorsys.hbci4java.model.HbciMapping;
import de.adorsys.hbci4java.model.HbciPassport;
import lombok.extern.slf4j.Slf4j;
import org.kapott.hbci.GV.GVSEPAInfo;
import org.kapott.hbci.GV.GVTANMediaList;
import org.kapott.hbci.manager.HBCIDialog;
import org.kapott.hbci.passport.PinTanPassport;
import org.kapott.hbci.status.HBCIExecStatus;
import org.kapott.hbci.structures.Konto;
import java.util.*;
import java.util.stream.Collectors;
@Slf4j
public class AccountInformationJob {
public static LoadAccountInformationResponse loadBankAccounts(LoadAccountInformationRequest request,
HbciCallback callback) {
log.info("Loading account list for bank [{}]", request.getBankCode());
HbciDialogRequest dialogRequest = HbciDialogRequest.builder()
.bankCode(request.getBankCode() != null ? request.getBankCode() : request.getBankAccess().getBankCode())
.customerId(request.getBankAccess().getBankLogin())
.login(request.getBankAccess().getBankLogin2())
.hbciPassportState(request.getBankAccess().getHbciPassportState())
.pin(request.getPin())
.callback(callback)
.build();
dialogRequest.setProduct(Optional.ofNullable(request.getProduct())
.map(product -> new Product(product.getName(), product.getVersion()))
.orElse(null));
dialogRequest.setBpd(request.getBpd());
HBCIDialog dialog = HbciDialogFactory.createDialog(null, dialogRequest);
if (!dialog.getPassport().jobSupported("SEPAInfo"))
throw new RuntimeException("SEPAInfo job not supported");
log.info("fetching SEPA informations");
dialog.addTask(new GVSEPAInfo(dialog.getPassport()));
// TAN-Medien abrufen
if (request.isUpdateTanTransportTypes()) {
if (dialog.getPassport().jobSupported("TANMediaList")) {
log.info("fetching TAN media list");
dialog.addTask(new GVTANMediaList(dialog.getPassport()));
}
}
HBCIExecStatus status = dialog.execute(true);
if (!status.isOK()) {
throw new HbciException(status.getDialogStatus().getErrorString());
}
request.getBankAccess().setBankName(dialog.getPassport().getInstName());
List<BankAccount> hbciAccounts = new ArrayList<>();
for (Konto konto : dialog.getPassport().getAccounts()) {
BankAccount bankAccount = HbciMapping.toBankAccount(konto);
bankAccount.externalId(BankApi.HBCI, UUID.randomUUID().toString());
bankAccount.bankName(request.getBankAccess().getBankName());
hbciAccounts.add(bankAccount);
}
if (request.isUpdateTanTransportTypes()) {
request.getBankAccess().setTanTransportTypes(new HashMap<>());
request.getBankAccess().getTanTransportTypes().put(BankApi.HBCI,
extractTanTransportTypes(dialog.getPassport()));
}
request.getBankAccess().setHbciPassportState(new HbciPassport.State(dialog.getPassport()).toJson());
return LoadAccountInformationResponse.builder()
.bankAccess(request.getBankAccess())
.bankAccounts(hbciAccounts)
.build();
}
public static List<TanTransportType> extractTanTransportTypes(PinTanPassport hbciPassport) {
return hbciPassport.getUserTwostepMechanisms()
.stream()
.map(id -> hbciPassport.getBankTwostepMechanisms().get(id))
.filter(Objects::nonNull)
.map(hbciTwoStepMechanism -> TanTransportType.builder()
.id(hbciTwoStepMechanism.getSecfunc())
.name(hbciTwoStepMechanism.getName())
.inputInfo(hbciTwoStepMechanism.getInputinfo())
.medium(hbciPassport.getTanMedia(hbciTwoStepMechanism.getId()) != null ?
hbciPassport.getTanMedia(hbciTwoStepMechanism.getId()).mediaName : null)
.build())
.collect(Collectors.toList());
}
}
|
[
"age@adorsys.de"
] |
age@adorsys.de
|
aeda5fe9c40ac0803d0e6157fff7ae613bd5dbbf
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/12/12_e613551cd50181378962f61b2a06610f0bbbfa43/ResourceLifecycle/12_e613551cd50181378962f61b2a06610f0bbbfa43_ResourceLifecycle_t.java
|
a6e0d063ecc778de53ff7760645135e9a7a71509
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 1,221
|
java
|
/*
* Copyright 2006-2007 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.item;
/**
* Common interface for classes that require initialisation before they can be
* used and need to free resources after they are no longer used.
*/
public interface ResourceLifecycle {
/**
* This method should be invoked by clients at the start of processing to
* allow initialisation of resources.
*
*/
public void open();
/**
* This method should be invoked by clients after the completion of each
* step and the implementing class should close all managed resources.
*
*/
public void close();
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
a41686f9295e68562efcb697f895c07a72df415b
|
b5d4e06b3f3591db8355442ff5b6a1fbad9244fc
|
/src/main/java/com/effective/enums/PayRollDay.java
|
21c27820a227ee67f7897cac009ca647da6258ba
|
[] |
no_license
|
a514760469/UnderstandJVM
|
a5dc3b0c2aadbdf1680ca63f478cd9390dfcad24
|
1b22127cb5cec4ea2615fafc1a8c56e358a04fbd
|
refs/heads/master
| 2021-08-17T00:14:41.652203
| 2021-06-23T09:07:24
| 2021-06-23T09:07:24
| 185,553,272
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,475
|
java
|
package com.effective.enums;
/**
* 策略枚举 模板
*
* 根据给定的某工人的基本工资以及当天的工作时间,来计算他当天的报酬。
* 在5个工作日中,超过8小时的工作时间会产生加班工资,在节假日中所有工作都产生加班工资。
*/
public enum PayRollDay {
MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY,
SATURDAY(PayType.WEEKEND), SUNDAY(PayType.WEEKEND),
;
private final PayType payType;
// 默认
PayRollDay() {
this(PayType.WEEKDAY);
}
PayRollDay(PayType payType) {
this.payType = payType;
}
int pay(int minutesWorked, int payRate) {
return payType.pay(minutesWorked, payRate);
}
private enum PayType {
WEEKDAY {
@Override
int overtimePay(int minutesWorked, int payRate) {
return minutesWorked <= MINS_PER_SHIFT ? 0 : (minutesWorked - MINS_PER_SHIFT) * payRate / 2;
}
},
WEEKEND {
@Override
int overtimePay(int minutesWorked, int payRate) {
return minutesWorked * payRate / 2;
}
};
private static final int MINS_PER_SHIFT = 8 * 60;
int pay(int minutesWorked, int payRate) {
int basePay = minutesWorked * payRate;
return basePay + overtimePay(minutesWorked, payRate);
}
abstract int overtimePay(int minutesWorked, int payRate);
}
}
|
[
"514760469@qq.com"
] |
514760469@qq.com
|
6f7a8aaec80e087182a21df6573d552118d03ee0
|
abd19b1d2a5c180196bae0d071599b38adb86b12
|
/com.siteview.kernel.core/src/COM/dragonflow/Utils/HtmlUtil.java
|
315b0a0567e75075e5d67f7b60703cdccc6d966f
|
[] |
no_license
|
SiteView/eclipse3.7
|
35d054f83daf4bb4c25d02c24286dd21e4a3a275
|
3fd1f09bd80964476cb40250f3fa92d57a6372f4
|
refs/heads/master
| 2016-09-05T09:56:06.465063
| 2012-04-19T07:29:23
| 2012-04-19T07:29:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,922
|
java
|
/*
* Created on 2005-2-9 3:06:20
*
* .java
*
* History:
*
*/
package COM.dragonflow.Utils;
/**
* Comment for <code></code>
*
* @author
* @version 0.0
*
*
*/
// Referenced classes of package COM.dragonflow.Utils:
// RawXmlWriter, StringPropertyUtil
public class HtmlUtil
{
public HtmlUtil()
{
}
public static String createHiddenInputs(java.util.HashMap hashmap)
{
StringBuffer stringbuffer = new StringBuffer();
java.util.Set set = hashmap.entrySet();
java.util.Map.Entry entry;
for(java.util.Iterator iterator = set.iterator(); iterator.hasNext(); stringbuffer.append("<INPUT type=hidden name='" + COM.dragonflow.Utils.RawXmlWriter.enCodeElement((String)entry.getKey()) + "' id='" + COM.dragonflow.Utils.RawXmlWriter.enCodeElement((String)entry.getKey()) + "' value='" + COM.dragonflow.Utils.RawXmlWriter.enCodeElement((String)entry.getValue()) + "'>\n"))
{
entry = (java.util.Map.Entry)iterator.next();
}
return stringbuffer.toString();
}
public static String createHiddenInputs(COM.dragonflow.Properties.StringProperty astringproperty[], String s, String s1, String s2, String s3)
{
StringBuffer stringbuffer = new StringBuffer();
stringbuffer.append("<INPUT type=hidden id='" + s + s3 + "' value='" + astringproperty.length + "'>\n");
for(int i = 0; i < astringproperty.length; i++)
{
String s4 = COM.dragonflow.Utils.RawXmlWriter.enCodeElement(astringproperty[i].getLabel());
stringbuffer.append("<INPUT type=hidden id='" + s + s1 + i + "' value='" + s4 + "'>\n");
String s5 = COM.dragonflow.Utils.RawXmlWriter.enCodeElement(astringproperty[i].getDescription());
stringbuffer.append("<INPUT type=hidden id='" + s + s2 + i + "' value='" + s5 + "'>\n");
}
return stringbuffer.toString();
}
public static String createCheckboxList(COM.dragonflow.Properties.StringProperty astringproperty[], String s)
{
COM.dragonflow.Properties.StringProperty astringproperty1[] = (COM.dragonflow.Properties.StringProperty[])astringproperty.clone();
COM.dragonflow.Utils.StringPropertyUtil.sortPropsArray(astringproperty1);
StringBuffer stringbuffer = new StringBuffer("<SCRIPT LANGUAGE='Javascript' SRC='/SiteView/htdocs/js/utils.js'></SCRIPT>\n<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>\n <TR>\n <TD width=100%><DIV style='width:100%; height:88px; OVERFLOW: auto'>\n <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>\n");
for(int i = 0; i < astringproperty1.length; i++)
{
stringbuffer.append(" <TR>\n <TD>\n <INPUT type='checkbox' id='" + s + i + "' value=\"" + COM.dragonflow.Utils.RawXmlWriter.enCodeElement(astringproperty1[i].getLabel()) + "\" title=\"" + COM.dragonflow.Utils.RawXmlWriter.enCodeElement(astringproperty1[i].getDescription()) + "\">" + COM.dragonflow.Utils.RawXmlWriter.enCodeElement(astringproperty1[i].getLabel()) + "</INPUT>\n" + " </TD>\n" + " </TR>\n");
}
stringbuffer.append(" </TABLE>\n </DIV></TD>\n <TD vAlign=top>\n <TABLE width=1 cellSpacing=0 cellPadding=0 border=0 align=top>\n <TR><TD>\n <INPUT type=button title='Select all counters' value='Select All' onclick=\"checkCheckboxes('" + s + "', true)\">\n" + " </TD></TR>\n" + " <TR><TD>\n" + " <INPUT type=button value='Clear All' title='Clear all counter selections' onclick=\"checkCheckboxes('" + s + "', false)\" style='WIDTH: 100%'>\n" + " </TD></TR>\n" + " </TABLE>\n" + " </TD>\n" + " </TR>\n" + "</TABLE>\n");
return stringbuffer.toString();
}
}
|
[
"lihua.zhong@dragonflow.com"
] |
lihua.zhong@dragonflow.com
|
1c725eed17b0e89ad48a5dccab6b100833a12b72
|
90cb56b42b50e768e80ea7cd28ca72292797d890
|
/rockscript/src/test/java/io/rockscript/test/engine/http/TestRunnerHttpTest.java
|
fb5cd3a49e31b6047cd834e1e4c63b38b62ca627
|
[
"Apache-2.0"
] |
permissive
|
fengweijp/rockscript
|
d7209a23cde3e944d60b2d2262a8753a23ae3859
|
4fc1eeae08ceb36e755a7d9766af1e01ff25f3e3
|
refs/heads/master
| 2021-05-06T00:58:13.395316
| 2017-12-13T15:20:09
| 2017-12-13T15:20:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,814
|
java
|
/*
* Copyright (c) 2017 RockScript.io.
* 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 io.rockscript.test.engine.http;
import io.rockscript.service.test.TestError;
import io.rockscript.service.test.TestResult;
import io.rockscript.service.test.TestResults;
import io.rockscript.api.commands.DeployScriptVersionCommand;
import io.rockscript.api.commands.RunTestsCommand;
import io.rockscript.engine.impl.ServiceFunctionErrorEvent;
import io.rockscript.engine.impl.Event;
import io.rockscript.engine.impl.ScriptExecutionErrorEvent;
import io.rockscript.http.servlet.PathRequestHandler;
import io.rockscript.http.servlet.RouterServlet;
import io.rockscript.http.servlet.ServerRequest;
import io.rockscript.http.servlet.ServerResponse;
import io.rockscript.test.Assert;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.List;
import static io.rockscript.http.servlet.PathRequestHandler.GET;
import static io.rockscript.util.Maps.entry;
import static io.rockscript.util.Maps.hashMap;
import static org.junit.Assert.*;
public class TestRunnerHttpTest extends AbstractHttpTest {
protected static Logger log = LoggerFactory.getLogger(TestRunnerHttpTest.class);
@Override
protected void configure(RouterServlet routerServlet) {
routerServlet
.requestHandler(new PathRequestHandler(GET, "/ole") {
@SuppressWarnings("unchecked")
@Override
public void handle(ServerRequest request, ServerResponse response) {
response.status(200)
.bodyJson(hashMap(
entry("country", "Belgium"),
entry("currency", "EUR")));
}
});
}
@Test
public void testTestRunnerAssertionFailure() {
new DeployScriptVersionCommand()
.scriptName("The Script.rs")
.scriptText(
"var http = system.import('rockscript.io/http'); \n" +
"var country = http \n" +
" .get({url: 'http://localhost:4000/ole'}) \n" +
" .body.country;")
.execute(engine);
String testScriptId = new DeployScriptVersionCommand()
.scriptName("The Script Test.rst")
.scriptText(
"var test = system.import('rockscript.io/test'); \n" +
"var scriptExecution = test.start({ \n" +
" script: 'The Script.rs', \n" +
" skipActivities: true}); \n" +
"test.assertEquals(scriptExecution.variables.country, 'The Netherlands');")
.execute(engine)
.getId();
TestResults testResults = new RunTestsCommand()
.execute(engine);
log.debug(engine.getGson().toJson(testResults));
TestResult testResult = testResults.get(0);
log.debug("Events:");
testResult.getEvents().forEach(e->log.debug(e.toString()));
log.debug("Errors:");
testResult.getErrors().forEach(e->log.debug(e.toString()));
List<Event> testEvents = testResult.getEvents();
ServiceFunctionErrorEvent errorEvent = (ServiceFunctionErrorEvent) testEvents.get(testEvents.size() - 1);
Assert.assertContains("Expected The Netherlands, but was Belgium", errorEvent.getError());
assertNull(errorEvent.getRetryTime()); // because there's no point in retrying assertion errors
TestError testError = testResult.getErrors().get(0);
Assert.assertContains("Expected The Netherlands, but was Belgium", testError.getMessage());
assertEquals(testScriptId, testError.getScriptVersionId());
assertEquals(5, testError.getLine());
}
@Test
public void testTestRunnerScriptFailure() {
String targetScriptId = new DeployScriptVersionCommand()
.scriptName("The Script.rs")
.scriptText(
/* 1 */ "var http = system.import('rockscript.io/http'); \n" +
/* 2 */ "unexistingvar.unexistingmethod();")
.execute(engine)
.getId();
String testScriptId = new DeployScriptVersionCommand()
.scriptName("The Script Test.rst")
.scriptText(
/* 1 */ "var test = system.import('rockscript.io/test'); \n" +
/* 2 */ "\n" +
/* 3 */ "var scriptExecution = test.start({ \n" +
/* 4 */ " script: 'The Script.rs', \n" +
/* 5 */ " skipActivities: true}); ")
.execute(engine)
.getId();
TestResults testResults = new RunTestsCommand()
.execute(engine);
log.debug(engine.getGson().toJson(testResults));
TestResult testResult = testResults.get(0);
log.debug("Events:");
testResult.getEvents().forEach(e->log.debug(e.toString()));
log.debug("Errors:");
testResult.getErrors().forEach(e->log.debug(e.toString()));
List<Event> testEvents = testResult.getEvents();
ScriptExecutionErrorEvent targetScriptErrorEvent = (ScriptExecutionErrorEvent) testEvents.get(testEvents.size() - 2);
Assert.assertContains("ReferenceError: unexistingvar is not defined", targetScriptErrorEvent.getError());
Assert.assertContains(targetScriptId, targetScriptErrorEvent.getScriptId());
assertNotNull(targetScriptErrorEvent.getLine());
ServiceFunctionErrorEvent testScriptErrorEvent = (ServiceFunctionErrorEvent) testEvents.get(testEvents.size() - 1);
Assert.assertContains("Script start failed: ReferenceError: unexistingvar is not defined", testScriptErrorEvent.getError());
Assert.assertContains(testScriptId, testScriptErrorEvent.getScriptId());
assertNotNull(testScriptErrorEvent.getLine());
List<TestError> testErrors = testResult.getErrors();
TestError firstTestError = testErrors.get(0);
Assert.assertContains("ReferenceError: unexistingvar is not defined", firstTestError.getMessage());
Assert.assertContains(targetScriptId, firstTestError.getScriptVersionId());
assertNotNull(firstTestError.getLine());
TestError secondTestError = testErrors.get(1);
Assert.assertContains("Script start failed: ReferenceError: unexistingvar is not defined", secondTestError.getMessage());
Assert.assertContains(testScriptId, secondTestError.getScriptVersionId());
assertNotNull(secondTestError.getLine());
}
}
|
[
"mail@tombaeyens.be"
] |
mail@tombaeyens.be
|
120b3859fe32cd78ca0c39b2ce5e883fa864ab8a
|
ebdcaff90c72bf9bb7871574b25602ec22e45c35
|
/modules/dfp_axis/src/main/java/com/google/api/ads/admanager/axis/v201808/DisapproveOrders.java
|
b8119380283ce8ce768508fb214c4527b30fb900
|
[
"Apache-2.0"
] |
permissive
|
ColleenKeegan/googleads-java-lib
|
3c25ea93740b3abceb52bb0534aff66388d8abd1
|
3d38daadf66e5d9c3db220559f099fd5c5b19e70
|
refs/heads/master
| 2023-04-06T16:16:51.690975
| 2018-11-15T20:50:26
| 2018-11-15T20:50:26
| 158,986,306
| 1
| 0
|
Apache-2.0
| 2023-04-04T01:42:56
| 2018-11-25T00:56:39
|
Java
|
UTF-8
|
Java
| false
| false
| 3,360
|
java
|
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/**
* DisapproveOrders.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter.
*/
package com.google.api.ads.admanager.axis.v201808;
/**
* The action used for disapproving {@link Order} objects. All {@link
* LineItem}
* objects within the order will be disapproved as well.
*/
public class DisapproveOrders extends com.google.api.ads.admanager.axis.v201808.OrderAction implements java.io.Serializable {
public DisapproveOrders() {
}
@Override
public String toString() {
return com.google.common.base.MoreObjects.toStringHelper(this.getClass())
.omitNullValues()
.toString();
}
private java.lang.Object __equalsCalc = null;
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof DisapproveOrders)) return false;
DisapproveOrders other = (DisapproveOrders) obj;
if (obj == null) return false;
if (this == obj) return true;
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = super.equals(obj);
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = super.hashCode();
__hashCodeCalc = false;
return _hashCode;
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(DisapproveOrders.class, true);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201808", "DisapproveOrders"));
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
/**
* Get Custom Serializer
*/
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanSerializer(
_javaType, _xmlType, typeDesc);
}
/**
* Get Custom Deserializer
*/
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanDeserializer(
_javaType, _xmlType, typeDesc);
}
}
|
[
"api.cseeley@gmail.com"
] |
api.cseeley@gmail.com
|
fdd22cdc97eca65dd7eb9a4e7e00c3720163fe5a
|
0a4d4b808ee0724114e6153c1204de4e253c1dcb
|
/samples/32/b.java
|
ff42e83b553e8dc23b9b347dd59d32c13b46e477
|
[
"MIT"
] |
permissive
|
yura-hb/sesame-sampled-pairs
|
543b19bf340f6a35681cfca1084349bd3eb8f853
|
33b061e3612a7b26198c17245c2835193f861151
|
refs/heads/main
| 2023-07-09T04:15:05.821444
| 2021-08-08T12:01:04
| 2021-08-08T12:01:04
| 393,947,142
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,094
|
java
|
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.ReentrantLock;
class ArrayBlockingQueue<E> extends AbstractQueue<E> implements BlockingQueue<E>, Serializable {
/**
* Atomically removes all of the elements from this queue.
* The queue will be empty after this call returns.
*/
public void clear() {
final ReentrantLock lock = this.lock;
lock.lock();
try {
int k;
if ((k = count) > 0) {
circularClear(items, takeIndex, putIndex);
takeIndex = putIndex;
count = 0;
if (itrs != null)
itrs.queueIsEmpty();
for (; k > 0 && lock.hasWaiters(notFull); k--)
notFull.signal();
}
} finally {
lock.unlock();
}
}
/** Main lock guarding all access */
final ReentrantLock lock;
/** Number of elements in the queue */
int count;
/** The queued items */
final Object[] items;
/** items index for next take, poll, peek or remove */
int takeIndex;
/** items index for next put, offer, or add */
int putIndex;
/**
* Shared state for currently active iterators, or null if there
* are known not to be any. Allows queue operations to update
* iterator state.
*/
transient Itrs itrs;
/** Condition for waiting puts */
private final Condition notFull;
/**
* Nulls out slots starting at array index i, upto index end.
* Condition i == end means "full" - the entire array is cleared.
*/
private static void circularClear(Object[] items, int i, int end) {
// assert 0 <= i && i < items.length;
// assert 0 <= end && end < items.length;
for (int to = (i < end) ? end : items.length;; i = 0, to = end) {
for (; i < to; i++)
items[i] = null;
if (to == end)
break;
}
}
class Itrs {
/** Main lock guarding all access */
final ReentrantLock lock;
/** Number of elements in the queue */
int count;
/** The queued items */
final Object[] items;
/** items index for next take, poll, peek or remove */
int takeIndex;
/** items index for next put, offer, or add */
int putIndex;
/**
* Shared state for currently active iterators, or null if there
* are known not to be any. Allows queue operations to update
* iterator state.
*/
transient Itrs itrs;
/** Condition for waiting puts */
private final Condition notFull;
/**
* Called whenever the queue becomes empty.
*
* Notifies all active iterators that the queue is empty,
* clears all weak refs, and unlinks the itrs datastructure.
*/
void queueIsEmpty() {
// assert lock.isHeldByCurrentThread();
for (Node p = head; p != null; p = p.next) {
Itr it = p.get();
if (it != null) {
p.clear();
it.shutdown();
}
}
head = null;
itrs = null;
}
}
class Itr implements Iterator<E> {
/** Main lock guarding all access */
final ReentrantLock lock;
/** Number of elements in the queue */
int count;
/** The queued items */
final Object[] items;
/** items index for next take, poll, peek or remove */
int takeIndex;
/** items index for next put, offer, or add */
int putIndex;
/**
* Shared state for currently active iterators, or null if there
* are known not to be any. Allows queue operations to update
* iterator state.
*/
transient Itrs itrs;
/** Condition for waiting puts */
private final Condition notFull;
/**
* Called to notify the iterator that the queue is empty, or that it
* has fallen hopelessly behind, so that it should abandon any
* further iteration, except possibly to return one more element
* from next(), as promised by returning true from hasNext().
*/
void shutdown() {
// assert lock.isHeldByCurrentThread();
cursor = NONE;
if (nextIndex >= 0)
nextIndex = REMOVED;
if (lastRet >= 0) {
lastRet = REMOVED;
lastItem = null;
}
prevTakeIndex = DETACHED;
// Don't set nextItem to null because we must continue to be
// able to return it on next().
//
// Caller will unlink from itrs when convenient.
}
}
}
|
[
"hayeuyur@MacBook-Pro.local"
] |
hayeuyur@MacBook-Pro.local
|
74f4a60b368a518a1c5c2e07f7c070f65ade3686
|
2d7df16cf6ae999acbd7fadd4e6047d70fa8da9d
|
/app/src/main/java/pneumax/websales/object/AppointmentGrid.java
|
b1abbbce56f30223a3eff53c12b782fa79e2df3a
|
[] |
no_license
|
masterUNG/Websales_6Sep
|
e3abbad763da83c1ac1bdba8ce3d9abffa91f75e
|
5141add63993a74a1e940b97d560d0c9f4a55a18
|
refs/heads/master
| 2021-01-23T08:49:08.858391
| 2017-09-06T03:55:56
| 2017-09-06T03:55:56
| 102,555,197
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,258
|
java
|
package pneumax.websales.object;
import java.util.List;
/**
* Created by Sitrach on 05/09/2017.
*/
public class AppointmentGrid {
/**
* Number1 : 1
* AppDate : 2017-09-05 00:00:00
* AppStartTime : 13:30
* CSCode : 139961
* CSthiname : ไอซิน ทาคาโอก้า ฟาวน์ดริ บางปะกง จำกัด
* CTPname : คุณปราโมทย์
* PURPName : ลูกค้าใหม่
* WTname : งานโปรเจ็ค
* Remark : แนะนำตัว
* AppReasonReturn :
* AreaName : นิคมฯอมตะนคร 2 /พานทอง
* CSIcode : ATP
* CSBdes : End User
* SAcode : 2873-0
* DPCode : PNE
* WTcode : 0001
* PURPcode : 0001
* CreateDate : 2017-09-04 22:50:24
* AppVisit_ByPhone : V
*/
private List<AppointmentGridBean> appointmentgrids;
public List<AppointmentGridBean> getAppointmentgrids() {
return appointmentgrids;
}
public void setAppointmentgrids(List<AppointmentGridBean> appointmentgrids) {
this.appointmentgrids = appointmentgrids;
}
public static class AppointmentGridBean {
private int Number1;
private String AppDate;
private String AppStartTime;
private String CSCode;
private String CSthiname;
private String CTPname;
private String PURPName;
private String WTname;
private String Remark;
private String AppReasonReturn;
private String AreaName;
private String CSIcode;
private String CSBdes;
private String SAcode;
private String DPCode;
private String WTcode;
private String PURPcode;
private String CreateDate;
private String AppVisit_ByPhone;
public int getNumber1() {
return Number1;
}
public void setNumber1(int Number1) {
this.Number1 = Number1;
}
public String getAppDate() {
return AppDate;
}
public void setAppDate(String AppDate) {
this.AppDate = AppDate;
}
public String getAppStartTime() {
return AppStartTime;
}
public void setAppStartTime(String AppStartTime) {
this.AppStartTime = AppStartTime;
}
public String getCSCode() {
return CSCode;
}
public void setCSCode(String CSCode) {
this.CSCode = CSCode;
}
public String getCSthiname() {
return CSthiname;
}
public void setCSthiname(String CSthiname) {
this.CSthiname = CSthiname;
}
public String getCTPname() {
return CTPname;
}
public void setCTPname(String CTPname) {
this.CTPname = CTPname;
}
public String getPURPName() {
return PURPName;
}
public void setPURPName(String PURPName) {
this.PURPName = PURPName;
}
public String getWTname() {
return WTname;
}
public void setWTname(String WTname) {
this.WTname = WTname;
}
public String getRemark() {
return Remark;
}
public void setRemark(String Remark) {
this.Remark = Remark;
}
public String getAppReasonReturn() {
return AppReasonReturn;
}
public void setAppReasonReturn(String AppReasonReturn) {
this.AppReasonReturn = AppReasonReturn;
}
public String getAreaName() {
return AreaName;
}
public void setAreaName(String AreaName) {
this.AreaName = AreaName;
}
public String getCSIcode() {
return CSIcode;
}
public void setCSIcode(String CSIcode) {
this.CSIcode = CSIcode;
}
public String getCSBdes() {
return CSBdes;
}
public void setCSBdes(String CSBdes) {
this.CSBdes = CSBdes;
}
public String getSAcode() {
return SAcode;
}
public void setSAcode(String SAcode) {
this.SAcode = SAcode;
}
public String getDPCode() {
return DPCode;
}
public void setDPCode(String DPCode) {
this.DPCode = DPCode;
}
public String getWTcode() {
return WTcode;
}
public void setWTcode(String WTcode) {
this.WTcode = WTcode;
}
public String getPURPcode() {
return PURPcode;
}
public void setPURPcode(String PURPcode) {
this.PURPcode = PURPcode;
}
public String getCreateDate() {
return CreateDate;
}
public void setCreateDate(String CreateDate) {
this.CreateDate = CreateDate;
}
public String getAppVisit_ByPhone() {
return AppVisit_ByPhone;
}
public void setAppVisit_ByPhone(String AppVisit_ByPhone) {
this.AppVisit_ByPhone = AppVisit_ByPhone;
}
}
}
|
[
"phrombutr@gmail.com"
] |
phrombutr@gmail.com
|
01fca2f2e8d249aee27d0024900b2e91cd238046
|
98e654e97b71a7d937dd512073fc1d05170a1a7d
|
/week_08/day_2/hibernate_annotations_intro_start/src/main/java/models/Department.java
|
e9c1ca1a55be0d874a201cd42a7f2862b108aad8
|
[] |
no_license
|
edostler/codeclan_classwork
|
bfd980cc32e4ab649d392d0e9dc54189b9eded1f
|
6486a5b981e7d8f6d45f14462dad74298ae75758
|
refs/heads/master
| 2020-03-17T19:34:17.058501
| 2018-05-17T21:11:11
| 2018-05-17T21:11:11
| 133,868,880
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 890
|
java
|
package models;
import javax.persistence.*;
@Entity
@Table(name="departments")
public class Department {
private int id;
private String title;
private Manager manager;
public Department() {
}
public Department(String title, Manager manager) {
this.title = title;
this.manager = manager;
}
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name="id")
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
@Column (name="title")
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
@OneToOne(fetch = FetchType.EAGER)
public Manager getManager() {
return manager;
}
public void setManager(Manager manager) {
this.manager = manager;
}
}
|
[
"edward.o@simul8.com"
] |
edward.o@simul8.com
|
18cf30beeefc8c41e37b6269fd45db5b515f95ee
|
36c0a0e21f3758284242b8d2e40b60c36bd23468
|
/src/main/java/com/datasphere/server/query/druid/queries/JoinElement.java
|
261c678dd896000a4ab394c6a3fa39492cda73a6
|
[
"LicenseRef-scancode-mulanpsl-1.0-en"
] |
permissive
|
neeeekoooo/datasphere-service
|
0185bca5a154164b4bc323deac23a5012e2e6475
|
cb800033ba101098b203dbe0a7e8b7f284319a7b
|
refs/heads/master
| 2022-11-15T01:10:05.530442
| 2020-02-01T13:54:36
| 2020-02-01T13:54:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,064
|
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.datasphere.server.query.druid.queries;
import java.util.List;
/**
*
*/
public class JoinElement {
JoinType joinType;
String leftAlias;
List<String> leftJoinColumns;
String rightAlias;
List<String> rightJoinColumns;
public JoinElement() {
}
public JoinElement(JoinType joinType, String leftAlias, List<String> leftJoinColumns, String rightAlias, List<String> rightJoinColumns) {
this.joinType = joinType;
this.leftAlias = leftAlias;
this.leftJoinColumns = leftJoinColumns;
this.rightAlias = rightAlias;
this.rightJoinColumns = rightJoinColumns;
}
public JoinType getJoinType() {
return joinType;
}
public void setJoinType(JoinType joinType) {
this.joinType = joinType;
}
public String getLeftAlias() {
return leftAlias;
}
public void setLeftAlias(String leftAlias) {
this.leftAlias = leftAlias;
}
public List<String> getLeftJoinColumns() {
return leftJoinColumns;
}
public void setLeftJoinColumns(List<String> leftJoinColumns) {
this.leftJoinColumns = leftJoinColumns;
}
public String getRightAlias() {
return rightAlias;
}
public void setRightAlias(String rightAlias) {
this.rightAlias = rightAlias;
}
public List<String> getRightJoinColumns() {
return rightJoinColumns;
}
public void setRightJoinColumns(List<String> rightJoinColumns) {
this.rightJoinColumns = rightJoinColumns;
}
public enum JoinType {
INNER, LEFT_OUTER, RIGHT_OUTER
}
}
|
[
"jack_r_ge@126.com"
] |
jack_r_ge@126.com
|
5abe72ee18279e46d66884e54a87fcd05714d6f3
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_dc422f33806c7841d586224e39c42f816de25326/GroupReferenceBox/2_dc422f33806c7841d586224e39c42f816de25326_GroupReferenceBox_s.java
|
0a8e72ef55e82bdae7b96fdbd6e21f7dbd0cddcd
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 4,958
|
java
|
// Copyright (C) 2011 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.gerrit.client.admin;
import com.google.gerrit.client.ui.AccountGroupSuggestOracle;
import com.google.gerrit.client.ui.RPCSuggestOracle;
import com.google.gerrit.common.data.GroupReference;
import com.google.gwt.editor.client.LeafValueEditor;
import com.google.gwt.event.dom.client.KeyCodes;
import com.google.gwt.event.dom.client.KeyPressEvent;
import com.google.gwt.event.dom.client.KeyPressHandler;
import com.google.gwt.event.dom.client.KeyUpEvent;
import com.google.gwt.event.dom.client.KeyUpHandler;
import com.google.gwt.event.logical.shared.CloseEvent;
import com.google.gwt.event.logical.shared.CloseHandler;
import com.google.gwt.event.logical.shared.HasCloseHandlers;
import com.google.gwt.event.logical.shared.HasSelectionHandlers;
import com.google.gwt.event.logical.shared.SelectionEvent;
import com.google.gwt.event.logical.shared.SelectionHandler;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Focusable;
import com.google.gwt.user.client.ui.SuggestBox;
import com.google.gwt.user.client.ui.SuggestBox.DefaultSuggestionDisplay;
import com.google.gwt.user.client.ui.SuggestOracle.Suggestion;
import com.google.gwtexpui.globalkey.client.NpTextBox;
public class GroupReferenceBox extends Composite implements
LeafValueEditor<GroupReference>, HasSelectionHandlers<GroupReference>,
HasCloseHandlers<GroupReferenceBox>, Focusable {
private final DefaultSuggestionDisplay suggestions;
private final NpTextBox textBox;
private final AccountGroupSuggestOracle oracle;
private final SuggestBox suggestBox;
private boolean submitOnSelection;
public GroupReferenceBox() {
suggestions = new DefaultSuggestionDisplay();
textBox = new NpTextBox();
oracle = new AccountGroupSuggestOracle();
suggestBox = new SuggestBox( //
new RPCSuggestOracle(oracle), //
textBox, //
suggestions);
initWidget(suggestBox);
suggestBox.addKeyPressHandler(new KeyPressHandler() {
@Override
public void onKeyPress(KeyPressEvent event) {
submitOnSelection = false;
if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER) {
if (suggestions.isSuggestionListShowing()) {
submitOnSelection = true;
} else {
SelectionEvent.fire(GroupReferenceBox.this, getValue());
}
}
}
});
suggestBox.addKeyUpHandler(new KeyUpHandler() {
@Override
public void onKeyUp(KeyUpEvent event) {
if (event.getNativeKeyCode() == KeyCodes.KEY_ESCAPE) {
suggestBox.setText("");
CloseEvent.fire(GroupReferenceBox.this, GroupReferenceBox.this);
}
}
});
suggestBox.addSelectionHandler(new SelectionHandler<Suggestion>() {
@Override
public void onSelection(SelectionEvent<Suggestion> event) {
if (submitOnSelection) {
submitOnSelection = false;
SelectionEvent.fire(GroupReferenceBox.this, getValue());
}
}
});
}
public void setVisibleLength(int len) {
textBox.setVisibleLength(len);
}
@Override
public HandlerRegistration addSelectionHandler(
SelectionHandler<GroupReference> handler) {
return addHandler(handler, SelectionEvent.getType());
}
@Override
public HandlerRegistration addCloseHandler(
CloseHandler<GroupReferenceBox> handler) {
return addHandler(handler, CloseEvent.getType());
}
@Override
public GroupReference getValue() {
String name = suggestBox.getText();
if (name != null && !name.isEmpty()) {
return new GroupReference(oracle.getUUID(name), name);
} else {
return null;
}
}
@Override
public void setValue(GroupReference value) {
suggestBox.setText(value != null ? value.getName() : "");
}
@Override
public int getTabIndex() {
return suggestBox.getTabIndex();
}
@Override
public void setTabIndex(int index) {
suggestBox.setTabIndex(index);
}
public void setFocus(boolean focused) {
suggestBox.setFocus(focused);
}
@Override
public void setAccessKey(char key) {
suggestBox.setAccessKey(key);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
4d23ef5d63b16ffa5ff64f87340b206375546ac7
|
79b933ae2cf12e2e6776231fbc1971f70358cd87
|
/src/main/java/com/indihx/comm/InitSysConstants.java
|
cf86efb429533157ed94ae26ebf74be24940754d
|
[] |
no_license
|
svcgv/vote
|
4e41338495acf89e9791d91e6e8d2ee312a07a8e
|
c84b5245eef2be369ef6be54e34fe28b2f9bf58a
|
refs/heads/master
| 2020-04-01T22:55:44.931246
| 2018-11-30T10:46:15
| 2018-11-30T10:46:15
| 153,733,177
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,208
|
java
|
/**
*
*/
package com.indihx.comm;
/**
* <p>标 题: 物业管理信息系统(PMS)</p>
* <p>描 述: 系统内公共常量定义</p>
* <p>版 权: Copyright (c) 2018 </p>
* <p>公 司: 上海泓智信息科技有限公司</p>
* <p>创建时间: 2018年2月9日下午2:25:43</p>
* <p>@author zhengwei</p>
* <p>@version 1.0</p>
* <p>InitSysConstants.java</p>
* <p>用于定义系统全局常量</p>
*/
public class InitSysConstants {
//系统全局session名
public final static String USER_SESSION="PMS_USER";
/*市局机构ID*/
public final static String OrgIdShiJu ="1000";//市局ID
/*机构类型-与字典值对应*/
public final static String ORGTYPE_SHIJU ="01";//市局
public final static String ORGTYPE_QUJU ="02";//区局
public final static String ORGTYPE_JIEDAO ="03";//街道办
public final static String ORGTYPE_JUWEIHUI ="04";//居委会
public final static String ORGTYPE_WYGS ="05";//物业公司
public final static String ORGTYPE_YZDH ="06";//业主大会
/*系统角色-与系统Role配置值对应(之后有改动统一再此修改与表中一致--有新增的或不同的,不能改变以上的值只能增加)*/
public final static String ROLE_CMD ="999";//系统管理员
public final static String ROLE_SHIJU ="1000";//市局
public final static String ROLE_QUJU ="1001";//区局
public final static String ROLE_JIEDAO ="1002";//街道办
public final static String ROLE_JUWEIHUI ="1003";//居委会
public final static String ROLE_WYGS ="1004";//物业公司
/*数据状态*/
public final static String DATA_ZhengChang ="00";//正常---正式表中有效数据
public final static String DATA_ZhanCun ="01";//暂存---流程中的过程数据-一般存在于临时或副本表中
public final static String DATA_YiZhuXiao ="04";//已注销----正式表中无效数据
public final static String DATA_XiuGaiZhong ="02";//修改中----正式表中数据正在修改申请(此类数据不能再次发起修改和删除流程)
public final static String DATA_ShanChuZhong ="03";//删除中----正式表中数据正在删除/注销申请(此类数据不能再次发起修改和删除流程)
/*机构状态-与字典值对应*/
public final static String ORG_STATUS_ZhengChangShiYong ="0";
public final static String ORG_STATUS_JinYogn ="1";
public final static String ORG_STATUS_YiZhuXiao ="2";
/*人员类型-与字典值对应*/
public final static String USER_TYPE_XMJL ="01";
/*数据状态-与字典值对应*/
public final static String INFO_STATUS_ZhegnChang ="00";
public final static String INFO_STATUS_ZanCun ="01";
public final static String INFO_STATUS_XiuGaiZhong ="02";
public final static String INFO_STATUS_ShanChuZhong ="03";
public final static String INFO_STATUS_YiZhuXiao ="04";
/*证件类型-与字典值对应*/
public final static String CERTTYPE_SFZ ="1";
/*性别-与字典值对应*/
public final static String SEXTYPE_NAN ="1";
public final static String SEXTYPE_NV ="2";
/*文化程度-与字典值对应*/
public final static String EDUCATION_ChuZhong ="1";
public final static String EDUCATION_GaoZhong ="2";
public final static String EDUCATION_DaZhuan ="3";
public final static String EDUCATION_BenKe ="4";
public final static String EDUCATION_ShuoShiYanJiuSheng ="5";
public final static String EDUCATION_BoShiYanJiuSheng ="6";
/*诚信指标类型-与字典值对应*/
public final static String CreditQuotaKind_LH ="01";//良好信息
public final static String CreditQuotaKind_BL ="02";//不良信息
/*电子表决结果-与字典值对应*/
public final static String VoteResult_TY ="01";//同意
public final static String VoteResult_BTY="02";//不同意
public final static String VoteResult_QQ ="03";//弃权
/*电子表决方式-与字典值对应*/
public final static String VoteWays_DZBJ ="01";//电子表决
public final static String VoteWays_SDBL ="02";//手动补录
/*电子表决状态-与字典值对应*/
//public final static String VoteStatus_ZhiDingBiaoJueYiTi ="01";//拟制表决议题
public final static String VoteStatus_QueDingBiaoJueFanWei ="01";//待确定表决范围
public final static String VoteStatus_GuanLianFenHu = "02";//已关联分户
public final static String VoteStatus_BiaoJueZhong ="03";//表决中
public final static String VoteStatus_BiaoJueWanJie ="04";//表决完结
//public final static String VoteStatus_ZhuXiao ="05";//已注销
public final static String VOTE_EFFECTIVE = "00"; //有效
public final static String Vote_NONEFFECTIVE = "01"; //无效
public final static String WsStatus_ZhengChang = "00";
/*微信公众号相关参数, 放到PARAMS_INFO表里*/
//public final static String TOKEN = "11111111";
//public final static String APPID = "wx0faa55f1a53f29c5";
//public final static String SECRET = "a9a586b82bfb51e89a35a51a443d517f";
/*定义一个页面size*/
public final static int BIG_SIZE = 20;
public final static int MIDDLE_SIZE = 10;
public final static int SMALL_SIZE = 5;
//投票系统身份证上传路径
public final static String CERT_PATH = "d:/vote/idcard/";
}
|
[
"hb1230123@hotmail.com"
] |
hb1230123@hotmail.com
|
e04fa15869c7690a618fbfae6b8e71f206afda51
|
c2a6572587c0bfd9682f3d5b33f7223e8a50d2d9
|
/ea2ddl-dao/src/main/java/jp/sourceforge/ea2ddl/dao/exentity/TObjecttests.java
|
eab02da59f55aacbdeddebd1dbf08fc60f86e119
|
[
"Apache-2.0"
] |
permissive
|
taktos/ea2ddl
|
96d6590311196d35c2d1ca1098c4aca3d2a87a39
|
282aa6c851be220441ee50df5c18ff575dfbe9ac
|
refs/heads/master
| 2021-01-19T01:52:01.456128
| 2016-07-13T06:57:34
| 2016-07-13T06:57:34
| 3,493,161
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 423
|
java
|
package jp.sourceforge.ea2ddl.dao.exentity;
/**
* The entity of t_objecttests.
* <p>
* You can implement your original methods here.
* This class remains when re-generating.
* </p>
* @author DBFlute(AutoGenerator)
*/
public class TObjecttests extends jp.sourceforge.ea2ddl.dao.bsentity.BsTObjecttests {
/** Serial version UID. (Default) */
private static final long serialVersionUID = 1L;
}
|
[
"taktos9@136db618-7844-41ca-8ac1-fb3fd040db1d"
] |
taktos9@136db618-7844-41ca-8ac1-fb3fd040db1d
|
2b6b7f6c62fd97ec5aaccc9bc7ad52ab9df24a69
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/4/4_1b9c9f239afcee3a171bf4b123b2171dab301841/RemapperPreprocessor/4_1b9c9f239afcee3a171bf4b123b2171dab301841_RemapperPreprocessor_t.java
|
ba9abd6d3eafbccc9aba781f2dce65acfd99bc67
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 8,019
|
java
|
/**
* Copyright (c) 2012-2013, md_5. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* The name of the author may not be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
package net.md_5.specialsource;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.Type;
import org.objectweb.asm.tree.*;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
/**
* "Pre-process" a class file, intended to be used before remapping with JarRemapper.
*
* Currently includes:
* - Extracting inheritance
*/
public class RemapperPreprocessor {
public boolean debug = false;
private InheritanceMap inheritanceMap;
private JarMapping jarMapping;
private AccessMap accessMap;
/**
*
* @param inheritanceMap Map to add extracted inheritance information too, or null to not extract inheritance
* @param jarMapping Mapping for reflection remapping, or null to not remap reflection
* @throws IOException
*/
public RemapperPreprocessor(InheritanceMap inheritanceMap, JarMapping jarMapping, AccessMap accessMap) {
this.inheritanceMap = inheritanceMap;
this.jarMapping = jarMapping;
this.accessMap = accessMap;
}
public RemapperPreprocessor(InheritanceMap inheritanceMap, JarMapping jarMapping) {
this(inheritanceMap, jarMapping, null);
}
public byte[] preprocess(InputStream inputStream) throws IOException {
return preprocess(new ClassReader(inputStream));
}
public byte[] preprocess(byte[] bytecode) throws IOException {
return preprocess(new ClassReader(bytecode));
}
@SuppressWarnings("unchecked")
public byte[] preprocess(ClassReader classReader) {
byte[] bytecode = null;
ClassNode classNode = new ClassNode();
int flags = ClassReader.SKIP_DEBUG;
if (!isRewritingNeeded()) {
// Not rewriting the class - skip the code, not needed
flags |= ClassReader.SKIP_CODE | ClassReader.SKIP_FRAMES;
}
classReader.accept(classNode, flags);
String className = classNode.name;
// Inheritance extraction
if (inheritanceMap != null) {
logI("Loading plugin class inheritance for "+className);
// Get inheritance
ArrayList<String> parents = new ArrayList<String>();
for (String iface : (List<String>) classNode.interfaces) {
parents.add(iface);
}
parents.add(classNode.superName);
inheritanceMap.setParents(className.replace('.', '/'), parents);
logI("Inheritance added "+className+" parents "+parents.size());
}
if (isRewritingNeeded()) {
// Class access
if (accessMap != null) {
classNode.access = accessMap.applyClassAccess(className, classNode.access);
}
// Field access
if (accessMap != null) {
for (FieldNode fieldNode : (List<FieldNode>) classNode.fields) {
fieldNode.access = accessMap.applyFieldAccess(className, fieldNode.name, fieldNode.access);
}
}
for (MethodNode methodNode : (List<MethodNode>) classNode.methods) {
// Method access
if (accessMap != null) {
methodNode.access = accessMap.applyMethodAccess(className, methodNode.name, methodNode.desc, methodNode.access);
}
// Reflection remapping
if (jarMapping != null) {
AbstractInsnNode insn = methodNode.instructions.getFirst();
while (insn != null) {
if (insn.getOpcode() == Opcodes.INVOKEVIRTUAL) {
remapGetDeclaredField(insn);
}
insn = insn.getNext();
}
}
}
ClassWriter cw = new ClassWriter(0);
classNode.accept(cw);
bytecode = cw.toByteArray();
}
return bytecode;
}
private boolean isRewritingNeeded() {
return jarMapping != null || accessMap != null;
}
/**
* Replace class.getDeclaredField("string") with a remapped field string
* @param insn Method call instruction
*/
private void remapGetDeclaredField(AbstractInsnNode insn) {
MethodInsnNode mi = (MethodInsnNode) insn;
if (!mi.owner.equals("java/lang/Class") || !mi.name.equals("getDeclaredField") || !mi.desc.equals("(Ljava/lang/String;)Ljava/lang/reflect/Field;")) {
return;
}
logR("ReflectionRemapper found getDeclaredField!");
if (insn.getPrevious() == null || insn.getPrevious().getOpcode() != Opcodes.LDC) {
logR("- not constant field; skipping");
return;
}
LdcInsnNode ldcField = (LdcInsnNode) insn.getPrevious();
if (!(ldcField.cst instanceof String)) {
logR("- not field string; skipping: " + ldcField.cst);
return;
}
String fieldName = (String) ldcField.cst;
if (ldcField.getPrevious() == null || ldcField.getPrevious().getOpcode() != Opcodes.LDC) {
logR("- not constant class; skipping: field=" + ldcField.cst);
return;
}
LdcInsnNode ldcClass = (LdcInsnNode) ldcField.getPrevious();
if (!(ldcClass.cst instanceof Type)) {
logR("- not class type; skipping: field=" + ldcClass.cst + ", class=" + ldcClass.cst);
return;
}
String className = ((Type) ldcClass.cst).getInternalName();
String newName = jarMapping.tryClimb(jarMapping.fields, NodeType.FIELD, className, fieldName);
logR("Remapping "+className+"/"+fieldName + " -> " + newName);
if (newName != null) {
// Change the string literal to the correct name
ldcField.cst = newName;
//ldcClass.cst = className; // not remapped here - taken care of by JarRemapper
}
}
private void logI(String message) {
if (debug) {
System.out.println("[Inheritance] " + message);
}
}
private void logR(String message) {
if (debug) {
System.out.println("[ReflectionRemapper] " + message);
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
cbd30c6a3cf6042f2d76ea3e2dbd23dcd5a12408
|
9af7ff6b77b9e1aac67d7cf9f49b695511d94310
|
/StandardProductRepositoryBySQL2.3/src/DBSystem/TypeDB.java
|
ab9290009e498ae7a4db4453cc8adb56686c50a2
|
[] |
no_license
|
zjmeixinyanzhi/MultipleDatacenterCollaborativeProcessSystem
|
bc5e30d27d23b0d1455207eddf90b63f1b2c9939
|
36e28e145eff16d9f7c80c5c5af684aac4f5370a
|
refs/heads/master
| 2021-01-09T21:55:31.022679
| 2017-04-05T14:00:26
| 2017-04-05T14:00:26
| 54,820,368
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,901
|
java
|
package DBSystem;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
public class TypeDB
{
private static Connection conn = null;
private static DBConn dbcommCommon = null;
public String dbTable = null;
public TypeDB(String ip, String port, String mccps_sid ,String user, String passwd, String dbTable){
this.dbcommCommon = new DBConn(ip, port, mccps_sid, user, passwd);
//初始化数据库
if(null == conn){
conn = dbcommCommon.getConnection();
if(conn == null){
dbcommCommon.bIsConnection = false;
}
else{
dbcommCommon.bIsConnection = true;
}
}
this.dbTable = dbTable;
}
public int getTypeId(String Name){
int id = -1;
System.out.println("Sp_typeDB::public int getSp_typeId(String Name) | 返回Sp_typeID");
try {
String StrSql = "SELECT * FROM " + this.dbTable + " where Name=?";
if(null == conn){
return -1;
}
PreparedStatement pstmt = conn.prepareStatement(StrSql);
pstmt.setString(1, Name);
//execute select
ResultSet rs = pstmt.executeQuery();
while (rs.next()) {
id = rs.getInt("Id");
}
} catch (SQLException e) {
String strSqlState = e.getSQLState();
if (strSqlState.equals("08S01")) {
conn = dbcommCommon.getConnection();
return getTypeId(Name);
}
e.printStackTrace();
return -1;
}
return id;
}
public static synchronized void closeConnected() {
try {
if (null != conn) {
conn.close();
conn = null;
}
} catch (SQLException e) {
e.printStackTrace();
}
}
public static void main(String args[]){
TypeDB typeDB = new TypeDB("10.3.10.1", "3306", "RSProductDB", "mca", "mca", "sp_type");
// 10.3.10.1_3306_mccps_mca_mca_RSProductDB
int SpTypeId = typeDB.getTypeId("FY3AMERSI");
System.out.println(SpTypeId);
}
}
|
[
"zhangjiewanwansui@gmail.com"
] |
zhangjiewanwansui@gmail.com
|
0a114369f29315002f66b8a9af095282d221e90a
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/32/32_8448c5594ad2a0047f6abb3cd4319831bba992d5/NFAFactoryTest/32_8448c5594ad2a0047f6abb3cd4319831bba992d5_NFAFactoryTest_t.java
|
7d4faeb6426d7e73f27c2c8a32c0c185bc4009b2
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 1,935
|
java
|
package Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import org.junit.Before;
import org.junit.Test;
import Generator.NFA.NFA;
import Generator.NFA.NFAFactory;
import Generator.NFA.NFASimulator;
import Generator.Token.op_code;
public class NFAFactoryTest {
NFASimulator NFASim;
NFAFactory Factory;
@Before
public void setUp() throws Exception {
NFASim = new NFASimulator();
Factory = new NFAFactory();
}
//@Test
public void testEpsilon() {
NFA epsNFA = NFA.EpsilonNFA();
epsNFA = Factory.build("$NULL ()()()()()*||||a");
//System.out.println(epsNFA);
assertEquals("a", NFASim.parse(epsNFA, "a").token);
assertEquals("Failed", NFASim.parse(epsNFA, " ").token);
}
//@Test
public void testSample() {
NFA test = Factory.build("$TEST (1)(2)*(3)(4|5|6)+(|^-)");
//System.out.println(test);
assertEquals("135", NFASim.parse(test, "135").token);
assertEquals("1223654^-", NFASim.parse(test, "1223654^-").token);
assertEquals("1223654", NFASim.parse(test, "1223654").token);
assertEquals("13555^-", NFASim.parse(test, "13555^-").token);
test = Factory.build("$TEST \\[(\\ )*\\]");
String code = "[ ]";
assertEquals(code, NFASim.parse(test, code).token);
code = "[ ]";
assertEquals(code, NFASim.parse(test, code).token);
}
@Test
public void testAddMultExpr() {
NFA test = Factory.build("$TEST (0|1|2|3|4|5|6|7|8|9)+(\\ |((\\+|\\*)(\\ )*(0|1|2|3|4|5|6|7|8|9)+)*)*");
String code = "12 + 56 + 78 * 9";
System.out.println(NFASim.parse(test, code));
assertEquals(code, NFASim.parse(test, code).token);
}
@Test
public void testDoubleStar() {
NFA test = Factory.build("$TEST (a|()*)*");
System.out.println(test);
String code = "aaaaaa";
System.out.println(NFASim.parse(test, code));
assertEquals(code, NFASim.parse(test, code).token);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
c4b9378a8446b35e41b124beb4bf59c14943e2bd
|
f4b3b26f8c2cfe1af6588a57f54d7d173a9181fa
|
/app/src/main/java/com/prituladima/collectionmapsarchexample/processors/MapProcessor.java
|
3bec71b7450aa8b1d9ab0806e4686f6b5bc361ce
|
[] |
no_license
|
prituladima/CollectionMapsArchExample
|
0c767c1190a87568e382ca3e4c7a1320c8062c5e
|
4d008deb5d0a4f38299499b5c44f9981536fc127
|
refs/heads/master
| 2021-04-28T02:24:14.759643
| 2018-08-23T12:52:13
| 2018-08-23T12:52:13
| 122,113,525
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 166
|
java
|
package com.prituladima.collectionmapsarchexample.processors;
public interface MapProcessor extends Processor {
long add();
long search();
long remove();
}
|
[
"prituladima@gmail.com"
] |
prituladima@gmail.com
|
059bd9a206fb0e9a5314e2184e77ece8101b9d67
|
3ca53c13d2953805c00406476ceda9684887a8ad
|
/src/com/iwxxm/common/DSSensorType.java
|
dfafca6d87625e1615efec31deb2077ab37f0db2
|
[] |
no_license
|
yw2017051032/tac2iwxxm
|
ae93c12b08b7316cd59de032d4ae2e8082bc6c0b
|
5a08cb9ecd0833fd4435bf6db81a2b8126380ec1
|
refs/heads/master
| 2020-03-17T03:03:06.671868
| 2018-06-05T16:55:59
| 2018-06-05T17:06:03
| 133,217,637
| 3
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 1,085
|
java
|
//
// 此文件是由 JavaTM Architecture for XML Binding (JAXB) 引用实现 v2.2.8-b130911.1802 生成的
// 请访问 <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// 在重新编译源模式时, 对此文件的所有修改都将丢失。
// 生成时间: 2018.04.04 时间 10:18:30 PM CST
//
package com.iwxxm.common;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>DS_Sensor_Type complex type的 Java 类。
*
* <p>以下模式片段指定包含在此类中的预期内容。
*
* <pre>
* <complexType name="DS_Sensor_Type">
* <complexContent>
* <extension base="{http://www.isotc211.org/2005/gmd}DS_Series_Type">
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "DS_Sensor_Type", namespace = "http://www.isotc211.org/2005/gmd")
public class DSSensorType
extends DSSeriesType
{
}
|
[
"852406820@qq.com"
] |
852406820@qq.com
|
d75164d2000392ed06aac14933b8f087538e1818
|
beb2fbdd8e5343fe76c998824c7228a546884c5e
|
/com.kabam.marvelbattle/src/com/google/android/gms/ads/search/SearchAdRequest.java
|
f728a704c3b152894c3f55a63a8cec3d1c48e491
|
[] |
no_license
|
alamom/mcoc_11.2.1_store_apk
|
4a988ab22d6c7ad0ca5740866045083ec396841b
|
b43c41d3e8a43f63863d710dad812774cd14ace0
|
refs/heads/master
| 2021-01-11T17:13:02.358134
| 2017-01-22T19:51:35
| 2017-01-22T19:51:35
| 79,740,812
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,002
|
java
|
package com.google.android.gms.ads.search;
import android.content.Context;
import android.graphics.Color;
import android.location.Location;
import android.os.Bundle;
import com.google.android.gms.ads.mediation.MediationAdapter;
import com.google.android.gms.ads.mediation.NetworkExtras;
import com.google.android.gms.ads.mediation.customevent.CustomEvent;
import com.google.android.gms.internal.bg;
import com.google.android.gms.internal.bg.a;
public final class SearchAdRequest
{
public static final int BORDER_TYPE_DASHED = 1;
public static final int BORDER_TYPE_DOTTED = 2;
public static final int BORDER_TYPE_NONE = 0;
public static final int BORDER_TYPE_SOLID = 3;
public static final int CALL_BUTTON_COLOR_DARK = 2;
public static final int CALL_BUTTON_COLOR_LIGHT = 0;
public static final int CALL_BUTTON_COLOR_MEDIUM = 1;
public static final String DEVICE_ID_EMULATOR = bg.DEVICE_ID_EMULATOR;
public static final int ERROR_CODE_INTERNAL_ERROR = 0;
public static final int ERROR_CODE_INVALID_REQUEST = 1;
public static final int ERROR_CODE_NETWORK_ERROR = 2;
public static final int ERROR_CODE_NO_FILL = 3;
private final bg ld;
private final int xl;
private final int xm;
private final int xn;
private final int xo;
private final int xp;
private final int xq;
private final int xr;
private final int xs;
private final String xt;
private final int xu;
private final String xv;
private final int xw;
private final int xx;
private final String xy;
private SearchAdRequest(Builder paramBuilder)
{
this.xl = Builder.a(paramBuilder);
this.xm = Builder.b(paramBuilder);
this.xn = Builder.c(paramBuilder);
this.xo = Builder.d(paramBuilder);
this.xp = Builder.e(paramBuilder);
this.xq = Builder.f(paramBuilder);
this.xr = Builder.g(paramBuilder);
this.xs = Builder.h(paramBuilder);
this.xt = Builder.i(paramBuilder);
this.xu = Builder.j(paramBuilder);
this.xv = Builder.k(paramBuilder);
this.xw = Builder.l(paramBuilder);
this.xx = Builder.m(paramBuilder);
this.xy = Builder.n(paramBuilder);
this.ld = new bg(Builder.o(paramBuilder), this);
}
bg V()
{
return this.ld;
}
public int getAnchorTextColor()
{
return this.xl;
}
public int getBackgroundColor()
{
return this.xm;
}
public int getBackgroundGradientBottom()
{
return this.xn;
}
public int getBackgroundGradientTop()
{
return this.xo;
}
public int getBorderColor()
{
return this.xp;
}
public int getBorderThickness()
{
return this.xq;
}
public int getBorderType()
{
return this.xr;
}
public int getCallButtonColor()
{
return this.xs;
}
public String getCustomChannels()
{
return this.xt;
}
public <T extends CustomEvent> Bundle getCustomEventExtrasBundle(Class<T> paramClass)
{
return this.ld.getCustomEventExtrasBundle(paramClass);
}
public int getDescriptionTextColor()
{
return this.xu;
}
public String getFontFace()
{
return this.xv;
}
public int getHeaderTextColor()
{
return this.xw;
}
public int getHeaderTextSize()
{
return this.xx;
}
public Location getLocation()
{
return this.ld.getLocation();
}
@Deprecated
public <T extends NetworkExtras> T getNetworkExtras(Class<T> paramClass)
{
return this.ld.getNetworkExtras(paramClass);
}
public <T extends MediationAdapter> Bundle getNetworkExtrasBundle(Class<T> paramClass)
{
return this.ld.getNetworkExtrasBundle(paramClass);
}
public String getQuery()
{
return this.xy;
}
public boolean isTestDevice(Context paramContext)
{
return this.ld.isTestDevice(paramContext);
}
public static final class Builder
{
private final bg.a le = new bg.a();
private int xl;
private int xm;
private int xn;
private int xo;
private int xp;
private int xq;
private int xr = 0;
private int xs;
private String xt;
private int xu;
private String xv;
private int xw;
private int xx;
private String xy;
public Builder addCustomEventExtrasBundle(Class<? extends CustomEvent> paramClass, Bundle paramBundle)
{
this.le.b(paramClass, paramBundle);
return this;
}
public Builder addNetworkExtras(NetworkExtras paramNetworkExtras)
{
this.le.a(paramNetworkExtras);
return this;
}
public Builder addNetworkExtrasBundle(Class<? extends MediationAdapter> paramClass, Bundle paramBundle)
{
this.le.a(paramClass, paramBundle);
return this;
}
public Builder addTestDevice(String paramString)
{
this.le.s(paramString);
return this;
}
public SearchAdRequest build()
{
return new SearchAdRequest(this, null);
}
public Builder setAnchorTextColor(int paramInt)
{
this.xl = paramInt;
return this;
}
public Builder setBackgroundColor(int paramInt)
{
this.xm = paramInt;
this.xn = Color.argb(0, 0, 0, 0);
this.xo = Color.argb(0, 0, 0, 0);
return this;
}
public Builder setBackgroundGradient(int paramInt1, int paramInt2)
{
this.xm = Color.argb(0, 0, 0, 0);
this.xn = paramInt2;
this.xo = paramInt1;
return this;
}
public Builder setBorderColor(int paramInt)
{
this.xp = paramInt;
return this;
}
public Builder setBorderThickness(int paramInt)
{
this.xq = paramInt;
return this;
}
public Builder setBorderType(int paramInt)
{
this.xr = paramInt;
return this;
}
public Builder setCallButtonColor(int paramInt)
{
this.xs = paramInt;
return this;
}
public Builder setCustomChannels(String paramString)
{
this.xt = paramString;
return this;
}
public Builder setDescriptionTextColor(int paramInt)
{
this.xu = paramInt;
return this;
}
public Builder setFontFace(String paramString)
{
this.xv = paramString;
return this;
}
public Builder setHeaderTextColor(int paramInt)
{
this.xw = paramInt;
return this;
}
public Builder setHeaderTextSize(int paramInt)
{
this.xx = paramInt;
return this;
}
public Builder setLocation(Location paramLocation)
{
this.le.a(paramLocation);
return this;
}
public Builder setQuery(String paramString)
{
this.xy = paramString;
return this;
}
public Builder tagForChildDirectedTreatment(boolean paramBoolean)
{
this.le.h(paramBoolean);
return this;
}
}
}
/* Location: C:\tools\androidhack\com.kabam.marvelbattle\classes.jar!\com\google\android\gms\ads\search\SearchAdRequest.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"eduard.martini@gmail.com"
] |
eduard.martini@gmail.com
|
157aa5e7079c8e55a0e77164d3023b5a509838df
|
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
|
/crash-reproduction-new-fitness/results/TIME-7b-5-22-Single_Objective_GGA-WeightedSum-BasicBlockCoverage-opt/org/joda/time/format/DateTimeParserBucket_ESTest.java
|
cc7c2953c0a4f704ac5c23270fd1c76e1c52c3c2
|
[
"MIT",
"CC-BY-4.0"
] |
permissive
|
STAMP-project/Botsing-basic-block-coverage-application
|
6c1095c6be945adc0be2b63bbec44f0014972793
|
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
|
refs/heads/master
| 2022-07-28T23:05:55.253779
| 2022-04-20T13:54:11
| 2022-04-20T13:54:11
| 285,771,370
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,492
|
java
|
/*
* This file was automatically generated by EvoSuite
* Wed Oct 27 16:36:55 UTC 2021
*/
package org.joda.time.format;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.shaded.org.mockito.Mockito.*;
import static org.evosuite.runtime.EvoAssertions.*;
import java.util.Locale;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.evosuite.runtime.ViolatedAssumptionAnswer;
import org.joda.time.Chronology;
import org.joda.time.DateTimeFieldType;
import org.joda.time.DateTimeZone;
import org.joda.time.format.DateTimeParserBucket;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class DateTimeParserBucket_ESTest extends DateTimeParserBucket_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
Chronology chronology0 = mock(Chronology.class, new ViolatedAssumptionAnswer());
doReturn((DateTimeZone) null).when(chronology0).getZone();
doReturn((Chronology) null).when(chronology0).withUTC();
DateTimeParserBucket dateTimeParserBucket0 = new DateTimeParserBucket(1001L, chronology0, (Locale) null);
DateTimeFieldType.halfdayOfDay();
DateTimeFieldType dateTimeFieldType0 = DateTimeFieldType.dayOfWeek();
dateTimeParserBucket0.saveField(dateTimeFieldType0, 45);
// Undeclared exception!
dateTimeParserBucket0.computeMillis(false, "%(+W]6MK");
}
}
|
[
"pderakhshanfar@serg2.ewi.tudelft.nl"
] |
pderakhshanfar@serg2.ewi.tudelft.nl
|
3f07583ef3b090cd6f708c47d5f10f814bc980e6
|
1584faa7facf9b2fa2e0fb6d8ecb672a6457a782
|
/week-02/exercises/stateless-unit-test-exercises/src/test/java/Exercise02Test.java
|
0927e3ecfbe29f47570423198673f981cd9ec050
|
[] |
no_license
|
JacobRosenbaum/dev10-classwork
|
4c652f1a187df78b9a138b13688b7964766b9f49
|
b1444ce74f590462536cb10c04e3e6c87cc2bd1f
|
refs/heads/main
| 2023-03-04T04:58:59.065185
| 2021-02-19T18:25:16
| 2021-02-19T18:25:16
| 319,703,778
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 842
|
java
|
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class Exercise02Test {
@Test
void shouldBeCorrectFormat() {
assertEquals("<b>a</b>", Exercise02.surroundWithTag("a", "b"));
assertEquals("<span>Squidward Tentacles</span>", Exercise02.surroundWithTag("Squidward Tentacles", "span"));
}
@Test
void shouldBeJustText() {
assertEquals("splendid", Exercise02.surroundWithTag("splendid", null));
assertEquals("yessir, let's ride", Exercise02.surroundWithTag("yessir, let's ride", ""));
}
@Test
void shouldBeNull() {
assertEquals(null, Exercise02.surroundWithTag(null, null));
}
@Test
void shouldBeJustTags() {
assertEquals("<a></a>", Exercise02.surroundWithTag(null, "a"));
}
}
|
[
"jacobrosenbaum95@gmail.com"
] |
jacobrosenbaum95@gmail.com
|
503f7fac918a9eaccfb5df58a91c510dac36b69f
|
7c14e265e975cb0a714a385a896b106fd136eabb
|
/src/main/java/com/ynz/pdf/extractpdf/parser/ARKInvestmentParser.java
|
6a01c9d73c180970ba2207a97923d7425fa25451
|
[] |
no_license
|
yichunzhao/extract-pdf
|
cb899cbf4f2f1d70329c776b54a214ef25486650
|
d44e6311790ee5e24d1050aa5fae42d3003f5071
|
refs/heads/master
| 2023-02-07T22:01:58.620895
| 2020-12-28T22:44:48
| 2020-12-28T22:44:48
| 320,938,654
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,792
|
java
|
package com.ynz.pdf.extractpdf.parser;
import com.ynz.pdf.extractpdf.model.ARKDataModel;
import com.ynz.pdf.extractpdf.parser.states.BrokenState;
import com.ynz.pdf.extractpdf.parser.states.DateState;
import com.ynz.pdf.extractpdf.statemachine.context.ARKLineTextContext;
import com.ynz.pdf.extractpdf.statemachine.state.ARKLineTextState;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.List;
@Component
@NoArgsConstructor
@Getter
@Setter
public class ARKInvestmentParser implements TextParser<ARKDataModel>, ARKLineTextContext {
private static final String linePattern = "^\\d{1,2}/\\d{1,2}/\\d{4}\\s+(Sell|Buy).+[$]\\d+.\\d{2}$";
private ARKLineTextState currentState;
private String line;
private ARKDataModel model;
@Override
public List<ARKDataModel> parse(String text) {
List<ARKDataModel> list = new ArrayList<>();
String[] lines = text.split(System.lineSeparator());
for (String line : lines) {
if (!isValidLine(line)) continue;
processLine(line);
list.add(getModel());
}
return list;
}
public void processLine(String line) {
this.setLine(line);
model = new ARKDataModel();
if (this.currentState == null || this.currentState instanceof BrokenState) setNextState(new DateState());
while (!(this.currentState instanceof BrokenState)) {
this.currentState.doAction(this);
}
}
@Override
public void setNextState(ARKLineTextState state) {
this.currentState = state;
}
public boolean isValidLine(String target) {
return target.matches(linePattern);
}
}
|
[
"zhaoyichun@hotmail.com"
] |
zhaoyichun@hotmail.com
|
69fc6d23334ea5e385444a17251f543587107e72
|
06d76ab89e6cd8cc7d9281b65e0c92bfa3c32af5
|
/searchsdk/src/main/java/com/sfmap/api/services/cloud/CloudStorageUpdataServerHandler.java
|
5f240ce563e6feb8b826546ca2a80b2c2124fd46
|
[] |
no_license
|
onlie08/SFLocationDemo
|
f7042c598fdb1bd4fe5eeba791df6ae6f779d73e
|
7c15f13b1d6335a6dbf20b6ee7cce62bd20c1ca9
|
refs/heads/master
| 2022-12-15T20:09:31.577510
| 2020-08-25T02:38:57
| 2020-08-25T02:38:57
| 217,438,626
| 1
| 0
| null | 2020-09-17T05:55:44
| 2019-10-25T02:54:37
|
Java
|
UTF-8
|
Java
| false
| false
| 4,886
|
java
|
package com.sfmap.api.services.cloud;
import android.content.Context;
import com.sfmap.api.services.core.AppInfo;
import com.sfmap.api.services.core.JsonResultHandler;
import com.sfmap.api.services.core.LatLonPoint;
import com.sfmap.api.services.core.SearchException;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.net.Proxy;
import java.util.Map;
class CloudStorageUpdataServerHandler extends JsonResultHandler<Object,CloudStorageResult> {
private String path="/gds/storage/data/update?";
/**
* 使用Json解析返回结果。
*
* @param context
* @param tsk
* @param prx
* @param device
*/
public CloudStorageUpdataServerHandler(Context context, Object tsk, Proxy prx, String device) {
super(context, tsk, prx, device);
}
@Override
protected CloudStorageResult parseJson(JSONObject obj) throws SearchException {
CloudStorageResult result=null;
try {
processServerErrorcode(getJsonStringValue(obj, "status", ""),
getJsonStringValue(obj, "message", ""));
// 解析结果
if (obj.has("results")) {
JSONObject results = obj.optJSONObject("results");
if (results != null) {
result=new CloudStorageResult();
JSONArray jsonArray = results.optJSONArray("ids");
if(jsonArray!=null&&jsonArray.length()>0) {
int[] ids=new int[jsonArray.length()];
for (int i = 0; i < jsonArray.length(); i++) {
ids[i] = jsonArray.getInt(i);
}
result.setId(ids);
}
}
}
} catch (JSONException e) {
e.printStackTrace();
}
return result;
}
@Override
protected boolean getRequestType() {
return false;
}
@Override
protected int getServiceCode() {
return 0;
}
@Override
protected String[] getRequestLines() {
if (task != null) {
CloudStorage.Updata addObject=(CloudStorage.Updata)task;
String[] str = new String[1];
StringBuilder sb = new StringBuilder();
try {
// 入参设置
if (addObject!=null){
sb.append("datasetId=").append(addObject.getDataSetId());
//拼data json字符串
StringBuffer dataJson=new StringBuffer();
CloudItem[] items= addObject.getCloudItems();
dataJson.append("[");
for(int j=0;j<items.length;j++){
if(j!=0)dataJson.append(",");
CloudItem item=items[j];
dataJson.append("{");
String coords="\"coordinates\":";
if(item.getCoordinates().size()>0){
String coord="";
for(int i=0;i<item.getCoordinates().size();i++){
LatLonPoint point=item.getCoordinates().get(i);
if(i!=0)coord+=",";
coord+=point.getLongitude()+" "+point.getLatitude();
}
coords+="\""+coord+"\"";
}else {
coords+="\""+item.getLon()+" "+item.getLat()+"\"";
}
dataJson.append(coords);
// 自定义字段
for(Map.Entry<String ,Object> entry:item.getExtras().entrySet()){
dataJson.append(",");
String st="\""+entry.getKey()+"\":\""+entry.getValue().toString()+"\"";
dataJson.append(st);
}
dataJson.append("}");
}
dataJson.append("]");
sb.append("&data=").append(dataJson);
StringBuffer idsString=new StringBuffer();
int[] ids= addObject.getDataIds();
for(int i=0;i<ids.length;i++){
if(i!=0) idsString.append(",");
idsString.append(ids[i]);
}
sb.append("&ids=").append(idsString);
}
} catch (Exception e) {
e.printStackTrace();
}
str[0] = sb.toString();
return str;
}
return null;
}
@Override
protected String getUrl() {
String url = null;
url = AppInfo.getCloudUrl(this.context)+path;
return url+path;
}
}
|
[
"conggong@sfmail.sf-express.com"
] |
conggong@sfmail.sf-express.com
|
7502aee333623ffb79b6cf640904388ab01fe96f
|
7bfcda3f318cb06912583d538fe370c347803105
|
/redis/redis-console/src/main/java/com/ctrip/xpipe/redis/console/controller/consoleportal/KeeperContainerInfoController.java
|
dad16e523f316e2b620a9b4e35e28b591e9b5684
|
[
"Apache-2.0"
] |
permissive
|
sdgdsffdsfff/x-pipe
|
9f4271775dd9be3b612670afd70bc7282dfb1c38
|
b78cec0db95263417f99ad88deff582ca1c0f046
|
refs/heads/master
| 2021-01-18T05:18:27.766693
| 2020-01-10T04:51:08
| 2020-01-10T04:51:08
| 67,751,571
| 0
| 1
|
Apache-2.0
| 2020-01-10T04:51:10
| 2016-09-09T00:45:55
|
Java
|
UTF-8
|
Java
| false
| false
| 997
|
java
|
package com.ctrip.xpipe.redis.console.controller.consoleportal;
import com.ctrip.xpipe.redis.console.controller.AbstractConsoleController;
import com.ctrip.xpipe.redis.console.model.KeeperContainerInfoModel;
import com.ctrip.xpipe.redis.console.service.KeeperContainerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
@RequestMapping(AbstractConsoleController.CONSOLE_PREFIX)
public class KeeperContainerInfoController extends AbstractConsoleController {
@Autowired
KeeperContainerService keeperContainerService;
@RequestMapping(value = "/keepercontainer/infos/all", method = RequestMethod.GET)
public List<KeeperContainerInfoModel> getAllKeeperContainerInfos() {
return keeperContainerService.findAllInfos();
}
}
|
[
"cz739@nyu.edu"
] |
cz739@nyu.edu
|
c746fe175ddf4426a8ec88f925ff2e4a5f2ba9c0
|
b7bd5d9e3af9589659f589770d09567f72b1e19b
|
/ambit2-hpcws/src/main/java/cz/it4i/hpcaas/filetransfer/GetFileTransferMethodResponse.java
|
1a4847cb7ce3cc3acbfd9f4062500c3694b682a4
|
[] |
no_license
|
ideaconsult/ambit2-haas
|
bccae4492bf1a5f063493f0af8c34af16c9af069
|
9a7dade2d183e6ad8384ccdb04f073570f10de37
|
refs/heads/master
| 2021-06-28T14:06:54.316189
| 2020-06-16T05:14:50
| 2020-06-16T05:14:50
| 163,846,410
| 0
| 0
| null | 2020-10-13T11:30:08
| 2019-01-02T13:45:26
|
Java
|
UTF-8
|
Java
| false
| false
| 1,794
|
java
|
package cz.it4i.hpcaas.filetransfer;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="GetFileTransferMethodResult" type="{http://hpcaas.it4i.cz/}FileTransferMethodExt" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"getFileTransferMethodResult"
})
@XmlRootElement(name = "GetFileTransferMethodResponse")
public class GetFileTransferMethodResponse {
@XmlElement(name = "GetFileTransferMethodResult")
protected FileTransferMethodExt getFileTransferMethodResult;
/**
* Gets the value of the getFileTransferMethodResult property.
*
* @return
* possible object is
* {@link FileTransferMethodExt }
*
*/
public FileTransferMethodExt getGetFileTransferMethodResult() {
return getFileTransferMethodResult;
}
/**
* Sets the value of the getFileTransferMethodResult property.
*
* @param value
* allowed object is
* {@link FileTransferMethodExt }
*
*/
public void setGetFileTransferMethodResult(FileTransferMethodExt value) {
this.getFileTransferMethodResult = value;
}
}
|
[
"jeliazkova.nina@gmail.com"
] |
jeliazkova.nina@gmail.com
|
688cd0484fd692455a58fd858376e39e339c6fe2
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/11/11_10916be6880c38b14014b6a886ec613a0100b944/MenuRender/11_10916be6880c38b14014b6a886ec613a0100b944_MenuRender_t.java
|
898130c63a14370f0eaf113f5d24de607f753a3e
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 5,599
|
java
|
//This class renders the main menu for the client. It also operates the UI for the main menu
import java.awt.*;
import java.awt.event.*;
public class MenuRender implements MouseMotionListener, MouseListener, MouseWheelListener, KeyListener {
ScreenManager sm;
private final int HOVER_START = 1;
private final int HOVER_EXIT = 2;
private final int HOVER_JOINMENU = 3;
private final int HOVER_JOINBACK = 4;
private final int HOVER_JOINCONNECT = 5;
private final int MENU_MAIN = 0;
private final int MENU_JOIN = 1;
int buttonHovered;
int screenWidth;
int screenHeight;
boolean running;
int returnValue;
Point mouse;
Font font1;
Font font2;
public static String IP;
int displayedMenu;
private void init(){
mouse = new Point();
Window w = sm.getFullScreenWindow();
w.setBackground(Color.BLACK);
w.setForeground(Color.WHITE);
screenHeight = w.getHeight();
screenWidth = w.getWidth();
int fontSize = (int)Math.round(/*Font Size:*/12.0/**/*screenWidth*.001);
font1 = new Font("Arial", Font.BOLD, fontSize);
fontSize = (int)Math.round(/*Font Size:*/18.0/**/*screenWidth*.001);
font2 = new Font("Arial", Font.BOLD, fontSize);
w.addMouseMotionListener(this);
w.addMouseListener(this);
w.addMouseWheelListener(this);
w.addKeyListener(this);
IP = new String();
running = true;
}
public int menu(ScreenManager screenmanager){
sm = screenmanager;
init();
while(running){
Graphics2D g = sm.getGraphics();
g.clearRect(0, 0, screenWidth, screenHeight);
g.setColor(Color.WHITE);
buttonHovered = 0;
if(displayedMenu == MENU_JOIN){//the "join game menu"
g.setFont(font2);
g.drawString("JOIN GAME", (int) (screenWidth - screenHeight*.5), (int) (screenHeight*.17));
//ip address entry field
g.setFont(font1);
g.drawString("Enter the IP Address:", (int) (screenHeight*.1), (int) (screenHeight*.20));
g.drawRect((int) (screenHeight*.1), (int) (screenHeight*.22), (int) (screenHeight*.2), (int) (screenHeight*.04));
g.drawString(IP + "_", (int) (screenHeight*.11), (int) (screenHeight*.24));
if(mouse.x > screenHeight*.1 && mouse.x < screenHeight*.15 && mouse.y > screenHeight*.28 && mouse.y < screenHeight*.30){
g.setColor(Color.YELLOW);
buttonHovered = HOVER_JOINCONNECT;
} else {
g.setColor(Color.WHITE);
}
g.drawString("Connect", (int) (screenHeight*.1), (int) (screenHeight*.30));
//back button
if(mouse.x > screenHeight*.1 && mouse.x < screenHeight*.15 && mouse.y > screenHeight*.34 && mouse.y < screenHeight*.36){
g.setColor(Color.YELLOW);
buttonHovered = HOVER_JOINBACK;
} else {
g.setColor(Color.WHITE);
}
g.drawString("Back", (int) (screenHeight*.1), (int) (screenHeight*.36));
} else if(displayedMenu == MENU_MAIN){//the main game menu
g.setFont(font1);
if(mouse.x > screenHeight*.1 && mouse.x < screenHeight*.21 && mouse.y > screenHeight*.18 && mouse.y < screenHeight*.20){
g.setColor(Color.YELLOW);
buttonHovered = HOVER_START;
}
g.drawString("Start Game", (int) (screenHeight*.1), (int) (screenHeight*.20));
if(mouse.x > screenHeight*.1 && mouse.x < screenHeight*.15 && mouse.y > screenHeight*.26 && mouse.y < screenHeight*.28){
g.setColor(Color.YELLOW);
buttonHovered = HOVER_EXIT;
}else{
g.setColor(Color.WHITE);
}
g.drawString("Exit", (int) (screenHeight*.1), (int) (screenHeight*.28));
if(mouse.x > screenHeight*.1 && mouse.x < screenHeight*.21 && mouse.y > screenHeight*.22 && mouse.y < screenHeight*.24){
g.setColor(Color.YELLOW);
buttonHovered = HOVER_JOINMENU;
}else{
g.setColor(Color.WHITE);
}
g.drawString("Join Game", (int) (screenHeight*.1), (int)(screenHeight*.24));
g.setColor(Color.WHITE);
g.drawString("Pre-Alpha", (int) (screenWidth - screenHeight*.4), (int) (screenHeight*.20));
g.setFont(font2);
g.drawString("BROOMBALL SIMULATOR", (int) (screenWidth - screenHeight*.5), (int) (screenHeight*.17));
}
g.dispose();
//update the screen
sm.update();
try {
Thread.sleep(10);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
return returnValue;
}
public void keyPressed(KeyEvent e) {
if(displayedMenu == MENU_JOIN){//Ip entering code
if(e.getKeyCode() == KeyEvent.VK_BACK_SPACE){
if(IP.length() > 0){
IP = IP.substring(0, IP.length() - 1);
}
} else {
IP += Character.toString(e.getKeyChar());
}
}
}
public void keyReleased(KeyEvent e) {}
public void keyTyped(KeyEvent e) {}
public void mouseWheelMoved(MouseWheelEvent e) {}
public void mouseClicked(MouseEvent arg0) {}
public void mouseEntered(MouseEvent arg0) {}
public void mouseExited(MouseEvent arg0) {}
public void mousePressed(MouseEvent arg0) {
returnValue = buttonHovered;
if(returnValue != 0){
if(returnValue == HOVER_JOINMENU){
displayedMenu = MENU_JOIN;
IP = "";
} else if(returnValue == HOVER_JOINBACK){
displayedMenu = MENU_MAIN;
}else if(returnValue == HOVER_JOINCONNECT){
running = false;
}else{
running = false;
}
}
}
public void mouseReleased(MouseEvent arg0) {}
public void mouseDragged(MouseEvent e) {
mouseMoved(e);
}
public void mouseMoved(MouseEvent e) {
mouse.x = e.getX();
mouse.y = e.getY();
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
907d54d8ec41d49592a0f924bae9b6b9efffddcf
|
35e8a12f96c6f46aa77907c3a3ee2af30c8c8d3f
|
/hub.sam.sdl.model/src/hub/sam/sdl/SdlPidExpressionEvaluation.java
|
a7fb26032575a710d8cd9cd705bb011190227502
|
[] |
no_license
|
markus1978/tef
|
36049dee71a99d24401d4a01fe33a3018e7bb776
|
38bfc24dc64822b7b3ed74e41f85b3a8c10c1955
|
refs/heads/master
| 2020-04-06T04:30:58.699975
| 2015-08-13T07:51:37
| 2015-08-13T07:51:37
| 25,520,279
| 1
| 2
| null | 2015-08-13T07:51:37
| 2014-10-21T12:13:17
|
Java
|
UTF-8
|
Java
| false
| false
| 439
|
java
|
/**
* <copyright>
* </copyright>
*
* $Id$
*/
package hub.sam.sdl;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Sdl Pid Expression Evaluation</b></em>'.
* <!-- end-user-doc -->
*
*
* @see hub.sam.sdl.EmfSdlPackage#getSdlPidExpressionEvaluation()
* @model
* @generated
*/
public interface SdlPidExpressionEvaluation extends SdlEvaluation {
} // SdlPidExpressionEvaluation
|
[
"do@not.use"
] |
do@not.use
|
be6dcad53d9ab32906354c2316ec554dce4f0202
|
ffced0ab7dced58a5713ef2478d17213b785a845
|
/DWZSpringMVC/src/com/joe/exception/ExistedException.java
|
1520a1dbb3e52aa6f1a5a9e8cafe8799e1114fb1
|
[] |
no_license
|
chocoai/12_JEE_DWZSpringMVC_JeeSite
|
c7d77becffe536d066042fb83f420e1a0684a021
|
f9fd8369d2c4605ad5843c460a220535fa3f75de
|
refs/heads/master
| 2020-05-17T08:15:58.672851
| 2014-01-21T09:41:42
| 2014-01-21T09:41:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 449
|
java
|
package com.joe.exception;
/**
*
*/
public class ExistedException extends ServiceException {
/** 描述 */
private static final long serialVersionUID = -598071452360556064L;
public ExistedException() {
super();
}
public ExistedException(String message) {
super(message);
}
public ExistedException(Throwable cause) {
super(cause);
}
public ExistedException(String message, Throwable cause) {
super(message, cause);
}
}
|
[
"xiaojunshcn@gmail.com"
] |
xiaojunshcn@gmail.com
|
54e0d6ccf57a4e4dc9cb46798f624492ea5ffcf3
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/5/5_638addd39ea488f84e1006c676e4182162263907/MenuBar/5_638addd39ea488f84e1006c676e4182162263907_MenuBar_s.java
|
abd2567b579c0589afadce7b5e8780b8394441d7
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 6,000
|
java
|
/***************************************************************************
* Copyright 2006-2007 by Christian Ihle *
* kontakt@usikkert.net *
* *
* 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 this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
package net.usikkert.kouchat.ui.swing;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.SwingUtilities;
import net.usikkert.kouchat.Constants;
public class MenuBar extends JMenuBar implements ActionListener
{
private static final long serialVersionUID = 1L;
private JMenu fileMenu, toolsMenu, helpMenu;
private JMenuItem minimizeMI, quitMI, clearMI, awayMI, topicMI, settingsMI, aboutMI, commandsMI;
private Mediator mediator;
public MenuBar()
{
fileMenu = new JMenu( "File" );
fileMenu.setMnemonic( 'F' );
minimizeMI = new JMenuItem( "Minimize" );
minimizeMI.setMnemonic( 'M' );
minimizeMI.addActionListener( this );
quitMI = new JMenuItem( "Quit" );
quitMI.setMnemonic( 'Q' );
quitMI.addActionListener( this );
fileMenu.add( minimizeMI );
fileMenu.addSeparator();
fileMenu.add( quitMI );
toolsMenu = new JMenu( "Tools" );
toolsMenu.setMnemonic( 'T' );
clearMI = new JMenuItem( "Clear chat" );
clearMI.setMnemonic( 'C' );
clearMI.addActionListener( this );
awayMI = new JMenuItem( "Set away" );
awayMI.setMnemonic( 'S' );
awayMI.addActionListener( this );
topicMI = new JMenuItem( "Change topic" );
topicMI.setMnemonic( 'E' );
topicMI.addActionListener( this );
settingsMI = new JMenuItem( "Settings" );
settingsMI.setMnemonic( 'S' );
settingsMI.addActionListener( this );
toolsMenu.add( clearMI );
toolsMenu.add( awayMI );
toolsMenu.add( topicMI );
toolsMenu.addSeparator();
toolsMenu.add( settingsMI );
helpMenu = new JMenu( "Help" );
helpMenu.setMnemonic( 'H' );
commandsMI = new JMenuItem( "Commands" );
commandsMI.setMnemonic( 'O' );
commandsMI.addActionListener( this );
aboutMI = new JMenuItem( "About" );
aboutMI.setMnemonic( 'A' );
aboutMI.addActionListener( this );
helpMenu.add( commandsMI );
helpMenu.addSeparator();
helpMenu.add( aboutMI );
add( fileMenu );
add( toolsMenu );
add( helpMenu );
}
public void setMediator( Mediator mediator )
{
this.mediator = mediator;
}
public void setAwayState( boolean away )
{
settingsMI.setEnabled( !away );
topicMI.setEnabled( !away );
}
public void disableMinimize()
{
minimizeMI.setEnabled( false );
}
@Override
public void actionPerformed( ActionEvent e )
{
if ( e.getSource() == quitMI )
{
SwingUtilities.invokeLater( new Runnable()
{
@Override
public void run()
{
mediator.quit();
}
} );
}
else if ( e.getSource() == settingsMI )
{
SwingUtilities.invokeLater( new Runnable()
{
@Override
public void run()
{
mediator.showSettings();
}
} );
}
else if ( e.getSource() == minimizeMI )
{
SwingUtilities.invokeLater( new Runnable()
{
@Override
public void run()
{
mediator.minimize();
}
} );
}
else if ( e.getSource() == awayMI )
{
SwingUtilities.invokeLater( new Runnable()
{
@Override
public void run()
{
mediator.setAway();
}
} );
}
else if ( e.getSource() == topicMI )
{
SwingUtilities.invokeLater( new Runnable()
{
@Override
public void run()
{
mediator.setTopic();
}
} );
}
else if ( e.getSource() == clearMI )
{
SwingUtilities.invokeLater( new Runnable()
{
@Override
public void run()
{
mediator.clearChat();
}
} );
}
else if ( e.getSource() == commandsMI )
{
SwingUtilities.invokeLater( new Runnable()
{
@Override
public void run()
{
mediator.showCommands();
}
} );
}
else if ( e.getSource() == aboutMI )
{
SwingUtilities.invokeLater( new Runnable()
{
@Override
public void run()
{
MessageDialog aboutD = new MessageDialog( null, true );
aboutD.setTitle( Constants.APP_NAME + " - About" );
aboutD.setTopText( Constants.APP_NAME + " v" + Constants.APP_VERSION );
aboutD.setContent( "Copyright 2006-2007 by " + Constants.AUTHOR_NAME + "\n" + Constants.AUTHOR_MAIL
+ "\n" + Constants.AUTHOR_WEB + "\n\nSource available under the " + Constants.APP_LICENSE
+ ".\nSee " + Constants.APP_LICENSE_FILE + " for details." );
aboutD.setVisible( true );
}
} );
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
f301369b150636a1ffd6c11a73de25306dbec6b5
|
f66fc1aca1c2ed178ac3f8c2cf5185b385558710
|
/reladomo/src/main/java/com/gs/fw/common/mithra/DefaultJtaProvider.java
|
eace81d17b4d980c1fe8557076cc7c7127a041d6
|
[
"Apache-2.0",
"BSD-3-Clause",
"MIT",
"LicenseRef-scancode-public-domain"
] |
permissive
|
goldmansachs/reladomo
|
9cd3e60e92dbc6b0eb59ea24d112244ffe01bc35
|
a4f4e39290d8012573f5737a4edc45d603be07a5
|
refs/heads/master
| 2023-09-04T10:30:12.542924
| 2023-07-20T09:29:44
| 2023-07-20T09:29:44
| 68,020,885
| 431
| 122
|
Apache-2.0
| 2023-07-07T21:29:52
| 2016-09-12T15:17:34
|
Java
|
UTF-8
|
Java
| false
| false
| 1,041
|
java
|
/*
Copyright 2016 Goldman Sachs.
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.gs.fw.common.mithra;
import javax.transaction.TransactionManager;
public class DefaultJtaProvider implements JtaProvider
{
private TransactionManager transactionManager;
public DefaultJtaProvider(TransactionManager transactionManager)
{
this.transactionManager = transactionManager;
}
public TransactionManager getJtaTransactionManager()
{
return transactionManager;
}
}
|
[
"mohammad.rezaei@gs.com"
] |
mohammad.rezaei@gs.com
|
5e086a10f9a3ebccb71fee5c713bd023b4196ff4
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/single-large-project/src/test/java/org/gradle/test/performancenull_319/Testnull_31832.java
|
d437faeb6ba4c5b7419de023657f505ab5277c30
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 308
|
java
|
package org.gradle.test.performancenull_319;
import static org.junit.Assert.*;
public class Testnull_31832 {
private final Productionnull_31832 production = new Productionnull_31832("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
fc6be871a6551562468a961a0422a1ad86f2cec8
|
088d3043de4f50d702829b9224889ba27ef28385
|
/game-common/src/main/java/com/xianyi/framework/core/concurrent/selfDriver/AutoDriverQueue.java
|
903decf50a5ca1aba5eb4e030863c3426390aeb1
|
[] |
no_license
|
taohyson/SERVER-1
|
adf64087dab42a16af256a841a19b9556d05fd86
|
d2bc339c4facebb6c63cabad406a623ebc14ef88
|
refs/heads/master
| 2020-04-15T16:19:04.804074
| 2018-12-03T08:11:21
| 2018-12-03T08:11:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,212
|
java
|
/**
* Copyright@2015-2016 Hunan Qisheng Network Technology Co. Ltd.[SHEN-ZHEN]
*/
package com.xianyi.framework.core.concurrent.selfDriver;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.Executor;
import java.util.concurrent.atomic.LongAdder;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.cai.common.util.SystemClock;
import com.google.common.base.Strings;
import com.google.common.collect.Lists;
/**
* thread_safe,保证队列的任务顺序执行,适用于任务粒度大,耗时长,但并发不是特别高的场景
*
* @author wu_hc date: 2018年1月12日 下午5:55:30 <br/>
*/
public final class AutoDriverQueue implements Runnable, Executor {
private static final Logger logger = LoggerFactory.getLogger(AutoDriverQueue.class);
/**
* 队列
*/
private final LinkedList<Runnable> taskQueue = Lists.newLinkedList();
/**
* 执行器
*/
private final Executor actuator;
/**
* 锁对象
*/
private final Lock lock = new ReentrantLock();
/**
* 提交的任务数量
*/
private final LongAdder submitTaskCount = new LongAdder();
/**
* 批量执行,y每次调度会把队列中的所有任务一次执行完毕,n顺序取出一个任务执行
*/
private final boolean isBatchExecute;
// @Deprecated
// public static final AutoDriverQueue newQueue(Executor excutor, boolean isBatchExecute) {
// return new AutoDriverQueue(excutor, isBatchExecute);
// }
/**
* @param excutor
* @return
*/ public static final AutoDriverQueue newQueue(Executor excutor) {
return new AutoDriverQueue(excutor, false);
}
/**
* @param excutor
*/
private AutoDriverQueue(Executor excutor, boolean isBatchExecute) {
checkNotNull(excutor, "excutor is a nil value!");
this.actuator = excutor;
this.isBatchExecute = isBatchExecute;
}
/**
* @param task
*/
public int addTask(final Runnable task) {
checkNotNull(task, "task is nil value ");
int taskSize = 0;
final Lock lock = this.lock;
lock.lock();
submitTaskCount.increment();
try {
if (isEmpty()) {
taskQueue.add(task);
actuator.execute(this);
} else {
taskQueue.add(task);
}
taskSize = size();
if (taskSize > 1000) {
logger.warn("[auto_driver_queue] more task in queue! size:[{}],thread:[{}]", taskSize, Thread.currentThread().getName());
}
} finally {
lock.unlock();
}
return taskSize;
}
/**
* @param tasks
*/
public int addTask(final Collection<Runnable> tasks) {
checkNotNull(tasks, "tasks is nil value ");
int taskSize = 0;
final Lock lock = this.lock;
lock.lock();
submitTaskCount.increment();
try {
if (isEmpty()) {
taskQueue.addAll(tasks);
actuator.execute(this);
} else {
taskQueue.addAll(tasks);
}
taskSize = size();
if (taskSize > 1000) {
logger.warn("[auto_driver_queue] more task in queue! size:[{}],thread:[{}]", taskSize, Thread.currentThread().getName());
}
} finally {
lock.unlock();
}
return taskSize;
}
@Override
public void execute(Runnable command) {
addTask(command);
}
/**
* 将队列里未执行的任务抽离出来 --GAME-TODO(待测试)
*
* @return
*/
public final List<Runnable> drainQueue() {
List<Runnable> taskList = null;
final Lock lock = this.lock;
lock.lock();
try {
if (isEmpty()) {
taskList = Collections.emptyList();
} else {
taskList = Lists.newArrayListWithCapacity(size() + 16);
taskList.addAll(taskQueue);
taskQueue.clear();
}
} finally {
lock.unlock();
}
return taskList;
}
@Override
public void run() {
try {
if (isBatchExecute) {
batchExecute();
} else {
singleExecute();
}
} finally {
tryNextCommit();
}
}
/**
* 每次提交一个任务
*/
void singleExecute() {
Runnable task = null;
final Lock lock = this.lock;
lock.lock();
try {
if (!taskQueue.isEmpty()) {
task = taskQueue.peek();
}
} finally {
lock.unlock();
}
// 在锁外执行,保证在执行期间不占用锁
if (null != task) {
executeTask(task);
}
}
/**
* 每次提交队列中所有任务
*/
void batchExecute() {
List<Runnable> taskList = Lists.newArrayListWithCapacity(size() + 16);
final Lock lock = this.lock;
lock.lock();
try {
if (!taskQueue.isEmpty()) {
taskList.addAll(taskQueue);
}
taskQueue.clear();
} finally {
lock.unlock();
}
// 在锁外执行,保证在执行期间不占用锁
taskList.forEach((task) -> executeTask(task));
taskList.clear();
taskList = null; // help GC
}
/**
* 尝试再提交
*/
private void tryNextCommit() {
final Lock lock = this.lock;
lock.lock();
try {
//弹出已经执行的任务
if (!isBatchExecute()) {
taskQueue.poll();
}
if (!isEmpty()) {
actuator.execute(this);
}
} finally {
lock.unlock();
}
}
static void executeTask(final Runnable task) {
long cur = SystemClock.CLOCK.now();
try {
task.run();
long now = SystemClock.CLOCK.now();
if (now - cur > 100L) {
logger.warn("task[ {}, {} ] cost must time:[ {}ms ],thread[ {} ]", task.getClass(), task.toString(), (now - cur),
Thread.currentThread().getName());
}
} catch (Exception e) {
e.printStackTrace();
}
}
public int size() {
return taskQueue.size();
}
public boolean isEmpty() {
return taskQueue.isEmpty();
}
public void clear() {
final Lock lock = this.lock;
lock.lock();
try {
taskQueue.clear();
} finally {
lock.unlock();
}
}
public boolean isBatchExecute() {
return isBatchExecute;
}
public long getTotalTaskCount() {
return submitTaskCount.longValue();
}
/**
* @param v
* @param msg
*/
private static void checkNotNull(Object v, String msg) {
if (v == null)
throw Strings.isNullOrEmpty(msg) ? new NullPointerException() : new NullPointerException(msg);
}
@Override
public String toString() {
return String.format("[AutoDriverQueue]isBatchExecute:%b,size:%d,submitTaskCount:%d", isBatchExecute, size(), getTotalTaskCount());
}
}
|
[
"905202059@qq.com"
] |
905202059@qq.com
|
81a0f33cb8a2d949ca4d25f73a9bb46224d22896
|
7378949608fbecd16482c3e9150b2c7b207a3a72
|
/src/userdefinedclass/Car.java
|
9b3c33fefe0937bf3cffe0378ca1e421c0dcaf5e
|
[] |
no_license
|
PeopleNTechJavaSelenium/core-java-ds
|
0456b13bd6f2ed7a87b1d5396e4e6bbee01dcbc5
|
6ce77197f8bfc28605a5a7b37ab68962fe09564f
|
refs/heads/master
| 2021-01-17T11:10:43.300877
| 2015-12-05T21:07:31
| 2015-12-05T21:07:31
| 47,472,542
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 258
|
java
|
package userdefinedclass;
public class Car {
String carModel = "Acura" ;
public Car(String carModel){
this.carModel = carModel;
System.out.println(carModel);
}
public void driver(){
System.out.println("Need a driver to drive the car");
}
}
|
[
"rahmanww@gmail.com"
] |
rahmanww@gmail.com
|
81b794ea466eade5dc99ec4551d22ab4d3611555
|
2f92dfff9b9929b64e645fdc254815d06bf2b8d2
|
/src/main/lee/code/code_862__Shortest_Subarray_with_Sum_at_Least_K/Solution.java
|
43278d413708819722a66507b1cb964efa781e44
|
[
"MIT"
] |
permissive
|
code543/leetcodequestions
|
fc5036d63e4c3e1b622fe73552fb33c039e63fb0
|
44cbfe6718ada04807b6600a5d62b9f0016d4ab2
|
refs/heads/master
| 2020-04-05T19:43:15.530768
| 2018-12-07T04:09:07
| 2018-12-07T04:09:07
| 157,147,529
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 912
|
java
|
package lee.code.code_862__Shortest_Subarray_with_Sum_at_Least_K;
import java.util.*;
import lee.util.*;
/**
*
*
* 862.Shortest Subarray with Sum at Least K
*
* difficulty: Hard
* @see https://leetcode.com/problems/shortest-subarray-with-sum-at-least-k/description/
* @see description_862.md
* @Similiar Topics
* -->Queue https://leetcode.com//tag/queue
* -->Binary Search https://leetcode.com//tag/binary-search
* @Similiar Problems
* Run solution from Unit Test:
* @see lee.codetest.code_862__Shortest_Subarray_with_Sum_at_Least_K.CodeTest
* Run solution from Main Judge Class:
* @see lee.code.code_862__Shortest_Subarray_with_Sum_at_Least_K.C862_MainClass
*
*/
class Solution {
public int shortestSubarray(int[] A, int K) {
return 0;
}
}
class Main1 {
public static void main(String[] args) {
//new Solution();
}
}
|
[
"santoschenwbu@gmail.com"
] |
santoschenwbu@gmail.com
|
b4cfba46a7b444d52b883ece74a448f979dbf6d6
|
6b19524c2db316c1bae52a24f8b37fd6969b9400
|
/plugins/circuit-breaker-policy/src/main/java/io/apiman/plugins/circuit_breaker/beans/CircuitBreakerConfigBean.java
|
64ec649c11a3ed0df66550f5815a053acd0d5f48
|
[
"Apache-2.0"
] |
permissive
|
apiman/apiman
|
feb59b437485080425105c8597ff01f3df4a7697
|
347f4a8de4d3f9feea7a4daa01cec7d12f654a0d
|
refs/heads/master
| 2023-08-31T23:50:25.742996
| 2023-08-25T19:22:58
| 2023-08-25T19:22:58
| 12,319,410
| 846
| 440
|
Apache-2.0
| 2023-09-14T17:09:49
| 2013-08-23T09:29:20
|
Java
|
UTF-8
|
Java
| false
| false
| 2,536
|
java
|
/*
* Copyright 2016 JBoss Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.apiman.plugins.circuit_breaker.beans;
import java.util.HashSet;
import java.util.Set;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Configuration object for the JSONP policy.
*
* @author Alexandre Kieling {@literal <alex.kieling@gmail.com>}
*/
public class CircuitBreakerConfigBean {
@JsonProperty
private Set<String> errorCodes = new HashSet<>();
@JsonProperty
private int window;
@JsonProperty
private int limit;
@JsonProperty
private int reset;
@JsonProperty
private int failureCode;
/**
* Constructor.
*/
public CircuitBreakerConfigBean() {
}
/**
* @return the errorCodes
*/
public Set<String> getErrorCodes() {
return errorCodes;
}
/**
* @param errorCodes the errorCodes to set
*/
public void setErrorCodes(Set<String> errorCodes) {
this.errorCodes = errorCodes;
}
/**
* @return the window
*/
public int getWindow() {
return window;
}
/**
* @param window the window within which to keep faults (in seconds)
*/
public void setWindow(int window) {
this.window = window;
}
/**
* @return the limit
*/
public int getLimit() {
return limit;
}
/**
* @param limit the limit (# of faults)
*/
public void setLimit(int limit) {
this.limit = limit;
}
/**
* @return the reset
*/
public int getReset() {
return reset;
}
/**
* @param reset the reset time (in seconds)
*/
public void setReset(int reset) {
this.reset = reset;
}
/**
* @return the failureCode
*/
public int getFailureCode() {
return failureCode;
}
/**
* @param failureCode the failureCode to set
*/
public void setFailureCode(int failureCode) {
this.failureCode = failureCode;
}
}
|
[
"eric.wittmann@gmail.com"
] |
eric.wittmann@gmail.com
|
49ccf4e666d0f1e461451cb39230c07a2e2d9bc6
|
d280800ca4ec277f7f2cdabc459853a46bf87a7c
|
/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/servlet/mockmvc/ExampleException.java
|
0cbe3925b82d5df699070ff89d72e3ffe1967eb3
|
[
"Apache-2.0"
] |
permissive
|
qqqqqcjq/spring-boot-2.1.x
|
e5ca46d93eeb6a5d17ed97a0b565f6f5ed814dbb
|
238ffa349a961d292d859e6cc2360ad53b29dfd0
|
refs/heads/master
| 2023-03-12T12:50:11.619493
| 2021-03-01T05:32:52
| 2021-03-01T05:32:52
| 343,275,523
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 951
|
java
|
/*
* Copyright 2012-2019 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.test.autoconfigure.web.servlet.mockmvc;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
/**
* Example exception used in {@link WebMvcTest} tests.
*
* @author Phillip Webb
*/
public class ExampleException extends RuntimeException {
}
|
[
"caverspark@163.com"
] |
caverspark@163.com
|
cb42b5f6e948de0527b6be0bff0c21ffc413e8c4
|
7398714c498444374047497fe2e9c9ad51239034
|
/com/zhekasmirnov/innercore/core/MinecraftActivity.java
|
1373fa43641748979535ca54428d4c051ecaf70a
|
[] |
no_license
|
CheatBoss/InnerCore-horizon-sources
|
b3609694df499ccac5f133d64be03962f9f767ef
|
84b72431e7cb702b7d929c61c340a8db07d6ece1
|
refs/heads/main
| 2023-04-07T07:30:19.725432
| 2021-04-10T01:23:04
| 2021-04-10T01:23:04
| 356,437,521
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,481
|
java
|
package com.zhekasmirnov.innercore.core;
import java.lang.ref.*;
import android.app.*;
import com.zhekasmirnov.innercore.api.mod.*;
import com.zhekasmirnov.horizon.runtime.logger.*;
import com.zhekasmirnov.innercore.utils.*;
import com.zhekasmirnov.innercore.mod.resource.*;
import com.zhekasmirnov.innercore.api.runtime.*;
import com.zhekasmirnov.innercore.ui.*;
import com.zhekasmirnov.innercore.api.log.*;
import com.zhekasmirnov.mcpe161.*;
import com.zhekasmirnov.innercore.core.handle.*;
import android.os.*;
public class MinecraftActivity
{
private static final boolean COMPILE_MENU_SCRIPTS = false;
public static final String LOGGER_TAG = "INNERCORE-ACTIVITY";
private static final boolean RUN_ONLY_COMPILED_SCRIPTS = false;
public static WeakReference<Activity> current;
private static TPSMeter fpsMeter;
private static boolean isCrashHandlerLibLoaded;
private static boolean isFullscreen;
private static boolean isLoaded;
static {
MinecraftActivity.isFullscreen = false;
API.loadAllAPIs();
MinecraftActivity.isCrashHandlerLibLoaded = false;
MinecraftActivity.isLoaded = false;
MinecraftActivity.fpsMeter = new TPSMeter(20, 500);
}
private static void _initialize() {
try {
Logger.debug("INNERCORE-ACTIVITY", "starting native initialization...");
loadSubstrate();
if (MinecraftActivity.isCrashHandlerLibLoaded) {
nativeSetupCrashHandler(FileTools.assureAndGetCrashDir());
}
nativeInit();
ResourceStorage.loadAllTextures();
LoadingStage.setStage(5);
LoadingUI.setTextAndProgressBar("Initializing Minecraft...", 0.55f);
}
catch (Throwable t) {
ICLog.e("ERROR", "FAILED TO RUN INNER CORE LIB", t);
ICLog.flush();
throw new RuntimeException(t);
}
}
private static boolean checkAssetExists(final String s) {
FileTools.getAssetInputStream(s);
return true;
}
public static void forceUIThreadPriority() {
if (EnvironmentSetup.getCurrentActivity() != null) {
EnvironmentSetup.getCurrentActivity().runOnUiThread((Runnable)new Runnable() {
@Override
public void run() {
Process.setThreadPriority(-19);
}
});
return;
}
ICLog.i("ERROR", "FAILED TO SET PRIORITY TO UI THREAD");
}
public static void initialize(final boolean b) {
if (b) {
new Thread(new Runnable() {
@Override
public void run() {
_initialize();
}
}).start();
return;
}
_initialize();
}
public static void loadSubstrate() {
System.loadLibrary("tinysubstrate");
System.out.println("Substrate lib loaded");
System.loadLibrary("native-lib");
System.out.println("InnerCore lib loaded");
try {
System.loadLibrary("corkscrew");
System.out.println("crash handler lib loaded");
MinecraftActivity.isCrashHandlerLibLoaded = true;
}
catch (Throwable t) {
final StringBuilder sb = new StringBuilder();
sb.append("failed to load crash handler library ");
sb.append(t);
ICLog.i("WARNING", sb.toString());
}
}
public static native void nativeInit();
public static native void nativeSetupCrashHandler(final String p0);
public static void onFinalLoadComplete() {
MinecraftActivity.isLoaded = true;
LoadingStage.setStage(7);
LoadingUI.close();
AbiChecker.checkABIAndShowWarnings();
AdsHelper.checkPermissions();
ICLog.showIfErrorsAreFound();
LoadingStage.outputTimeMap();
}
public static void onFinalLoadStarted() {
}
public static void onLevelLeft() {
}
public static void onMCPELibLoaded() {
initialize(false);
}
public static void onNativeGuiLoaded() {
LoadingUI.setProgress(0.6f);
}
public boolean isStoragePermissionGranted() {
return true;
}
public void onCreate(final Bundle bundle) {
Logger.debug("INNERCORE", "Starting Minecraft...");
this.isStoragePermissionGranted();
}
}
|
[
"cheat.boss1@gmail.com"
] |
cheat.boss1@gmail.com
|
ac614ae0ced817747dbf63d717066b0365e0d751
|
e0770a2f82506643b5a621a8dabe1bc115738c2a
|
/app/src/main/java/com/shangame/fiction/book/cover/BookCoverView.java
|
63ea9a6015136dfd3b909cc052f979d032a3acc8
|
[
"Apache-2.0"
] |
permissive
|
daixu/QuReader
|
e6ce1821e183c07e80ef74fb69820101113296ef
|
bcd65dc03bbaa8e4932026dc4969f43c26caf93d
|
refs/heads/master
| 2021-01-03T04:38:25.508410
| 2020-02-16T13:53:22
| 2020-02-16T13:53:22
| 239,925,589
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,000
|
java
|
package com.shangame.fiction.book.cover;
import android.animation.Animator;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.app.Activity;
import android.content.Context;
import android.graphics.Color;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.ImageView;
import com.fiction.bar.R;
/**
* 图书封面
* Create by Speedy on 2018/7/24
*/
public class BookCoverView extends FrameLayout {
private ImageView ivCover;
private ImageView ivLogo;
private BookCoverValue startValue;
private BookCoverValue endValue;
private BookStateLinstener bookStateLinstener;
private Activity mActivity;
private boolean isOpen;
public BookCoverView(@NonNull Context context) {
super(context);
initView(context);
}
public BookCoverView(@NonNull Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
initView(context);
}
public BookCoverView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
initView(context);
}
private void initView(Context context) {
View contentView = LayoutInflater.from(context).inflate(R.layout.book_cover_layout, null);
setBackgroundColor(Color.TRANSPARENT);
ivCover = contentView.findViewById(R.id.ivCover);
ivLogo = contentView.findViewById(R.id.ivLogo);
addView(contentView);
}
/**
* 绑定封面图片
* @param activity
* @param coverImageView
*/
public void bindCoverImageView(Activity activity,ImageView coverImageView){
this.mActivity = activity;
ivCover.setImageDrawable(coverImageView.getDrawable());
final ViewGroup window = (ViewGroup) activity.getWindow().getDecorView();
int[] location = new int[2] ;
coverImageView.getLocationOnScreen(location);//获取在整个屏幕内的绝对坐标(包括了通知栏的高度)
startValue = new BookCoverValue(location[0], location[1], coverImageView.getWidth()+location[0], location[1]+coverImageView.getHeight());
endValue = new BookCoverValue(window.getLeft(), window.getTop(), window.getRight(), window.getBottom());
window.addView(this);
}
public void unBindTargetView(){
if(mActivity != null){
final ViewGroup window = (ViewGroup) mActivity.getWindow().getDecorView();
window.removeView(this);
}
}
/**
* 开启动画
*/
public void openBook() {
if(mActivity == null){
return;
}
ValueAnimator valueAnimator = ValueAnimator.ofObject(new BookCoverEvaluator(), startValue, endValue);
valueAnimator.setDuration(1000);
valueAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener(){
@Override
public void onAnimationUpdate(ValueAnimator animation) {
BookCoverValue midBookCoverValue = (BookCoverValue) animation.getAnimatedValue();
ivCover.setX(midBookCoverValue.getLeft());
ivCover.setY(midBookCoverValue.getTop());
ViewGroup.LayoutParams layoutParams = ivCover.getLayoutParams();
layoutParams.width = midBookCoverValue.getRight() - midBookCoverValue.getLeft();
layoutParams.height = midBookCoverValue.getBottom() - midBookCoverValue.getTop();
ivCover.setLayoutParams(layoutParams);
ivLogo.setX(midBookCoverValue.getLeft());
ivLogo.setY(midBookCoverValue.getTop());
ViewGroup.LayoutParams layoutParams1 = ivLogo.getLayoutParams();
layoutParams1.width = midBookCoverValue.getRight() - midBookCoverValue.getLeft();
layoutParams1.height = midBookCoverValue.getBottom() - midBookCoverValue.getTop();
ivLogo.setLayoutParams(layoutParams1);
}
});
valueAnimator.addListener(new Animator.AnimatorListener(){
@Override
public void onAnimationStart(Animator animator) {
}
@Override
public void onAnimationEnd(Animator animator) {
if(bookStateLinstener != null){
bookStateLinstener.onBookOpened();
}
isOpen = true;
}
@Override
public void onAnimationCancel(Animator animator) {
}
@Override
public void onAnimationRepeat(Animator animator) {
}
});
ivCover.setPivotX(0);
ivCover.setPivotY(ivCover.getY()/2);
ObjectAnimator objectAnimator = ObjectAnimator.ofFloat(ivCover, "rotationY", 0, -180);
objectAnimator.setDuration(1000);
AnimatorSet animatorSet = new AnimatorSet();
animatorSet.playTogether(valueAnimator, objectAnimator);
animatorSet.start();
}
public void closeBook(){
if(!isOpen){
return;
}
ValueAnimator valueAnimator = ValueAnimator.ofObject(new BookCoverEvaluator(),endValue,startValue);
valueAnimator.setDuration(1000);
valueAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener(){
@Override
public void onAnimationUpdate(ValueAnimator animation) {
BookCoverValue midBookCoverValue = (BookCoverValue) animation.getAnimatedValue();
ivCover.setX(midBookCoverValue.getLeft());
ivCover.setY(midBookCoverValue.getTop());
ViewGroup.LayoutParams layoutParams = ivCover.getLayoutParams();
layoutParams.width = midBookCoverValue.getRight() - midBookCoverValue.getLeft();
layoutParams.height = midBookCoverValue.getBottom() - midBookCoverValue.getTop();
ivCover.setLayoutParams(layoutParams);
ivLogo.setX(midBookCoverValue.getLeft());
ivLogo.setY(midBookCoverValue.getTop());
ViewGroup.LayoutParams layoutParams1 = ivLogo.getLayoutParams();
layoutParams1.width = midBookCoverValue.getRight() - midBookCoverValue.getLeft();
layoutParams1.height = midBookCoverValue.getBottom() - midBookCoverValue.getTop();
ivLogo.setLayoutParams(layoutParams1);
}
});
valueAnimator.addListener(new Animator.AnimatorListener(){
@Override
public void onAnimationStart(Animator animator) {
}
@Override
public void onAnimationEnd(Animator animator) {
isOpen = false;
unBindTargetView();
if(bookStateLinstener != null){
bookStateLinstener.onBookClosed();
}
}
@Override
public void onAnimationCancel(Animator animator) {
}
@Override
public void onAnimationRepeat(Animator animator) {
}
});
ivCover.setPivotX(0);
ivCover.setPivotY(ivCover.getY()/2);
ObjectAnimator objectAnimator = ObjectAnimator.ofFloat(ivCover, "rotationY", -180, 0);
objectAnimator.setDuration(1000);
AnimatorSet animatorSet = new AnimatorSet();
animatorSet.playTogether(valueAnimator, objectAnimator);
animatorSet.start();
}
public void setBookStateLinstener(BookStateLinstener bookStateLinstener) {
this.bookStateLinstener = bookStateLinstener;
}
/**
* 书状态监听器
*/
public interface BookStateLinstener {
void onBookOpened();
void onBookClosed();
}
}
|
[
"daixu.y@gmail.com"
] |
daixu.y@gmail.com
|
4d3d595ffa9cc3e9b4a4ba806fac63f9ec0ce656
|
323ee90f708f1affa07fe52af82e075a1d38204e
|
/src/main/java/org/jukbar/dao/CountryDao.java
|
1416519f0b957bf2de3d66664f8549ef651dcf9f
|
[] |
no_license
|
beksay/jukbar
|
c2bd08ae3bdad87178143c9afd4c47902e0eddc0
|
6d1cb6547f6697bba4543404fb6372ef16e98af5
|
refs/heads/master
| 2023-04-08T11:51:23.903555
| 2021-04-24T12:28:31
| 2021-04-24T12:28:31
| 296,508,604
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 177
|
java
|
package org.jukbar.dao;
import org.jukbar.domain.Country;
/**
*
* @author Kuttubek Aidaraliev
*
*/
public interface CountryDao extends GenericDao<Country, Integer> {
}
|
[
"bektur@bektur-A320M-H"
] |
bektur@bektur-A320M-H
|
29c192ea2d377b9b6161b58011c5f5727e8e7500
|
05965fc81f35de533671a1f03e1e86b7e2b8898d
|
/app/src/main/java/com/moor/im/options/group/adapter/GroupAdminAndMemberAdapter.java
|
078f052f3a7565f47a1939281f4c3396d2010a37
|
[] |
no_license
|
longwei243/im2.0
|
f056ec82df399e64ae27fb212bce57e468f88cd7
|
fb77a3004a38fbb99ab875153f3c4102965d9971
|
refs/heads/master
| 2020-04-15T13:38:28.346810
| 2016-10-08T09:05:07
| 2016-10-08T09:05:07
| 57,932,834
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,059
|
java
|
package com.moor.im.options.group.adapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.moor.im.R;
import com.moor.im.common.constant.M7Constant;
import com.moor.im.common.model.GroupAdminAndMembers;
import com.moor.im.common.utils.GlideUtils;
import java.util.List;
/**
* Created by long on 2015/7/21.
*/
public class GroupAdminAndMemberAdapter extends BaseAdapter{
private Context context;
private List<GroupAdminAndMembers> groupAdminAndMembersList;
public GroupAdminAndMemberAdapter(Context context, List<GroupAdminAndMembers> groupAdminAndMembersList) {
this.context = context;
this.groupAdminAndMembersList = groupAdminAndMembersList;
}
@Override
public int getCount() {
return groupAdminAndMembersList.size();
}
@Override
public Object getItem(int position) {
return groupAdminAndMembersList.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder holder = null;
if(convertView == null) {
convertView = LayoutInflater.from(context).inflate(R.layout.group_setting_list_item, null);
holder = new ViewHolder();
holder.tv_name = (TextView) convertView.findViewById(R.id.group_setting_list_item_item_tv_name);
holder.group_setting_list_item_tv_catalog = (TextView) convertView.findViewById(R.id.group_setting_list_item_tv_catalog);
holder.group_setting_list_item_iv_icon_group = (ImageView) convertView.findViewById(R.id.group_setting_list_item_iv_icon_group);
convertView.setTag(holder);
}else {
holder = (ViewHolder) convertView.getTag();
}
String imicon = groupAdminAndMembersList.get(position).getImicon();
if(!"".equals(imicon)) {
GlideUtils.displayNet(holder.group_setting_list_item_iv_icon_group, imicon+ M7Constant.QINIU_IMG_ICON);
// Glide.with(context).load(imicon + "?imageView2/0/w/100/h/100").asBitmap().placeholder(R.drawable.head_default_local).into(holder.group_setting_list_item_iv_icon_group);
}else {
GlideUtils.displayNative(holder.group_setting_list_item_iv_icon_group, R.drawable.img_default_head);
// Glide.with(context).load(R.drawable.head_default_local).asBitmap().into(holder.group_setting_list_item_iv_icon_group);
}
holder.tv_name.setText(groupAdminAndMembersList.get(position).getName());
if(position == getDepartmentFirstPosition()) {
holder.group_setting_list_item_tv_catalog.setVisibility(View.VISIBLE);
holder.group_setting_list_item_tv_catalog.setText("管理员");
}else {
holder.group_setting_list_item_tv_catalog.setVisibility(View.GONE);
}
if(position == getMemberFirstPosition()) {
holder.group_setting_list_item_tv_catalog.setVisibility(View.VISIBLE);
holder.group_setting_list_item_tv_catalog.setText("成员");
}
return convertView;
}
private int getDepartmentFirstPosition() {
for (int i = 0; i < groupAdminAndMembersList.size(); i++) {
if(groupAdminAndMembersList.get(i).getType().equals("Admin")) {
return i;
}
}
return -1;
}
private int getMemberFirstPosition() {
for (int i = 0; i < groupAdminAndMembersList.size(); i++) {
if(groupAdminAndMembersList.get(i).getType().equals("Member")) {
return i;
}
}
return -1;
}
static class ViewHolder{
TextView tv_name;
TextView group_setting_list_item_tv_catalog;
ImageView group_setting_list_item_iv_icon_group;
}
}
|
[
"liulongwei243@yeah.net"
] |
liulongwei243@yeah.net
|
4735402ff553c50d4c71ed3fd9d9c35af32118a6
|
62faa058c143b305d9eaffbec8d4da7b38e095c0
|
/src/java/fr/paris/lutece/portal/business/globalmanagement/IRichTextEditorDAO.java
|
9181c597fcab4e53dfd825a23ad90b7fbd3eabf9
|
[] |
permissive
|
dominiquesalasvega/lutece-core
|
c3d4c37d3513e6773c2e248288b576577e01aa60
|
ca28d51f03a2ca65508e4d8411b6da655e31b643
|
refs/heads/master
| 2020-06-17T16:17:49.268072
| 2020-05-15T00:09:32
| 2020-05-15T00:09:32
| 195,974,016
| 1
| 0
|
BSD-3-Clause
| 2019-07-09T09:11:32
| 2019-07-09T09:11:32
| null |
UTF-8
|
Java
| false
| false
| 2,230
|
java
|
/*
* Copyright (c) 2002-2017, Mairie de Paris
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright notice
* and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice
* and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* 3. Neither the name of 'Mairie de Paris' nor 'Lutece' nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* License 1.0
*/
package fr.paris.lutece.portal.business.globalmanagement;
import java.util.Collection;
/**
* Interface of RichTextEditorDAO
*/
public interface IRichTextEditorDAO
{
String BEAN_NAME = "richTextEditorDAO";
/**
* Get the collection of RichTextEditor for back or front office
*
* @param bBackOffice
* True if the list should contain back office editors, false if it should contain front office editors.
* @return The collection of RichTextEditor for back or front office
*/
Collection<RichTextEditor> findEditors( Boolean bBackOffice );
}
|
[
"pierrelevy@users.noreply.github.com"
] |
pierrelevy@users.noreply.github.com
|
5c6b3df6ee7abfe8de0947e6e297a1e452f5ca76
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_068af629bad56cbb85da6ee794d4c7f8edd66b8a/TwigUserDao/2_068af629bad56cbb85da6ee794d4c7f8edd66b8a_TwigUserDao_s.java
|
c685c13d359db6a1937cec80ef80bb5aa7eb0a29
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 4,178
|
java
|
package net.sparkmuse.data.twig;
import net.sparkmuse.data.UserDao;
import net.sparkmuse.user.Votable;
import net.sparkmuse.user.Votables;
import net.sparkmuse.user.UserLogin;
import net.sparkmuse.data.entity.*;
import com.google.inject.Inject;
import static com.google.appengine.api.datastore.Query.FilterOperator.*;
import com.google.common.collect.Sets;
import com.google.common.collect.Iterables;
import com.google.common.base.Predicate;
import java.util.Set;
import java.util.Map;
import org.apache.commons.collections.CollectionUtils;
/**
* Created by IntelliJ IDEA.
*
* @author neteller
* @created: Sep 19, 2010
*/
public class TwigUserDao extends TwigDao implements UserDao {
@Inject
public TwigUserDao(DatastoreService service) {
super(service);
}
public UserVO findOrCreateUserBy(UserLogin login) {
final UserVO userVO = helper.only(datastore.find()
.type(UserVO.class)
.addFilter("authProviderUserId", EQUAL, login.getAuthProviderUserId()));
if (null == userVO) {
UserVO newUser = UserVO.newUser(login);
final UserVO storedNewUser = helper.store(newUser);
final UserProfile profile = UserProfile.newProfile(storedNewUser);
helper.store(profile);
return storedNewUser;
}
else {
userVO.updateUserDuring(login);
return helper.store(userVO);
}
}
public UserVO findUserBy(Long id) {
return helper.getUser(id);
}
public UserProfile findUserProfileBy(String userName) {
final UserVO user = helper.only(datastore.find()
.type(UserVO.class)
.addFilter("userNameLowercase", EQUAL, userName.toLowerCase()));
return helper.only(datastore.find()
.type(UserProfile.class)
.ancestor(user)
);
}
public Map<Long, UserVO> findUsersBy(Set<Long> ids) {
return helper.getUsers(ids);
}
public UserVO update(UserVO user) {
return helper.update(user);
}
public void saveApplication(String userName, String url) {
UserApplication app = new UserApplication();
app.userName = userName;
app.url = url;
datastore.store(app);
}
/**
* Stores a record of the vote for the given user, upvotes the votable, stores
* it to the datastore, and adjusts the author's reputation.
*
* @param votable
* @param voter
*/
public void vote(Votable votable, UserVO voter) {
helper.associate(voter);
final UserVote voteModel = datastore.load()
.type(UserVote.class)
.id(Votables.newKey(votable))
.parent(voter)
.now();
//check for existing vote
if (null == voteModel) {
//store vote later so we can check if user has voted on whatever
datastore.store().instance(UserVote.newUpVote(votable, voter)).parent(voter).later();
//record aggregate vote count on entity
if (votable instanceof Entity) {
votable.upVote();
helper.update((Entity) votable);
}
//adjust reputation
final UserVO author = votable.getAuthor();
author.setReputation(author.getReputation() + 1);
helper.update(author);
}
}
public <T extends Entity<T>> void vote(Class<T> entityClass, Long id, UserVO voter) {
T entity = helper.load(entityClass, id);
if (entity instanceof Votable) {
vote((Votable) entity, voter);
}
}
public Set<UserVote> findVotesFor(Set<Votable> votables, UserVO user) {
if (CollectionUtils.size(votables) == 0) return Sets.newHashSet();
Set<String> ids = Sets.newHashSet();
for (Votable votable: votables) {
ids.add(Votables.newKey(votable));
}
helper.associate(user);
final Map<String, UserVote> voteMap = datastore.load()
.type(UserVote.class)
.ids(ids)
.parent(user)
.now();
//filter out nulls
final Iterable<UserVote> votes = Iterables.filter(voteMap.values(), new Predicate<UserVote>(){
public boolean apply(UserVote voteModel) {
return null != voteModel;
}
});
return Sets.newHashSet(votes);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
1a780ec1e62e7348260f172905e51e6920b28a45
|
3144eaac0e5d800282232af00d80337c6dfb0098
|
/zebone/dip/src/main/java/com/zebone/dip/ws/resource/check/component/UserCheck.java
|
b66924ee6f02fe2b7d27f776d78cd00f1caa50a2
|
[] |
no_license
|
HeeroLL/store
|
a2bf17a9edc1594fb2d8c71bf30cc8298d322b91
|
02177879d1bad1d919cc14498122fe3f98bc3453
|
refs/heads/master
| 2022-12-11T12:23:11.029000
| 2022-12-02T09:13:59
| 2022-12-02T09:13:59
| 25,424,633
| 8
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,644
|
java
|
package com.zebone.dip.ws.resource.check.component;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.zebone.check.CheckResult;
import com.zebone.log.ErrorType;
import com.zebone.log.RangeError;
public class UserCheck {
private static final Log log = LogFactory.getLog(UserCheck.class);
private static final String message = "人员数据不存在";
public CheckResult checkUserData(Connection con,String org,String checkValue){
int resultCount = 0;
CheckResult checkResult = new CheckResult(true);
String querySql = "select count(*) as count from p_resource_user_info t " +
" where t.code='"+checkValue+"' and t.MEDICAL_ORGAN_CODE='"+org+"'";
try {
PreparedStatement ps = con.prepareStatement(querySql);
ResultSet rs = ps.executeQuery();
if(rs.next()){
resultCount = rs.getInt("count");
}
} catch (SQLException e) {
checkResult.setSuccess(false);
checkResult.setErrorCode(ErrorType.SYSTEM.getErrorCode());
checkResult.setErrorMessage(ErrorType.SYSTEM.getErrorDesc());
log.error(e.getMessage(),e);
return checkResult;
}finally{
if(resultCount == 0){
checkResult.setSuccess(false);
checkResult.setErrorCode(ErrorType.VALUE_CHECK.getErrorCode()+"-"+RangeError.VALUE_NO.getErrorCode());
checkResult.setErrorMessage(ErrorType.VALUE_CHECK.getErrorDesc()+"--"+RangeError.VALUE_NO.getErrorDesc()+"--"+message);
}
}
return checkResult;
}
}
|
[
"114046323@qq.com"
] |
114046323@qq.com
|
a6cad66fd9bb825ef9649cb85e74582f5aa3ff85
|
1f47217ad740b03b5ca7c965a01788dee3c0fbf7
|
/JLibrary06/lib/XML/JAXB/jaxb/samples/xml-channel/src/Test.java
|
3a49bee77c4b22545ce67dfe1fdd092299c77171
|
[] |
no_license
|
amitabha66/JLibrary06
|
bee7fddca01188991af968a5678fe1d89dce7ee3
|
f19056cee7a88318315f9c25f8618aface8f0683
|
refs/heads/master
| 2021-01-19T07:03:19.133486
| 2016-06-23T16:41:59
| 2016-06-23T16:41:59
| 61,802,950
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,870
|
java
|
/*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the "License"). You may not use this file except
* in compliance with the License.
*
* You can obtain a copy of the license at
* https://jwsdp.dev.java.net/CDDLv1.0.html
* See the License for the specific language governing
* permissions and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* HEADER in each file and include the License file at
* https://jwsdp.dev.java.net/CDDLv1.0.html If applicable,
* add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your
* own identifying information: Portions Copyright [yyyy]
* [name of copyright owner]
*/
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PipedInputStream;
import java.io.PipedOutputStream;
import java.io.Reader;
/**
*
*
* @author
* Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
*/
public class Test {
public static Object lock = new Object();
public static boolean ready = false;
public static void main(String[] args) throws Exception {
// launch the server
new Thread(new TestServer()).start();
// wait for the server to become ready
while( !ready ) {
synchronized( lock ) {
lock.wait(1000);
}
}
// reset the flag
ready = false;
// run the client
new TestClient().run();
// wait for the server to finish processing data
// from the client
while( !ready ) {
synchronized( lock ) {
lock.wait(1000);
}
}
System.exit(0);
}
}
|
[
"amitabha66@gmail.com"
] |
amitabha66@gmail.com
|
8b02860225dd9ff82023aa12c545c78cf36f05c0
|
699258f4346b9a4db5ef98ad3b7b5fd3621e50ee
|
/src/main/java/io/quarkus/arc/benchmarks/appbeans/AppBean156.java
|
c7bf5698ae0f5d740329f38d7cbfb4dabb995a69
|
[
"Apache-2.0"
] |
permissive
|
mkouba/arc-benchmarks
|
3828fc33a1394023136335dc9b9cededce85f5a3
|
0b3536f490217ee9621d8a082c6cfb8286e96e10
|
refs/heads/master
| 2023-02-16T20:33:51.835507
| 2023-02-02T14:17:21
| 2023-02-02T14:17:21
| 215,313,316
| 0
| 2
|
Apache-2.0
| 2021-03-25T12:40:11
| 2019-10-15T14:01:23
|
Java
|
UTF-8
|
Java
| false
| false
| 211
|
java
|
package io.quarkus.arc.benchmarks.appbeans;
import javax.enterprise.context.ApplicationScoped;
import io.quarkus.runtime.Startup;
@ApplicationScoped
@Startup
public class AppBean156 {
void ping() {
}
}
|
[
"mkouba@redhat.com"
] |
mkouba@redhat.com
|
ed7fb3003447071024eb850966a9dbdf33c089c1
|
2c65c53ef5390bd70fd2ddb9bbc2b19027f2479f
|
/kangaroo-web-admin/src/main/java/io/github/pactstart/admin/system/form/ConfigLogQueryForm.java
|
35819db5f077b04daa98c703958e8295f99dcd97
|
[] |
no_license
|
zt6220493/kangaroo
|
f37cdaa815708fb56e33d8f4ed7d83885551011a
|
16c8a9f7589ec33f01559d3308f8dd8e49493afe
|
refs/heads/master
| 2022-12-28T04:50:48.186699
| 2019-09-25T10:40:27
| 2019-09-25T10:40:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 307
|
java
|
package io.github.pactstart.admin.system.form;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
@Getter
@Setter
@ToString
public class ConfigLogQueryForm {
/**
* 命名空间
*/
private String namespace;
/**
* 配置名称
*/
private String name;
}
|
[
"1203208955@qq.com"
] |
1203208955@qq.com
|
0473a11d516662cd4ce7f1f98d8ca39b1d93ab45
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project48/src/main/java/org/gradle/test/performance48_4/Production48_348.java
|
27dd9abdb9e5c6c503c1ce51e0cb2a5f89a3f113
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 305
|
java
|
package org.gradle.test.performance48_4;
public class Production48_348 extends org.gradle.test.performance14_4.Production14_348 {
private final String property;
public Production48_348() {
this.property = "foo";
}
public String getProperty() {
return property;
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
105792ba0b5e25ff5c27b4f51a9800ffdd231c68
|
4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849
|
/aliyun-java-sdk-cr/src/main/java/com/aliyuncs/cr/model/v20160607/GetImageLayerRequest.java
|
266f6f1677a77311ed3d307ccfa9740192f4fbc9
|
[
"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
| 2,135
|
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.cr.model.v20160607;
import com.aliyuncs.RoaAcsRequest;
import com.aliyuncs.http.MethodType;
import com.aliyuncs.cr.Endpoint;
/**
* @author auto create
* @version
*/
public class GetImageLayerRequest extends RoaAcsRequest<GetImageLayerResponse> {
private String repoNamespace;
private String repoName;
private String tag;
public GetImageLayerRequest() {
super("cr", "2016-06-07", "GetImageLayer", "acr");
setUriPattern("/repos/[RepoNamespace]/[RepoName]/tags/[Tag]/layers");
setMethod(MethodType.GET);
try {
com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap);
com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType);
} catch (Exception e) {}
}
public String getRepoNamespace() {
return this.repoNamespace;
}
public void setRepoNamespace(String repoNamespace) {
this.repoNamespace = repoNamespace;
if(repoNamespace != null){
putPathParameter("RepoNamespace", repoNamespace);
}
}
public String getRepoName() {
return this.repoName;
}
public void setRepoName(String repoName) {
this.repoName = repoName;
if(repoName != null){
putPathParameter("RepoName", repoName);
}
}
public String getTag() {
return this.tag;
}
public void setTag(String tag) {
this.tag = tag;
if(tag != null){
putPathParameter("Tag", tag);
}
}
@Override
public Class<GetImageLayerResponse> getResponseClass() {
return GetImageLayerResponse.class;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
51639686171e849327637c6b2d628bdddfc8f38d
|
54bdf9200e3e2a4ab8a2e6fbe9b4ed791d47e612
|
/src/main/java/cn/ux/jxxt/config/WebLogAspect.java
|
3b8c13a1dd991e80e70c61877b1ab3fe86a6142a
|
[] |
no_license
|
ygg404/jxxt
|
cb00aadf99799572e633883ab1bef1139935a0e5
|
7bb1ba25899112bd1f43a8ddf47ee6da1f169b01
|
refs/heads/master
| 2022-07-21T05:28:04.162276
| 2019-10-28T09:41:05
| 2019-10-28T09:41:05
| 208,528,886
| 0
| 0
| null | 2022-06-29T17:38:45
| 2019-09-15T02:02:25
|
Java
|
UTF-8
|
Java
| false
| false
| 2,149
|
java
|
package cn.ux.jxxt.config;
import cn.ux.jxxt.util.IPUtils;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.text.SimpleDateFormat;
import java.util.Arrays;
@Component
@Aspect
public class WebLogAspect {
private Logger looger = LoggerFactory.getLogger(this.getClass());
ThreadLocal<Long> startTime = new ThreadLocal<>();
@Pointcut("execution(public * cn.ux.jxxt.web.*.*(..))")//.*.*代表所有子目录下的所有方法,最后括号里(..)的两个..代表所有参数
public void webLog(){}
@Before("webLog()")
public void doBefore(JoinPoint joinPoint) throws Throwable{
startTime.set(System.currentTimeMillis());
//接收到请求,记录请求内容
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
HttpServletRequest request = attributes.getRequest();
//记录下请求内容
looger.info("请求地址 : " + request.getRequestURL().toString());
looger.info("HTTP_METHOD : " + request.getMethod());
looger.info("IP : " + IPUtils.getIpAddr(request));
looger.info("CLASS_METHOD" + joinPoint.getSignature().getDeclaringTypeName() + "." + joinPoint.getSignature().getName());
looger.info("参数 : " + Arrays.toString(joinPoint.getArgs()));
}
@AfterReturning(returning = "ret" ,pointcut = "webLog()")
public void doAfterReturning(Object ret) throws Throwable{
//处理完请求,返回内容
looger.info("返回值 : " + ret);
looger.info("耗时 : " + (System.currentTimeMillis() - startTime.get()));
}
}
|
[
"2279834998@qq.com"
] |
2279834998@qq.com
|
b92f9a76abc24c10406b423721235243081b96c1
|
4d37505edab103fd2271623b85041033d225ebcc
|
/spring-web/src/main/java/org/springframework/web/HttpMediaTypeException.java
|
0975940c81a026cbebc74d35101b9e655605c283
|
[
"Apache-2.0"
] |
permissive
|
huifer/spring-framework-read
|
1799f1f073b65fed78f06993e58879571cc4548f
|
73528bd85adc306a620eedd82c218094daebe0ee
|
refs/heads/master
| 2020-12-08T08:03:17.458500
| 2020-03-02T05:51:55
| 2020-03-02T05:51:55
| 232,931,630
| 6
| 2
|
Apache-2.0
| 2020-03-02T05:51:57
| 2020-01-10T00:18:15
|
Java
|
UTF-8
|
Java
| false
| false
| 1,921
|
java
|
/*
* Copyright 2002-2013 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.web;
import org.springframework.http.MediaType;
import javax.servlet.ServletException;
import java.util.Collections;
import java.util.List;
/**
* Abstract base for exceptions related to media types. Adds a list of supported {@link MediaType MediaTypes}.
*
* @author Arjen Poutsma
* @since 3.0
*/
@SuppressWarnings("serial")
public abstract class HttpMediaTypeException extends ServletException {
private final List<MediaType> supportedMediaTypes;
/**
* Create a new HttpMediaTypeException.
*
* @param message the exception message
*/
protected HttpMediaTypeException(String message) {
super(message);
this.supportedMediaTypes = Collections.emptyList();
}
/**
* Create a new HttpMediaTypeException with a list of supported media types.
*
* @param supportedMediaTypes the list of supported media types
*/
protected HttpMediaTypeException(String message, List<MediaType> supportedMediaTypes) {
super(message);
this.supportedMediaTypes = Collections.unmodifiableList(supportedMediaTypes);
}
/**
* Return the list of supported media types.
*/
public List<MediaType> getSupportedMediaTypes() {
return this.supportedMediaTypes;
}
}
|
[
"huifer97@163.com"
] |
huifer97@163.com
|
cec2e04b8b16e351727aa7eb322c7e38fc46a525
|
dad78fa3f55eac67cffd004e7613e64a579be41d
|
/src/com/bvan/oop/hw/lesson5/airlineticket/Meal.java
|
7983f7e90639bd687fbd6a52533d72a36328fa3e
|
[] |
no_license
|
bohdanvan/javaoop-homework
|
414afa5812fd236c2c4338766ae68cab1a335e7b
|
1fd858cc56defc896d52bfca2a2abf54d3f4828b
|
refs/heads/master
| 2020-03-12T01:15:52.805041
| 2018-10-30T17:14:47
| 2018-10-30T17:14:47
| 130,371,628
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 763
|
java
|
package com.bvan.oop.hw.lesson5.airlineticket;
/**
* @author bvanchuhov
*/
public class Meal {
private final String type;
private final boolean withDrink;
private final long price;
public Meal(String type, boolean withDrink, long price) {
this.type = type;
this.withDrink = withDrink;
this.price = price;
}
public String getType() {
return type;
}
public boolean isWithDrink() {
return withDrink;
}
public long getPrice() {
return price;
}
@Override
public String toString() {
return "Meal{" +
"type='" + type + '\'' +
", withDrink=" + withDrink +
", price=" + price +
'}';
}
}
|
[
"bodya.van@gmail.com"
] |
bodya.van@gmail.com
|
708f7afdb3a4ca57004cdbfbaa059e5328cd95b9
|
fb110fead2ecfffb4b78d3920da1a3d162bd1932
|
/de.gematik.ti.cardreader.provider.api/src/main/java/de/gematik/ti/cardreader/provider/spi/ICardReaderControllerProvider.java
|
caea54a738158fecf711654c2dbb76bade555c4f
|
[
"Apache-2.0"
] |
permissive
|
gematik/ref-CardReaderProvider-Api
|
ca8495bbb81b6f018f09c7f9856db5b56f827b4e
|
80d863c5b03a776534d7fa8a26916273dc7e39b9
|
refs/heads/master
| 2022-02-10T18:06:21.446280
| 2022-01-07T07:36:00
| 2022-01-07T07:36:00
| 227,793,349
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 827
|
java
|
/*
* ${GEMATIK_LICENSE}
*/
package de.gematik.ti.cardreader.provider.spi;
import de.gematik.ti.cardreader.provider.api.ICardReaderController;
import de.gematik.ti.cardreader.provider.api.entities.IProviderDescriptor;
/**
* include::{userguide}/CRPAPI_Overview.adoc[tag=ServiceProvider]
*
*/
public interface ICardReaderControllerProvider {
/**
* Return the Controller for specific ICardReaderController implementation
*
* @return - return CardReaderController for a specific card reader interface
*/
ICardReaderController getCardReaderController();
/**
* Descriptor class for information about the card reader provider and functionality
* @return - Descriptor object for this card reader provider
*/
IProviderDescriptor getDescriptor();
}
|
[
"referenzimplementierung@gematik.de"
] |
referenzimplementierung@gematik.de
|
4b1ecaf105dcfe5772b3d187277226db799d20fe
|
478106dd8b16402cc17cc39b8d65f6cd4e445042
|
/l2junity-gameserver/src/main/java/org/l2junity/gameserver/network/client/send/ExPutIntensiveResultForVariationMake.java
|
5b58b7e54371e2502d3f207292b556143c41b503
|
[] |
no_license
|
czekay22/L2JUnderGround
|
9f014cf87ddc10d7db97a2810cc5e49d74e26cdf
|
1597b28eab6ec4babbf333c11f6abbc1518b6393
|
refs/heads/master
| 2020-12-30T16:58:50.979574
| 2018-09-28T13:38:02
| 2018-09-28T13:38:02
| 91,043,466
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,754
|
java
|
/*
* Copyright (C) 2004-2015 L2J Unity
*
* This file is part of L2J Unity.
*
* L2J Unity 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.
*
* L2J Unity 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.l2junity.gameserver.network.client.send;
import org.l2junity.gameserver.network.client.OutgoingPackets;
import org.l2junity.network.PacketWriter;
public class ExPutIntensiveResultForVariationMake implements IClientOutgoingPacket
{
private final int _refinerItemObjId;
private final int _lifestoneItemId;
private final int _gemstoneItemId;
private final int _gemstoneCount;
private final int _unk2;
public ExPutIntensiveResultForVariationMake(int refinerItemObjId, int lifeStoneId, int gemstoneItemId, int gemstoneCount)
{
_refinerItemObjId = refinerItemObjId;
_lifestoneItemId = lifeStoneId;
_gemstoneItemId = gemstoneItemId;
_gemstoneCount = gemstoneCount;
_unk2 = 1;
}
@Override
public boolean write(PacketWriter packet)
{
OutgoingPackets.EX_PUT_INTENSIVE_RESULT_FOR_VARIATION_MAKE.writeId(packet);
packet.writeD(_refinerItemObjId);
packet.writeD(_lifestoneItemId);
packet.writeD(_gemstoneItemId);
packet.writeQ(_gemstoneCount);
packet.writeD(_unk2);
return true;
}
}
|
[
"unafraid89@gmail.com"
] |
unafraid89@gmail.com
|
c320e73ea02994d8e2b4786a4e89754071b51ed2
|
bc23ce3b40a99c6281b8970d978d7c6b9a1489e2
|
/eco/src/main/java/im/grusis/mkb/eco/model/ProductionCriteria.java
|
46defa347949e55f544daa350a32f2961c1364c7
|
[] |
no_license
|
freelunchcap/mkb
|
ec6ee80a5c431242c74d4e246d5be20cd743c2b3
|
20d5fdc63603f7e84d1ad6ae26c7dbff735e23ce
|
refs/heads/master
| 2023-01-07T14:36:15.087898
| 2022-12-26T02:39:11
| 2022-12-26T02:39:11
| 14,970,700
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 848
|
java
|
package im.grusis.mkb.eco.model;
import java.util.Map;
/**
* User: Mothership
* Date: 13-6-27
* Time: 上午12:32
*/
public class ProductionCriteria extends Criteria {
private Map<Integer, Integer> cardCount;
public ProductionCriteria() {
}
public ProductionCriteria(Map<Integer, Integer> cardCount) {
this.cardCount = cardCount;
}
public Map<Integer, Integer> getCardCount() {
return cardCount;
}
public void setCardCount(Map<Integer, Integer> cardCount) {
this.cardCount = cardCount;
}
@Override
public boolean equals(Object o) {
if(this == o) return true;
if(!(o instanceof ProductionCriteria)) return false;
ProductionCriteria that = (ProductionCriteria)o;
return cardCount.equals(that.cardCount);
}
@Override
public int hashCode() {
return cardCount.hashCode();
}
}
|
[
"beijunyi@gmail.com"
] |
beijunyi@gmail.com
|
fb38fecb483cb762622e936416296a1c99660153
|
cbb75ebbee3fb80a5e5ad842b7a4bb4a5a1ec5f5
|
/com/jd/fridge/bean/requestBody/GetMessages.java
|
d0fb0c0c78f73106cd2ac15b0337a3b13b1ef795
|
[] |
no_license
|
killbus/jd_decompile
|
9cc676b4be9c0415b895e4c0cf1823e0a119dcef
|
50c521ce6a2c71c37696e5c131ec2e03661417cc
|
refs/heads/master
| 2022-01-13T03:27:02.492579
| 2018-05-14T11:21:30
| 2018-05-14T11:21:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 376
|
java
|
package com.jd.fridge.bean.requestBody;
/* compiled from: TbsSdkJava */
public class GetMessages {
private int count;
private long feed_id;
private String pin;
private int start_index;
public GetMessages(String str, long j, int i, int i2) {
this.pin = str;
this.feed_id = j;
this.start_index = i;
this.count = i2;
}
}
|
[
"13511577582@163.com"
] |
13511577582@163.com
|
96a6ab0fc4c7627b11994e01dfbdaa7220935777
|
d4f2f31ca4c143200d1f5c81c6fb6e3583f477a2
|
/ca-gateway/scep-client/src/test/java/org/xipki/scep/serveremulator/RaEmulator.java
|
c709f6cda40f47e4c308bd43c954432758e2eb56
|
[
"Apache-2.0"
] |
permissive
|
xipki/xipki
|
63b2f5074a3afc14ca24c33a716101743822558c
|
322c27ff87c31f8f717b274d961e429d485525b3
|
refs/heads/master
| 2023-09-03T09:39:08.247923
| 2023-08-31T20:45:22
| 2023-08-31T20:45:22
| 18,249,859
| 481
| 142
|
Apache-2.0
| 2023-09-08T21:22:41
| 2014-03-29T20:16:04
|
Java
|
UTF-8
|
Java
| false
| false
| 652
|
java
|
// Copyright (c) 2013-2023 xipki. All rights reserved.
// License Apache License 2.0
package org.xipki.scep.serveremulator;
import org.xipki.security.X509Cert;
import org.xipki.util.Args;
import java.security.PrivateKey;
/**
* RA emulator.
*
* @author Lijun Liao (xipki)
*/
public class RaEmulator {
private final PrivateKey raKey;
private final X509Cert raCert;
public RaEmulator(PrivateKey raKey, X509Cert raCert) {
this.raKey = Args.notNull(raKey, "raKey");
this.raCert = Args.notNull(raCert, "raCert");
}
public PrivateKey getRaKey() {
return raKey;
}
public X509Cert getRaCert() {
return raCert;
}
}
|
[
"lijun.liao@gmail.com"
] |
lijun.liao@gmail.com
|
e1f4a599f6df62a1b65696334be6f0591079b487
|
eabebb52b03b6d2397154d13db2f3ce484dad27f
|
/balance/src/main/java/com/jdc/balance/utils/StringUtils.java
|
d0de33b357a596dac47c2f19727c77f041e965d5
|
[
"MIT"
] |
permissive
|
minlwin/java-web
|
94574458e4af987a98aadda653a14477c216bed4
|
543def887ff051ca69a62da1b9bf20229d208cff
|
refs/heads/main
| 2022-02-17T20:37:44.108354
| 2022-01-24T15:29:06
| 2022-01-24T15:29:06
| 28,694,888
| 8
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 350
|
java
|
package com.jdc.balance.utils;
import java.text.DecimalFormat;
public class StringUtils {
private static final DecimalFormat INT_FMT = new DecimalFormat("#,##0");
public static boolean isEmpty(String string) {
return null == string || string.isEmpty();
}
public static String formatNumber(int data) {
return INT_FMT.format(data);
}
}
|
[
"lwin.zawmin@gmail.com"
] |
lwin.zawmin@gmail.com
|
03353ee80a7a531b3576384a4b2e6a98f24545ce
|
5fb8bc38bca5d6d7d3301f337f32da2a90c3fa13
|
/src/test/java/unitTesting/UnitTestParametrized.java
|
ce1f445d9b20eed59544d5e319f6131b11647a86
|
[] |
no_license
|
baur100/a10
|
c0bf42b9db9457aed6cb2180edefeb1f75b83c0f
|
c646b6e09199ba144fced29aa6b374709111e63e
|
refs/heads/main
| 2023-04-06T07:59:41.118813
| 2021-04-14T02:28:14
| 2021-04-14T02:28:14
| 335,495,750
| 0
| 0
| null | 2021-03-20T20:23:39
| 2021-02-03T03:26:29
|
Java
|
UTF-8
|
Java
| false
| false
| 729
|
java
|
package unitTesting;
import org.testng.Assert;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import tickets.CalculateTicketPrice;
public class UnitTestParametrized {
@DataProvider (name = "testData")
public Object[][] getTestData(){
return new Object[][]{
{1,1000,0.0},
{5,1000,500.0},
{29,1000,1000.0},
{75,1000,800.0}
};
}
@Test(dataProvider = "testData")
public void calculateTicketPrice(int age, int fare, double price){
CalculateTicketPrice person = new CalculateTicketPrice(fare,age);
double result = person.getPrice();
Assert.assertEquals(price,result);
}
}
|
[
"baurzhan.zh@gmail.com"
] |
baurzhan.zh@gmail.com
|
bbac88c1e83c4f81a303c5b89f3a377a96b8f4cf
|
7585bbcfad09b1236d00f0d62cd0109b9b27e706
|
/lishiMobile/src/main/java/com/lis99/mobile/club/model/ClubMainListModel.java
|
a47e3367385d93d3474bc2637b9e11937a366816
|
[] |
no_license
|
xiaxiao1/Lis99Test
|
d7c943e25456bf341b43cd9da1a67bfe29fc55b2
|
43c3b2bb0b53dcee80d990a7ef8b5de44b5e9144
|
refs/heads/master
| 2020-06-30T23:44:50.990863
| 2016-11-21T09:41:37
| 2016-11-21T09:41:37
| 74,347,642
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 359
|
java
|
package com.lis99.mobile.club.model;
/**
* Created by yy on 15/8/4.
*/
public class ClubMainListModel extends BaseModel {
//状态标识
public int type;
public int id;
public String image;
public String title;
public String topic_title;
public int topic_id;
/**是否同城:0否,1是*/
public int is_samecity;
}
|
[
"yangyang@lis99.com"
] |
yangyang@lis99.com
|
4df560bbc0e428a09ba0b7b80a249090b2571942
|
c2820ab14e71fb8ceed367e136833ba05a00fc8e
|
/src/org/xmpp/android/contact/roster/Group.java
|
d6f608986d88fdf3dda0d4b602cb9d3a98e19a6c
|
[] |
no_license
|
emdete/XmppAndroidService
|
814b950f09c2b427e4aa8e7793f594a3ec7605e6
|
b18f835194fed6d47e263b53e7f36e6e6e30d42c
|
refs/heads/master
| 2021-01-23T00:34:07.834243
| 2014-02-21T17:11:44
| 2014-02-21T17:11:44
| 17,064,563
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 659
|
java
|
package org.xmpp.android.contact.roster;
import org.xmpp.android.shared.stanzas.BaseStanza;
import org.xmpp.android.shared.stanzas.XmppStanza;
public class Group extends BaseStanza {
public static final StanzaType TYPE = new StanzaType("group", "jabber:iq:roster");
public Group(XmppStanza stanza) {
super(stanza);
assert TYPE.equals(stanza.getStanzaType());
}
public static void register() {
XmppStanza.register(TYPE, Group.class);
}
public String getName() {
return stanza.getSubText();
}
@Override
public String toString() {
return "Group { "+getName()+" }";
}
@Override
public StanzaType getStanzaType() {
return TYPE;
}
}
|
[
"github@rvin.mooo.com"
] |
github@rvin.mooo.com
|
62739018205bf5bfb60037a967439d34abc1ca19
|
92defe9a6cfb711df61df190bf8804ef82993742
|
/engine/src/main/java/com/agiletec/aps/system/common/entity/loader/ExtraAttributeRolesWrapper.java
|
aafded2c8007295e0fed306973b1dc7c7ec949d3
|
[] |
no_license
|
DevBrandon/entando-core
|
e6ffeddd0d76ff5f3694e96834a313764c20a739
|
4d1f88b372d4b0ef604fdde2aa929eef3de0e6b2
|
refs/heads/master
| 2020-12-26T01:13:58.694861
| 2014-12-01T17:18:43
| 2014-12-01T17:18:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,452
|
java
|
/*
*
* Copyright 2013 Entando S.r.l. (http://www.entando.com) All rights reserved.
*
* This file is part of Entando software.
* Entando is a free software;
* You can redistribute it and/or modify it
* under the terms of the GNU General Public License (GPL) as published by the Free Software Foundation; version 2.
*
* See the file License for the specific language governing permissions
* and limitations under the License
*
*
*
* Copyright 2013 Entando S.r.l. (http://www.entando.com) All rights reserved.
*
*/
package com.agiletec.aps.system.common.entity.loader;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.agiletec.aps.system.common.IManager;
import com.agiletec.aps.system.common.entity.IEntityManager;
import com.agiletec.aps.system.common.entity.model.attribute.AttributeRole;
import com.agiletec.aps.system.common.entity.parse.AttributeRoleDOM;
import com.agiletec.aps.system.exception.ApsSystemException;
/**
* The Wrapper Class of the extra attribute roles.
* @author E.Santoboni
*/
public class ExtraAttributeRolesWrapper extends AbstractExtraAttributeSupportObject {
private static final Logger _logger = LoggerFactory.getLogger(ExtraAttributeRolesWrapper.class);
public void executeLoading(Map<String, AttributeRole> collectionToFill, IEntityManager entityManager) throws ApsSystemException {
String managerName = ((IManager) entityManager).getName();
if (!managerName.equals(super.getEntityManagerNameDest())) {
return;
}
AttributeRoleDOM dom = new AttributeRoleDOM();
try {
String xml = super.extractXml();
Map<String, AttributeRole> attributeRoles = dom.extractRoles(xml, this.getDefsFilePath());
List<AttributeRole> roles = new ArrayList<AttributeRole>(attributeRoles.values());
for (int i = 0; i < roles.size(); i++) {
AttributeRole role = roles.get(i);
if (collectionToFill.containsKey(role.getName())) {
_logger.warn("You can't override existing attribute role : {} - {}", role.getName(), role.getDescription());
} else {
collectionToFill.put(role.getName(), role);
_logger.info("Added new attribute role : {} - {}",role.getName(), role.getDescription());
}
}
} catch (Throwable t) {
//ApsSystemUtils.logThrowable(t, this, "executeLoading", "Error loading extra attribute Roles");
_logger.error("Error loading extra attribute Roles", t);
}
}
}
|
[
"eugenio.santoboni@gmail.com"
] |
eugenio.santoboni@gmail.com
|
a3d59a28d8d63df57fd1158fdbe99aab8fe3e722
|
5456502f97627278cbd6e16d002d50f1de3da7bb
|
/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientVisitedHistoryTest.java
|
94e341efa3e91be3ea843f7c16dc563fa63e8e28
|
[
"BSD-3-Clause"
] |
permissive
|
TrellixVulnTeam/Chromium_7C66
|
72d108a413909eb3bd36c73a6c2f98de1573b6e5
|
c8649ab2a0f5a747369ed50351209a42f59672ee
|
refs/heads/master
| 2023-03-16T12:51:40.231959
| 2017-12-20T10:38:26
| 2017-12-20T10:38:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,310
|
java
|
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.android_webview.test;
import android.test.suitebuilder.annotation.SmallTest;
import android.webkit.ValueCallback;
import org.chromium.android_webview.AwContents;
import org.chromium.android_webview.test.TestAwContentsClient.DoUpdateVisitedHistoryHelper;
import org.chromium.base.test.util.CallbackHelper;
import org.chromium.base.test.util.Feature;
import org.chromium.net.test.util.TestWebServer;
/**
* Tests for AwContentsClient.getVisitedHistory and AwContents.doUpdateVisitedHistory callbacks.
*/
public class AwContentsClientVisitedHistoryTest extends AwTestBase {
private static class GetVisitedHistoryHelper extends CallbackHelper {
private ValueCallback<String[]> mCallback;
private boolean mSaveCallback = false;
public ValueCallback<String[]> getCallback() {
assert getCallCount() > 0;
return mCallback;
}
public void setSaveCallback(boolean value) {
mSaveCallback = value;
}
public void notifyCalled(ValueCallback<String[]> callback) {
if (mSaveCallback) {
mCallback = callback;
}
notifyCalled();
}
}
private static class VisitedHistoryTestAwContentsClient extends TestAwContentsClient {
private GetVisitedHistoryHelper mGetVisitedHistoryHelper;
public VisitedHistoryTestAwContentsClient() {
mGetVisitedHistoryHelper = new GetVisitedHistoryHelper();
}
public GetVisitedHistoryHelper getGetVisitedHistoryHelper() {
return mGetVisitedHistoryHelper;
}
@Override
public void getVisitedHistory(ValueCallback<String[]> callback) {
getGetVisitedHistoryHelper().notifyCalled(callback);
}
}
private VisitedHistoryTestAwContentsClient mContentsClient =
new VisitedHistoryTestAwContentsClient();
@Feature({"AndroidWebView"})
@SmallTest
public void testUpdateVisitedHistoryCallback() throws Throwable {
AwTestContainerView testView = createAwTestContainerViewOnMainSync(mContentsClient);
AwContents awContents = testView.getAwContents();
final String path = "/testUpdateVisitedHistoryCallback.html";
final String html = "testUpdateVisitedHistoryCallback";
TestWebServer webServer = TestWebServer.start();
try {
final String pageUrl = webServer.setResponse(path, html, null);
final DoUpdateVisitedHistoryHelper doUpdateVisitedHistoryHelper =
mContentsClient.getDoUpdateVisitedHistoryHelper();
int callCount = doUpdateVisitedHistoryHelper.getCallCount();
loadUrlAsync(awContents, pageUrl);
doUpdateVisitedHistoryHelper.waitForCallback(callCount);
assertEquals(pageUrl, doUpdateVisitedHistoryHelper.getUrl());
assertEquals(false, doUpdateVisitedHistoryHelper.getIsReload());
// Reload
callCount = doUpdateVisitedHistoryHelper.getCallCount();
loadUrlAsync(awContents, pageUrl);
doUpdateVisitedHistoryHelper.waitForCallback(callCount);
assertEquals(pageUrl, doUpdateVisitedHistoryHelper.getUrl());
assertEquals(true, doUpdateVisitedHistoryHelper.getIsReload());
} finally {
webServer.shutdown();
}
}
@Feature({"AndroidWebView"})
@SmallTest
public void testGetVisitedHistoryExerciseCodePath() throws Throwable {
// Due to security/privacy restrictions around the :visited css property, it is not
// possible test this end to end without using the flaky and brittle capturing picture of
// the web page. So we are doing the next best thing, exercising all the code paths.
final GetVisitedHistoryHelper visitedHistoryHelper =
mContentsClient.getGetVisitedHistoryHelper();
final int callCount = visitedHistoryHelper.getCallCount();
visitedHistoryHelper.setSaveCallback(true);
AwTestContainerView testView = createAwTestContainerViewOnMainSync(mContentsClient);
AwContents awContents = testView.getAwContents();
final String path = "/testGetVisitedHistoryExerciseCodePath.html";
final String visitedLinks[] = {"http://foo.com", "http://bar.com", null};
final String html = "<a src=\"http://foo.com\">foo</a><a src=\"http://bar.com\">bar</a>";
TestWebServer webServer = TestWebServer.start();
try {
final String pageUrl = webServer.setResponse(path, html, null);
loadUrlSync(awContents, mContentsClient.getOnPageFinishedHelper(), pageUrl);
visitedHistoryHelper.waitForCallback(callCount);
assertNotNull(visitedHistoryHelper.getCallback());
visitedHistoryHelper.getCallback().onReceiveValue(visitedLinks);
visitedHistoryHelper.getCallback().onReceiveValue(null);
loadUrlSync(awContents, mContentsClient.getOnPageFinishedHelper(), pageUrl);
} finally {
webServer.shutdown();
}
}
@Feature({"AndroidWebView"})
@SmallTest
public void testGetVisitedHistoryCallbackAfterDestroy() throws Throwable {
GetVisitedHistoryHelper visitedHistoryHelper =
mContentsClient.getGetVisitedHistoryHelper();
visitedHistoryHelper.setSaveCallback(true);
final int callCount = visitedHistoryHelper.getCallCount();
AwTestContainerView testView = createAwTestContainerViewOnMainSync(mContentsClient);
AwContents awContents = testView.getAwContents();
loadUrlAsync(awContents, "about:blank");
visitedHistoryHelper.waitForCallback(callCount);
assertNotNull(visitedHistoryHelper.getCallback());
destroyAwContentsOnMainSync(awContents);
visitedHistoryHelper.getCallback().onReceiveValue(new String[] {"abc.def"});
visitedHistoryHelper.getCallback().onReceiveValue(null);
}
}
|
[
"lixiaodonglove7@aliyun.com"
] |
lixiaodonglove7@aliyun.com
|
59fbbf3edf694cabfd6dcca962a64af6b2e6f79d
|
0a9878cadcfa7901044fb441bf7d8efac87a8f97
|
/src/main/java/inPractice/chapter12/BoundedBuffer.java
|
35c69f24f2c7d8939d1243b85db4373192580bbe
|
[] |
no_license
|
lastFeng/JavaConcurrentPractice
|
56b18479490351145aaee8a69e6991023a530e6f
|
755486a55411681d133ff0eb85885d5d87466791
|
refs/heads/main
| 2023-06-17T08:52:27.611033
| 2021-07-12T07:28:09
| 2021-07-12T07:28:09
| 366,572,650
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,443
|
java
|
package inPractice.chapter12;
import inPractice.annotation.GuardedBy;
import inPractice.annotation.ThreadSafe;
import java.util.concurrent.Semaphore;
@ThreadSafe
public class BoundedBuffer<E> {
private final Semaphore availableItems, availableSpaces;
@GuardedBy("this")
private final E[] items;
@GuardedBy("this")
private int putPosition = 0, takePosition = 0;
public BoundedBuffer(int capacity) {
availableItems = new Semaphore(0);
availableSpaces = new Semaphore(capacity);
items = (E[]) new Object[capacity];
}
public boolean isEmpty() {
return availableItems.availablePermits() == 0;
}
public boolean isFull() {
return availableSpaces.availablePermits() == 0;
}
public void put(E x) throws InterruptedException {
availableSpaces.acquire();
doInsert(x);
availableItems.release();
}
public E take() throws InterruptedException {
availableItems.acquire();
E item = doExtract();
availableSpaces.release();
return item;
}
private synchronized void doInsert(E x) {
int i = putPosition;
items[i] = x;
putPosition = (++i == items.length) ? 0 : i;
}
private synchronized E doExtract() {
int i = takePosition;
E x = items[i];
items[i] = null;
takePosition = (++i == items.length) ? 0 : i;
return x;
}
}
|
[
"563805728@qq.com"
] |
563805728@qq.com
|
e0d277d015677a46e20cd58aeabf945cdbf75310
|
b27bfe9db8f0c7e5ca9377397b23ef2ef27d4ddc
|
/morozov/syntax/errors/QuestionMarkIsNotExpectedHere.java
|
a784ab921bd1548ab415fc2bf08a00fc752ca647
|
[] |
no_license
|
Morozov2012/actor-prolog-java-library
|
85fe97eb6a37709d742f4ab06b29d0718c7269c3
|
5a7e2011ac2152278b8ebae3dfb2da4d925619a3
|
refs/heads/master
| 2021-01-20T15:39:14.173431
| 2019-12-13T13:09:01
| 2019-12-13T13:09:01
| 7,780,078
| 5
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 200
|
java
|
// (c) 2019 IRE RAS Alexei A. Morozov
package morozov.syntax.errors;
public class QuestionMarkIsNotExpectedHere extends ParserError {
public QuestionMarkIsNotExpectedHere(int p) {
super(p);
}
}
|
[
"AlexeiMorozov2006@rambler.ru"
] |
AlexeiMorozov2006@rambler.ru
|
fda8223c2fa32db47144fb161b442a74766215c8
|
65423f57d25e34d9440bf894584b92be29946825
|
/target/generated-sources/xjc/com/clincab/web/app/eutils/jaxb/e2br3/COCTMT970000UVAuthorization3.java
|
a4ce4222e2b4f8e96b05d74bd1a9a403fa539b06
|
[] |
no_license
|
kunalcabcsi/toolsr3
|
0b518cfa6813a88a921299ab8b8b5d6cbbd362fe
|
5071990dc2325bc74c34a3383792ad5448dee1b0
|
refs/heads/master
| 2021-08-31T04:20:23.924815
| 2017-12-20T09:25:33
| 2017-12-20T09:25:33
| 114,867,895
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,868
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2017.12.20 at 02:30:39 PM IST
//
package com.clincab.web.app.eutils.jaxb.e2br3;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for COCT_MT970000UV.Authorization3 complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="COCT_MT970000UV.Authorization3">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <group ref="{urn:hl7-org:v3}InfrastructureRootElements"/>
* <element name="contractEvent" type="{urn:hl7-org:v3}COCT_MT970000UV.ContractEvent"/>
* </sequence>
* <attGroup ref="{urn:hl7-org:v3}InfrastructureRootAttributes"/>
* <attribute name="nullFlavor" type="{urn:hl7-org:v3}NullFlavor" />
* <attribute name="typeCode" use="required" type="{urn:hl7-org:v3}ActRelationshipAuthorizedBy" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "COCT_MT970000UV.Authorization3", propOrder = {
"realmCode",
"typeId",
"templateId",
"contractEvent"
})
public class COCTMT970000UVAuthorization3 {
protected List<CS> realmCode;
protected II typeId;
protected List<II> templateId;
@XmlElement(required = true, nillable = true)
protected COCTMT970000UVContractEvent contractEvent;
@XmlAttribute(name = "nullFlavor")
protected NullFlavor nullFlavor;
@XmlAttribute(name = "typeCode", required = true)
protected ActRelationshipAuthorizedBy typeCode;
/**
* Gets the value of the realmCode property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the realmCode property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getRealmCode().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link CS }
*
*
*/
public List<CS> getRealmCode() {
if (realmCode == null) {
realmCode = new ArrayList<CS>();
}
return this.realmCode;
}
/**
* Gets the value of the typeId property.
*
* @return
* possible object is
* {@link II }
*
*/
public II getTypeId() {
return typeId;
}
/**
* Sets the value of the typeId property.
*
* @param value
* allowed object is
* {@link II }
*
*/
public void setTypeId(II value) {
this.typeId = value;
}
/**
* Gets the value of the templateId property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the templateId property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getTemplateId().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link II }
*
*
*/
public List<II> getTemplateId() {
if (templateId == null) {
templateId = new ArrayList<II>();
}
return this.templateId;
}
/**
* Gets the value of the contractEvent property.
*
* @return
* possible object is
* {@link COCTMT970000UVContractEvent }
*
*/
public COCTMT970000UVContractEvent getContractEvent() {
return contractEvent;
}
/**
* Sets the value of the contractEvent property.
*
* @param value
* allowed object is
* {@link COCTMT970000UVContractEvent }
*
*/
public void setContractEvent(COCTMT970000UVContractEvent value) {
this.contractEvent = value;
}
/**
* Gets the value of the nullFlavor property.
*
* @return
* possible object is
* {@link NullFlavor }
*
*/
public NullFlavor getNullFlavor() {
return nullFlavor;
}
/**
* Sets the value of the nullFlavor property.
*
* @param value
* allowed object is
* {@link NullFlavor }
*
*/
public void setNullFlavor(NullFlavor value) {
this.nullFlavor = value;
}
/**
* Gets the value of the typeCode property.
*
* @return
* possible object is
* {@link ActRelationshipAuthorizedBy }
*
*/
public ActRelationshipAuthorizedBy getTypeCode() {
return typeCode;
}
/**
* Sets the value of the typeCode property.
*
* @param value
* allowed object is
* {@link ActRelationshipAuthorizedBy }
*
*/
public void setTypeCode(ActRelationshipAuthorizedBy value) {
this.typeCode = value;
}
}
|
[
"ksingh@localhost.localdomain"
] |
ksingh@localhost.localdomain
|
2716f5434de75b647c620b3d8e7fc3509fc0dbac
|
a1ccd86b65a9875411bac7c5ad8a607dd977581f
|
/src/likou/company/bytedance/string/ReverseWords.java
|
4b96733ed07d5f912e71c06f6a5e8c8fb97d4ccd
|
[] |
no_license
|
wp518cookie/leetcode
|
2b48549494f43ba666ca9b08b43e8815a2826455
|
c12839693a0931ec6365621a4c3df28eb60c9941
|
refs/heads/master
| 2023-05-30T20:26:32.814839
| 2021-06-22T07:59:15
| 2021-06-22T07:59:15
| 73,679,492
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,354
|
java
|
package likou.company.bytedance.string;
import java.util.ArrayDeque;
import java.util.Deque;
/**
* @author wuping
* @date 2020-06-29
* https://leetcode-cn.com/explore/featured/card/bytedance/242/string/1011/
* 给定一个字符串,逐个翻转字符串中的每个单词。
*
*
*
* 示例 1:
*
* 输入: "the sky is blue"
* 输出: "blue is sky the"
* 示例 2:
*
* 输入: " hello world! "
* 输出: "world! hello"
* 解释: 输入字符串可以在前面或者后面包含多余的空格,但是反转后的字符不能包括。
* 示例 3:
*
* 输入: "a good example"
* 输出: "example good a"
* 解释: 如果两个单词间有多余的空格,将反转后单词间的空格减少到只含一个。
*
*
* 说明:
* 无空格字符构成一个单词。
* 输入字符串可以在前面或者后面包含多余的空格,但是反转后的字符不能包括。
* 如果两个单词间有多余的空格,将反转后单词间的空格减少到只含一个。
*/
public class ReverseWords {
public static void main(String[] args) {
String t = "a good example";
System.out.println(new ReverseWords().reverseWords(t));
}
public String reverseWords(String s) {
if (s ==null || s.length() == 0) {
return s;
}
s = s.trim();
if (s.length() == 0) {
return "";
}
int start = -1;
Deque<Character> deque = new ArrayDeque<>();
for (int i = 0; i < s.length(); i++) {
char t = s.charAt(i);
if (t != ' ') {
if (start < 0) {
start = i;
}
if (i == s.length() - 1) {
int cur = i;
while (start >= 0 && cur >= start) {
deque.addFirst(s.charAt(cur--));
}
}
} else {
if (start < 0) {
continue;
}
int cur = i - 1;
while (start >= 0 && cur >= start) {
deque.addFirst(s.charAt(cur--));
}
deque.addFirst(' ');
start = -1;
}
}
if (deque.peekFirst() == ' ') {
deque.removeFirst();
}
StringBuilder sb = new StringBuilder();
while (deque.size() > 0) {
sb.append(deque.removeFirst());
}
return sb.toString();
}
// public String reverseWords(String s) {
// if (s == null || s.length() == 0) {
// return s;
// }
// s = s.trim();
// if (s.length() == 0) {
// return s;
// }
// StringBuilder temp = new StringBuilder();
// for (int i = 0; i < s.length(); i++) {
// if (s.charAt(i) == ' ' && s.charAt(i - 1) == ' ') {
// continue;
// }
// temp.append(s.charAt(i));
// }
// // 涉及正则表达式,很慢
// String[] arr = temp.toString().split(" ");
// StringBuilder sb = new StringBuilder();
// for (int i = arr.length - 1; i >= 0; i--) {
// sb.append(arr[i]);
// if (i != 0) {
// sb.append(" ");
// }
// }
// return sb.toString();
// }
}
|
[
"403704156@qq.com"
] |
403704156@qq.com
|
df269a9637b83a95cd77a5d00dda20fee56c3c24
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/elastic--elasticsearch/2cc97a0d3ed2a9276378e2a6462942deab04a1fb/after/RecoverySettingsTests.java
|
64040decdb95941cc9c4e16e549938ee0e7cded5
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,164
|
java
|
/*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch 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.elasticsearch.recovery;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.ByteSizeUnit;
import org.elasticsearch.indices.recovery.RecoverySettings;
import org.elasticsearch.test.ESSingleNodeTestCase;
import java.util.concurrent.TimeUnit;
public class RecoverySettingsTests extends ESSingleNodeTestCase {
@Override
protected boolean resetNodeAfterTest() {
return true;
}
public void testAllSettingsAreDynamicallyUpdatable() {
innerTestSettings(RecoverySettings.INDICES_RECOVERY_FILE_CHUNK_SIZE, randomIntBetween(1, 200), ByteSizeUnit.BYTES, new Validator() {
@Override
public void validate(RecoverySettings recoverySettings, int expectedValue) {
assertEquals(expectedValue, recoverySettings.fileChunkSize().bytesAsInt());
}
});
innerTestSettings(RecoverySettings.INDICES_RECOVERY_TRANSLOG_OPS, randomIntBetween(1, 200), new Validator() {
@Override
public void validate(RecoverySettings recoverySettings, int expectedValue) {
assertEquals(expectedValue, recoverySettings.translogOps());
}
});
innerTestSettings(RecoverySettings.INDICES_RECOVERY_TRANSLOG_SIZE, randomIntBetween(1, 200), ByteSizeUnit.BYTES, new Validator() {
@Override
public void validate(RecoverySettings recoverySettings, int expectedValue) {
assertEquals(expectedValue, recoverySettings.translogSize().bytesAsInt());
}
});
innerTestSettings(RecoverySettings.INDICES_RECOVERY_CONCURRENT_STREAMS, randomIntBetween(1, 200), new Validator() {
@Override
public void validate(RecoverySettings recoverySettings, int expectedValue) {
assertEquals(expectedValue, recoverySettings.concurrentStreamPool().getMaximumPoolSize());
}
});
innerTestSettings(RecoverySettings.INDICES_RECOVERY_CONCURRENT_SMALL_FILE_STREAMS, randomIntBetween(1, 200), new Validator() {
@Override
public void validate(RecoverySettings recoverySettings, int expectedValue) {
assertEquals(expectedValue, recoverySettings.concurrentSmallFileStreamPool().getMaximumPoolSize());
}
});
innerTestSettings(RecoverySettings.INDICES_RECOVERY_MAX_BYTES_PER_SEC, 0, new Validator() {
@Override
public void validate(RecoverySettings recoverySettings, int expectedValue) {
assertEquals(null, recoverySettings.rateLimiter());
}
});
innerTestSettings(RecoverySettings.INDICES_RECOVERY_RETRY_DELAY_STATE_SYNC, randomIntBetween(1, 200), TimeUnit.MILLISECONDS, new Validator() {
@Override
public void validate(RecoverySettings recoverySettings, int expectedValue) {
assertEquals(expectedValue, recoverySettings.retryDelayStateSync().millis());
}
});
innerTestSettings(RecoverySettings.INDICES_RECOVERY_RETRY_DELAY_NETWORK, randomIntBetween(1, 200), TimeUnit.MILLISECONDS, new Validator() {
@Override
public void validate(RecoverySettings recoverySettings, int expectedValue) {
assertEquals(expectedValue, recoverySettings.retryDelayNetwork().millis());
}
});
innerTestSettings(RecoverySettings.INDICES_RECOVERY_ACTIVITY_TIMEOUT, randomIntBetween(1, 200), TimeUnit.MILLISECONDS, new Validator() {
@Override
public void validate(RecoverySettings recoverySettings, int expectedValue) {
assertEquals(expectedValue, recoverySettings.activityTimeout().millis());
}
});
innerTestSettings(RecoverySettings.INDICES_RECOVERY_INTERNAL_ACTION_TIMEOUT, randomIntBetween(1, 200), TimeUnit.MILLISECONDS, new Validator() {
@Override
public void validate(RecoverySettings recoverySettings, int expectedValue) {
assertEquals(expectedValue, recoverySettings.internalActionTimeout().millis());
}
});
innerTestSettings(RecoverySettings.INDICES_RECOVERY_INTERNAL_LONG_ACTION_TIMEOUT, randomIntBetween(1, 200), TimeUnit.MILLISECONDS, new Validator() {
@Override
public void validate(RecoverySettings recoverySettings, int expectedValue) {
assertEquals(expectedValue, recoverySettings.internalActionLongTimeout().millis());
}
});
innerTestSettings(RecoverySettings.INDICES_RECOVERY_COMPRESS, false, new Validator() {
@Override
public void validate(RecoverySettings recoverySettings, boolean expectedValue) {
assertEquals(expectedValue, recoverySettings.compress());
}
});
}
private static class Validator {
public void validate(RecoverySettings recoverySettings, int expectedValue) {
}
public void validate(RecoverySettings recoverySettings, boolean expectedValue) {
}
}
private void innerTestSettings(String key, int newValue, Validator validator) {
client().admin().cluster().prepareUpdateSettings().setTransientSettings(Settings.builder().put(key, newValue)).get();
validator.validate(getInstanceFromNode(RecoverySettings.class), newValue);
}
private void innerTestSettings(String key, int newValue, TimeUnit timeUnit, Validator validator) {
client().admin().cluster().prepareUpdateSettings().setTransientSettings(Settings.builder().put(key, newValue, timeUnit)).get();
validator.validate(getInstanceFromNode(RecoverySettings.class), newValue);
}
private void innerTestSettings(String key, int newValue, ByteSizeUnit byteSizeUnit, Validator validator) {
client().admin().cluster().prepareUpdateSettings().setTransientSettings(Settings.builder().put(key, newValue, byteSizeUnit)).get();
validator.validate(getInstanceFromNode(RecoverySettings.class), newValue);
}
private void innerTestSettings(String key, boolean newValue, Validator validator) {
client().admin().cluster().prepareUpdateSettings().setTransientSettings(Settings.builder().put(key, newValue)).get();
validator.validate(getInstanceFromNode(RecoverySettings.class), newValue);
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.