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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6de3e497471b3680a2f33e49af61d6352b6a8953 | 774004a61fbc87daf2a51fa8466e7508dbc9f6b6 | /bqiupu/src/com/borqs/common/view/MyGallery.java | ad409fc28571a35227dae321157ac9cf1bc7adbe | [] | no_license | eastlhu/android | 4f23984a5f11f835a22136ddd95b8f3b964ff3fd | 0d256031e3c04fffdf61700fcbb49f7fcf93486a | refs/heads/master | 2021-01-21T04:11:53.350910 | 2013-09-24T07:29:49 | 2013-09-24T07:29:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 754 | java | package com.borqs.common.view;
import android.content.Context;
import android.util.AttributeSet;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.widget.Gallery;
public class MyGallery extends Gallery
{
public MyGallery(Context context, AttributeSet attrs)
{
super(context, attrs);
}
/*
private boolean isScrollingLeft(MotionEvent e1, MotionEvent e2) {
return e2.getX() > e1.getX();
}
@Override
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,
float velocityY)
{
int keyCode;
if (isScrollingLeft(e1, e2)) {
keyCode = KeyEvent.KEYCODE_DPAD_LEFT;
} else {
keyCode = KeyEvent.KEYCODE_DPAD_RIGHT;
}
onKeyDown(keyCode, null);
return true;
}
*/
}
| [
"liuhuadong78@gmail.com"
] | liuhuadong78@gmail.com |
b020937c6ab4073a0458937749eda2ac8456461b | 43eb759f66530923dfe1c6e191ec4f350c097bd9 | /projects/closure-compiler/src/com/google/javascript/jscomp/deps/DependencyInfo.java | fb902d2079fad59359f884b7ef980e8f0594003a | [
"MIT",
"GPL-1.0-or-later",
"CPL-1.0",
"BSD-3-Clause",
"NPL-1.1",
"LicenseRef-scancode-generic-cla",
"Apache-2.0",
"MPL-1.1"
] | permissive | hayasam/lightweight-effectiveness | fe4bd04f8816c6554e35c8c9fc8489c11fc8ce0b | f6ef4c98b8f572a86e42252686995b771e655f80 | refs/heads/master | 2023-08-17T01:51:46.351933 | 2020-09-03T07:38:35 | 2020-09-03T07:38:35 | 298,672,257 | 0 | 0 | MIT | 2023-09-08T15:33:03 | 2020-09-25T20:23:43 | null | UTF-8 | Java | false | false | 6,945 | java | /*
* Copyright 2009 The Closure Compiler 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 com.google.javascript.jscomp.deps;
import static com.google.common.collect.ImmutableList.toImmutableList;
import com.google.auto.value.AutoValue;
import com.google.common.base.Joiner;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Iterables;
import com.google.common.collect.Streams;
import com.google.errorprone.annotations.Immutable;
import java.io.IOException;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
/**
* A data structure for JS dependency information for a single .js file.
*
* @author agrieve@google.com (Andrew Grieve)
*/
public interface DependencyInfo extends Serializable {
/** A dependency link between two files, e.g. goog.require('namespace'), import 'file'; */
@AutoValue
@Immutable
abstract class Require implements Serializable {
public static final Require BASE = googRequireSymbol("goog");
public enum Type {
/** Standard goog.require call for a symbol from a goog.provide or goog.module. */
GOOG_REQUIRE_SYMBOL,
/** ES6 import statement. */
ES6_IMPORT,
/** Parsed from an existing Closure dependency file. */
PARSED_FROM_DEPS,
/** CommonJS require() call. */
COMMON_JS,
/** Compiler module dependencies. */
COMPILER_MODULE
}
public static ImmutableList<String> asSymbolList(Iterable<Require> requires) {
return Streams.stream(requires).map(Require::getSymbol).collect(toImmutableList());
}
public static Require googRequireSymbol(String symbol) {
return builder()
.setRawText(symbol)
.setSymbol(symbol)
.setType(Type.GOOG_REQUIRE_SYMBOL)
.build();
}
public static Require es6Import(String symbol, String rawPath) {
return builder().setRawText(rawPath).setSymbol(symbol).setType(Type.ES6_IMPORT).build();
}
public static Require commonJs(String symbol, String rawPath) {
return builder().setRawText(rawPath).setSymbol(symbol).setType(Type.COMMON_JS).build();
}
public static Require compilerModule(String symbol) {
return builder().setRawText(symbol).setSymbol(symbol).setType(Type.COMPILER_MODULE).build();
}
public static Require parsedFromDeps(String symbol) {
return builder().setRawText(symbol).setSymbol(symbol).setType(Type.PARSED_FROM_DEPS).build();
}
private static Builder builder() {
return new AutoValue_DependencyInfo_Require.Builder();
}
protected abstract Builder toBuilder();
public Require withSymbol(String symbol) {
return toBuilder().setSymbol(symbol).build();
}
/**
* @return symbol the symbol provided by another {@link DependencyInfo}'s {@link
* DependencyInfo#getProvides()}
*/
public abstract String getSymbol();
/**
* @return the raw text of the import string as it appears in the file. Used mostly for error
* reporting.
*/
public abstract String getRawText();
public abstract Type getType();
@AutoValue.Builder
abstract static class Builder {
public abstract Builder setType(Type value);
public abstract Builder setRawText(String rawText);
public abstract Builder setSymbol(String value);
public abstract Require build();
}
}
/** Gets the unique name / path of this file. */
String getName();
/** Gets the path of this file relative to Closure's base.js file. */
String getPathRelativeToClosureBase();
/** Gets the symbols provided by this file. */
ImmutableList<String> getProvides();
/** Gets the symbols required by this file. */
ImmutableList<Require> getRequires();
ImmutableList<String> getRequiredSymbols();
/** Gets the symbols weakly required by this file. (i.e. for typechecking only) */
ImmutableList<String> getWeakRequires();
/** Gets the loading information for this file. */
ImmutableMap<String, String> getLoadFlags();
/** Whether the symbol is provided by a module */
boolean isModule();
/**
* Abstract base implementation that defines derived accessors such
* as {@link #isModule}.
*/
abstract class Base implements DependencyInfo {
@Override public boolean isModule() {
return "goog".equals(getLoadFlags().get("module"));
}
@Override
public ImmutableList<String> getRequiredSymbols() {
return Require.asSymbolList(getRequires());
}
}
/** Utility methods. */
class Util {
private Util() {}
// TODO(sdh): This would be better as a defender method once Java 8 is allowed (b/28382956):
// void DependencyInfo#writeAddDependency(Appendable);
/** Prints a goog.addDependency call for a single DependencyInfo. */
public static void writeAddDependency(Appendable out, DependencyInfo info) throws IOException {
out.append("goog.addDependency('")
.append(info.getPathRelativeToClosureBase())
.append("', ");
writeJsArray(out, info.getProvides());
out.append(", ");
writeJsArray(out, Require.asSymbolList(info.getRequires()));
Map<String, String> loadFlags = info.getLoadFlags();
if (!loadFlags.isEmpty()) {
out.append(", ");
writeJsObject(out, loadFlags);
}
out.append(");\n");
}
/** Prints a map as a JS object literal. */
private static void writeJsObject(Appendable out, Map<String, String> map) throws IOException {
List<String> entries = new ArrayList<>();
for (Map.Entry<String, String> entry : map.entrySet()) {
String key = entry.getKey().replace("'", "\\'");
String value = entry.getValue().replace("'", "\\'");
entries.add("'" + key + "': '" + value + "'");
}
out.append("{");
out.append(Joiner.on(", ").join(entries));
out.append("}");
}
/** Prints a list of strings formatted as a JavaScript array of string literals. */
private static void writeJsArray(Appendable out, Collection<String> values) throws IOException {
Iterable<String> quoted =
Iterables.transform(values, arg -> "'" + arg.replace("'", "\\'") + "'");
out.append("[");
out.append(Joiner.on(", ").join(quoted));
out.append("]");
}
}
}
| [
"granogiovanni90@gmail.com"
] | granogiovanni90@gmail.com |
3d425c3f934f8888a166f0d855a98ebe2d73bb37 | 9623791303908fef9f52edc019691abebad9e719 | /src/cn/shui/order/minimum_depth_of_binary_tree_111/Solution.java | be0a013e7d48e07e724460345ea25381ce561235 | [] | no_license | shuile/LeetCode | 8b816b84071a5338db1161ac541437564574f96a | 4c12a838a0a895f8efcfbac09e1392c510595535 | refs/heads/master | 2023-08-17T04:53:37.617226 | 2023-08-15T16:18:46 | 2023-08-15T16:18:46 | 146,776,927 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 971 | java | package cn.shui.order.minimum_depth_of_binary_tree_111;
import cn.shui.order.base.TreeNode;
public class Solution {
public static void main(String[] args) {
TreeNode node = new TreeNode(3);
node.left = new TreeNode(9);
node.right = new TreeNode(20);
node.right.left = new TreeNode(15);
node.right.right = new TreeNode(7);
System.out.println(minDepth(node));
}
private static int minDepth(TreeNode root) {
if (root == null) {
return 0;
}
if (root.left == null && root.right == null) {
return 1;
}
int left, right;
if (root.left != null) {
left = minDepth(root.left);
} else {
left = Integer.MAX_VALUE;
}
if (root.right != null) {
right = minDepth(root.right);
} else {
right = Integer.MAX_VALUE;
}
return Math.min(left, right) + 1;
}
}
| [
"chenyiting1995@gmail.com"
] | chenyiting1995@gmail.com |
2bdcaaa3f4338c87d0dded5eaa89ca93d97b5061 | 490e46ec2507cbe12c27fbddf744d77519f00cc5 | /src/com/alee/laf/menu/PopupMenuPainter.java | 63bdfc6a7f49b7460c6851df78d3cef2ea5e84e1 | [] | no_license | itsuifeng/weblaf | 973ccadb940ebcf79504e6cde2a38105730c3ff2 | d39c8aa34ce98a2986f167e35acc6d7ffc364bc3 | refs/heads/master | 2021-01-22T13:12:37.615691 | 2014-01-30T23:39:23 | 2014-01-30T23:39:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,695 | java | /*
* This file is part of WebLookAndFeel library.
*
* WebLookAndFeel library is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WebLookAndFeel library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with WebLookAndFeel library. If not, see <http://www.gnu.org/licenses/>.
*/
package com.alee.laf.menu;
import javax.swing.*;
import java.awt.*;
/**
* Base painter for JPopupMenu component.
* It is used as WebPopupMenuUI default styling.
*
* @author Mikle Garin
*/
public class PopupMenuPainter<E extends JPopupMenu> extends WebPopupPainter<E>
{
/**
* {@inheritDoc}
*/
@Override
public Insets getMargin ( final E c )
{
final Insets margin = super.getMargin ( c );
margin.top += round;
margin.bottom += round;
return margin;
}
/**
* {@inheritDoc}
*/
@Override
protected void paintTransparentPopup ( final Graphics2D g2d, final E popupMenu )
{
final Dimension menuSize = popupMenu.getSize ();
// Painting shade
paintShade ( g2d, popupMenu, menuSize );
// Painting background
paintBackground ( g2d, popupMenu, menuSize );
// Painting dropdown corner fill
// This is a specific for WebPopupMenuUI feature
paintDropdownCornerFill ( g2d, popupMenu, menuSize );
// Painting border
paintBorder ( g2d, popupMenu, menuSize );
}
/**
* Paints dropdown-styled popup menu corner fill if menu item near it is selected.
*
* @param g2d graphics context
* @param popupMenu popup menu
* @param menuSize menu size
*/
protected void paintDropdownCornerFill ( final Graphics2D g2d, final E popupMenu, final Dimension menuSize )
{
if ( popupPainterStyle == PopupPainterStyle.dropdown && round == 0 )
{
// Checking whether corner should be filled or not
final boolean north = cornerSide == NORTH;
final int zIndex = north ? 0 : popupMenu.getComponentCount () - 1;
final Component component = popupMenu.getComponent ( zIndex );
if ( component instanceof JMenuItem )
{
final JMenuItem menuItem = ( JMenuItem ) component;
if ( menuItem.isEnabled () && ( menuItem.getModel ().isArmed () || menuItem.isSelected () ) )
{
// Filling corner properly
if ( menuItem.getUI () instanceof WebMenuUI )
{
final WebMenuUI ui = ( WebMenuUI ) menuItem.getUI ();
g2d.setPaint ( north ? ui.getNorthCornerFill () : ui.getSouthCornerFill () );
g2d.fill ( getDropdownCornerShape ( popupMenu, menuSize, true ) );
}
else if ( menuItem.getUI () instanceof WebMenuItemUI )
{
final WebMenuItemUI ui = ( WebMenuItemUI ) menuItem.getUI ();
g2d.setPaint ( north ? ui.getNorthCornerFill () : ui.getSouthCornerFill () );
g2d.fill ( getDropdownCornerShape ( popupMenu, menuSize, true ) );
}
}
}
}
}
} | [
"mgarin@alee.com"
] | mgarin@alee.com |
c0390326f7c79e2bb25ca9b132739e141a640c29 | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XWIKI-13372-13-15-FEMO-WeightedSum:TestLen:CallDiversity/org/xwiki/extension/handler/internal/DefaultExtensionHandlerManager_ESTest.java | 317c02b44ac17b8138b6169ef71a5dbf8a56941c | [] | 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 | 603 | java | /*
* This file was automatically generated by EvoSuite
* Sat Apr 04 05:32:08 UTC 2020
*/
package org.xwiki.extension.handler.internal;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class DefaultExtensionHandlerManager_ESTest extends DefaultExtensionHandlerManager_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
7d1813c4cd65f54a9b33be485a5b7207e9c7078a | 81b0bb3cfb2e9501f53451e7f03ec072ee2b0e13 | /src/com/paypal/android/sdk/payments/aD.java | 6c3affcf4e0f60b1e19e1543fc24e8ec42e4da57 | [] | no_license | reverseengineeringer/me.lyft.android | 48bb85e8693ce4dab50185424d2ec51debf5c243 | 8c26caeeb54ffbde0711d3ce8b187480d84968ef | refs/heads/master | 2021-01-19T02:32:03.752176 | 2016-07-19T16:30:00 | 2016-07-19T16:30:00 | 63,710,356 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 432 | java | package com.paypal.android.sdk.payments;
import android.view.View;
import android.view.View.OnClickListener;
final class ad
implements View.OnClickListener
{
ad(LoginActivity paramLoginActivity) {}
public final void onClick(View paramView)
{
LoginActivity.f(a, paramView);
}
}
/* Location:
* Qualified Name: com.paypal.android.sdk.payments.ad
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"reverseengineeringer@hackeradmin.com"
] | reverseengineeringer@hackeradmin.com |
7ac557cec975b715f06019a02425ee17d323a65c | d4d54f1911ebecc8faa0bdd24336647811a211bd | /src/main/java/com/clueride/util/network/edge/EdgeStoreJson.java | 498b01f691e978ed3e7f66b2e00e8b96e15a017b | [
"Apache-2.0"
] | permissive | ClueRide/server | ed66beb347dd594bc75f2a7dcdba0008ce117940 | 0ec3facf4d818a8af1e122f8c9b1aba114f6f5c4 | refs/heads/master | 2022-11-28T04:29:23.186469 | 2021-01-03T20:22:25 | 2021-01-03T20:22:25 | 157,462,460 | 1 | 0 | Apache-2.0 | 2022-11-16T08:58:52 | 2018-11-13T23:46:24 | Java | UTF-8 | Java | false | false | 3,402 | java | /*
* Copyright 2019 Jett Marks
*
* 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.
*
* Created by jett on 1/15/19.
*/
package com.clueride.util.network.edge;
import java.io.File;
import java.io.FileInputStream;
import java.io.FilenameFilter;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.vividsolutions.jts.geom.LineString;
import org.geotools.geojson.feature.FeatureJSON;
import org.geotools.geojson.geom.GeometryJSON;
import org.opengis.feature.simple.SimpleFeature;
import com.clueride.util.network.common.JsonSchemaTypeMap;
import com.clueride.util.network.common.JsonStoreLocation;
import com.clueride.util.network.common.JsonStoreType;
/**
* Knows how to pull the GeoJSON-based Edges into memory.
*/
public class EdgeStoreJson {
private static final int DIGITS_OF_PRECISION = 5;
public List<JsonBasedEdge> getEdges() {
List<JsonBasedEdge> edges = new ArrayList<>();
File directory = new File(JsonStoreLocation.toString(JsonStoreType.EDGE));
List<File> files = Arrays.asList(directory.listFiles(new GeoJsonFileFilter()));
for (File file : files) {
System.out.println(file.getName());
SimpleFeature simpleFeature = readFeature(file);
Integer edgeId = (Integer) simpleFeature.getAttribute("edgeId");
String name = (String) simpleFeature.getAttribute("name");
String referenceTrack = (String) simpleFeature.getAttribute("url");
LineString lineString = (LineString) simpleFeature.getAttribute("the_geom");
JsonBasedEdge jsonBasedEdge = new JsonBasedEdge();
jsonBasedEdge.setEdgeId(edgeId);
jsonBasedEdge.setName(name);
jsonBasedEdge.setReferenceString(referenceTrack);
jsonBasedEdge.setLineString(lineString);
edges.add(jsonBasedEdge);
}
return edges;
}
SimpleFeature readFeature(File child) {
SimpleFeature feature = null;
GeometryJSON geometryJson = new GeometryJSON(DIGITS_OF_PRECISION);
FeatureJSON featureJson = new FeatureJSON(geometryJson);
featureJson.setFeatureType(JsonSchemaTypeMap.getSchema(JsonStoreType.EDGE));
try {
InputStream iStream = new FileInputStream(child);
feature = featureJson.readFeature(iStream);
} catch (IOException e) {
e.printStackTrace();
}
return feature;
}
/**
* Limit the file names being read to those ending with the extension
* 'geojson'.
*
* Shared locally amongst a few methods.
*
* @author jett
*/
class GeoJsonFileFilter implements FilenameFilter {
@Override
public boolean accept(File dir, String name) {
return (name.endsWith("geojson"));
}
}
}
| [
"jettmarks@gmail.com"
] | jettmarks@gmail.com |
864eb9dffa64159aa8e686579823dacddbd01bd5 | d71e879b3517cf4fccde29f7bf82cff69856cfcd | /ExtractedJars/RT_News_com.rt.mobile.english/javafiles/com/google/android/gms/internal/ads/zzayp.java | deb59a32903fb21fb0f9e1c066a1bbeb7d0915cd | [
"MIT"
] | permissive | Andreas237/AndroidPolicyAutomation | b8e949e072d08cf6c6166c3f15c9c63379b8f6ce | c1ed10a2c6d4cf3dfda8b8e6291dee2c2a15ee8a | refs/heads/master | 2020-04-10T02:14:08.789751 | 2019-05-16T19:29:11 | 2019-05-16T19:29:11 | 160,739,088 | 5 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,688 | java | // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) annotate safe
package com.google.android.gms.internal.ads;
import java.nio.ByteBuffer;
import java.security.GeneralSecurityException;
import java.security.interfaces.ECPublicKey;
import java.security.spec.ECParameterSpec;
// Referenced classes of package com.google.android.gms.internal.ads:
// zzauf, zzayt, zzayr, zzayn,
// zzays, zzatz, zzayw
public final class zzayp
implements zzauf
{
public zzayp(ECPublicKey ecpublickey, byte abyte0[], String s, zzayw zzayw, zzayn zzayn1)
throws GeneralSecurityException
{
// 0 0:aload_0
// 1 1:invokespecial #28 <Method void Object()>
zzayt.zza(ecpublickey.getW(), ecpublickey.getParams().getCurve());
// 2 4:aload_1
// 3 5:invokeinterface #34 <Method java.security.spec.ECPoint ECPublicKey.getW()>
// 4 10:aload_1
// 5 11:invokeinterface #38 <Method ECParameterSpec ECPublicKey.getParams()>
// 6 16:invokevirtual #44 <Method java.security.spec.EllipticCurve ECParameterSpec.getCurve()>
// 7 19:invokestatic #50 <Method void zzayt.zza(java.security.spec.ECPoint, java.security.spec.EllipticCurve)>
zzdni = new zzayr(ecpublickey);
// 8 22:aload_0
// 9 23:new #52 <Class zzayr>
// 10 26:dup
// 11 27:aload_1
// 12 28:invokespecial #55 <Method void zzayr(ECPublicKey)>
// 13 31:putfield #57 <Field zzayr zzdni>
zzdnf = abyte0;
// 14 34:aload_0
// 15 35:aload_2
// 16 36:putfield #59 <Field byte[] zzdnf>
zzdne = s;
// 17 39:aload_0
// 18 40:aload_3
// 19 41:putfield #61 <Field String zzdne>
zzdng = zzayw;
// 20 44:aload_0
// 21 45:aload 4
// 22 47:putfield #63 <Field zzayw zzdng>
zzdnh = zzayn1;
// 23 50:aload_0
// 24 51:aload 5
// 25 53:putfield #65 <Field zzayn zzdnh>
// 26 56:return
}
public final byte[] zzc(byte abyte0[], byte abyte1[])
throws GeneralSecurityException
{
abyte1 = ((byte []) (zzdni.zza(zzdne, zzdnf, abyte1, zzdnh.zzwm(), zzdng)));
// 0 0:aload_0
// 1 1:getfield #57 <Field zzayr zzdni>
// 2 4:aload_0
// 3 5:getfield #61 <Field String zzdne>
// 4 8:aload_0
// 5 9:getfield #59 <Field byte[] zzdnf>
// 6 12:aload_2
// 7 13:aload_0
// 8 14:getfield #65 <Field zzayn zzdnh>
// 9 17:invokeinterface #74 <Method int zzayn.zzwm()>
// 10 22:aload_0
// 11 23:getfield #63 <Field zzayw zzdng>
// 12 26:invokevirtual #77 <Method zzays zzayr.zza(String, byte[], byte[], int, zzayw)>
// 13 29:astore_2
abyte0 = zzdnh.zzi(((zzays) (abyte1)).zzaaq()).zzc(abyte0, zzdhv);
// 14 30:aload_0
// 15 31:getfield #65 <Field zzayn zzdnh>
// 16 34:aload_2
// 17 35:invokevirtual #83 <Method byte[] zzays.zzaaq()>
// 18 38:invokeinterface #87 <Method zzatz zzayn.zzi(byte[])>
// 19 43:aload_1
// 20 44:getstatic #21 <Field byte[] zzdhv>
// 21 47:invokeinterface #91 <Method byte[] zzatz.zzc(byte[], byte[])>
// 22 52:astore_1
abyte1 = ((zzays) (abyte1)).zzaap();
// 23 53:aload_2
// 24 54:invokevirtual #94 <Method byte[] zzays.zzaap()>
// 25 57:astore_2
return ByteBuffer.allocate(abyte1.length + abyte0.length).put(abyte1).put(abyte0).array();
// 26 58:aload_2
// 27 59:arraylength
// 28 60:aload_1
// 29 61:arraylength
// 30 62:iadd
// 31 63:invokestatic #100 <Method ByteBuffer ByteBuffer.allocate(int)>
// 32 66:aload_2
// 33 67:invokevirtual #104 <Method ByteBuffer ByteBuffer.put(byte[])>
// 34 70:aload_1
// 35 71:invokevirtual #104 <Method ByteBuffer ByteBuffer.put(byte[])>
// 36 74:invokevirtual #107 <Method byte[] ByteBuffer.array()>
// 37 77:areturn
}
private static final byte zzdhv[] = new byte[0];
private final String zzdne;
private final byte zzdnf[];
private final zzayw zzdng;
private final zzayn zzdnh;
private final zzayr zzdni;
static
{
// 0 0:iconst_0
// 1 1:newarray byte[]
// 2 3:putstatic #21 <Field byte[] zzdhv>
//* 3 6:return
}
}
| [
"silenta237@gmail.com"
] | silenta237@gmail.com |
097f6f0020839636f3d5793a74be604e911ec3e1 | 78e340dda73697b4c7e32ac346f116b61c981226 | /src/org/dmd/dmc/types/DmcTypeIntegerName.java | 668566688f233823382b0f53794e227ace1aeb9b | [] | no_license | dark-matter-org/dark-matter-data | 451e7b9da3ae34d94deb4084d462b887d1624da9 | b2e9bc79a6a8162651672871e2c7ccdf47a642e7 | refs/heads/master | 2023-05-25T00:47:44.782732 | 2023-05-19T17:15:06 | 2023-05-19T17:15:06 | 46,194,282 | 4 | 0 | null | 2023-05-19T17:15:07 | 2015-11-14T22:17:39 | Java | UTF-8 | Java | false | false | 3,258 | java | // ---------------------------------------------------------------------------
// dark-matter-data
// Copyright (c) 2011 dark-matter-data committers
// ---------------------------------------------------------------------------
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License as published by the
// Free Software Foundation; either version 3 of the License, or (at your
// option) any later version.
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
// more details.
// You should have received a copy of the GNU Lesser General Public License along
// with this program; if not, see <http://www.gnu.org/licenses/lgpl.html>.
// ---------------------------------------------------------------------------
package org.dmd.dmc.types;
import java.io.Serializable;
import org.dmd.dmc.DmcAttributeInfo;
import org.dmd.dmc.DmcInputStreamIF;
import org.dmd.dmc.DmcOutputStreamIF;
import org.dmd.dmc.DmcValueException;
/**
* The DmcTypeIntegerName class provides support for simple, Integer based names for objects.
*/
@SuppressWarnings("serial")
abstract public class DmcTypeIntegerName extends DmcTypeDmcObjectName<IntegerName> implements Serializable {
public DmcTypeIntegerName(){
}
public DmcTypeIntegerName(DmcAttributeInfo ai){
super(ai);
}
////////////////////////////////////////////////////////////////////////////////
// DmcAttribute abstract overrides
@Override
public IntegerName typeCheck(Object value) throws DmcValueException {
IntegerName rc = null;
if (value instanceof IntegerName){
rc = (IntegerName) value;
}
else if (value instanceof Integer){
rc = new IntegerName((Integer) value);
}
else if (value instanceof String){
try{
Integer n = Integer.valueOf((String) value);
rc = new IntegerName(n);
}
catch(NumberFormatException e){
throw(new DmcValueException("Invalid IntegerName value: " + value.toString()));
}
}
else{
throw(new DmcValueException("Object of class: " + value.getClass().getName() + " passed where object compatible with IntegerName expected."));
}
return rc;
}
@Override
public IntegerName cloneValue(IntegerName original) {
return(new IntegerName(original.name));
}
////////////////////////////////////////////////////////////////////////////////
// Serialization
/**
* Write a IntegerName.
* @param dos The output stream.
* @param value The value to be serialized.
* @throws Exception
*/
public void serializeValue(DmcOutputStreamIF dos, IntegerName value) throws Exception {
value.serializeIt(dos);
}
/**
* Read a IntegerName.
* @param dis the input stream.
* @return A value read from the input stream.
* @throws Exception
*/
public IntegerName deserializeValue(DmcInputStreamIF dis) throws Exception {
IntegerName rc = new IntegerName();
rc.deserializeIt(dis);
return(rc);
}
}
| [
"pstrong99@gmail.com"
] | pstrong99@gmail.com |
566a57614d88628f22bf9dd45ee60bb7ea160b04 | 205e7175c428ff9d83d8bded152d22de92c8b030 | /mpos_web/src/main/java/com/site/controller/TCustSaleinfoController.java | 4cd09bc8000684b4dbc81182b7b02095a707b4a0 | [] | no_license | langrs/mpos | e0039ce479a052a9ff21b9ba55b96c447f75561c | 837c536c527179eba1bec6f7c954ea9a6d18ea0f | refs/heads/master | 2020-03-23T20:20:10.035520 | 2018-07-23T15:41:25 | 2018-07-23T15:42:16 | 142,035,656 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,283 | java | package com.site.controller;
import java.util.List;
import com.site.core.annotation.Myannotation;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import com.site.core.base.BaseController;
import com.site.entity.TCustSaleinfo;
import com.site.service.TCustSaleinfoService;
import com.site.util.BeanToMap;
/**
*<pre>
* 对象功能:tCustSaleinfo Controller类
* 开发公司:ERP
* 开发人员:huj
* 创建时间:2015-03-24 14:24:29
*</pre>
*/
@Controller
@RequestMapping(value = "tCustSaleinfo/")
public class TCustSaleinfoController extends BaseController {
@Resource
private TCustSaleinfoService tCustSaleinfoService;
@Myannotation(description = "列表")
@RequestMapping(value = "list.do")
public String list(TCustSaleinfo tCustSaleinfo,HttpServletRequest request,
HttpServletResponse response, Model model,Boolean dialog) {
List<TCustSaleinfo> list=tCustSaleinfoService.search(BeanToMap.beanToMap(tCustSaleinfo));
model.addAttribute("list", list);
model.addAttribute("tCustSaleinfo", tCustSaleinfo);
model.addAttribute("current", "tCustSaleinfo");
if (dialog != null && dialog) {
return "/tCustSaleinfo/dialog";
} else {
return "/tCustSaleinfo/list";
}
}
@Myannotation(description = "详情")
@RequestMapping(value = "/view.do")
public String view(Long id, Model model) {
TCustSaleinfo tCustSaleinfo = tCustSaleinfoService.get(id);
model.addAttribute("tCustSaleinfo", tCustSaleinfo);
model.addAttribute("current", "tCustSaleinfo");
return "/tCustSaleinfo/view";
}
@Myannotation(description = "更新")
@RequestMapping(value = "/edit.do")
public String edit( Long id, Model model) {
TCustSaleinfo tCustSaleinfo = tCustSaleinfoService.get(id);
model.addAttribute("tCustSaleinfo", tCustSaleinfo);
model.addAttribute("current", "tCustSaleinfo");
return "/tCustSaleinfo/add";
}
@Myannotation(description = "新增")
@RequestMapping(value = "add.do")
public String add(TCustSaleinfo tCustSaleinfo,Model model) {
tCustSaleinfo.setId("0");
model.addAttribute("tCustSaleinfo", tCustSaleinfo);
return "/tCustSaleinfo/add";
}
@Myannotation(description = "保存")
@RequestMapping(value = "save.do")
public String save(TCustSaleinfo tCustSaleinfo, Model model,
RedirectAttributes redirectAttributes) {
if("0".equals(tCustSaleinfo.getId())){
tCustSaleinfoService.create(tCustSaleinfo);
} else {
tCustSaleinfoService.update(tCustSaleinfo);
}
addMessage(redirectAttributes, "保存数据成功");
return "redirect:/tCustSaleinfo/list.do";
}
@Myannotation(description = "删除")
@RequestMapping(value = "delete.do")
public String delete(Long id, Model model,
RedirectAttributes redirectAttributes,Long[] ids) {
tCustSaleinfoService.remove(id);
tCustSaleinfoService.removeByIds(ids);
addMessage(redirectAttributes, "删除数据成功!");
return "redirect:/tCustSaleinfo/list.do";
}
}
| [
"27617839@qq.com"
] | 27617839@qq.com |
36e69e68a1cdecff6fb94171f796690f37285e52 | 6c640002f30f26e2db6d5619fb236a9063964c97 | /src/main/java/org/moon/core/init/TableCreator.java | 02806e234192d0ce6e3f2aaa48aec9f2d2c65155 | [] | no_license | gavincook/cddtsc | 72f3e1f0ab94a1c18ff9263d824e5dbaff972702 | 052b7a4015ff4ceadd9f9190bb4fa3caac265492 | refs/heads/master | 2016-09-06T16:23:42.728520 | 2015-05-05T15:52:36 | 2015-05-05T15:52:36 | 35,229,040 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 700 | java | package org.moon.core.init;
import org.apache.log4j.Logger;
import org.moon.db.manager.DBManager;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import javax.annotation.Resource;
public class TableCreator implements BeanFactoryAware{
private Logger log = Logger.getLogger(getClass());
@Resource
private DBManager dbManager;
@Override
public void setBeanFactory(BeanFactory arg0) throws BeansException {
log.debug("[spring-rbac]create platform table if necessary");
dbManager.createTableIfNecessary();
log.info("[spring-rbac]create platform table successfully.");
}
}
| [
"swbyzx@gmail.com"
] | swbyzx@gmail.com |
677442418819111465ba20346a4fe4a742a80382 | 92f10c41bad09bee05acbcb952095c31ba41c57b | /app/src/main/java/io/github/alula/ohmygod/MainActivity2221.java | 8c579c055537a5cff09cb04ea96df41cd7b6cac9 | [] | no_license | alula/10000-activities | bb25be9aead3d3d2ea9f9ef8d1da4c8dff1a7c62 | f7e8de658c3684035e566788693726f250170d98 | refs/heads/master | 2022-07-30T05:54:54.783531 | 2022-01-29T19:53:04 | 2022-01-29T19:53:04 | 453,501,018 | 16 | 0 | null | null | null | null | UTF-8 | Java | false | false | 339 | java | package io.github.alula.ohmygod;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity2221 extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
} | [
"6276139+alula@users.noreply.github.com"
] | 6276139+alula@users.noreply.github.com |
36f99ffd8ea7e7054ff7cda8aa18c6fb2528bb64 | 840a2793dcb6cad4cd9541e572c984123ef99ae2 | /NewVersion/app/src/main/java/dingw/com/newversion/fragment/community/LawyerMideaFragment.java | 2a73ef9891dc166d8f86f5bb84aac2d0fe624cc5 | [] | no_license | kimonic/NewVersion1 | 9eea5db895c12f92be3e662911e5934fed694f65 | 99854a892067241c4e242bf101b987470ae7ade3 | refs/heads/master | 2021-01-20T09:06:37.686748 | 2017-05-22T10:04:24 | 2017-05-22T10:04:24 | 90,218,871 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,802 | java | package dingw.com.newversion.fragment.community;
import android.os.Handler;
import android.os.Message;
import android.view.View;
import android.widget.BaseAdapter;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import dingw.com.newversion.R;
import dingw.com.newversion.adapter.community.LawyerMediaXLVAdapter;
import dingw.com.newversion.base.BaseBean;
import dingw.com.newversion.base.RefreshBaseFragment;
import dingw.com.newversion.bean.community.LawyerMediaBean;
import dingw.com.newversion.constant.Constant;
import dingw.com.newversion.http.HttpGP;
import dingw.com.newversion.utils.ToastUtils;
import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.Response;
/**
* Created by 12348 on 2017/5/18 0018.
* 主页--社区--律师自媒体
*/
public class LawyerMideaFragment extends RefreshBaseFragment {
private List<BaseBean> list;
private LawyerMediaBean bean;
private LawyerMediaXLVAdapter adapter;
private Handler handler=new Handler(){
@Override
public void handleMessage(Message msg) {
switch (msg.what){
case 1:
initLoad();
ToastUtils.showToast(getActivity(),R.string.shujujiazaichenggong);
break;
}
}
};
@Override
public BaseAdapter setAdapter() {
adapter=new LawyerMediaXLVAdapter(getActivity(),list);
return adapter;
}
@Override
public void setItemClick(int position) {
}
@Override
public void newRefresh() {
}
@Override
public void newLoadMore() {
}
@Override
public void onClick(View v) {
}
@Override
public void initData() {
list=new ArrayList<>();//数据源
HttpGP.sendOkhttpGetRequest(Constant.LAWYER_ZIMEITI, new Callback() {
@Override
public void onFailure(Call call, IOException e) {
ToastUtils.showToast(getActivity(), R.string.shujujiazaishibai);
}
@Override
public void onResponse(Call call, Response response) throws IOException {
Gson gson=new Gson();
bean=gson.fromJson(response.body().string(),new TypeToken<LawyerMediaBean>(){}.getType());
Message msg=Message.obtain();
msg.what=1;
handler.sendMessage(msg);
}
}, getActivity());
}
@Override
public void initLoad() {
if (bean!=null){
for (int i = 0; i < bean.getList().size(); i++) {
list.add(bean.getList().get(i));
}
adapter.notifyDataSetChanged();
showXlistview();
}
}
}
| [
"123456"
] | 123456 |
afc7c157cc69bc0affc357185028104f9a22b281 | 4e7d87840cf911e3a37bebfcf9dc4bcb3a4a7c4d | /spring-vault-core/src/test/java/org/springframework/vault/annotation/LeaseAwareVaultPropertySourceIntegrationTests.java | 414cea1d5d27dc4744c2e4860df893415e7db7a2 | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] | permissive | domix/spring-vault | d78cb062aba2a5df2c551a6356aebb605edbee60 | b28d97fe1bcc6fcf2b7147b30b4f656ad6327080 | refs/heads/master | 2021-01-21T07:30:31.256543 | 2017-05-12T09:48:48 | 2017-05-12T09:50:52 | 91,616,514 | 1 | 0 | null | 2017-05-17T20:18:05 | 2017-05-17T20:18:05 | null | UTF-8 | Java | false | false | 2,501 | java | /*
* Copyright 2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.vault.annotation;
import java.util.Collections;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.env.Environment;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.vault.annotation.VaultPropertySource.Renewal;
import org.springframework.vault.core.VaultIntegrationTestConfiguration;
import org.springframework.vault.core.VaultOperations;
import org.springframework.vault.util.VaultRule;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Integration test for {@link VaultPropertySource}.
*
* @author Mark Paluch
*/
@RunWith(SpringRunner.class)
@ContextConfiguration
public class LeaseAwareVaultPropertySourceIntegrationTests {
@VaultPropertySource(value = { "secret/myapp",
"secret/myapp/profile" }, renewal = Renewal.RENEW)
static class Config extends VaultIntegrationTestConfiguration {
}
@Autowired
Environment env;
@Value("${myapp}")
String myapp;
@BeforeClass
public static void beforeClass() {
VaultRule rule = new VaultRule();
rule.before();
VaultOperations vaultOperations = rule.prepare().getVaultOperations();
vaultOperations.write("secret/myapp",
Collections.singletonMap("myapp", "myvalue"));
vaultOperations.write("secret/myapp/profile",
Collections.singletonMap("myprofile", "myprofilevalue"));
}
@Test
public void environmentShouldResolveProperties() {
assertThat(env.getProperty("myapp")).isEqualTo("myvalue");
assertThat(env.getProperty("myprofile")).isEqualTo("myprofilevalue");
}
@Test
public void valueShouldInjectProperty() {
assertThat(myapp).isEqualTo("myvalue");
}
}
| [
"mpaluch@pivotal.io"
] | mpaluch@pivotal.io |
5c2211e782b4c44feee6adba7b2cfdebf747911e | e8dc623a3b54babbfccfcc48949ea9546f56a939 | /src/com/javabase/base/cache/MCacheManager.java | 469e5f797f0b2e09295317922deed73748e53bce | [] | no_license | softgo/BPStruts1 | dd39bbb72c8c3c5ff384a7b84c1993f2a734f18f | 607c5055cf3d7de42cfd9cb78e5b0d68d7303bc8 | refs/heads/master | 2021-01-13T10:19:32.941492 | 2019-09-29T06:52:55 | 2019-09-29T06:52:55 | 76,633,471 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,052 | java | package com.javabase.base.cache;
import java.io.File;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import net.sf.ehcache.Cache;
import net.sf.ehcache.CacheManager;
import net.sf.ehcache.config.CacheConfiguration;
import net.sf.ehcache.config.Configuration;
import net.sf.ehcache.config.DiskStoreConfiguration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.javabase.base.util.PropertiesUtils;
/**
* 缓存的内存管理
*
* @author bruce.
*
*/
public class MCacheManager {
private static Logger logger = LoggerFactory.getLogger(MCacheManager.class.getName());
/**
* 存放自己编写的Mcache的对象.
*/
private Map<Object, MCache> cacheMap = new HashMap<Object, MCache>();
private static String CACHE_PATH = "java.io.tmpdir";
private static String MAX_MEMORY = "512m";
private static final String BLOCK_MAX_MEMORY = "512m";
private static MCacheManager instance = null;
private Properties props = null;
private CacheManager cacheManager = null;
//内存中的缓存.
private Cache memoryCache = null;
private MCache dataCache = null;
/**
* 移除的策略.
*/
private static final String removePolicy = "LFU";
public static MCacheManager getInstance() {
if (instance == null) {
synchronized (MCacheManager.class) {
if (instance == null) {
instance = new MCacheManager();
}
}
}
return instance;
}
private MCacheManager() {
super();
double maxMemory = (Runtime.getRuntime().maxMemory() * 0.4) / (1024 * 1024);// m
MAX_MEMORY = maxMemory + "";
}
/**
* 内存缓存.
* @return
*/
public Cache memoryCache() {
if (memoryCache == null) {
synchronized (this) {
if (memoryCache == null) {
String maxMemory = getProperty("block.cache.max.memory",BLOCK_MAX_MEMORY);
memoryCache = getCache("__memoryCache__", maxMemory, false);
}
}
}
return memoryCache;
}
/**
* 磁盘缓存.
* @param cacheName
* @param cache
* @param cacheManager
* @return
*/
public MCache dataCache(String cacheName ,Cache cache , CacheManager cacheManager) {
if (dataCache == null) {
synchronized (this) {
if (dataCache == null) {
dataCache = new MCache(cacheName, cache, cacheManager);
}
}
}
return dataCache;
}
/**
* 获得 Cache
* @param cacheName
* @param maxMemory
* @return
*/
public Cache getCache(String cacheName, String maxMemory ) {
Cache cache = getCacheManager().getCache(cacheName);
if (cache == null) {
synchronized (this) {
cache = getCacheManager().getCache(cacheName);
if (cache == null) {
CacheConfiguration cacheConfig = new CacheConfiguration();
cacheConfig.name(cacheName);
cacheConfig.eternal(false);
String removeTag = getProperty("cache.remove.tag", removePolicy);
cacheConfig.setMemoryStoreEvictionPolicy(removeTag);
cacheConfig.setOverflowToDisk(false);
cacheConfig.setDiskPersistent(false);
cacheConfig.setMaxBytesLocalHeap(maxMemory);
cache = new Cache(cacheConfig);
getCacheManager().addCache(cache);
}
}
}
return cache;
}
/**
* 获得Cache
* @param cacheName
* @param maxMemory
* @param saveDisk
* @return
*/
private Cache getCache(String cacheName, String maxMemory, boolean saveDisk) {
Cache cache = getCacheManager().getCache(cacheName);
if (cache == null) {
synchronized (this) {
cache = getCacheManager().getCache(cacheName);
if (cache == null) {
CacheConfiguration cacheConfig = new CacheConfiguration();
cacheConfig.name(cacheName);
cacheConfig.eternal(false);
String removeTag = getProperty("cache.remove.tag", removePolicy);
cacheConfig.setMemoryStoreEvictionPolicy(removeTag);
cacheConfig.setOverflowToDisk(saveDisk);
cacheConfig.setDiskPersistent(false);
cacheConfig.setMaxBytesLocalHeap(maxMemory);
cache = new Cache(cacheConfig);
getCacheManager().addCache(cache);
}
}
}
return cache;
}
/**
* 获得CacheManager.
* @return
*/
public CacheManager getCacheManager() {
if (cacheManager == null) {
synchronized (this) {
if (cacheManager == null) {
Configuration configuration = new Configuration();
DiskStoreConfiguration dscg = new DiskStoreConfiguration();
String cacheFilePath = getProperty("cache.path.disk", CACHE_PATH);
File file = new File(cacheFilePath);
if (!file.exists()) {
file.mkdirs();
}
CACHE_PATH = cacheFilePath;
dscg.setPath(cacheFilePath);
configuration.diskStore(dscg);
configuration.setMaxBytesLocalHeap(getProperty("cache.manager.max.memory", MAX_MEMORY));
configuration.setDynamicConfig(true);
configuration.setMonitoring("autodetect");
configuration.setUpdateCheck(false);
cacheManager = new CacheManager(configuration);
}
}
}
return cacheManager;
}
/**
* 添加
* @param mCache
*/
public void addCache(MCache mCache){
cacheMap.put(mCache.getCacheName(), mCache);
}
/**
* 获得.
* @param cacheName
* @return
*/
public MCache get(String cacheName){
if (cacheMap.containsKey(cacheName)) {
return (MCache) cacheMap.get(cacheName);
}else {
return null;
}
}
private String getProperty(String key, String defaultValue) {
if (props == null) {
synchronized (this) {
if (props == null) {
try {
props = PropertiesUtils.getProperties("/configPros/cache.properties");
} catch (Exception e) {
logger.error(e.getMessage());
}
}
}
}
return props.getProperty(key, defaultValue);
}
private boolean deleteCache(){
File file = new File(CACHE_PATH);
File[] folderFiles = file.listFiles();
for (File f : folderFiles) {
f.delete();
}
return true;
}
}
| [
"sunping521@126.com"
] | sunping521@126.com |
7cdc7f295deb62ba0c2739bb95f5966b934c9dcf | 3a6b03115f89c52c0990048d653e2d66ff85feba | /android/view/GestureDetector.java | 9e1548d4c6b23cfee6038a125dc04bcf648f30a2 | [] | no_license | isabella232/android-sdk-sources-for-api-level-1 | 9159e92080649343e6e2be0da2b933fa9d3fea04 | c77731af5068b85a350e768757d229cae00f8098 | refs/heads/master | 2023-03-18T05:07:06.633807 | 2015-06-13T13:35:17 | 2015-06-13T13:35:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,192 | java | // Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space
// Source File Name: GestureDetector.java
package android.view;
import android.os.Handler;
// Referenced classes of package android.view:
// MotionEvent
public class GestureDetector
{
public static class SimpleOnGestureListener
implements OnGestureListener
{
public boolean onSingleTapUp(MotionEvent e)
{
throw new RuntimeException("Stub!");
}
public void onLongPress(MotionEvent e)
{
throw new RuntimeException("Stub!");
}
public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY)
{
throw new RuntimeException("Stub!");
}
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY)
{
throw new RuntimeException("Stub!");
}
public void onShowPress(MotionEvent e)
{
throw new RuntimeException("Stub!");
}
public boolean onDown(MotionEvent e)
{
throw new RuntimeException("Stub!");
}
public SimpleOnGestureListener()
{
throw new RuntimeException("Stub!");
}
}
public static interface OnGestureListener
{
public abstract boolean onDown(MotionEvent motionevent);
public abstract void onShowPress(MotionEvent motionevent);
public abstract boolean onSingleTapUp(MotionEvent motionevent);
public abstract boolean onScroll(MotionEvent motionevent, MotionEvent motionevent1, float f, float f1);
public abstract void onLongPress(MotionEvent motionevent);
public abstract boolean onFling(MotionEvent motionevent, MotionEvent motionevent1, float f, float f1);
}
public GestureDetector(OnGestureListener listener, Handler handler)
{
throw new RuntimeException("Stub!");
}
public GestureDetector(OnGestureListener listener)
{
throw new RuntimeException("Stub!");
}
public void setIsLongpressEnabled(boolean isLongpressEnabled)
{
throw new RuntimeException("Stub!");
}
public boolean isLongpressEnabled()
{
throw new RuntimeException("Stub!");
}
public boolean onTouchEvent(MotionEvent ev)
{
throw new RuntimeException("Stub!");
}
}
| [
"root@ifeegoo.com"
] | root@ifeegoo.com |
e51b4e7c05f8dd5fe2419b67bb9077e27317ee29 | 7bea7fb60b5f60f89f546a12b43ca239e39255b5 | /src/javax/management/relation/Relation.java | 3fa3edad1a8e7c488d5609ac732373e8d5f54560 | [] | no_license | sorakeet/fitcorejdk | 67623ab26f1defb072ab473f195795262a8ddcdd | f946930a826ddcd688b2ddbb5bc907d2fc4174c3 | refs/heads/master | 2021-01-01T05:52:19.696053 | 2017-07-15T01:33:41 | 2017-07-15T01:33:41 | 97,292,673 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,997 | java | /**
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package javax.management.relation;
import javax.management.ObjectName;
import java.util.List;
import java.util.Map;
public interface Relation{
public List<ObjectName> getRole(String roleName)
throws IllegalArgumentException,
RoleNotFoundException,
RelationServiceNotRegisteredException;
public RoleResult getRoles(String[] roleNameArray)
throws IllegalArgumentException,
RelationServiceNotRegisteredException;
public Integer getRoleCardinality(String roleName)
throws IllegalArgumentException,
RoleNotFoundException;
public RoleResult getAllRoles()
throws RelationServiceNotRegisteredException;
public RoleList retrieveAllRoles();
public void setRole(Role role)
throws IllegalArgumentException,
RoleNotFoundException,
RelationTypeNotFoundException,
InvalidRoleValueException,
RelationServiceNotRegisteredException,
RelationNotFoundException;
public RoleResult setRoles(RoleList roleList)
throws IllegalArgumentException,
RelationServiceNotRegisteredException,
RelationTypeNotFoundException,
RelationNotFoundException;
public void handleMBeanUnregistration(ObjectName objectName,
String roleName)
throws IllegalArgumentException,
RoleNotFoundException,
InvalidRoleValueException,
RelationServiceNotRegisteredException,
RelationTypeNotFoundException,
RelationNotFoundException;
public Map<ObjectName,List<String>> getReferencedMBeans();
public String getRelationTypeName();
public ObjectName getRelationServiceName();
public String getRelationId();
}
| [
"panxiaoping@9af151c5-2e68-9a40-a710-8967c58c11f7"
] | panxiaoping@9af151c5-2e68-9a40-a710-8967c58c11f7 |
de4e394bf07a8619b0ae721999ebfb4099108eea | d74ae31c66c8493260e4dbf8b3cc87581337174c | /src/main/java/hello/service/Customer1924Service.java | dd7bf6cc41edf477a1ee0f49d886600e52f58607 | [] | no_license | scratches/spring-data-gazillions | 72e36c78a327f263f0de46fcee991473aa9fb92c | 858183c99841c869d688cdbc4f2aa0f431953925 | refs/heads/main | 2021-06-07T13:20:08.279099 | 2018-08-16T12:13:37 | 2018-08-16T12:13:37 | 144,152,360 | 0 | 0 | null | 2021-04-26T17:19:34 | 2018-08-09T12:53:18 | Java | UTF-8 | Java | false | false | 223 | java | package hello.service;
import org.springframework.stereotype.Service;
import hello.repo.Customer1924Repository;
@Service
public class Customer1924Service {
public Customer1924Service(Customer1924Repository repo) {
}
}
| [
"dsyer@pivotal.io"
] | dsyer@pivotal.io |
ae59db426eec54558bfe7a5643fa61232d394917 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/14/14_7efc309ed9e4e4f3cf5f62410c4341c926b92a3b/CachePut/14_7efc309ed9e4e4f3cf5f62410c4341c926b92a3b_CachePut_s.java | c106babf3db009412cd933af20a0f3ad224489e9 | [] | 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,818 | java | package railo.runtime.functions.cache;
import railo.commons.io.cache.Cache;
import railo.runtime.PageContext;
import railo.runtime.config.ConfigImpl;
import railo.runtime.exp.PageException;
import railo.runtime.ext.function.Function;
import railo.runtime.op.Caster;
import railo.runtime.type.dt.TimeSpan;
/**
*
*/
public final class CachePut implements Function {
private static final long serialVersionUID = -8636947330333269874L;
public static String call(PageContext pc, String key,Object value) throws PageException {
return _call(pc,key, value, null, null,null);
}
public static String call(PageContext pc, String key,Object value,TimeSpan timeSpan) throws PageException {
return _call(pc,key, value, Long.valueOf(timeSpan.getMillis()), null,null);
}
public static String call(PageContext pc, String key,Object value,TimeSpan timeSpan, TimeSpan idleTime) throws PageException {
return _call(pc,key, value, Long.valueOf(timeSpan.getMillis()), Long.valueOf(idleTime.getMillis()),null);
}
public static String call(PageContext pc, String key,Object value,TimeSpan timeSpan, TimeSpan idleTime,String cacheName) throws PageException {
return _call(pc,key, value, Long.valueOf(timeSpan.getMillis()), Long.valueOf(idleTime.getMillis()),cacheName);
}
private static String _call(PageContext pc, String key,Object value,Long timeSpan, Long idleTime,String cacheName) throws PageException {
//if(timeSpan!=null && timeSpan.longValue()==0L) return "";
//if(idleTime!=null && idleTime.longValue()==0L) return "";
try {
Cache cache = Util.getCache(pc.getConfig(),cacheName,ConfigImpl.CACHE_DEFAULT_OBJECT);
cache.put(Util.key(key), value, idleTime, timeSpan);
} catch (Exception e) {
throw Caster.toPageException(e);
}
return "";
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
becb547813b6959a9b0ef3ee6ece509b1e1c7f2f | ed5159d056e98d6715357d0d14a9b3f20b764f89 | /test/irvine/oeis/a019/A019945Test.java | c98ee72483ee98c49e479751d88072c288e0ec4a | [] | no_license | flywind2/joeis | c5753169cf562939b04dd246f8a2958e97f74558 | e5efd6971a0062ac99f4fae21a7c78c9f9e74fea | refs/heads/master | 2020-09-13T18:34:35.080552 | 2019-11-19T05:40:55 | 2019-11-19T05:40:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 195 | java | package irvine.oeis.a019;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A019945Test extends AbstractSequenceTest {
}
| [
"sairvin@gmail.com"
] | sairvin@gmail.com |
3627aec44aa3e33eb647545297253e2262998158 | a12a0f98b7a768c02d8d8329d1c52e2610fc7c51 | /app/src/main/java/in/vinkrish/quickwash/data/QuickWashDBHelper.java | 34faeb64cb10c2208ec265c8da4eca2fc51c7953 | [] | no_license | emppas/QuickWash | 1bff50439f20f1089c4dd3bafa10616c9d5277c3 | 24cc2e04b61a06590927aeaeb848e26608f465f8 | refs/heads/master | 2021-08-30T07:16:57.983949 | 2017-12-16T17:16:54 | 2017-12-16T17:16:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,617 | java | package in.vinkrish.quickwash.data;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import in.vinkrish.quickwash.data.QuickWashContract.QuickWashEntry;
/**
* Created by vinkrish on 04/12/15.
*/
public class QuickWashDBHelper extends SQLiteOpenHelper {
private static final int DATABASE_VERSION = 1;
static final String DATABASE_NAME = "quickwash.db";
public QuickWashDBHelper (Context context) {
super(context, DATABASE_NAME, null, DATABASE_VERSION);
}
@Override
public void onCreate(SQLiteDatabase db) {
final String SQL_CREATE_QUICKWASH_TABLE = "CREATE TABLE " + QuickWashEntry.TABLE_NAME + " (" +
QuickWashEntry._ID + " INTEGER PRIMARY KEY," +
QuickWashEntry.COLUMN_NAME + " TEXT NOT NULL, " +
QuickWashEntry.COLUMN_MOBILE + " TEXT NOT NULL, " +
QuickWashEntry.COLUMN_ALTERNATE_MOBILE + " TEXT NOT NULL, " +
QuickWashEntry.COLUMN_EMAIL + " TEXT NOT NULL, " +
QuickWashEntry.COLUMN_ADDRESS + " TEXT NOT NULL, " +
QuickWashEntry.COLUMN_PINCODE + " TEXT NOT NULL, " +
QuickWashEntry.COLUMN_SERVICE + " TEXT NOT NULL, " +
QuickWashEntry.COLUMN_DATE + " TEXT NOT NULL " +
" );";
db.execSQL(SQL_CREATE_QUICKWASH_TABLE);
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
db.execSQL("DROP TABLE IF EXISTS " + QuickWashEntry.TABLE_NAME);
onCreate(db);
}
}
| [
"vinaykrishna1989@gmail.com"
] | vinaykrishna1989@gmail.com |
b7bd3c572d506921302bf9467867ead88a8fff8c | 1ba33872823155f476a6f7e0c7074d0aa2432431 | /src/main/java/de/hshannover/f4/trust/irongui/event/StatusChangedReceiver.java | 67514a614a8301e406eb3d18781aa1b1cf0f54f8 | [
"Apache-2.0"
] | permissive | trustathsh/irongui | 15c7eafac686ed91b9a969ed5dc3c957a97333b0 | 7d48f795e2df5578bb364cd32c6048ebce49f5d9 | refs/heads/master | 2021-01-01T06:26:29.438446 | 2015-03-19T13:11:17 | 2015-03-19T13:11:17 | 9,518,232 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,733 | java | /*
* #%L
* =====================================================
* _____ _ ____ _ _ _ _
* |_ _|_ __ _ _ ___| |_ / __ \| | | | ___ | | | |
* | | | '__| | | / __| __|/ / _` | |_| |/ __|| |_| |
* | | | | | |_| \__ \ |_| | (_| | _ |\__ \| _ |
* |_| |_| \__,_|___/\__|\ \__,_|_| |_||___/|_| |_|
* \____/
*
* =====================================================
*
* Hochschule Hannover
* (University of Applied Sciences and Arts, Hannover)
* Faculty IV, Dept. of Computer Science
* Ricklinger Stadtweg 118, 30459 Hannover, Germany
*
* Email: trust@f4-i.fh-hannover.de
* Website: http://trust.f4.hs-hannover.de/
*
* This file is part of irongui, version 0.4.8,
* implemented by the Trust@HsH research group at the Hochschule Hannover.
* %%
* Copyright (C) 2010 - 2015 Trust@HsH
* %%
* 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 de.hshannover.f4.trust.irongui.event;
import de.hshannover.f4.trust.irongui.communication.Connection;
/**
* Interface for status changes
*
* @author Tobias
*
*/
public interface StatusChangedReceiver {
void processStatusEvent(Connection con, String event);
}
| [
"bahellma@googlemail.com"
] | bahellma@googlemail.com |
c2da7310492a74fc5a2c194b2a7cad934788d483 | 95e944448000c08dd3d6915abb468767c9f29d3c | /sources/com/p280ss/android/ugc/aweme/shortvideo/p1548ar/p1549a/C38465a.java | 1ed1be00d44ad49006911ee9b88186271bc06db6 | [] | no_license | xrealm/tiktok-src | 261b1faaf7b39d64bb7cb4106dc1a35963bd6868 | 90f305b5f981d39cfb313d75ab231326c9fca597 | refs/heads/master | 2022-11-12T06:43:07.401661 | 2020-07-04T20:21:12 | 2020-07-04T20:21:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,431 | java | package com.p280ss.android.ugc.aweme.shortvideo.p1548ar.p1549a;
import android.graphics.PointF;
import android.view.MotionEvent;
import android.view.ScaleGestureDetector;
import com.p280ss.android.ugc.asve.recorder.effect.C20749b;
import com.p280ss.android.ugc.aweme.base.utils.C23482j;
import com.p280ss.android.ugc.aweme.common.C6907h;
import com.p280ss.android.ugc.aweme.common.MobClick;
import com.p280ss.android.ugc.aweme.port.p1479in.C35563c;
import com.p280ss.android.ugc.aweme.shortvideo.C39804em;
import com.p280ss.android.ugc.aweme.shortvideo.C39805en;
import com.p280ss.android.ugc.aweme.shortvideo.gesture.C39944a;
import com.p280ss.android.ugc.aweme.shortvideo.gesture.p1575a.C39949c;
import com.p280ss.android.ugc.aweme.sticker.model.FaceStickerBean;
/* renamed from: com.ss.android.ugc.aweme.shortvideo.ar.a.a */
public final class C38465a extends C39944a {
/* renamed from: a */
private final C20749b f99997a;
/* renamed from: b */
private FaceStickerBean f99998b;
/* renamed from: c */
private int f99999c;
/* renamed from: d */
private int f100000d;
/* renamed from: e */
private int f100001e;
/* renamed from: f */
private float f100002f = 1.0f;
/* renamed from: g */
private float f100003g = 1.0f;
/* renamed from: h */
private float f100004h;
/* renamed from: i */
private boolean f100005i;
/* renamed from: j */
private PointF f100006j = new PointF(-2.0f, -2.0f);
/* renamed from: k */
private int f100007k;
/* renamed from: l */
private int f100008l;
/* renamed from: m */
private int f100009m;
/* renamed from: n */
private int f100010n;
/* renamed from: o */
private PointF f100011o = new PointF();
/* renamed from: a */
public final boolean mo96380a() {
return false;
}
/* renamed from: a */
public final boolean mo96384a(ScaleGestureDetector scaleGestureDetector) {
return true;
}
/* renamed from: a */
public final boolean mo96385a(C39949c cVar) {
return true;
}
/* renamed from: b */
public final boolean mo96386b() {
return false;
}
/* renamed from: b */
public final boolean mo96387b(float f) {
this.f99997a.mo56103d(-f, 6.0f);
return true;
}
/* renamed from: b */
public final boolean mo96388b(MotionEvent motionEvent) {
m122954a(motionEvent.getX(), motionEvent.getY());
PointF b = m122955b(this.f100011o.x, this.f100011o.y);
if (this.f99997a != null) {
this.f99997a.mo56110e(b.x, b.y);
}
return true;
}
/* renamed from: c */
public final boolean mo96391c(float f) {
this.f99997a.mo56103d(-f, 6.0f);
C6907h.onEvent(MobClick.obtain().setEventName("ar_prop_spin").setLabelName("shoot_page").setExtValueLong(this.f99998b.getStickerId()));
return true;
}
/* renamed from: d */
public final boolean mo96393d(MotionEvent motionEvent) {
m122954a(motionEvent.getX(), motionEvent.getY());
this.f99997a.mo56047a(2, this.f100011o.x / ((float) this.f99999c), this.f100011o.y / ((float) this.f100000d), 0);
this.f100005i = false;
return false;
}
/* renamed from: a */
public final boolean mo96381a(float f) {
C6907h.onEvent(MobClick.obtain().setEventName("ar_prop_scale").setLabelName("shoot_page").setExtValueLong(this.f99998b.getStickerId()));
this.f100002f = 1.0f;
this.f100003g = 1.0f;
return true;
}
/* renamed from: c */
public final boolean mo96392c(MotionEvent motionEvent) {
m122954a(motionEvent.getX(), motionEvent.getY());
this.f99997a.mo56047a(0, this.f100011o.x / ((float) this.f99999c), this.f100011o.y / ((float) this.f100000d), 0);
this.f100005i = true;
return false;
}
/* renamed from: a */
public final boolean mo96382a(MotionEvent motionEvent) {
m122954a(motionEvent.getX(), motionEvent.getY());
PointF b = m122955b(this.f100011o.x, this.f100011o.y);
this.f99997a.mo56044a(b.x, b.y);
C6907h.onEvent(MobClick.obtain().setEventName("ar_prop_click").setLabelName("shoot_page").setExtValueLong(this.f99998b.getStickerId()));
return true;
}
/* renamed from: b */
public final boolean mo96390b(ScaleGestureDetector scaleGestureDetector) {
this.f100003g *= scaleGestureDetector.getScaleFactor();
this.f99997a.mo56094c(this.f100003g / this.f100002f, 3.0f);
this.f100002f = this.f100003g;
return true;
}
/* renamed from: a */
public final C38465a mo96379a(int i, int i2) {
if (i == 0 || i2 == 0) {
return this;
}
this.f100009m = i;
this.f100010n = i2;
return this;
}
/* renamed from: b */
private PointF m122955b(float f, float f2) {
int i = (this.f100009m - this.f99999c) / 2;
PointF pointF = new PointF();
pointF.x = (f + ((float) i)) / ((float) this.f100009m);
pointF.y = f2 / ((float) this.f100010n);
return pointF;
}
/* renamed from: a */
private void m122954a(float f, float f2) {
int i;
int i2;
if (!C39805en.m127445a() || C39804em.f103458b == 0) {
i = this.f100001e;
} else {
i = C39804em.f103458b;
}
this.f100000d = i;
if (!C39805en.m127445a() || !C39804em.m127436a()) {
i2 = 0;
} else {
i2 = C39804em.f103459c;
}
this.f100011o.set(f, f2);
this.f100011o.offset(0.0f, (float) (-i2));
}
public C38465a(FaceStickerBean faceStickerBean, C20749b bVar) {
this.f99998b = faceStickerBean;
this.f99997a = bVar;
this.f99999c = C23482j.m77099c();
this.f100001e = C23482j.m77097b();
this.f100007k = C35563c.f93254q.getVideoWidth();
this.f100008l = C35563c.f93254q.getVideoHeight();
this.f100009m = this.f100007k;
this.f100010n = this.f100008l;
}
/* renamed from: b */
public final boolean mo96389b(MotionEvent motionEvent, MotionEvent motionEvent2, float f, float f2) {
C6907h.onEvent(MobClick.obtain().setEventName("ar_prop_control_alert").setLabelName("shoot_page"));
return true;
}
/* renamed from: a */
public final boolean mo96383a(MotionEvent motionEvent, MotionEvent motionEvent2, float f, float f2) {
if (this.f100005i) {
this.f100006j.x = motionEvent.getX();
this.f100006j.y = motionEvent.getY();
this.f100005i = false;
}
float x = motionEvent2.getX() - this.f100006j.x;
float y = motionEvent2.getY() - this.f100006j.y;
m122954a(motionEvent2.getX(), motionEvent2.getY());
this.f99997a.mo56045a(this.f100011o.x / ((float) this.f99999c), this.f100011o.y / ((float) this.f100000d), x / ((float) this.f99999c), y / ((float) this.f100000d), 1.0f);
this.f100006j.x = motionEvent2.getX();
this.f100006j.y = motionEvent2.getY();
if (!(motionEvent == null || motionEvent.getX() == this.f100004h)) {
this.f100004h = motionEvent.getX();
C6907h.onEvent(MobClick.obtain().setEventName("ar_prop_drag").setLabelName("shoot_page").setExtValueLong(this.f99998b.getStickerId()));
}
return true;
}
}
| [
"65450641+Xyzdesk@users.noreply.github.com"
] | 65450641+Xyzdesk@users.noreply.github.com |
09eac6265072e603c0f9d2e679d41b1904717365 | ff0c33ccd3bbb8a080041fbdbb79e29989691747 | /jdk.localedata/sun/text/resources/cldr/ext/FormatData_es_AR.java | 36a480528a1fb258b30a04661041bfe29a02d399 | [] | no_license | jiecai58/jdk15 | 7d0f2e518e3f6669eb9ebb804f3c89bbfb2b51f0 | b04691a72e51947df1b25c31175071f011cb9bbe | refs/heads/main | 2023-02-25T00:30:30.407901 | 2021-01-29T04:48:33 | 2021-01-29T04:48:33 | 330,704,930 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 6,313 | java | /*
* Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* COPYRIGHT AND PERMISSION NOTICE
*
* Copyright (C) 1991-2016 Unicode, Inc. All rights reserved.
* Distributed under the Terms of Use in
* http://www.unicode.org/copyright.html.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of the Unicode data files and any associated documentation
* (the "Data Files") or Unicode software and any associated documentation
* (the "Software") to deal in the Data Files or Software
* without restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, and/or sell copies of
* the Data Files or Software, and to permit persons to whom the Data Files
* or Software are furnished to do so, provided that
* (a) this copyright and permission notice appear with all copies
* of the Data Files or Software,
* (b) this copyright and permission notice appear in associated
* documentation, and
* (c) there is clear notice in each modified Data File or in the Software
* as well as in the documentation associated with the Data File(s) or
* Software that the data or software has been modified.
*
* THE DATA FILES AND SOFTWARE ARE 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 OF THIRD PARTY RIGHTS.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
* NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
* DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THE DATA FILES OR SOFTWARE.
*
* Except as contained in this notice, the name of a copyright holder
* shall not be used in advertising or otherwise to promote the sale,
* use or other dealings in these Data Files or Software without prior
* written authorization of the copyright holder.
*/
package sun.text.resources.cldr.ext;
import java.util.ListResourceBundle;
public class FormatData_es_AR extends ListResourceBundle {
@Override
protected final Object[][] getContents() {
final String[] metaValue_DayNarrows = new String[] {
"D",
"L",
"M",
"M",
"J",
"V",
"S",
};
final String[] metaValue_QuarterNames = new String[] {
"1.er trimestre",
"2.\u00ba trimestre",
"3.er trimestre",
"4.\u00ba trimestre",
};
final String[] metaValue_AmPmMarkers = new String[] {
"a.\u00a0m.",
"p.\u00a0m.",
};
final Object[][] data = new Object[][] {
{ "japanese.AmPmMarkers", metaValue_AmPmMarkers },
{ "islamic.AmPmMarkers", metaValue_AmPmMarkers },
{ "AmPmMarkers", metaValue_AmPmMarkers },
{ "roc.QuarterNames", metaValue_QuarterNames },
{ "islamic.DayNarrows", metaValue_DayNarrows },
{ "abbreviated.AmPmMarkers", metaValue_AmPmMarkers },
{ "DayNarrows", metaValue_DayNarrows },
{ "japanese.abbreviated.AmPmMarkers", metaValue_AmPmMarkers },
{ "buddhist.QuarterNames", metaValue_QuarterNames },
{ "buddhist.abbreviated.AmPmMarkers", metaValue_AmPmMarkers },
{ "roc.DayNarrows", metaValue_DayNarrows },
{ "islamic.QuarterNames", metaValue_QuarterNames },
{ "roc.AmPmMarkers", metaValue_AmPmMarkers },
{ "islamic.abbreviated.AmPmMarkers", metaValue_AmPmMarkers },
{ "latn.NumberElements",
new String[] {
",",
".",
";",
"%",
"0",
"#",
"-",
"E",
"\u2030",
"\u221e",
"NaN",
"",
"",
}
},
{ "buddhist.AmPmMarkers", metaValue_AmPmMarkers },
{ "latn.NumberPatterns",
new String[] {
"#,##0.###",
"\u00a4\u00a0#,##0.00",
"#,##0\u00a0%",
"\u00a4\u00a0#,##0.00;(\u00a4\u00a0#,##0.00)",
}
},
{ "buddhist.DayNarrows", metaValue_DayNarrows },
{ "japanese.DayNarrows", metaValue_DayNarrows },
{ "QuarterNames", metaValue_QuarterNames },
{ "field.dayperiod", "a.\u00a0m./p.\u00a0m." },
{ "QuarterAbbreviations", metaValue_QuarterNames },
{ "standalone.QuarterNames", metaValue_QuarterNames },
{ "japanese.QuarterNames", metaValue_QuarterNames },
{ "roc.abbreviated.AmPmMarkers", metaValue_AmPmMarkers },
};
return data;
}
}
| [
"caijie2@tuhu.cn"
] | caijie2@tuhu.cn |
27c8c7a24a8bc8f38fa12d6b4e6c54fd5350fd7c | 3ef55e152decb43bdd90e3de821ffea1a2ec8f75 | /large/module1319_public/tests/unittests/src/java/module1319_public_tests_unittests/a/Foo3.java | d35d371513592e65e8d295d277d6fc6c51e6d247 | [
"BSD-3-Clause"
] | permissive | salesforce/bazel-ls-demo-project | 5cc6ef749d65d6626080f3a94239b6a509ef145a | 948ed278f87338edd7e40af68b8690ae4f73ebf0 | refs/heads/master | 2023-06-24T08:06:06.084651 | 2023-03-14T11:54:29 | 2023-03-14T11:54:29 | 241,489,944 | 0 | 5 | BSD-3-Clause | 2023-03-27T11:28:14 | 2020-02-18T23:30:47 | Java | UTF-8 | Java | false | false | 1,641 | java | package module1319_public_tests_unittests.a;
import java.beans.beancontext.*;
import java.io.*;
import java.rmi.*;
/**
* Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut
* labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
* Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
*
* @see java.io.File
* @see java.rmi.Remote
* @see java.nio.file.FileStore
*/
@SuppressWarnings("all")
public abstract class Foo3<R> extends module1319_public_tests_unittests.a.Foo2<R> implements module1319_public_tests_unittests.a.IFoo3<R> {
java.sql.Array f0 = null;
java.util.logging.Filter f1 = null;
java.util.zip.Deflater f2 = null;
public R element;
public static Foo3 instance;
public static Foo3 getInstance() {
return instance;
}
public static <T> T create(java.util.List<T> input) {
return module1319_public_tests_unittests.a.Foo2.create(input);
}
public String getName() {
return module1319_public_tests_unittests.a.Foo2.getInstance().getName();
}
public void setName(String string) {
module1319_public_tests_unittests.a.Foo2.getInstance().setName(getName());
return;
}
public R get() {
return (R)module1319_public_tests_unittests.a.Foo2.getInstance().get();
}
public void set(Object element) {
this.element = (R)element;
module1319_public_tests_unittests.a.Foo2.getInstance().set(this.element);
}
public R call() throws Exception {
return (R)module1319_public_tests_unittests.a.Foo2.getInstance().call();
}
}
| [
"gwagenknecht@salesforce.com"
] | gwagenknecht@salesforce.com |
dee829296802428d00e7d0675cacad7f68ce5c82 | fec4c1754adce762b5c4b1cba85ad057e0e4744a | /jf-base/src/main/java/com/jf/dao/PropertyRightProsecutionLogMapper.java | 9b1c3373465a73a08b7dbe7adda194d1d3719a1a | [] | no_license | sengeiou/workspace_xg | 140b923bd301ff72ca4ae41bc83820123b2a822e | 540a44d550bb33da9980d491d5c3fd0a26e3107d | refs/heads/master | 2022-11-30T05:28:35.447286 | 2020-08-19T02:30:25 | 2020-08-19T02:30:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,319 | java | package com.jf.dao;
import com.jf.common.base.BaseDao;
import com.jf.entity.PropertyRightProsecutionLog;
import com.jf.entity.PropertyRightProsecutionLogExample;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface PropertyRightProsecutionLogMapper extends BaseDao<PropertyRightProsecutionLog, PropertyRightProsecutionLogExample> {
int countByExample(PropertyRightProsecutionLogExample example);
int deleteByExample(PropertyRightProsecutionLogExample example);
int deleteByPrimaryKey(Integer id);
int insert(PropertyRightProsecutionLog record);
int insertSelective(PropertyRightProsecutionLog record);
List<PropertyRightProsecutionLog> selectByExample(PropertyRightProsecutionLogExample example);
PropertyRightProsecutionLog selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") PropertyRightProsecutionLog record, @Param("example") PropertyRightProsecutionLogExample example);
int updateByExample(@Param("record") PropertyRightProsecutionLog record, @Param("example") PropertyRightProsecutionLogExample example);
int updateByPrimaryKeySelective(PropertyRightProsecutionLog record);
int updateByPrimaryKey(PropertyRightProsecutionLog record);
}
| [
"397716215@qq.com"
] | 397716215@qq.com |
6717c5ec9b369406997c9f362a06c26293c5863c | 32b72e1dc8b6ee1be2e80bb70a03a021c83db550 | /ast_results/schildbach_bitcoin-wallet/wallet/src/de/schildbach/wallet/data/WalletBalanceLiveData.java | b19143aa6dc70ce1c8befe34181a54a35569dcbe | [] | no_license | cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning | d90c41a17e88fcd99d543124eeb6e93f9133cb4a | 0564143d92f8024ff5fa6b659c2baebf827582b1 | refs/heads/master | 2020-07-13T13:53:40.297493 | 2019-01-11T11:51:18 | 2019-01-11T11:51:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,703 | java | // isComment
package de.schildbach.wallet.data;
import org.bitcoinj.core.Coin;
import org.bitcoinj.core.Transaction;
import org.bitcoinj.utils.Threading;
import org.bitcoinj.wallet.Wallet;
import org.bitcoinj.wallet.Wallet.BalanceType;
import org.bitcoinj.wallet.listeners.WalletChangeEventListener;
import org.bitcoinj.wallet.listeners.WalletCoinsReceivedEventListener;
import org.bitcoinj.wallet.listeners.WalletCoinsSentEventListener;
import org.bitcoinj.wallet.listeners.WalletReorganizeEventListener;
import de.schildbach.wallet.Configuration;
import de.schildbach.wallet.Constants;
import de.schildbach.wallet.WalletApplication;
import android.content.SharedPreferences;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.os.AsyncTask;
/**
* isComment
*/
public final class isClassOrIsInterface extends AbstractWalletLiveData<Coin> implements OnSharedPreferenceChangeListener {
private final BalanceType isVariable;
private final Configuration isVariable;
public isConstructor(final WalletApplication isParameter, final BalanceType isParameter) {
super(isNameExpr);
this.isFieldAccessExpr = isNameExpr;
this.isFieldAccessExpr = isNameExpr.isMethod();
}
public isConstructor(final WalletApplication isParameter) {
this(isNameExpr, isNameExpr.isFieldAccessExpr);
}
@Override
protected void isMethod(final Wallet isParameter) {
isMethod(isNameExpr);
isNameExpr.isMethod(this);
isMethod();
}
@Override
protected void isMethod(final Wallet isParameter) {
isNameExpr.isMethod(this);
isMethod(isNameExpr);
}
private void isMethod(final Wallet isParameter) {
isNameExpr.isMethod(isNameExpr.isFieldAccessExpr, isNameExpr);
isNameExpr.isMethod(isNameExpr.isFieldAccessExpr, isNameExpr);
isNameExpr.isMethod(isNameExpr.isFieldAccessExpr, isNameExpr);
isNameExpr.isMethod(isNameExpr.isFieldAccessExpr, isNameExpr);
}
private void isMethod(final Wallet isParameter) {
isNameExpr.isMethod(isNameExpr);
isNameExpr.isMethod(isNameExpr);
isNameExpr.isMethod(isNameExpr);
isNameExpr.isMethod(isNameExpr);
}
@Override
protected void isMethod() {
final Wallet isVariable = isMethod();
isNameExpr.isMethod(new Runnable() {
@Override
public void isMethod() {
isNameExpr.isFieldAccessExpr.isFieldAccessExpr.isFieldAccessExpr.isMethod(isNameExpr.isFieldAccessExpr);
isMethod(isNameExpr.isMethod(isNameExpr));
}
});
}
private final WalletListener isVariable = new WalletListener();
private class isClassOrIsInterface implements WalletCoinsReceivedEventListener, WalletCoinsSentEventListener, WalletReorganizeEventListener, WalletChangeEventListener {
@Override
public void isMethod(final Wallet isParameter, final Transaction isParameter, final Coin isParameter, final Coin isParameter) {
isMethod();
}
@Override
public void isMethod(final Wallet isParameter, final Transaction isParameter, final Coin isParameter, final Coin isParameter) {
isMethod();
}
@Override
public void isMethod(final Wallet isParameter) {
isMethod();
}
@Override
public void isMethod(final Wallet isParameter) {
isMethod();
}
}
@Override
public void isMethod(final SharedPreferences isParameter, final String isParameter) {
if (isNameExpr.isFieldAccessExpr.isMethod(isNameExpr))
isMethod();
}
}
| [
"matheus@melsolucoes.net"
] | matheus@melsolucoes.net |
ef044e9cbde0d138eab3134d1fbff580f9064330 | 1e9819332147bf0d8987a5d884c2dd815e30aaaf | /core/model/src/main/java/sh/isaac/model/statement/CircumstanceImpl.java | 2b2e768d8206be5f3e070bf69325996ddd0dc27f | [
"Apache-2.0"
] | permissive | Sagebits/ISAAC | 5d4d1bade39c06cd6d4ed0993f7bce47ee57be64 | af62273159241162eee61134f21cc82219b8fc69 | refs/heads/develop-fx11 | 2022-12-03T18:13:36.324085 | 2020-05-17T22:04:08 | 2020-05-17T22:04:08 | 195,490,068 | 0 | 1 | Apache-2.0 | 2022-11-16T08:52:54 | 2019-07-06T02:49:49 | Java | UTF-8 | Java | false | false | 2,355 | java | /*
* Copyright 2018 Organizations participating in ISAAC, ISAAC's KOMET, and SOLOR development include the
US Veterans Health Administration, OSHERA, and the Health Services Platform Consortium..
*
* 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 sh.isaac.model.statement;
import javafx.beans.property.SimpleListProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.collections.ObservableList;
import sh.isaac.api.component.concept.ConceptChronology;
import sh.isaac.api.coordinate.ManifoldCoordinate;
import sh.isaac.api.statement.Circumstance;
import sh.isaac.api.statement.Measure;
import sh.isaac.model.observable.ObservableFields;
/**
*
* @author kec
*/
public class CircumstanceImpl implements Circumstance {
private final SimpleListProperty<ConceptChronology> purposeList =
new SimpleListProperty(this, ObservableFields.CIRCUMSTANCE_PURPOSE_LIST.toExternalString());
private final SimpleObjectProperty<MeasureImpl> timing =
new SimpleObjectProperty<>(this, ObservableFields.CIRCUMSTANCE_TIMING.toExternalString());
public CircumstanceImpl(ManifoldCoordinate manifold) {
timing.setValue(new MeasureImpl(manifold));
}
@Override
public ObservableList<ConceptChronology> getPurposeList() {
return purposeList.get();
}
public SimpleListProperty<ConceptChronology> purposeListProperty() {
return purposeList;
}
public void setPurposeList(ObservableList<ConceptChronology> purposeList) {
this.purposeList.set(purposeList);
}
@Override
public Measure getTiming() {
return timing.get();
}
public SimpleObjectProperty<MeasureImpl> timingProperty() {
return timing;
}
public void setTiming(MeasureImpl timing) {
this.timing.set(timing);
}
}
| [
"campbell@informatics.com"
] | campbell@informatics.com |
0380e03d770e5316669507542a725a2605b20039 | 95e944448000c08dd3d6915abb468767c9f29d3c | /sources/com/p280ss/android/deviceregister/p855c/C19321d.java | ae3be5bdde6b3defceb35af581140bbfb754fc15 | [] | no_license | xrealm/tiktok-src | 261b1faaf7b39d64bb7cb4106dc1a35963bd6868 | 90f305b5f981d39cfb313d75ab231326c9fca597 | refs/heads/master | 2022-11-12T06:43:07.401661 | 2020-07-04T20:21:12 | 2020-07-04T20:21:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,085 | java | package com.p280ss.android.deviceregister.p855c;
import android.os.Build;
import android.os.Build.VERSION;
import com.bytedance.common.utility.C6319n;
import com.p280ss.android.common.util.C6776h;
/* renamed from: com.ss.android.deviceregister.c.d */
public final class C19321d {
/* renamed from: a */
private static final CharSequence f52227a = "sony";
/* renamed from: b */
private static final CharSequence f52228b = "amigo";
/* renamed from: c */
private static final CharSequence f52229c = "funtouch";
/* renamed from: i */
private static boolean m63380i() {
if (!C6319n.m19593a(C19322e.m63386a("ro.letv.release.version"))) {
return true;
}
return false;
}
/* renamed from: b */
private static String m63373b() {
StringBuilder sb = new StringBuilder();
sb.append(C19322e.m63386a("ro.build.uiversion"));
sb.append("_");
sb.append(Build.DISPLAY);
return sb.toString();
}
/* renamed from: e */
private static boolean m63376e() {
String a = C19322e.m63386a("ro.vivo.os.build.display.id");
if (C6319n.m19593a(a) || !a.toLowerCase().contains(f52229c)) {
return false;
}
return true;
}
/* renamed from: f */
private static boolean m63377f() {
if (C6319n.m19593a(Build.DISPLAY) || !Build.DISPLAY.toLowerCase().contains(f52228b)) {
return false;
}
return true;
}
/* renamed from: g */
private static String m63378g() {
StringBuilder sb = new StringBuilder();
sb.append(Build.DISPLAY);
sb.append("_");
sb.append(C19322e.m63386a("ro.gn.sv.version"));
return sb.toString();
}
/* renamed from: l */
private static String m63383l() {
String str = Build.DISPLAY;
if (str == null || !str.toLowerCase().contains("flyme")) {
return "";
}
return str;
}
/* renamed from: m */
private static boolean m63384m() {
String str = Build.MANUFACTURER;
if (!C6319n.m19593a(str)) {
return str.toLowerCase().contains("oppo");
}
return false;
}
/* renamed from: c */
private static boolean m63374c() {
StringBuilder sb = new StringBuilder();
sb.append(Build.MANUFACTURER);
sb.append(Build.BRAND);
String sb2 = sb.toString();
if (C6319n.m19593a(sb2)) {
return false;
}
String lowerCase = sb2.toLowerCase();
if (lowerCase.contains("360") || lowerCase.contains("qiku")) {
return true;
}
return false;
}
/* renamed from: d */
private static String m63375d() {
StringBuilder sb = new StringBuilder();
sb.append(C19322e.m63386a("ro.vivo.os.build.display.id"));
sb.append("_");
sb.append(C19322e.m63386a("ro.vivo.product.version"));
return sb.toString();
}
/* renamed from: h */
private static String m63379h() {
if (!m63380i()) {
return "";
}
StringBuilder sb = new StringBuilder("eui_");
sb.append(C19322e.m63386a("ro.letv.release.version"));
sb.append("_");
sb.append(Build.DISPLAY);
return sb.toString();
}
/* renamed from: j */
private static String m63381j() {
if (!C6776h.m20950c()) {
return "";
}
StringBuilder sb = new StringBuilder("miui_");
sb.append(C19322e.m63386a("ro.miui.ui.version.name"));
sb.append("_");
sb.append(VERSION.INCREMENTAL);
return sb.toString();
}
/* renamed from: k */
private static String m63382k() {
String b = C6776h.m20946b();
if (b == null || !b.toLowerCase().contains("emotionui")) {
return "";
}
StringBuilder sb = new StringBuilder();
sb.append(b);
sb.append("_");
sb.append(Build.DISPLAY);
return sb.toString();
}
/* renamed from: n */
private static String m63385n() {
if (!m63384m()) {
return "";
}
StringBuilder sb = new StringBuilder("coloros_");
sb.append(C19322e.m63386a("ro.build.version.opporom"));
sb.append("_");
sb.append(Build.DISPLAY);
return sb.toString();
}
/* renamed from: a */
public static String m63372a() {
if (C6776h.m20950c()) {
return m63381j();
}
if (C6776h.m20953d()) {
return m63383l();
}
if (m63384m()) {
return m63385n();
}
String k = m63382k();
if (!C6319n.m19593a(k)) {
return k;
}
if (m63376e()) {
return m63375d();
}
if (m63377f()) {
return m63378g();
}
if (m63374c()) {
return m63373b();
}
String h = m63379h();
if (!C6319n.m19593a(h)) {
return h;
}
return Build.DISPLAY;
}
}
| [
"65450641+Xyzdesk@users.noreply.github.com"
] | 65450641+Xyzdesk@users.noreply.github.com |
ac83dc9c22df7b60b82f58e2b038990bd6a4b634 | 04e648896a9c96867a11a84a1ad2f3c60409f159 | /src/test/java/StepFiles.java | a0c73a6bc3b44bc83ff99f0000929e2e6ab4f557 | [] | no_license | abhisheaksoni/DBSEnggPractices | 52ee9ac614246299486dda11e13b2a37f9b223f7 | e4591ee15426c976333d037f6efeaa37cb0bf699 | refs/heads/master | 2020-07-01T22:14:45.250086 | 2016-11-21T06:39:07 | 2016-11-21T06:39:07 | 74,333,928 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,366 | java | package test.java;
import cucumber.api.PendingException;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;
public class StepFiles {
@Given("^Numbers are (\\d+) and (\\d+) and operation is +$")
public void Numbers_are_and_and_operation_is_add(int arg1, int arg2) throws Throwable {
// Express the Regexp above with the code you wish you had
throw new PendingException();
}
@When("^I hit calculate$")
public void I_hit_calculate() throws Throwable {
// Express the Regexp above with the code you wish you had
throw new PendingException();
}
@Then("^the total sum should be (\\d+)$")
public void the_total_sum_should_be(int arg1) throws Throwable {
// Express the Regexp above with the code you wish you had
throw new PendingException();
}
@Given("^Numbers are (\\d+) and (\\d+) and operation is -$")
public void Numbers_are_and_and_operation_is_sub(int arg1, int arg2) throws Throwable {
// Express the Regexp above with the code you wish you had
throw new PendingException();
}
@Given("^Numbers are (\\d+) and (\\d+) and operation is \\*$")
public void Numbers_are_and_and_operation_is_mul(int arg1, int arg2) throws Throwable {
// Express the Regexp above with the code you wish you had
throw new PendingException();
}
}
| [
"admin@admin-PC"
] | admin@admin-PC |
9310d101a784513adc88bca35b161cce30313d38 | 280da3630f692c94472f2c42abd1051fb73d1344 | /src/net/minecraft/network/play/server/S34PacketMaps.java | c0176d1d25a14a1135baa0f2ef02daa567b1b9c4 | [] | no_license | MicrowaveClient/Clarinet | 7c35206c671eb28bc139ee52e503f405a14ccb5b | bd387bc30329e0febb6c1c1b06a836d9013093b5 | refs/heads/master | 2020-04-02T18:47:52.047731 | 2016-07-14T03:21:46 | 2016-07-14T03:21:46 | 63,297,767 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,413 | java | package net.minecraft.network.play.server;
import net.minecraft.network.INetHandler;
import net.minecraft.network.Packet;
import net.minecraft.network.PacketBuffer;
import net.minecraft.network.play.INetHandlerPlayClient;
import net.minecraft.util.Vec4b;
import net.minecraft.world.storage.MapData;
import java.io.IOException;
import java.util.Collection;
public class S34PacketMaps implements Packet {
private int mapId;
private byte mapScale;
private Vec4b[] mapVisiblePlayersVec4b;
private int mapMinX;
private int mapMinY;
private int mapMaxX;
private int mapMaxY;
private byte[] mapDataBytes;
public S34PacketMaps() {
}
public S34PacketMaps(int mapIdIn, byte scale, Collection visiblePlayers, byte[] colors, int minX, int minY, int maxX, int maxY) {
this.mapId = mapIdIn;
this.mapScale = scale;
this.mapVisiblePlayersVec4b = (Vec4b[]) visiblePlayers.toArray(new Vec4b[visiblePlayers.size()]);
this.mapMinX = minX;
this.mapMinY = minY;
this.mapMaxX = maxX;
this.mapMaxY = maxY;
this.mapDataBytes = new byte[maxX * maxY];
for (int var9 = 0; var9 < maxX; ++var9) {
for (int var10 = 0; var10 < maxY; ++var10) {
this.mapDataBytes[var9 + var10 * maxX] = colors[minX + var9 + (minY + var10) * 128];
}
}
}
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer buf) throws IOException {
this.mapId = buf.readVarIntFromBuffer();
this.mapScale = buf.readByte();
this.mapVisiblePlayersVec4b = new Vec4b[buf.readVarIntFromBuffer()];
for (int var2 = 0; var2 < this.mapVisiblePlayersVec4b.length; ++var2) {
short var3 = (short) buf.readByte();
this.mapVisiblePlayersVec4b[var2] = new Vec4b((byte) (var3 >> 4 & 15), buf.readByte(), buf.readByte(), (byte) (var3 & 15));
}
this.mapMaxX = buf.readUnsignedByte();
if (this.mapMaxX > 0) {
this.mapMaxY = buf.readUnsignedByte();
this.mapMinX = buf.readUnsignedByte();
this.mapMinY = buf.readUnsignedByte();
this.mapDataBytes = buf.readByteArray();
}
}
/**
* Writes the raw packet data to the data stream.
*/
public void writePacketData(PacketBuffer buf) throws IOException {
buf.writeVarIntToBuffer(this.mapId);
buf.writeByte(this.mapScale);
buf.writeVarIntToBuffer(this.mapVisiblePlayersVec4b.length);
Vec4b[] var2 = this.mapVisiblePlayersVec4b;
int var3 = var2.length;
for (int var4 = 0; var4 < var3; ++var4) {
Vec4b var5 = var2[var4];
buf.writeByte((var5.func_176110_a() & 15) << 4 | var5.func_176111_d() & 15);
buf.writeByte(var5.func_176112_b());
buf.writeByte(var5.func_176113_c());
}
buf.writeByte(this.mapMaxX);
if (this.mapMaxX > 0) {
buf.writeByte(this.mapMaxY);
buf.writeByte(this.mapMinX);
buf.writeByte(this.mapMinY);
buf.writeByteArray(this.mapDataBytes);
}
}
public void handleClient(INetHandlerPlayClient handler) {
handler.handleMaps(this);
}
public int getMapId() {
return this.mapId;
}
/**
* Sets new MapData from the packet to given MapData param
*/
public void setMapdataTo(MapData mapdataIn) {
mapdataIn.scale = this.mapScale;
mapdataIn.playersVisibleOnMap.clear();
int var2;
for (var2 = 0; var2 < this.mapVisiblePlayersVec4b.length; ++var2) {
Vec4b var3 = this.mapVisiblePlayersVec4b[var2];
mapdataIn.playersVisibleOnMap.put("icon-" + var2, var3);
}
for (var2 = 0; var2 < this.mapMaxX; ++var2) {
for (int var4 = 0; var4 < this.mapMaxY; ++var4) {
mapdataIn.colors[this.mapMinX + var2 + (this.mapMinY + var4) * 128] = this.mapDataBytes[var2 + var4 * this.mapMaxX];
}
}
}
/**
* Passes this Packet on to the NetHandler for processing.
*/
public void processPacket(INetHandler handler) {
this.handleClient((INetHandlerPlayClient) handler);
}
}
| [
"justanormalpcnoghostclientoranyt@justanormalpcnoghostclientoranyt-Aspire-XC-704"
] | justanormalpcnoghostclientoranyt@justanormalpcnoghostclientoranyt-Aspire-XC-704 |
57d9f030d3d5e3ac46e2ea2d5c73dfae8f7a2b67 | 63c449138a661dfdf579b6f2f1c35cc517e04b21 | /app/src/main/java/com/yiyue/store/module/certification/CertificationPresenter.java | 2a4c802e1a8805407cee211114ec5eff63bc0534 | [] | no_license | wuqiuyun/yy_merchant | dd3d915e1fc1e6ac89d77f0081d804cb8a839a11 | 778412b3faef9e69c2314f4931e581fb79eabec3 | refs/heads/master | 2020-04-15T01:28:42.483837 | 2019-01-06T05:24:24 | 2019-01-06T05:24:24 | 164,277,872 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,941 | java | package com.yiyue.store.module.certification;
import android.content.Context;
import com.yiyue.store.api.FileApi;
import com.yiyue.store.api.StoreAuthApplyApi;
import com.yiyue.store.base.data.BaseResponse;
import com.yiyue.store.base.mvp.BasePresenter;
import com.yiyue.store.component.net.YLRxSubscriberHelper;
import com.yiyue.store.component.toast.ToastUtils;
import com.yiyue.store.model.vo.requestbody.StoreAuthApplyRequestBody;
import com.yiyue.store.model.vo.result.UploadImageResult;
import com.yl.core.component.net.exception.ApiException;
import java.util.List;
/**
* Created by lvlong on 2018/9/20.
*/
public class CertificationPresenter extends BasePresenter<ICertificationView> {
/**
* 提交认证信息
* @param requestBody 认证信息
*/
public void submitCertiData(Context context, StoreAuthApplyRequestBody requestBody) {
if (!requestBody.checkParams()) {
return;
}
new StoreAuthApplyApi().save(requestBody, new YLRxSubscriberHelper<BaseResponse>(context, true) {
@Override
public void _onNext(BaseResponse baseResponse) {
getMvpView().onSubmitCertiDataSuccess();
}
});
}
/**
* 上传文件
* @param filePaths 文件地址
*/
public void uploadImage(Context context, List<String> filePaths) {
if (filePaths == null || filePaths.isEmpty()) {
ToastUtils.shortToast("文件不存在");
return;
}
new FileApi().uploadFile(filePaths, new YLRxSubscriberHelper<UploadImageResult>(context, true) {
@Override
public void _onNext(UploadImageResult baseResponse) {
getMvpView().onUploadFileSuccess(baseResponse.getData());
}
@Override
public void _onError(ApiException error) {
super._onError(error);
}
});
}
}
| [
"wuqiuyun_9629@163.com"
] | wuqiuyun_9629@163.com |
da6806e7aefc482f454b5ee0849bcfb39c7450a9 | 647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4 | /com.tencent.mm/classes.jar/com/tencent/mm/plugin/wallet/pwd/b.java | 381d5597922de54728ccbaa2b5912cbd8358df91 | [] | 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 | 7,528 | java | package com.tencent.mm.plugin.wallet.pwd;
import android.app.Activity;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.os.Bundle;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.wallet.pwd.ui.WalletResetPwdAdapterUI;
import com.tencent.mm.plugin.wallet_core.c.x;
import com.tencent.mm.plugin.wallet_core.model.w;
import com.tencent.mm.plugin.wallet_core.ui.WalletCheckPwdUI;
import com.tencent.mm.plugin.wallet_core.ui.WalletPwdConfirmUI;
import com.tencent.mm.plugin.wallet_core.ui.WalletSetPasswordUI;
import com.tencent.mm.plugin.wxpay.a.i;
import com.tencent.mm.sdk.platformtools.Log;
import com.tencent.mm.ui.MMActivity;
import com.tencent.mm.ui.base.k;
import com.tencent.mm.wallet_core.c.g;
import com.tencent.mm.wallet_core.c.i;
import com.tencent.mm.wallet_core.e;
import com.tencent.mm.wallet_core.ui.WalletBaseUI;
public class b
extends e
{
public final int a(MMActivity paramMMActivity, int paramInt)
{
return a.i.wallet_set_password_finish_confirm;
}
public final g a(MMActivity paramMMActivity, i parami)
{
AppMethodBeat.i(69520);
if ((paramMMActivity instanceof WalletCheckPwdUI))
{
paramMMActivity = new g(paramMMActivity, parami)
{
public final CharSequence getTips(int paramAnonymousInt)
{
AppMethodBeat.i(69511);
switch (paramAnonymousInt)
{
default:
localObject = super.getTips(paramAnonymousInt);
AppMethodBeat.o(69511);
return localObject;
case 0:
localObject = this.activity.getString(a.i.wallet_check_pwd_modify_pwd_tip);
AppMethodBeat.o(69511);
return localObject;
}
Object localObject = this.activity.getString(a.i.wallet_password_setting_ui_modify);
AppMethodBeat.o(69511);
return localObject;
}
public final boolean onSceneEnd(int paramAnonymousInt1, int paramAnonymousInt2, String paramAnonymousString, com.tencent.mm.am.p paramAnonymousp)
{
return false;
}
public final boolean t(Object... paramAnonymousVarArgs)
{
AppMethodBeat.i(69510);
String str = (String)paramAnonymousVarArgs[0];
paramAnonymousVarArgs = (String)paramAnonymousVarArgs[1];
this.agTR.a(new x(str, 3, paramAnonymousVarArgs), true, 1);
AppMethodBeat.o(69510);
return true;
}
};
AppMethodBeat.o(69520);
return paramMMActivity;
}
if ((paramMMActivity instanceof WalletPwdConfirmUI))
{
paramMMActivity = new g(paramMMActivity, parami)
{
public final boolean onSceneEnd(int paramAnonymousInt1, int paramAnonymousInt2, String paramAnonymousString, com.tencent.mm.am.p paramAnonymousp)
{
AppMethodBeat.i(69513);
if ((paramAnonymousInt1 == 0) && (paramAnonymousInt2 == 0))
{
if ((paramAnonymousp instanceof com.tencent.mm.plugin.wallet.pwd.a.p))
{
b.a(b.this).putInt("RESET_PWD_USER_ACTION", 1);
b.this.a(this.activity, 0, b.b(b.this));
k.cZ(this.activity, this.activity.getString(a.i.wallet_password_setting_success_tip));
}
AppMethodBeat.o(69513);
return true;
}
if ((paramAnonymousp instanceof com.tencent.mm.plugin.wallet.pwd.a.p))
{
k.a(this.activity, paramAnonymousString, "", false, new DialogInterface.OnClickListener()
{
public final void onClick(DialogInterface paramAnonymous2DialogInterface, int paramAnonymous2Int)
{
AppMethodBeat.i(69512);
b.c(b.this).putInt("RESET_PWD_USER_ACTION", 2);
b.this.a(b.2.a(b.2.this), 0, b.d(b.this));
AppMethodBeat.o(69512);
}
});
AppMethodBeat.o(69513);
return true;
}
AppMethodBeat.o(69513);
return false;
}
public final boolean t(Object... paramAnonymousVarArgs)
{
AppMethodBeat.i(69514);
paramAnonymousVarArgs = (w)paramAnonymousVarArgs[0];
b.e(b.this).getString("key_pwd1");
this.agTR.a(new com.tencent.mm.plugin.wallet.pwd.a.p(paramAnonymousVarArgs.pRM, paramAnonymousVarArgs.token), true, 1);
AppMethodBeat.o(69514);
return true;
}
};
AppMethodBeat.o(69520);
return paramMMActivity;
}
paramMMActivity = super.a(paramMMActivity, parami);
AppMethodBeat.o(69520);
return paramMMActivity;
}
public final e a(Activity paramActivity, Bundle paramBundle)
{
AppMethodBeat.i(69516);
Log.d("MicroMsg.ResetPwdProcessByToken", "start Process : ResetPwdProcessByToken");
b(paramActivity, WalletSetPasswordUI.class, paramBundle);
AppMethodBeat.o(69516);
return this;
}
public final void a(Activity paramActivity, int paramInt, Bundle paramBundle)
{
AppMethodBeat.i(69517);
if ((paramActivity instanceof WalletSetPasswordUI))
{
b(paramActivity, WalletPwdConfirmUI.class, paramBundle);
AppMethodBeat.o(69517);
return;
}
if ((paramActivity instanceof WalletPwdConfirmUI)) {
b(paramActivity, paramBundle);
}
AppMethodBeat.o(69517);
}
public final boolean a(final WalletBaseUI paramWalletBaseUI, int paramInt, String paramString)
{
AppMethodBeat.i(69521);
switch (paramInt)
{
default:
AppMethodBeat.o(69521);
return false;
}
k.a(paramWalletBaseUI, paramString, null, paramWalletBaseUI.getString(a.i.wallet_set_password_finish_confirm), false, new DialogInterface.OnClickListener()
{
public final void onClick(DialogInterface paramAnonymousDialogInterface, int paramAnonymousInt)
{
AppMethodBeat.i(69515);
b.this.b(paramWalletBaseUI, b.f(b.this));
if (paramWalletBaseUI.isTransparent()) {
paramWalletBaseUI.finish();
}
paramWalletBaseUI.clearErr();
AppMethodBeat.o(69515);
}
});
AppMethodBeat.o(69521);
return true;
}
public final void b(Activity paramActivity, Bundle paramBundle)
{
AppMethodBeat.i(69519);
Intent localIntent = new Intent(paramActivity, WalletResetPwdAdapterUI.class);
localIntent.putExtra("RESET_PWD_USER_ACTION", paramBundle.getInt("RESET_PWD_USER_ACTION", 0));
a(paramActivity, WalletResetPwdAdapterUI.class, -1, localIntent, false);
AppMethodBeat.o(69519);
}
public final boolean c(Activity paramActivity, Bundle paramBundle)
{
return false;
}
public final String fud()
{
return "ResetPwdProcessByToken";
}
public final void i(Activity paramActivity, int paramInt)
{
AppMethodBeat.i(69518);
if ((paramActivity instanceof WalletPwdConfirmUI)) {
a(paramActivity, WalletSetPasswordUI.class, paramInt);
}
AppMethodBeat.o(69518);
}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes5.jar
* Qualified Name: com.tencent.mm.plugin.wallet.pwd.b
* JD-Core Version: 0.7.0.1
*/ | [
"98632993+tsuzcx@users.noreply.github.com"
] | 98632993+tsuzcx@users.noreply.github.com |
11e5f8b1274ebaa5a926e1b78438100321c94bb1 | a4f1d2a19fc1d158f27b2db57861443c8b16f5f0 | /source/com/barrybecker4/game/twoplayer/chess/ui/ChessBoardRenderer.java | 3d5d1e0f7d74e3b622d56d88cdb5a74090b694b0 | [
"MIT"
] | permissive | yangboz/bb4-games | 8ca0b58f6c9b468b009174e2a5048ebdc8b12f25 | 6e5cfbe6d502f13d8ca765e9386a3bacc99e920a | refs/heads/master | 2020-12-02T06:38:53.113736 | 2017-06-30T12:15:23 | 2017-06-30T12:15:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,281 | java | /** Copyright by Barry G. Becker, 2000-2011. Licensed under MIT License: http://www.opensource.org/licenses/MIT */
package com.barrybecker4.game.twoplayer.chess.ui;
import com.barrybecker4.game.common.board.Board;
import com.barrybecker4.game.common.player.Player;
import com.barrybecker4.game.common.ui.viewer.GameBoardRenderer;
import com.barrybecker4.game.twoplayer.checkers.ui.CheckersBoardRenderer;
import java.awt.*;
/**
* Singleton class that takes a game board and renders it for the GameBoardViewer.
* Having the board renderer separate from the viewer helps to separate out the rendering logic
* from other features of the GameBoardViewer.
*
* @author Barry Becker
*/
public class ChessBoardRenderer extends CheckersBoardRenderer {
private static GameBoardRenderer renderer_;
/**
* private constructor because this class is a singleton.
* Use getRenderer instead
*/
private ChessBoardRenderer() {
pieceRenderer_ = ChessPieceRenderer.getRenderer();
}
public static GameBoardRenderer getRenderer() {
if (renderer_ == null)
renderer_ = new ChessBoardRenderer();
return renderer_;
}
@Override
protected void drawLastMoveMarker(Graphics2D g2, Player player, Board board) {}
}
| [
"barrybecker4@yahoo.com"
] | barrybecker4@yahoo.com |
6f7b822da7bbe65a8ad2c38c649043aadfb73d56 | 647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4 | /com.tencent.mm/classes.jar/com/tencent/mm/live/model/d/a$a$$ExternalSyntheticLambda5.java | 3b458df88c00bb9cae19e86dc5d0cfa970af296c | [] | 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 | 356 | java | package com.tencent.mm.live.model.d;
public final class a$a$$ExternalSyntheticLambda5
implements Runnable
{
public final void run() {}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes2.jar
* Qualified Name: com.tencent.mm.live.model.d.a.a..ExternalSyntheticLambda5
* JD-Core Version: 0.7.0.1
*/ | [
"98632993+tsuzcx@users.noreply.github.com"
] | 98632993+tsuzcx@users.noreply.github.com |
721cb02dc654ee776c8bf8dd4872cd8886698366 | e2ba7a3d63b7ee1618cb771a26d5dcb7d7add049 | /26-SDP/CSM/CSMFE/SDP_CSM_WS/src/main/java/com/accenture/sdp/csmfe/webservices/request/solutionoffer/CreateSolutionOfferAndPackageRequest.java | 0b44790a0aaa979c19f9b7f6aa43edc85f81ff8f | [] | no_license | adabalaravi/ca123 | e1cdd59aa4ee0964a111f54206cec39bce179e68 | 1f2950e33f9bdb72e16f27988d7a238d4c66aad3 | refs/heads/master | 2020-06-03T05:40:29.581085 | 2017-10-29T08:40:26 | 2017-10-29T08:40:26 | 94,117,979 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,463 | java | package com.accenture.sdp.csmfe.webservices.request.solutionoffer;
import java.io.Serializable;
import java.util.Date;
import javax.xml.bind.annotation.XmlAccessOrder;
import javax.xml.bind.annotation.XmlAccessorOrder;
import javax.xml.bind.annotation.XmlRootElement;
import com.accenture.sdp.csmfe.webservices.request.solution.PartyGroupNameListRequest;
@XmlRootElement(namespace = "http://com.accenture.sdp.csm.webservices.types")
@XmlAccessorOrder(XmlAccessOrder.UNDEFINED)
public class CreateSolutionOfferAndPackageRequest implements Serializable {
/**
*
*/
private static final long serialVersionUID = -1509334643180494236L;
private String solutionName;
private String solutionOfferName;
private String solutionOfferDescription;
// modificati per anomalia SDP00000271
private Date solutionOfferStartDate;
private Date solutionOfferEndDate;
private String solutionOfferProfile;
// fine anomalia
// MODIFICATO PER STAR
private ExternalIdList externalIds;
private SolutionOfferDetailListRequest solutionOfferDetails;
// AGGIUNTO PER AVS
private PartyGroupNameListRequest partyGroups;
private String solutionOfferType;
private Long duration;
public CreateSolutionOfferAndPackageRequest() {
partyGroups = new PartyGroupNameListRequest();
solutionOfferDetails = new SolutionOfferDetailListRequest();
externalIds = new ExternalIdList();
}
public String getSolutionName() {
return solutionName;
}
public void setSolutionName(String solutionName) {
this.solutionName = solutionName;
}
public String getSolutionOfferName() {
return solutionOfferName;
}
public void setSolutionOfferName(String solutionOfferName) {
this.solutionOfferName = solutionOfferName;
}
public String getSolutionOfferDescription() {
return solutionOfferDescription;
}
public void setSolutionOfferDescription(String solutionOfferDescription) {
this.solutionOfferDescription = solutionOfferDescription;
}
public Date getSolutionOfferStartDate() {
return solutionOfferStartDate;
}
public void setSolutionOfferStartDate(Date solutionOfferStartDate) {
this.solutionOfferStartDate = solutionOfferStartDate;
}
public Date getSolutionOfferEndDate() {
return solutionOfferEndDate;
}
public void setSolutionOfferEndDate(Date solutionOfferEndDate) {
this.solutionOfferEndDate = solutionOfferEndDate;
}
public String getSolutionOfferProfile() {
return solutionOfferProfile;
}
public void setSolutionOfferProfile(String solutionOfferProfile) {
this.solutionOfferProfile = solutionOfferProfile;
}
public SolutionOfferDetailListRequest getSolutionOfferDetails() {
return solutionOfferDetails;
}
public void setSolutionOfferDetails(SolutionOfferDetailListRequest solutionOfferDetails) {
this.solutionOfferDetails = solutionOfferDetails;
}
public PartyGroupNameListRequest getPartyGroups() {
return partyGroups;
}
public void setPartyGroups(PartyGroupNameListRequest partyGroups) {
this.partyGroups = partyGroups;
}
public ExternalIdList getExternalIds() {
return externalIds;
}
public void setExternalIds(ExternalIdList externalIds) {
this.externalIds = externalIds;
}
public String getSolutionOfferType() {
return solutionOfferType;
}
public void setSolutionOfferType(String solutionOfferType) {
this.solutionOfferType = solutionOfferType;
}
public Long getDuration() {
return duration;
}
public void setDuration(Long duration) {
this.duration = duration;
}
}
| [
"ravindra.mca25@gmail.com"
] | ravindra.mca25@gmail.com |
d627d1b2d3e35ca69d34cdb9430bfacf30d6b5d3 | 12eaf974dd5cda4584d69fb6978838f0453c753e | /src/day62/TryCatchBlock.java | e10bc32efb8f406b3252807b19dc5806a85eb605 | [] | no_license | hunals/JavaSpringPractice2019 | 58b1232676254086f213a15c4095b82a8da34e1b | 81ace34df5595ace3b899b6be533a9773cff2537 | refs/heads/master | 2020-06-04T20:48:23.286332 | 2019-07-04T13:17:10 | 2019-07-04T13:17:10 | 192,184,248 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 799 | java | package day62;
import java.util.Scanner;
public class TryCatchBlock {
public static void main(String[] args) {
System.out.println("Beginning of the code ");
Scanner scanner = new Scanner(System.in);
try {
System.out.println("Enter num1 : ");
int num1 = scanner.nextInt();
System.out.println("Enter num2 : ");
int num2 = scanner.nextInt();
System.out.println("Division result is " + num1/num2);
// we are specifically trying catch ArithmeticException if it happen
} catch (ArithmeticException e ) { // new ArithmeticException();
System.out.println(" You INPUT 0 for second number ");
}
System.out.println("Ending of the code ");
// throw --> shut down the program
// catch --> don't allow program to shut down
}
}
| [
"hunals06@hotmail.com"
] | hunals06@hotmail.com |
6540ea53fdfc2e74193930eb5bbdcd13f36c51d0 | ed966229704a77cc062635090d92682f5d6f2bf4 | /user/server/src/main/java/com/ljf/user/enums/RoleEnum.java | 36a10a28227d21799ee9ce4de7290d1b5aa2371d | [] | no_license | s1991721/SpringCloud_Practice | 47619adb4d776b1fdd2c947b79f3f5170c424f87 | ab682ed6a61170926fc60d0a5b13dfd7d623743a | refs/heads/master | 2020-06-13T20:35:38.943876 | 2019-07-02T03:56:00 | 2019-07-02T03:56:00 | 194,780,471 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 348 | java | package com.ljf.user.enums;
import lombok.Getter;
/**
* Created by mr.lin on 2019/6/27
*/
@Getter
public enum RoleEnum {
BUYER(1, "买家"),
SELLER(2, "卖家"),
;
private Integer code;
private String message;
RoleEnum(Integer code, String message) {
this.code = code;
this.message = message;
}
}
| [
"278971585@qq.com"
] | 278971585@qq.com |
d000ed462673ba562f4e868c10d864f979aaff4d | f4762a908e49f7aaa177378c2ebdf7b985180e2b | /sources/gnu/math/Dimensions.java | 6193b3b9a88ebf9ccaf52e1ca1ac4f95b4e10274 | [
"MIT"
] | permissive | PixalTeam/receiver_android | 76f5b0a7a8c54d83e49ad5921f640842547a171f | d4aa75f9021a66262a9a267edd5bc25509677248 | refs/heads/master | 2020-12-03T08:49:57.484377 | 2020-01-01T20:38:04 | 2020-01-01T20:38:04 | 231,260,295 | 0 | 0 | MIT | 2020-11-15T12:46:40 | 2020-01-01T20:25:18 | Java | UTF-8 | Java | false | false | 4,761 | java | package gnu.math;
public class Dimensions {
public static Dimensions Empty = new Dimensions();
private static Dimensions[] hashTable = new Dimensions[100];
BaseUnit[] bases;
private Dimensions chain;
int hash_code;
short[] powers;
public final int hashCode() {
return this.hash_code;
}
private void enterHash(int hash_code2) {
this.hash_code = hash_code2;
int index = (Integer.MAX_VALUE & hash_code2) % hashTable.length;
this.chain = hashTable[index];
hashTable[index] = this;
}
private Dimensions() {
this.bases = new BaseUnit[1];
this.bases[0] = Unit.Empty;
enterHash(0);
}
Dimensions(BaseUnit unit) {
this.bases = new BaseUnit[2];
this.powers = new short[1];
this.bases[0] = unit;
this.bases[1] = Unit.Empty;
this.powers[0] = 1;
enterHash(unit.index);
}
private Dimensions(Dimensions a, int mul_a, Dimensions b, int mul_b, int hash_code2) {
int pow;
this.hash_code = hash_code2;
int a_i = 0;
while (a.bases[a_i] != Unit.Empty) {
a_i++;
}
int b_i = 0;
while (b.bases[b_i] != Unit.Empty) {
b_i++;
}
int t_i = a_i + b_i + 1;
this.bases = new BaseUnit[t_i];
this.powers = new short[t_i];
int t_i2 = 0;
int b_i2 = 0;
int a_i2 = 0;
while (true) {
BaseUnit a_base = a.bases[a_i2];
BaseUnit b_base = b.bases[b_i2];
if (a_base.index < b_base.index) {
pow = a.powers[a_i2] * mul_a;
a_i2++;
} else if (b_base.index < a_base.index) {
a_base = b_base;
pow = b.powers[b_i2] * mul_b;
b_i2++;
} else if (b_base == Unit.Empty) {
this.bases[t_i2] = Unit.Empty;
enterHash(hash_code2);
return;
} else {
pow = (a.powers[a_i2] * mul_a) + (b.powers[b_i2] * mul_b);
a_i2++;
b_i2++;
if (pow == 0) {
continue;
}
}
if (((short) pow) != pow) {
throw new ArithmeticException("overflow in dimensions");
}
this.bases[t_i2] = a_base;
int t_i3 = t_i2 + 1;
this.powers[t_i2] = (short) pow;
t_i2 = t_i3;
}
}
private boolean matchesProduct(Dimensions a, int mul_a, Dimensions b, int mul_b) {
int pow;
int a_i = 0;
int b_i = 0;
int t_i = 0;
while (true) {
BaseUnit a_base = a.bases[a_i];
BaseUnit b_base = b.bases[b_i];
if (a_base.index < b_base.index) {
pow = a.powers[a_i] * mul_a;
a_i++;
} else if (b_base.index < a_base.index) {
a_base = b_base;
pow = b.powers[b_i] * mul_b;
b_i++;
} else if (b_base != Unit.Empty) {
pow = (a.powers[a_i] * mul_a) + (b.powers[b_i] * mul_b);
a_i++;
b_i++;
if (pow == 0) {
continue;
}
} else if (this.bases[t_i] == b_base) {
return true;
} else {
return false;
}
if (this.bases[t_i] != a_base || this.powers[t_i] != pow) {
return false;
}
t_i++;
}
}
public static Dimensions product(Dimensions a, int mul_a, Dimensions b, int mul_b) {
int hash = (a.hashCode() * mul_a) + (b.hashCode() * mul_b);
for (Dimensions dim = hashTable[(Integer.MAX_VALUE & hash) % hashTable.length]; dim != null; dim = dim.chain) {
if (dim.hash_code == hash && dim.matchesProduct(a, mul_a, b, mul_b)) {
return dim;
}
}
return new Dimensions(a, mul_a, b, mul_b, hash);
}
public int getPower(BaseUnit unit) {
for (int i = 0; this.bases[i].index <= unit.index; i++) {
if (this.bases[i] == unit) {
return this.powers[i];
}
}
return 0;
}
public String toString() {
StringBuffer buf = new StringBuffer();
for (int i = 0; this.bases[i] != Unit.Empty; i++) {
if (i > 0) {
buf.append('*');
}
buf.append(this.bases[i]);
short pow = this.powers[i];
if (pow != 1) {
buf.append('^');
buf.append(pow);
}
}
return buf.toString();
}
}
| [
"34947108+Gumbraise@users.noreply.github.com"
] | 34947108+Gumbraise@users.noreply.github.com |
bd6b2a71a3d818e304cdc124ef50dcff4eca4d18 | 09b7f281818832efb89617d6f6cab89478d49930 | /root/projects/alfresco-jlan/source/java/org/alfresco/jlan/server/core/NoPooledMemoryException.java | 09e502fa99a5bc2a951ce6470070345027e79ee7 | [] | no_license | verve111/alfresco3.4.d | 54611ab8371a6e644fcafc72dc37cdc3d5d8eeea | 20d581984c2d22d5fae92e1c1674552c1427119b | refs/heads/master | 2023-02-07T14:00:19.637248 | 2020-12-25T10:19:17 | 2020-12-25T10:19:17 | 323,932,520 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,349 | java | /*
* Copyright (C) 2005-2010 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.jlan.server.core;
import java.io.IOException;
/**
* No Pooled Memory Exception Class
*
* <p>Indicates that no buffers are available in the global memory pool or per protocol pool.
*
* @author gkspencer
*/
public class NoPooledMemoryException extends IOException {
private static final long serialVersionUID = 6852939454477894406L;
/**
* Default constructor
*/
public NoPooledMemoryException() {
super();
}
/**
* Class constructor
*
* @param s String
*/
public NoPooledMemoryException(String s) {
super(s);
}
}
| [
"verve111@mail.ru"
] | verve111@mail.ru |
840efbfae8ef30fd8ed17210f304ce4664568d85 | 0fc4aa42cf1609231bd5a59a4860f89c96878252 | /stackoverflow/joe-program/src/main/java/com/joe/qiao/headfirst/templatemethod/sort/Duck.java | 40f014290494e47d2ec227554cfe2771b9334f4b | [] | no_license | qiaoyunlai66/JOE | 6a7dbd3075df55ac2f90e4373b4765b1c37d83e3 | deadacbae9a06246946de8230c30daa063fe3124 | refs/heads/master | 2021-09-12T07:06:01.971653 | 2018-04-15T08:30:02 | 2018-04-15T08:30:02 | 113,730,225 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 548 | java | package com.joe.qiao.headfirst.templatemethod.sort;
public class Duck implements Comparable {
String name;
int weight;
public Duck(String name, int weight) {
this.name = name;
this.weight = weight;
}
public String toString() {
return name + " weighs " + weight;
}
public int compareTo(Object object) {
Duck otherDuck = (Duck)object;
if (this.weight < otherDuck.weight) {
return -1;
} else if (this.weight == otherDuck.weight) {
return 0;
} else { // this.weight > otherDuck.weight
return 1;
}
}
}
| [
"joeqiao@fortinet.com"
] | joeqiao@fortinet.com |
2daee091169df7523e0f1c4c1a21363621c21887 | e8cd24201cbfadef0f267151ea5b8a90cc505766 | /group01/553624797/code2017/src/com/xxt/DataStructure/base/Stack.java | e6edc1990b56975328daf3f096911fee61696cc5 | [] | no_license | XMT-CN/coding2017-s1 | 30dd4ee886dd0a021498108353c20360148a6065 | 382f6bfeeeda2e76ffe27b440df4f328f9eafbe2 | refs/heads/master | 2021-01-21T21:38:42.199253 | 2017-06-25T07:44:21 | 2017-06-25T07:44:21 | 94,863,023 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 383 | java | package com.xxt.DataStructure.base;
import com.xxt.DataStructure.base.ArrayList;
public class Stack {
private ArrayList elementData = new ArrayList();
public void push(Object o){
}
public Object pop(){
return null;
}
public Object peek(){
return null;
}
public boolean isEmpty(){
return false;
}
public int size(){
return -1;
}
}
| [
"542194147@qq.com"
] | 542194147@qq.com |
c54bfae5b8b02f2e8d408e8bc184df20d9cee1de | a28a8ef8027dcbe7f7eaa168347c6c2d0c1b2d79 | /war/datasets/argouml-1LC/t_241837/right_ActionNewPseudoState_1.8.java | 51d38a91a75b63135206d0e9eb61ee166d2879b3 | [] | no_license | martinezmatias/commitsurvey | f36f9e6a32c2dd43cc976eb2224ffae06067c609 | a1791d57b879c722d30ee174e1af81737ef04f34 | refs/heads/master | 2021-01-23T05:29:56.498364 | 2017-03-27T08:58:08 | 2017-03-27T08:58:08 | 86,312,255 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,069 | java | // $Id: ActionNewPseudoState.java,v 1.8 2004-12-05 19:31:04 mvw Exp $
// Copyright (c) 1996-2004 The Regents of the University of California. All
// Rights Reserved. Permission to use, copy, modify, and distribute this
// software and its documentation without fee, and without a written
// agreement is hereby granted, provided that the above copyright notice
// and this paragraph appear in all copies. This software program and
// documentation are copyrighted by The Regents of the University of
// California. The software program and documentation are supplied "AS
// IS", without any accompanying services from The Regents. The Regents
// does not warrant that the operation of the program will be
// uninterrupted or error-free. The end-user understands that the program
// was developed for research purposes and is advised not to rely
// exclusively on the program for any reason. IN NO EVENT SHALL THE
// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
package org.argouml.uml.ui.behavior.state_machines;
import java.awt.event.ActionEvent;
import javax.swing.Action;
import org.argouml.i18n.Translator;
import org.argouml.model.ModelFacade;
import org.argouml.model.uml.StateMachinesFactory;
import org.argouml.ui.targetmanager.TargetManager;
import org.argouml.uml.ui.AbstractActionNewModelElement;
/**
* @since Dec 14, 2002
* @author jaap.branderhorst@xs4all.nl
*/
public class ActionNewPseudoState extends AbstractActionNewModelElement {
private Object kind;
/**
* Constructor for ActionNewPseudoState.
*/
public ActionNewPseudoState() {
super();
putValue(Action.NAME, Translator.localize("button.new-pseudostate"));
}
/**
* The constructor.
*
* @param k the pseudostate kind
* @param n the to be localized name for the pseudostate kind
*/
public ActionNewPseudoState(Object k, String n) {
super();
kind = k;
putValue(Action.NAME, Translator.localize(n));
}
/**
* @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
*/
public void actionPerformed(ActionEvent e) {
super.actionPerformed(e);
Object target = TargetManager.getInstance().getModelTarget();
Object ps =
StateMachinesFactory.getFactory().buildPseudoState(target);
if (kind != null) {
ModelFacade.setKind(ps, kind);
}
}
}
| [
"matias.sebastian.martinez@gmail.com"
] | matias.sebastian.martinez@gmail.com |
4099284d2bc2fa743965f5d593b1e17e90a8e848 | 41e407fbce3e10ddd61217c3acbaf04ade3294b0 | /jOOQ/src/main/java/org/jooq/impl/ArrayTableSimulation.java | 4688295fb2db5f2ab898a88887b1c708410e6e8a | [
"Apache-2.0",
"BSD-3-Clause"
] | permissive | pierrecarre/jOOQ-jdk5 | ad65b1eb77e89924cf6f5cad5e346440e1bc67ad | ce46c54fff7ebf4753c37c120c5d64b4d35f9690 | refs/heads/master | 2021-01-21T09:50:02.647487 | 2014-01-22T16:44:38 | 2014-01-22T16:44:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,583 | java | /**
* Copyright (c) 2009-2013, Data Geekery GmbH (http://www.datageekery.com)
* All rights reserved.
*
* This work is dual-licensed
* - under the Apache Software License 2.0 (the "ASL")
* - under the jOOQ License and Maintenance Agreement (the "jOOQ License")
* =============================================================================
* You may choose which license applies to you:
*
* - If you're using this work with Open Source databases, you may choose
* either ASL or jOOQ License.
* - If you're using this work with at least one commercial database, you must
* choose jOOQ License
*
* For more information, please visit http://www.jooq.org/licenses
*
* Apache Software License 2.0:
* -----------------------------------------------------------------------------
* 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.
*
* jOOQ License and Maintenance Agreement:
* -----------------------------------------------------------------------------
* Data Geekery grants the Customer the non-exclusive, timely limited and
* non-transferable license to install and use the Software under the terms of
* the jOOQ License and Maintenance Agreement.
*
* This library is distributed with a LIMITED WARRANTY. See the jOOQ License
* and Maintenance Agreement for more details: http://www.jooq.org/licensing
*/
package org.jooq.impl;
import static org.jooq.impl.DSL.falseCondition;
import static org.jooq.impl.DSL.fieldByName;
import static org.jooq.impl.DSL.one;
import static org.jooq.impl.DSL.using;
import org.jooq.BindContext;
import org.jooq.Configuration;
import org.jooq.Field;
import org.jooq.Record;
import org.jooq.RenderContext;
import org.jooq.Select;
import org.jooq.Table;
import org.jooq.exception.DataAccessException;
/**
* Essentially, this is the same as <code>ArrayTable</code>, except that it simulates
* unnested arrays using <code>UNION ALL</code>
*
* @author Lukas Eder
*/
class ArrayTableSimulation extends AbstractTable<Record> {
/**
* Generated UID
*/
private static final long serialVersionUID = 2392515064450536343L;
private final Object[] array;
private final Fields<Record> field;
private final String alias;
private final String fieldAlias;
private transient Table<Record> table;
ArrayTableSimulation(Object[] array) {
this(array, "array_table", null);
}
ArrayTableSimulation(Object[] array, String alias) {
this(array, alias, null);
}
ArrayTableSimulation(Object[] array, String alias, String fieldAlias) {
super(alias);
this.array = array;
this.alias = alias;
this.fieldAlias = fieldAlias == null ? "COLUMN_VALUE" : fieldAlias;
this.field = new Fields<Record>(fieldByName(DSL.getDataType(array.getClass().getComponentType()), alias, this.fieldAlias));
}
@Override
public final Class<? extends Record> getRecordType() {
return RecordImpl.class;
}
@Override
public final Table<Record> as(String as) {
return new ArrayTableSimulation(array, as);
}
@Override
public final Table<Record> as(String as, String... fieldAliases) {
if (fieldAliases == null) {
return new ArrayTableSimulation(array, as);
}
else if (fieldAliases.length == 1) {
return new ArrayTableSimulation(array, as, fieldAliases[0]);
}
throw new IllegalArgumentException("Array table simulations can only have a single field alias");
}
@Override
public final boolean declaresTables() {
// [#1055] Always true, because unnested tables are always aliased.
// This is particularly important for simulated unnested arrays
return true;
}
@Override
public final void toSQL(RenderContext ctx) {
ctx.visit(table(ctx.configuration()));
}
@Override
public final void bind(BindContext ctx) throws DataAccessException {
ctx.visit(table(ctx.configuration()));
}
@Override
final Fields<Record> fields0() {
return field;
}
private final Table<Record> table(Configuration configuration) {
if (table == null) {
Select<Record> select = null;
for (Object element : array) {
// [#1081] Be sure to get the correct cast type also for null
Field<?> val = DSL.val(element, field.fields[0].getDataType());
Select<Record> subselect = using(configuration).select(val.as("COLUMN_VALUE")).select();
if (select == null) {
select = subselect;
}
else {
select = select.unionAll(subselect);
}
}
// Empty arrays should result in empty tables
if (select == null) {
select = using(configuration).select(one().as("COLUMN_VALUE")).select().where(falseCondition());
}
table = select.asTable(alias);
}
return table;
}
}
| [
"lukas.eder@gmail.com"
] | lukas.eder@gmail.com |
d9eceeb4058381451fc1f13b7b78c85d095b515f | 2613c9c2bde0cb3230a11bb04dfe863a612fccbc | /org.tolven.fdb/ejb/source/org/tolven/fdb/entity/FdbMinmaxwarningPK.java | 3e16aff28129b244138dcd22f11bb787db6b3362 | [] | no_license | kedar-s/bugtest | 1d38a8f73419cc8f60ff41553321ca9942ba09b0 | 36e3556973b7320f1f2fcf5ef48af733bcb537c1 | refs/heads/main | 2023-08-22T09:51:25.918449 | 2021-10-14T16:09:29 | 2021-10-14T16:09:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,589 | java | package org.tolven.fdb.entity;
import java.io.Serializable;
import javax.persistence.*;
/**
* The primary key class for the fdb_minmaxwarnings database table.
*
*/
@Embeddable
public class FdbMinmaxwarningPK implements Serializable {
//default serial version id, required for serializable classes.
private static final long serialVersionUID = 1L;
private Integer gcnseqno;
private Integer agelowindays;
private Integer agehighindays;
public FdbMinmaxwarningPK() {
}
public Integer getGcnseqno() {
return this.gcnseqno;
}
public void setGcnseqno(Integer gcnseqno) {
this.gcnseqno = gcnseqno;
}
public Integer getAgelowindays() {
return this.agelowindays;
}
public void setAgelowindays(Integer agelowindays) {
this.agelowindays = agelowindays;
}
public Integer getAgehighindays() {
return this.agehighindays;
}
public void setAgehighindays(Integer agehighindays) {
this.agehighindays = agehighindays;
}
public boolean equals(Object other) {
if (this == other) {
return true;
}
if (!(other instanceof FdbMinmaxwarningPK)) {
return false;
}
FdbMinmaxwarningPK castOther = (FdbMinmaxwarningPK)other;
return
this.gcnseqno.equals(castOther.gcnseqno)
&& this.agelowindays.equals(castOther.agelowindays)
&& this.agehighindays.equals(castOther.agehighindays);
}
public int hashCode() {
final int prime = 31;
int hash = 17;
hash = hash * prime + this.gcnseqno.hashCode();
hash = hash * prime + this.agelowindays.hashCode();
hash = hash * prime + this.agehighindays.hashCode();
return hash;
}
} | [
"kedarsambhus@outlook.com"
] | kedarsambhus@outlook.com |
2882166102380e283f0253917f16167cffb87988 | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Math/105/org/apache/commons/math/stat/descriptive/moment/Kurtosis_clear_109.java | 48d9b31a6700fb61eb6cdc96791d2c4bed1c10f0 | [] | 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 | 830 | java |
org apach common math stat descript moment
comput kurtosi valu
unbias formula defin kurtosi
kurtosi sum std
number valu link std
link standard deviat standarddevi
note statist undefin code doubl nan code
return suffici data comput statist
strong note implement strong
multipl thread access instanc concurr
thread invok code increment code
code clear code method extern
version revis date
kurtosi abstract storeless univari statist abstractstorelessunivariatestatist
org apach common math stat descript storeless univari statist storelessunivariatestatist clear
clear
moment incmoment
moment clear
illeg state except illegalstateexcept
statist construct extern moment clear
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
b1197ffc98c32871ca0ebc3bf85b71da67e42fa0 | 51fa3cc281eee60058563920c3c9059e8a142e66 | /Java/src/testcases/CWE400_Resource_Exhaustion/s01/CWE400_Resource_Exhaustion__Environment_write_68a.java | e9b26248ae30767840f6bd6c38191b40a3afeffa | [] | no_license | CU-0xff/CWE-Juliet-TestSuite-Java | 0b4846d6b283d91214fed2ab96dd78e0b68c945c | f616822e8cb65e4e5a321529aa28b79451702d30 | refs/heads/master | 2020-09-14T10:41:33.545462 | 2019-11-21T07:34:54 | 2019-11-21T07:34:54 | 223,105,798 | 1 | 4 | null | null | null | null | UTF-8 | Java | false | false | 3,571 | java | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE400_Resource_Exhaustion__Environment_write_68a.java
Label Definition File: CWE400_Resource_Exhaustion.label.xml
Template File: sources-sinks-68a.tmpl.java
*/
/*
* @description
* CWE: 400 Resource Exhaustion
* BadSource: Environment Read count from an environment variable
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: write
* GoodSink: Write to a file count number of times, but first validate count
* BadSink : Write to a file count number of times
* Flow Variant: 68 Data flow: data passed as a member variable in the "a" class, which is used by a method in another class in the same package
*
* */
package testcases.CWE400_Resource_Exhaustion.s01;
import testcasesupport.*;
import javax.servlet.http.*;
import java.util.logging.Level;
public class CWE400_Resource_Exhaustion__Environment_write_68a extends AbstractTestCase
{
public static int count;
public void bad() throws Throwable
{
count = Integer.MIN_VALUE; /* Initialize count */
/* get environment variable ADD */
/* POTENTIAL FLAW: Read count from an environment variable */
{
String stringNumber = System.getenv("ADD");
if (stringNumber != null) // avoid NPD incidental warnings
{
try
{
count = Integer.parseInt(stringNumber.trim());
}
catch(NumberFormatException exceptNumberFormat)
{
IO.logger.log(Level.WARNING, "Number format exception parsing count from string", exceptNumberFormat);
}
}
}
(new CWE400_Resource_Exhaustion__Environment_write_68b()).badSink();
}
public void good() throws Throwable
{
goodG2B();
goodB2G();
}
/* goodG2B() - use goodsource and badsink */
private void goodG2B() throws Throwable
{
/* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */
count = 2;
(new CWE400_Resource_Exhaustion__Environment_write_68b()).goodG2BSink();
}
/* goodB2G() - use badsource and goodsink */
private void goodB2G() throws Throwable
{
count = Integer.MIN_VALUE; /* Initialize count */
/* get environment variable ADD */
/* POTENTIAL FLAW: Read count from an environment variable */
{
String stringNumber = System.getenv("ADD");
if (stringNumber != null) // avoid NPD incidental warnings
{
try
{
count = Integer.parseInt(stringNumber.trim());
}
catch(NumberFormatException exceptNumberFormat)
{
IO.logger.log(Level.WARNING, "Number format exception parsing count from string", exceptNumberFormat);
}
}
}
(new CWE400_Resource_Exhaustion__Environment_write_68b()).goodB2GSink();
}
/* Below is the main(). It is only used when building this testcase on
* its own for testing or for building a binary to use in testing binary
* analysis tools. It is not used when compiling all the testcases as one
* application, which is how source code analysis tools are tested.
*/
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
| [
"frank@fischer.com.mt"
] | frank@fischer.com.mt |
8d6c43ca62bc2fde508a0128c7a5d7acd376683c | 948988825700426256460221d2ecb5f673933447 | /blog/src/main/java/org/jhipster/org/web/rest/errors/BadRequestAlertException.java | 3031fb7fa1015e02f9b8d7983d37e5dfc0bc3f31 | [] | no_license | daniels75/jhipster | 55273ff9b24cd5e9e02830e0c55e416d3cb01e08 | 5979805c37aa102296044bc35624cfeca28e4872 | refs/heads/master | 2021-08-16T04:12:43.909029 | 2020-01-23T19:05:01 | 2020-01-23T19:05:01 | 217,149,996 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,319 | java | package org.jhipster.org.web.rest.errors;
import org.zalando.problem.AbstractThrowableProblem;
import org.zalando.problem.Status;
import java.net.URI;
import java.util.HashMap;
import java.util.Map;
public class BadRequestAlertException extends AbstractThrowableProblem {
private static final long serialVersionUID = 1L;
private final String entityName;
private final String errorKey;
public BadRequestAlertException(String defaultMessage, String entityName, String errorKey) {
this(ErrorConstants.DEFAULT_TYPE, defaultMessage, entityName, errorKey);
}
public BadRequestAlertException(URI type, String defaultMessage, String entityName, String errorKey) {
super(type, defaultMessage, Status.BAD_REQUEST, null, null, null, getAlertParameters(entityName, errorKey));
this.entityName = entityName;
this.errorKey = errorKey;
}
public String getEntityName() {
return entityName;
}
public String getErrorKey() {
return errorKey;
}
private static Map<String, Object> getAlertParameters(String entityName, String errorKey) {
Map<String, Object> parameters = new HashMap<>();
parameters.put("message", "error." + errorKey);
parameters.put("params", entityName);
return parameters;
}
}
| [
"daniel.sadowski75@gmail.com"
] | daniel.sadowski75@gmail.com |
af3f5d8b9aeb1f2ccb2b3dacbcc3695ac939b2b8 | 7d1926140921a33d933397add81b5fb8d45d12dd | /jy-shop/jy-shop-app/src/main/java/com/jiyi/common/config/FilterConfig.java | 95cd288c3fc372bb3206c9e7540a085c834af832 | [] | no_license | jyPBDepartment/jyshop | 28484f47d3d19fc151e73ab1a2f13e07647b5f9e | a59aa66632e41c6da6f642545d1abf5c22a821e5 | refs/heads/master | 2023-03-01T12:30:13.021414 | 2021-02-05T08:17:58 | 2021-02-05T08:17:58 | 336,201,679 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,458 | java | package com.jiyi.common.config;
import cn.hutool.core.util.StrUtil;
import com.jiyi.xss.XssFilter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import javax.servlet.DispatcherType;
import java.util.HashMap;
import java.util.Map;
/**
* @ClassName Filter配置
*
* @Date 2020/4/30
**/
@Configuration
public class FilterConfig
{
@Value("${xss.enabled}")
private String enabled;
@Value("${xss.excludes}")
private String excludes;
@Value("${xss.urlPatterns}")
private String urlPatterns;
@SuppressWarnings({ "rawtypes", "unchecked" })
@Bean
public FilterRegistrationBean xssFilterRegistration()
{
FilterRegistrationBean registration = new FilterRegistrationBean();
registration.setDispatcherTypes(DispatcherType.REQUEST);
registration.setFilter(new XssFilter());
registration.addUrlPatterns(StrUtil.split(urlPatterns, ","));
registration.setName("xssFilter");
registration.setOrder(Integer.MAX_VALUE);
Map<String, String> initParameters = new HashMap<String, String>();
initParameters.put("excludes", excludes);
initParameters.put("enabled", enabled);
registration.setInitParameters(initParameters);
return registration;
}
}
| [
"zhouguohui0328@163.com"
] | zhouguohui0328@163.com |
128fce6bb40852bea00c3ec1b73ed6d5cfb2ec8f | 801f424ce1e64073e5a32c89d368aaf072211d88 | /datarepository/src/main/java/com/library/repository/repository/remote/RemoteCompanyApi.java | 645f4cec19ee641f9e174ca3eb13acef9f37b3fd | [
"Apache-2.0"
] | permissive | ydmmocoo/MGM | 91688de95e798f4c7746640bd3c2ef17d294fced | 51d0822e9c378da1538847c6d5f01adf94524a4b | refs/heads/master | 2022-11-14T16:00:28.862488 | 2020-07-02T03:41:05 | 2020-07-02T03:41:05 | 270,987,374 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,992 | java | package com.library.repository.repository.remote;
import com.library.repository.models.CmpanydetaisModel;
import com.library.repository.models.CompanyDetailModel;
import com.library.repository.models.CompanyListModel;
import com.library.repository.models.CompanyTypeListModel;
import com.library.repository.models.CompanyTypeListModelV1;
import com.library.repository.models.QuestionInfo;
import com.library.repository.models.ResponseModel;
import com.library.repository.models.YellowPageDetailModel;
import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;
public interface RemoteCompanyApi {
/**
* 企业黄历列表
*
* @param page
* @param title
* @return
*/
@POST("company/companyList")
@FormUrlEncoded
Observable<ResponseModel<CompanyListModel>> companyList(@Field("page") int page,
@Field("title") String title,
@Field("serviceId") String serviceId);
@POST("company/companyList")
@FormUrlEncoded
Observable<ResponseModel<CompanyListModel>> companyListV1(@Field("page") int page,
@Field("title") String title,
@Field("serviceId") String serviceId,
@Field("secondServiceId") String secondServiceId,
@Field("countryId") String countryId,
@Field("cityId") String cityId);
@POST("company/companyList")
@FormUrlEncoded
Observable<ResponseModel<CompanyListModel>> companyListV2(@Field("page") String page,
@Field("title") String title,
@Field("serviceId") String serviceId,
@Field("secondServiceId") String secondServiceId,
@Field("countryId") String countryId,
@Field("cityId") String cityId,
@Field("uid") String uid);
/**
* 企业黄历详情
*
* @param cId
* @return
*/
@POST("company/detail")
@FormUrlEncoded
Observable<ResponseModel<CmpanydetaisModel>> companyDetail(@Field("cId") String cId);
/**
* 企业黄历详情
*
* @param cId
* @return
*/
@POST("company/detail")
@FormUrlEncoded
Observable<ResponseModel<YellowPageDetailModel>> YellowPageDetail(@Field("cId") String cId);
/**
* 问题详情
*
* @param qId
* @return
*/
@POST("question/info")
@FormUrlEncoded
Observable<ResponseModel<QuestionInfo>> QuestionInfo(@Field("qId") String qId);
/**
* 关闭提问
*
* @param qId
* @return
*/
@POST("question/closeQuestion")
@FormUrlEncoded
Observable<ResponseModel<Object>> closeQuestion(@Field("qId") String qId);
/**
* 关闭提问
*
* @param rId
* @return
*/
@POST("question/acceptReply")
@FormUrlEncoded
Observable<ResponseModel<Object>> acceptReply(@Field("rId") String rId);
/**
* 我发布的企业黄历
*
* @param page
* @param title
* @return
*/
@POST("company/myCompanyList")
@FormUrlEncoded
Observable<ResponseModel<CompanyListModel>> myCompanyList(@Field("page") int page, @Field("title") String title);
/**
* 发布公司信息
*
* @param title
* @param service
* @param name
* @param phone
* @param address
* @param desc
* @param images
* @return
*/
@POST("company/add")
@FormUrlEncoded
Observable<ResponseModel<CmpanydetaisModel>> companyAdd(@Field("title") String title,
@Field("service") String service,
@Field("name") String name,
@Field("phone") String phone,
@Field("address") String address,
@Field("desc") String desc,
@Field("images") String images,
@Field("secondService") String secondService,
@Field("countryId") String countryId,
@Field("cityId") String cityId);
@POST("company/edit")
@FormUrlEncoded
Observable<ResponseModel<CmpanydetaisModel>> companyEdit(@Field("title") String title,
@Field("service") String service,
@Field("name") String name,
@Field("phone") String phone,
@Field("address") String address,
@Field("desc") String desc,
@Field("cId") String cId,
@Field("images") String images,
@Field("secondService") String secondService,
@Field("countryId") String countryId,
@Field("cityId") String cityId);
@POST("company/certification")
@FormUrlEncoded
Observable<ResponseModel<Object>> certification(@Field("name") String name,
@Field("licenseNo") String licenseNo,
@Field("businessImg") String businessImg,
@Field("employImg") String employImg);
@POST("company/del")
@FormUrlEncoded
Observable<ResponseModel<Object>> deleteCompany(@Field("cId") String cId);
@POST("company/updateReadNum")
@FormUrlEncoded
Observable<ResponseModel> updateReadNumCompany(@Field("cId") String cId);
@POST("company/getCompanyType")
Observable<ResponseModel<CompanyTypeListModel>> getCompanyType();
@POST("company/getCompanyType")
Observable<ResponseModel<CompanyTypeListModelV1>> getCompanyTypeV1();
}
| [
"ydmmocoo@gmail.com"
] | ydmmocoo@gmail.com |
b92b632934ae7b45b707b92d37410301ed2f10df | 575d99e6681fc1679cc46d92f2fa2acd47eab8d3 | /app/src/main/java/com/example/langyuye/materialdialog/LocationTestActivity.java | cc9cd555480fcee9a96c5649b46e10fc3d300f20 | [] | no_license | Langyuye/MaterialDialog | 4abe5bf256eb5a79cb5ac7c810e1f76cfe1c5730 | 86a840e74feb664d51ebc3d6fda5ba440552f527 | refs/heads/master | 2021-07-05T11:05:19.362083 | 2017-09-30T16:40:21 | 2017-09-30T16:40:21 | 105,383,068 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,613 | java | package com.example.langyuye.materialdialog;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.view.GestureDetectorCompat;
import android.support.v7.app.AppCompatActivity;
import android.view.GestureDetector;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.widget.Toast;
import com.langyuye.library.dialog.app.MaterialDialog;
/**
* Created by langyuye on 17-9-30.
*/
public class LocationTestActivity extends AppCompatActivity {
GestureDetectorCompat mGesture;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.test_layout);
mGesture=new GestureDetectorCompat(this,new MyGestureDetector());
}
class MyGestureDetector extends GestureDetector.SimpleOnGestureListener{
@Override
public boolean onSingleTapUp(MotionEvent e) {
int x=(int)e.getX();
int y=(int)e.getY();
View view= LayoutInflater.from(LocationTestActivity.this).inflate(R.layout.my_dialog_2,null);
Toast.makeText(LocationTestActivity.this,"X:"+x+",Y:"+y,Toast.LENGTH_SHORT).show();
new MaterialDialog(LocationTestActivity.this)
.setDialogWidth(350)
.setAtLocation(x,y)
.setView(view)
.show();
return true;
}
}
@Override
public boolean onTouchEvent(MotionEvent event) {
return mGesture.onTouchEvent(event);
}
}
| [
"="
] | = |
5f7db29b007cd52a3f3462ada9027db21a02ca70 | 661aaf1c10d25bcc96eefd536773efc3a8a9d35e | /support/src/main/java/com/base/components/common/boot/EventHandler.java | 40ed3b40cd865f6c2b89b28f2800eb6d5dc87668 | [] | no_license | hasone/base-components | 12dfb0ea95ceb66a05f98d0560bbac83fe9e5ceb | deb0485dcd222a5baf8f2dd5fb3e4a476bd3a7de | refs/heads/master | 2020-04-15T20:51:29.934021 | 2018-12-10T09:28:00 | 2018-12-10T09:28:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 624 | java | package com.base.components.common.boot;
import org.springframework.lang.Nullable;
/**
* EventHandler - 事件接口
*
* @author <a href="drakelee1221@gmail.com">LiGeng</a>
* @version v1.0.0
* @date 2018-07-24 12:50
*/
public interface EventHandler<T, R> {
/**
* 事件唯一ID,注册事件时会根据此ID去重
*
* @return - 非空ID
*/
String getId();
/**
* 触发事件
*
* @param t -
*
* @return -
*/
@Nullable
R onEvent(@Nullable T t);
@SuppressWarnings("all")
static boolean check(EventHandler event){
return event != null && event.getId() != null;
}
}
| [
"123456"
] | 123456 |
9ba2402504d843e66ec1c839c51e055d01779f27 | 1b599e3a9adee5dd8af011fdf82972824562a872 | /sa_center/sacenter-parent/sacenter-core/src/main/java/com/ai/sacenter/provision/dbcp/impl/IUpfgsmCapitalImpl.java | dc68376da42944d8f22267f1961a716822cf4a6f | [] | no_license | mtbdc-dy/zhongds01 | e1381d44b0562d576cfdff6b7a5fb7297990a2a4 | ceb5e90d468add16d982f3eb10d5503a7a5c1cea | refs/heads/master | 2020-07-07T10:30:32.012016 | 2019-08-07T08:18:08 | 2019-08-07T08:18:08 | null | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 1,361 | java | package com.ai.sacenter.provision.dbcp.impl;
import com.ai.sacenter.IUpdcContext;
import com.ai.sacenter.SFException;
import com.ai.sacenter.core.valuebean.IOVOrderPentium;
import com.ai.sacenter.core.valuebean.IOVTaskPentium;
import com.ai.sacenter.provision.IUpfwmFactory;
import com.ai.sacenter.provision.valuebean.IOVUpfwmResponse;
import com.ai.sacenter.valuebean.IOVUpdspmLife;
/**
* <p>Title: ucmframe</p>
* <p>Description: 服务任务映射指令资产</p>
* <p>Copyright: Copyright (c) 2015年10月24日</p>
* <p>Company: AI(NanJing)</p>
* @author maohuiyun
* @version 3.0
*/
public class IUpfgsmCapitalImpl extends IUpfwmCapitalImpl {
public IUpfgsmCapitalImpl() {
super();
}
/* (non-Javadoc)
* @see com.ai.sacenter.provision.dbcp.impl.IUpfwmCapitalImpl#finishSFUpdfwm(com.ai.sacenter.core.valuebean.IOVOrderPentium, com.ai.sacenter.core.valuebean.IOVTaskPentium, com.ai.sacenter.valuebean.IOVUpdspmLife, com.ai.sacenter.common.IUpdcContext)
*/
public IOVUpfwmResponse finishSFUpdfwm(IOVOrderPentium fromOrder,
IOVTaskPentium fromTASK,
IOVUpdspmLife fromUpdfwm,
IUpdcContext aContext) throws SFException, Exception {
IOVUpfwmResponse fromASK = null;
try
{
IUpfwmFactory.getIUpfwmSV().finishSFUpfwmSync(fromOrder,
fromTASK,
fromUpdfwm,
aContext);
}
finally{
}
return fromASK;
}
}
| [
"1246696804@qq.com"
] | 1246696804@qq.com |
ecb40c9d994b52dcf07f82d74c2cd6804d329985 | 39e32f672b6ef972ebf36adcb6a0ca899f49a094 | /dcm4chee-jpdbi/trunk/src/java/com/agfa/db/tools/Base64.java | f58a1ac86e328c1a2c47d061332a55b444eb9bda | [
"Apache-2.0"
] | permissive | medicayun/medicayundicom | 6a5812254e1baf88ad3786d1b4cf544821d4ca0b | 47827007f2b3e424a1c47863bcf7d4781e15e814 | refs/heads/master | 2021-01-23T11:20:41.530293 | 2017-06-05T03:11:47 | 2017-06-05T03:11:47 | 93,123,541 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 2,700 | java | // $Id: Base64.java 13140 2010-04-10 17:58:33Z kianusch $
package com.agfa.db.tools;
class Base64 {
private static final String base64encode = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
private static final byte[] base64decode = new byte[128];
static {
for (int i = 0; i < base64decode.length; i++)
base64decode[i] = -1;
for (int i = 0; i < 64; i++)
base64decode[base64encode.charAt(i)] = (byte) i;
}
public static byte[] Decode(String s) {
return Decode(s.toCharArray());
}
public static byte[] Decode(char[] in) {
return Decode(in, 0, in.length);
}
public static byte[] Decode(char[] in, int iOff, int iLen) {
if (iLen % 4 != 0)
throw new IllegalArgumentException("Length of Base64 encoded input string is not a multiple of 4.");
while (iLen > 0 && in[iOff + iLen - 1] == '=')
iLen--;
int oLen = (iLen * 3) / 4;
byte[] out = new byte[oLen];
int ip = iOff;
int iEnd = iOff + iLen;
int op = 0;
while (ip < iEnd) {
int i0 = in[ip++];
int i1 = in[ip++];
int i2 = ip < iEnd ? in[ip++] : 'A';
int i3 = ip < iEnd ? in[ip++] : 'A';
if (i0 > 127 || i1 > 127 || i2 > 127 || i3 > 127)
throw new IllegalArgumentException("Illegal character in Base64 encoded data.");
int b0 = base64decode[i0];
int b1 = base64decode[i1];
int b2 = base64decode[i2];
int b3 = base64decode[i3];
if (b0 < 0 || b1 < 0 || b2 < 0 || b3 < 0)
throw new IllegalArgumentException("Illegal character in Base64 encoded data.");
int o0 = (b0 << 2) | (b1 >>> 4);
int o1 = ((b1 & 0xf) << 4) | (b2 >>> 2);
int o2 = ((b2 & 3) << 6) | b3;
out[op++] = (byte) o0;
if (op < oLen)
out[op++] = (byte) o1;
if (op < oLen)
out[op++] = (byte) o2;
}
return out;
}
public static String Encode(String string) {
String encoded = "";
int paddingCount = (3 - (string.length() % 3)) % 3;
string += "\0\0".substring(0, paddingCount);
for (int i = 0; i < string.length(); i += 3) {
int j = (string.charAt(i) << 16) + (string.charAt(i + 1) << 8) + string.charAt(i + 2);
encoded = encoded + base64encode.charAt((j >> 18) & 0x3f) + base64encode.charAt((j >> 12) & 0x3f)
+ base64encode.charAt((j >> 6) & 0x3f) + base64encode.charAt(j & 0x3f);
}
return encoded.substring(0, encoded.length() - paddingCount) + "==".substring(0, paddingCount);
}
} | [
"liliang_lz@icloud.com"
] | liliang_lz@icloud.com |
3b5bfd7e0970910792de159b28d1b095c94f4408 | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XRENDERING-418-3-9-MOEAD-WeightedSum:TestLen:CallDiversity/org/xwiki/rendering/internal/wiki/XWikiWikiModel_ESTest_scaffolding.java | f53cc5f99abc6cb3869742836e5f1e50603d5a3b | [] | 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 | 452 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Wed Apr 08 03:40:22 UTC 2020
*/
package org.xwiki.rendering.internal.wiki;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class XWikiWikiModel_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
9f61c9d86358462cad83ed42a80a8f53328ab148 | 4f4f84152b04246be5c323d20083ea3d00319ffc | /app/Global.java | b8a5c4fa24baa20ff8660de9a34b4b48b8c29726 | [
"Apache-2.0"
] | permissive | GeorgeIwu/breast-cancer-prognosis | 0d2f1d63b02c23e9afec1176d4bfe6e3e4feab58 | 98ef64dbe049bc2866386a8f8eebdff473ef9f9c | refs/heads/master | 2021-08-11T05:01:49.585167 | 2017-11-13T06:16:30 | 2017-11-13T06:16:30 | 110,506,755 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 601 | java | //import org.quartz.*;
//import org.quartz.impl.StdSchedulerFactory;
import org.quartz.*;
import org.quartz.impl.StdSchedulerFactory;
import play.GlobalSettings;
import play.Logger;
/**
*/
public class Global extends GlobalSettings {
@Override
public void onStart(play.Application application) {
super.onStart(application);
String string = "Terminal";
String without = "without";
}
@Override
public void onStop(play.Application app) {
super.onStop(app);
Logger.info("ApplicationController shutdown...");
}
} | [
"c.georgeiwu@gmail.com"
] | c.georgeiwu@gmail.com |
3f28eaec297c4a39af6ee290737fb98f70264cb2 | 30bef3a00426c700012cea8e21163c65d3b6e887 | /BootSpringBatchApp4-CSVToDB/src/main/java/com/nt/config/BatchConfig.java | 6b2386a82dab73409bf6c0be6ef67a076b12777b | [] | no_license | nerdseeker365/NTSP610 | 00644252094013fd28b85bbbfcd31b102ba69fac | 30d17d59883360e061653c8ff6b285f692cd7fb7 | refs/heads/master | 2022-04-05T05:13:18.688551 | 2019-10-27T17:29:52 | 2019-10-27T17:29:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,248 | java | package com.nt.config;
import javax.sql.DataSource;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.Step;
import org.springframework.batch.core.configuration.annotation.EnableBatchProcessing;
import org.springframework.batch.core.configuration.annotation.JobBuilderFactory;
import org.springframework.batch.core.configuration.annotation.StepBuilderFactory;
import org.springframework.batch.core.launch.support.RunIdIncrementer;
import org.springframework.batch.item.database.BeanPropertyItemSqlParameterSourceProvider;
import org.springframework.batch.item.database.JdbcBatchItemWriter;
import org.springframework.batch.item.file.FlatFileItemReader;
import org.springframework.batch.item.file.mapping.BeanWrapperFieldSetMapper;
import org.springframework.batch.item.file.mapping.DefaultLineMapper;
import org.springframework.batch.item.file.transform.DelimitedLineTokenizer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.FileSystemResource;
import com.nt.model.IExamResult;
import com.nt.model.OExamResult;
import com.nt.processor.ExamResultProcessor;
@Configuration
@ComponentScan(basePackages="com.nt.processor")
@EnableBatchProcessing
public class BatchConfig {
@Autowired
private DataSource ds;
@Autowired
private ExamResultProcessor processor;
@Autowired
private JobBuilderFactory jobFactory;
@Autowired
private StepBuilderFactory stepFactory;
//ItemReader
@Bean
public FlatFileItemReader<IExamResult> reader() {
FlatFileItemReader<IExamResult> reader;
reader= new FlatFileItemReader<>();
reader.setResource(new FileSystemResource("csv/superBrains.csv"));
reader.setLineMapper(new DefaultLineMapper<IExamResult>() {{
setLineTokenizer(new DelimitedLineTokenizer() {{
setNames(new String[]{"id","dob","percentage","semester"});
}});
setFieldSetMapper(new BeanWrapperFieldSetMapper<IExamResult>() {{
setTargetType(IExamResult.class);
}});
}});
return reader;
}//reader()
//Item Writer
@Bean
public JdbcBatchItemWriter<OExamResult> writer() {
JdbcBatchItemWriter<OExamResult> writer =null;
writer= new JdbcBatchItemWriter();
writer.setDataSource(ds);
writer.setSql("INSERT INTO EXAM_RESULT1(ID,DOB,PERCENTAGE,SEMESTER) VALUES (:id,:dob,:percentage,:semester)");
writer.setItemSqlParameterSourceProvider(
new BeanPropertyItemSqlParameterSourceProvider<OExamResult>());
return writer;
}//writer()
//create Step
@Bean(name="step1")
public Step createStep() {
return stepFactory.get("step1").<IExamResult,OExamResult>chunk(1).reader(reader()).processor(processor).writer(writer()).build();
}
//create JOB
@Bean("job1")
public Job createJob() {
return jobFactory.get("job1").incrementer(new RunIdIncrementer())
.flow(createStep()).end().build();
}
}
| [
"admin@DESKTOP-8KUS3QR"
] | admin@DESKTOP-8KUS3QR |
2364b932f4d5929c6f73ab7755c62e1d4a390c2b | 23201229e306531c1a2d4a95dc3140f5fa3a04fa | /Java-Stack/Android/app/src/main/java/com/example/smarthomeapp/model/SheSwitch.java | 84b4f275d394a55dcfc4ac588a4a3d0681189e56 | [] | no_license | Olikelys/SmartHomeProject | c86c9d4b453bff72ad4d73a04c36c510cc8fac8a | bfc5d763a69e45f9fa5264f25ecb3239b914412b | refs/heads/master | 2022-02-14T00:14:01.170182 | 2018-07-31T04:24:52 | 2018-07-31T04:24:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 890 | java | package com.example.smarthomeapp.model;
import java.util.HashSet;
import java.util.Set;
/**
*/
public class SheSwitch implements java.io.Serializable {
// Fields
private Integer sheSwitchId;
private Set<SheSwitchStatus> sheSwitchStatuses = new HashSet<SheSwitchStatus>(
0);
// Constructors
/** default constructor */
public SheSwitch() {
}
/** full constructor */
public SheSwitch(Set<SheSwitchStatus> sheSwitchStatuses) {
this.sheSwitchStatuses = sheSwitchStatuses;
}
// Property accessors
public Integer getSheSwitchId() {
return this.sheSwitchId;
}
public void setSheSwitchId(Integer sheSwitchId) {
this.sheSwitchId = sheSwitchId;
}
public Set<SheSwitchStatus> getSheSwitchStatuses() {
return this.sheSwitchStatuses;
}
public void setSheSwitchStatuses(Set<SheSwitchStatus> sheSwitchStatuses) {
this.sheSwitchStatuses = sheSwitchStatuses;
}
}
| [
"191836400@qq.com"
] | 191836400@qq.com |
9793bfb1d9b7639f164c301ac1bf6eaa218fce58 | 421f0a75a6b62c5af62f89595be61f406328113b | /generated_tests/no_seeding/15_beanbin-net.sourceforge.beanbin.reflect.resolve.GetImplementationsFromDir-1.0-8/net/sourceforge/beanbin/reflect/resolve/GetImplementationsFromDir_ESTest_scaffolding.java | 8041fcd198b3d234c0c346c140526231bf17311d | [] | no_license | tigerqiu712/evosuite-model-seeding-empirical-evaluation | c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6 | 11a920b8213d9855082d3946233731c843baf7bc | refs/heads/master | 2020-12-23T21:04:12.152289 | 2019-10-30T08:02:29 | 2019-10-30T08:02:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 571 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Mon Oct 28 21:48:31 GMT 2019
*/
package net.sourceforge.beanbin.reflect.resolve;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class GetImplementationsFromDir_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
| [
"pderakhshanfar@bsr01.win.tue.nl"
] | pderakhshanfar@bsr01.win.tue.nl |
eb53b873aaa98b399e9461b69c58c979de6996e2 | 591184fe8b21134c30b47fa86d5a275edd3a6208 | /openejb2/modules/openejb-core/src/main/java/org/openejb/config/sys/ProviderTypes.java | e9d5e6b8069376d724acd07ca2edcd1e91fdd1ca | [] | no_license | codehaus/openejb | 41649552c6976bf7d2e1c2fe4bb8a3c2b82f4dcb | c4cd8d75133345a23d5a13b9dda9cb4b43efc251 | refs/heads/master | 2023-09-01T00:17:38.431680 | 2006-09-14T07:14:22 | 2006-09-14T07:14:22 | 36,228,436 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 589 | java | /*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 0.9.5.3</a>, using an XML
* Schema.
* $Id$
*/
package org.openejb.config.sys;
//---------------------------------/
//- Imported classes and packages -/
//---------------------------------/
/**
* Class ProviderTypes.
*
* @version $Revision$ $Date$
*/
public class ProviderTypes implements java.io.Serializable {
//----------------/
//- Constructors -/
//----------------/
public ProviderTypes() {
super();
} //-- org.openejb.config.sys.ProviderTypes()
}
| [
"dain@2b0c1533-c60b-0410-b8bd-89f67432e5c6"
] | dain@2b0c1533-c60b-0410-b8bd-89f67432e5c6 |
50b47476cfff74a6a66467b95e742fa1640dbf22 | 5ed0ce6a5bf847ab1bcc99cb9b005e5bd1334067 | /src/org/codehaus/jackson/map/ser/StdKeySerializer.java | 093555cd0642b2ed88391c669e5d2b753d395ce1 | [] | no_license | nikitakoselev/Alpha2Sdk | 10b0b83cba67d19d49191caa73e67c9f899664ad | ed2efdb5db0ea3a9271c9ebd351bf789b6ba0d37 | refs/heads/master | 2023-04-10T22:19:30.954805 | 2021-04-20T20:59:34 | 2021-04-20T20:59:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 962 | java | package org.codehaus.jackson.map.ser;
import java.io.IOException;
import java.lang.reflect.Type;
import org.codehaus.jackson.JsonGenerationException;
import org.codehaus.jackson.JsonGenerator;
import org.codehaus.jackson.JsonNode;
import org.codehaus.jackson.map.JsonMappingException;
import org.codehaus.jackson.map.SerializerProvider;
public final class StdKeySerializer extends SerializerBase<Object> {
static final StdKeySerializer instace = new StdKeySerializer();
public StdKeySerializer() {
super(Object.class);
}
public void serialize(Object value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonGenerationException {
String keyStr = value.getClass() == String.class ? (String)value : value.toString();
jgen.writeFieldName(keyStr);
}
public JsonNode getSchema(SerializerProvider provider, Type typeHint) throws JsonMappingException {
return this.createSchemaNode("string");
}
}
| [
"dave@davesnowdon.com"
] | dave@davesnowdon.com |
365b224e92dce5d0a2f316f5ae20c0ca302e0478 | 5345259f82a8ec70f846b1d2ac4774c64328473f | /crnk-gen/crnk-gen-typescript/src/main/java/io/crnk/gen/typescript/model/TSEnumType.java | f866162405b7b9392ff11c7c8b7c3d68043b9d19 | [
"Apache-2.0"
] | permissive | crnk-project/crnk-framework | 3da60c2f99b97a0a70eb85217d06a49c10a21fe9 | 4e4dd8970d2bc1bb63970093e2049689d6189f30 | refs/heads/master | 2023-01-21T18:18:36.466294 | 2022-09-06T12:01:49 | 2022-10-06T04:39:08 | 91,683,656 | 300 | 199 | Apache-2.0 | 2023-01-12T08:23:38 | 2017-05-18T11:06:31 | Java | UTF-8 | Java | false | false | 543 | java | package io.crnk.gen.typescript.model;
import java.util.ArrayList;
import java.util.List;
public class TSEnumType extends TSTypeBase implements TSExportedElement {
private List<TSEnumLiteral> literals = new ArrayList<>();
private boolean exported;
@Override
public boolean isExported() {
return exported;
}
public void setExported(boolean exported) {
this.exported = exported;
}
public List<TSEnumLiteral> getLiterals() {
return literals;
}
@Override
public void accept(TSVisitor visitor) {
visitor.visit(this);
}
}
| [
"remo.meier@adnovum.ch"
] | remo.meier@adnovum.ch |
586c398eda8a007f4f1e8c34ed2b299b5d98bab9 | 94ab5579518876367c41fd0cc5016a65c447e52b | /src/test/java/com/cdi/model/oa/filter/SalesOrderOpenFilter.java | 5da41f0a94f1f692d31e39cb74e10a271730433e | [
"Apache-2.0"
] | permissive | ViaOA/oa-core | 31688eb10f304944054fa9b7372e95da927d2123 | a30ce92c6eb1d9557cd1145353717043b4cd0e23 | refs/heads/master | 2023-08-17T10:27:38.649812 | 2022-12-26T21:45:22 | 2022-12-26T21:45:22 | 180,035,642 | 0 | 0 | Apache-2.0 | 2022-12-25T18:39:54 | 2019-04-07T23:21:08 | Java | UTF-8 | Java | false | false | 3,605 | java | // Generated by OABuilder
package com.cdi.model.oa.filter;
import java.util.logging.*;
import com.cdi.model.oa.*;
import com.cdi.model.oa.propertypath.*;
import com.viaoa.annotation.*;
import com.viaoa.object.*;
import com.viaoa.hub.*;
import com.viaoa.util.*;
import java.util.*;
import com.cdi.model.search.*;
import com.cdi.model.oa.search.*;
import com.cdi.delegate.ModelDelegate;
@OAClass(useDataSource=false, localOnly=true)
@OAClassFilter(name = "Open", displayName = "Open", hasInputParams = false)
public class SalesOrderOpenFilter extends OAObject implements CustomHubFilter<SalesOrder> {
private static final long serialVersionUID = 1L;
private static Logger LOG = Logger.getLogger(SalesOrderOpenFilter.class.getName());
public static final String PPCode = ":Open()";
private Hub<SalesOrder> hubMaster;
private Hub<SalesOrder> hub;
private HubFilter<SalesOrder> hubFilter;
private OAObjectCacheFilter<SalesOrder> cacheFilter;
private boolean bUseObjectCache;
public SalesOrderOpenFilter() {
this(null, null, false);
}
public SalesOrderOpenFilter(Hub<SalesOrder> hub) {
this(null, hub, true);
}
public SalesOrderOpenFilter(Hub<SalesOrder> hubMaster, Hub<SalesOrder> hub) {
this(hubMaster, hub, false);
}
public SalesOrderOpenFilter(Hub<SalesOrder> hubMaster, Hub<SalesOrder> hubFiltered, boolean bUseObjectCache) {
this.hubMaster = hubMaster;
this.hub = hubFiltered;
this.bUseObjectCache = bUseObjectCache;
if (hubMaster != null) getHubFilter();
if (bUseObjectCache) getObjectCacheFilter();
}
public void reset() {
}
public boolean isDataEntered() {
return false;
}
public void refresh() {
if (hubFilter != null) getHubFilter().refresh();
if (cacheFilter != null) getObjectCacheFilter().refresh();
}
@Override
public HubFilter<SalesOrder> getHubFilter() {
if (hubFilter != null) return hubFilter;
if (hubMaster == null) return null;
hubFilter = new HubFilter<SalesOrder>(hubMaster, hub) {
@Override
public boolean isUsed(SalesOrder salesOrder) {
return SalesOrderOpenFilter.this.isUsed(salesOrder);
}
};
hubFilter.addDependentProperty(SalesOrderPP.dateClosed(), false);
hubFilter.addDependentProperty(SalesOrderPP.date(), false);
hubFilter.refresh();
return hubFilter;
}
public OAObjectCacheFilter<SalesOrder> getObjectCacheFilter() {
if (cacheFilter != null) return cacheFilter;
if (!bUseObjectCache) return null;
cacheFilter = new OAObjectCacheFilter<SalesOrder>(hub) {
@Override
public boolean isUsed(SalesOrder salesOrder) {
return SalesOrderOpenFilter.this.isUsed(salesOrder);
}
@Override
protected void reselect() {
SalesOrderOpenFilter.this.reselect();
}
};
cacheFilter.addDependentProperty(SalesOrderPP.dateClosed(), false);
cacheFilter.addDependentProperty(SalesOrderPP.date(), false);
cacheFilter.refresh();
return cacheFilter;
}
public void reselect() {
// can be overwritten to query datasource
}
// ==================
// this method has custom code that will need to be put into the OABuilder filter
@Override
public boolean isUsed(SalesOrder salesOrder) {
OADate dateClosed = salesOrder.getDateClosed();
return (dateClosed == null);
}
}
| [
"vince@viaoa.com"
] | vince@viaoa.com |
ab1e134006afa6054a5de4eb0a0c5d3db2297e07 | c33cd3d925a768820ccf393e675c2977e860aa55 | /src/test/java/com/asofdate/dispatch/DMTests.java | 7f56e5dad6a112c911205ce0364dec55b74ad16d | [
"MIT"
] | permissive | forging2012/batch-scheduler | 1d7f895c746ae26b0ee4f5f719b8595a2ec19e10 | 8dc1edf9b7da9f27e46a57667c48ed62ea050d2e | refs/heads/master | 2020-12-03T00:19:07.591666 | 2017-06-29T16:05:41 | 2017-06-29T16:05:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,191 | java | package com.asofdate.dispatch;
import com.asofdate.dispatch.dao.*;
import com.asofdate.dispatch.entity.*;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import java.util.List;
/**
* Created by hzwy23 on 2017/5/24.
*/
@RunWith(SpringRunner.class)
@SpringBootTest
public class DMTests {
@Autowired
public TaskDefineDao taskDefineDao;
@Autowired
public ArgumentDefineDao argumentDefineDao;
@Autowired
public BatchArgumentDao batchArgumentDao;
@Autowired
public BatchGroupDao batchGroupDao;
@Autowired
public GroupDefineDao groupDefineDao;
@Autowired
public BatchDefineDao batchDefineDao;
@Autowired
public GroupTaskDao groupTaskDao;
@Autowired
public TaskArgumentDao taskArgumentDao;
@Test
public void testTaskDefineDao(){
List<TaskDefineEntity> list = taskDefineDao.findAll("mas");
for (TaskDefineEntity m: list){
System.out.print("code number is :" + m.getCodeNumber());
System.out.print("code number is :" + m.getCreateUser());
System.out.print("code number is :" + m.getCreateDate());
System.out.print("code number is :" + m.getTaskId());
System.out.print("code number is :" + m.getTaskDesc());
System.out.print("code number is :" + m.getTaskType());
System.out.print("code number is :" + m.getTaskTypeDesc());
System.out.println("");
}
}
@Test
public void testArgumentDefineDao(){
List<ArgumentDefineEntity> list = argumentDefineDao.findAll("mas");
for (ArgumentDefineEntity m:list){
System.out.println("argument id is :" + m.getArgId());
}
}
@Test
public void testBatchGroupDao(){
List<BatchGroupEntity> list = batchGroupDao.findAll("mas");
for (BatchGroupEntity m:list){
System.out.println("Batch is :" + m.getBatchId()+", group id is :" + m.getGroupId());
}
}
@Test
public void testGroupDefineDao(){
List<GroupDefineEntity> list = groupDefineDao.findAll("mas");
for (GroupDefineEntity m:list){
System.out.println("Group id is: "+m.getGroupId());
}
}
@Test
public void testGroupTaskDao(){
List<GroupTaskEntity> list = groupTaskDao.findAll("mas");
for (GroupTaskEntity m:list){
System.out.println("group id is:" + m.getGroupId()+",task id is:" + m.getTaskId());
}
}
@Test
public void testTaskArgumentDao(){
List<TaskArgumentEntity> list = taskArgumentDao.findAll("mas");
for (TaskArgumentEntity m: list){
System.out.println("task id is :" + m.getTaskId()+",argument id is:"+m.getArgId());
}
}
@Test
public void testBatchDefineDao(){
List<BatchDefineEntity> list = batchDefineDao.findAll("mas");
for (BatchDefineEntity m:list){
System.out.println("batch id is:" + m.getBatchDesc());
}
}
}
| [
"hzwy23@163.com"
] | hzwy23@163.com |
fc2b5d46687f448fc2d96f56ea265ff1215fc40e | e1e5bd6b116e71a60040ec1e1642289217d527b0 | /H5/Fandc_Ro/Fandc_Ro_2018_11_04/java/l2f/gameserver/model/entity/events/fightclubmanager/FightClubLastPlayerStats.java | d1c0140cbc733a75138a599a0097146533bdbb7b | [] | no_license | serk123/L2jOpenSource | 6d6e1988a421763a9467bba0e4ac1fe3796b34b3 | 603e784e5f58f7fd07b01f6282218e8492f7090b | refs/heads/master | 2023-03-18T01:51:23.867273 | 2020-04-23T10:44:41 | 2020-04-23T10:44:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,311 | java | package l2f.gameserver.model.entity.events.fightclubmanager;
import l2f.gameserver.model.Player;
import l2f.gameserver.utils.Util;
public class FightClubLastPlayerStats
{
private final String _playerNickName;
private final String _className;
private final String _clanName;
private final String _allyName;
private final String _typeName;
private int _score;
public FightClubLastPlayerStats(Player player, String typeName, int score)
{
_playerNickName = player.getName();
_clanName = player.getClan() != null ? player.getClan().getName() : "<br>";
_allyName = player.getAlliance() != null ? player.getAlliance().getAllyName() : "<br>";
_className = Util.getFullClassName(player.getClassId());
_typeName = typeName;
_score = score;
}
public boolean isMyStat(Player player)
{
return _playerNickName.equals(player.getName());
}
public String getPlayerName()
{
return _playerNickName;
}
public String getClanName()
{
return _clanName;
}
public String getAllyName()
{
return _allyName;
}
public String getClassName()
{
return _className;
}
public String getTypeName()
{
return _typeName;
}
public int getScore()
{
return _score;
}
public void setScore(int i)
{
_score = i;
}
}
| [
"64197706+L2jOpenSource@users.noreply.github.com"
] | 64197706+L2jOpenSource@users.noreply.github.com |
3bb92772c63b1b36ce91a5b79b9ab6bde46427c2 | 81dbe3c24de5e26af8c617a18121f150d760b8e2 | /src/main/java/org/reactome/web/elv/client/details/tabs/analysis/view/widgets/notfound/columns/AbstractColumn.java | 4bf2c33cc305110ef2c57d35ff3bd5e0822b9c26 | [] | no_license | PlantReactome/PathwayBrowser | 02f07d807de317f00e1c0b2842656ea7d47c53e7 | 2c2ff233c53df9f57930dfe098579509365626f0 | refs/heads/master | 2020-04-05T22:43:29.961843 | 2016-12-01T02:15:57 | 2016-12-01T02:15:57 | 60,292,111 | 0 | 0 | null | 2016-06-02T19:37:18 | 2016-06-02T19:37:18 | null | UTF-8 | Java | false | false | 1,743 | java | package org.reactome.web.elv.client.details.tabs.analysis.view.widgets.notfound.columns;
import com.google.gwt.cell.client.Cell;
import com.google.gwt.cell.client.TextCell;
import com.google.gwt.dom.client.Style;
import com.google.gwt.user.cellview.client.Column;
import com.google.gwt.user.cellview.client.Header;
import org.reactome.web.elv.client.common.analysis.model.IdentifierSummary;
import org.reactome.web.elv.client.common.analysis.model.PathwaySummary;
import org.reactome.web.elv.client.details.tabs.analysis.view.widgets.common.cells.CustomHeader;
/**
* @author Antonio Fabregat <fabregat@ebi.ac.uk>
*/
public abstract class AbstractColumn<T> extends Column<IdentifierSummary, T> {
protected final String COLUMN_NAME_TITLE;
protected final String COLUMN_GROUP;
protected final String EXPLANATION;
protected final Style.TextAlign HEADER_ALIGN;
protected Integer width = 90;
public AbstractColumn(Cell<T> cell, String group, String title, String explanation) {
this(cell, Style.TextAlign.CENTER, group, title, explanation);
}
public AbstractColumn(Cell<T> cell, Style.TextAlign headerAlign, String group, String title, String explanation) {
super(cell);
setDataStoreName(title);
COLUMN_NAME_TITLE = title;
COLUMN_GROUP = group;
HEADER_ALIGN = headerAlign;
EXPLANATION = explanation;
this.setHorizontalAlignment(ALIGN_RIGHT);
}
public Integer getWidth() {
return width;
}
public void setWidth(Integer width) {
this.width = width;
}
public final Header buildHeader(){
return new CustomHeader(new TextCell(), HEADER_ALIGN, COLUMN_GROUP, COLUMN_NAME_TITLE, EXPLANATION);
}
}
| [
"fabregat.antonio@gmail.com"
] | fabregat.antonio@gmail.com |
cc9bccbe5e4b7275a8d7e4e3663bdc6558a5a9fd | 768754287090c335417da829e2c68c7482225c95 | /2419/2146912_WA.java | 286124117e122b4bdb150d747292d56f5efb3a21 | [] | no_license | zhangfaen/pku-online-judge | f6a276eaac28a39b00133133ccaf3402f5334184 | e770ce41debe1cf832f4859528c7c751509ab97c | refs/heads/master | 2021-04-23T16:52:00.365894 | 2020-03-25T09:59:52 | 2020-03-25T09:59:52 | 249,941,140 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,065 | java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
public class Main
{
static BufferedReader cin;
public static void main(String[] args) throws IOException
{
cin = new BufferedReader(new InputStreamReader(System.in));
String s = cin.readLine();
String[] sa = s.split(" ");
int p = Integer.parseInt(sa[0]);
int t = Integer.parseInt(sa[1]);
Map<Integer, Set> mis = new HashMap<Integer, Set>();
while (true)
{
s = cin.readLine();
if(s==null)break;
sa = s.split(" ");
int i = Integer.parseInt(sa[0]);
int j = Integer.parseInt(sa[1]);
if (mis.containsKey(i) == false)
{
Set<Integer> si = new HashSet<Integer>();
si.add(j);
mis.put(i, si);
}
else
{
mis.get(i).add(j);
}
}
Set<Set> ss=new HashSet<Set>();
for(int key:mis.keySet())
ss.add(mis.get(key));
System.out.println(ss.size());
}
}
| [
"zhangfaen@ainnovation.com"
] | zhangfaen@ainnovation.com |
cc5b848095f778fbbac12fd86c1ae02d32608a26 | c83ae1e7ef232938166f7b54e69f087949745e0d | /sources/kotlin/concurrent/TimersKt$timerTask$1.java | 219fe09b3d5c5a2f62171013e0e7fbdf8c093c80 | [] | no_license | FL0RlAN/android-tchap-1.0.35 | 7a149a08a88eaed31b0f0bfa133af704b61a7187 | e405f61db55b3bfef25cf16103ba08fc2190fa34 | refs/heads/master | 2022-05-09T04:35:13.527984 | 2020-04-26T14:41:37 | 2020-04-26T14:41:37 | 259,030,577 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 756 | java | package kotlin.concurrent;
import java.util.TimerTask;
import kotlin.Metadata;
import kotlin.jvm.functions.Function1;
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u0011\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000*\u0001\u0000\b\n\u0018\u00002\u00020\u0001J\b\u0010\u0002\u001a\u00020\u0003H\u0016¨\u0006\u0004"}, d2 = {"kotlin/concurrent/TimersKt$timerTask$1", "Ljava/util/TimerTask;", "run", "", "kotlin-stdlib"}, k = 1, mv = {1, 1, 15})
/* compiled from: Timer.kt */
public final class TimersKt$timerTask$1 extends TimerTask {
final /* synthetic */ Function1 $action;
public TimersKt$timerTask$1(Function1 function1) {
this.$action = function1;
}
public void run() {
this.$action.invoke(this);
}
}
| [
"M0N5T3R159753@nym.hush.com"
] | M0N5T3R159753@nym.hush.com |
705711b4a6e2e463c501237e3ea643bc89e572e3 | 4089d276380f9098fb115f2a6b1d51455b02be37 | /src/test/java/com/atlassian/jira/rest/client/v2/model/AutoCompleteSuggestionsTest.java | 0f19e7737c67ceb6639a71d46694a71cb66b1cce | [] | no_license | amondnet/jira-client-v2 | fe07367adff5ecc947f2ecba51fa6405b6628819 | 5fa44a3b935f22a71b419ee5e4f6a4c5405ecc82 | refs/heads/main | 2023-04-02T13:20:02.303411 | 2021-04-16T12:48:20 | 2021-04-16T12:48:20 | 358,596,693 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,435 | java | /*
* The Jira Cloud platform REST API
* Jira Cloud platform REST API documentation
*
* The version of the OpenAPI document: 1001.0.0-SNAPSHOT
* Contact: ecosystem@atlassian.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.atlassian.jira.rest.client.v2.model;
import com.atlassian.jira.rest.client.v2.model.AutoCompleteSuggestion;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
/**
* Model tests for AutoCompleteSuggestions
*/
public class AutoCompleteSuggestionsTest {
private final AutoCompleteSuggestions model = new AutoCompleteSuggestions();
/**
* Model tests for AutoCompleteSuggestions
*/
@Test
public void testAutoCompleteSuggestions() {
// TODO: test AutoCompleteSuggestions
}
/**
* Test the property 'results'
*/
@Test
public void resultsTest() {
// TODO: test results
}
}
| [
"amond@amond.net"
] | amond@amond.net |
4c80230efc5b80ce1c8b6b0bdacadf93f54b1628 | e27942cce249f7d62b7dc8c9b86cd40391c1ddd4 | /modules/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201702/cm/PlacesOfInterestOperandCategory.java | 8e870ee6bccf79959f5d9b8275bfa46aec48b94d | [
"Apache-2.0"
] | permissive | mo4ss/googleads-java-lib | b4b6178747d25d16ae6aa0c80d80ee18a2dfe01a | efaa9c3bd8a46a3ed4b00963dc9760c6dd8bd641 | refs/heads/master | 2022-12-05T00:30:56.740813 | 2022-11-16T10:47:15 | 2022-11-16T10:47:15 | 108,132,394 | 0 | 0 | Apache-2.0 | 2022-11-16T10:47:16 | 2017-10-24T13:41:43 | Java | UTF-8 | Java | false | false | 1,854 | java | // Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.api.ads.adwords.jaxws.v201702.cm;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for PlacesOfInterestOperand.Category.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="PlacesOfInterestOperand.Category">
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="AIRPORT"/>
* <enumeration value="DOWNTOWN"/>
* <enumeration value="UNIVERSITY"/>
* <enumeration value="UNKNOWN"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "PlacesOfInterestOperand.Category")
@XmlEnum
public enum PlacesOfInterestOperandCategory {
AIRPORT,
DOWNTOWN,
UNIVERSITY,
/**
*
* <span class="constraint Rejected">Used for return value only. An enumeration could not be processed, typically due to incompatibility with your WSDL version.</span>
*
*
*/
UNKNOWN;
public String value() {
return name();
}
public static PlacesOfInterestOperandCategory fromValue(String v) {
return valueOf(v);
}
}
| [
"jradcliff@users.noreply.github.com"
] | jradcliff@users.noreply.github.com |
4d2c6c5e171a94216308a4a99076ee8bc9fd5de8 | 301e08053c0af40e6aa58b9228f71b217c113a70 | /src/main/java/org/bian/dto/BQServiceFeesRetrieveOutputModelServiceFeesInstanceRecord.java | 7da340d2cf14459359ee40ddd28b57ecd5f6b771 | [
"Apache-2.0"
] | permissive | bianapis/sd-loan-v2 | a12d09dca249375745c082d17dbdf562b42eddb4 | c18701b5813986a3a45813e470f21afc4da43c12 | refs/heads/master | 2020-07-24T04:20:58.950655 | 2019-09-12T06:09:44 | 2019-09-12T06:09:44 | 207,799,814 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,734 | java | package org.bian.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.bian.dto.BQServiceFeesRetrieveOutputModelServiceFeesInstanceRecordFeeApplicationRecord;
import org.bian.dto.BQServiceFeesRetrieveOutputModelServiceFeesInstanceRecordFeeConfigurationProfile;
import javax.validation.Valid;
/**
* BQServiceFeesRetrieveOutputModelServiceFeesInstanceRecord
*/
public class BQServiceFeesRetrieveOutputModelServiceFeesInstanceRecord {
private BQServiceFeesRetrieveOutputModelServiceFeesInstanceRecordFeeConfigurationProfile feeConfigurationProfile = null;
private BQServiceFeesRetrieveOutputModelServiceFeesInstanceRecordFeeApplicationRecord feeApplicationRecord = null;
/**
* Get feeConfigurationProfile
* @return feeConfigurationProfile
**/
public BQServiceFeesRetrieveOutputModelServiceFeesInstanceRecordFeeConfigurationProfile getFeeConfigurationProfile() {
return feeConfigurationProfile;
}
public void setFeeConfigurationProfile(BQServiceFeesRetrieveOutputModelServiceFeesInstanceRecordFeeConfigurationProfile feeConfigurationProfile) {
this.feeConfigurationProfile = feeConfigurationProfile;
}
/**
* Get feeApplicationRecord
* @return feeApplicationRecord
**/
public BQServiceFeesRetrieveOutputModelServiceFeesInstanceRecordFeeApplicationRecord getFeeApplicationRecord() {
return feeApplicationRecord;
}
public void setFeeApplicationRecord(BQServiceFeesRetrieveOutputModelServiceFeesInstanceRecordFeeApplicationRecord feeApplicationRecord) {
this.feeApplicationRecord = feeApplicationRecord;
}
}
| [
"team1@bian.org"
] | team1@bian.org |
c052325d1272347520473071b13f24620064d79c | cdf9de3cd224ad789f8e132122bc892168ea1e04 | /23.Java Advanced Retake Exam - 22 August 2016/src/_01_Second_Nature.java | b98d0faf365dc7779f9ab193e1f6eb4f08609b61 | [
"MIT"
] | permissive | Tuscann/JAVA---Advanced---2017 | efad8a2338c260441cc9135a51739e6d0cd8f36c | 343375db5712f3ed41fadb65ed9325c7331c5a05 | refs/heads/master | 2021-03-24T10:34:42.876359 | 2017-10-23T20:35:05 | 2017-10-23T20:35:05 | 102,656,003 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,170 | java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayDeque;
import java.util.Deque;
public class _01_Second_Nature {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
Deque<Integer> flowers = new ArrayDeque<>();
Deque<Integer> buckets = new ArrayDeque<>();
Deque<Integer> secondNatureFlowers = new ArrayDeque<>();
String[] flowersArgs = reader.readLine().split(" ");
String[] bucketsArgs = reader.readLine().split(" ");
for (String flower : flowersArgs) {
flowers.add(Integer.parseInt(flower));
}
for (String bucket : bucketsArgs) {
buckets.push(Integer.parseInt(bucket));
}
while (!flowers.isEmpty() && !buckets.isEmpty()) {
int flower = flowers.poll();
int bucket = buckets.pop();
int difference = bucket - flower;
if (difference == 0) {
secondNatureFlowers.add(flower);
} else if (difference > 0) {
if (!buckets.isEmpty()) {
int nextBucket = buckets.poll();
nextBucket += difference;
buckets.push(nextBucket);
} else {
buckets.push(difference);
}
} else if (difference < 0) {
flower = Math.abs(difference);
flowers.push(flower);
}
}
if (flowers.isEmpty()) {
while (!buckets.isEmpty()) {
System.out.print(buckets.pop() + " ");
}
} else if (buckets.isEmpty()) {
while (!flowers.isEmpty()) {
System.out.print(flowers.poll() + " ");
}
}
System.out.println();
if (secondNatureFlowers.isEmpty()) {
System.out.println("None");
} else {
while (!secondNatureFlowers.isEmpty()) {
System.out.print(secondNatureFlowers.poll() + " ");
}
}
}
}
| [
"fbinnzhivko@gmail.com"
] | fbinnzhivko@gmail.com |
c00a243a3ab076c41cab20fd4b58617fd1cb2adc | c1d20e33891deb190d096f5a5ea0cf426b257069 | /newserver1/newserver1/src/com/mayhem/rs2/content/interfaces/impl/SkillingInterface.java | c9f170b8d5ce39f2f1464dafa6c63795168f4766 | [] | no_license | premierscape/NS1 | 72a5d3a3f2d5c09886b1b26f166a6c2b27ac695d | 0fb88b155b2abbb98fe3d88bb287012bbcbb8bf9 | refs/heads/master | 2020-04-07T00:46:08.175508 | 2018-11-16T20:06:10 | 2018-11-16T20:06:10 | 157,917,810 | 0 | 0 | null | 2018-11-16T20:44:52 | 2018-11-16T20:25:56 | Java | UTF-8 | Java | false | false | 694 | java | package com.mayhem.rs2.content.interfaces.impl;
import com.mayhem.rs2.content.interfaces.InterfaceHandler;
import com.mayhem.rs2.entity.player.Player;
/**
* Handles the skilling teleport interface
* @author Daniel
*
*/
public class SkillingInterface extends InterfaceHandler {
public SkillingInterface(Player player) {
super(player);
}
private final String[] text = {
"Wilderness Resource",
"Thieving",
"Crafting",
"Agility",
"Mining",
"Smithing",
"Fishing",
"Woodcutting",
"Farming",
"Hunter",
"",
"",
"",
};
@Override
protected String[] text() {
return text;
}
@Override
protected int startingLine() {
return 62051;
}
}
| [
"brandon46142@icloud.com"
] | brandon46142@icloud.com |
bdbaaa321b9cf157aad49807cf299a16e04b6017 | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Chart/3/org/jfree/chart/renderer/category/AreaRenderer_clone_364.java | d70387c9b55d2e407e35c45e5fd3e49cb18ba5ae | [] | 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 | 899 | java |
org jfree chart render categori
categori item render draw area chart render
link categori plot categoryplot shown gener
code area chart demo1 areachartdemo1 java code program includ free chart jfreechart
demo collect
img src imag area render sampl arearenderersampl png
alt area render sampl arearenderersampl png
area render arearender abstract categori item render abstractcategoryitemrender
return independ copi render
clone
clone support except clonenotsupportedexcept happen
object clone clone support except clonenotsupportedexcept
clone
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
7de4f73c7d732b341c2ce85b3a3e37a1bdbaeadd | 4868c30471e67a801dd4d52751a23ef9ed65e48f | /Chapter5TestProject/src/presentation/InsertEmployeeSwing.java | 2ebd6f81a2dc2f630bda6b4f1bfed2963ed50baf | [] | no_license | sabotuer99/JavaTraining | 8a0dfe558d4dbca5d2b540b294ba151ab7fae53b | c0430da81e28047a731f7d440a7857ecdfed5405 | refs/heads/master | 2016-09-07T18:51:07.558830 | 2015-09-22T19:32:16 | 2015-09-22T19:32:16 | 42,882,516 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,232 | java | package presentation;
import java.awt.Color;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextField;
import models.Employee;
import bll.EmployeeBLL;
public class InsertEmployeeSwing extends JFrame implements ActionListener {
JLabel jlabelRowsAffected, jlabelBanana, jlabelMessage, jlabelTitle, jlabelDepartmentCode, jlabelFirstName, jlabelLastName, jlabelEmployeID;
JTextField jtextfieldRowsAffected, jtextfieldTitle, jtextfieldDepartmentCode, jtextfieldFirstName, jtextfieldLastName, jtextfieldEmployeID;
JButton jbuttonSearch;
InsertEmployeeSwing(){
//Provide a title for the window
super("Search Employee By ID Window");
jlabelEmployeID = new JLabel("Employee ID:");
jlabelEmployeID.setBounds(20,90,100,20);
jtextfieldEmployeID = new JTextField(20);
jtextfieldEmployeID.setBounds(130,90,100,20);
jbuttonSearch = new JButton("Insert");
jbuttonSearch.setBounds(130,240,100,20);
jbuttonSearch.addActionListener(this);
jlabelMessage = new JLabel("Insert Employee Into Database");
jlabelMessage.setBounds(30, 20, 450, 30); //(30,80,450,30);
jlabelMessage.setForeground(Color.red);
jlabelMessage.setFont(new Font("Serif", Font.BOLD, 20));
setVisible(true);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setSize(500,500);
jlabelLastName = new JLabel("Last Name:");
jlabelLastName.setBounds(20,120,100,20);
jtextfieldLastName = new JTextField(20);
jtextfieldLastName.setBounds(130,120,200,20);
jlabelFirstName = new JLabel("First Name:");
jlabelFirstName.setBounds(20,150,100,20);
jtextfieldFirstName = new JTextField(20);
jtextfieldFirstName.setBounds(130,150,200,20);
jlabelDepartmentCode = new JLabel("Department:");
jlabelDepartmentCode.setBounds(20,210,100,20);
jtextfieldDepartmentCode = new JTextField(20);
jtextfieldDepartmentCode.setBounds(130,210,100,20);
jlabelTitle = new JLabel("Title:");
jlabelTitle.setBounds(20,180,100,20);
jtextfieldTitle = new JTextField(20);
jtextfieldTitle.setBounds(130,180,200,20);
jlabelRowsAffected = new JLabel("Rows Affected:");
jlabelRowsAffected.setBounds(20,270,100,20);
jtextfieldRowsAffected = new JTextField(20);
jtextfieldRowsAffected.setBounds(130,270,20,20);
// add the image label
jlabelBanana = new JLabel("Banana");
jlabelBanana.setBounds(400, 25, 41, 50);
ImageIcon ii = new ImageIcon(this.getClass().getResource("banana2.gif"));
jlabelBanana.setIcon(ii);
setLayout(null);
add(jlabelEmployeID);
add(jtextfieldEmployeID);
add(jbuttonSearch);
add(jlabelMessage);
add(jlabelLastName);
add(jtextfieldLastName);
add(jlabelFirstName);
add(jtextfieldFirstName);
add(jlabelDepartmentCode);
add(jtextfieldDepartmentCode);
add(jlabelTitle);
add(jtextfieldTitle);
add(jlabelBanana);
add(jlabelRowsAffected);
add(jtextfieldRowsAffected);
jtextfieldRowsAffected.setEditable(false);
validate();
repaint();
}
@Override
public void actionPerformed(ActionEvent e) {
// TODO Auto-generated method stub
EmployeeBLL employeeBLL = new EmployeeBLL();
Employee emp = new Employee();
emp.setEmployeeID(Integer.parseInt(jtextfieldEmployeID.getText()));
emp.setLastName(jtextfieldLastName.getText());
emp.setFirstName(jtextfieldFirstName.getText());
emp.setTitle(jtextfieldTitle.getText());
emp.setDepartmentCode(jtextfieldDepartmentCode.getText());
int rows = employeeBLL.insertNewEmployee(emp);
jtextfieldRowsAffected.setText(Integer.toString(rows));
// Employee emp = employeeBLL.selectEmployeeByID(Integer.parseInt(jtextfieldEmployeID.getText()));
// if(emp != null){
// jtextfieldLastName.setText(emp.getLastName());
// jtextfieldFirstName.setText(emp.getFirstName());
// jtextfieldDepartmentCode.setText(emp.getDepartmentCode());
// jtextfieldTitle.setText(emp.getTitle());
// }
}
public static void main(String[] args){
new InsertEmployeeSwing();
}
}
| [
"sabotuer99@gmail.com"
] | sabotuer99@gmail.com |
5cda36d2dc734252e6a805f7bb8f01d5984abba5 | 4bdc2db9778a62009326a7ed1bed2729c8ff56a9 | /kernel/impl/fabric3-fabric/src/main/java/org/fabric3/fabric/container/interceptor/TransformerInterceptor.java | de9e967cf2173f26bb067c2a83fbc1005de9312f | [] | no_license | aaronanderson/fabric3-core | 2a66038338ac3bb8ba1ae6291f39949cb93412b2 | 44773a3e636fcfdcd6dcd43b7fb5b442310abae5 | refs/heads/master | 2021-01-16T21:56:29.067390 | 2014-01-09T15:44:09 | 2014-01-14T06:26:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,930 | java | /*
* Fabric3
* Copyright (c) 2009-2013 Metaform Systems
*
* Fabric3 is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version, with the
* following exception:
*
* Linking this software statically or dynamically with other
* modules is making a combined work based on this software.
* Thus, the terms and conditions of the GNU General Public
* License cover the whole combination.
*
* As a special exception, the copyright holders of this software
* give you permission to link this software with independent
* modules to produce an executable, regardless of the license
* terms of these independent modules, and to copy and distribute
* the resulting executable under terms of your choice, provided
* that you also meet, for each linked independent module, the
* terms and conditions of the license of that module. An
* independent module is a module which is not derived from or
* based on this software. If you modify this software, you may
* extend this exception to your version of the software, but
* you are not obligated to do so. If you do not wish to do so,
* delete this exception statement from your version.
*
* Fabric3 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the
* GNU General Public License along with Fabric3.
* If not, see <http://www.gnu.org/licenses/>.
*/
package org.fabric3.fabric.container.interceptor;
import org.oasisopen.sca.ServiceRuntimeException;
import org.fabric3.spi.container.invocation.Message;
import org.fabric3.spi.transform.TransformationException;
import org.fabric3.spi.transform.Transformer;
import org.fabric3.spi.container.wire.Interceptor;
/**
* Converts the input parameters of an invocation to a target format and the output parameters from the target format by delegating to underlying
* transformers.
*/
public class TransformerInterceptor implements Interceptor {
private Transformer<Object, Object> inTransformer;
private Transformer<Object, Object> outTransformer;
private ClassLoader inLoader;
private ClassLoader outLoader;
private Interceptor next;
/**
* Constructor.
*
* @param inTransformer the input parameter transformer
* @param outTransformer the output parameter transformer
* @param inLoader the input parameter classloader, i.e. the target service contribution classloader
* @param outLoader the output parameter classloader, i.e. the source component contribution classloader
*/
public TransformerInterceptor(Transformer<Object, Object> inTransformer,
Transformer<Object, Object> outTransformer,
ClassLoader inLoader,
ClassLoader outLoader) {
this.inTransformer = inTransformer;
this.outTransformer = outTransformer;
this.inLoader = inLoader;
this.outLoader = outLoader;
}
public Message invoke(Message msg) {
transformInput(msg);
Message ret = next.invoke(msg);
return transformOutput(ret);
}
private void transformInput(Message msg) {
Object params = msg.getBody();
// TODO handle null types
if (params != null) {
try {
// Operations take 0..n parameters. A single parameter must be unwrapped from the invocation array and passed to a transformer.
// In contrast, multiple parameter operations are passed as an array to the transformer.
if (params.getClass().isArray() && ((Object[]) params).length == 1) {
Object[] paramArray = (Object[]) params;
paramArray[0] = inTransformer.transform(paramArray[0], inLoader);
} else {
// multiple parameters - pass the entire array to transform
Object transformed = inTransformer.transform(params, inLoader);
msg.setBody(transformed);
}
} catch (TransformationException e) {
throw new ServiceRuntimeException(e);
}
}
}
private Message transformOutput(Message ret) {
// FIXME For exception transformation, if it is checked convert as application fault
Object body = ret.getBody();
// TODO handle null types
if (body != null) {
try {
Object transformed = outTransformer.transform(body, outLoader);
if (ret.isFault()) {
ret.setBodyWithFault(transformed);
} else {
ret.setBody(transformed);
}
} catch (ClassCastException e) {
// an unexpected type was returned by the target service or an interceptor later in the chain. This is an error in the extension or
// interceptor and not user code since errors should be trapped and returned in the format expected by the transformer
if (body instanceof Throwable) {
throw new ServiceRuntimeException("Unexpected exception returned", (Throwable) body);
} else {
throw new ServiceRuntimeException("Unexpected type returned: " + body.getClass());
}
} catch (TransformationException e) {
throw new ServiceRuntimeException(e);
}
}
return ret;
}
public void setNext(Interceptor next) {
this.next = next;
}
public Interceptor getNext() {
return next;
}
}
| [
"jim.marino@gmail.com"
] | jim.marino@gmail.com |
630d828b970dbccb4602cec4782842cba0ac6585 | 4e90b1f53de6bd78063ba9c348a1e9792ac5c2cd | /hapi-fhir-structures-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/VaccinationProtocolDoseStatusReasonEnumFactory.java | ee1c7721af675976f18f933be7b22a7049973153 | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | matt-blanchette/hapi-fhir | fd2c096145ed50341b50b48358a53f239f7089ef | 0f835b5e5500e95eb6acc7f327579b37a5adcf4b | refs/heads/master | 2020-12-24T10:24:36.455253 | 2016-01-20T16:50:49 | 2016-01-20T16:50:49 | 50,038,488 | 0 | 0 | null | 2016-01-20T15:18:50 | 2016-01-20T15:18:49 | null | UTF-8 | Java | false | false | 3,353 | java | package org.hl7.fhir.dstu21.model.valuesets;
/*
Copyright (c) 2011+, HL7, Inc.
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 HL7 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 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.
*/
// Generated on Mon, Dec 21, 2015 20:18-0500 for FHIR v1.2.0
import org.hl7.fhir.dstu21.model.EnumFactory;
public class VaccinationProtocolDoseStatusReasonEnumFactory implements EnumFactory<VaccinationProtocolDoseStatusReason> {
public VaccinationProtocolDoseStatusReason fromCode(String codeString) throws IllegalArgumentException {
if (codeString == null || "".equals(codeString))
return null;
if ("advstorage".equals(codeString))
return VaccinationProtocolDoseStatusReason.ADVSTORAGE;
if ("coldchbrk".equals(codeString))
return VaccinationProtocolDoseStatusReason.COLDCHBRK;
if ("explot".equals(codeString))
return VaccinationProtocolDoseStatusReason.EXPLOT;
if ("outsidesched".equals(codeString))
return VaccinationProtocolDoseStatusReason.OUTSIDESCHED;
if ("prodrecall".equals(codeString))
return VaccinationProtocolDoseStatusReason.PRODRECALL;
throw new IllegalArgumentException("Unknown VaccinationProtocolDoseStatusReason code '"+codeString+"'");
}
public String toCode(VaccinationProtocolDoseStatusReason code) {
if (code == VaccinationProtocolDoseStatusReason.ADVSTORAGE)
return "advstorage";
if (code == VaccinationProtocolDoseStatusReason.COLDCHBRK)
return "coldchbrk";
if (code == VaccinationProtocolDoseStatusReason.EXPLOT)
return "explot";
if (code == VaccinationProtocolDoseStatusReason.OUTSIDESCHED)
return "outsidesched";
if (code == VaccinationProtocolDoseStatusReason.PRODRECALL)
return "prodrecall";
return "?";
}
public String toSystem(VaccinationProtocolDoseStatusReason code) {
return code.getSystem();
}
}
| [
"jamesagnew@gmail.com"
] | jamesagnew@gmail.com |
aac95cbefa7a7b560dcbf07a7ef4c5721a01b9c7 | c8f4d4a888b73e0670f5c35b378ee152707bc850 | /STS_JAVA/CORE & ADV JAVA/src/interviewer_Tasks/SecondHighestElement.java | e3a3ca5b81407360d9efda46a7cc3a149c65f85f | [] | no_license | Sam062/STS_DEMO | 4b0172a84cf8782c8b77016172975668e829f3f7 | 65b7a0db2681045cf3b775d8044ff086f4b1a070 | refs/heads/master | 2023-08-05T09:36:39.830875 | 2020-03-12T06:31:19 | 2020-03-12T06:31:19 | 199,883,144 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,048 | java | package interviewer_Tasks;
import java.util.ArrayList;
import java.util.List;
import java.util.NavigableSet;
import java.util.TreeSet;
class Student1 implements Comparable<Student1>{
public Integer sid;
public String sname;
public Integer marks;
public Student1(Integer sid, String sname, Integer marks) {
super();
this.sid = sid;
this.sname = sname;
this.marks = marks;
}
@Override
public String toString() {
return marks + " ";
}
@Override
public int compareTo(Student1 o) {
Integer marks=this.marks;
return (o.marks>marks)?1:(o.marks<marks)?-1:0;
}
}
public class SecondHighestElement {
public static void main(String[] args) {
List<Student1> l=new ArrayList<Student1>();
l.add(new Student1(101, "A", 10));
l.add(new Student1(102, "B", 1));
l.add(new Student1(103, "C", 5));
l.add(new Student1(104, "D", 14));
System.out.println(l);
NavigableSet<Student1> ns=new TreeSet<Student1>(l);
System.out.println(ns);
System.out.println(ns.higher(ns.first()));
}
}
| [
"sam062"
] | sam062 |
7b9d1847cf0c6df39bb0636aa3da8e0c1ca183f5 | 5fa40394963baf973cfd5a3770c1850be51efaae | /src/NHSensor/NHSensorSim/papers/EST/test/RestaFarMulticastQueryTest1.java | 2973158035930d044457b7d6e7cf0ff712ae7eac | [] | no_license | yejuns/wsn_java | 5c4d97cb6bc41b91ed16eafca5d14128ed45ed44 | f071cc72411ecc2866bff3dfc356f38b0c817411 | refs/heads/master | 2020-05-14T13:54:14.690176 | 2018-01-28T02:51:44 | 2018-01-28T02:51:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,059 | java | package NHSensor.NHSensorSim.papers.EST.test;
import NHSensor.NHSensorSim.papers.EST.AllParam;
import NHSensor.NHSensorSim.papers.EST.RestaFarMulticastQueryEnergyExperiment;
public class RestaFarMulticastQueryTest1 {
/**
* @param args
*/
public static void main(String[] args) {
boolean showAnimator = true;
String paramString = "networkID(4) nodeNum(800) queryRegionRate(0.4) gridWidthRate(0.8660254037844386) queryMessageSize(30) answerMessageSize(50) networkWidth(100.0) networkHeight(100.0) radioRange(10.0) queryAndPatialAnswerSize(100) resultSize(50)nodeFailProbability(0.04)k(0)nodeFailModelID(0)failNodeNum(0)";
AllParam param;
try {
param = AllParam.fromString(paramString);
} catch (Exception e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
return;
}
System.out.println(param);
RestaFarMulticastQueryEnergyExperiment e = new RestaFarMulticastQueryEnergyExperiment(
param);
e.setShowAnimator(showAnimator);
e.run();
System.out.println(e.toString());
}
}
| [
"lixinlu2000@163.com"
] | lixinlu2000@163.com |
77f33ec1f0a16b66ac2704ed8fb11a1df8ebcaf7 | 647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4 | /com.tencent.mm/classes.jar/com/tencent/mm/protocal/protobuf/dil.java | 76ced72bde91916721312ae9536b611131a62975 | [] | 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 | 1,894 | java | package com.tencent.mm.protocal.protobuf;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.bx.b;
public final class dil
extends com.tencent.mm.bx.a
{
public b aacO;
public final int op(int paramInt, Object... paramVarArgs)
{
AppMethodBeat.i(260207);
if (paramInt == 0)
{
paramVarArgs = (i.a.a.c.a)paramVarArgs[0];
if (this.aacO != null) {
paramVarArgs.d(1, this.aacO);
}
AppMethodBeat.o(260207);
return 0;
}
if (paramInt == 1) {
if (this.aacO == null) {
break label209;
}
}
label209:
for (paramInt = i.a.a.b.b.a.c(1, this.aacO) + 0;; paramInt = 0)
{
AppMethodBeat.o(260207);
return paramInt;
if (paramInt == 2)
{
paramVarArgs = new i.a.a.a.a((byte[])paramVarArgs[0], unknownTagHandler);
for (paramInt = com.tencent.mm.bx.a.getNextFieldNumber(paramVarArgs); paramInt > 0; paramInt = com.tencent.mm.bx.a.getNextFieldNumber(paramVarArgs)) {
if (!super.populateBuilderWithField(paramVarArgs, this, paramInt)) {
paramVarArgs.kFT();
}
}
AppMethodBeat.o(260207);
return 0;
}
if (paramInt == 3)
{
i.a.a.a.a locala = (i.a.a.a.a)paramVarArgs[0];
dil localdil = (dil)paramVarArgs[1];
switch (((Integer)paramVarArgs[2]).intValue())
{
default:
AppMethodBeat.o(260207);
return -1;
}
localdil.aacO = locala.ajGk.kFX();
AppMethodBeat.o(260207);
return 0;
}
AppMethodBeat.o(260207);
return -1;
}
}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes2.jar
* Qualified Name: com.tencent.mm.protocal.protobuf.dil
* JD-Core Version: 0.7.0.1
*/ | [
"98632993+tsuzcx@users.noreply.github.com"
] | 98632993+tsuzcx@users.noreply.github.com |
7f971b1cbdeda91ebed20f5a75f58586c8fc973b | 8994a240a1ad800d4f8c6eb608452213a0d2de14 | /src/test/java/org/scribe/up/test/profile/yahoo/TestYahooInterest.java | a9294c140aae2f32714fdd6aa946435fee68fe4b | [
"Apache-2.0"
] | permissive | apetro/scribe-up | 04ae0e389d532d975aa904083596f4ce988fe0b4 | 96befc217b662764893c24818299f0383767dcd2 | refs/heads/master | 2023-04-09T17:02:54.760458 | 2012-05-25T08:48:32 | 2012-05-25T08:48:32 | 4,651,869 | 0 | 1 | Apache-2.0 | 2023-04-03T23:40:38 | 2012-06-13T14:22:47 | Java | UTF-8 | Java | false | false | 2,139 | java | /*
Copyright 2012 Jerome Leleu
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.scribe.up.test.profile.yahoo;
import junit.framework.TestCase;
import org.scribe.up.profile.JsonHelper;
import org.scribe.up.profile.yahoo.YahooInterest;
/**
* This class tests the {@link org.scribe.up.profile.yahoo.YahooInterest} class.
*
* @author Jerome Leleu
* @since 1.1.0
*/
public final class TestYahooInterest extends TestCase {
private final static String DECLARED_INTERESTS = "declaredInterests";
private final static String INTEREST_CATEGORY = "interestCategory";
private static final String GOOD_JSON = "{\"declaredInterests\" : [\"" + DECLARED_INTERESTS
+ "\"], \"interestCategory\" : \"" + INTEREST_CATEGORY + "\"}";
private static final String BAD_JSON = "{ }";
public void testNull() {
YahooInterest yahooInterest = new YahooInterest(null);
assertNull(yahooInterest.getDeclaredInterests());
assertNull(yahooInterest.getInterestCategory());
}
public void testBadJson() {
YahooInterest yahooInterest = new YahooInterest(JsonHelper.getFirstNode(BAD_JSON));
assertNull(yahooInterest.getDeclaredInterests());
assertNull(yahooInterest.getInterestCategory());
}
public void testGoodJson() {
YahooInterest yahooInterest = new YahooInterest(JsonHelper.getFirstNode(GOOD_JSON));
assertEquals(DECLARED_INTERESTS, yahooInterest.getDeclaredInterests().get(0));
assertEquals(INTEREST_CATEGORY, yahooInterest.getInterestCategory());
}
}
| [
"leleuj@gmail.com"
] | leleuj@gmail.com |
baba0cb2d0009845ebea18eabccdf9648d093a53 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/27/27_94a130c0073fcd4bc93ef45be61ba3cc7cc6c6e6/ChatServer/27_94a130c0073fcd4bc93ef45be61ba3cc7cc6c6e6_ChatServer_t.java | 1c2769c82fb0f11b103ac5dd04b927419b7c1d4b | [] | 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 | 7,102 | java | package chat;
import hypeerweb.HyPeerWebSegment;
import hypeerweb.Node;
import hypeerweb.NodeCache;
import hypeerweb.visitors.SendVisitor;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Random;
/**
* Handles communications in the chat network
*/
public class ChatServer{
private final HyPeerWebSegment<HyPeerWebSegment<Node>> segment;
private String networkName = "";
//Node cache for the entire HyPeerWeb
private NodeCache cache;
//Cached list of all users
private static final Random randomName = new Random();
private final HashMap<Integer, ChatUser> users = new HashMap();
//List of all users and their GUI/Clients that are leeching on this network
private final HashMap<Integer, Client> clients = new HashMap();
public ChatServer() throws Exception{
segment = new HyPeerWebSegment("InceptionWeb.db", -1);
segment.setData("ChatServer", this);
/* TODO:
Join the network by creating another node in "segment"
Fetch the following from another segment in the InceptionWeb
- cache
- chatUsers
*/
}
//GUI
/**
* Register a GUI/Client with this server
* @param nwl network name listener
* @param nl node change listener
* @param sl send chat message listener
* @param ul user update listener
* @return the ChatUser for this GUI/Client
*/
public ChatUser registerClient(NetworkNameListener nwl, NodeListener nl, SendListener sl, UserListener ul){
Client c = new Client(nwl, nl, sl, ul);
//Generate a userID that has not been taken already
int newUser;
do{
newUser = randomName.nextInt(9999);
} while (users.containsKey(newUser));
c.user = new ChatUser(newUser, "user"+newUser, segment.getWebId());
users.put(newUser, c.user);
clients.put(newUser, c);
//TODO, broadcast this user update to all segments & userListeners
//TODO, send the client the nodecache, userlist, etc, through the listeners
return c.user;
}
/**
* Unregisters a GUI/Client from the server
* @param userID the user ID associated with this client
*/
public void unregisterClient(int userID){
users.remove(userID);
clients.remove(userID);
//TODO, broadcast this user update to all other segments
}
/**
* Client object; holds all listeners and a
* reference to the client's ChatUser
*/
private class Client{
public NetworkNameListener networkListener;
public NodeListener nodeListener;
public SendListener sendListener;
public UserListener userListener;
public ChatUser user;
public Client(NetworkNameListener nwl, NodeListener nl, SendListener sl, UserListener ul){
networkListener = nwl;
nodeListener = nl;
sendListener = sl;
userListener = ul;
}
}
//NETWORK
/**
* Spawn a new server off of this one
*/
public void joinNetwork(){
//We may need to write our own communication thing
//instead of calling this method
}
/**
* Leech off of this server
*/
public void watchNetwork(){
//We may need to write our own communication thing
//instead of calling this method
}
/**
* Disconnect from the network
*/
public void disconnect(){
//this one looks tough
//I think this is the part where Dr. Woodfield said that if one segment
//wanted to quit, all of the segments would have to quit. Now I can
//see why. Sending all of the nodes on this segment to live somewhere
//else would be difficult.
}
/**
* Change the ChatServer's name
* @param name
*/
public void changeNetworkName(String name){
networkName = name;
//broadcast to all network name listeners
}
public static abstract class NetworkNameListener{
abstract void callback();
}
//NODES
/**
* Adds a node to the HyPeerWeb and tells the nodeListeners about it.
*/
public void addNode(){
segment.getFirstSegmentNode().addNode(new Node.Listener() {
@Override
public void callback(Node n) {
resyncCache(n, NodeCache.SyncType.ADD);
}
});
}
/**
* Deletes a node from the HyPeerWeb and tells the nodeListeners about it.
* @param webID the webID of the node to delete
*/
public void removeNode(int webID){
HyPeerWebSegment hws = segment.getFirstSegmentNode();
hws.removeNode(webID, new Node.Listener(){
@Override
public void callback(Node n) {
resyncCache(n, NodeCache.SyncType.REMOVE);
}
});
}
/**
* Resyncs the node cache to the actual data in the HyPeerWeb
* @param n the Node that changed
* @param type the change type
*/
private void resyncCache(Node n, NodeCache.SyncType type){
//These are a list of dirty nodes in our cache
int[] dirty;
switch (type){
case ADD:
dirty = cache.addNode(n, true);
break;
case REMOVE:
dirty = cache.removeNode(n, true);
break;
}
//Retrieve all dirty nodes
NodeCache.Node clean[] = new NodeCache.Node[dirty.length];
//Notify all listeners that the cache changed
for (NodeListener listener : nodeListeners)
listener.callback(node, false);
}
public static abstract class NodeListener{
abstract void callback(NodeCache.Node affectedNode, NodeCache.SyncType type, NodeCache.Node[] updatedNodes);
}
//CHAT
/**
* Sends a message to another ChatUser
* @param senderID who sent this message
* @param recipientID who should receive the message (-1 to give to everyone)
* @param message the message
*/
public void sendMessage(int senderID, int recipientID, String message){
SendVisitor visitor = new SendVisitor(user.getWebId());
visitor.visit(segment);
}
public static abstract class SendListener{
abstract void callback(int senderID, int recipientID, String mess);
}
//USERS
/**
* Changes a user's name
* @param userID the user's id we want to update
* @param name new name for this user
*/
public void changeUserName(int userID, String name){
if (name != null && users.containsKey(userID)){
users.get(userID).name = name;
//TODO, broadcast name change
}
}
public static abstract class UserListener{
abstract void callback();
}
public static class ChatUser implements Serializable{
//Random color generator
private static final Random rand = new Random();
private static final int minRGB = 30, maxRGB = 180;
//User attributes
public String color, name;
public int id;
//Server that owns this user
public int networkID;
/**
* Create a new chat user
* @param id a unique id for this user
* @param name the user's name
* @param networkID the network that contains this user
*/
public ChatUser(int id, String name, int networkID){
//Random username color
//RGB values between 100-250
int delta = maxRGB-minRGB;
color = String.format(
"#%02x%02x%02x",
rand.nextInt(delta)+minRGB,
rand.nextInt(delta)+minRGB,
rand.nextInt(delta)+minRGB
);
this.name = name;
this.id = id;
this.networkID = networkID;
}
@Override
public String toString(){
return name;
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
a3762933a8ca495fab5f90d105f6099ef33e6bfd | 59a7a6958fe75863c4fe0f7aaae7e3045450565d | /src/main/java/org/osgl/util/algo/ArrayReverse.java | 2a027f2fc07e31b243e13d25af0829b04f9202d1 | [
"Apache-2.0"
] | permissive | zhouweiaccp/java-tool | ece0b702943e2abca9866c84595a9a9a15edfd45 | 20ecf16c8048d88fe2c290e813314d95b779a416 | refs/heads/master | 2021-01-15T20:13:07.425019 | 2015-08-23T23:37:58 | 2015-08-23T23:37:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 996 | java | package org.osgl.util.algo;
import org.osgl._;
import org.osgl.exception.NotAppliedException;
import org.osgl.util.E;
/**
* Return an new array contains elements specified by from and to in an array in reverse order
*/
public class ArrayReverse<T> implements ArrayAlgorithm, _.Func3<T[], Integer, Integer, T[]> {
@Override
public T[] apply(T[] ts, Integer from, Integer to) throws NotAppliedException, _.Break {
return reverse(ts, from, to);
}
public T[] reverse(T[] ts, int from, int to) {
E.NPE(ts);
Util.checkIndex(ts, from, to);
if (to < from) {
int t = to; to = from; from = t;
}
int len = to - from;
T[] newTs = _.newArray(ts, len);
if (0 == len) {
return newTs;
}
int steps = len / 2, max = to - 1;
for (int i = from; i < from + steps; ++i) {
newTs[i] = ts[max - i];
newTs[max - i] = ts[i];
}
return newTs;
}
}
| [
"greenlaw110@gmail.com"
] | greenlaw110@gmail.com |
817c10dde51c6f65b31c460b8ace46f3e891b57d | b0b40790a9b5a1d81f8f82932da7d8f126edbe48 | /src/test/java/junit/rules/TemporaryFolderTest.java | a372bd5b0151924b64d7f84cf06f8c9403284aa6 | [] | no_license | ArekLopus/JUnitTest | d319da6e69d0b40ea4f6ade25a0d7edfe8b68817 | d9e1391336629c519f155171eb3f25c381d0adc6 | refs/heads/master | 2021-08-24T18:15:03.097415 | 2017-11-21T11:34:17 | 2017-11-21T11:34:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 824 | java | package junit.rules;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.junit.Assert.assertThat;
import java.io.File;
import java.io.IOException;
import org.apache.commons.io.FileUtils;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
public class TemporaryFolderTest {
@Rule
public TemporaryFolder folder = new TemporaryFolder();
@Test
public void testWrite() throws IOException {
File tempFile = folder.newFile("tempFile.txt");
FileUtils.writeStringToFile(tempFile, "hello world");
String s = FileUtils.readFileToString(tempFile);
//Logger.getLogger(getClass().getName()).info(s);
assertThat("hello world", equalTo(s));
//Note: File is guaranteed to be deleted after the test finishes.
}
}
| [
"Ark@RuleZ.com"
] | Ark@RuleZ.com |
1ce01eb8566e46e68f49ed75da05b7e716c108c3 | b262b1e3487806cd6494fd4ac0220d932aa8b88f | /sample-mail/src/main/java/com/hannesdorfmann/mosby3/sample/mail/login/LoginViewState.java | 74291cc2c46ad47c718e5f1a7b78923efe424045 | [
"Apache-2.0"
] | permissive | SETANDGET/mosby | 3dd5b3fcedddb4e045496a5aa5fee83ff71a5406 | 513d1e96da1e328634f533483c5e1af5013f7a0d | refs/heads/master | 2020-03-09T08:41:33.779157 | 2018-04-08T20:53:52 | 2018-04-08T20:53:52 | 128,695,145 | 4 | 1 | Apache-2.0 | 2018-04-09T00:53:56 | 2018-04-09T00:53:56 | null | UTF-8 | Java | false | false | 1,496 | java | /*
* Copyright 2015 Hannes Dorfmann.
*
* 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.hannesdorfmann.mosby3.sample.mail.login;
import com.hannesdorfmann.mosby3.mvp.viewstate.ViewState;
/**
* @author Hannes Dorfmann
*/
public class LoginViewState implements ViewState<LoginView> {
final int STATE_SHOW_LOGIN_FORM = 0;
final int STATE_SHOW_LOADING = 1;
final int STATE_SHOW_ERROR = 2;
int state = STATE_SHOW_LOGIN_FORM;
@Override public void apply(LoginView view, boolean retained) {
switch (state) {
case STATE_SHOW_LOADING:
view.showLoading();
break;
case STATE_SHOW_ERROR:
view.showError();
break;
case STATE_SHOW_LOGIN_FORM:
view.showLoginForm();
break;
}
}
public void setShowLoginForm() {
state = STATE_SHOW_LOGIN_FORM;
}
public void setShowError() {
state = STATE_SHOW_ERROR;
}
public void setShowLoading() {
state = STATE_SHOW_LOADING;
}
}
| [
"hannes.dorfmann@gmail.com"
] | hannes.dorfmann@gmail.com |
9a9763ebc3ea960c4a67e0ca44bb6ccf8bc9e494 | 65423f57d25e34d9440bf894584b92be29946825 | /target/generated-sources/xjc/com/clincab/web/app/eutils/jaxb/e2br3/IVLPQ.java | de59fd8bf82af43ad251ee47599a9cab635ae54f | [] | no_license | kunalcabcsi/toolsr3 | 0b518cfa6813a88a921299ab8b8b5d6cbbd362fe | 5071990dc2325bc74c34a3383792ad5448dee1b0 | refs/heads/master | 2021-08-31T04:20:23.924815 | 2017-12-20T09:25:33 | 2017-12-20T09:25:33 | 114,867,895 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,392 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2017.12.20 at 02:30:39 PM IST
//
package com.clincab.web.app.eutils.jaxb.e2br3;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlElementRefs;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for IVL_PQ complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="IVL_PQ">
* <complexContent>
* <extension base="{urn:hl7-org:v3}SXCM_PQ">
* <choice minOccurs="0">
* <sequence>
* <element name="low" type="{urn:hl7-org:v3}IVXB_PQ"/>
* <choice minOccurs="0">
* <element name="width" type="{urn:hl7-org:v3}PQ" minOccurs="0"/>
* <element name="high" type="{urn:hl7-org:v3}IVXB_PQ" minOccurs="0"/>
* </choice>
* </sequence>
* <element name="high" type="{urn:hl7-org:v3}IVXB_PQ"/>
* <sequence>
* <element name="width" type="{urn:hl7-org:v3}PQ"/>
* <element name="high" type="{urn:hl7-org:v3}IVXB_PQ" minOccurs="0"/>
* </sequence>
* <sequence>
* <element name="center" type="{urn:hl7-org:v3}PQ"/>
* <element name="width" type="{urn:hl7-org:v3}PQ" minOccurs="0"/>
* </sequence>
* </choice>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "IVL_PQ", propOrder = {
"rest"
})
@XmlSeeAlso({
BXITIVLPQ.class
})
public class IVLPQ
extends SXCMPQ
{
@XmlElementRefs({
@XmlElementRef(name = "low", namespace = "urn:hl7-org:v3", type = JAXBElement.class, required = false),
@XmlElementRef(name = "high", namespace = "urn:hl7-org:v3", type = JAXBElement.class, required = false),
@XmlElementRef(name = "center", namespace = "urn:hl7-org:v3", type = JAXBElement.class, required = false),
@XmlElementRef(name = "width", namespace = "urn:hl7-org:v3", type = JAXBElement.class, required = false)
})
protected List<JAXBElement<? extends PQ>> rest;
/**
* Gets the rest of the content model.
*
* <p>
* You are getting this "catch-all" property because of the following reason:
* The field name "High" is used by two different parts of a schema. See:
* line 180 of file:/home/ksingh/NetBeansProjects/E2B-R3/src/main/resources/xsd/coreschemas/datatypes.xsd
* line 171 of file:/home/ksingh/NetBeansProjects/E2B-R3/src/main/resources/xsd/coreschemas/datatypes.xsd
* <p>
* To get rid of this property, apply a property customization to one
* of both of the following declarations to change their names:
* Gets the value of the rest property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the rest property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getRest().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link JAXBElement }{@code <}{@link IVXBPQ }{@code >}
* {@link JAXBElement }{@code <}{@link PQ }{@code >}
* {@link JAXBElement }{@code <}{@link PQ }{@code >}
* {@link JAXBElement }{@code <}{@link IVXBPQ }{@code >}
*
*
*/
public List<JAXBElement<? extends PQ>> getRest() {
if (rest == null) {
rest = new ArrayList<JAXBElement<? extends PQ>>();
}
return this.rest;
}
}
| [
"ksingh@localhost.localdomain"
] | ksingh@localhost.localdomain |
552698a11db31fe5e33e28c4b32cfe9293ac2766 | a3696a826b68141bcc2a68106e57f0ba3b0e974d | /gobang-gdx-game/src/com/xl/gsnkxq/SpriteScreen.java | 49dce1f15af2d6eb62715167a6eab4c6ce5d5f4f | [] | no_license | fengdeyingzi/GoBang | 2775e9d31e1ed2d8a42fecddcacb2caab0b1e2a8 | 8e90d1c0ca2fde1868c7002e8f1f9b08d53ce324 | refs/heads/master | 2020-05-14T13:17:11.879468 | 2020-01-14T05:15:22 | 2020-01-14T05:15:22 | 181,809,083 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 984 | java | package com.xl.gsnkxq;
import com.xl.gdx.XLScreen;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
/*
精灵测试Screen
spritex
*/
public class SpriteScreen extends XLScreen
{
SpriteX sprite;
SpriteBatch batch;
public SpriteScreen(int width,int height)
{
super(width,height);
batch = new SpriteBatch();
sprite = new SpriteX("sprite/55.sprite","sprite/55.png");
batch.setProjectionMatrix(getCamera().combined);
}
@Override
public void render(float p1)
{
// TODO: Implement this method
sprite.setAction(0);
batch.begin();
sprite.update(System.currentTimeMillis());
sprite.paint(new Graphics(batch));
batch.end();
int count = sprite.getCollidesCount();
if(count>1){
sprite.collidesWith(sprite);
}
super.render(p1);
}
@Override
public void dispose()
{
// TODO: Implement this method
sprite.dispose();
super.dispose();
}
}
| [
"2541012655@qq.com"
] | 2541012655@qq.com |
b382e6805bbeb525e58276e83568c4c5acecc164 | 26a837b93cf73e6c372830f9a7a316c01081a4ea | /doc-examples/src/main/java/arez/doc/examples/reference2/UserRepository.java | 2734dc2dcc60abf7abbf3de8f23a2849227da464 | [
"Apache-2.0"
] | permissive | arez/arez | 033b27f529b527c747b2a93f3c2c553c41c32acd | df68d72a69d3af1123e7d7c424f77b74f13f8052 | refs/heads/master | 2023-06-08T00:09:56.319223 | 2023-06-05T02:12:14 | 2023-06-05T02:12:14 | 96,367,327 | 13 | 4 | Apache-2.0 | 2022-12-10T20:29:35 | 2017-07-05T22:50:24 | Java | UTF-8 | Java | false | false | 515 | java | package arez.doc.examples.reference2;
import arez.annotations.ArezComponent;
import arez.component.internal.AbstractRepository;
import arez.doc.examples.reference.User;
import javax.annotation.Nullable;
@ArezComponent
public abstract class UserRepository
extends AbstractRepository<Integer, arez.doc.examples.reference.User, UserRepository>
{
//DOC ELIDE START
//DOC ELIDE END
@Nullable
public User findById( final int id )
{
return findByArezId( id );
}
//DOC ELIDE START
//DOC ELIDE END
}
| [
"peter@realityforge.org"
] | peter@realityforge.org |
68a2c4a59858d2248be9aac2f3a19878b9e76731 | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Math/13/org/apache/commons/math3/complex/Complex_Complex_98.java | bf048c9519373ce225595a1f01091578c14eaaf9 | [] | 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 | 2,062 | java |
org apach common math3 complex
represent complex number number
real imaginari part
implement arithmet oper handl code nan
infinit valu rule link java lang doubl
link equal equival relat instanc
code nan real imaginari part
consid equal
code nani
code nan
code nan nani
note contradict ieee standard float
point number test code fail
code code nan method
link org apach common math3 util precis equal
equal primit link org apach common math3 util precis
conform ieee conform standard behavior
java object type
implement serializ
version
complex field element fieldel complex serializ
creat complex number real imaginari part
param real real part
param imaginari imaginari part
complex real imaginari
real real
imaginari imaginari
isnan doubl isnan real doubl isnan imaginari
infinit isinfinit isnan
doubl infinit isinfinit real doubl infinit isinfinit imaginari
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
bd51d328cf35a9b4c9fbd6c89e769a257f7fbfbc | 8bca6164fc085936891cda5ff7b2341d3d7696c5 | /ext/impex/testsrc/de/hybris/platform/impex/header/model/impl/DescriptorElementTreeConverterTest.java | f5f79c858a06d37662b2c24572f44d8b2479e13a | [] | no_license | rgonthina1/newplatform | 28819d22ba48e48d4edebbf008a925cad0ebc828 | 1cdc70615ea4e86863703ca9a34231153f8ef373 | refs/heads/master | 2021-01-19T03:03:22.221074 | 2016-06-20T14:49:25 | 2016-06-20T14:49:25 | 61,548,232 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,861 | java | /*
* [y] hybris Platform
*
* Copyright (c) 2000-2013 hybris AG
* All rights reserved.
*
* This software is the confidential and proprietary information of hybris
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with hybris.
*
*
*/
package de.hybris.platform.impex.header.model.impl;
import static org.junit.Assert.assertNotNull;
import de.hybris.bootstrap.annotations.UnitTest;
import de.hybris.platform.impex.header.model.AlternativeListElement;
import de.hybris.platform.impex.header.model.ChildrenListElement;
import de.hybris.platform.impex.header.model.DescriptorElement;
import de.hybris.platform.impex.header.model.ValueElement;
import de.hybris.platform.impex.jalo.header.AbstractDescriptor;
import de.hybris.platform.impex.jalo.header.HeaderValidationException;
import de.hybris.platform.impex.jalo.header.AbstractDescriptor.ColumnParams;
import java.util.Arrays;
import java.util.List;
import org.junit.Assert;
import org.junit.Test;
/**
* Test to check if conversion from old table of lists (List<ColumnParams>[]) is converted into new object oriented data
* structure. See DescriptorElement class description.
*/
@UnitTest
public class DescriptorElementTreeConverterTest
{
/**
* Test conversion of complicated structure
*/
@Test
public void headerParsingTest() throws HeaderValidationException
{
final String pattern = "a,b|c(d|e(f),g),h";
final List<ColumnParams>[] lists = AbstractDescriptor.extractItemPathElements(pattern);
assertNotNull("NULL!!", lists);
final DescriptorElement root = DescriptorElementTreeConverter.convertToDescriptorElement(lists);
assertNotNull("NULL!!", root);
Assert.assertTrue(root instanceof AlternativeListElement);
Assert.assertEquals(2, ((AlternativeListElement) root).getAlternatives().length);
final DescriptorElement element = ((AlternativeListElement) root).getAlternatives()[1];
assertNotNull("NULL!!", element);
Assert.assertTrue(element instanceof ChildrenListElement);
Assert.assertEquals(3, ((ChildrenListElement) element).getChildren().length);
final List<ColumnParams>[] root2 = DescriptorElementTreeConverter.convertFromDescriptorElement(root);
Assert.assertEquals(Arrays.deepToString(lists), Arrays.deepToString(root2));
}
/**
* Just simple conversion test for two value elements
*/
@Test
public void headerParsingTest1() throws HeaderValidationException
{
final String pattern = "a,b";
final List<ColumnParams>[] lists = AbstractDescriptor.extractItemPathElements(pattern);
assertNotNull("NULL!!", lists);
final DescriptorElement root = DescriptorElementTreeConverter.convertToDescriptorElement(lists);
assertNotNull("NULL!!", root);
Assert.assertTrue(root instanceof ChildrenListElement);
Assert.assertEquals(2, ((ChildrenListElement) root).getChildren().length);
final List<ColumnParams>[] root2 = DescriptorElementTreeConverter.convertFromDescriptorElement(root);
Assert.assertEquals(Arrays.deepToString(lists), Arrays.deepToString(root2));
}
/**
* Tests more nested example
*/
@Test
public void headerParsingTest2() throws HeaderValidationException
{
final String pattern = "a|b(c|d(e|f))";
final List<ColumnParams>[] lists = AbstractDescriptor.extractItemPathElements(pattern);
assertNotNull("NULL!!", lists);
final DescriptorElement root = DescriptorElementTreeConverter.convertToDescriptorElement(lists);
assertNotNull("NULL!!", root);
Assert.assertTrue(root instanceof AlternativeListElement);
Assert.assertEquals(2, ((AlternativeListElement) root).getAlternatives().length);
DescriptorElement element = ((AlternativeListElement) root).getAlternatives()[1];
Assert.assertTrue(element instanceof ValueElement);
element = ((ValueElement) element).getSpecifier();
Assert.assertNotNull(element);
Assert.assertTrue(element instanceof AlternativeListElement);
Assert.assertEquals(2, ((AlternativeListElement) element).getAlternatives().length);
element = ((AlternativeListElement) root).getAlternatives()[1];
Assert.assertTrue(element instanceof ValueElement);
element = ((ValueElement) element).getSpecifier();
Assert.assertNotNull(element);
Assert.assertTrue(element instanceof AlternativeListElement);
Assert.assertEquals(2, ((AlternativeListElement) element).getAlternatives().length);
element = ((AlternativeListElement) root).getAlternatives()[1];
Assert.assertTrue(element instanceof ValueElement);
element = ((ValueElement) element).getSpecifier();
Assert.assertNotNull(element);
final List<ColumnParams>[] root2 = DescriptorElementTreeConverter.convertFromDescriptorElement(root);
Assert.assertEquals(Arrays.deepToString(lists), Arrays.deepToString(root2));
}
/**
* Boundary case - only one element
*/
@Test
public void headerParsingTest3() throws HeaderValidationException
{
final String pattern = "a";
final List<ColumnParams>[] lists = AbstractDescriptor.extractItemPathElements(pattern);
assertNotNull("NULL!!", lists);
final DescriptorElement root = DescriptorElementTreeConverter.convertToDescriptorElement(lists);
assertNotNull("NULL!!", root);
Assert.assertTrue(root instanceof ValueElement);
Assert.assertTrue(((ValueElement) root).getSpecifier() == null);
Assert.assertEquals(((ValueElement) root).getQualifier(), "a");
final List<ColumnParams>[] root2 = DescriptorElementTreeConverter.convertFromDescriptorElement(root);
Assert.assertEquals(Arrays.deepToString(lists), Arrays.deepToString(root2));
}
/**
* Boundary case - only one element
*/
@Test
public void headerParsingTest3a() throws HeaderValidationException
{
final String pattern = "a(b)";
final List<ColumnParams>[] lists = AbstractDescriptor.extractItemPathElements(pattern);
assertNotNull("NULL!!", lists);
final DescriptorElement root = DescriptorElementTreeConverter.convertToDescriptorElement(lists);
assertNotNull("NULL!!", root);
Assert.assertTrue(root instanceof ValueElement);
Assert.assertTrue(((ValueElement) root).getSpecifier() != null);
Assert.assertEquals(((ValueElement) root).getQualifier(), "a");
final DescriptorElement specifier = ((ValueElement) root).getSpecifier();
Assert.assertTrue(((ValueElement) specifier).getSpecifier() == null);
Assert.assertEquals(((ValueElement) specifier).getQualifier(), "b");
final List<ColumnParams>[] root2 = DescriptorElementTreeConverter.convertFromDescriptorElement(root);
Assert.assertEquals(Arrays.deepToString(lists), Arrays.deepToString(root2));
}
/**
* Boundary case - no elements at all
*/
@Test
public void headerParsingTest4() throws HeaderValidationException
{
final String pattern = "";
final List<ColumnParams>[] lists = AbstractDescriptor.extractItemPathElements(pattern);
Assert.assertNull("Expecting NULL!!", lists);
final DescriptorElement root = DescriptorElementTreeConverter.convertToDescriptorElement(lists);
Assert.assertNull("Expecting NULL!!", root);
final List<ColumnParams>[] root2 = DescriptorElementTreeConverter.convertFromDescriptorElement(root);
Assert.assertEquals(Arrays.deepToString(lists), Arrays.deepToString(root2));
}
/**
* Just simple conversion test for value element
*/
@Test
public void headerParsingTest5() throws HeaderValidationException
{
final String pattern = "a(b,c)";
final List<ColumnParams>[] lists = AbstractDescriptor.extractItemPathElements(pattern);
assertNotNull("NULL!!", lists);
final DescriptorElement root = DescriptorElementTreeConverter.convertToDescriptorElement(lists);
assertNotNull("NULL!!", root);
final List<ColumnParams>[] root2 = DescriptorElementTreeConverter.convertFromDescriptorElement(root);
Assert.assertEquals(Arrays.deepToString(lists), Arrays.deepToString(root2));
}
}
| [
"Kalpana"
] | Kalpana |
eead525794fe487940031c178a6776440dc45f84 | 5a0bfac7ad00c079fe8e0bdf1482f4271c46eeab | /app/src/main/wechat6.5.3/com/tencent/mm/svg/a/a/pt.java | 67467bfa616e6dab2938955dcc86697a0c644e8d | [] | no_license | newtonker/wechat6.5.3 | 8af53a870a752bb9e3c92ec92a63c1252cb81c10 | 637a69732afa3a936afc9f4679994b79a9222680 | refs/heads/master | 2020-04-16T03:32:32.230996 | 2017-06-15T09:54:10 | 2017-06-15T09:54:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,891 | java | package com.tencent.mm.svg.a.a;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Paint.Cap;
import android.graphics.Paint.Join;
import android.graphics.Paint.Style;
import android.graphics.Path;
import android.os.Looper;
import com.tencent.mm.svg.c;
import com.tencent.smtt.sdk.WebView;
public final class pt extends c {
private final int height = 144;
private final int width = 144;
protected final int j(int i, Object... objArr) {
switch (i) {
case 0:
return 144;
case 1:
return 144;
case 2:
Canvas canvas = (Canvas) objArr[0];
Looper looper = (Looper) objArr[1];
Matrix d = c.d(looper);
float[] c = c.c(looper);
Paint g = c.g(looper);
g.setFlags(385);
g.setStyle(Style.FILL);
Paint g2 = c.g(looper);
g2.setFlags(385);
g2.setStyle(Style.STROKE);
g.setColor(WebView.NIGHT_MODE_COLOR);
g2.setStrokeWidth(1.0f);
g2.setStrokeCap(Cap.BUTT);
g2.setStrokeJoin(Join.MITER);
g2.setStrokeMiter(4.0f);
g2.setPathEffect(null);
c.a(g2, looper).setStrokeWidth(1.0f);
canvas.save();
c = c.a(c, 1.0f, 0.0f, 12.0f, 0.0f, 1.0f, 12.0f);
d.reset();
d.setValues(c);
canvas.concat(d);
canvas.save();
Paint a = c.a(g, looper);
a.setColor(-344005);
Path h = c.h(looper);
h.moveTo(60.0f, 0.0f);
h.cubicTo(93.137085f, 0.0f, 120.0f, 26.862915f, 120.0f, 60.0f);
h.cubicTo(120.0f, 93.137085f, 93.137085f, 120.0f, 60.0f, 120.0f);
h.cubicTo(26.862915f, 120.0f, 0.0f, 93.137085f, 0.0f, 60.0f);
h.cubicTo(0.0f, 26.862915f, 26.862915f, 0.0f, 60.0f, 0.0f);
h.close();
canvas.drawPath(h, a);
canvas.restore();
canvas.save();
a = c.a(g, looper);
a.setColor(-274608);
h = c.h(looper);
h.moveTo(60.0f, 6.0f);
h.cubicTo(89.82338f, 6.0f, 114.0f, 30.176622f, 114.0f, 60.0f);
h.cubicTo(114.0f, 89.82338f, 89.82338f, 114.0f, 60.0f, 114.0f);
h.cubicTo(30.176622f, 114.0f, 6.0f, 89.82338f, 6.0f, 60.0f);
h.cubicTo(6.0f, 30.176622f, 30.176622f, 6.0f, 60.0f, 6.0f);
h.close();
canvas.drawPath(h, a);
canvas.restore();
canvas.restore();
c.f(looper);
break;
}
return 0;
}
}
| [
"zhangxhbeta@gmail.com"
] | zhangxhbeta@gmail.com |
e1072321a574c08d24c2abf800913a2b303bcf48 | 0af8b92686a58eb0b64e319b22411432aca7a8f3 | /single-large-project/src/test/java/org/gradle/test/performancenull_160/Testnull_15935.java | 2f7e9f064fbe558fa1efb732ddfcfe51e700d14b | [] | no_license | gradle/performance-comparisons | b0d38db37c326e0ce271abebdb3c91769b860799 | e53dc7182fafcf9fedf07920cbbea8b40ee4eef4 | refs/heads/master | 2023-08-14T19:24:39.164276 | 2022-11-24T05:18:33 | 2022-11-24T05:18:33 | 80,121,268 | 17 | 15 | null | 2022-09-30T08:04:35 | 2017-01-26T14:25:33 | null | UTF-8 | Java | false | false | 308 | java | package org.gradle.test.performancenull_160;
import static org.junit.Assert.*;
public class Testnull_15935 {
private final Productionnull_15935 production = new Productionnull_15935("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
} | [
"cedric.champeau@gmail.com"
] | cedric.champeau@gmail.com |
ac2cd4a00fb6cbff662df847d748a821be8dc4a3 | a14deb218f7e90e16e9fdcfe7723b924a7851f2b | /src/main/java/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileSplit1.java | 57c5be9a3331e779ff3cd22ba2bb786cca854843 | [
"Apache-2.0"
] | permissive | btomala/sbt-plantuml-plugin | aac0dc27b5597452cc8dd5c3cd2576c8565cfc28 | 7b710ebbd9da6c9b5e95c66c592cf9a021f42987 | refs/heads/master | 2021-01-16T18:57:14.036051 | 2016-02-26T14:45:05 | 2016-02-26T14:45:05 | 67,075,540 | 0 | 0 | null | 2016-09-07T18:27:29 | 2016-08-31T21:42:49 | Java | UTF-8 | Java | false | false | 3,355 | java | /* ========================================================================
* PlantUML : a free UML diagram generator
* ========================================================================
*
* (C) Copyright 2009-2014, Arnaud Roques
*
* Project Info: http://plantuml.sourceforge.net
*
* This file is part of PlantUML.
*
* 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.
*
*
* Original Author: Arnaud Roques
*/
package net.sourceforge.plantuml.activitydiagram3.ftile.vcompact;
import java.awt.geom.Dimension2D;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile;
import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileGeometry;
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UTranslate;
class FtileSplit1 extends AbstractFtile {
private final List<Ftile> forks = new ArrayList<Ftile>();
public FtileSplit1(List<Ftile> forks) {
super(forks.get(0).shadowing());
for (Ftile ftile : forks) {
this.forks.add(ftile);
}
}
public Swimlane getSwimlaneIn() {
return forks.get(0).getSwimlaneIn();
}
public Swimlane getSwimlaneOut() {
return null;
// return getSwimlaneIn();
}
public Set<Swimlane> getSwimlanes() {
return mergeSwimlanes(forks);
}
public static Set<Swimlane> mergeSwimlanes(List<Ftile> tiles) {
final Set<Swimlane> result = new HashSet<Swimlane>();
for (Ftile tile : tiles) {
result.addAll(tile.getSwimlanes());
}
return Collections.unmodifiableSet(result);
}
public void drawU(UGraphic ug) {
final StringBounder stringBounder = ug.getStringBounder();
for (Ftile ftile : forks) {
ug.apply(getTranslateFor(ftile, stringBounder)).draw(ftile);
}
}
public FtileGeometry calculateDimension(StringBounder stringBounder) {
double height = 0;
double width = 0;
for (Ftile ftile : forks) {
final Dimension2D dim = ftile.calculateDimension(stringBounder);
if (dim.getWidth() > width) {
width = dim.getWidth();
}
if (dim.getHeight() > height) {
height = dim.getHeight();
}
}
final Dimension2D dimTotal = new Dimension2DDouble(width, height);
return new FtileGeometry(dimTotal, dimTotal.getWidth() / 2, 0, dimTotal.getHeight());
}
public UTranslate getTranslateFor(Ftile searched, StringBounder stringBounder) {
final Dimension2D dim = searched.calculateDimension(stringBounder);
final double xpos = calculateDimension(stringBounder).getWidth() - dim.getWidth();
return new UTranslate(xpos / 2, 0);
}
}
| [
"adam@ashannon.us"
] | adam@ashannon.us |
487f1bdc40b19f40ecee93d88e7d4f219fc4039f | 732a6fa36e14baf7f828ef19a62b515312f9a109 | /playbook/old/src/main/java/com/mindalliance/channels/playbook/pages/forms/NetworkingForm.java | 833e52f6abeb37d9e4a330cc308c09dab0cd411d | [] | no_license | gauravbvt/test | 4e991ad3e7dd5ea670ab88f3a74fe8a42418ec20 | 04e48c87ff5c2209fc4bc703795be3f954909c3a | refs/heads/master | 2020-11-24T02:43:32.565109 | 2014-10-07T23:47:39 | 2014-10-07T23:47:39 | 100,468,202 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 906 | java | package com.mindalliance.channels.playbook.pages.forms;
import com.mindalliance.channels.playbook.ref.Ref;
import com.mindalliance.channels.playbook.pages.forms.tabs.networking.NetworkingBasicTab;
import org.apache.wicket.extensions.markup.html.tabs.AbstractTab;
import org.apache.wicket.model.Model;
import org.apache.wicket.markup.html.panel.Panel;
/**
* Copyright (C) 2008 Mind-Alliance Systems. All Rights Reserved.
* Proprietary and Confidential.
* User: jf
* Date: Jul 29, 2008
* Time: 10:55:58 AM
*/
public class NetworkingForm extends AbstractElementForm {
public NetworkingForm(String id, Ref element) {
super(id, element);
}
void loadTabs() {
tabs.add(new AbstractTab(new Model("Networking")) {
public Panel getPanel(String panelId) {
return new NetworkingBasicTab(panelId, NetworkingForm.this);
}
});
}
}
| [
"jf@baad322d-9929-0410-88f0-f92e8ff3e1bd"
] | jf@baad322d-9929-0410-88f0-f92e8ff3e1bd |
9d2e3f5c3cb992aa71fdd05f8e5b567d1068c18b | 6cac2f521b47f755a26dd8cff2a0451df8460773 | /src/main/java/players/mcts/test/RewardsForParanoia.java | b15bd9c1fdcf61c262a09949a74b980d25977c38 | [
"MIT"
] | permissive | delphinic-owl/TabletopGames | 3858e801a2defc6406c2151e52a9365e41c8731d | b483aebe0f76a69c79070a8d4b43a147f433e49f | refs/heads/master | 2023-05-25T07:34:15.044705 | 2021-04-12T19:54:39 | 2021-04-12T19:54:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,536 | java | package players.mcts.test;
import core.*;
import core.actions.*;
import core.interfaces.IStatisticLogger;
import games.GameType;
import games.loveletter.*;
import games.virus.*;
import org.junit.*;
import players.PlayerConstants;
import players.mcts.*;
import players.simple.RandomPlayer;
import utilities.SummaryLogger;
import utilities.Utils;
import java.util.*;
import java.util.function.*;
import static java.util.stream.Collectors.*;
import static org.junit.Assert.*;
public class RewardsForParanoia {
TestMCTSPlayer mctsPlayer;
MCTSParams params;
@Before
public void setup() {
// default Parameter settings for later changes
params = new MCTSParams(9332);
params.treePolicy = MCTSEnums.TreePolicy.UCB;
params.redeterminise = true;
params.openLoop = true;
params.maxTreeDepth = 10;
params.rolloutLength = 10;
params.budgetType = PlayerConstants.BUDGET_ITERATIONS;
params.budget = 1000;
params.selectionPolicy = MCTSEnums.SelectionPolicy.SIMPLE;
params.K = 1.0;
}
public Game createGame(MCTSParams params, GameType gameType) {
mctsPlayer = new TestMCTSPlayer(params);
mctsPlayer.setDebug(true);
List<AbstractPlayer> players = new ArrayList<>();
players.add(mctsPlayer);
players.add(new RandomPlayer(new Random(3023)));
players.add(new RandomPlayer(new Random(244)));
Game game = gameType.createGameInstance(3, 3302345);
game.reset(players);
return game;
}
private void runGame(Game game, int moves,
Predicate<SingleTreeNode> allMatch,
Predicate<SingleTreeNode> anyMatch,
Predicate<List<SingleTreeNode>> aggregateCheck) {
int counter = 0;
boolean anyMatchTriggered = false;
AbstractGameState state = game.getGameState();
AbstractForwardModel forwardModel = game.getForwardModel();
do {
IStatisticLogger logger = new SummaryLogger();
mctsPlayer.setStatsLogger(logger);
AbstractAction actionChosen = game.getPlayers().get(state.getCurrentPlayer())
.getAction(state, forwardModel.computeAvailableActions(state));
if (state.getCurrentPlayer() == 0) {
logger.processDataAndFinish();
TreeStatistics stats = new TreeStatistics(mctsPlayer.root);
List<SingleTreeNode> allNodes = mctsPlayer.allNodesInTree();
assertTrue(allNodes.stream().allMatch(allMatch));
if (allNodes.stream().anyMatch(anyMatch))
anyMatchTriggered = true;
assertTrue(aggregateCheck.test(allNodes));
counter++;
}
forwardModel.next(state, actionChosen);
} while (counter < moves);
assertTrue(anyMatchTriggered);
}
Predicate<List<SingleTreeNode>> checkNodesDistributedAcrossAllPlayers = list -> {
Map<Integer, Long> nodeCountByDecisionMaker = list.stream()
.map(SingleTreeNode::getActor)
.collect(groupingBy(Function.identity(), counting()));
// we then check that all players have som nodes in the tree
Utils.GameResult[] results = mctsPlayer.root.getState().getPlayerResults();
System.out.println("Nodes by player: " + nodeCountByDecisionMaker);
if (results[0] == Utils.GameResult.GAME_ONGOING)
assertTrue(nodeCountByDecisionMaker.get(0) > 10);
if (results[1] == Utils.GameResult.GAME_ONGOING)
assertTrue(nodeCountByDecisionMaker.get(1) > 10);
if (results[2] == Utils.GameResult.GAME_ONGOING)
assertTrue(nodeCountByDecisionMaker.get(2) > 10);
return true;
};
Predicate<SingleTreeNode> paranoidNodeValues = node -> {
assertEquals(node.getTotValue()[0], -node.getTotValue()[1], 0.001);
assertEquals(node.getTotValue()[0], -node.getTotValue()[2], 0.001);
assertTrue(node.getChildren().size() < 60);
return true;
};
Predicate<SingleTreeNode> maxNNodeValues = node -> {
// if we have just one, everyone else must have just lost
if (node.getVisits() == 1 && node.getTotValue()[0] == 1.0) {
assertEquals(node.getTotValue()[0], -node.getTotValue()[1], 0.001);
assertEquals(node.getTotValue()[0], -node.getTotValue()[2], 0.001);
}
assertTrue(node.getChildren().size() < 60);
return true;
};
Predicate<SingleTreeNode> selfOnlyNodes = node -> {
node.getChildren().values().forEach(nodeArray ->
assertTrue(nodeArray == null || (nodeArray[1] == null && nodeArray[2] == null)));
assertTrue(node.getChildren().size() < 60);
return true;
};
Predicate<SingleTreeNode> atLeastOneSplitNode = node -> node.getChildren().values().stream()
.filter(Objects::nonNull)
.anyMatch(array -> Arrays.stream(array).filter(Objects::nonNull).count() > 1);
@Test
public void loveLetterSelfOnly() {
params.opponentTreePolicy = MCTSEnums.OpponentTreePolicy.SelfOnly;
Game game = createGame(params, GameType.LoveLetter);
runGame(game, 4, selfOnlyNodes, n -> true, n -> true);
}
@Test
public void loveLetterParanoid() {
params.opponentTreePolicy = MCTSEnums.OpponentTreePolicy.Paranoid;
Game game = createGame(params, GameType.LoveLetter);
runGame(game, 4, paranoidNodeValues, atLeastOneSplitNode, checkNodesDistributedAcrossAllPlayers);
}
@Test
public void loveLetterMaxN() {
params.opponentTreePolicy = MCTSEnums.OpponentTreePolicy.MaxN;
Game game = createGame(params, GameType.LoveLetter);
runGame(game, 4, maxNNodeValues, atLeastOneSplitNode, checkNodesDistributedAcrossAllPlayers);
}
@Test
public void virusSelfOnly() {
params.opponentTreePolicy = MCTSEnums.OpponentTreePolicy.SelfOnly;
Game game = createGame(params, GameType.Virus);
runGame(game, 4, selfOnlyNodes, n -> true, n -> true);
}
@Test
public void virusParanoid() {
params.opponentTreePolicy = MCTSEnums.OpponentTreePolicy.Paranoid;
Game game = createGame(params, GameType.Virus);
runGame(game, 4, paranoidNodeValues, n -> true, checkNodesDistributedAcrossAllPlayers);
}
@Test
public void virusMaxN() {
params.opponentTreePolicy = MCTSEnums.OpponentTreePolicy.MaxN;
Game game = createGame(params, GameType.Virus);
runGame(game, 4, maxNNodeValues, n -> true, checkNodesDistributedAcrossAllPlayers);
}
@Test
public void coltExpressMaxN() {
params.opponentTreePolicy = MCTSEnums.OpponentTreePolicy.MaxN;
Game game = createGame(params, GameType.ColtExpress);
runGame(game, 4, maxNNodeValues, n -> true, checkNodesDistributedAcrossAllPlayers);
}
@Test
public void explodingKittensMaxN() {
params.opponentTreePolicy = MCTSEnums.OpponentTreePolicy.MaxN;
Game game = createGame(params, GameType.ExplodingKittens);
runGame(game, 4, maxNNodeValues, n -> true, checkNodesDistributedAcrossAllPlayers);
}
@Test
public void unoMaxN() {
params.opponentTreePolicy = MCTSEnums.OpponentTreePolicy.MaxN;
Game game = createGame(params, GameType.Uno);
runGame(game, 4, maxNNodeValues, n -> true, checkNodesDistributedAcrossAllPlayers);
}
}
| [
"james@janigo.co.uk"
] | james@janigo.co.uk |
3937679618e2cd9f079db3074d687817fb266c45 | 6777964a07446712a5b1ac820e730033539ce503 | /java/java-collections/ArrayList/src/ExemploArrayLIst.java | 510d23933c3f56dae1ef786bdb30121c4f7be8c9 | [] | no_license | Ramonrune/computer-technician-course | e808cec156200bfb5b05776ace83e1fa96faeec2 | 27f1d6675f4511bb48a4fad66f80999810924021 | refs/heads/master | 2021-10-09T17:32:26.933337 | 2019-01-01T23:01:44 | 2019-01-01T23:01:44 | 91,250,139 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,295 | java |
import java.util.ArrayList;
import java.util.Collections;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author Julia Carolina Maia da Silva
*/
public class ExemploArrayLIst {
public static void main(String[]args){
//Criando objeto ArrayLIst do tipo String
ArrayList<String> estados =
new ArrayList<>();
//Adicionando itens no ArrayList
estados.add("São Paulo");//indice 0
estados.add("Minas Geral");//indice 1
estados.add("Acre");//indice 2
Collections.sort(estados);
//Exibindo os itens do ArrayList
for(int i = 0; i < estados.size(); i++){
System.out.println(estados.get(i));
}
//alterando um valor do ArrayList
estados.set(1, "Pernambuco");
Collections.reverse(estados);
System.out.println("=======================");
for(int i = 0; i < estados.size(); i++){
System.out.println(estados.get(i));
}
//removendo um item do ArrayList
estados.remove(2);
System.out.println("=======================");
for(int i = 0; i < estados.size(); i++){
System.out.println(estados.get(i));
}
}
}
| [
"ramonrune@gmail.com"
] | ramonrune@gmail.com |
43251f645d98dba384c3e770e0959e227884adaa | 0e6268fd8a7dab3e4d7b830d6cac079be0a8a0fe | /src/May19/Sentense.java | 1b9687894265705c56a33acb57dadabd6e15054b | [] | no_license | uday246/March18 | fc5fafbe20e12095da2e4e3fe94d1bc49dbc1df0 | 44ae546660f400b96b469c26decbe0c562b88a94 | refs/heads/master | 2020-08-15T07:27:19.063010 | 2019-10-15T13:07:02 | 2019-10-15T13:07:02 | 215,300,429 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 696 | java | package May19;
import java.util.ArrayList;
public class Sentense {
private ArrayList<String> words;
public Sentense(String text) {
// removing the punctuation mark
text = text.substring(0, text.length() - 1);
//splitting into words
String arr[] = text.split(" ");
words = new ArrayList<String>();
//adding to array list
for (String s : arr)
words.add(s);
}
public String getWord(int i){
if(words.size()>i)
return words.get(i);
return null;
}
public int getCount(){
return words.size();
}
public static String check(String sent){
Sentense aSentense = new Sentense(sent);
return aSentense.getWord(aSentense.getCount()-1);
}
}
| [
"teegalaudaykumar@gmail.com"
] | teegalaudaykumar@gmail.com |
2eb17a711eedf54ff722cc6748b45ab0df287b27 | 2d2e1c6126870b0833c6f80fec950af7897065e5 | /scriptom-office-2k7/src/main/java/org/codehaus/groovy/scriptom/tlb/office2007/MsoDocInspectorStatus.java | c2754ceb144538a5541e32a3116be84b28d29f53 | [] | no_license | groovy/Scriptom | d650b0464f58d3b58bb13469e710dbb80e2517d5 | 790eef97cdacc5da293d18600854b547f47e4169 | refs/heads/master | 2023-09-01T16:13:00.152780 | 2022-02-14T12:30:17 | 2022-02-14T12:30:17 | 39,463,850 | 20 | 7 | null | 2015-07-23T12:48:26 | 2015-07-21T18:52:11 | Java | UTF-8 | Java | false | false | 3,041 | java | /*
* Copyright 2009 (C) The Codehaus. All Rights Reserved.
*
* Redistribution and use of this software and associated documentation
* ("Software"), with or without modification, are permitted provided that the
* following conditions are met:
* 1. Redistributions of source code must retain copyright statements and
* notices. Redistributions must also contain a copy of this document.
* 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.
* 3. The name "groovy" must not be used to endorse or promote products
* derived from this Software without prior written permission of The Codehaus.
* For written permission, please contact info@codehaus.org.
* 4. Products derived from this Software may not be called "groovy" nor may
* "groovy" appear in their names without prior written permission of The
* Codehaus. "groovy" is a registered trademark of The Codehaus.
* 5. Due credit should be given to The Codehaus - http://groovy.codehaus.org/
*
* THIS SOFTWARE IS PROVIDED BY THE CODEHAUS AND CONTRIBUTORS ``AS IS'' AND ANY
* EXPRESSED 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 CODEHAUS OR ITS 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 org.codehaus.groovy.scriptom.tlb.office2007;
import java.util.Map;
import java.util.TreeMap;
import java.util.Collections;
/**
* @author Jason Smith
*/
public final class MsoDocInspectorStatus
{
private MsoDocInspectorStatus()
{
}
/**
* Value is 0 (0x0)
*/
public static final Integer msoDocInspectorStatusDocOk = Integer.valueOf(0);
/**
* Value is 1 (0x1)
*/
public static final Integer msoDocInspectorStatusIssueFound = Integer.valueOf(1);
/**
* Value is 2 (0x2)
*/
public static final Integer msoDocInspectorStatusError = Integer.valueOf(2);
/**
* A {@code Map} of the symbolic names to constant values.
*/
public static final Map<String,Object> values;
static
{
TreeMap<String,Object> v = new TreeMap<String,Object>();
v.put("msoDocInspectorStatusDocOk", msoDocInspectorStatusDocOk);
v.put("msoDocInspectorStatusIssueFound", msoDocInspectorStatusIssueFound);
v.put("msoDocInspectorStatusError", msoDocInspectorStatusError);
values = Collections.synchronizedMap(Collections.unmodifiableMap(v));
}
}
| [
"ysb33r@gmail.com"
] | ysb33r@gmail.com |
9276470b6e12b8c4dc6ae10bd39b4920c38af09b | 6500848c3661afda83a024f9792bc6e2e8e8a14e | /gp_JADX/com/google/android/gms/internal/xb.java | e434d04a14edf57d380eb5d5d8cd8ea84d429343 | [] | no_license | enaawy/gproject | fd71d3adb3784d12c52daf4eecd4b2cb5c81a032 | 91cb88559c60ac741d4418658d0416f26722e789 | refs/heads/master | 2021-09-03T03:49:37.813805 | 2018-01-05T09:35:06 | 2018-01-05T09:35:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 666 | java | package com.google.android.gms.internal;
import java.util.Arrays;
final class xb {
public final int f27653a;
public final byte[] f27654b;
xb(int i, byte[] bArr) {
this.f27653a = i;
this.f27654b = bArr;
}
public final boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof xb)) {
return false;
}
xb xbVar = (xb) obj;
return this.f27653a == xbVar.f27653a && Arrays.equals(this.f27654b, xbVar.f27654b);
}
public final int hashCode() {
return ((this.f27653a + 527) * 31) + Arrays.hashCode(this.f27654b);
}
}
| [
"genius.ron@gmail.com"
] | genius.ron@gmail.com |
52572fb6e4549f10294ea1ad9a6dee2129116aa8 | 90c093f59ba5e001f778ecf7beaacd6185c464d0 | /src/com/eviware/soapui/support/swing/TreeUtils.java | f4ec4fc707495b60c990f16175802d2c217fa587 | [
"MIT"
] | permissive | juozasg/suis4j | b8c74811843cc9dfb16b3ee07fccfd7c1230f091 | 1c9f24bfc5ca98fd32882feb76c6e90440e1bcf0 | refs/heads/master | 2020-03-08T05:39:16.180735 | 2018-04-10T21:57:32 | 2018-04-10T21:57:32 | 127,952,899 | 0 | 0 | MIT | 2018-04-03T18:40:49 | 2018-04-03T18:40:49 | null | UTF-8 | Java | false | false | 1,567 | java | /*
* SoapUI, Copyright (C) 2004-2016 SmartBear Software
*
* Licensed under the EUPL, Version 1.1 or - as soon as they will be approved by the European Commission - subsequen
* versions of the EUPL (the "Licence");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://ec.europa.eu/idabc/eupl
*
* Unless required by applicable law or agreed to in writing, software distributed under the Licence is
* distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the Licence for the specific language governing permissions and limitations
* under the Licence.
*/
package com.eviware.soapui.support.swing;
import javax.swing.JTree;
import javax.swing.tree.TreeNode;
import javax.swing.tree.TreePath;
import java.util.Enumeration;
/**
*
*/
public class TreeUtils {
public static void expandAll(JTree tree, TreePath parent, boolean expand) {
// Traverse children
TreeNode node = (TreeNode) parent.getLastPathComponent();
if (node.getChildCount() >= 0) {
for (Enumeration e = node.children(); e.hasMoreElements(); ) {
TreeNode n = (TreeNode) e.nextElement();
TreePath path = parent.pathByAddingChild(n);
expandAll(tree, path, expand);
}
}
// Expansion or collapse must be done bottom-up
if (expand) {
tree.expandPath(parent);
} else {
tree.collapsePath(parent);
}
}
}
| [
"juozasgaigalas@gmail.com"
] | juozasgaigalas@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.