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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
48992c2e94c49ec99e99334b4810b592866fbbf7 | 95a074a59df888b78223baf3c8badf73eb65983e | /src/main/java/com/example/leetcode/weeklycontest/test184/HTMLEntityParser.java | d912ed5f534501973982293df1021188f0909e9f | [] | no_license | Giridhar552/leetcode | c3a543c59049e3acfd03a8ada5b98f125be95b01 | 378fb45f7ee27b7ee41549dee0dedabe601522db | refs/heads/master | 2023-07-01T00:34:10.267988 | 2021-08-09T17:18:53 | 2021-08-09T17:18:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,492 | java | package com.example.leetcode.weeklycontest.test184;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* HTML entity parser is the parser that takes HTML code as input and replace all the entities of the special characters by the characters itself.
*
* The special characters and their entities for HTML are:
*
* Quotation Mark: the entity is " and symbol character is ".
* Single Quote Mark: the entity is ' and symbol character is '.
* Ampersand: the entity is & and symbol character is &.
* Greater Than Sign: the entity is > and symbol character is >.
* Less Than Sign: the entity is < and symbol character is <.
* Slash: the entity is ⁄ and symbol character is /.
* Given the input text string to the HTML parser, you have to implement the entity parser.
*
* Return the text after replacing the entities by the special characters.
*
*
*
* Example 1:
*
* Input: text = "& is an HTML entity but &ambassador; is not."
* Output: "& is an HTML entity but &ambassador; is not."
* Explanation: The parser will replace the & entity by &
* Example 2:
*
* Input: text = "and I quote: "...""
* Output: "and I quote: \"...\""
* Example 3:
*
* Input: text = "Stay home! Practice on Leetcode :)"
* Output: "Stay home! Practice on Leetcode :)"
* Example 4:
*
* Input: text = "x > y && x < y is always false"
* Output: "x > y && x < y is always false"
* Example 5:
*
* Input: text = "leetcode.com⁄problemset⁄all"
* Output: "leetcode.com/problemset/all"
*
*
* Constraints:
*
* 1 <= text.length <= 10^5
* The string may contain any possible characters out of all the 256 ASCII characters.
*/
public class HTMLEntityParser {
public static void main(String[] args) {
String text = "&gt;";
HTMLEntityParser htmlEntityParser = new HTMLEntityParser();
String result = htmlEntityParser.entityParser(text);
System.out.println(result);
}
public String entityParser(String text) {
Map<String,String> parserMap = new LinkedHashMap<>();
parserMap.put(""","\"");
parserMap.put("'","'");
parserMap.put(">",">");
parserMap.put("<","<");
parserMap.put("⁄","/");
parserMap.put("&","&");
for (Map.Entry<String,String> entry: parserMap.entrySet()){
text = text.replaceAll(entry.getKey(),entry.getValue());
}
return text;
}
}
| [
"zhangzui1989@gmail.com"
] | zhangzui1989@gmail.com |
3d065fbd6bf3a1d2473be7025cb1e8f786df20ea | 7f31bbbba3749a66bdb97c72e56f7b038625254f | /zftlive/zftlive/libraries/widget/src/main/java/com/zftlive/android/library/widget/fadingactionbar/view/RootLayout.java | 292feed7b043226d95c8a4d242742cd67a1c6d93 | [
"Apache-2.0"
] | permissive | ruanxuexiong/demo | a6aa04825b4f8063258756d56d30a37bc1b3d877 | 7ca3c71051f85ab6d28e75599e7c38a13bed8d3a | refs/heads/master | 2020-05-22T05:27:57.313371 | 2019-05-12T10:03:41 | 2019-05-12T10:03:41 | 186,235,930 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,457 | java | /*
* Android基础开发个人积累、沉淀、封装、整理共通
* Copyright (c) 2016. 曾繁添 <zftlive@163.com>
* Github:https://github.com/zengfantian || http://git.oschina.net/zftlive
*
* 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.zftlive.android.library.widget.fadingactionbar.view;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.FrameLayout;
import com.zftlive.android.library.widget.R;
public class RootLayout extends FrameLayout {
private View mHeaderContainer;
private View mListViewBackground;
private boolean mInitialized = false;
public RootLayout (Context context) {
super(context);
}
public RootLayout (Context context, AttributeSet attrs) {
super(context, attrs);
}
public RootLayout (Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
protected void onLayout (boolean changed, int left, int top, int right, int bottom) {
//at first find headerViewContainer and listViewBackground
if (mHeaderContainer == null)
mHeaderContainer = findViewById(R.id.fab__header_container);
if (mListViewBackground == null)
mListViewBackground = findViewById(R.id.fab__listview_background);
//if there's no headerViewContainer then fallback to standard FrameLayout
if (mHeaderContainer == null) {
super.onLayout(changed, left, top, right, bottom);
return;
}
if (!mInitialized) {
super.onLayout(changed, left, top, right, bottom);
//if mListViewBackground not exists or mListViewBackground exists
//and its top is at headercontainer height then view is initialized
if (mListViewBackground == null || mListViewBackground.getTop() == mHeaderContainer.getHeight())
mInitialized = true;
return;
}
//get last header and listViewBackground position
int headerTopPrevious = mHeaderContainer.getTop();
int listViewBackgroundTopPrevious = mListViewBackground != null ? mListViewBackground.getTop() : 0;
//relayout
super.onLayout(changed, left, top, right, bottom);
//revert header top position
int headerTopCurrent = mHeaderContainer.getTop();
if (headerTopCurrent != headerTopPrevious) {
mHeaderContainer.offsetTopAndBottom(headerTopPrevious - headerTopCurrent);
}
//revert listViewBackground top position
int listViewBackgroundTopCurrent = mListViewBackground != null ? mListViewBackground.getTop() : 0;
if (listViewBackgroundTopCurrent != listViewBackgroundTopPrevious) {
mListViewBackground.offsetTopAndBottom(listViewBackgroundTopPrevious - listViewBackgroundTopCurrent);
}
}
} | [
"412877174@qq.com"
] | 412877174@qq.com |
1ef3b3f97046ba92e5a863cc05fd6d3ed7645f92 | 0ae573b09f427c73f6434cd57f15e435857068b8 | /app/src/main/java/com/pouyaheydari/learning/sematecandroidbasicmehr99/TestAlertDialogActivity.java | 35c3df3dcd0a85cc7ecc0b64ba0bd041d2c4f58a | [] | no_license | SirLordPouya/SematecAndroidBasicMehr99 | 9299709ce1c050c36b50df0d43a8a012dc2fc52a | 4aa009a0b54c6e9bd3750a27bc9c75c95fab99f7 | refs/heads/master | 2023-01-30T07:06:54.834425 | 2020-12-11T10:02:27 | 2020-12-11T10:02:27 | 310,551,457 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,738 | java | package com.pouyaheydari.learning.sematecandroidbasicmehr99;
import android.content.DialogInterface;
import android.os.Bundle;
import android.widget.Toast;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
public class TestAlertDialogActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_test_alert_dialog);
AlertDialog dialog = new AlertDialog.Builder(TestAlertDialogActivity.this)
.setTitle("Attention!")
.setMessage("Are you sure?!")
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Toast.makeText(TestAlertDialogActivity.this, "Yes Clicked!", Toast.LENGTH_SHORT).show();
}
})
.setNegativeButton("No", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Toast.makeText(TestAlertDialogActivity.this, "No CLicked!", Toast.LENGTH_SHORT).show();
}
})
.setNeutralButton("I dont know!", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Toast.makeText(TestAlertDialogActivity.this, "IDK clicked!", Toast.LENGTH_SHORT).show();
}
}).create();
dialog.show();
}
} | [
"pouyaheydary@gmail.com"
] | pouyaheydary@gmail.com |
7b0f43d4ace448ad66143e5f9f42e7e61b8015e9 | 68a7acc92e7312b4db75a4adc79469473d8dcc52 | /src/core/character/CharacterEncoding.java | 75e11ea9f182178cddc56a4cacb6a62d6480998e | [] | no_license | vasanthsubram/JavaCookBook | e83f95a9a08d6227455ebd213d216837ec1c97b5 | 3fb2dfc38a4bb56f21f329b0dbc8283609412840 | refs/heads/master | 2022-12-16T00:13:31.515018 | 2019-06-24T03:12:11 | 2019-06-24T03:12:11 | 30,102,351 | 0 | 0 | null | 2022-12-13T19:13:55 | 2015-01-31T04:39:51 | Java | UTF-8 | Java | false | false | 623 | java | package core.character;
public class CharacterEncoding {
public static void main(String[] args) throws Exception {
System.out.println("Letter a");
print("a".getBytes("UTF-8"));
print("a".getBytes("UTF-16"));
System.out.println("\na Greek letter");
print("\u0370".getBytes("UTF-8"));
print("\u0370".getBytes("UTF-16"));
System.out.println("\na tamil letter");
print("\u0B80".getBytes("UTF-8"));
}
private static void print(byte[] bytes) {
System.out.println("number of bytes = " + bytes.length);
for (int i = 0; i < bytes.length; i++) {
System.out.format("%02x \n", bytes[i]);
}
}
}
| [
"v-vsubramanian@expedia.com"
] | v-vsubramanian@expedia.com |
36be19c203794f9e5a0c77ba44d437152c8a9dd6 | 7b07d7ad89ff5d88fd283a081ed4e9ef9b0d3465 | /src/RmiMath/WeatherImpl.java | 566b729c7b5ea8510f4024c210d19426b7f74470 | [] | no_license | huyhue/Java-Desktop-Application | 657f4a0873d270c6b623cc65abcdc0d15b253b3c | 285d0cd3ee499ed1fe2aa4dbe602684f6f45827f | refs/heads/master | 2022-11-23T12:07:15.236585 | 2020-07-26T14:16:13 | 2020-07-26T14:16:13 | 275,291,770 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 511 | java | //Step 2: Implement the Remote Interface
//gom co class RmiClient, RmiServer, Weather,WeatherImp, WeatherInterface
package RmiMath;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
public class WeatherImpl extends UnicastRemoteObject implements WeatherInterface{
Weather weather;
public WeatherImpl(Weather weather) throws RemoteException{
this.weather = weather;
}
public Weather getWeather() throws RemoteException {
return weather;
}
}
| [
"tpgiahuy5@gmail.com"
] | tpgiahuy5@gmail.com |
04ebac52b0891adef005aa9f1cf695840019117f | ed9e7da4886658526202c8afb70a8b9123431225 | /src/net/minecraftforge/client/model/pipeline/IVertexConsumer.java | 707a5fa3096455397326ca784b03781cd442b92d | [] | no_license | steviebeenz/FractionClient | 4b31f3b3573cccc4fcc559a24f4a48c8774f750a | ccbd026542c5b43b1df9a64cd58eaf02145a11a7 | refs/heads/master | 2023-08-16T04:16:27.848858 | 2021-10-11T21:23:13 | 2021-10-14T22:14:19 | 416,090,058 | 0 | 0 | null | 2021-10-15T03:51:53 | 2021-10-11T21:19:49 | Java | UTF-8 | Java | false | false | 386 | java | package net.minecraftforge.client.model.pipeline;
import net.minecraft.client.renderer.vertex.VertexFormat;
import net.minecraft.util.EnumFacing;
public interface IVertexConsumer
{
VertexFormat getVertexFormat();
void setQuadTint(int var1);
void setQuadOrientation(EnumFacing var1);
void setQuadColored();
void put(int var1, float... var2);
}
| [
"orress35@mail.ru"
] | orress35@mail.ru |
f79879dff8483ca4bb550d6dd99c064165a5f45f | 180e78725121de49801e34de358c32cf7148b0a2 | /dataset/protocol1/spoon/learning/5269/CtTargetedExpressionImpl.java | 3fba6f782ccbbfc5bafa1d02b3c9e2ab583c7f9b | [] | no_license | ASSERT-KTH/synthetic-checkstyle-error-dataset | 40e8d1e0a7ebe7f7711def96a390891a6922f7bd | 40c057e1669584bfc6fecf789b5b2854660222f3 | refs/heads/master | 2023-03-18T12:50:55.410343 | 2019-01-25T09:54:39 | 2019-01-25T09:54:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,718 | java | /**
* Copyright (C) 2006-2018 INRIA and contributors
* Spoon - http://spoon.gforge.inria.fr/
*
* This software is governed by the CeCILL-C License under French law and
* abiding by the rules of distribution of free software. You can use, modify
* and/or redistribute the software under the terms of the CeCILL-C license as
* circulated by CEA, CNRS and INRIA at http://www.cecill.info.
*
* 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 CeCILL-C License for more details.
*
* The fact that you are presently reading this means that you have had
* knowledge of the CeCILL-C license and that you accept its terms.
*/
package spoon.support.reflect.code;
import spoon.reflect.annotations.MetamodelPropertyField;
import spoon.reflect.code.CtExpression;
import
spoon.reflect.code.CtTargetedExpression;
import static spoon.reflect.path.CtRole.TARGET;
public abstract class CtTargetedExpressionImpl<E, T extends CtExpression<?>> extends CtExpressionImpl<E> implements CtTargetedExpression<E, T> {
private static final long serialVersionUID = 1L;
@MetamodelPropertyField(role = TARGET)
T target;
@Override
public T getTarget() {
return target;
}
@Override
public <C extends CtTargetedExpression<E, T>> C setTarget(T target) {
if (target != null) {
target.setParent(this);
}
getFactory().getEnvironment().getModelChangeListener().onObjectUpdate(this, TARGET, target, this.target);
this.target = target;
return (C) this;
}
@Override
public CtTargetedExpression<E, T> clone() {
return (CtTargetedExpression<E, T>) super.clone();
}
}
| [
"bloriot97@gmail.com"
] | bloriot97@gmail.com |
788b4471998ab39f1bf0e6aff2f08a1cee72d265 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/23/23_cc3abe2ec1f54ad64804ce1512c35e4e7072adae/OsgiStatusController/23_cc3abe2ec1f54ad64804ce1512c35e4e7072adae_OsgiStatusController_s.java | 782ebba0fa703a6c879ff77726de007f4f70dad7 | [] | 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,654 | java | package ddth.dasp.status.controller;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import ddth.dasp.common.DaspGlobal;
import ddth.dasp.common.osgi.IOsgiBootstrap;
import ddth.dasp.common.utils.OsgiUtils;
import ddth.dasp.status.DaspBundleConstants;
public class OsgiStatusController extends BaseController {
private final static String VIEW_NAME = DaspBundleConstants.MODULE_NAME + ":osgi";
@RequestMapping
public String handleRequest() {
return VIEW_NAME;
}
@ModelAttribute("OSGI")
private Object buildModelOsgi() {
List<Object> model = new ArrayList<Object>();
IOsgiBootstrap osgiBootstrap = DaspGlobal.getOsgiBootstrap();
BundleContext bc = osgiBootstrap.getBundleContext();
Bundle[] bundles = bc.getBundles();
for (Bundle bundle : bundles) {
Map<String, Object> bundleModel = new HashMap<String, Object>();
model.add(bundleModel);
bundleModel.put("id", bundle.getBundleId());
bundleModel.put("name", bundle.getSymbolicName() != null ? bundle.getSymbolicName()
: "null");
bundleModel.put("version", bundle.getVersion());
bundleModel.put("state", OsgiUtils.getBundleStateAsString(bundle));
}
return model;
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
d96bb778d07c63695c1f22ab0dfea39cba7c3b35 | 647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4 | /com.tencent.qqlite/assets/exlibs.1.jar/classes.jar/com/tencent/pb/secmsg/SecMsgComu$SecMsg_GetBaseInfo_Req.java | 40e7b9cbd87457ec46d40f25f686ecf2b60f88bc | [] | no_license | tsuzcx/qq_apk | 0d5e792c3c7351ab781957bac465c55c505caf61 | afe46ef5640d0ba6850cdefd3c11badbd725a3f6 | refs/heads/main | 2022-07-02T10:32:11.651957 | 2022-02-01T12:41:38 | 2022-02-01T12:41:38 | 453,860,108 | 36 | 9 | null | 2022-01-31T09:46:26 | 2022-01-31T02:43:22 | Java | UTF-8 | Java | false | false | 835 | java | package com.tencent.pb.secmsg;
import com.tencent.mobileqq.pb.MessageMicro;
import com.tencent.mobileqq.pb.MessageMicro.FieldMap;
import com.tencent.mobileqq.pb.PBField;
import com.tencent.mobileqq.pb.PBUInt64Field;
public final class SecMsgComu$SecMsg_GetBaseInfo_Req
extends MessageMicro
{
public static final int MASK_FIELD_NUMBER = 1;
static final MessageMicro.FieldMap __fieldMap__ = MessageMicro.initFieldMap(new int[] { 8 }, new String[] { "mask" }, new Object[] { Long.valueOf(0L) }, SecMsg_GetBaseInfo_Req.class);
public final PBUInt64Field mask = PBField.initUInt64(0L);
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.qqlite\assets\exlibs.1.jar\classes.jar
* Qualified Name: com.tencent.pb.secmsg.SecMsgComu.SecMsg_GetBaseInfo_Req
* JD-Core Version: 0.7.0.1
*/ | [
"98632993+tsuzcx@users.noreply.github.com"
] | 98632993+tsuzcx@users.noreply.github.com |
e11d63c7a6e832eabee559d4ba16a81155897b1c | 45537da08f59b9b649f5880710ce3bca4bdd5aba | /src/main/java/generics/wildcards/UpperBounds.java | 1bafe50657e56ac9e1943b3464cdca3c3c3c919c | [
"MIT"
] | permissive | Gru80/generics | c586d2db76f40732d28cbad865826e902c45d71a | 0309249932dcad80e241bd4e457ba51ef68d0ff5 | refs/heads/master | 2023-08-26T03:51:59.370137 | 2021-11-01T20:15:38 | 2021-11-01T20:15:38 | 421,158,889 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,564 | java | package generics.wildcards;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.DoubleStream;
import java.util.stream.IntStream;
/**
* Created by Ken Kousen on 11/9/16.
*/
public class UpperBounds {
public static double sumList(List<? extends Number> list) {
return list.stream()
.mapToDouble(Number::doubleValue)
.sum();
}
public static void main(String[] args) {
List<? extends Number> numbers = new ArrayList<>();
// numbers.add(3);
// numbers.add(3.14159);
// numbers.add(new BigDecimal("3"));
List<Integer> ints = Arrays.asList(1, 2, 3, 4, 5);
List<Integer> integers = IntStream.rangeClosed(1, 5)
.mapToObj(Integer::new)
.collect(Collectors.toList());
List<Double> doubles = Arrays.asList(1.0, 2.0, 3.0, 4.0, 5.0);
List<Double> doubles1 = DoubleStream.iterate(1.0, d -> d + 1.0)
.limit(5)
.mapToObj(Double::new)
.collect(Collectors.toList());
List<BigDecimal> bigDecimals = IntStream.rangeClosed(1, 5)
.mapToObj(BigDecimal::new)
.collect(Collectors.toList());
System.out.println(sumList(ints));
System.out.println(sumList(integers));
System.out.println(sumList(doubles));
System.out.println(sumList(doubles1));
System.out.println(sumList(bigDecimals));
}
}
| [
"ken.kousen@kousenit.com"
] | ken.kousen@kousenit.com |
e14de5dfbba3a88f5cc887372955bf736e3ace1d | 13200e547eec0d67ff9da9204c72ab26a93f393d | /src/com/google/android/gms/location/internal/NlpTestingRequest.java | e1bf7ed8594369749de08d6238c26a7b7b811b97 | [] | no_license | emtee40/DecompiledPixelLauncher | d72d107eaafb42896aa903b9f0f34f5f09f5a15c | fb954b108a7bf3377da5c28fd9a2f22e1b6990ea | refs/heads/master | 2020-04-03T03:18:06.239632 | 2018-01-19T08:49:36 | 2018-01-19T08:49:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 737 | java | //
// Decompiled by Procyon v0.5.30
//
package com.google.android.gms.location.internal;
import android.os.Parcel;
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
public class NlpTestingRequest extends AbstractSafeParcelable
{
public static final m CREATOR;
private final int BV;
private final long BW;
static {
CREATOR = new m();
}
NlpTestingRequest(final int bv, final long bw) {
this.BV = bv;
this.BW = bw;
}
public long FL() {
return this.BW;
}
public int FM() {
return this.BV;
}
public void writeToParcel(final Parcel parcel, final int n) {
m.Gz(this, parcel, n);
}
}
| [
"azaidi@live.nl"
] | azaidi@live.nl |
fb70764e3edb84a3c34538182cafb4fbb94a3e3a | 13c2d3db2d49c40c74c2e6420a9cd89377f1c934 | /program_data/github_java_program_data/18/514.java | e334967b46e3c7edae99e450d08d96b3c8e0b96b | [
"MIT"
] | permissive | qiuchili/ggnn_graph_classification | c2090fefe11f8bf650e734442eb96996a54dc112 | 291ff02404555511b94a4f477c6974ebd62dcf44 | refs/heads/master | 2021-10-18T14:54:26.154367 | 2018-10-21T23:34:14 | 2018-10-21T23:34:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 910 | java | //Francisco Sanchez Enriquez
import java.util.Scanner;
public class Lerning {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String a = in.next();
int lenght = a.length();
String array[] = new String [lenght];
int j=lenght, counter=0;
for(int i=0; i<lenght; i++){
String character;
character = a.substring(i, i+1);
array[i]=character;
}
for(int i=0; i<lenght; i++){
if(array[i].equals(array[j-1])){
counter++;
}
j--;
}
if(counter==lenght){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
} | [
"y.yu@open.ac.uk"
] | y.yu@open.ac.uk |
8569ad0dd71873f9e8a0141a7991eba760c12b8f | 619133c67a7f07b28be0335bbd71b07b08bb2a16 | /src/main/java/com/liwei/controller/admin/BloggerAdminController.java | a71b520df5f1f995380deb82f34756b7a3f577b8 | [] | no_license | DoddyApe-loveCat/Blog | 72a123aa2fb52a98a2357bf471b23584c118f4db | f1e6b7200dda27a92a0139ee1bb8f2a755f3d56d | refs/heads/master | 2020-06-14T15:58:08.927970 | 2016-10-06T06:33:19 | 2016-10-06T06:33:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,060 | java | package com.liwei.controller.admin;
import com.liwei.entity.Blogger;
import com.liwei.service.BloggerService;
import com.liwei.util.CryptographyUtil;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.io.FilenameFilter;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
/**
* Created by Liwei on 2016/8/1.
* 管理员博主 Controller 层
*/
@Controller
@RequestMapping("/admin/blogger")
public class BloggerAdminController {
private static final Logger logger = LoggerFactory.getLogger(BloggerAdminController.class);
@Autowired
private BloggerService bloggerService;
/**
* 获取博主个人信息
* @param name
* @return
*/
@ResponseBody
@RequestMapping(value = "/find",method = RequestMethod.GET)
public Blogger find(String name){
logger.debug("name => " + name);
Blogger blogger = bloggerService.find();
return blogger;
}
/**
* 个人信息页面不修改密码,密码会在专门的页面进行修改
* 并且个人信息页面应该禁止用户修改用户名,
* 因为用户名是加密的盐,修改了用户名,等于修改了密码
* @param blogger
* @return
*/
@ResponseBody
@RequestMapping(value = "/save",method = RequestMethod.POST)
public Map<String,Object> save(
@RequestParam("imageFile") MultipartFile imageFile,
Blogger blogger,
HttpServletRequest request){
if(!imageFile.isEmpty()){
String serverBasePath = request.getSession().getServletContext().getRealPath("/");
logger.debug("basePath => " + serverBasePath);
String originFileName = imageFile.getOriginalFilename();
logger.debug("originFileName => " + originFileName);
String imageName = System.currentTimeMillis() + "." + originFileName.split("\\.")[1];
logger.debug("imageName => " + imageName);
String baseFolder = File.separator + "static"
+ File.separator + "userImages" + File.separator;
File folder = new File(serverBasePath + baseFolder);
String[] files = folder.list(new FilenameFilter() {
@Override
public boolean accept(File dir, String name) {
return !name.startsWith("liwei");
}
});
for(String file:files){
new File(serverBasePath + baseFolder + file).delete();
}
String realFilePath = baseFolder + imageName;
logger.debug(realFilePath);
try {
// 完成了文件上传
imageFile.transferTo(new File(serverBasePath + realFilePath));
blogger.setImageName(realFilePath);
} catch (IOException e) {
e.printStackTrace();
}
}
logger.debug("id => " + blogger.getId());
Integer upateNumber = null;
if(blogger.getId() != 0){
upateNumber = bloggerService.update(blogger);
}
Map<String,Object> result = new HashMap<>();
if(upateNumber > 0){
result.put("success",true);
}else {
result.put("success",false);
result.put("errorInfo","修改博主信息失败!");
}
return result;
}
/**
* 修改密码
* @param userName 用户名这里要作为加密的盐值
* @param bloggerId 和 userName 冗余
* @param newPassword 新设置的密码
* @return
*/
@ResponseBody
@RequestMapping(value = "/modifyPassword")
public Map<String,Object> modifyPassword(
String userName,
String bloggerId,
String newPassword){
logger.debug("bloggerId => " + bloggerId);
String newPasswordCrypt = CryptographyUtil.md5(newPassword,userName);
Blogger blogger = new Blogger();
blogger.setId(Integer.parseInt(bloggerId));
blogger.setPassword(newPasswordCrypt);
Integer updateNum = bloggerService.update(blogger);
Map<String,Object> result = new HashMap<>();
if(updateNum>0){
result.put("success",true);
result.put("successInfo","修改密码成功!");
}else {
result.put("success",false);
result.put("errorInfo","修改密码失败!");
}
return result;
}
}
| [
"121088825@qq.com"
] | 121088825@qq.com |
71dadaf3ba338881ecc0e73b4b1f24305ed69710 | 6b2a8dd202fdce77c971c412717e305e1caaac51 | /solutions_2453486_0/java/kamiloj/TICTAC.java | 9cf88c62e18b68b5b1b9b6fcfac0258a6b9517c5 | [] | no_license | alexandraback/datacollection | 0bc67a9ace00abbc843f4912562f3a064992e0e9 | 076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf | refs/heads/master | 2021-01-24T18:27:24.417992 | 2017-05-23T09:23:38 | 2017-05-23T09:23:38 | 84,313,442 | 2 | 4 | null | null | null | null | UTF-8 | Java | false | false | 1,892 | java | import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Scanner;
public class TICTAC {
Scanner s;
PrintWriter pw;
char[][] tablero = new char[4][4];
boolean draw;
public TICTAC() throws FileNotFoundException {
s = new Scanner(new File("A-small-attempt0.in"));
pw = new PrintWriter(new File("salida.out"));
int T = s.nextInt();
for (int i = 1; i <= T; i++) {
pw.println("Case #" + i + ": " + solve());
}
s.close();
pw.close();
}
private String solve() {
draw = true;
read();
if (win('X'))
return "X won";
if (win('O'))
return "O won";
if (draw)
return "Draw";
return "Game has not completed";
}
private boolean win(char c) {
for (int i = 0; i < 4; i++) {
boolean win = true;
for (int j = 0; j < 4; j++) {
if (tablero[i][j] != c && tablero[i][j] != 'T') {
win = false;
break;
}
}
if (win)
return true;
}
for (int i = 0; i < 4; i++) {
boolean win = true;
for (int j = 0; j < 4; j++) {
if (tablero[j][i] != c && tablero[j][i] != 'T') {
win = false;
break;
}
}
if (win)
return true;
}
boolean win = true;
for (int i = 0; i < 4; i++) {
if (tablero[i][i] != c && tablero[i][i] != 'T') {
win = false;
break;
}
}
if (win)
return true;
win = true;
for (int i = 0; i < 4; i++) {
if (tablero[i][3 - i] != c && tablero[i][3 - i] != 'T') {
win = false;
break;
}
}
return win;
}
private void read() {
for (int i = 0; i < 4; i++) {
String l = s.next();
for (int j = 0; j < 4; j++) {
tablero[i][j] = l.charAt(j);
if (tablero[i][j] == '.')
draw = false;
}
}
}
public static void main(String[] args) throws FileNotFoundException {
new TICTAC();
}
}
| [
"eewestman@gmail.com"
] | eewestman@gmail.com |
b46dd6c1560593d6929a0454340ae9b8412cca15 | dd6a0de87a2d0a774c7d78a6ba10dfeb4b80e6c1 | /src/main/java/eu/matejkormuth/iplogin/services/hooks/AuthMeAuthenticationPlugin.java | e6d03c34d665c7476055d610d32375b5f6495dec | [
"BSD-2-Clause"
] | permissive | pexelnet/iplogin | 8433e56cbb5ada97418ed23ff7607c59c4b76a62 | 0c5760ca4c07edabf9ffd34d0fbb2766307bc2b8 | refs/heads/master | 2020-06-19T09:13:30.966743 | 2019-07-12T23:32:53 | 2019-07-12T23:32:53 | 196,657,695 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,828 | java | /**
* iplogin - Login to your Minecraft server seamlessly
* Copyright (c) 2015, Matej Kormuth <http://www.github.com/dobrakmato>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* 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 HOLDER 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 eu.matejkormuth.iplogin.services.hooks;
import eu.matejkormuth.iplogin.api.services.AuthenticationPlugin;
import fr.xephi.authme.api.NewAPI;
import org.bukkit.entity.Player;
public class AuthMeAuthenticationPlugin implements AuthenticationPlugin {
@Override
public void forceLogin(Player player) {
NewAPI.getInstance().forceLogin(player);
}
}
| [
"dobrakmato@gmail.com"
] | dobrakmato@gmail.com |
8ff82169b936e158fe6d0166d8882c84e6ff3946 | 09a57cd259a220f1033f7e9c5c75f531a2c1f9e9 | /src/com/zteict/web/company/service/Impl/CompanyProxyserverServiceImpl.java | bf64533e2c2e7791637995e7233526150fdd7a1b | [] | no_license | kxjl168/gsvr | 483fd3cb07f71d84fef20610052091a224b36e75 | 8406095fe01626d3b6de9c818f9e93b1bb8e804e | refs/heads/master | 2021-08-31T17:16:16.046734 | 2017-12-22T06:23:13 | 2017-12-22T06:23:13 | 114,353,138 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,272 | java | package com.zteict.web.company.service.Impl;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zteict.web.company.dao.CompanyProxyserverDao;
import com.zteict.web.company.model.CompanyProxyserver;
import com.zteict.web.company.service.CompanyProxyserverService;
import com.zteict.web.system.dao.SystemParamsDao;
@Service(value="CompanyProxyserverService")
public class CompanyProxyserverServiceImpl implements CompanyProxyserverService{
@Autowired
CompanyProxyserverDao companyDao;
@Autowired
SystemParamsDao sysDao;
/**
* 分页获取banner列表
* @param query
* @return
* @date 2016-8-4
*/
@Override
public List<CompanyProxyserver> getCompanyProxyserverPageList(CompanyProxyserver query) {
return companyDao.getCompanyProxyserverPageList(query);
}
/**
* 登录
* @param bannerID
* @return
* @date 2016-8-4
*/
public CompanyProxyserver getCompanyProxyserverInfo(CompanyProxyserver query)
{
return companyDao.getCompanyProxyserverInfo(query);
}
/**
* 获取banner总条数
* @param query
* @return
* @date 2016-8-4
*/
@Override
public int getCompanyProxyserverPageListCount(CompanyProxyserver query) {
return companyDao.getCompanyProxyserverPageListCount(query);
}
@Override
public int addCompanyProxyserver(CompanyProxyserver CompanyProxyserver) {
return companyDao.addCompanyProxyserver(CompanyProxyserver);
}
@Override
public int deleteCompanyProxyserver(CompanyProxyserver CompanyProxyserver) {
return companyDao.deleteCompanyProxyserver(CompanyProxyserver);
}
@Override
public int updateCompanyProxyserver(CompanyProxyserver CompanyProxyserver) {
CompanyProxyserver tmp= getCompanyProxyserverInfo(CompanyProxyserver);
if(tmp!=null)
{
return companyDao.updateCompanyProxyserver(CompanyProxyserver);
}
else
{
return addCompanyProxyserver(CompanyProxyserver);
}
}
public List<CompanyProxyserver> getconflictProxyserverInfo(CompanyProxyserver query) {
return companyDao.getconflictProxyserverInfo(query);
}
}
| [
"kxjl168@foxmail.com"
] | kxjl168@foxmail.com |
3fa21685418bb761ce8e4a38c4e0c21b3cde8ea1 | a42c28deb26db57c1c4f377a67c422a6b7e3906b | /app/src/main/java/com/star/wanandroid/ui/main/activity/RegisterActivity.java | 06051fdf9ccd32d96a629009b4db2111a2e05341 | [] | no_license | crystalDf/HongYang-Blog-20180416-WanAndroid | 6ef74cf3477e3c6cf1da4312ec20d66eef281212 | d87043195f067638abf8a11effa8f5baadaf13d4 | refs/heads/master | 2020-03-12T10:14:04.197700 | 2018-06-10T15:13:05 | 2018-06-10T15:13:05 | 130,568,796 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,440 | java | package com.star.wanandroid.ui.main.activity;
import android.content.Context;
import android.support.v4.content.ContextCompat;
import android.support.v7.widget.Toolbar;
import android.text.TextUtils;
import android.view.inputmethod.InputMethodManager;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import com.jakewharton.rxbinding2.view.RxView;
import com.star.wanandroid.R;
import com.star.wanandroid.app.Constants;
import com.star.wanandroid.base.activity.BaseActivity;
import com.star.wanandroid.contract.main.RegisterContract;
import com.star.wanandroid.core.bean.main.login.LoginData;
import com.star.wanandroid.presenter.main.RegisterPresenter;
import com.star.wanandroid.utils.CommonUtils;
import com.star.wanandroid.utils.StatusBarUtil;
import java.util.concurrent.TimeUnit;
import butterknife.BindView;
public class RegisterActivity extends BaseActivity<RegisterPresenter> implements RegisterContract.View {
@BindView(R.id.common_toolbar)
Toolbar mToolbar;
@BindView(R.id.common_toolbar_title_tv)
TextView mTitleTv;
@BindView(R.id.register_account_edit)
EditText mAccountEdit;
@BindView(R.id.register_password_edit)
EditText mPasswordEdit;
@BindView(R.id.register_confirm_password_edit)
EditText mConfirmPasswordEdit;
@BindView(R.id.register_btn)
Button mRegisterBtn;
@Override
protected int getLayoutId() {
return R.layout.fragment_register;
}
@Override
protected void initEventAndData() {
initToolbar();
InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
if (inputMethodManager != null) {
mAccountEdit.requestFocus();
inputMethodManager.showSoftInput(mAccountEdit, 0);
}
mPresenter.addRxBindingSubscribe(RxView.clicks(mRegisterBtn)
.throttleFirst(Constants.CLICK_TIME_AREA, TimeUnit.MILLISECONDS)
.filter(o -> mPresenter != null)
.subscribe(o -> register()));
}
private void register() {
String account = mAccountEdit.getText().toString().trim();
String password = mPasswordEdit.getText().toString().trim();
String rePassword = mConfirmPasswordEdit.getText().toString().trim();
if (TextUtils.isEmpty(account) || TextUtils.isEmpty(password) || TextUtils.isEmpty(rePassword)) {
CommonUtils.showSnackMessage(this, getString(R.string.account_password_null_tint));
return;
}
if (!password.equals(rePassword)) {
CommonUtils.showSnackMessage(this, getString(R.string.password_not_same));
return;
}
mPresenter.getRegisterData(account, password, rePassword);
}
private void initToolbar() {
StatusBarUtil.immersive(this);
StatusBarUtil.setPaddingSmart(this, mToolbar);
mToolbar.setBackgroundColor(ContextCompat.getColor(this, R.color.register_bac));
mTitleTv.setText(R.string.register);
mTitleTv.setTextColor(ContextCompat.getColor(this, R.color.white));
mTitleTv.setTextSize(20);
mToolbar.setNavigationOnClickListener(v -> onBackPressedSupport());
}
@Override
public void showRegisterData(LoginData loginData) {
CommonUtils.showSnackMessage(this, getString(R.string.register_success));
onBackPressedSupport();
}
}
| [
"chendong333@gmail.com"
] | chendong333@gmail.com |
506bc4b38a60627a5d057fcf71768474fdeaf287 | d86b8f20cf5da930581fd7bd071c767288f6c9e0 | /test/com/cedarsolutions/dao/gae/impl/ObjectifyProxyTest.java | e0408dad804fd2e9d6d6d029948fb2c90eba883f | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | pronovic/cedar-common | 1822123f809f50bf0c54db3b89da8a8de2131ffc | 0984a7f11f7819b7561e8875008697af1a77dd3f | refs/heads/master | 2022-12-31T00:36:49.288976 | 2020-10-22T13:25:30 | 2020-10-22T13:25:30 | 204,186,469 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,573 | java | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* C E D A R
* S O L U T I O N S "Software done right."
* S O F T W A R E
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Copyright (c) 2013 Kenneth J. Pronovici.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the Apache License, Version 2.0.
* See LICENSE for more information about the licensing terms.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Author : Kenneth J. Pronovici <pronovic@ieee.org>
* Language : Java 6
* Project : Common Java Functionality
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
package com.cedarsolutions.dao.gae.impl;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import org.junit.Test;
import org.mockito.Mockito;
import com.cedarsolutions.exception.DaoException;
import com.googlecode.objectify.Objectify;
/**
* Unit tests for ObjectifyProxy.
* @author Kenneth J. Pronovici <pronovic@ieee.org>
*/
public class ObjectifyProxyTest {
/** Test the constructor. */
@Test public void testConstructor() {
Objectify objectify = mock(Objectify.class);
ObjectifyProxy proxy = new ObjectifyProxy(objectify);
assertSame(objectify, proxy.getProxyTarget());
assertFalse(proxy.isTransactional());
proxy = new ObjectifyProxy(objectify, false);
assertSame(objectify, proxy.getProxyTarget());
assertFalse(proxy.isTransactional());
proxy = new ObjectifyProxy(objectify, true);
assertSame(objectify, proxy.getProxyTarget());
assertTrue(proxy.isTransactional());
}
/** Test commit(). */
@Test public void testCommit() {
Objectify objectify = mock(Objectify.class, Mockito.RETURNS_DEEP_STUBS);
ObjectifyProxy proxy = null;
try {
proxy = new ObjectifyProxy(objectify, false);
proxy.commit();
fail("Expected DaoException");
} catch (DaoException e) { }
proxy = new ObjectifyProxy(objectify, true);
when(objectify.getTxn().isActive()).thenReturn(false);
proxy.commit();
verify(objectify.getTxn(), times(0)).commit();
when(objectify.getTxn().isActive()).thenReturn(true);
proxy.commit();
verify(objectify.getTxn()).commit();
}
/** Test rollback(). */
@Test public void testRollback() {
Objectify objectify = mock(Objectify.class, Mockito.RETURNS_DEEP_STUBS);
ObjectifyProxy proxy = null;
try {
proxy = new ObjectifyProxy(objectify, false);
proxy.rollback();
fail("Expected DaoException");
} catch (DaoException e) { }
proxy = new ObjectifyProxy(objectify, true);
when(objectify.getTxn().isActive()).thenReturn(false);
proxy.rollback();
verify(objectify.getTxn(), times(0)).rollback();
when(objectify.getTxn().isActive()).thenReturn(true);
proxy.rollback();
verify(objectify.getTxn()).rollback();
}
}
| [
"pronovic@ieee.org"
] | pronovic@ieee.org |
102d34a0c0f6138a5a5c29e96972e073382fcf6e | 3b3bf17b4ce6f617807a22e583a96e4983ee3ab6 | /src/main/java/com/baidu/android/common/util/CommonParam.java | f1543f23566bca2706519b35a00b9e37b84dac93 | [
"Apache-2.0"
] | permissive | TaintBench/cajino_baidu | f00851c8634558e9b7e677638f3cfe9d366b2ca8 | fbafeadb2d826bfd58476040438c6b9761b724b6 | refs/heads/master | 2021-07-21T03:06:09.299185 | 2021-07-16T11:37:46 | 2021-07-16T11:37:46 | 234,355,307 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 670 | java | package com.baidu.android.common.util;
import android.content.Context;
import android.text.TextUtils;
public class CommonParam {
private static final boolean DEBUG = false;
private static final String TAG = CommonParam.class.getSimpleName();
public static String getCUID(Context context) {
String deviceId = getDeviceId(context);
String imei = DeviceId.getIMEI(context);
if (TextUtils.isEmpty(imei)) {
imei = "0";
}
return deviceId + "|" + new StringBuffer(imei).reverse().toString();
}
private static String getDeviceId(Context context) {
return DeviceId.getDeviceID(context);
}
}
| [
"malwareanalyst1@gmail.com"
] | malwareanalyst1@gmail.com |
5d4a8c02630f419c4accd86f7e8552e98ed09dd0 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/20/20_ffd859ce1ac1709aa40cdfef389ea01e98fbf2ab/ToastProgressListener/20_ffd859ce1ac1709aa40cdfef389ea01e98fbf2ab_ToastProgressListener_s.java | 0cd3c6a6ac5e15cae951b50e386f8596f1ed5d91 | [] | 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 | 720 | java | /**
*
*/
package com.hardincoding.sonar.util;
import android.content.Context;
import android.widget.Toast;
/**
* @author Kurt Hardin
*
*/
public class ToastProgressListener implements ProgressListener {
private final Context mContext;
private int mToastLength = Toast.LENGTH_SHORT;
public ToastProgressListener(final Context context) {
mContext = context;
}
public void setToastLength(final int toastLength) {
mToastLength = toastLength;
}
@Override
public void updateProgress(String message) {
Toast.makeText(mContext, message, mToastLength).show();
}
@Override
public void updateProgress(int messageId) {
// TODO Show toast message for messageId
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
d0a1b621429b2f8e30ec461a7cbc20eaf027ede6 | e509d7b35dcee8303b2910648162252071d8c62e | /src/main/java/com/linxu/algorithm/bydate/date190924/DeleteLinkedListNode.java | 0dcbf719d8027116fddccb675a737025855da29a | [] | no_license | linux5396/algorithm | 0b722123cf7fcccd76d73443d66b0c72e300580c | 604c1b3d2b328bd3417f72427fd90fff2f9b495d | refs/heads/master | 2020-07-27T12:58:11.707117 | 2020-05-15T10:08:30 | 2020-05-15T10:08:30 | 209,096,687 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,266 | java | package com.linxu.algorithm.bydate.date190924;
import com.linxu.algorithm.data_struct.SingleList;
/**
* @author linxu
* @date 2019/9/24
* <tip>take care of yourself.everything is no in vain.</tip>
* 问题:
* 给定一个单向链表的头指针和一个节点的指针,定义一个函数在O(1)时间内删除该节点
*/
public class DeleteLinkedListNode {
public static void delete(SingleList.Node node, SingleList list) {
if (list != null && node != null) {
//只有一个节点
if (node == list.getHead() && node.getNext() == null) {
node = null;
return;
}
//尾节点,必须遍历之后才能够释放。
//TODO
if (node.getNext() == null) {
SingleList.Node cur = list.getHead();
while (cur.getNext() != node) {
cur = cur.getNext();
}
cur.setNext(null);
} else {
//直接把NODE替换成它的下一个的内容即可。
node.setValue(node.getNext().getValue());
node.setNext(node.getNext().getNext());
}
}
}
public static void main(String[] args) {
}
}
| [
"929159338@qq.com"
] | 929159338@qq.com |
074e4e7e9fc5ff0465fa27820e83449f48207dfb | 0e4a7d38a8ec2fc11db9f95aebd270406db2f1d8 | /lotr/common/entity/npc/LOTREntityGondorBaker.java | d3583d770055578d8fb2e07a69c6028604be6ef9 | [] | no_license | KyberJeffHason/FA-help | fe07812a24b3295e8ca21ab2cbe948dd54e650fe | 0f0775a429fa1751fe699d8a7072f92e83dca101 | refs/heads/main | 2022-07-29T20:25:24.836228 | 2021-04-28T19:53:52 | 2021-04-28T19:53:52 | 356,083,269 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 892 | java | package lotr.common.entity.npc;
import lotr.common.LOTRMod;
import net.minecraft.entity.IEntityLivingData;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
public class LOTREntityGondorBaker extends LOTREntityGondorMarketTrader {
public LOTREntityGondorBaker(World world) {
super(world);
}
@Override
public LOTRTradeEntries getBuyPool() {
return LOTRTradeEntries.GONDOR_BAKER_BUY;
}
@Override
public LOTRTradeEntries getSellPool() {
return LOTRTradeEntries.GONDOR_BAKER_SELL;
}
@Override
public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) {
data = super.onSpawnWithEgg(data);
this.npcItemsInv.setMeleeWeapon(new ItemStack(LOTRMod.rollingPin));
this.npcItemsInv.setIdleItem(new ItemStack(Items.bread));
return data;
}
}
| [
"67012500+KyberJeffHason@users.noreply.github.com"
] | 67012500+KyberJeffHason@users.noreply.github.com |
1b684dc9a896200396c7edf12a779987a829cee1 | 2eb5604c0ba311a9a6910576474c747e9ad86313 | /chado-pg-orm/src/org/irri/iric/chado/so/BacterialRnapolPromoterSigma54Home.java | e0938020e7e66eda52b19bce00559b913a304d15 | [] | no_license | iric-irri/portal | 5385c6a4e4fd3e569f5334e541d4b852edc46bc1 | b2d3cd64be8d9d80b52d21566f329eeae46d9749 | refs/heads/master | 2021-01-16T00:28:30.272064 | 2014-05-26T05:46:30 | 2014-05-26T05:46:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,057 | java | package org.irri.iric.chado.so;
// Generated 05 26, 14 1:32:32 PM by Hibernate Tools 3.4.0.CR1
import java.util.List;
import javax.naming.InitialContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.LockMode;
import org.hibernate.SessionFactory;
import org.hibernate.criterion.Example;
/**
* Home object for domain model class BacterialRnapolPromoterSigma54.
* @see org.irri.iric.chado.so.BacterialRnapolPromoterSigma54
* @author Hibernate Tools
*/
public class BacterialRnapolPromoterSigma54Home {
private static final Log log = LogFactory
.getLog(BacterialRnapolPromoterSigma54Home.class);
private final SessionFactory sessionFactory = getSessionFactory();
protected SessionFactory getSessionFactory() {
try {
return (SessionFactory) new InitialContext()
.lookup("SessionFactory");
} catch (Exception e) {
log.error("Could not locate SessionFactory in JNDI", e);
throw new IllegalStateException(
"Could not locate SessionFactory in JNDI");
}
}
public void persist(BacterialRnapolPromoterSigma54 transientInstance) {
log.debug("persisting BacterialRnapolPromoterSigma54 instance");
try {
sessionFactory.getCurrentSession().persist(transientInstance);
log.debug("persist successful");
} catch (RuntimeException re) {
log.error("persist failed", re);
throw re;
}
}
public void attachDirty(BacterialRnapolPromoterSigma54 instance) {
log.debug("attaching dirty BacterialRnapolPromoterSigma54 instance");
try {
sessionFactory.getCurrentSession().saveOrUpdate(instance);
log.debug("attach successful");
} catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void attachClean(BacterialRnapolPromoterSigma54 instance) {
log.debug("attaching clean BacterialRnapolPromoterSigma54 instance");
try {
sessionFactory.getCurrentSession().lock(instance, LockMode.NONE);
log.debug("attach successful");
} catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void delete(BacterialRnapolPromoterSigma54 persistentInstance) {
log.debug("deleting BacterialRnapolPromoterSigma54 instance");
try {
sessionFactory.getCurrentSession().delete(persistentInstance);
log.debug("delete successful");
} catch (RuntimeException re) {
log.error("delete failed", re);
throw re;
}
}
public BacterialRnapolPromoterSigma54 merge(
BacterialRnapolPromoterSigma54 detachedInstance) {
log.debug("merging BacterialRnapolPromoterSigma54 instance");
try {
BacterialRnapolPromoterSigma54 result = (BacterialRnapolPromoterSigma54) sessionFactory
.getCurrentSession().merge(detachedInstance);
log.debug("merge successful");
return result;
} catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}
public BacterialRnapolPromoterSigma54 findById(
org.irri.iric.chado.so.BacterialRnapolPromoterSigma54Id id) {
log.debug("getting BacterialRnapolPromoterSigma54 instance with id: "
+ id);
try {
BacterialRnapolPromoterSigma54 instance = (BacterialRnapolPromoterSigma54) sessionFactory
.getCurrentSession()
.get("org.irri.iric.chado.so.BacterialRnapolPromoterSigma54",
id);
if (instance == null) {
log.debug("get successful, no instance found");
} else {
log.debug("get successful, instance found");
}
return instance;
} catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
}
public List findByExample(BacterialRnapolPromoterSigma54 instance) {
log.debug("finding BacterialRnapolPromoterSigma54 instance by example");
try {
List results = sessionFactory
.getCurrentSession()
.createCriteria(
"org.irri.iric.chado.so.BacterialRnapolPromoterSigma54")
.add(Example.create(instance)).list();
log.debug("find by example successful, result size: "
+ results.size());
return results;
} catch (RuntimeException re) {
log.error("find by example failed", re);
throw re;
}
}
}
| [
"locem@berting-debian.ourwebserver.no-ip.biz"
] | locem@berting-debian.ourwebserver.no-ip.biz |
4ce8f9d50c8e832db1b711145e11f7a6eeccfc53 | 09a2c65b4bb4b8bfb1590d395aa2cc93dbbe5d56 | /CortexSE/jpf-symbc/src/tests/gov/nasa/jpf/symbc/TestIntStatic1.java | 499844984789f9268a133db84a12c9077dbf9b11 | [] | no_license | nunomachado/cortex-tool | 0399e0f40c5eeb21cdaa55e061e687884b347518 | 96cb758d3f0ab9f06ef3b924020fdc8c0ca9516a | refs/heads/master | 2021-05-23T02:49:10.154302 | 2020-12-27T11:59:16 | 2020-12-27T11:59:16 | 49,576,792 | 9 | 5 | null | null | null | null | UTF-8 | Java | false | false | 645 | java | package gov.nasa.jpf.symbc;
import org.junit.Test;
public class TestIntStatic1 extends IntTest {
private static final String SYM_METHOD = "+symbolic.method=gov.nasa.jpf.symbc.TestIntStatic1.testIntInvokeStatic(sym#sym)";
private static final String[] JPF_ARGS = {INSN_FACTORY, SYM_METHOD};
public static void main(String[] args) {
runTestsOfThisClass(args);
}
@Test
public void mainTest() {
if (verifyNoPropertyViolation(JPF_ARGS)) {
testIntInvokeStatic(11, 21);
}
}
//forces calls to INVOKESTATIC
public static void testIntInvokeStatic(int x, int y) {
testInt(x, y);
}
}
| [
"nuno.machado@ist.utl.pt"
] | nuno.machado@ist.utl.pt |
2078755b09467913b058dfb7052338667ae3c4f9 | 9dfbbf5a335da4fede138fb839f705287c36cd6e | /fmis-generator/src/main/java/com/fmis/generator/service/IGenTableColumnService.java | 840b81d3a495932dd13f7c72e452e6024763dee9 | [
"MIT"
] | permissive | TaoWang4446/fmis | e1d91673be73b22cd17b9c23d8469d743edc35c5 | 25ac5cc85926e654e7802766d0c707b0fba649c7 | refs/heads/master | 2023-01-10T03:56:34.263648 | 2020-11-10T05:10:47 | 2020-11-10T05:10:47 | 311,552,080 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 973 | java | package com.fmis.generator.service;
import java.util.List;
import com.fmis.generator.domain.GenTableColumn;
/**
* 业务字段 服务层
*
* @author fmis
*/
public interface IGenTableColumnService
{
/**
* 查询业务字段列表
*
* @param tableId 业务字段编号
* @return 业务字段集合
*/
public List<GenTableColumn> selectGenTableColumnListByTableId(Long tableId);
/**
* 新增业务字段
*
* @param genTableColumn 业务字段信息
* @return 结果
*/
public int insertGenTableColumn(GenTableColumn genTableColumn);
/**
* 修改业务字段
*
* @param genTableColumn 业务字段信息
* @return 结果
*/
public int updateGenTableColumn(GenTableColumn genTableColumn);
/**
* 删除业务字段信息
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteGenTableColumnByIds(String ids);
}
| [
"2825586682@qq.com"
] | 2825586682@qq.com |
ad2b2ada7cdd782414d5e3c43d1b3d8f81dd1e6c | 0e7f18f5c03553dac7edfb02945e4083a90cd854 | /target/classes/jooqgen/.../src/main/java/com/br/sp/posgresdocker/model/jooq/pg_catalog/routines/GinExtractJsonbQueryPath.java | 09a0b3c1a96fd89950af1fe09f9f7b5da075e1e5 | [] | no_license | brunomathidios/PostgresqlWithDocker | 13604ecb5506b947a994cbb376407ab67ba7985f | 6b421c5f487f381eb79007fa8ec53da32977bed1 | refs/heads/master | 2020-03-22T00:54:07.750044 | 2018-07-02T22:20:17 | 2018-07-02T22:20:17 | 139,271,591 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | true | 7,263 | java | /*
* This file is generated by jOOQ.
*/
package com.br.sp.posgresdocker.model.jooq.pg_catalog.routines;
import com.br.sp.posgresdocker.model.jooq.pg_catalog.PgCatalog;
import javax.annotation.Generated;
import org.jooq.Field;
import org.jooq.Parameter;
import org.jooq.impl.AbstractRoutine;
/**
* @deprecated Unknown data type. Please define an explicit {@link org.jooq.Binding} to specify how this type should be handled. Deprecation can be turned off using <deprecationOnUnknownTypes/> in your code generator configuration.
*/
@java.lang.Deprecated
@Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.11.2"
},
comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class GinExtractJsonbQueryPath extends AbstractRoutine<Object> {
private static final long serialVersionUID = -1999901892;
/**
* @deprecated Unknown data type. Please define an explicit {@link org.jooq.Binding} to specify how this type should be handled. Deprecation can be turned off using <deprecationOnUnknownTypes/> in your code generator configuration.
*/
@java.lang.Deprecated
public static final Parameter<Object> RETURN_VALUE = createParameter("RETURN_VALUE", org.jooq.impl.DefaultDataType.getDefaultDataType("\"pg_catalog\".\"internal\""), false, false);
/**
* @deprecated Unknown data type. Please define an explicit {@link org.jooq.Binding} to specify how this type should be handled. Deprecation can be turned off using <deprecationOnUnknownTypes/> in your code generator configuration.
*/
@java.lang.Deprecated
public static final Parameter<Object> _1 = createParameter("_1", org.jooq.impl.DefaultDataType.getDefaultDataType("\"pg_catalog\".\"jsonb\""), false, true);
/**
* @deprecated Unknown data type. Please define an explicit {@link org.jooq.Binding} to specify how this type should be handled. Deprecation can be turned off using <deprecationOnUnknownTypes/> in your code generator configuration.
*/
@java.lang.Deprecated
public static final Parameter<Object> _2 = createParameter("_2", org.jooq.impl.DefaultDataType.getDefaultDataType("\"pg_catalog\".\"internal\""), false, true);
/**
* The parameter <code>pg_catalog.gin_extract_jsonb_query_path._3</code>.
*/
public static final Parameter<Short> _3 = createParameter("_3", org.jooq.impl.SQLDataType.SMALLINT, false, true);
/**
* @deprecated Unknown data type. Please define an explicit {@link org.jooq.Binding} to specify how this type should be handled. Deprecation can be turned off using <deprecationOnUnknownTypes/> in your code generator configuration.
*/
@java.lang.Deprecated
public static final Parameter<Object> _4 = createParameter("_4", org.jooq.impl.DefaultDataType.getDefaultDataType("\"pg_catalog\".\"internal\""), false, true);
/**
* @deprecated Unknown data type. Please define an explicit {@link org.jooq.Binding} to specify how this type should be handled. Deprecation can be turned off using <deprecationOnUnknownTypes/> in your code generator configuration.
*/
@java.lang.Deprecated
public static final Parameter<Object> _5 = createParameter("_5", org.jooq.impl.DefaultDataType.getDefaultDataType("\"pg_catalog\".\"internal\""), false, true);
/**
* @deprecated Unknown data type. Please define an explicit {@link org.jooq.Binding} to specify how this type should be handled. Deprecation can be turned off using <deprecationOnUnknownTypes/> in your code generator configuration.
*/
@java.lang.Deprecated
public static final Parameter<Object> _6 = createParameter("_6", org.jooq.impl.DefaultDataType.getDefaultDataType("\"pg_catalog\".\"internal\""), false, true);
/**
* @deprecated Unknown data type. Please define an explicit {@link org.jooq.Binding} to specify how this type should be handled. Deprecation can be turned off using <deprecationOnUnknownTypes/> in your code generator configuration.
*/
@java.lang.Deprecated
public static final Parameter<Object> _7 = createParameter("_7", org.jooq.impl.DefaultDataType.getDefaultDataType("\"pg_catalog\".\"internal\""), false, true);
/**
* Create a new routine call instance
*/
public GinExtractJsonbQueryPath() {
super("gin_extract_jsonb_query_path", PgCatalog.PG_CATALOG, org.jooq.impl.DefaultDataType.getDefaultDataType("\"pg_catalog\".\"internal\""));
setReturnParameter(RETURN_VALUE);
addInParameter(_1);
addInParameter(_2);
addInParameter(_3);
addInParameter(_4);
addInParameter(_5);
addInParameter(_6);
addInParameter(_7);
}
/**
* Set the <code>_1</code> parameter IN value to the routine
*/
public void set__1(Object value) {
setValue(_1, value);
}
/**
* Set the <code>_1</code> parameter to the function to be used with a {@link org.jooq.Select} statement
*/
public void set__1(Field<Object> field) {
setField(_1, field);
}
/**
* Set the <code>_2</code> parameter IN value to the routine
*/
public void set__2(Object value) {
setValue(_2, value);
}
/**
* Set the <code>_2</code> parameter to the function to be used with a {@link org.jooq.Select} statement
*/
public void set__2(Field<Object> field) {
setField(_2, field);
}
/**
* Set the <code>_3</code> parameter IN value to the routine
*/
public void set__3(Short value) {
setValue(_3, value);
}
/**
* Set the <code>_3</code> parameter to the function to be used with a {@link org.jooq.Select} statement
*/
public void set__3(Field<Short> field) {
setField(_3, field);
}
/**
* Set the <code>_4</code> parameter IN value to the routine
*/
public void set__4(Object value) {
setValue(_4, value);
}
/**
* Set the <code>_4</code> parameter to the function to be used with a {@link org.jooq.Select} statement
*/
public void set__4(Field<Object> field) {
setField(_4, field);
}
/**
* Set the <code>_5</code> parameter IN value to the routine
*/
public void set__5(Object value) {
setValue(_5, value);
}
/**
* Set the <code>_5</code> parameter to the function to be used with a {@link org.jooq.Select} statement
*/
public void set__5(Field<Object> field) {
setField(_5, field);
}
/**
* Set the <code>_6</code> parameter IN value to the routine
*/
public void set__6(Object value) {
setValue(_6, value);
}
/**
* Set the <code>_6</code> parameter to the function to be used with a {@link org.jooq.Select} statement
*/
public void set__6(Field<Object> field) {
setField(_6, field);
}
/**
* Set the <code>_7</code> parameter IN value to the routine
*/
public void set__7(Object value) {
setValue(_7, value);
}
/**
* Set the <code>_7</code> parameter to the function to be used with a {@link org.jooq.Select} statement
*/
public void set__7(Field<Object> field) {
setField(_7, field);
}
}
| [
"brunomathidios@yahoo.com.br"
] | brunomathidios@yahoo.com.br |
6e9ddb61cb5209731630c161e593352927f95a21 | 37515a0a63e3e6e62ba5104567201d2f14360f13 | /edu.fudan.langlab.uidl.extensions/src-gen/com/lanmon/business/client/customer/RegionCodeProviderService.java | 7bfe70910066f8566c1f223abe88b7240b5e2bdd | [] | no_license | rockguo2015/newmed | 9d95e161ba7cb9c59b24c4fb0bec2eb328214831 | b4818912e5bbc6e0147d47e8ba475c0ac5c80c2e | refs/heads/master | 2021-01-10T05:16:25.491087 | 2015-05-29T10:03:23 | 2015-05-29T10:03:23 | 36,384,873 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 476 | java | package com.lanmon.business.client.customer;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.uniquesoft.gwt.shared.GWTNamedEntity;
import java.util.Collection;
@RemoteServiceRelativePath("service/com.lanmon.business.client.customer.RegionCodeProviderService")
public interface RegionCodeProviderService extends RemoteService {
public abstract Collection<GWTNamedEntity> load();
}
| [
"rock.guo@me.com"
] | rock.guo@me.com |
b50c807c68ce26e594524d58832b0ca98ed0c3a5 | 02484ac62204a97521c8789b711217bae3bdabc1 | /rapidoid-watch/src/test/java/org/rapidoid/io/watch/MultiWatchTest.java | 873cca71c02d2b7887d4b7b62e721ef3e7d6c59c | [
"Apache-2.0",
"LicenseRef-scancode-proprietary-license"
] | permissive | lobotrock/rapidoid | fed636a79f1ee57255d2c8c420be1e263759c059 | cb1008f254cce22d8125562e1bda6b9473e5e309 | refs/heads/master | 2020-03-11T04:31:28.830631 | 2018-04-18T12:35:44 | 2018-04-18T12:35:44 | 129,778,334 | 0 | 0 | Apache-2.0 | 2018-04-16T17:07:21 | 2018-04-16T17:07:21 | null | UTF-8 | Java | false | false | 1,861 | java | /*-
* #%L
* rapidoid-watch
* %%
* Copyright (C) 2014 - 2018 Nikolche Mihajlovski and contributors
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
package org.rapidoid.io.watch;
import org.junit.Test;
import org.rapidoid.annotation.Authors;
import org.rapidoid.annotation.Since;
import org.rapidoid.collection.Coll;
import org.rapidoid.io.IO;
import org.rapidoid.test.TestCommons;
import org.rapidoid.test.TestIO;
import org.rapidoid.u.U;
import org.rapidoid.util.Msc;
import java.util.Set;
@Authors("Nikolche Mihajlovski")
@Since("5.3.0")
public class MultiWatchTest extends TestCommons {
@Test(timeout = 60000)
public void shouldSupportMultipleWatchCalls() {
String dir = TestIO.createTempDir("watch-service-test");
if (!TestCommons.RAPIDOID_CI) {
for (int i = 0; i < 10; i++) {
exerciseMultiWatch(dir);
}
}
}
public void exerciseMultiWatch(String dir) {
final Set<Integer> seen = Coll.synchronizedSet();
int total = 50;
for (int i = 0; i < total; i++) {
final int seenBy = i;
Msc.watchForChanges(dir, filename -> seen.add(seenBy)
);
}
giveItTimeToRefresh();
IO.save(Msc.path(dir, "a.txt"), "ABC-" + U.time());
while (seen.size() < total) {
U.sleep(200);
}
eq(seen.size(), total);
Watch.cancelAll();
}
private void giveItTimeToRefresh() {
U.sleep(3000);
}
}
| [
"nikolce.mihajlovski@gmail.com"
] | nikolce.mihajlovski@gmail.com |
02891081f3719ad53580d65e7d52d9088d783417 | 6dbae30c806f661bcdcbc5f5f6a366ad702b1eea | /Corpus/eclipse.jdt.ui/4802.java | 5938b24ccc4d449bc9f4f1a7d417cfe27ddbfbfb | [
"MIT"
] | permissive | SurfGitHub/BLIZZARD-Replication-Package-ESEC-FSE2018 | d3fd21745dfddb2979e8ac262588cfdfe471899f | 0f8f4affd0ce1ecaa8ff8f487426f8edd6ad02c0 | refs/heads/master | 2020-03-31T15:52:01.005505 | 2018-10-01T23:38:50 | 2018-10-01T23:38:50 | 152,354,327 | 1 | 0 | MIT | 2018-10-10T02:57:02 | 2018-10-10T02:57:02 | null | UTF-8 | Java | false | false | 924 | java | class B {
/**
* org.eclipse.TestTestPattern
* (org.eclipse.TestPattern)
* borg.eclipse.TestPattern
*/
void f() {
}
/*
* org.eclipse.TestTestPattern
* borg.eclipse.TestTestPattern
* rg.eclipse.TestTestPattern
* <org.eclipse.TestTestPattern>
* <org.eclipse.TestPatternTest>
*
* org.eclipse. TestPattern
* org.eclipse .TestPattern
* x.TestPattern
*/
void f1() {
//borg.TestPattern //borg.eclipse.TestPattern
f1();
//org.eclipse.TestTestPattern
String g = "ork.TestPattern";
String g2 = "org.eklipse.TestPattern";
String g3 = "org.eclipse.TestPatternMatching";
}
/*
* #org.eclipse.TestPattern
* org.eclipse.TestPattern#
*
* $org.eclipse.TestPattern
* org.eclipse.TestPattern$
*
* 1org.eclipse.TestPattern
* org.eclipse.TestPattern1
*
* *org.eclipse.TestPattern
* org.eclipse.TestPattern*
*/
}
| [
"masudcseku@gmail.com"
] | masudcseku@gmail.com |
37fbc2cdaf3e67e59d6ab448898840ae3988e968 | e76364e90190ec020feddc730c78192b32fe88c1 | /neo4j/test/src/test/java/com/buschmais/xo/neo4j/test/issues/not_a_proxy/NotAProxyIT.java | 1a61c264fd2babbb2ad26e5fd0263050d8ebfa26 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | buschmais/extended-objects | 2a8411d81469439a034c11116e34ae799eb57e97 | 0b91a5d55c9a76adba28ddccd6caba699eeaa1fc | refs/heads/master | 2023-08-16T13:33:54.936349 | 2023-06-10T13:44:10 | 2023-06-10T13:44:10 | 14,117,014 | 15 | 5 | Apache-2.0 | 2022-11-02T09:44:17 | 2013-11-04T16:45:59 | Java | UTF-8 | Java | false | false | 1,431 | java | package com.buschmais.xo.neo4j.test.issues.not_a_proxy;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
import java.util.Collection;
import com.buschmais.xo.api.XOManager;
import com.buschmais.xo.api.bootstrap.XOUnit;
import com.buschmais.xo.neo4j.test.AbstractNeo4JXOManagerIT;
import com.buschmais.xo.neo4j.test.issues.not_a_proxy.composite.A;
import com.buschmais.xo.neo4j.test.issues.not_a_proxy.composite.B;
import com.buschmais.xo.neo4j.test.issues.not_a_proxy.composite.C;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
/**
* https://github.com/buschmais/cdo-neo4j/issues/57
*/
@RunWith(Parameterized.class)
public class NotAProxyIT extends AbstractNeo4JXOManagerIT {
public NotAProxyIT(XOUnit xoUnit) {
super(xoUnit);
}
@Parameterized.Parameters
public static Collection<Object[]> getXOUnits() {
return xoUnits(A.class, B.class, C.class);
}
@Test
public void test() {
XOManager xoManager = getXOManager();
xoManager.currentTransaction().begin();
A a = xoManager.create(A.class);
C c = xoManager.create(C.class);
a.getB().add(c);
xoManager.currentTransaction().commit();
xoManager.currentTransaction().begin();
assertThat(a.equals(a.getB()), is(false));
xoManager.currentTransaction().commit();
}
}
| [
"dirk.mahler@buschmais.com"
] | dirk.mahler@buschmais.com |
29fe5db6fe1356e45c2104a6d79e62b9598ef35b | 650af9043f3b3cb250a1cfddcb4d7f10e0d86353 | /rmbin-common/src/main/java/com/rmbin/common/utils/json/JsonService.java | f855f8d52d05ed8081aafa8cd5eecb01ecdbf61a | [] | no_license | hexilei/SpringBootDemo | 9ce7ed52cf6bfd2f9882d35ca6acdfd8ab6f82ba | 9ad5bc1600e6893a707eddffde9acdda0e01454d | refs/heads/master | 2021-05-14T11:03:48.218896 | 2018-03-06T10:50:17 | 2018-03-06T10:50:17 | 116,369,288 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 299 | java | package com.rmbin.common.utils.json;
import java.util.List;
public interface JsonService {
public <T> String toJson(T t) throws Exception;
public <T> T toModel(String json, Class<T> clazz) throws Exception;
public <T> List<T> toModelList(String json, Class<T> clazz) throws Exception;
}
| [
"louis.he@missionsky.com"
] | louis.he@missionsky.com |
3593a834f1acdd3e5661ef63e9c4c24dc1ab7463 | 37c6e302daa091c362eb04c6336738f49b318945 | /taotao-common/src/main/java/com/taotao/api/vo/ResultCode.java | deb16715b6180bc8f1fbdb43ff9ac5f783696da2 | [] | no_license | dlailai/taotao-new | d79ff8f011662621a7ad7013abe1692a2dba498d | ec53f50a867471ffe19c815d39eb6bc48fec67c4 | refs/heads/master | 2021-07-05T14:14:59.447551 | 2017-09-27T01:11:08 | 2017-09-27T01:11:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,591 | java | package com.taotao.api.vo;
import org.apache.commons.lang.StringUtils;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.lang.StringUtils;
public class ResultCode<T> implements Serializable{
public static final String CODE_SUCCESS = "0000";
public static final String CODE_UNKNOWN_ERROR = "9999";
public static final String CODE_DATA_ERROR = "4005";
private static final long serialVersionUID = 4418416282894231647L;
private String errcode;
private String msg;
private T retval;
private boolean success = false;
private Throwable exception;
protected ResultCode(String code, String msg, T retval){
this.errcode = code;
this.msg = msg;
this.retval = retval;
this.success = StringUtils.equals(code, CODE_SUCCESS);
}
public static ResultCode SUCCESS = new ResultCode(CODE_SUCCESS, "操作成功!", null);
@Override
public boolean equals(Object another){
if(another == null || !(another instanceof ResultCode)) return false;
return this.errcode== ((ResultCode)another).errcode;
}
public boolean isSuccess(){
return success;
}
public static ResultCode getFailure(String msg){
return new ResultCode(CODE_UNKNOWN_ERROR, msg, null);
}
public static ResultCode getFailure(String code, String msg){
return new ResultCode(code, msg, null);
}
public static ResultCode getSuccess(String msg){
return new ResultCode(CODE_SUCCESS, msg, null);
}
public static <T> ResultCode<T> getSuccessReturn(T retval){
return new ResultCode(CODE_SUCCESS, null, retval);
}
public static ResultCode getSuccessMap(){
return new ResultCode(CODE_SUCCESS, null, new HashMap());
}
public static <T> ResultCode getFailureReturn(T retval){
return new ResultCode(CODE_UNKNOWN_ERROR, null, retval);
}
public static <T> ResultCode getFailureReturn(T retval, String msg){
return new ResultCode(CODE_UNKNOWN_ERROR, msg, retval);
}
public static ResultCode getFullErrorCode(String code, String msg, Object retval){
return new ResultCode(code, msg, retval);
}
public T getRetval() {
return retval;
}
public String getMsg() {
return msg;
}
public void put(Object key, Object value){
((Map)retval).put(key, value);
}
public String getErrcode() {
return errcode;
}
public Throwable getException() {
return exception;
}
/**
* dubbo接口服务端请不要设置此异常!只作为客户端封装使用
* @param exception
*/
public void setException(Throwable exception) {
this.exception = exception;
}
}
| [
"xieshengrong@live.com"
] | xieshengrong@live.com |
088cbda7b60a51bb0598c569983cf5a1ae2b970c | e9664119586e3218921a5d3062037635c28f6534 | /MPP/20170909_lesson6/lesson6/lecture/javafx/fxmlexample/FXMLExample1.java | 52a5b20cf6546630e9a29f17cba142e63f87474d | [] | no_license | yangquan1982/MSCS | 5818ff1d2b5ea2159ecf74f29f800dfac389846f | a90c86b64223587bb8dde92ba325423b934d459b | refs/heads/master | 2021-08-14T13:30:49.810867 | 2017-11-15T20:34:15 | 2017-11-15T20:34:15 | 109,010,825 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,364 | java | /*
* Copyright (c) 2011, 2012 Oracle and/or its affiliates.
* All rights reserved. Use is subject to license terms.
*
* This file is available and licensed under the following license:
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the distribution.
* - Neither the name of Oracle nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package lesson6.lecture.javafx.fxmlexample;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
public class FXMLExample1 extends Application {
@Override
public void start(Stage stage) throws Exception {
Parent root = FXMLLoader.load(getClass()
.getResource("fxml_example1.fxml"));
stage.setTitle("FXML Welcome");
stage.setScene(new Scene(root, 300, 275));
stage.show();
}
public static void main(String[] args) {
Application.launch(FXMLExample1.class, args);
}
}
| [
"tbg127@gmail.com"
] | tbg127@gmail.com |
bf708c4a6803f0d0dda2c1a378b7ed5bca828955 | e374114551fafad384e0150e55949de3e5eaed26 | /src/main/java/org/zaproxy/zap/view/ContextListTableModel.java | 4e291ea53e1628e58c91edb9369e4a5c201a3f2a | [] | no_license | nitram509/zaproxy-maven | 996ce80dc8718dc100c6f905d9e74d9191acaf3e | 19d021496122a224329d46076ba04454d5a18958 | refs/heads/master | 2021-07-06T06:57:15.120350 | 2020-09-15T19:38:37 | 2020-09-15T19:38:37 | 35,776,475 | 1 | 1 | null | 2021-06-04T01:17:22 | 2015-05-17T17:58:36 | HTML | UTF-8 | Java | false | false | 2,817 | java | /*
* Zed Attack Proxy (ZAP) and its related class files.
*
* ZAP is an HTTP/HTTPS proxy for assessing web application security.
*
* Copyright 2011 ZAP development team
*
* 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.zaproxy.zap.view;
import java.util.List;
import javax.swing.table.AbstractTableModel;
import org.parosproxy.paros.Constant;
public class ContextListTableModel extends AbstractTableModel {
private static final long serialVersionUID = 1L;
private static final String[] columnNames = {
Constant.messages.getString("context.list.table.index"),
Constant.messages.getString("context.list.table.name"),
Constant.messages.getString("context.list.table.inscope")};
private List<Object[]> values = null;
//private static Logger log = Logger.getLogger(ContextListTableModel.class);
/**
*
*/
public ContextListTableModel() {
super();
}
@Override
public int getColumnCount() {
return columnNames.length;
}
@Override
public int getRowCount() {
return values.size();
}
@Override
public Object getValueAt(int row, int col) {
Object[] value = this.values.get(row);
return value[col];
}
@Override
public boolean isCellEditable(int rowIndex, int columnIndex) {
switch (columnIndex) {
case 0: return false;
case 1: return false;
case 2: return false; // TODO ideally want to be able to change this here...
default: return false;
}
}
@Override
public void setValueAt(Object value, int row, int col) {
if (col == 2) {
this.values.get(row)[col] = value;
fireTableCellUpdated(row, col);
}
}
@Override
public String getColumnName(int col) {
return columnNames[col];
}
@Override
public Class<?> getColumnClass(int c) {
switch (c) {
case 0: return Integer.class;
case 1: return String.class;
case 2: return Boolean.class;
}
return null;
}
public List<Object[]> getValues() {
return values;
}
public void setValues(List<Object[]> values) {
this.values = values;
this.fireTableDataChanged();
}
public void addValues(Object[] values) {
this.values.add(values);
this.fireTableDataChanged();
}
}
| [
"maki@bitkings.de"
] | maki@bitkings.de |
18c29c538fac97fd4e7a21a709ed9d089ead63cf | 5456502f97627278cbd6e16d002d50f1de3da7bb | /chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/eventfilter/EdgeSwipeHandler.java | 02fabc381556fb704972d55705e8df6e24c3d9bf | [
"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 | 2,657 | java | // Copyright 2011 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.chrome.browser.compositor.layouts.eventfilter;
import org.chromium.chrome.browser.compositor.layouts.eventfilter.EdgeSwipeEventFilter.ScrollDirection;
/**
* Interface to implement to handle swipe from edge of the screen.
*/
public interface EdgeSwipeHandler {
/**
* Called when the swipe animation get initiated. It gives a chance to initialize everything.
* @param direction The direction the swipe is in.
* @param x The horizontal coordinate the swipe started at in dp.
* @param y The vertical coordinate the swipe started at in dp.
*/
public void swipeStarted(ScrollDirection direction, float x, float y);
/**
* Called each time the swipe gets a new event updating the swipe position.
* @param x The horizontal coordinate the swipe is currently at in dp.
* @param y The vertical coordinate the swipe is currently at in dp.
* @param dx The horizontal delta since the last update in dp.
* @param dy The vertical delta since the last update in dp.
* @param tx The horizontal difference between the start and the current position in dp.
* @param ty The vertical difference between the start and the current position in dp.
*/
public void swipeUpdated(float x, float y, float dx, float dy, float tx, float ty);
/**
* Called when the swipe ends; most likely on finger up event. It gives a chance to start
* an ending animation to exit the mode gracefully.
*/
public void swipeFinished();
/**
* Called when a fling happens while in a swipe.
* @param x The horizontal coordinate the swipe is currently at in dp.
* @param y The vertical coordinate the swipe is currently at in dp.
* @param tx The horizontal difference between the start and the current position in dp.
* @param ty The vertical difference between the start and the current position in dp.
* @param vx The horizontal velocity of the fling.
* @param vy The vertical velocity of the fling.
*/
public void swipeFlingOccurred(float x, float y, float tx, float ty, float vx, float vy);
/**
* Gives the handler a chance to determine whether or not this type of swipe is currently
* allowed.
* @param direction The direction of the swipe.
* @return Whether or not the swipe is allowed.
*/
public boolean isSwipeEnabled(ScrollDirection direction);
}
| [
"lixiaodonglove7@aliyun.com"
] | lixiaodonglove7@aliyun.com |
b4dfd18e9646bb079eb54187c692f6acfc3c7f8c | 160663a72233aecbb05714b0aa7d3984e3e44c20 | /L9T2_MeteoStatExercise_Handout/src/edu/tum/cs/pse/meteostat/guiced/ProductionModule.java | c852de0307212f33c9e3dcce99da83541e2f19a0 | [] | no_license | amitjoy/software-patterns | d92e192770d9ea914b8e382e1edb813d26f0849c | 5db3ef039738295116f6c28bf14058ce594bc805 | refs/heads/master | 2021-01-10T13:44:31.212972 | 2015-11-02T06:10:05 | 2015-11-02T06:10:05 | 45,375,350 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 481 | java | package edu.tum.cs.pse.meteostat.guiced;
import com.google.inject.Binder;
import com.google.inject.Module;
/**
* This production module defines the binding between interfaces and implementations.
*
*/
public class ProductionModule implements Module {
/**
* Configures the binding.
*/
public void configure(Binder binder) {
// Bind the GUI interface to the Swing implementation.
binder.bind(IMeteorologicalStationGUI.class).to(MeteorologicalStationGUI.class);
}
}
| [
"admin@amitinside.com"
] | admin@amitinside.com |
1362739529689136486f07f132ae94aad277b377 | b761ee9c0940728545884c7e5f46afcd06b928ff | /data-exchange-center-monitor/src/main/java/data/exchange/center/monitor/domain/service/ResourceSelectService.java | 78295f193ff989e7f6d1ef41f87d621265b3a8b2 | [] | no_license | fendaq/data-exchange-center | a55b04335966905b7a26e94bac344d2a4380d301 | 57c112d37c75ea40ac6c2465c6a7e9c5626f1be7 | refs/heads/master | 2020-06-22T16:21:12.555502 | 2018-11-08T08:49:08 | 2018-11-08T08:49:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,338 | java | package data.exchange.center.monitor.domain.service;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import data.exchange.center.monitor.domain.modle.Menu;
import data.exchange.center.monitor.domain.modle.Resource;
import data.exchange.center.monitor.domain.modle.SelectMenu;
import data.exchange.center.monitor.domain.modle.SelectResource;
import java.util.List;
import java.util.stream.Collectors;
/**
*
* Description:
* <p>Company: xinya </p>
* <p>Date:2017年7月26日 上午9:53:30</p>
* @author Wen.Yuguang
* @version 1.0
*
*/
@Service
public class ResourceSelectService {
/***
* 角色具备的资源与所有资源合并,合并结果是所有的资源中,角色具备的资源checked=true
*
* @param all
* @param part
* @return
*/
public List<SelectResource> mergeResource(List<Resource> all, List<Resource> part) {
if (CollectionUtils.isEmpty(all)) {
return null;
}
if (CollectionUtils.isEmpty(part)) {
return all.stream().map(role -> new SelectResource(role.gettId(), role.gettTitle(), false)).collect(Collectors.toList());
}
return all.stream().map(role -> {
if (part.contains(role)) {
return new SelectResource(role.gettId(), role.gettTitle(), true);
}
return new SelectResource(role.gettId(), role.gettTitle(), false);
}).collect(Collectors.toList());
}
/***
* 角色具备的菜单资源与所有菜单合并,合并结果是所有的菜单中,角色具备的菜单checked=true
*
* @param all
* @param part
* @return
*/
public List<SelectMenu> mergeMenus(List<Menu> all, List<Menu> part) {
if (CollectionUtils.isEmpty(all)) {
return null;
}
if (CollectionUtils.isEmpty(part)) {
return all.stream().map(role -> new SelectMenu(role.getId(), role.getLabel(), false)).collect(Collectors.toList());
}
return all.stream().map(role -> {
if (part.contains(role)) {
return new SelectMenu(role.getId(), role.getLabel(), true);
}
return new SelectMenu(role.getId(), role.getLabel(), false);
}).collect(Collectors.toList());
}
}
| [
"yuguang wen"
] | yuguang wen |
eb9180d3eb6e85f242b818bc40c3ee76eeac9d2d | e296a37677b199d58459972e46ab059306e259ac | /day6/src/com/demo/test/others/Test.java | ab02c70f2d4ce18c15444060f60e7249f241bdb4 | [] | no_license | sbtalk/hsbc-training | 4de3a45ad1405912bedbce62b9ee6c364bfe7540 | f4f6ee5a1c5e92a0e946a0c75332bc49cdcb3187 | refs/heads/master | 2022-12-31T14:01:10.866507 | 2020-10-19T12:16:21 | 2020-10-19T12:16:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 359 | java | package com.demo.test.others;
public class Test {
class Inner1 {
public void display() {
System.out.println("from display()");
}
}
static class Inner2 {
public void fun() {
System.out.println("from fun()");
}
public static void main(String[] args) {
}
}
interface Fun {
public void fun();
}
} | [
"sbtalk@gmail.com"
] | sbtalk@gmail.com |
ba70315529aee8d50f302964b94a72edfdf7c21a | 52d52f4787c31c5ec9c0789779ac7457cad768e9 | /Arif-GCCS-Maven-20200823T183952Z-001/Arif-GCCS-Maven/CashControlEJBX/.svn/pristine/60/6024777d9d783fda7b1c915303ab6b3217ad6f22.svn-base | bae5c20b1cb3c31d8f535388ee3cef3d50df0cdd | [] | no_license | mohanb147/sample_project | c5ce0eccd75f6d1e955b0159ec570a922709dd0d | e7420d89ebd15c8eb59fb0e0fa7fb02abd98a42c | refs/heads/master | 2022-12-05T10:01:50.599928 | 2020-08-24T10:15:04 | 2020-08-24T10:15:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,299 | /**
* @(#)CreditCardPaymentLocalHome.java Tue Aug 02 15:38:50 VET 2005
*
* FedEx
* Cash Control
*
* FedEx
* Santiago, Chile
*
* Copyright (c) 2001 FedEx, All rights reserved.
*
* This software is the confidential and proprietary information
* of FedEx. ("Confidential Information").
*
* Visit our website at http://www.fedex.com for more information
*
* This bean map to the credit_card_payment table
*
* @author Cristian C?enas
* @version 1.0
*/
package com.fedex.lacitd.cashcontrol.datatier.entities;
import com.fedex.lacitd.cashcontrol.datatier.common.*;
import java.util.*;
import javax.ejb.*;
public interface CreditCardPaymentLocalHome extends EJBLocalHome {
public CreditCardPaymentLocal findByPrimaryKey(java.lang.Integer primaryKey)
throws FinderException;
public java.util.Collection findAllCreditCardPayments()
throws FinderException;
public java.util.Collection findByEodId(java.lang.Integer eodId)
throws FinderException;
public CreditCardPaymentLocal create(double totalAmt, double totalReimbursed, String paymentType, String paymentDocNbr, String comments, int statusId, String locationCd, String employeeId, Date batchDt, String currencyCd, int depositSlipId, int eodId)
throws CreateException;
}
| [
"ankitoct1995@gmail.com"
] | ankitoct1995@gmail.com | |
28895f2eb5f91fe179f21acbe3a838affec88b86 | 24d8cf871b092b2d60fc85d5320e1bc761a7cbe2 | /GenealogyJ/rev5531-5561/left-branch-5561/genj/src/core/genj/search/Worker.java | 97aae1bbb90404ad734329935bbcc93d4eafa787 | [] | no_license | joliebig/featurehouse_fstmerge_examples | af1b963537839d13e834f829cf51f8ad5e6ffe76 | 1a99c1788f0eb9f1e5d8c2ced3892d00cd9449ad | refs/heads/master | 2016-09-05T10:24:50.974902 | 2013-03-28T16:28:47 | 2013-03-28T16:28:47 | 9,080,611 | 3 | 2 | null | null | null | null | UTF-8 | Java | false | false | 3,894 | java |
package genj.search;
import genj.gedcom.Entity;
import genj.gedcom.Gedcom;
import genj.gedcom.Property;
import genj.gedcom.TagPath;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.atomic.AtomicBoolean;
class Worker {
private final static int MAX_HITS = 255;
private WorkerListener listener;
private Gedcom gedcom;
private TagPath tagPath;
private Matcher matcher;
private Set<Entity> entities = new HashSet<Entity>();
private List<Hit> hits = new ArrayList<Hit>(MAX_HITS);
private int hitCount = 0;
private Thread thread;
private AtomicBoolean lock = new AtomicBoolean(false);
private long lastFlush;
Worker(WorkerListener listener) {
this.listener = listener;
thread = new Thread(new Runnable() {
public void run() {
work();
}
});
thread.setDaemon(true);
thread.start();
}
void stop() {
synchronized (lock) {
while (lock.get()) {
try {
lock.set(false);
thread.interrupt();
lock.wait();
} catch (Throwable t) {
}
}
}
}
void start(Gedcom gedcom, TagPath path, String value, boolean regexp) {
stop();
synchronized (lock) {
this.gedcom = gedcom;
this.matcher = getMatcher(value, regexp);
this.tagPath = null;
this.hits.clear();
this.entities.clear();
this.hitCount = 0;
lock.notify();
}
}
private void work() {
while (true) {
try {
synchronized (lock) {
lock.wait();
lock.set(true);
}
listener.started();
search(gedcom);
} catch (Throwable t) {
} finally {
listener.stopped();
lock.set(false);
synchronized (lock) {
lock.notifyAll();
}
}
}
}
private void search(Gedcom gedcom) {
for (int t=0; t<Gedcom.ENTITIES.length && hitCount<MAX_HITS; t++) {
for (Entity entity : gedcom.getEntities(Gedcom.ENTITIES[t]))
search(entity, entity, 0);
}
flush();
}
private void flush() {
if (!hits.isEmpty()) {
listener.more(Collections.unmodifiableList(hits));
hits.clear();
}
}
private void search(Entity entity, Property prop, int pathIndex) {
if (!lock.get())
return;
boolean searchThis = true;
if (tagPath!=null) {
if (pathIndex<tagPath.length()&&!tagPath.get(pathIndex).equals(prop.getTag()))
return;
searchThis = pathIndex>=tagPath.length()-1;
}
if (searchThis&&!prop.isTransient()) {
if (entity==prop)
search(entity, entity, entity.getId(), true);
search(entity, prop, prop.getDisplayValue(), false);
}
int n = prop.getNoOfProperties();
for (int i=0;i<n;i++) {
search(entity, prop.getProperty(i), pathIndex+1);
}
}
private void search(Entity entity, Property prop, String value, boolean isID) {
Matcher.Match[] matches = matcher.match(value);
if (matches.length==0)
return;
if (hitCount>=MAX_HITS)
return;
entities.add(entity);
Hit hit = new Hit(prop, value, matches, entities.size(), isID);
hits.add(hit);
hitCount++;
long now = System.currentTimeMillis();
if (now-lastFlush>500)
flush();
lastFlush = now;
}
private Matcher getMatcher(String pattern, boolean regex) {
Matcher result = regex ? (Matcher)new RegExMatcher() : (Matcher)new SimpleMatcher();
result.init(pattern);
return result;
}
}
| [
"joliebig@fim.uni-passau.de"
] | joliebig@fim.uni-passau.de |
8503fba0c1e1ab9020b8d1d6e7a43b4aaf57243a | 11269a6a5b1650274065795958dfe6c4a92afdd2 | /src/LAB11/cse111Lab03task10.java | 098e2cea3a5135ab1f77a54044349c20444240e6 | [] | no_license | Muhaiminur/PROBLEM-SOLVING-JAVA | 7834e096fa26d28ed7208bf5507628ebd8f3cdfd | 00e58a0543a69473e7c597d6c81e185bf145a8a8 | refs/heads/master | 2020-04-28T09:08:08.728479 | 2019-03-12T07:14:02 | 2019-03-12T07:14:02 | 175,155,427 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,007 | java | package LAB11;
/*10. Modify your solution of number 8. Take as many numbers within 0 to 9 as needed so that you can print 2 such number
* that appeared at least twice and less than 4 times.
e.g. Imagine the user entered 4,3,2,5,2,3,2,0,2,3 then the output is 3, 2.
*/
import java.util.Scanner;
public class cse111Lab03task10{
public static void main(String[]args){
Scanner abir=new Scanner(System.in);
int[]a=new int[10];
int count=0;
int c=0;
while(c>=0){
System.out.println("please enter a number between 0 to 9");
int x=abir.nextInt();
a[x]=a[x]+1;
int d=0;
while(d<a.length){
if(a[d]==2||a[d]==3){
count++;
break;
}
d++;
}
if(count==2)
break;
c++;
}
int[]b=new int[10];
int d=0;
while(d<a.length){
b[d]=d;
if(a[d]==2){
System.out.println(b[d]);
}else if(a[d]==3){
System.out.println(b[d]);
}else{
}
d++;
}
}
} | [
"muhaiminurabir@gmail.com"
] | muhaiminurabir@gmail.com |
ffa628ed48b2da81bf04ec191e2336b9f87cdc7b | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Lang/1/org/apache/commons/lang3/ObjectUtils_CONST_741.java | b8ed9db100ae4a719760f2375aefd5087c450d54 | [] | no_license | hvdthong/NetML | dca6cf4d34c5799b400d718e0a6cd2e0b167297d | 9bb103da21327912e5a29cbf9be9ff4d058731a5 | refs/heads/master | 2021-06-30T15:03:52.618255 | 2020-10-07T01:58:48 | 2020-10-07T01:58:48 | 150,383,588 | 1 | 1 | null | 2018-09-26T07:08:45 | 2018-09-26T07:08:44 | null | UTF-8 | Java | false | false | 1,263 | java |
org apach common lang3
oper code object
handl code input gracefulli
except gener thrown code input
method document behaviour detail
thread safe threadsaf
version
object util objectutil
method return provid unchang
prevent javac inlin constant
field
pre
magic byte object util objectutil const
pre
jar refer field
recompil field'
futur date
param
unchang
const
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
de4fc03b8bd752a5a54c724eaa5a33c017934d5a | 354ed8b713c775382b1e2c4d91706eeb1671398b | /spring-context/src/main/java/org/springframework/ejb/config/LocalStatelessSessionBeanDefinitionParser.java | 18de76d62e00dbc79f1ed6bf99930abcd1063902 | [] | no_license | JessenPan/spring-framework | 8c7cc66252c2c0e8517774d81a083664e1ad4369 | c0c588454a71f8245ec1d6c12f209f95d3d807ea | refs/heads/master | 2021-06-30T00:54:08.230154 | 2019-10-08T10:20:25 | 2019-10-08T10:20:25 | 91,221,166 | 2 | 0 | null | 2017-05-14T05:01:43 | 2017-05-14T05:01:42 | null | UTF-8 | Java | false | false | 1,311 | java | /*
* Copyright 2002-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.springframework.ejb.config;
import org.springframework.ejb.access.LocalStatelessSessionProxyFactoryBean;
import org.w3c.dom.Element;
/**
* {@link org.springframework.beans.factory.xml.BeanDefinitionParser}
* implementation for parsing '{@code local-slsb}' tags and
* creating {@link LocalStatelessSessionProxyFactoryBean} definitions.
*
* @author Rob Harrop
* @author Juergen Hoeller
* @since 2.0
*/
class LocalStatelessSessionBeanDefinitionParser extends AbstractJndiLocatingBeanDefinitionParser {
@Override
protected String getBeanClassName(Element element) {
return "org.springframework.ejb.access.LocalStatelessSessionProxyFactoryBean";
}
}
| [
"jessenpan@qq.com"
] | jessenpan@qq.com |
b12d99faf0721f4de51a2842449a5088e837622b | 9d1870a895c63f540937f04a6285dd25ada5e52a | /chromecast-app-reverse-engineering/src/from-androguard-dad-broken-but-might-help/bxu.java | 8a18fb4e02ecbd7f2c3e4dda639087c5ab461319 | [] | no_license | Churritosjesus/Chromecast-Reverse-Engineering | 572aa97eb1fd65380ca0549b4166393505328ed4 | 29fae511060a820f2500a4e6e038dfdb591f4402 | refs/heads/master | 2023-06-04T10:27:15.869608 | 2015-10-27T10:43:11 | 2015-10-27T10:43:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 675 | java | public final com.google.android.gms.common.data.DataHolder a
public bxu(com.google.android.gms.common.data.DataHolder p2)
{
this.a = p2;
if (this.a != null) {
this.a.i = this;
}
return;
}
public final void a()
{
if (this.a != null) {
this.a.c();
}
return;
}
public final int b()
{
int v0_2;
if (this.a != null) {
v0_2 = this.a.h;
} else {
v0_2 = 0;
}
return v0_2;
}
public java.util.Iterator iterator()
{
return new bxz(this);
}
| [
"v.richomme@gmail.com"
] | v.richomme@gmail.com |
cb574973d137d17ff2e5820c1e51418c82bbbf8c | 1f7a8a0a76e05d096d3bd62735bc14562f4f071a | /NeverPuk/net/c2/s.java | cfc9dfe94175d3085c93ffb30874f8464a56ac6c | [] | no_license | yunusborazan/NeverPuk | b6b8910175634523ebd4d21d07a4eb4605477f46 | a0e58597858de2fcad3524daaea656362c20044d | refs/heads/main | 2023-05-10T09:08:02.183430 | 2021-06-13T17:17:50 | 2021-06-13T17:17:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 965 | java | package net.c2;
import net.c2.n;
import net.nl.z1;
import net.yz.m_;
public class s extends n {
private static final m_ Yj = new m_("textures/gui/container/dispenser.png");
private final net.r.i Y8;
public z1 Yf;
public s(net.r.i var1, z1 var2) {
super(new net.nl.n(var1, var2));
this.Y8 = var1;
this.Yf = var2;
}
public void v(int var1, int var2, float var3) {
this.C();
super.v(var1, var2, var3);
this.X(var1, var2);
}
protected void z(int var1, int var2) {
String var3 = this.Yf.b().l();
this.O.v(var3, (float)(this.s / 2 - this.O.r(var3) / 2), 6.0F, 4210752);
this.O.v(this.Y8.b().l(), 8.0F, (float)(this.W - 96 + 2), 4210752);
}
protected void j(float var1, int var2, int var3) {
net.y.d.T(1.0F, 1.0F, 1.0F, 1.0F);
this.A.n().E(Yj);
int var4 = (q - this.s) / 2;
int var5 = (V - this.W) / 2;
this.g(var4, var5, 0, 0, this.s, this.W);
}
}
| [
"68544940+Lazy-Hero@users.noreply.github.com"
] | 68544940+Lazy-Hero@users.noreply.github.com |
2e9cb1894ef6aabefdbd06b05f647149c516296b | 1d928c3f90d4a0a9a3919a804597aa0a4aab19a3 | /java/RxJava/2016/12/MaybeToCompletableTest.java | f133de461819b80f6e139196c96fd3f1bb204d5f | [] | no_license | rosoareslv/SED99 | d8b2ff5811e7f0ffc59be066a5a0349a92cbb845 | a062c118f12b93172e31e8ca115ce3f871b64461 | refs/heads/main | 2023-02-22T21:59:02.703005 | 2021-01-28T19:40:51 | 2021-01-28T19:40:51 | 306,497,459 | 1 | 1 | null | 2020-11-24T20:56:18 | 2020-10-23T01:18:07 | null | UTF-8 | Java | false | false | 1,687 | java | /**
* Copyright 2016 Netflix, 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.reactivex.internal.operators.maybe;
import static org.junit.Assert.*;
import org.junit.Test;
import io.reactivex.*;
import io.reactivex.functions.Function;
import io.reactivex.internal.fuseable.HasUpstreamMaybeSource;
public class MaybeToCompletableTest {
@SuppressWarnings("unchecked")
@Test
public void source() {
Maybe<Integer> source = Maybe.just(1);
assertSame(source, ((HasUpstreamMaybeSource<Integer>)source.ignoreElement().toMaybe()).source());
}
@Test
public void dispose() {
TestHelper.checkDisposed(Maybe.never().ignoreElement().toMaybe());
}
@Test
public void successToComplete() {
Maybe.just(1)
.ignoreElement()
.test()
.assertResult();
}
@Test
public void doubleSubscribe() {
TestHelper.checkDoubleOnSubscribeMaybeToCompletable(new Function<Maybe<Object>, CompletableSource>() {
@Override
public CompletableSource apply(Maybe<Object> m) throws Exception {
return m.ignoreElement();
}
});
}
}
| [
"rodrigosoaresilva@gmail.com"
] | rodrigosoaresilva@gmail.com |
1e6ccffb292b351257fc1fbbb887bda81161a68b | 7ad54455ccfdd0c2fa6c060b345488ec8ebb1cf4 | /com/sun/media/jai/opimage/DivideCRIF.java | e8ae02727139f7a7828897ab88cae32a40dbf6fc | [] | no_license | chetanreddym/segmentation-correction-tool | afdbdaa4642fcb79a21969346420dd09eea72f8c | 7ca3b116c3ecf0de3a689724e12477a187962876 | refs/heads/master | 2021-05-13T20:09:00.245175 | 2018-01-10T04:42:03 | 2018-01-10T04:42:03 | 116,817,741 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 638 | java | package com.sun.media.jai.opimage;
import java.awt.RenderingHints;
import java.awt.image.RenderedImage;
import java.awt.image.renderable.ParameterBlock;
import javax.media.jai.CRIFImpl;
import javax.media.jai.ImageLayout;
public class DivideCRIF
extends CRIFImpl
{
public DivideCRIF()
{
super("divide");
}
public RenderedImage create(ParameterBlock paramBlock, RenderingHints renderHints)
{
ImageLayout layout = RIFUtil.getImageLayoutHint(renderHints);
return new DivideOpImage(paramBlock.getRenderedSource(0), paramBlock.getRenderedSource(1), renderHints, layout);
}
}
| [
"chetanb4u2009@outlook.com"
] | chetanb4u2009@outlook.com |
68086e40ba7116a48254b6b2d70c9c0bcedfaa1d | 0367438f3faf6a167ed6e0d1be8f91c237e1fd0c | /support/cas-server-support-gua/src/test/java/org/apereo/cas/web/flow/DisplayUserGraphicsBeforeAuthenticationActionTests.java | 50b01872972a788fa7916906e1eddf1eedbb6cb9 | [
"Apache-2.0",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | wangqc93/cas | 42556a8e2e8f55481e54ff5701e65d6825b225b5 | a89039f517ed9f1bb57049ddaaf2b3688ae955fb | refs/heads/master | 2020-11-24T06:52:08.165890 | 2019-12-13T08:29:52 | 2019-12-13T08:29:52 | 227,976,255 | 1 | 0 | Apache-2.0 | 2019-12-14T06:20:05 | 2019-12-14T06:20:04 | null | UTF-8 | Java | false | false | 1,416 | java | package org.apereo.cas.web.flow;
import org.apereo.cas.web.support.WebUtils;
import lombok.val;
import org.junit.jupiter.api.Test;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.mock.web.MockServletContext;
import org.springframework.webflow.context.servlet.ServletExternalContext;
import org.springframework.webflow.test.MockRequestContext;
import static org.junit.jupiter.api.Assertions.*;
/**
* This is {@link DisplayUserGraphicsBeforeAuthenticationActionTests}.
*
* @author Misagh Moayyed
* @since 5.3.0
*/
public class DisplayUserGraphicsBeforeAuthenticationActionTests extends AbstractGraphicalAuthenticationActionTests {
@Test
public void verifyAction() throws Exception {
val context = new MockRequestContext();
val request = new MockHttpServletRequest();
request.addParameter("username", "casuser");
context.setExternalContext(new ServletExternalContext(new MockServletContext(), request, new MockHttpServletResponse()));
val event = displayUserGraphicsBeforeAuthenticationAction.execute(context);
assertEquals(CasWebflowConstants.TRANSITION_ID_SUCCESS, event.getId());
assertTrue(WebUtils.containsGraphicalUserAuthenticationImage(context));
assertTrue(WebUtils.containsGraphicalUserAuthenticationUsername(context));
}
}
| [
"mm1844@gmail.com"
] | mm1844@gmail.com |
0d7798fc44b2605320fa6b0b5509a28beeb730bb | abf09f42e594f943927530d4d7dbd08dda436de5 | /JsfUsingHibernate/src/java/test/test.java | e9b51c8d147d420b1bd8e945eb506da845e45423 | [] | no_license | mortozafsti/Jsp-Web-Project | e232148120b026a8eeb87fa3b2582e36c356e0fc | 3920d6a4d9161609a2dc9030ba901728363e5423 | refs/heads/master | 2022-12-02T19:33:56.584746 | 2019-09-23T08:06:55 | 2019-09-23T08:06:55 | 160,851,448 | 0 | 0 | null | 2022-11-24T09:19:21 | 2018-12-07T16:53:00 | Java | UTF-8 | Java | false | false | 925 | java |
package test;
import entity.Student;
import java.util.List;
import service.StudentService;
public class test {
public static void main(String[] args) {
StudentService studentService = new StudentService();
//Student student = new Student();
//student.setId(2);
// student.setName("Milton");
// student.setRound("Round-37");
// student.setCompletedCourse("C#");
// student.setGender("Male");
//
// studentService.saveorUpdate(student);
//Show data
// Student student = studentService.getById(2);
// System.out.println(student);
//show List
// List<Student> list = studentService.getList();
// System.out.println("Size: "+list.size());
// for (Student s : list) {
// System.out.println(s);
// }
System.out.println("Success");
}
}
| [
"mortozafsti@gmail.com"
] | mortozafsti@gmail.com |
b2fa9fcf42a1a2d44afcbc81286e75230f71ec71 | 147885d7eb4527c20b561af7d1dc0b38312bc39f | /lense/sdk/native/java/lense/core/math/ArithmeticException.java | fb94c0d031089faeaf459126bedc346b9a99a269 | [] | no_license | sergiotaborda/lense-lang | 931d5afd81df307f81e5770f5f8a3cbbab800f23 | 472c4fc038f3c1fb3514c56f7ec77bfaa279560e | refs/heads/master | 2023-01-31T06:12:16.812809 | 2023-01-05T17:55:12 | 2023-01-05T17:55:12 | 44,053,128 | 2 | 0 | null | 2023-01-05T17:55:13 | 2015-10-11T13:29:13 | Java | UTF-8 | Java | false | false | 415 | java | package lense.core.math;
public class ArithmeticException extends lense.core.lang.Exception {
private static final long serialVersionUID = -501467634001375398L;
public static ArithmeticException constructor (lense.core.lang.String message){
return new ArithmeticException(message);
}
private ArithmeticException (lense.core.lang.String message){
super(message);
}
}
| [
"sergiotaborda@yahoo.com.br"
] | sergiotaborda@yahoo.com.br |
2aba94fd3860b0fd0dda623c6dc83f900c493ae6 | 53d677a55e4ece8883526738f1c9d00fa6560ff7 | /com/tencent/mm/plugin/appbrand/widget/input/o$4.java | 742eb574a870d3536ed57214022c35fca3c61506 | [] | no_license | 0jinxing/wechat-apk-source | 544c2d79bfc10261eb36389c1edfdf553d8f312a | f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d | refs/heads/master | 2020-06-07T20:06:03.580028 | 2019-06-21T09:17:26 | 2019-06-21T09:17:26 | 193,069,132 | 9 | 4 | null | null | null | null | UTF-8 | Java | false | false | 614 | java | package com.tencent.mm.plugin.appbrand.widget.input;
import android.support.v4.f.a;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.appbrand.page.u;
final class o$4
implements Runnable
{
o$4(u paramu)
{
}
public final void run()
{
AppMethodBeat.i(123680);
o.aQN().remove(this.hTv);
AppMethodBeat.o(123680);
}
}
/* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes2-dex2jar.jar
* Qualified Name: com.tencent.mm.plugin.appbrand.widget.input.o.4
* JD-Core Version: 0.6.2
*/ | [
"172601673@qq.com"
] | 172601673@qq.com |
00e4e1bb20735c63115613101280b35e358277c8 | ab91edf364c66071c0ec5777595033fc8cde8113 | /panda-core/src/main/java/panda/io/filter/FileFileFilter.java | fcf9d61cb17f02453b97058963638d3e7e22d599 | [
"Apache-2.0"
] | permissive | pandafw/panda | 054a5262cb006382ca22858925329a928fec844b | 5ab4c335dae0dba34995f13863f11be790b14548 | refs/heads/master | 2023-08-31T03:40:26.800171 | 2023-08-29T08:11:50 | 2023-08-29T08:11:50 | 78,275,890 | 10 | 1 | Apache-2.0 | 2022-11-08T11:20:35 | 2017-01-07T11:47:02 | Java | UTF-8 | Java | false | false | 917 | java | package panda.io.filter;
import java.io.File;
/**
* This filter accepts <code>File</code>s that are files (not directories).
* <p>
* For example, here is how to print out a list of the real files within the current directory:
*
* <pre>
* File dir = new File(".");
* String[] files = dir.list(FileFileFilter.FILE);
* for (int i = 0; i < files.length; i++) {
* System.out.println(files[i]);
* }
* </pre>
*
* @see FileFilters#fileFileFilter()
*/
public class FileFileFilter extends AbstractFileFilter {
/** Singleton instance of file filter */
public static final IOFileFilter FILE = new FileFileFilter();
/**
* Restrictive consructor.
*/
protected FileFileFilter() {
}
/**
* Checks to see if the file is a file.
*
* @param file the File to check
* @return true if the file is a file
*/
@Override
public boolean accept(File file) {
return file.isFile();
}
}
| [
"yf.frank.wang@outlook.com"
] | yf.frank.wang@outlook.com |
f7e3693901bae28b1dd14af5ccb91fd89cfa72a9 | 14746c4b8511abe301fd470a152de627327fe720 | /soroush-android-1.10.0_source_from_JADX/com/google/firebase/provider/FirebaseInitProvider.java | 9d80a36068f7e1cd198e1f51f60789fc8dcea7fb | [] | no_license | maasalan/soroush-messenger-apis | 3005c4a43123c6543dbcca3dd9084f95e934a6f4 | 29867bf53a113a30b1aa36719b1c7899b991d0a8 | refs/heads/master | 2020-03-21T21:23:20.693794 | 2018-06-28T19:57:01 | 2018-06-28T19:57:01 | 139,060,676 | 3 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,815 | java | package com.google.firebase.provider;
import android.content.ContentProvider;
import android.content.ContentValues;
import android.content.Context;
import android.content.pm.ProviderInfo;
import android.database.Cursor;
import android.net.Uri;
import android.util.Log;
import com.google.android.gms.common.internal.ac;
import com.google.firebase.C2053a;
public class FirebaseInitProvider extends ContentProvider {
public void attachInfo(Context context, ProviderInfo providerInfo) {
ac.m4377a((Object) providerInfo, (Object) "FirebaseInitProvider ProviderInfo cannot be null.");
if ("com.google.firebase.firebaseinitprovider".equals(providerInfo.authority)) {
throw new IllegalStateException("Incorrect provider authority in manifest. Most likely due to a missing applicationId variable in application's build.gradle.");
}
super.attachInfo(context, providerInfo);
}
public int delete(Uri uri, String str, String[] strArr) {
return 0;
}
public String getType(Uri uri) {
return null;
}
public Uri insert(Uri uri, ContentValues contentValues) {
return null;
}
public boolean onCreate() {
String str;
String str2;
if (C2053a.m5586a(getContext()) == null) {
str = "FirebaseInitProvider";
str2 = "FirebaseApp initialization unsuccessful";
} else {
str = "FirebaseInitProvider";
str2 = "FirebaseApp initialization successful";
}
Log.i(str, str2);
return false;
}
public Cursor query(Uri uri, String[] strArr, String str, String[] strArr2, String str2) {
return null;
}
public int update(Uri uri, ContentValues contentValues, String str, String[] strArr) {
return 0;
}
}
| [
"Maasalan@riseup.net"
] | Maasalan@riseup.net |
1bb2d46ff54eb314d1ac6a833b2bee28c907bb0e | 0ea271177f5c42920ac53cd7f01f053dba5c14e4 | /5.4.2/sources/org/telegram/tgnet/TLRPC$TL_documentAttributeHasStickers.java | ecece10ee572bbaa370208b79f11afd9a7de2da7 | [] | no_license | alireza-ebrahimi/telegram-talaeii | 367a81a77f9bc447e729b2ca339f9512a4c2860e | 68a67e6f104ab8a0888e63c605e8bbad12c4a20e | refs/heads/master | 2020-03-21T13:44:29.008002 | 2018-12-09T10:30:29 | 2018-12-09T10:30:29 | 138,622,926 | 12 | 1 | null | null | null | null | UTF-8 | Java | false | false | 357 | java | package org.telegram.tgnet;
import org.telegram.tgnet.TLRPC.DocumentAttribute;
public class TLRPC$TL_documentAttributeHasStickers extends DocumentAttribute {
public static int constructor = -1744710921;
public void serializeToStream(AbstractSerializedData abstractSerializedData) {
abstractSerializedData.writeInt32(constructor);
}
}
| [
"alireza.ebrahimi2006@gmail.com"
] | alireza.ebrahimi2006@gmail.com |
f319316b0c76074a88cf090bf6ffcca477159881 | 6c54ea57ff47b9aad414627b972268623134d1f4 | /TSS.Java/src/tss/tpm/TPM_HC.java | 135d4e2cdce034a4af55da07bca2843dce8d8ea6 | [
"MIT"
] | permissive | raghuncstate/TSS.MSR | c7f062fccbd1c05ac2433e7badb1942c5a996cd3 | 50b9c36d09d5cae89a965f2fc65c58ad29fe1732 | refs/heads/master | 2021-05-15T10:36:59.454709 | 2018-05-14T06:32:22 | 2018-05-14T06:32:22 | 108,195,473 | 0 | 0 | MIT | 2018-04-30T17:04:44 | 2017-10-24T23:34:50 | C++ | UTF-8 | Java | false | false | 7,876 | java | package tss.tpm;
import tss.*;
import java.util.*;
// -----------This is an auto-generated file: do not edit
//>>>
/**
* The definitions in Table 29 are used to define many of the interface data types.
*/
public final class TPM_HC extends TpmEnum<TPM_HC>
{
// Values from enum _N are only intended to be used in case labels of a switch statement using the result of this.asEnum() method as the switch condition.
// However, their Java names are identical to those of the constants defined in this class further below,
// so for any other usage just prepend them with the TPM_HC. qualifier.
public enum _N {
/**
* to mask off the HR
*/
HR_HANDLE_MASK,
/**
* to mask off the variable part
*/
HR_RANGE_MASK,
HR_SHIFT,
HR_PCR,
HR_HMAC_SESSION,
HR_POLICY_SESSION,
HR_TRANSIENT,
HR_PERSISTENT,
HR_NV_INDEX,
HR_PERMANENT,
/**
* first PCR
*/
PCR_FIRST,
/**
* last PCR
*/
PCR_LAST,
/**
* first HMAC session
*/
HMAC_SESSION_FIRST,
/**
* last HMAC session
*/
HMAC_SESSION_LAST,
/**
* used in GetCapability
*/
LOADED_SESSION_FIRST,
/**
* used in GetCapability
*/
LOADED_SESSION_LAST,
/**
* first policy session
*/
POLICY_SESSION_FIRST,
/**
* last policy session
*/
POLICY_SESSION_LAST,
/**
* first transient object
*/
TRANSIENT_FIRST,
/**
* used in GetCapability
*/
ACTIVE_SESSION_FIRST,
/**
* used in GetCapability
*/
ACTIVE_SESSION_LAST,
/**
* last transient object
*/
TRANSIENT_LAST,
/**
* first persistent object
*/
PERSISTENT_FIRST,
/**
* last persistent object
*/
PERSISTENT_LAST,
/**
* first platform persistent object
*/
PLATFORM_PERSISTENT,
/**
* first allowed NV Index
*/
NV_INDEX_FIRST,
/**
* last allowed NV Index
*/
NV_INDEX_LAST,
PERMANENT_FIRST,
PERMANENT_LAST,
/**
* AC aliased NV Index
*/
HR_NV_AC,
/**
* first NV Index aliased to Attached Component
*/
NV_AC_FIRST,
/**
* last NV Index aliased to Attached Component
*/
NV_AC_LAST,
/**
* AC Handle
*/
HR_AC,
/**
* first Attached Component
*/
AC_FIRST,
/**
* last Attached Component
*/
AC_LAST
}
private static ValueMap<TPM_HC> _ValueMap = new ValueMap<TPM_HC>();
public static final TPM_HC
// These definitions provide mapping of the Java names of constants to their TPM values.
HR_HANDLE_MASK = new TPM_HC(0x00FFFFFF, _N.HR_HANDLE_MASK),
HR_RANGE_MASK = new TPM_HC(0xFF000000, _N.HR_RANGE_MASK),
HR_SHIFT = new TPM_HC(24, _N.HR_SHIFT),
HR_PCR = new TPM_HC((TPM_HT.PCR.toInt() << TPM_HC.HR_SHIFT.toInt()), _N.HR_PCR),
HR_HMAC_SESSION = new TPM_HC((TPM_HT.HMAC_SESSION.toInt() << TPM_HC.HR_SHIFT.toInt()), _N.HR_HMAC_SESSION),
HR_POLICY_SESSION = new TPM_HC((TPM_HT.POLICY_SESSION.toInt() << TPM_HC.HR_SHIFT.toInt()), _N.HR_POLICY_SESSION),
HR_TRANSIENT = new TPM_HC((TPM_HT.TRANSIENT.toInt() << TPM_HC.HR_SHIFT.toInt()), _N.HR_TRANSIENT),
HR_PERSISTENT = new TPM_HC((TPM_HT.PERSISTENT.toInt() << TPM_HC.HR_SHIFT.toInt()), _N.HR_PERSISTENT),
HR_NV_INDEX = new TPM_HC((TPM_HT.NV_INDEX.toInt() << TPM_HC.HR_SHIFT.toInt()), _N.HR_NV_INDEX),
HR_PERMANENT = new TPM_HC((TPM_HT.PERMANENT.toInt() << TPM_HC.HR_SHIFT.toInt()), _N.HR_PERMANENT),
PCR_FIRST = new TPM_HC((TPM_HC.HR_PCR.toInt() + 0), _N.PCR_FIRST),
PCR_LAST = new TPM_HC((TPM_HC.PCR_FIRST.toInt() + Implementation.IMPLEMENTATION_PCR.toInt()-1), _N.PCR_LAST),
HMAC_SESSION_FIRST = new TPM_HC((TPM_HC.HR_HMAC_SESSION.toInt() + 0), _N.HMAC_SESSION_FIRST),
HMAC_SESSION_LAST = new TPM_HC((TPM_HC.HMAC_SESSION_FIRST.toInt()+Implementation.MAX_ACTIVE_SESSIONS.toInt()-1), _N.HMAC_SESSION_LAST),
LOADED_SESSION_FIRST = new TPM_HC(TPM_HC.HMAC_SESSION_FIRST.toInt(), _N.LOADED_SESSION_FIRST),
LOADED_SESSION_LAST = new TPM_HC(TPM_HC.HMAC_SESSION_LAST.toInt(), _N.LOADED_SESSION_LAST),
POLICY_SESSION_FIRST = new TPM_HC((TPM_HC.HR_POLICY_SESSION.toInt() + 0), _N.POLICY_SESSION_FIRST),
POLICY_SESSION_LAST = new TPM_HC((TPM_HC.POLICY_SESSION_FIRST.toInt() + Implementation.MAX_ACTIVE_SESSIONS.toInt()-1), _N.POLICY_SESSION_LAST),
TRANSIENT_FIRST = new TPM_HC((TPM_HC.HR_TRANSIENT.toInt() + 0), _N.TRANSIENT_FIRST),
ACTIVE_SESSION_FIRST = new TPM_HC(TPM_HC.POLICY_SESSION_FIRST.toInt(), _N.ACTIVE_SESSION_FIRST),
ACTIVE_SESSION_LAST = new TPM_HC(TPM_HC.POLICY_SESSION_LAST.toInt(), _N.ACTIVE_SESSION_LAST),
TRANSIENT_LAST = new TPM_HC((TPM_HC.TRANSIENT_FIRST.toInt()+Implementation.MAX_LOADED_OBJECTS.toInt()-1), _N.TRANSIENT_LAST),
PERSISTENT_FIRST = new TPM_HC((TPM_HC.HR_PERSISTENT.toInt() + 0), _N.PERSISTENT_FIRST),
PERSISTENT_LAST = new TPM_HC((TPM_HC.PERSISTENT_FIRST.toInt() + 0x00FFFFFF), _N.PERSISTENT_LAST),
PLATFORM_PERSISTENT = new TPM_HC((TPM_HC.PERSISTENT_FIRST.toInt() + 0x00800000), _N.PLATFORM_PERSISTENT),
NV_INDEX_FIRST = new TPM_HC((TPM_HC.HR_NV_INDEX.toInt() + 0), _N.NV_INDEX_FIRST),
NV_INDEX_LAST = new TPM_HC((TPM_HC.NV_INDEX_FIRST.toInt() + 0x00FFFFFF), _N.NV_INDEX_LAST),
PERMANENT_FIRST = new TPM_HC(TPM_RH.FIRST.toInt(), _N.PERMANENT_FIRST),
PERMANENT_LAST = new TPM_HC(TPM_RH.LAST.toInt(), _N.PERMANENT_LAST),
HR_NV_AC = new TPM_HC(((TPM_HT.NV_INDEX.toInt() << TPM_HC.HR_SHIFT.toInt()) + 0xD00000), _N.HR_NV_AC),
NV_AC_FIRST = new TPM_HC((TPM_HC.HR_NV_AC.toInt() + 0), _N.NV_AC_FIRST),
NV_AC_LAST = new TPM_HC((TPM_HC.HR_NV_AC.toInt() + 0x0000FFFF), _N.NV_AC_LAST),
HR_AC = new TPM_HC((TPM_HT.AC.toInt() << TPM_HC.HR_SHIFT.toInt()), _N.HR_AC),
AC_FIRST = new TPM_HC((TPM_HC.HR_AC.toInt() + 0), _N.AC_FIRST),
AC_LAST = new TPM_HC((TPM_HC.HR_AC.toInt() + 0x0000FFFF), _N.AC_LAST);
public TPM_HC (int value) { super(value, _ValueMap); }
public static TPM_HC fromInt (int value) { return TpmEnum.fromInt(value, _ValueMap, TPM_HC.class); }
public static TPM_HC fromTpm (byte[] buf) { return TpmEnum.fromTpm(buf, _ValueMap, TPM_HC.class); }
public static TPM_HC fromTpm (InByteBuf buf) { return TpmEnum.fromTpm(buf, _ValueMap, TPM_HC.class); }
public TPM_HC._N asEnum() { return (TPM_HC._N)NameAsEnum; }
public static Collection<TPM_HC> values() { return _ValueMap.values(); }
private TPM_HC (int value, _N nameAsEnum) { super(value, nameAsEnum, _ValueMap); }
private TPM_HC (int value, _N nameAsEnum, boolean noConvFromInt) { super(value, nameAsEnum, null); }
@Override
protected int wireSize() { return 4; }
}
//<<<
| [
"Andrey.Marochko@microsoft.com"
] | Andrey.Marochko@microsoft.com |
3d4bf24dabad1db009976856a39acf4fa9bb2d85 | 07395e5505c3018578bc05de5bd9db1cc1f965c7 | /dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataapproval/DataApprovalLevelService.java | c9969c5971bd9c379897c5811dd29b6e486abd9b | [
"BSD-3-Clause"
] | permissive | darken1/dhis2darken | ae26aec266410eda426254a595eed597a2312f50 | 849ee5385505339c1d075f568a4a41d4293162f7 | refs/heads/master | 2020-12-25T01:27:16.872079 | 2014-06-26T20:11:08 | 2014-06-26T20:11:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,976 | java | package org.hisp.dhis.dataapproval;
/*
* Copyright (c) 2004-2014, University of Oslo
* 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.
* Neither the name of the HISP project nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
import org.hisp.dhis.organisationunit.OrganisationUnit;
import java.util.List;
import java.util.Map;
/**
* @author Jim Grace
*/
public interface DataApprovalLevelService
{
String ID = DataApprovalLevelService.class.getName();
/**
* Integer that can be used in place of approval level
* for data that has not been approved at any level.
*/
public static final int APPROVAL_LEVEL_UNAPPROVED = 999;
/**
* Gets the data approval level with the given id.
*
* @param id the id.
* @return a data approval level.
*/
DataApprovalLevel getDataApprovalLevel( int id );
/**
* Gets the data approval level with the given name.
*
* @param name the name.
* @return a data approval level.
*/
DataApprovalLevel getDataApprovalLevelByName( String name );
/**
* Gets a list of all data approval levels.
*
* @return List of all data approval levels, ordered from 1 to n.
*/
List<DataApprovalLevel> getAllDataApprovalLevels();
List<DataApprovalLevel> getUserDataApprovalLevels();
/**
* Gets data approval levels by org unit level.
*
* @param orgUnitLevel the org unit level.
* @return a list of data approval levels.
*/
List<DataApprovalLevel> getDataApprovalLevelsByOrgUnitLevel( int orgUnitLevel );
/**
* Tells whether a level can move down in the list (can switch places with
* the level below.)
*
* @param level the level to test.
* @return true if the level can move down, otherwise false.
*/
boolean canDataApprovalLevelMoveDown( int level );
/**
* Tells whether a level can move up in the list (can switch places with
* the level above.)
*
* @param level the level to test.
* @return true if the level can move up, otherwise false.
*/
boolean canDataApprovalLevelMoveUp( int level );
/**
* Moves a data approval level down in the list (switches places with the
* level below).
*
* @param level the level to move down.
*/
void moveDataApprovalLevelDown( int level );
/**
* Moves a data approval level up in the list (switches places with the
* level above).
*
* @param level the level to move up.
*/
void moveDataApprovalLevelUp( int level );
/**
* Determines whether level already exists with the same organisation
* unit level and category option group set (but not necessarily the
* same level number.)
*
* @param level Data approval level to test for existence.
* @return true if it exists, otherwise false.
*/
public boolean dataApprovalLevelExists ( DataApprovalLevel level );
/**
* Adds a new data approval level. Adds the new level at the highest
* position possible (to facilitate the use case where users add the
* approval levels from low to high.)
*
* @param newLevel the new level to add.
* @return the identifier of the added level, or -1 if not well formed or duplicate.
*/
int addDataApprovalLevel( DataApprovalLevel newLevel );
/**
* Adds a new data approval level. Sets the level epxlicitl.
*
* @param approvalLevel the new level to add.
* @param level the level.
* @return the identifier of the added level, or -1 if not well formed or duplicate.
*/
int addDataApprovalLevel( DataApprovalLevel approvalLevel, int level );
/**
* Removes a data approval level.
*
* @param dataApprovalLevel the data approval level to delete.
*/
void deleteDataApprovalLevel( DataApprovalLevel dataApprovalLevel );
/**
* By organisation unit subhierarchy, returns the lowest data approval
* level at which the user may see data within that subhierarchy, if
* data viewing is being restricted to approved data from lower levels.
* <p>
* Returns the value APPROVAL_LEVEL_UNAPPROVED for a subhierarchy if
* the user may see unapproved data.
* <p>
* (Note that the "lowest" approval level means the "highest" approval
* level number.)
*
* @return For each organisation unit subhierarchy available to the user,
* the minimum data approval level within that subhierarchy.
*/
Map<OrganisationUnit, Integer> getUserReadApprovalLevels();
}
| [
"sunbiz@gmail.com"
] | sunbiz@gmail.com |
6d5be397eb17febf7cfe2532426784964cf2d206 | 7acc57264b2bb19f5a6bc08e1ad2dee1a5d28480 | /accessor-verifier/src/test/java/com/adarrivi/verifier/sampleclass/GenericClassComposition.java | 10de354c67f7bab240f87d997592df08523fda0d | [] | no_license | adarrivi/accessor-verifier | a1b410557e705f285e92446d08b753b926a1740c | 606758eb25fe315e0cb1f4d9e5e47f9838e2bf1f | refs/heads/master | 2016-09-06T05:40:53.859995 | 2014-04-24T19:05:37 | 2014-04-24T19:05:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 812 | java | package com.adarrivi.verifier.sampleclass;
import java.util.List;
public class GenericClassComposition {
private List<GenericClass> genericClasses;
private GenericClass genericClass;
@SuppressWarnings("unused")
private String other;
public GenericClassComposition(String other) {
this.other = other;
}
public List<GenericClass> getGenericClasses() {
return genericClasses;
}
public void setGenericClasses(List<GenericClass> genericClasses) {
this.genericClasses = genericClasses;
}
public GenericClass getGenericClass() {
return genericClass;
}
public void setGenericClass(GenericClass genericClass) {
this.genericClass = genericClass;
}
public void modifyOther() {
other = "modify";
}
}
| [
"adarrivi@gmail.com"
] | adarrivi@gmail.com |
a13eacc0fa8c071d4223e789eeae5f3a8133301e | df907f73226e6b13d2a2bbe828e58601bd1faaa0 | /IPSignShop/src/me/ialistannen/ip_sign_shop/commands/CommandIpSignShop.java | 883c133f380b53b99c081633bba40baddb154d2c | [
"MIT"
] | permissive | I-Al-Istannen/Inventory-Profiles | d92e3e6875beaba794623fee7a28df1da199acd4 | eff1cecd89ed9eebe4ef43ee426e13a4c66e27bf | refs/heads/master | 2020-04-06T07:02:57.540919 | 2016-09-07T21:56:18 | 2016-09-07T21:56:18 | 62,963,921 | 0 | 0 | null | 2016-09-07T21:56:18 | 2016-07-09T18:40:57 | Java | UTF-8 | Java | false | false | 687 | java | package me.ialistannen.ip_sign_shop.commands;
import me.ialistannen.bukkitutil.commandsystem.implementation.RelayCommandNode;
import me.ialistannen.inventory_profiles.util.Util;
import me.ialistannen.ip_sign_shop.IPSignShop;
/**
* The main command
*/
public class CommandIpSignShop extends RelayCommandNode {
public CommandIpSignShop() {
super(IPSignShop.getInstance().getLanguage(), "command_ip_sign_shop",
Util.tr("command_ip_sign_shop_permission"), sender -> true);
addChild(new CommandSetOwner());
addChild(new CommandSetMode());
addChild(new CommandSetPrice());
addChild(new CommandClean());
addChild(new CommandRemove());
addChild(new CommandFind());
}
}
| [
"none"
] | none |
9f5ba13e907f69bf375dcabe1f9f213d0388b06c | 668584d63f6ed8f48c8609c3a142f8bdf1ba1a40 | /prj/coherence-core/src/main/java/com/tangosol/dev/disassembler/NameTypeConstant.java | 986b383605f23dbd505503af39dc7b601d9e1d7b | [
"EPL-1.0",
"Classpath-exception-2.0",
"LicenseRef-scancode-unicode",
"LicenseRef-scancode-warranty-disclaimer",
"BSD-3-Clause",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-protobuf",
"CDDL-1.1",
"W3C",
"APSL-1.0",
"GPL-2.0-only",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"SAX-PD",
"MPL-2.0",
"MPL-1.1",
"CC-PDDC",
"BSD-2-Clause",
"Plexus",
"EPL-2.0",
"CDDL-1.0",
"LicenseRef-scancode-proprietary-license",
"MIT",
"CC0-1.0",
"APSL-2.0",
"LicenseRef-scancode-unknown-license-reference",
"LGPL-2.1-only",
"LGPL-2.1-or-later",
"UPL-1.0"
] | permissive | oracle/coherence | 34c48d36674e69974a693925c18f097175052c5f | b1a009a406e37fdc5479366035d8c459165324e1 | refs/heads/main | 2023-08-31T14:53:40.437690 | 2023-08-31T02:04:15 | 2023-08-31T02:04:15 | 242,776,849 | 416 | 96 | UPL-1.0 | 2023-08-07T04:27:39 | 2020-02-24T15:51:04 | Java | UTF-8 | Java | false | false | 1,200 | java | /*
* Copyright (c) 2000, 2020, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* http://oss.oracle.com/licenses/upl.
*/
package com.tangosol.dev.disassembler;
import com.tangosol.dev.compiler.java.*;
import com.tangosol.util.*;
import java.io.*;
public class NameTypeConstant extends Constant
{
private int m_iName;
private int m_iSig;
public NameTypeConstant(DataInput stream)
throws IOException
{
m_iName = stream.readUnsignedShort();
m_iSig = stream.readUnsignedShort();
}
public int getNameIndex()
{
return m_iName;
}
public String getName()
{
return ((UtfConstant) m_aconst[m_iName]).getText();
}
public int getSignatureIndex()
{
return m_iSig;
}
public String getSignature()
{
return ((UtfConstant) m_aconst[m_iSig]).getText();
}
public String toString()
{
return "Name/Type: Name Index=" + m_iName + " (" + format(getName()) + ")"
+ ", Type Index=" + m_iSig + " (" + format(getSignature()) + ")";
}
}
| [
"a@b"
] | a@b |
29b2831e6fd3e50f7f354f4e1e3c8ffda62a6a01 | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XWIKI-13372-11-6-PESA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/extension/xar/internal/handler/XarExtensionHandler_ESTest_scaffolding.java | 50ad402b94be7f152f04f858c62de98ec9d2c010 | [] | 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 | 464 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Fri Apr 03 03:57:00 UTC 2020
*/
package org.xwiki.extension.xar.internal.handler;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class XarExtensionHandler_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
f21633dce1bdf822763e757fe376ddd40175d33d | 00ad2e61e469488ef34a8ab93d1a0c9e68e99caf | /yiranpay/yiranpay-admin/src/main/java/com/yiranpay/web/api/enums/ResultEnum.java | 8d8d39df1d5d130a47a2f6dc6cce92a4243737a8 | [
"MIT"
] | permissive | panda726548/yiranpay | 13e77b620c76ef5778560ad2ef0833ae48555a4a | 38523749bd2e00a003637f785289e21f6bf7e6dd | refs/heads/master | 2023-07-11T05:48:54.645886 | 2023-07-02T11:38:48 | 2023-07-02T11:38:48 | 285,158,256 | 81 | 45 | null | null | null | null | UTF-8 | Java | false | false | 1,834 | java | package com.yiranpay.web.api.enums;
import org.apache.commons.lang.StringUtils;
public enum ResultEnum {
SUCCESS("0", "成功"),
PARAM_ERROR("1", "参数不正确"),
PRODUCT_NOT_EXIST("10", "商品不存在"),
PRODUCT_STOCK_ERROR("11", "商品库存不正确"),
ORDER_NOT_EXIST("12", "订单不存在"),
ORDERDETAIL_NOT_EXIST("13", "订单详情不存在"),
ORDER_STATUS_ERROR("14", "订单状态不正确"),
ORDER_UPDATE_FAIL("15", "订单更新失败"),
ORDER_DETAIL_EMPTY("16", "订单详情为空"),
ORDER_PAY_STATUS_ERROR("17", "订单支付状态不正确"),
CART_EMPTY("18", "购物车为空"),
ORDER_OWNER_ERROR("19", "该订单不属于当前用户"),
WECHAT_MP_ERROR("20", "微信公众账号方面错误"),
WXPAY_NOTIFY_MONEY_VERIFY_ERROR("21", "微信支付异步通知金额校验不通过"),
ORDER_CANCEL_SUCCESS("22", "订单取消成功"),
ORDER_FINISH_SUCCESS("23", "订单完结成功"),
PRODUCT_STATUS_ERROR("24", "商品状态不正确"),
LOGIN_FAIL("25", "登录失败, 登录信息不正确"),
LOGOUT_SUCCESS("26", "登出成功")
;
/** 代码 */
private final String code;
/** 描述信息 */
private final String message;
ResultEnum(String code, String message) {
this.code = code;
this.message = message;
}
/**
* 通过代码获取
* @param code
* @return
*/
public static ResultEnum getByCode(String code) {
if (StringUtils.isBlank(code)) {
return null;
}
for (ResultEnum type : ResultEnum.values()) {
if (type.getCode().equals(code)) {
return type;
}
}
return null;
}
public String getMessage() {
return message;
}
public String getCode() {
return code;
}
}
| [
"498617606@qq.com"
] | 498617606@qq.com |
c0055e74c05aa4d4367fdc0071eb1f29d340d36b | f3aec68bc48dc52e76f276fd3b47c3260c01b2a4 | /core/referencebook/src/main/java/ru/korus/tmis/pix/II.java | 9a620d973d831914c66a9d03f7f304e1fa316133 | [] | no_license | MarsStirner/core | c9a383799a92e485e2395d81a0bc95d51ada5fa5 | 6fbf37af989aa48fabb9c4c2566195aafd2b16ab | refs/heads/master | 2020-12-03T00:39:51.407573 | 2016-04-29T12:28:32 | 2016-04-29T12:28:32 | 96,041,573 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,166 | java |
package ru.korus.tmis.pix;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
/**
*
* An identifier that uniquely identifies a thing or object.
* Examples are object identifier for HL7 RIM objects,
* medical record number, order id, service catalog item id,
* Vehicle Identification Number (VIN), etc. Instance
* identifiers are defined based on ISO object identifiers.
*
*
* <p>Java class for II complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="II">
* <complexContent>
* <extension base="{urn:hl7-org:v3}ANY">
* <attribute name="root" type="{urn:hl7-org:v3}uid" />
* <attribute name="extension" type="{urn:hl7-org:v3}st" />
* <attribute name="assigningAuthorityName" type="{urn:hl7-org:v3}st" />
* <attribute name="displayable" type="{urn:hl7-org:v3}bl" />
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "II")
@XmlSeeAlso({
PRPAMT201302UV02StudentId.class,
PRPAMT201302UV02MemberId.class,
PRPAMT201302UV02AdministrativeObservationId.class,
PRPAMT201302UV02NonPersonLivingSubjectId.class,
PRPAMT201302UV02PatientId.class,
PRPAMT201302UV02CareGiverId.class,
PRPAMT201302UV02OtherIDsId.class,
PRPAMT201302UV02ContactPartyId.class,
PRPAMT201302UV02PersonId.class,
PRPAMT201302UV02EmployeeId.class,
PRPAMT201302UV02GuardianId.class,
PRPAMT201302UV02CitizenId.class,
PRPAMT201302UV02PersonalRelationshipId.class
})
public class II
extends ANY
{
@XmlAttribute(name = "root")
protected String root;
@XmlAttribute(name = "extension")
protected String extension;
@XmlAttribute(name = "assigningAuthorityName")
protected String assigningAuthorityName;
@XmlAttribute(name = "displayable")
protected Boolean displayable;
/**
* Gets the value of the root property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getRoot() {
return root;
}
/**
* Sets the value of the root property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setRoot(String value) {
this.root = value;
}
/**
* Gets the value of the extension property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getExtension() {
return extension;
}
/**
* Sets the value of the extension property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setExtension(String value) {
this.extension = value;
}
/**
* Gets the value of the assigningAuthorityName property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getAssigningAuthorityName() {
return assigningAuthorityName;
}
/**
* Sets the value of the assigningAuthorityName property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setAssigningAuthorityName(String value) {
this.assigningAuthorityName = value;
}
/**
* Gets the value of the displayable property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isDisplayable() {
return displayable;
}
/**
* Sets the value of the displayable property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setDisplayable(Boolean value) {
this.displayable = value;
}
}
| [
"szgrebelny@korusconsulting.ru"
] | szgrebelny@korusconsulting.ru |
c96ada3e37eea9cf06e7af9c6519fa01770825dc | 57908299752bd2f5eacb80ae1514df7db36b0ea2 | /app/src/main/java/com/myappartments/laundry/model/ModelDbApartList.java | 025d1614245f3afa2b9fac589932defe357fa523 | [] | no_license | tsfapps/Apartment | b915ccb8b8e09e173e90bcc4141aa1ddc745ca05 | 35bfd3e476e0a1103c05f819486bf66827eb2091 | refs/heads/master | 2020-04-27T12:50:55.871484 | 2019-07-16T11:48:10 | 2019-07-16T11:48:10 | 174,346,428 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,213 | java | package com.myappartments.laundry.model;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class ModelDbApartList {
@SerializedName("id")
@Expose
private String id;
@SerializedName("aprt_name")
@Expose
private String aprtName;
@SerializedName("address")
@Expose
private String address;
@SerializedName("city")
@Expose
private String city;
@SerializedName("pincode")
@Expose
private String pincode;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getAprtName() {
return aprtName;
}
public void setAprtName(String aprtName) {
this.aprtName = aprtName;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getPincode() {
return pincode;
}
public void setPincode(String pincode) {
this.pincode = pincode;
}
}
| [
"appslelo.com@gmail.com"
] | appslelo.com@gmail.com |
cb3dad4c0253e219b76ad762f1f64efe4cfd52c9 | f7ad5c481b1d9d744ea4cdec7ba5aa6348a005c2 | /samples/WiEngineDemos_java/src/com/wiyun/engine/tests/node/CoverFlowTest.java | 6516ceba039705726b11d7467393655105a2fceb | [
"MIT"
] | permissive | acremean/WiEngine | 6998ee27292950ecb45c7a31ff4ed3cb0b829359 | a8267bbb797b0d7326a06e1a02831a93edf007d6 | refs/heads/master | 2021-01-16T19:03:18.259754 | 2013-01-14T08:02:15 | 2013-01-14T08:02:15 | 7,600,630 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,818 | java | /*
* Copyright (c) 2010 WiYun Inc.
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
/*
* Copyright (c) 2010 WiYun Inc.
* Author: luma(stubma@gmail.com)
*
* For all entities this program is free software; you can redistribute
* it and/or modify it under the terms of the 'WiEngine' license with
* the additional provision that 'WiEngine' must be credited in a manner
* that can be be observed by end users, for example, in the credits or during
* start up. (please find WiEngine logo in sdk's logo folder)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.wiyun.engine.tests.node;
import static android.view.KeyEvent.KEYCODE_BACK;
import android.content.Context;
import android.view.KeyEvent;
import android.view.MotionEvent;
import com.wiyun.engine.WiEngineTestActivity;
import com.wiyun.engine.nodes.Cover;
import com.wiyun.engine.nodes.Director;
import com.wiyun.engine.nodes.Layer;
import com.wiyun.engine.nodes.CoverFlow;
import com.wiyun.engine.opengl.Texture2D;
import com.wiyun.engine.types.WYSize;
public class CoverFlowTest extends WiEngineTestActivity {
private CoverFlow m_coverFlow;
@Override
protected Layer createLayer() {
return new MyLayer();
}
class MyLayer extends Layer {
public MyLayer() {
WYSize s = Director.getInstance().getWindowSize();
float width = s.width;
float height = s.height;
m_coverFlow = CoverFlow.make();
m_coverFlow.setAnchor(0.0f, 0.0f);
m_coverFlow.setPosition(width / 2, height / 2);
m_coverFlow.setFrontCoverSize(width / 3, width / 3, true);
Cover[] covers = new Cover[9];
Context context = Director.getInstance().getContext();
int id1 = context.getResources().getIdentifier("atlastest", "drawable", context.getPackageName());
int id2 = context.getResources().getIdentifier("test_jpg", "drawable", context.getPackageName());
for(int i = 0; i < 9; ++i) {
if(i % 2 == 0) {
covers[i] = Cover.make(Texture2D.makePNG(id1));
} else {
covers[i] = Cover.make(Texture2D.makeJPG(id2));
}
m_coverFlow.addCover(covers[i]);
}
covers[4].setRotateY(0.0f);
m_coverFlow.setBlurredBorderWidth(0.1f);
m_coverFlow.setFrontCenterPosition(0, 50);
m_coverFlow.showCover(covers[4], 0.0f);
addChild(m_coverFlow);
// enable touch
setTouchEnabled(true);
setKeyEnabled(true);
}
@Override
public boolean wyTouchesBegan(MotionEvent event) {
Cover c = m_coverFlow.getTouchedCover(event.getX(), event.getY());
if(c != null) {
int distance = m_coverFlow.getIndex(c) - m_coverFlow.getIndex(m_coverFlow.getFrontCover());
if(distance < 0)
distance = -distance;
m_coverFlow.showCover(c, distance * 0.3f);
}
return true;
}
@Override
public boolean wyKeyDown(KeyEvent event) {
// don't handle back key
if(event.getKeyCode() == KEYCODE_BACK)
return false;
else
return true;
}
@Override
public boolean wyKeyUp(KeyEvent event) {
switch(event.getKeyCode()) {
case KeyEvent.KEYCODE_DPAD_LEFT:
m_coverFlow.moveLeft(0.3f);
return true;
case KeyEvent.KEYCODE_DPAD_RIGHT:
m_coverFlow.moveRight(0.3f);
return true;
default:
return super.wyKeyUp(event);
}
}
}
} | [
"stubma@gmail.com"
] | stubma@gmail.com |
c14ecb8fa749d996951d4e9fad524466c530289a | 839081116fede42a76a08c0cfeafc8a947130399 | /vraptor-crud/src/main/java/com/pmrodrigues/vraptor/crud/resolvers/crud/RouteFactory.java | 52ca42f26e55337b4dc958a45db0f2c2efddd585 | [] | no_license | marcelosrodrigues/com.pmrodrigues | 167ba2e8db543f271bdc3c699e4589821d606d98 | 340fc58b6fd69a16c628b888246dfa8c76f56f43 | refs/heads/master | 2021-01-10T21:47:17.301799 | 2015-09-22T14:23:06 | 2015-09-22T14:23:14 | 34,732,728 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 610 | java | package com.pmrodrigues.vraptor.crud.resolvers.crud;
import java.lang.reflect.Method;
import java.util.ResourceBundle;
/**
* Created by Marceloo on 09/04/2015.
*/
final class RouteFactory {
private static final ResourceBundle routes = ResourceBundle.getBundle("route");
private RouteFactory() {
}
public static RouteConfig create(final Method metodo) {
final String nomeMetodo = metodo.getName();
if (routes.containsKey(nomeMetodo)) {
return new CRUDRouteConfig(metodo);
} else {
return new DefaultRouteConfig(metodo);
}
}
}
| [
"marcelosrodrigues@globo.com"
] | marcelosrodrigues@globo.com |
de541ccfcefe20281990492960469e188fc3a925 | 564abbca1993ddb4a6a2e16ff056fc15b48143ff | /Anteros-Java-Delphi/src/br/com/anteros/javatodelphi/parser/statement/ExpressionStatement.java | ab1626a002f33fc81aa8def9ed38753958ebdb66 | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | anterostecnologia/anterosjavadelphi | 8949298025ed4190709f070c00ca2636985e6483 | 0de9b1c7a64dc774801410be07745d19897107f4 | refs/heads/master | 2021-01-01T03:50:53.087855 | 2016-04-12T19:55:14 | 2016-04-12T19:55:14 | 56,148,422 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,007 | java | /*******************************************************************************
* Copyright 2012 Anteros Tecnologia
*
* 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 br.com.anteros.javatodelphi.parser.statement;
public class ExpressionStatement extends Statement {
public ExpressionStatement(String name) {
super(name);
}
@Override
public String toString() {
return codeOfStatement+";\n";
}
}
| [
"edsonmartins2005@gmail.com"
] | edsonmartins2005@gmail.com |
65330e852e9e82573e17ea14a931838915d75b52 | d7c5121237c705b5847e374974b39f47fae13e10 | /airspan.netspan/src/main/java/Netspan/NBI_15_1/Lte/CallTraceProfileUpdate.java | ac909a4ecee4fcfd6f6e034bdb710f9f8319941f | [] | no_license | AirspanNetworks/SWITModules | 8ae768e0b864fa57dcb17168d015f6585d4455aa | 7089a4b6456621a3abd601cc4592d4b52a948b57 | refs/heads/master | 2022-11-24T11:20:29.041478 | 2020-08-09T07:20:03 | 2020-08-09T07:20:03 | 184,545,627 | 1 | 0 | null | 2022-11-16T12:35:12 | 2019-05-02T08:21:55 | Java | UTF-8 | Java | false | false | 2,346 | java |
package Netspan.NBI_15_1.Lte;
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="Name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="CallTraceProfile" type="{http://Airspan.Netspan.WebServices}CallTraceProfile" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"name",
"callTraceProfile"
})
@XmlRootElement(name = "CallTraceProfileUpdate")
public class CallTraceProfileUpdate {
@XmlElement(name = "Name")
protected String name;
@XmlElement(name = "CallTraceProfile")
protected CallTraceProfile callTraceProfile;
/**
* Gets the value of the name property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getName() {
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setName(String value) {
this.name = value;
}
/**
* Gets the value of the callTraceProfile property.
*
* @return
* possible object is
* {@link CallTraceProfile }
*
*/
public CallTraceProfile getCallTraceProfile() {
return callTraceProfile;
}
/**
* Sets the value of the callTraceProfile property.
*
* @param value
* allowed object is
* {@link CallTraceProfile }
*
*/
public void setCallTraceProfile(CallTraceProfile value) {
this.callTraceProfile = value;
}
}
| [
"build.Airspan.com"
] | build.Airspan.com |
f7c954055d020ea1b3158537dc3176fe4a24e414 | f5acc62313d68425aa0f1a4d5e7feb2142f93085 | /result/QuixBugs/ComFix-L patches/find_in_sorted/60/FIND_IN_SORTED.java | 348fd9eb2ef1f5e7ee1974f713544de93b335b6c | [] | no_license | mou23/Combined-Similarity-Based-Automated-Program-Repair-Approaches-for-Expression-Level-Bugs | 45eec7eff7fbba77c6c63b71a29d65ff391b99d1 | 55f5f7fa161177bba4956c3c77d191cd595a4c51 | refs/heads/master | 2023-06-11T17:17:57.120523 | 2023-05-27T06:47:35 | 2023-05-27T06:47:35 | 299,924,382 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 752 | java | package java_programs;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author derricklin
*/
public class FIND_IN_SORTED {
public static int binsearch(int[] arr, int x, int start, int end) {
if (start == start + (end - start) / 2) {
return -1;
}
int mid = start + (end - start) / 2; // check this is floor division
if (x < arr[mid]) {
return binsearch(arr, x, start, mid);
} else if (x > arr[mid]) {
return binsearch(arr, x, mid, end);
} else {
return mid;
}
}
public static int find_in_sorted(int[] arr, int x) {
return binsearch(arr, x, 0, arr.length);
}
}
| [
"bsse0731@iit.du.ac.bd"
] | bsse0731@iit.du.ac.bd |
f73853323a6ced64eaf1b5bf228b98de206f0b40 | d5f55e334ff3546e604199a07ae642aae2ace952 | /src/main/java/com/fauteuil/msprmaintenanceevolutiveapp/config/Constants.java | da067c813023bcc9f42b3b70c5e8a17302f5921c | [] | no_license | MSPR-Maintenance-Evolution/mspr-maintenance-evolutive-app | ed4d1337a979c1574b32947f68eafa18005e3059 | ec5dde7f16092295ddbdeae041c46254978d55ba | refs/heads/master | 2021-02-13T04:56:56.206851 | 2020-03-03T14:52:59 | 2020-03-03T14:52:59 | 244,639,000 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 441 | java | package com.fauteuil.msprmaintenanceevolutiveapp.config;
/**
* Application constants.
*/
public final class Constants {
// Regex for acceptable logins
public static final String LOGIN_REGEX = "^[_.@A-Za-z0-9-]*$";
public static final String SYSTEM_ACCOUNT = "system";
public static final String DEFAULT_LANGUAGE = "en";
public static final String ANONYMOUS_USER = "anonymoususer";
private Constants() {
}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
4be3ed4240c011a9edba533cd9d0ab127b5ccfde | 6c0cb4667b35fc62d2ddfeda22690bd355fce8d1 | /app/src/main/java/ru/mgusev/easyredminetimer/domain/interactor/project_list/GetProjectListParams.java | 153b084071c28dd1bcde92fec5e191c1abb0f168 | [] | no_license | vinsmain/easyredmine | 1be815571b7286acf1bd4d0728b654c59a1caeac | 79a21ccfbbb1e26649601d732d2bcd6260f684ac | refs/heads/master | 2022-12-13T23:17:21.595245 | 2020-09-06T08:21:34 | 2020-09-06T08:21:34 | 276,583,854 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 861 | java | package ru.mgusev.easyredminetimer.domain.interactor.project_list;
import java.util.LinkedHashMap;
import java.util.Map;
import ru.mgusev.easyredminetimer.domain.interactor._base.BaseUseCaseParams;
public class GetProjectListParams extends BaseUseCaseParams {
//https://task.sitesoft.su/projects.json?offset=0&limit=1&key=1555c02cbc52fca31c50383f437bad3cdb73b2ee
private final int offset;
private final int limit;
private final String key;
public GetProjectListParams(int offset, int limit, String key) {
this.offset = offset;
this.limit = limit;
this.key = key;
}
public Map<String, Object> toParams() {
Map<String, Object> params = new LinkedHashMap<>();
params.put("offset", offset);
params.put("limit", limit);
params.put("key", key);
return params;
}
} | [
"vinsmain@gmail.com"
] | vinsmain@gmail.com |
64c288f83c7f1b0dd4f8748915e946076445154e | b00c54389a95d81a22e361fa9f8bdf5a2edc93e3 | /external/apache-harmony/security/src/test/support/common/java/org/apache/harmony/security/tests/support/MySignature2.java | 59227a1554dfaa0fcfbeb5eb657c266e9b2242a5 | [
"Apache-2.0"
] | permissive | mirek190/x86-android-5.0 | 9d1756fa7ff2f423887aa22694bd737eb634ef23 | eb1029956682072bb7404192a80214189f0dc73b | refs/heads/master | 2020-05-27T01:09:51.830208 | 2015-10-07T22:47:36 | 2015-10-07T22:47:36 | 41,942,802 | 15 | 20 | null | 2020-03-09T00:21:03 | 2015-09-05T00:11:19 | null | UTF-8 | Java | false | false | 2,773 | java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @author Boris V. Kuznetsov
*/
package org.apache.harmony.security.tests.support;
import java.security.InvalidKeyException;
import java.security.InvalidParameterException;
import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.SignatureException;
import java.security.SignatureSpi;
/**
* Tests implementation of Signature
*/
public class MySignature2 extends SignatureSpi {
public static boolean runEngineInitVerify = false;
public static boolean runEngineInitSign = false;
public static boolean runEngineUpdate1 = false;
public static boolean runEngineUpdate2 = false;
public static boolean runEngineSign = false;
public static boolean runEngineVerify = false;
public static boolean runEngineSetParameter = false;
public static boolean runEngineGetParameter = false;
protected void engineInitVerify(PublicKey publicKey)
throws InvalidKeyException {
runEngineInitVerify = true;
}
protected void engineInitSign(PrivateKey privateKey)
throws InvalidKeyException {
runEngineInitSign = true;
}
protected void engineUpdate(byte b) throws SignatureException {
runEngineUpdate1 = true;
}
protected void engineUpdate(byte[] b, int off, int len)
throws SignatureException {
runEngineUpdate2 = true;
}
protected byte[] engineSign() throws SignatureException {
runEngineSign = true;
return null;
}
protected boolean engineVerify(byte[] sigBytes) throws SignatureException {
runEngineVerify = true;
return false;
}
protected void engineSetParameter(String param, Object value)
throws InvalidParameterException {
runEngineSetParameter = true;
}
protected Object engineGetParameter(String param)
throws InvalidParameterException {
runEngineGetParameter = true;
return null;
}
}
| [
"mirek190@gmail.com"
] | mirek190@gmail.com |
4fcdb03565524f4597b13b1992a5d7d17ac516ca | fa1408365e2e3f372aa61e7d1e5ea5afcd652199 | /src/testcases/CWE190_Integer_Overflow/s07/CWE190_Integer_Overflow__short_rand_preinc_81_bad.java | acea47d064c4a55d798e1380378fb0a959497926 | [] | no_license | bqcuong/Juliet-Test-Case | 31e9c89c27bf54a07b7ba547eddd029287b2e191 | e770f1c3969be76fdba5d7760e036f9ba060957d | refs/heads/master | 2020-07-17T14:51:49.610703 | 2019-09-03T16:22:58 | 2019-09-03T16:22:58 | 206,039,578 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,110 | java | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE190_Integer_Overflow__short_rand_preinc_81_bad.java
Label Definition File: CWE190_Integer_Overflow.label.xml
Template File: sources-sinks-81_bad.tmpl.java
*/
/*
* @description
* CWE: 190 Integer Overflow
* BadSource: rand Set data to result of rand()
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: increment
* GoodSink: Ensure there will not be an overflow before incrementing data
* BadSink : Increment data, which can cause an overflow
* Flow Variant: 81 Data flow: data passed in a parameter to an abstract method
*
* */
package testcases.CWE190_Integer_Overflow.s07;
import testcasesupport.*;
import javax.servlet.http.*;
public class CWE190_Integer_Overflow__short_rand_preinc_81_bad extends CWE190_Integer_Overflow__short_rand_preinc_81_base
{
public void action(short data ) throws Throwable
{
/* POTENTIAL FLAW: if data == Short.MAX_VALUE, this will overflow */
short result = (short)(++data);
IO.writeLine("result: " + result);
}
}
| [
"bqcuong2212@gmail.com"
] | bqcuong2212@gmail.com |
740149725ef4b26187de5b053b3f6dfa6adedc69 | 40593f0da54f7ed23eba02c69c446f88fac2fbb6 | /JavaFundamentalsMay2018/Java OOP Basics/Exercises/01. DEFINING CLASSES - EXERCISES/04. Company Roster/p04_CompanyRoster/Employee.java | e0f8ce633ec1a62d4e2b6d8d8b82eee29c37ddc0 | [] | no_license | NinoBonev/SoftUni | 9edd2d1d747d95bbd39a8632c350840699600d31 | 938a489e2c8b4360de95d0207144313d016ef843 | refs/heads/master | 2021-06-29T13:22:37.277753 | 2019-04-16T19:18:53 | 2019-04-16T19:18:53 | 131,605,271 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,192 | java | package p04_CompanyRoster;
/**
* Created by Nino Bonev - 16.6.2018 г., 8:32
*/
public class Employee {
private String name;
private double salary;
private String position;
private String department;
private String email;
private int age;
public Employee() {
}
public Employee(String name, double salary, String position, String department, String email, int age) {
this(name, salary, position, department);
this.email = email;
this.age = age;
}
public Employee(String name, double salary, String position, String department) {
this.name = name;
this.salary = salary;
this.position = position;
this.department = department;
this.email = "n/a";
this.age = -1;
}
public Employee(String name, double salary, String position, String department, String email) {
this(name, salary, position, department);
this.email = email;
this.age = -1;
}
public Employee(String name, double salary, String position, String department, int age) {
this(name, salary, position, department);
this.age = age;
this.email = "n/a";
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public double getSalary() {
return salary;
}
public void setSalary(double salary) {
this.salary = salary;
}
public String getPosition() {
return position;
}
public void setPosition(String position) {
this.position = position;
}
public String getDepartment() {
return department;
}
public void setDepartment(String department) {
this.department = department;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
@Override
public String toString() {
return String.format("%s %.2f %s %d", this.name, this.salary, this.email, this.age);
}
}
| [
"nbonev@gmail.com"
] | nbonev@gmail.com |
945bca987ee6c885b3d11105813ddc8fa61a8a39 | 60552a01a18fe1a33e87e6e68cdd9f52546fd25d | /concilio-dei-4/src/main/java/client/controller/ClientConnection.java | 4ff96ea0b43f11232830cbbda63360270843725a | [] | no_license | Lanzu94/concilio-dei-4 | 8fc74bcc559a19d3f6371629d8620f72f2a1f061 | 19fae97575247c7043a017cc4d0219e3bf6b89c2 | refs/heads/master | 2020-03-22T14:29:58.333808 | 2018-07-08T16:37:00 | 2018-07-08T16:37:00 | 140,184,198 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 330 | java | package client.controller;
import java.io.Serializable;
import server.controller.RMIServerInterface;
/**
* This interface extends the RMI_ServerInterface. It will be implemented in 2 different way: ClientConnectionRMI and ClientConnectionSocket
*/
public interface ClientConnection extends RMIServerInterface, Serializable{
}
| [
"you@example.com"
] | you@example.com |
7c5c8ba3c5d76ebed0e3ac1a4b94098f0280ed0d | 439847f28dbbc23289d085548fa2e2221ac217b3 | /com.ibm.ive.tools.japt exec optimizer/src/java/lang/ClassCircularityError.java | 2f564ca0647bad5057d7013fb02664376812c9ae | [] | no_license | daniellansun/Japt-Bytecode-Optimizer-for-Java | e87aa8bec0371a34dff43aec8d3d24d9ccf2d601 | a5487fa3f3071f2a79be9dc48ec66370677ed822 | refs/heads/master | 2022-03-22T12:00:12.687609 | 2016-10-22T04:01:11 | 2016-10-22T04:01:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 199 | java | package java.lang;
public class ClassCircularityError extends LinkageError {
public ClassCircularityError() {}
public ClassCircularityError(String detailMessage) {
super(detailMessage);
}
}
| [
"seancfoley@yahoo.com"
] | seancfoley@yahoo.com |
7805b42fd9b735e0891a1d8bd12bcc4470b75b43 | 834184ae7fb5fc951ec4ca76d0ab4d74224817a0 | /src/main/java/com/nswt/framework/VerifyRuleList.java | b1a6d016d45ef67b014baad629cc8c82a38e3ad1 | [] | no_license | mipcdn/NswtOldPF | 3bf9974be6ffbc32b2d52ef2e39adbe495185c7e | fe7be46f12b3874a7f19967c0808870d8e465f5a | refs/heads/master | 2020-08-09T16:44:47.585700 | 2017-01-11T13:26:37 | 2017-01-11T13:26:37 | null | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 1,511 | java | package com.nswt.framework;
import java.util.ArrayList;
/**
* 校验规则的容器
*
* 作者:NSWT<br>
* 日期:2016-9-27<br>
* 邮件:nswt@nswt.com.cn<br>
*/
public class VerifyRuleList {
private ArrayList array = new ArrayList();
private String Message;
private RequestImpl Request;
private ResponseImpl Response;
/**
* 增加一个校验字段及其校验规则
*
* @param fieldID
* @param fieldName
* @param rule
*/
public void add(String fieldID, String fieldName, String rule) {
array.add(new String[] { fieldID, fieldName, rule });
}
/**
* 校验所有字段
*
* @return
*/
public boolean doVerify() {
VerifyRule rule = new VerifyRule();
boolean flag = true;
StringBuffer sb = new StringBuffer();
for (int i = 0; i < array.size(); i++) {
String[] f = (String[]) array.get(i);
rule.setRule(f[2]);
if (!rule.verify(Request.getString(f[0]))) {
sb.append(rule.getMessages(f[1]));
flag = false;
}
}
if (!flag) {
Response.setStatus(0);
Message = sb.toString();
Response.setMessage(sb.toString());
}
return flag;
}
public String getMessage() {
return Message;
}
public RequestImpl getRequest() {
return Request;
}
public void setRequest(RequestImpl request) {
Request = request;
}
public ResponseImpl getResponse() {
return Response;
}
public void setResponse(ResponseImpl response) {
Response = response;
}
}
| [
"18611949252@163.como"
] | 18611949252@163.como |
e973e311729c63f4727fb0083a50e8b18b43fa87 | 293365c8d91fdea849cdf4f0e246c0a34ff1bb28 | /src/main/xjc/java/ch/ehi/oereb/schemas/gml/_3_2/ParameterValue.java | 8bbed5c072383b431b4bc86a2af8db8ddd2ffa94 | [
"MIT"
] | permissive | edigonzales-dumpster/oereb-xml-validator | 81c15db0c3969202d108a15ec47737c2f04ed68a | 2160f6e20c5c9a0884d2ae06c3585366489249d2 | refs/heads/main | 2023-01-01T13:00:13.560398 | 2020-10-17T14:33:00 | 2020-10-17T14:33:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 972 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.07.28 at 05:34:43 PM CEST
//
package ch.ehi.oereb.schemas.gml._3_2;
import javax.xml.bind.JAXBElement;
import javax.xml.namespace.QName;
public class ParameterValue
extends JAXBElement<AbstractGeneralParameterValuePropertyTypeType>
{
protected final static QName NAME = new QName("http://www.opengis.net/gml/3.2", "parameterValue");
public ParameterValue(AbstractGeneralParameterValuePropertyTypeType value) {
super(NAME, ((Class) AbstractGeneralParameterValuePropertyTypeType.class), null, value);
}
public ParameterValue() {
super(NAME, ((Class) AbstractGeneralParameterValuePropertyTypeType.class), null, null);
}
}
| [
"edi.gonzales@gmail.com"
] | edi.gonzales@gmail.com |
545f34d83538110b1af596a7a2b7aba99dffaf1f | 9254e7279570ac8ef687c416a79bb472146e9b35 | /sofa-20190815/src/main/java/com/aliyun/sofa20190815/models/QueryLinkefabricFabricAllzoneRequest.java | 18191e1676a7471922daec60047e5cc6729e1cfc | [
"Apache-2.0"
] | permissive | lquterqtd/alibabacloud-java-sdk | 3eaa17276dd28004dae6f87e763e13eb90c30032 | 3e5dca8c36398469e10cdaaa34c314ae0bb640b4 | refs/heads/master | 2023-08-12T13:56:26.379027 | 2021-10-19T07:22:15 | 2021-10-19T07:22:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,559 | java | // This file is auto-generated, don't edit it. Thanks.
package com.aliyun.sofa20190815.models;
import com.aliyun.tea.*;
public class QueryLinkefabricFabricAllzoneRequest extends TeaModel {
@NameInMap("AppName")
public String appName;
@NameInMap("DevStage")
public String devStage;
@NameInMap("Env")
public String env;
@NameInMap("EnvId")
public Long envId;
@NameInMap("IsStandard")
public Boolean isStandard;
@NameInMap("ProjectId")
public String projectId;
@NameInMap("StrategyName")
public String strategyName;
@NameInMap("TenantId")
public Long tenantId;
public static QueryLinkefabricFabricAllzoneRequest build(java.util.Map<String, ?> map) throws Exception {
QueryLinkefabricFabricAllzoneRequest self = new QueryLinkefabricFabricAllzoneRequest();
return TeaModel.build(map, self);
}
public QueryLinkefabricFabricAllzoneRequest setAppName(String appName) {
this.appName = appName;
return this;
}
public String getAppName() {
return this.appName;
}
public QueryLinkefabricFabricAllzoneRequest setDevStage(String devStage) {
this.devStage = devStage;
return this;
}
public String getDevStage() {
return this.devStage;
}
public QueryLinkefabricFabricAllzoneRequest setEnv(String env) {
this.env = env;
return this;
}
public String getEnv() {
return this.env;
}
public QueryLinkefabricFabricAllzoneRequest setEnvId(Long envId) {
this.envId = envId;
return this;
}
public Long getEnvId() {
return this.envId;
}
public QueryLinkefabricFabricAllzoneRequest setIsStandard(Boolean isStandard) {
this.isStandard = isStandard;
return this;
}
public Boolean getIsStandard() {
return this.isStandard;
}
public QueryLinkefabricFabricAllzoneRequest setProjectId(String projectId) {
this.projectId = projectId;
return this;
}
public String getProjectId() {
return this.projectId;
}
public QueryLinkefabricFabricAllzoneRequest setStrategyName(String strategyName) {
this.strategyName = strategyName;
return this;
}
public String getStrategyName() {
return this.strategyName;
}
public QueryLinkefabricFabricAllzoneRequest setTenantId(Long tenantId) {
this.tenantId = tenantId;
return this;
}
public Long getTenantId() {
return this.tenantId;
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
df93624e5dfecbbcea2bdf15613e41c69b0b5378 | 810873bc64fd3daa082e8636a1b182e46a023638 | /drools-core/src/main/java/org/drools/ruleflow/common/datatype/impl/NewInstanceDataTypeFactory.java | 9bb3672fc233941c49318d1ced7eb2f31d9e8773 | [
"Apache-2.0"
] | permissive | pymma/drools47jdk8 | 7456d4cd54c20ba87ab7ae4e3ce38be7a7f9a11a | b532d45ac47806bef8c3a6cf1ac671c73ed4ea09 | refs/heads/master | 2022-07-29T17:25:35.788215 | 2021-11-23T09:39:10 | 2021-11-23T09:39:10 | 426,141,147 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,691 | java | package org.drools.ruleflow.common.datatype.impl;
/*
* Copyright 2005 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.
*/
import org.drools.ruleflow.common.datatype.DataType;
import org.drools.ruleflow.common.datatype.DataTypeFactory;
/**
* A data type factory that always returns a new instance of a given class.
*
* @author <a href="mailto:kris_verlaenen@hotmail.com">Kris Verlaenen</a>
*/
public class NewInstanceDataTypeFactory
implements
DataTypeFactory {
private Class dataTypeClass;
public NewInstanceDataTypeFactory(final Class dataTypeClass) {
this.dataTypeClass = dataTypeClass;
}
public DataType createDataType() {
try {
return (DataType) this.dataTypeClass.newInstance();
} catch ( final IllegalAccessException e ) {
throw new RuntimeException( "Could not create data type for class " + this.dataTypeClass,
e );
} catch ( final InstantiationException e ) {
throw new RuntimeException( "Could not create data type for class " + this.dataTypeClass,
e );
}
}
}
| [
"nicolas.heron@pymma-software.cop"
] | nicolas.heron@pymma-software.cop |
8e3be8b6c9b0681175a7d9a3652bf03ac0fa8e40 | 85986e4d862e6fd257eb1c3db6f6b9c82bc6c4d5 | /prjClienteSIC/src/main/java/ec/com/smx/sic/cliente/servicio/proveedor/IAuditoriaProveedorServicio.java | 1d3828a81a744257fb7894ec0f41dc615191af8b | [] | no_license | SebasBenalcazarS/RepoAngularJS | 1d60d0dec454fe4f1b1a8c434b656d55166f066f | 5c3e1d5bb4a624e30cba0d518ff0b0cda14aa92c | refs/heads/master | 2016-08-03T23:21:26.639859 | 2015-08-19T16:05:00 | 2015-08-19T16:05:00 | 40,517,374 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 468 | java | /**
*
*/
package ec.com.smx.sic.cliente.servicio.proveedor;
import java.io.Serializable;
import ec.com.smx.sic.cliente.exception.SICException;
/**
* @author mbraganza
*
*/
public interface IAuditoriaProveedorServicio extends Serializable {
/**
* @param codigoCompania
* @param codigoIdProveedor
* @return
* @throws SICException
*/
String obtenerIdLogAuditoriaProveedor(Integer codigoCompania, String codigoIdProveedor) throws SICException;
}
| [
"nbenalcazar@kruger.com.ec"
] | nbenalcazar@kruger.com.ec |
508b4091577a3a1907acb8fe5eb6c6d044e240ae | a4a4d88779d981efcb6f5725e589f97008535f02 | /src/test/java/week06/d04/ShoppingCartTest.java | e958233ccf64b171a8e361c488a278daacbe0c0e | [] | no_license | kincza1971/training-solutions | 1ba7bba4c90099c4a8d01c7382a8a4b6d0aed027 | 87e0e37a2acaff96f21df6014177d9f5496081b2 | refs/heads/master | 2023-03-23T22:40:15.720490 | 2021-03-24T13:38:25 | 2021-03-24T13:38:25 | 309,034,906 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,064 | java | package week06.d04;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertThrows;
public class ShoppingCartTest {
@Test
public void createTest() {
ShoppingCart sc = new ShoppingCart();
Exception ex = assertThrows(IllegalArgumentException.class,() ->sc.addItem("", 3));
Assertions.assertEquals(ex.getMessage(),"Name cannot be null or empty");
sc.addItem("Cukor", 5);
// sc.addItem("Cukor", -5);
Assertions.assertEquals(5,sc.getItem("cukor"));
}
@Test
public void incTest() {
ShoppingCart sc = new ShoppingCart();
sc.addItem("Só", 3);
Assertions.assertEquals(3,sc.getItem("só"));
sc.addItem("Só", 3);
Assertions.assertEquals(6,sc.getItem("só"));
sc.addItem("Só", -2);
Assertions.assertEquals(4,sc.getItem("só"));
sc.addItem("Cukor", 5);
Assertions.assertEquals(5,sc.getItem("cukor"));
System.out.println(sc.getItemList());
}
}
| [
"kincza@gmail.com"
] | kincza@gmail.com |
395d472154cf376b0ea38721ec09b5e32ec931ce | 45f05c515e311d16eb48094b6d6617d6b6987397 | /lucihunt-lucene5.0/src/main/java/com/yida/framework/lucene5/score/payload/BoldAnalyzer.java | 804ca594489387f964a8eaa2e5c5eefc615a2c32 | [
"Apache-2.0"
] | permissive | lemonJun/LuciHunt | 5328dd270e891e302bf985a1a2517dcaa95def9d | 08c71f80be580e5ebcbb519eb2aff1f3cfee55a8 | refs/heads/master | 2021-01-18T19:32:47.065466 | 2017-05-03T09:52:13 | 2017-05-03T09:52:13 | 86,899,911 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 876 | java | package com.yida.framework.lucene5.score.payload;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.Tokenizer;
import org.apache.lucene.analysis.core.LowerCaseFilter;
import org.apache.lucene.analysis.core.StopAnalyzer;
import org.apache.lucene.analysis.core.StopFilter;
import org.apache.lucene.analysis.core.WhitespaceTokenizer;
public class BoldAnalyzer extends Analyzer {
@Override
protected TokenStreamComponents createComponents(String fieldName) {
Tokenizer tokenizer = new WhitespaceTokenizer();
TokenStream tokenStream = new BoldFilter(tokenizer);
tokenStream = new LowerCaseFilter(tokenStream);
tokenStream = new StopFilter(tokenStream, StopAnalyzer.ENGLISH_STOP_WORDS_SET);
return new TokenStreamComponents(tokenizer, tokenStream);
}
}
| [
"506526593@qq.com"
] | 506526593@qq.com |
6eccdc4bd8214e16334d6247dc222cc1a12009d3 | 6437240eddd7c33372fccab081395d4c6d45aa92 | /repcomModulo/template/src/main/java/br/com/lojadigicom/repcom/data/helper/UsuarioDbHelper.java | 21e6d0e53a897ddcbe9f135efd787d921191ced6 | [] | no_license | paulofor/projeto-android-aplicacao | 49a530533496ec4a11dcb0a86ed9e9b75f2f9a4a | 2aa9c244a830f12cf120f45727d7474203619c59 | refs/heads/master | 2021-01-05T06:04:29.225920 | 2020-02-16T14:45:25 | 2020-02-16T14:45:25 | 240,908,240 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,001 | java |
package br.com.lojadigicom.repcom.data.helper;
import br.com.lojadigicom.repcom.data.contract.*;
public class UsuarioDbHelper {
protected static String getSqlChavesEstrangeiras() {
return "ALTER TABLE " +
UsuarioContract.TABLE_NAME + " " +
";";
}
protected static String getSqlCreate(){
return "CREATE TABLE IF NOT EXISTS "
+ UsuarioContract.TABLE_NAME + " (" +
UsuarioContract.COLUNA_CHAVE + " INTEGER PRIMARY KEY "
+ " , " + UsuarioContract.COLUNA_NOME + " TEXT "
+ " , " + UsuarioContract.COLUNA_NUMERO_CELULAR + " TEXT "
+ " , " + UsuarioContract.COLUNA_MELHOR_PATH + " TEXT "
//+ getSqlChaveEstrangeira()
+ getSqlProcValor()
+ getSqlIndices()
+ ");";
}
protected static String getSqlCreateSinc(){
return "CREATE TABLE IF NOT EXISTS "
+ UsuarioContract.TABLE_NAME_SINC + " (" +
UsuarioContract.COLUNA_CHAVE + " INTEGER "
+ " , " + UsuarioContract.COLUNA_NOME + " TEXT "
+ " , " + UsuarioContract.COLUNA_NUMERO_CELULAR + " TEXT "
+ " , " + UsuarioContract.COLUNA_MELHOR_PATH + " TEXT "
+ ", operacao_sinc TEXT);";
}
private static String getSqlIndices() {
return "";
}
private static String getSqlProcValor() {
String saida = "";
return saida;
}
private static String getSqlChaveEstrangeira() {
String saida = "";
return saida;
}
public static String getSqlDrop() {
return "DROP TABLE IF EXISTS " + UsuarioContract.TABLE_NAME;
}
public static String getSqlDropSinc() {
return "DROP TABLE IF EXISTS " + UsuarioContract.TABLE_NAME_SINC;
}
public static String onUpgrade(int oldVersion, int newVersion) { // pode precisar dos params no futuro
return "DROP TABLE IF EXISTS " + UsuarioContract.TABLE_NAME;
}
public static String onUpgradeSinc(int oldVersion, int newVersion) { // pode precisar dos params no futuro
return "DROP TABLE IF EXISTS " + UsuarioContract.TABLE_NAME_SINC;
}
} | [
"paulofore@gmail.com"
] | paulofore@gmail.com |
1211e69fa1a5619694ddcd4b78eee07120610bf0 | 0ceafc2afe5981fd28ce0185e0170d4b6dbf6241 | /AlgoKit (3rdp)/Code-store v0.0/java/src/experimental/trees/SegmentTreeIntervalAddSumTest.java | 8b7e53d2ad0092cf2ab7e15021608cd20c590ca7 | [] | no_license | brainail/.happy-coooding | 1cd617f6525367133a598bee7efb9bf6275df68e | cc30c45c7c9b9164095905cc3922a91d54ecbd15 | refs/heads/master | 2021-06-09T02:54:36.259884 | 2021-04-16T22:35:24 | 2021-04-16T22:35:24 | 153,018,855 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,261 | java | package experimental.trees;
import java.util.Random;
public class SegmentTreeIntervalAddSumTest {
static class ReferenceTree {
int n;
int[] v;
public ReferenceTree(int n) {
this.n = n;
v = new int[n];
}
public void add(int a, int b, int value) {
for (int i = a; i <= b; i++) {
v[i] += value;
}
}
int sum(int a, int b) {
int res = 0;
for (int i = a; i <= b; i++) {
res += v[i];
}
return res;
}
int get(int i) {
return v[i];
}
void set(int i, int value) {
v[i] = value;
}
}
public static void main(String[] args) {
Random rnd = new Random(1);
for (int step = 0; step < 100; step++) {
int n = rnd.nextInt(2) + 1;
ReferenceTree rt = new ReferenceTree(n);
SegmentTreeIntervalAddSum t = new SegmentTreeIntervalAddSum(n);
for (int i = 0; i < 100; i++) {
int a;
int b;
do {
a = rnd.nextInt(n);
b = rnd.nextInt(n);
} while (a > b);
int value = rnd.nextInt(100);
int type = rnd.nextInt(2);
if (type == 0) {
rt.add(a, b, value);
t.add(a, b, value);
} else if (type == 1) {
int res1 = rt.sum(a, b);
int res2 = t.sum(a, b);
if (res1 != res2) {
System.err.println(res1 + " " + res2);
}
}
}
}
}
}
| [
"wsemirz@gmail.com"
] | wsemirz@gmail.com |
3b362f87929ab7245aa3f2d094674a7255c06566 | 19c445c78c95e340dac3c838150c40e1580b4e92 | /src/test/java/com/fasterxml/jackson/databind/type/PolymorphicList036Test.java | 75dda08bfeca348c453a410cd6951154edb88924 | [
"Apache-2.0"
] | permissive | FasterXML/jackson-databind | c718cf79367c61e8e56c35defe3d8a75d8969c1c | 39c4f1f5b5d1c03e183a141641021019b87e61a0 | refs/heads/2.16 | 2023-08-29T00:20:02.632707 | 2023-08-26T01:58:29 | 2023-08-26T01:58:29 | 3,038,937 | 3,270 | 1,604 | Apache-2.0 | 2023-09-12T16:54:41 | 2011-12-23T07:17:41 | Java | UTF-8 | Java | false | false | 2,819 | java | package com.fasterxml.jackson.databind.type;
import java.util.*;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.databind.*;
// For [databind#936], losing parametric type information it seems
public class PolymorphicList036Test extends BaseMapTest
{
// note: would prefer using CharSequence, but while abstract, that's deserialized
// just fine as ... String
static class StringyList<T extends java.io.Serializable> implements Collection<T> {
private Collection<T> _stuff;
@JsonCreator
public StringyList(Collection<T> src) {
_stuff = new ArrayList<T>(src);
}
public StringyList() {
_stuff = new ArrayList<T>();
}
@Override
public boolean add(T arg) {
return _stuff.add(arg);
}
@Override
public boolean addAll(Collection<? extends T> args) {
return _stuff.addAll(args);
}
@Override
public void clear() {
_stuff.clear();
}
@Override
public boolean contains(Object arg) {
return _stuff.contains(arg);
}
@Override
public boolean containsAll(Collection<?> args) {
return _stuff.containsAll(args);
}
@Override
public boolean isEmpty() {
return _stuff.isEmpty();
}
@Override
public Iterator<T> iterator() {
return _stuff.iterator();
}
@Override
public boolean remove(Object arg) {
return _stuff.remove(arg);
}
@Override
public boolean removeAll(Collection<?> args) {
return _stuff.removeAll(args);
}
@Override
public boolean retainAll(Collection<?> args) {
return _stuff.retainAll(args);
}
@Override
public int size() {
return _stuff.size();
}
@Override
public Object[] toArray() {
return _stuff.toArray();
}
@Override
public <X> X[] toArray(X[] arg) {
return _stuff.toArray(arg);
}
}
private final ObjectMapper MAPPER = new ObjectMapper();
public void testPolymorphicWithOverride() throws Exception
{
JavaType type = MAPPER.getTypeFactory().constructCollectionType(StringyList.class, String.class);
StringyList<String> list = new StringyList<String>();
list.add("value 1");
list.add("value 2");
String serialized = MAPPER.writeValueAsString(list);
// System.out.println(serialized);
StringyList<String> deserialized = MAPPER.readValue(serialized, type);
// System.out.println(deserialized);
assertNotNull(deserialized);
}
}
| [
"tatu.saloranta@iki.fi"
] | tatu.saloranta@iki.fi |
bf65b4865dbdb5a31a2ca6ee030e854a7630c4dc | f88ab225f8dda42410cb11bce2608a07aeeb7f35 | /2. Interview/12OrderStatsHeapHash/Pep_JavaIP_12OrderStatsHeapHash_401SurpasserCountOfEachElement.java | f8e49e45cb0012bf8c554eecd1f73f633da589a4 | [] | no_license | arunnayan/IP_questionSet | 32b64c305edb88348c7626b2b42ab9d6529d4cb5 | 7a35951c5754ba4ca567c1357249f66e23fbe42c | refs/heads/master | 2023-03-16T18:38:51.385676 | 2019-08-01T12:10:35 | 2019-08-01T12:10:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,563 | java | package OrderStatsHeapHash;
import java.util.HashMap;
import java.util.Scanner;
public class Pep_JavaIP_12OrderStatsHeapHash_401SurpasserCountOfEachElement {
public static void main(String[] args) {
Scanner scn = new Scanner(System.in);
int[] arr = new int[scn.nextInt()];
for (int i = 0; i < arr.length; i++) {
arr[i] = scn.nextInt();
}
HashMap<Integer, Integer> map = new HashMap<>();
for (int i = 0; i < arr.length; i++) {
map.put(arr[i], 0);
}
mergeSort(arr, map, 0, arr.length - 1);
System.out.println(map);
}
private static void mergeSort(int[] arr, HashMap<Integer, Integer> map, int i, int j) {
if (i == j) {
return;
}
int mid = (i + j) / 2;
mergeSort(arr, map, i, mid);
mergeSort(arr, map, mid + 1, j);
merge(arr, map, i, mid + 1, j);
}
private static void merge(int[] arr, HashMap<Integer, Integer> map, int i, int mid, int j) {
int[] left = new int[mid - i];
int[] right = new int[j - mid + 1];
for (int i1 = 0; i1 < left.length; ++i1)
left[i1] = arr[i + i1];
for (int j1 = 0; j1 < right.length; ++j1)
right[j1] = arr[mid + j1];
int count = 0;
int fp = 0;
int sp = 0;
int k = i;
while (fp < left.length && sp < right.length) {
if (left[fp] < right[sp]) {
map.put(left[fp], map.get(left[fp]) + right.length - sp);
arr[k] = left[fp];
fp++;
} else {
arr[k] = right[sp];
sp++;
}
k++;
}
while (fp < left.length) {
arr[k] = left[fp];
fp++;
k++;
}
while (sp < right.length) {
arr[k] = right[sp];
sp++;
k++;
}
}
}
| [
"32850197+rajneeshkumar146@users.noreply.github.com"
] | 32850197+rajneeshkumar146@users.noreply.github.com |
c9317db7e875d6f540c8a268ccb278ae7931149b | bce85a73250db153767d67faf9ab47d482c4cfca | /MemberBoard/src/main/java/com/icia/mboard/dto/BoardDTO.java | 6fba36a37db74d92826543ce42dd14bc3c93e24b | [] | no_license | punch0325/- | bacebccccef0752ddf1ca5e47e8462813689db16 | d431a5e5c09d3d0d70a540e068129bdef94807d8 | refs/heads/master | 2022-12-30T19:53:38.490956 | 2020-10-21T01:56:24 | 2020-10-21T01:56:24 | 305,878,931 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 452 | java | package com.icia.mboard.dto;
import java.sql.Date;
import org.springframework.web.multipart.MultipartFile;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
@Getter
@Setter
@ToString
public class BoardDTO {
private int bnumber;
private String bwriter;
private String btitle;
private String bcontents;
private Date bdate;
private int bhits;
private MultipartFile bfile;
private String bfilename;
}
| [
"1@1-PC"
] | 1@1-PC |
d7ad3dde9223695609f1e3ecf0828e319bdc06e9 | 445c3cf84dd4bbcbbccf787b2d3c9eb8ed805602 | /aliyun-java-sdk-ecsops/src/main/java/com/aliyuncs/ecsops/transform/v20160401/OpsListEventsResponseUnmarshaller.java | e1b17557733d443c750ee303edb6d2b882e42736 | [
"Apache-2.0"
] | permissive | caojiele/aliyun-openapi-java-sdk | b6367cc95469ac32249c3d9c119474bf76fe6db2 | ecc1c949681276b3eed2500ec230637b039771b8 | refs/heads/master | 2023-06-02T02:30:02.232397 | 2021-06-18T04:08:36 | 2021-06-18T04:08:36 | 172,076,930 | 0 | 0 | NOASSERTION | 2019-02-22T14:08:29 | 2019-02-22T14:08:29 | null | UTF-8 | Java | false | false | 2,909 | 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.ecsops.transform.v20160401;
import java.util.ArrayList;
import java.util.List;
import com.aliyuncs.ecsops.model.v20160401.OpsListEventsResponse;
import com.aliyuncs.ecsops.model.v20160401.OpsListEventsResponse.Event;
import java.util.Map;
import com.aliyuncs.transform.UnmarshallerContext;
public class OpsListEventsResponseUnmarshaller {
public static OpsListEventsResponse unmarshall(OpsListEventsResponse opsListEventsResponse, UnmarshallerContext _ctx) {
opsListEventsResponse.setRequestId(_ctx.stringValue("OpsListEventsResponse.RequestId"));
opsListEventsResponse.setCode(_ctx.stringValue("OpsListEventsResponse.Code"));
opsListEventsResponse.setMessage(_ctx.stringValue("OpsListEventsResponse.Message"));
opsListEventsResponse.setSuccess(_ctx.stringValue("OpsListEventsResponse.Success"));
opsListEventsResponse.setPageNumber(_ctx.integerValue("OpsListEventsResponse.PageNumber"));
opsListEventsResponse.setPageSize(_ctx.integerValue("OpsListEventsResponse.PageSize"));
opsListEventsResponse.setTotalCount(_ctx.integerValue("OpsListEventsResponse.TotalCount"));
List<Event> events = new ArrayList<Event>();
for (int i = 0; i < _ctx.lengthValue("OpsListEventsResponse.Events.Length"); i++) {
Event event = new Event();
event.setEventID(_ctx.stringValue("OpsListEventsResponse.Events["+ i +"].eventID"));
event.setEventType(_ctx.stringValue("OpsListEventsResponse.Events["+ i +"].eventType"));
event.setEventTypeVersion(_ctx.stringValue("OpsListEventsResponse.Events["+ i +"].eventTypeVersion"));
event.setCloudEventsVersion(_ctx.stringValue("OpsListEventsResponse.Events["+ i +"].cloudEventsVersion"));
event.setSource(_ctx.stringValue("OpsListEventsResponse.Events["+ i +"].source"));
event.setEventTime(_ctx.stringValue("OpsListEventsResponse.Events["+ i +"].eventTime"));
event.setSchemaURL(_ctx.stringValue("OpsListEventsResponse.Events["+ i +"].schemaURL"));
event.setContentType(_ctx.stringValue("OpsListEventsResponse.Events["+ i +"].contentType"));
event.setExtensions(_ctx.mapValue("OpsListEventsResponse.Events["+ i +"].extensions"));
event.setData(_ctx.mapValue("OpsListEventsResponse.Events["+ i +"].data"));
events.add(event);
}
opsListEventsResponse.setEvents(events);
return opsListEventsResponse;
}
} | [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
e340af0eb0debf9be4fb8f6e986669ddd55121dc | 8e94005abdd35f998929b74c19a86b7203c3dbbc | /src/DFSBFS/Point.java | 7bd9f71b39e599bb695ad29a19e643a4edf391a1 | [] | no_license | tinapgaara/leetcode | d1ced120da9ca74bfc1712c4f0c5541ec12cf980 | 8a93346e7476183ecc96065062da8585018b5a5b | refs/heads/master | 2020-12-11T09:41:39.468895 | 2018-04-24T07:15:27 | 2018-04-24T07:15:27 | 43,688,533 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 494 | java | package DFSBFS;
/**
* Created by yingtan on 9/24/15.
*/
public class Point {
public int m_x ;
public int m_y;
public int m_dist;
public Point m_prev;
public Point(int x, int y, int dist) {
m_x = x;
m_y = y;
m_dist = dist;
}
public Point(int x, int y) {
m_x = x;
m_y = y;
}
public Point(int x, int y, int dist, Point prev) {
m_x = x;
m_y = y;
m_dist = dist;
m_prev = prev;
}
}
| [
"yt2443@columbia.edu"
] | yt2443@columbia.edu |
e74f44c0d2adf3902c5f256ee39b7950ddd1ffcb | c81dd37adb032fb057d194b5383af7aa99f79c6a | /java/com/facebook/ads/redexgen/X/C0288Av.java | 54df07fd3a880a729e7579928fa0922ffbf78c5e | [] | no_license | hongnam207/pi-network-source | 1415a955e37fe58ca42098967f0b3307ab0dc785 | 17dc583f08f461d4dfbbc74beb98331bf7f9e5e3 | refs/heads/main | 2023-03-30T07:49:35.920796 | 2021-03-28T06:56:24 | 2021-03-28T06:56:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,326 | java | package com.facebook.ads.redexgen.X;
import android.annotation.TargetApi;
import android.media.AudioAttributes;
import androidx.annotation.Nullable;
/* renamed from: com.facebook.ads.redexgen.X.Av reason: case insensitive filesystem */
public final class C0288Av {
public static final C0288Av A04 = new C0287Au().A00();
public AudioAttributes A00;
public final int A01;
public final int A02;
public final int A03;
public C0288Av(int i, int i2, int i3) {
this.A01 = i;
this.A02 = i2;
this.A03 = i3;
}
@TargetApi(21)
public final AudioAttributes A00() {
if (this.A00 == null) {
this.A00 = new AudioAttributes.Builder().setContentType(this.A01).setFlags(this.A02).setUsage(this.A03).build();
}
return this.A00;
}
public final boolean equals(@Nullable Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
C0288Av av = (C0288Av) obj;
if (this.A01 == av.A01 && this.A02 == av.A02 && this.A03 == av.A03) {
return true;
}
return false;
}
public final int hashCode() {
return (((((17 * 31) + this.A01) * 31) + this.A02) * 31) + this.A03;
}
}
| [
"nganht2@vng.com.vn"
] | nganht2@vng.com.vn |
1be102b1ffeba22ca6feeff909f0cffdaa3f0117 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/12/12_76047373753d0b08b27fdd32dd5f652c5b8ea8e3/AttributeEventManager/12_76047373753d0b08b27fdd32dd5f652c5b8ea8e3_AttributeEventManager_t.java | a9b620b3ee335f7085662ddb715b2dcf63638f0e | [] | 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,433 | java | /*
Copyright 2008-2010 Gephi
Authors : Mathieu Bastian <mathieu.bastian@gephi.org>
Website : http://www.gephi.org
This file is part of Gephi.
Gephi is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
Gephi 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 Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with Gephi. If not, see <http://www.gnu.org/licenses/>.
*/
package org.gephi.data.attributes.event;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.atomic.AtomicReference;
import org.gephi.data.attributes.AbstractAttributeModel;
import org.gephi.data.attributes.api.AttributeColumn;
import org.gephi.data.attributes.api.AttributeEvent;
import org.gephi.data.attributes.api.AttributeListener;
import org.gephi.data.attributes.api.AttributeValue;
/**
*
* @author Mathieu Bastian
*/
public class AttributeEventManager implements Runnable {
//Const
private final static long DELAY = 1;
//Architecture
private final AbstractAttributeModel model;
private final List<AttributeListener> listeners;
private final AtomicReference<Thread> thread = new AtomicReference<Thread>();
private final LinkedBlockingQueue<AbstractEvent> eventQueue;
private final Object lock = new Object();
//Flag
private boolean stop;
public AttributeEventManager(AbstractAttributeModel model) {
this.model = model;
this.eventQueue = new LinkedBlockingQueue<AbstractEvent>();
this.listeners = Collections.synchronizedList(new ArrayList<AttributeListener>());
}
@Override
public void run() {
while (!stop) {
try {
Thread.sleep(DELAY);
} catch (InterruptedException ex) {
ex.printStackTrace();
}
List<Object> eventCompress = null;
List<Object> eventCompressObjects = null;
AbstractEvent precEvt = null;
AbstractEvent evt = null;
while ((evt = eventQueue.peek()) != null) {
if (precEvt != null) {
if ((evt instanceof ValueEvent || evt instanceof ColumnEvent) && precEvt.getEventType().equals(evt.getEventType()) && precEvt.getAttributeTable() == evt.getAttributeTable()) { //Same type
if (eventCompress == null) {
eventCompress = new ArrayList<Object>();
eventCompress.add(precEvt.getData());
}
if (evt instanceof ValueEvent) {
if (eventCompressObjects == null) {
eventCompressObjects = new ArrayList<Object>();
eventCompressObjects.add(((ValueEvent) precEvt).getObject());
}
eventCompressObjects.add(((ValueEvent) evt).getObject());
}
eventCompress.add(evt.getData());
} else {
break;
}
}
eventQueue.poll();
precEvt = evt;
}
if (precEvt != null) {
AttributeEvent event = createEvent(precEvt, eventCompress, eventCompressObjects);
for (AttributeListener l : listeners.toArray(new AttributeListener[0])) {
l.attributesChanged(event);
}
}
while (eventQueue.isEmpty()) {
try {
synchronized (lock) {
lock.wait();
}
} catch (InterruptedException e) {
}
}
}
}
private AttributeEvent createEvent(AbstractEvent event, List<Object> compress, List<Object> compressObjects) {
final AttributeEventDataImpl eventData = new AttributeEventDataImpl();
final AttributeEventImpl attributeEvent = new AttributeEventImpl(event.getEventType(), event.getAttributeTable(), eventData);
if (event instanceof ValueEvent) {
AttributeValue[] values;
Object[] objects;
if (compress != null) {
values = compress.toArray(new AttributeValue[0]);
objects = compressObjects.toArray();
} else {
values = new AttributeValue[]{(AttributeValue) event.getData()};
objects = new Object[]{((ValueEvent) event).getObject()};
}
eventData.setValues(values);
eventData.setObjects(objects);
} else if (event instanceof ColumnEvent) {
AttributeColumn[] columns;
if (compress != null) {
columns = compress.toArray(new AttributeColumn[0]);
} else {
columns = new AttributeColumn[]{(AttributeColumn) event.getData()};
}
eventData.setColumns(columns);
}
return attributeEvent;
}
public void stop(boolean stop) {
this.stop = stop;
}
public void fireEvent(AbstractEvent event) {
eventQueue.add(event);
synchronized (lock) {
lock.notifyAll();
}
}
public void start() {
Thread t = new Thread(this);
t.setDaemon(true);
t.setName("attribute-event-bus");
if (this.thread.compareAndSet(null, t)) {
t.start();
}
}
public boolean isRunning() {
return thread.get() != null;
}
public void addAttributeListener(AttributeListener listener) {
if (!listeners.contains(listener)) {
listeners.add(listener);
}
}
public void removeAttributeListener(AttributeListener listener) {
listeners.remove(listener);
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
829213147c5053f8b4037691458d646ef8144e09 | 7b1d15faecc0cfc7e477b2309863e5bb1d8d0824 | /app/src/main/java/com/example/zjl/dddd/app/AppApplication.java | 21986552d9d9772eee30d33f53ccba9653041af0 | [] | no_license | 1097919195/Dddd | e8cc0375c9d0ab86a6669aa9c19dc66ea08793c4 | 0aa710790fb53d3639246af61372f2c5318c85bf | refs/heads/master | 2020-03-24T10:23:48.416581 | 2019-03-08T09:01:34 | 2019-03-08T09:01:34 | 142,655,070 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 613 | java | package com.example.zjl.dddd.app;
import com.example.zjl.dddd.BuildConfig;
import com.jaydenxiao.common.baseapp.BaseApplication;
import com.jaydenxiao.common.commonutils.LogUtils;
import com.polidea.rxandroidble2.RxBleClient;
/**
* Created by Administrator on 2018/7/11 0011.
*/
public class AppApplication extends BaseApplication{
@Override
public void onCreate() {
super.onCreate();
//初始化logger,注意拷贝的话BuildConfig.LOG_DEBUG一定要是在当前module下的包名,配置文件中判断测适和发行版本
LogUtils.logInit(BuildConfig.LOG_DEBUG);
}
}
| [
"1097919195@qq.com"
] | 1097919195@qq.com |
8290250c186285d2d9609475e3167231c49f804e | 3e176296759f1f211f7a8bcfbba165abb1a4d3f1 | /idea-gosu-plugin/src/main/java/gw/plugin/ij/livetemplate/GosuCodeLiveTemplateContextType.java | 33eb373b91e8ce58eaa8b3ed589fbbd3023df7d2 | [
"Apache-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | gosu-lang/old-gosu-repo | 6335ac90cd0c635fdec6360e3e208ba12ac0a39e | 48c598458abd412aa9f2d21b8088120e8aa9de00 | refs/heads/master | 2020-05-18T03:39:34.631550 | 2014-04-21T17:36:38 | 2014-04-21T17:36:38 | 1,303,622 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 401 | java | /*
* Copyright 2013 Guidewire Software, Inc.
*/
package gw.plugin.ij.livetemplate;
import com.intellij.codeInsight.template.FileTypeBasedContextType;
import gw.plugin.ij.filetypes.GosuCodeFileType;
public class GosuCodeLiveTemplateContextType extends FileTypeBasedContextType {
protected GosuCodeLiveTemplateContextType() {
super("gosu-code", "Gosu code", GosuCodeFileType.INSTANCE);
}
}
| [
"lboasso@guidewire.com"
] | lboasso@guidewire.com |
779d3a4339609001c8f9d0a0ec118065d8ab193a | e048cb9cd0a7d49bb284dcc3d9a0871713127c48 | /leasing-identity-parent/leasing-identity-web/src/main/java/com/cloudkeeper/leasing/identity/controller/PopulationRecordsController.java | b649ec7c267f7f994e3ccb72cf01360796493a6f | [] | no_license | lzj1995822/GuSuCommunityApi | 65b97a0c9f8bdeb608f887970f4d2e99d2306785 | 51348b26b9b0c0017dca807847695b3740aaf2e8 | refs/heads/master | 2020-04-23T19:18:18.348991 | 2019-04-28T02:56:21 | 2019-04-28T02:56:21 | 171,398,689 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,795 | java | package com.cloudkeeper.leasing.identity.controller;
import com.cloudkeeper.leasing.identity.dto.populationrecords.PopulationRecordsDTO;
import com.cloudkeeper.leasing.identity.dto.populationrecords.PopulationRecordsSearchable;
import com.cloudkeeper.leasing.identity.vo.PopulationRecordsVO;
import com.cloudkeeper.leasing.base.model.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 类属性配置 controller
* @author lxw
*/
@Api(value = "人员档案", tags = "人员档案")
@RequestMapping("/populationRecords")
public interface PopulationRecordsController {
/**
* 查询
* @param id 类属性配置id
* @return 类属性配置 VO
*/
@ApiOperation(value = "查询", notes = "查询", position = 1)
@GetMapping("/{id}id")
Result<PopulationRecordsVO> findOne(@ApiParam(value = "人员档案id", required = true) @PathVariable String id);
/**
* 新增
* @param populationRecordsDTO 类属性配置 DTO
* @return 类属性配置 VO
*/
@ApiOperation(value = "新增", notes = "新增", position = 2)
@PostMapping("/")
Result<PopulationRecordsVO> add(@ApiParam(value = "人员档案 DTO", required = true) @RequestBody @Validated PopulationRecordsDTO populationRecordsDTO);
/**
* 更新
* @param id 类属性配置id
* @param populationRecordsDTO 类属性配置 DTO
* @return 类属性配置 VO
*/
@ApiOperation(value = "更新", notes = "更新", position = 3)
@PutMapping("/{id}id")
Result<PopulationRecordsVO> update(@ApiParam(value = "人员档案id", required = true) @PathVariable String id,
@ApiParam(value = "人员档案 DTO", required = true) @RequestBody @Validated PopulationRecordsDTO populationRecordsDTO);
/**
* 删除
* @param id 类属性配置id
* @return 删除结果
*/
@ApiOperation(value = "删除", notes = "删除", position = 4)
@DeleteMapping("/{id}id")
Result delete(@ApiParam(value = "人员档案id", required = true) @PathVariable String id);
/**
* 列表查询
* @param populationRecordsSearchable 类属性配置查询条件
* @param sort 排序条件
* @return 类属性配置 VO 集合
*/
@ApiOperation(value = "列表查询", notes = "列表查询<br/>sort:排序字段,默认是asc排序方式,可以不写,格式:sort=code,asc&sort=name&sort=note,desc", position = 5)
@PostMapping("/list")
Result<List<PopulationRecordsVO>> list(@ApiParam(value = "人员档案查询条件", required = true) @RequestBody PopulationRecordsSearchable populationRecordsSearchable,
@ApiParam(value = "排序条件", required = true) Sort sort);
/**
* 分页查询
* @param populationRecordsSearchable 类属性配置查询条件
* @param pageable 分页条件
* @return 类属性配置 VO 分页
*/
@ApiOperation(value = "分页查询", notes = "分页查询<br/>page:第几页,默认为0,是第一页<br/>size:分页大小, 默认为10<br/>sort:排序字段,默认是asc排序方式,可以不写,格式:sort=code,asc&sort=name&sort=note,desc", position = 6)
@PostMapping("/page")
Result<Page<PopulationRecordsVO>> page(@ApiParam(value = "人员档案查询条件", required = true) @RequestBody PopulationRecordsSearchable populationRecordsSearchable,
@ApiParam(value = "分页参数", required = true) Pageable pageable);
}
| [
"243485908@qq.com"
] | 243485908@qq.com |
5dcc819c8372460d96a17c34dbcfb0612f65fed3 | 882e77219bce59ae57cbad7e9606507b34eebfcf | /mi2s_securitycenter_miui12/src/main/java/com/xiaomi/ad/feedback/IAdFeedbackService.java | 3fd8b2db419dc37b2d29b7bc7492e37adc09283c | [] | no_license | CrackerCat/XiaomiFramework | 17a12c1752296fa1a52f61b83ecf165f328f4523 | 0b7952df317dac02ebd1feea7507afb789cef2e3 | refs/heads/master | 2022-06-12T03:30:33.285593 | 2020-05-06T11:30:54 | 2020-05-06T11:30:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,411 | java | package com.xiaomi.ad.feedback;
import android.os.Binder;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import com.xiaomi.ad.feedback.IAdFeedbackListener;
import java.util.List;
public interface IAdFeedbackService extends IInterface {
public static abstract class Stub extends Binder implements IAdFeedbackService {
private static final String DESCRIPTOR = "com.xiaomi.ad.feedback.IAdFeedbackService";
static final int TRANSACTION_showFeedbackWindow = 1;
static final int TRANSACTION_showFeedbackWindowAndTrackResult = 2;
static final int TRANSACTION_showFeedbackWindowAndTrackResultForMultiAds = 3;
private static class Proxy implements IAdFeedbackService {
private IBinder mRemote;
Proxy(IBinder iBinder) {
this.mRemote = iBinder;
}
public IBinder asBinder() {
return this.mRemote;
}
public String getInterfaceDescriptor() {
return Stub.DESCRIPTOR;
}
public void showFeedbackWindow(IAdFeedbackListener iAdFeedbackListener) {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(Stub.DESCRIPTOR);
obtain.writeStrongBinder(iAdFeedbackListener != null ? iAdFeedbackListener.asBinder() : null);
this.mRemote.transact(1, obtain, obtain2, 0);
obtain2.readException();
} finally {
obtain2.recycle();
obtain.recycle();
}
}
public void showFeedbackWindowAndTrackResult(IAdFeedbackListener iAdFeedbackListener, String str, String str2, String str3) {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(Stub.DESCRIPTOR);
obtain.writeStrongBinder(iAdFeedbackListener != null ? iAdFeedbackListener.asBinder() : null);
obtain.writeString(str);
obtain.writeString(str2);
obtain.writeString(str3);
this.mRemote.transact(2, obtain, obtain2, 0);
obtain2.readException();
} finally {
obtain2.recycle();
obtain.recycle();
}
}
public void showFeedbackWindowAndTrackResultForMultiAds(IAdFeedbackListener iAdFeedbackListener, String str, String str2, List<String> list) {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(Stub.DESCRIPTOR);
obtain.writeStrongBinder(iAdFeedbackListener != null ? iAdFeedbackListener.asBinder() : null);
obtain.writeString(str);
obtain.writeString(str2);
obtain.writeStringList(list);
this.mRemote.transact(3, obtain, obtain2, 0);
obtain2.readException();
} finally {
obtain2.recycle();
obtain.recycle();
}
}
}
public Stub() {
attachInterface(this, DESCRIPTOR);
}
public static IAdFeedbackService asInterface(IBinder iBinder) {
if (iBinder == null) {
return null;
}
IInterface queryLocalInterface = iBinder.queryLocalInterface(DESCRIPTOR);
return (queryLocalInterface == null || !(queryLocalInterface instanceof IAdFeedbackService)) ? new Proxy(iBinder) : (IAdFeedbackService) queryLocalInterface;
}
public IBinder asBinder() {
return this;
}
public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) {
if (i == 1) {
parcel.enforceInterface(DESCRIPTOR);
showFeedbackWindow(IAdFeedbackListener.Stub.asInterface(parcel.readStrongBinder()));
} else if (i == 2) {
parcel.enforceInterface(DESCRIPTOR);
showFeedbackWindowAndTrackResult(IAdFeedbackListener.Stub.asInterface(parcel.readStrongBinder()), parcel.readString(), parcel.readString(), parcel.readString());
} else if (i == 3) {
parcel.enforceInterface(DESCRIPTOR);
showFeedbackWindowAndTrackResultForMultiAds(IAdFeedbackListener.Stub.asInterface(parcel.readStrongBinder()), parcel.readString(), parcel.readString(), parcel.createStringArrayList());
} else if (i != 1598968902) {
return super.onTransact(i, parcel, parcel2, i2);
} else {
parcel2.writeString(DESCRIPTOR);
return true;
}
parcel2.writeNoException();
return true;
}
}
void showFeedbackWindow(IAdFeedbackListener iAdFeedbackListener);
void showFeedbackWindowAndTrackResult(IAdFeedbackListener iAdFeedbackListener, String str, String str2, String str3);
void showFeedbackWindowAndTrackResultForMultiAds(IAdFeedbackListener iAdFeedbackListener, String str, String str2, List<String> list);
}
| [
"sanbo.xyz@gmail.com"
] | sanbo.xyz@gmail.com |
bbfad62f39a6e4a800d282e753c2828dabe8bca0 | 59a19bb8c3e2c59a7f7a354f5cafc106e0116e59 | /modules/bluima_pdf/src/main/java/edu/psu/seersuite/extractors/tableextractor/extraction/IPdfParser.java | 771ffb40bd79e3365f461dd3ece6ab120a4dd0ef | [
"Apache-2.0"
] | permissive | KnowledgeGarden/bluima | ffd5d54d69e42078598a780bdf6e67a6325d695a | 793ea3f46761dce72094e057a56cddfa677156ae | refs/heads/master | 2021-01-01T06:21:54.919609 | 2016-01-25T22:37:43 | 2016-01-25T22:37:43 | 97,415,950 | 1 | 0 | null | 2017-07-16T22:53:46 | 2017-07-16T22:53:46 | null | UTF-8 | Java | false | false | 691 | java | /**
* This package defines the core table extraction classes
*/
package edu.psu.seersuite.extractors.tableextractor.extraction;
import java.io.File;
import java.util.ArrayList;
import edu.psu.seersuite.extractors.tableextractor.model.TextPiece;
/**
* Interface of PDF Parser
*
* @author Shuyi, Ying
*
*/
public interface IPdfParser
{
/**
* Gets text pieces from a PDF document. The input is a PDF file and the output is an ArrayList.
*
* @param pdfFile
* input PDF file
* @return lists of text pieces (one list per page)
*/
public ArrayList<ArrayList<TextPiece>> getTextPiecesByPage(File pdfFile);
}
| [
"renaud@apache.org"
] | renaud@apache.org |
07481b4f55124176eeca63f702e8e613a3137e02 | fdd8a4f79a454c8b5a8c52e28d9eece65d7504ee | /core/src/main/java/com/github/cimsbioko/server/dao/FormSubmissionRepository.java | 4d161a6934a5f86432de01f32fa3e8c7b314c857 | [
"BSD-2-Clause"
] | permissive | cims-bioko/cims-server | cf406dd94cc3e6978dadbd31dea6d8cb1dd1679b | ca2430afd111e584948aab73c0ab8cb9a4ded10a | refs/heads/master | 2023-03-17T18:09:15.550176 | 2023-01-28T00:25:50 | 2023-02-02T01:49:28 | 16,384,095 | 4 | 3 | NOASSERTION | 2023-03-07T06:28:24 | 2014-01-30T17:09:54 | Java | UTF-8 | Java | false | false | 1,335 | java | package com.github.cimsbioko.server.dao;
import com.github.cimsbioko.server.domain.FormSubmission;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;
import java.sql.Timestamp;
import java.util.List;
import java.util.stream.Stream;
public interface FormSubmissionRepository extends PagingAndSortingRepository<FormSubmission, String>, FormSubmissionSearch {
@Query("select f from #{#entityName} f where f.processed is null order by date_trunc('hour', f.submitted), f.collected")
Stream<FormSubmission> findUnprocessed(Pageable pageable);
List<FormSubmission> findByFormIdAndSubmittedAfter(String formId, Timestamp submitted, Pageable pageable);
List<FormSubmission> findByFormId(String formId, Pageable pageable);
long deleteByFormIdAndFormVersion(String formId, String formVersion);
@Modifying(flushAutomatically = true, clearAutomatically = true)
@Query("update #{#entityName} s set s.processed = null where s.campaignId = :campaign and s.formBinding = :binding")
int markUnprocessed(@Param("campaign") String campaign, @Param("binding") String binding);
}
| [
"brent.atkinson@gmail.com"
] | brent.atkinson@gmail.com |
2973f82cd52ae532ea3738f7e88de2ff46be3cb0 | e64c2201c1cf2adf9197c77aab2676670de9bf4c | /src/main/java/com/socket/UDPServer.java | beda1ebc2d7ac8ef0bff29f8a04f32541ff2c2e4 | [] | no_license | zengxianbing/JavaStudy | 45016f3910606988403f16bd1b5f0e60d52de7b2 | 9a4593cf4b6f79ada4677bdd87a045ff04ee721a | refs/heads/master | 2020-04-06T04:29:17.203382 | 2016-07-04T01:11:47 | 2016-07-04T01:11:47 | 62,491,476 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,190 | java | package com.socket;
import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.SocketException;
public class UDPServer {
/**
* @param args
* @throws java.io.IOException
*/
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
String str_send = "Hello UDPclient";
byte[] buf = new byte[1024];
DatagramSocket ds = new DatagramSocket(3000);
DatagramPacket dp_receive = new DatagramPacket(buf, 1024);
System.out
.println("server is on,waiting for client to send data......");
boolean f = true;
while (f) {
ds.receive(dp_receive);
System.out.println("server received data from client:");
String str_receive = new String(dp_receive.getData(), 0,
dp_receive.getLength())
+ " from "
+ dp_receive.getAddress().getHostAddress()
+ ":"
+ dp_receive.getPort();
System.out.println(str_receive);
DatagramPacket dp_send = new DatagramPacket(str_send.getBytes(),
str_send.length(), dp_receive.getAddress(), 90000);
ds.send(dp_send);
dp_receive.setLength(1024);
}
}
}
| [
"1121466030@qq.com"
] | 1121466030@qq.com |
0f406181fc6dfb085d426e10c63cce858d8ac059 | 13c2d3db2d49c40c74c2e6420a9cd89377f1c934 | /program_data/JavaProgramData/77/1154.java | 875c0db4e00df0023758bc7c66e45c4fac412679 | [
"MIT"
] | permissive | qiuchili/ggnn_graph_classification | c2090fefe11f8bf650e734442eb96996a54dc112 | 291ff02404555511b94a4f477c6974ebd62dcf44 | refs/heads/master | 2021-10-18T14:54:26.154367 | 2018-10-21T23:34:14 | 2018-10-21T23:34:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 851 | java | package <missing>;
public class GlobalMembers
{
public static int Main()
{
String a = new String(new char[100]);
int[] d = new int[100];
int n;
char b;
char c;
for (int i = 0;i < 100;i++)
{
a = tangible.StringFunctions.changeCharacter(a, i, System.in.read());
if (a.charAt(i) == '\n')
{
n = i;
break;
}
b = a.charAt(0);
if (a.charAt(i) != b)
{
c = a.charAt(i);
}
}
for (int i = 1;i <= n / 2;i++)
{
for (int j = 0;j < n;j++)
{
if (a.charAt(j) == b || d[j] == 1)
{
continue;
}
for (int k = j;k >= 0;k--)
{
if (a.charAt(k) == c || d[k] == 1)
{
continue;
}
System.out.print(k);
System.out.print(" ");
System.out.print(j);
System.out.print("\n");
d[j] = 1;
d[k] = 1;
break;
}
}
}
return 0;
}
}
| [
"y.yu@open.ac.uk"
] | y.yu@open.ac.uk |
b418f1d76d922cb581757ed54ffdeb6d8f68d8f2 | 8bba923942604359185cfceffc680b006efb9306 | /DatabasesFrameworksHibernate/HibernateCodeFirstAllExercises/vehicles/src/main/java/enitities/seaVehicles/cargoShip.java | 5b186a7528369a4fed2d3a26ccbad8d074979084 | [] | no_license | KaPrimov/JavaCoursesSoftUni | d8a48ab30421d7a847f35d970535ddc3da595597 | 9676ec4c9bc1ece13d64880ff47a3728227bf4c9 | refs/heads/master | 2022-12-04T13:27:47.249203 | 2022-07-14T14:44:10 | 2022-07-14T14:44:10 | 97,306,295 | 1 | 2 | null | 2022-11-24T09:28:28 | 2017-07-15T09:39:47 | Java | UTF-8 | Java | false | false | 706 | java | package enitities.seaVehicles;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;
@Entity
@Table(name = "cargo_ships")
@PrimaryKeyJoinColumn(name = "id")
public class cargoShip extends Ship {
private long maxLoad;
public cargoShip() {
}
public cargoShip(String nationality, String captainName, byte crewSize, long maxLoad) {
super(nationality, captainName, crewSize);
this.maxLoad = maxLoad;
}
@Column(name = "max_load")
public long getMaxLoad() {
return maxLoad;
}
public void setMaxLoad(long maxLoad) {
this.maxLoad = maxLoad;
}
}
| [
"k.primov92@gmail.com"
] | k.primov92@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.