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
6a36db3522a8dc77c6fb592e1a23d489516d9137
8f322f02a54dd5e012f901874a4e34c5a70f5775
/src/main/java/PTUCharacterCreator/Abilities/Normalize.java
fd2c03d6843f397dc31279774dfe0fef5188ffb8
[]
no_license
BMorgan460/PTUCharacterCreator
3514a4040eb264dec69aee90d95614cb83cb53d8
e55f159587f2cb8d6d7b456e706f910ba5707b14
refs/heads/main
2023-05-05T08:26:04.277356
2021-05-13T22:11:25
2021-05-13T22:11:25
348,419,608
0
0
null
null
null
null
WINDOWS-1250
Java
false
false
326
java
package PTUCharacterCreator.Abilities; import PTUCharacterCreator.Ability; public class Normalize extends Ability { { name = "Normalize"; freq = "Static"; effect = "Trigger: \nEffect: All Moves performed by the Pokémon are considered Normal Type instead of whatever Type they normally are."; } public Normalize(){} }
[ "alaskablake460@gmail.com" ]
alaskablake460@gmail.com
bb129e0987d25a4e09349e1a85d68054e110906b
d1c68ebfc742ec1be552aefc79b7b2ee43c83c51
/src/main/java/com/zhang/eslearn/EsLearnApplication.java
65394375edcca47b7fb92f0784dbb37a3b48e57c
[]
no_license
zzwind5/es-learn
29e8ac58b1de4c865a8368b593e79c7b8964668c
c8d626943e7076e0571a4030cca8531dcd85a7fb
refs/heads/master
2020-03-28T10:03:54.743590
2018-09-17T08:19:22
2018-09-17T08:19:22
148,080,433
0
0
null
null
null
null
UTF-8
Java
false
false
311
java
package com.zhang.eslearn; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class EsLearnApplication { public static void main(String[] args) { SpringApplication.run(EsLearnApplication.class, args); } }
[ "zjie@aerohive.com" ]
zjie@aerohive.com
037af33a186105444d6dbc74a7aa5e3a518b2c5f
b2f6e3f57a3a3149e1bb4dc6126ed1df9a353ed0
/org.summer.sdt.core/search/org/summer/sdt/core/search/TypeNameMatch.java
b7f03511e35a1a1523cac6b628675acf6d8b6716
[]
no_license
zwgirl/summer-javacc
f561b50faaf08b21779fbc4c2483bdaadf9b27a6
d9414aaf63465bf73d2379d4e64ced768135d4f9
refs/heads/master
2020-12-25T19:04:14.226032
2014-07-30T01:30:34
2014-07-30T01:30:34
22,399,252
1
0
null
null
null
null
UTF-8
Java
false
false
4,855
java
/******************************************************************************* * Copyright (c) 2000, 2010 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.summer.sdt.core.search; import org.summer.sdt.core.*; /** * A match collected while {@link SearchEngine searching} for * all type names methods using a {@link TypeNameRequestor requestor}. * <p> * The type of this match is available from {@link #getType()}. * </p> * * @noextend This class is not intended to be subclassed by clients. * * @see TypeNameMatchRequestor * @see SearchEngine#searchAllTypeNames(char[], int, char[], int, int, IJavaSearchScope, TypeNameMatchRequestor, int, org.eclipse.core.runtime.IProgressMonitor) * @see SearchEngine#searchAllTypeNames(char[][], char[][], IJavaSearchScope, TypeNameMatchRequestor, int, org.eclipse.core.runtime.IProgressMonitor) * @since 3.3 */ public abstract class TypeNameMatch { /** * Returns the accessibility of the type name match * * @see IAccessRule * * @return the accessibility of the type name which may be * {@link IAccessRule#K_ACCESSIBLE}, {@link IAccessRule#K_DISCOURAGED} * or {@link IAccessRule#K_NON_ACCESSIBLE}. * The default returned value is {@link IAccessRule#K_ACCESSIBLE}. * * @since 3.6 */ public abstract int getAccessibility(); /** * Returns the matched type's fully qualified name using '.' character * as separator (e.g. package name + '.' enclosing type names + '.' simple name). * * @see #getType() * @see IType#getFullyQualifiedName(char) * * @throws NullPointerException if matched type is <code> null</code> * @return Fully qualified type name of the type */ public String getFullyQualifiedName() { return getType().getFullyQualifiedName('.'); } /** * Returns the modifiers of the matched type. * <p> * This is a handle-only method as neither Java Model nor classpath * initialization is done while calling this method. * * @return the type modifiers */ public abstract int getModifiers(); /** * Returns the package fragment root of the stored type. * Package fragment root cannot be null and <strong>does</strong> exist. * * @see #getType() * @see IJavaElement#getAncestor(int) * * @throws NullPointerException if matched type is <code> null</code> * @return the existing java model package fragment root (i.e. cannot be <code>null</code> * and will return <code>true</code> to <code>exists()</code> message). */ public IPackageFragmentRoot getPackageFragmentRoot() { return (IPackageFragmentRoot) getType().getAncestor(IJavaElement.PACKAGE_FRAGMENT_ROOT); } /** * Returns the package name of the stored type. * * @see #getType() * @see IType#getPackageFragment() * * @throws NullPointerException if matched type is <code> null</code> * @return the package name */ public String getPackageName() { return getType().getPackageFragment().getElementName(); } /** * Returns the name of the stored type. * * @see #getType() * @see IJavaElement#getElementName() * * @throws NullPointerException if matched type is <code> null</code> * @return the type name */ public String getSimpleTypeName() { return getType().getElementName(); } /** * Returns a java model type handle. * This handle may exist or not, but is not supposed to be <code>null</code>. * <p> * This is a handle-only method as neither Java Model nor classpath * initializations are done while calling this method. * * @see IType * @return the non-null handle on matched java model type. */ public abstract IType getType(); /** * Name of the type container using '.' character * as separator (e.g. package name + '.' + enclosing type names). * * @see #getType() * @see IMember#getDeclaringType() * * @throws NullPointerException if matched type is <code> null</code> * @return name of the type container */ public String getTypeContainerName() { IType outerType = getType().getDeclaringType(); if (outerType != null) { return outerType.getFullyQualifiedName('.'); } else { return getType().getPackageFragment().getElementName(); } } /** * Returns the matched type's type qualified name using '.' character * as separator (e.g. enclosing type names + '.' + simple name). * * @see #getType() * @see IType#getTypeQualifiedName(char) * * @throws NullPointerException if matched type is <code> null</code> * @return fully qualified type name of the type */ public String getTypeQualifiedName() { return getType().getTypeQualifiedName('.'); } }
[ "1141196380@qq.com" ]
1141196380@qq.com
b0fa53c22daa3976e06e848dd0d22fcc2a5bb976
7a504369f46c2d789184993cdd82a71c14230f99
/client-api/src/main/java/io/github/ma1uta/matrix/client/model/account/RegisterRequest.java
d109c27e7acf4a953f46f083b52871801639f67c
[ "Apache-2.0" ]
permissive
dhavalmshah/jeon
dcb5cc44264ef025f1d3cf964091ae183b176e74
81d3ffb1a7d5fd7b7e845d89757fd250a3054787
refs/heads/master
2020-09-29T12:33:30.607039
2019-12-10T06:14:24
2019-12-10T06:14:24
227,038,282
0
0
Apache-2.0
2019-12-10T05:43:28
2019-12-10T05:43:27
null
UTF-8
Java
false
false
5,915
java
/* * Copyright sablintolya@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.github.ma1uta.matrix.client.model.account; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; import javax.json.bind.annotation.JsonbProperty; /** * Request for register for an account on this homeserver. */ @Schema( description = "Request for register for an account on this homeserver." ) public class RegisterRequest { /** * Additional authentication information for the user-interactive authentication API. Note that this information is not used * to define how the registered user should be authenticated, but is instead used to authenticate the register call itself. * It should be left empty, or omitted, unless an earlier call returned an response with status code 401. */ @Schema( description = "Additional authentication information for the user-interactive authentication API." + " Note that this information is not used to define how the registered user should be authenticated, but" + " is instead used to authenticate the register call itself. It should be left empty, or omitted, unless" + " an earlier call returned an response with status code 401." ) private AuthenticationData auth; /** * If true, the server binds the email used for authentication to the Matrix ID with the ID Server. */ @Schema( description = "If true, the server binds the email used for authentication to the Matrix ID with the ID Server." ) @JsonbProperty("bind_email") private Boolean bindEmail; /** * If true, the server binds the phone number used for authentication to the Matrix ID with the identity server. */ @Schema( description = "If true, the server binds the phone number used for authentication to the Matrix ID with the identity server." ) @JsonbProperty("bind_msisdn") private Boolean bindMsisdn; /** * The basis for the localpart of the desired Matrix ID. If omitted, the homeserver MUST generate a Matrix ID local part. */ @Schema( description = "The basis for the localpart of the desired Matrix ID. If omitted, the homeserver MUST generate a" + " Matrix ID local part." ) private String username; /** * The desired password for the account. */ @Schema( description = "The desired password for the account." ) private char[] password; /** * ID of the client device. If this does not correspond to a known client device, a new device will be created. * The server will auto-generate a device_id if this is not specified. */ @Schema( description = "ID of the client device. If this does not correspond to a known client device, a new device will be created." + " The server will auto-generate a device_id if this is not specified." ) @JsonbProperty("device_id") private String deviceId; /** * A display name to assign to the newly-created device. Ignored if device_id corresponds to a known device. */ @Schema( description = "A display name to assign to the newly-created device. Ignored if device_id corresponds to a known device." ) @JsonbProperty("initial_device_display_name") private String initialDeviceDisplayName; /** * If true, an access_token and device_id should not be returned from this call, therefore preventing an automatic login. * Defaults to false. */ @Schema( description = "If true, an access_token and device_id should not be returned from this call, therefore preventing" + " an automatic login." ) @JsonbProperty("inhibit_login") private Boolean inhibitLogin; public AuthenticationData getAuth() { return auth; } public void setAuth(AuthenticationData auth) { this.auth = auth; } @JsonProperty("bind_email") public Boolean getBindEmail() { return bindEmail; } public void setBindEmail(Boolean bindEmail) { this.bindEmail = bindEmail; } @JsonProperty("bind_msisdn") public Boolean getBindMsisdn() { return bindMsisdn; } public void setBindMsisdn(Boolean bindMsisdn) { this.bindMsisdn = bindMsisdn; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public char[] getPassword() { return password; } public void setPassword(char[] password) { this.password = password; } @JsonProperty("device_id") public String getDeviceId() { return deviceId; } public void setDeviceId(String deviceId) { this.deviceId = deviceId; } @JsonProperty("initial_device_display_name") public String getInitialDeviceDisplayName() { return initialDeviceDisplayName; } public void setInitialDeviceDisplayName(String initialDeviceDisplayName) { this.initialDeviceDisplayName = initialDeviceDisplayName; } @JsonProperty("inhibit_login") public Boolean getInhibitLogin() { return inhibitLogin; } public void setInhibitLogin(Boolean inhibitLogin) { this.inhibitLogin = inhibitLogin; } }
[ "sablintolya@gmail.com" ]
sablintolya@gmail.com
9df42618bc7c617eac899d0869e9ba367c47bc9f
e242dc6439a181c053b38a86da670313892ba856
/src/main/java/com/tts/state/Opened.java
d8c355cb0d35b92f6e5222c6d4310bbd641fa537
[]
no_license
rpplayground/TTS_Bootcamp_SummerFall2019
e80674bc97d3474b08260f38a603a32713c5527d
0a8bbef1216b5a7d177a8668e274f41b5a417465
refs/heads/master
2020-09-09T23:44:51.526558
2019-09-13T19:55:15
2019-09-13T19:55:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
470
java
package com.tts.state; public class Opened implements DoorState { private static Opened instance = new Opened(); private Opened() { } public static Opened getInstance() { return instance; } @Override public DoorState open() { System.out.println("Already opened"); return this; } @Override public DoorState close() { System.out.println("Closing door"); return Closed.getInstance(); } }
[ "ken.kousen@kousenit.com" ]
ken.kousen@kousenit.com
9e26068f894ab46cb46f4243877b09359e2ea3ca
ec9bf57a07b7b06134ec7a21407a11f69cc644f7
/src/com/ubercab/rider/realtime/model/ReverseGeocode.java
fe870594750217f16c52defed0bc4c8cdacb355f
[]
no_license
jzarca01/com.ubercab
f95c12cab7a28f05e8f1d1a9d8a12a5ac7fbf4b1
e6b454fb0ad547287ae4e71e59d6b9482369647a
refs/heads/master
2020-06-21T04:37:43.723581
2016-07-19T16:30:34
2016-07-19T16:30:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
618
java
package com.ubercab.rider.realtime.model; import com.ubercab.rider.realtime.validator.RealtimeValidatorFactory; import lzo; @lzo(a=RealtimeValidatorFactory.class) public abstract interface ReverseGeocode { public abstract double getLatitude(); public abstract String getLongAddress(); public abstract double getLongitude(); public abstract String getNickname(); public abstract String getShortAddress(); public abstract String getUuid(); } /* Location: * Qualified Name: com.ubercab.rider.realtime.model.ReverseGeocode * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
d3f46dc611472078854ef4fafa8888020e2d65ca
0b547b288520cba0fac9c479d6ecb6941dd51221
/sk.stuba.fiit.perconik.core/src/sk/stuba/fiit/perconik/core/resources/PageHandler.java
e25d7a41e85e01475fa475aa591cbe5d3704afe2
[ "MIT" ]
permissive
anukat2015/perconik
d1e25bdf9be2008723fb6e88943f7d7dc0dfaff8
d80dc0c29df4e3faf318ee18adcaa8f03bb50aab
refs/heads/master
2020-04-05T19:02:48.852160
2016-06-16T09:59:14
2016-06-16T09:59:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
551
java
package sk.stuba.fiit.perconik.core.resources; import sk.stuba.fiit.perconik.core.listeners.PageListener; import sk.stuba.fiit.perconik.core.resources.PageHook.Support; enum PageHandler implements Handler<PageListener> { INSTANCE; private final Support support = new Support(); public void register(final PageListener listener) { this.support.hook(DefaultResources.getWindowResource(), listener); } public void unregister(final PageListener listener) { this.support.unhook(DefaultResources.getWindowResource(), listener); } }
[ "pavol.zbell@gmail.com" ]
pavol.zbell@gmail.com
67c7001809eb330a535a9da1aed49000ec269905
2f4a058ab684068be5af77fea0bf07665b675ac0
/utils/com/facebook/analytics/AnalyticsModule$ReliabilityAnalyticsLoggerProvider.java
50c644c66aa5761622c121f43df57c51dd60b46a
[]
no_license
cengizgoren/facebook_apk_crack
ee812a57c746df3c28fb1f9263ae77190f08d8d2
a112d30542b9f0bfcf17de0b3a09c6e6cfe1273b
refs/heads/master
2021-05-26T14:44:04.092474
2013-01-16T08:39:00
2013-01-16T08:39:00
8,321,708
1
0
null
null
null
null
UTF-8
Java
false
false
663
java
package com.facebook.analytics; import com.facebook.orca.inject.AbstractProvider; class AnalyticsModule$ReliabilityAnalyticsLoggerProvider extends AbstractProvider<ReliabilityAnalyticsLogger> { private AnalyticsModule$ReliabilityAnalyticsLoggerProvider(AnalyticsModule paramAnalyticsModule) { } public ReliabilityAnalyticsLogger a() { return new ReliabilityAnalyticsLogger((AnalyticsLogger)b(AnalyticsLogger.class)); } } /* Location: /data1/software/apk2java/dex2jar-0.0.9.12/secondary-1.dex_dex2jar.jar * Qualified Name: com.facebook.analytics.AnalyticsModule.ReliabilityAnalyticsLoggerProvider * JD-Core Version: 0.6.2 */
[ "macluz@msn.com" ]
macluz@msn.com
d7abf94349ada4edbc8db46f8d480d3ce04cf5ba
fdcf2af8597b33110799fed80bb7303fbc7c06e2
/spring_tran02/src/main/java/org/javaboy/spring_tran02/AccountService.java
2c69756c894bfc96f6aec201ee224a286ed65cf0
[]
no_license
MrDongShan/javaboy-code-samples
82b5ecf245cf14e693ee8e4f14d002572c01f4f2
5e7af1d93a4acc6c50c2ca5ec1e80ee9da42d057
refs/heads/master
2023-07-06T02:48:08.621361
2023-05-14T14:01:53
2023-05-14T14:01:53
245,963,632
0
0
null
null
null
null
UTF-8
Java
false
false
816
java
package org.javaboy.spring_tran02; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; /** * @author 江南一点雨 * @微信公众号 江南一点雨 * @网站 http://www.itboyhub.com * @国际站 http://www.javaboy.org * @微信 a_java_boy * @GitHub https://github.com/lenve * @Gitee https://gitee.com/lenve */ @Service public class AccountService { @Autowired JdbcTemplate jdbcTemplate; @Transactional(propagation = Propagation.REQUIRES_NEW) public void handle1() { jdbcTemplate.update("update user set money = ? where id=?;", 1, 2); } }
[ "wangsong0210@gmail.com" ]
wangsong0210@gmail.com
051d84b4e57451e85c063ee602bff58df40c296c
e586b2d10efd34152b68738c68a4579a04576a2c
/cc-control-ui/src/main/java/cc/creativecomputing/controlui/timeline/controller/TrackContext.java
96ac480e55d613a50d2230debcc6da5f253a8e14
[]
no_license
dtbinh/creativecomputing
69dd85920483f816977ae2c469508fbb96742af8
626b797ce90e34e84c55877e2fdf9f6e4fd48cdd
refs/heads/master
2021-01-11T15:37:20.691423
2017-01-23T17:10:40
2017-01-23T17:10:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,903
java
/* * Copyright (c) 2012 Christian Riekoff <info@texone.org> * * This file is free software: you may copy, redistribute and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 2 of the License, or (at your * option) any later version. * * This file is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * * This file incorporates work covered by the following copyright and * permission notice: */ package cc.creativecomputing.controlui.timeline.controller; import cc.creativecomputing.control.timeline.point.ControlPoint; import cc.creativecomputing.controlui.timeline.controller.track.TrackController; /** * The TrackContext is used to share informations between a number of tracks * @author christianriekoff * */ public class TrackContext implements Zoomable{ protected double _myLowerBound; protected double _myUpperBound; protected CCZoomController _myZoomController; protected ToolController _myToolController; protected CurveToolController _myCurveToolController; public TrackContext() { _myZoomController = new CCZoomController(); _myToolController = new ToolController(this); _myCurveToolController = new CurveToolController(this); _myZoomController.addZoomable(this); _myLowerBound = 0; _myUpperBound = 1; } public CurveToolController curveTool() { return _myCurveToolController; } public double defaultValue(TrackController theTrackController) { return 0; } /** * Snaps the time of the given point to the raster of this context. This is called quantization. * @param thePoint * @return */ public ControlPoint quantize(ControlPoint thePoint) { return thePoint; } public double quantize(double theTime) { return theTime; } public double lowerBound() { return _myLowerBound; } public double upperBound() { return _myUpperBound; } public double viewTime() { return _myUpperBound - _myLowerBound; } /** * Controller for track zooming * @return */ public CCZoomController zoomController() { return _myZoomController; } @Override public void setRange(double theLowerBound, double theUpperBound) { if (theLowerBound > theUpperBound) { double tmp = theLowerBound; theLowerBound = theUpperBound; theUpperBound = tmp; } _myLowerBound = theLowerBound; _myUpperBound = theUpperBound; } public void render(){ } }
[ "info@texone.org" ]
info@texone.org
49f42ee07aea13442ab90a9f85c25cc4cdd4943d
f82bcfb9afe11e2ebad32054c887a2eb524ad006
/dentaku-metadata-service/src/java/org/omg/java/cwm/analysis/transformation/ClassifierFeatureMapClass.java
fedf3889671f74b8c0afaca1bcb363e90aca5a58
[ "BSD-3-Clause", "Apache-2.0" ]
permissive
codehaus/dentaku
8655e76c29e207156f175fd61360fe270bc528d7
c916d029069b84ee444d3606fa28db79cf5a6ba8
refs/heads/master
2023-07-20T00:36:04.244855
2006-03-18T06:43:18
2006-03-18T06:43:18
36,364,422
1
0
null
null
null
null
UTF-8
Java
false
false
636
java
/* * Java(TM) OLAP Interface */ package org.omg.java.cwm.analysis.transformation; public interface ClassifierFeatureMapClass extends javax.jmi.reflect.RefClass { public org.omg.java.cwm.analysis.transformation.ClassifierFeatureMap createClassifierFeatureMap( java.lang.String _name, org.omg.java.cwm.objectmodel.core.VisibilityKind _visibility, org.omg.java.cwm.objectmodel.core.ProcedureExpression _function, java.lang.String _functionDescription, boolean _classifierToFeature ) throws javax.jmi.reflect.JmiException; public org.omg.java.cwm.analysis.transformation.ClassifierFeatureMap createClassifierFeatureMap(); }
[ "topping@51e4faab-3f0f-0410-8d7f-865566f634a9" ]
topping@51e4faab-3f0f-0410-8d7f-865566f634a9
1b044b163cb169e4e3265ba3e21038702df624f5
7826588e64bb04dfb79c8262bad01235eb409b3d
/proxies/com/microsoft/bingads/v13/adinsight/Char.java
69cdbbd2aec2e987725b45c5895a07401d790680
[ "MIT" ]
permissive
BingAds/BingAds-Java-SDK
dcd43e5a1beeab0b59c1679da1151d7dd1658d50
a3d904bbf93a0a93d9c117bfff40f6911ad71d2f
refs/heads/main
2023-08-28T13:48:34.535773
2023-08-18T06:41:51
2023-08-18T06:41:51
29,510,248
33
44
NOASSERTION
2023-08-23T01:29:18
2015-01-20T03:40:03
Java
UTF-8
Java
false
false
1,043
java
package com.microsoft.bingads.v13.adinsight; import jakarta.xml.bind.annotation.XmlAccessType; import jakarta.xml.bind.annotation.XmlAccessorType; import jakarta.xml.bind.annotation.XmlType; import jakarta.xml.bind.annotation.XmlValue; /** * <p>Java class for char simple type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre>{@code * <simpleType name="char"> * <restriction base="{http://www.w3.org/2001/XMLSchema}int"> * </restriction> * </simpleType> * }</pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "char", namespace = "http://schemas.microsoft.com/2003/10/Serialization/", propOrder = { "value" }) public class Char { @XmlValue protected int value; /** * Gets the value of the value property. * */ public int getValue() { return value; } /** * Sets the value of the value property. * */ public void setValue(int value) { this.value = value; } }
[ "qitia@microsoft.com" ]
qitia@microsoft.com
fa6ba75007c29afb766d9408ca484bd1a66282fd
02127aef528ff9ba18ae478f481ab37cf3c2fb4c
/src/main/java/com/wanliang/small/entity/DeliveryCenter.java
713c88c473377d032fc31908bdd0ac37c8b6ed6c
[]
no_license
pf5512/small
2f2c78a9fcc7f0fc9df56fb4d251df49ea037ae8
923eda30e9c85214a9efb78fc3750b7fc3e572d4
refs/heads/master
2021-01-01T06:53:32.059039
2015-04-13T01:15:50
2015-04-13T01:15:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,365
java
package com.wanliang.small.entity; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.ManyToOne; import javax.persistence.PrePersist; import javax.persistence.PreUpdate; import javax.persistence.SequenceGenerator; import javax.persistence.Table; import javax.validation.constraints.NotNull; import org.hibernate.validator.constraints.Length; import org.hibernate.validator.constraints.NotEmpty; /** * Entity - 发货点 * * @author wan_liang@126.com Team * @version 3.0 */ @Entity @Table(name = "xx_delivery_center") @SequenceGenerator(name = "sequenceGenerator", sequenceName = "xx_delivery_center_sequence") public class DeliveryCenter extends BaseEntity { private static final long serialVersionUID = 3328996121729039075L; /** 名称 */ private String name; /** 联系人 */ private String contact; /** 地区名称 */ private String areaName; /** 地址 */ private String address; /** 邮编 */ private String zipCode; /** 电话 */ private String phone; /** 手机 */ private String mobile; /** 备注 */ private String memo; /** 是否默认 */ private Boolean isDefault; /** 地区 */ private Area area; /** * 获取名称 * * @return 名称 */ @NotEmpty @Length(max = 200) @Column(nullable = false) public String getName() { return name; } /** * 设置名称 * * @param name * 名称 */ public void setName(String name) { this.name = name; } /** * 获取联系人 * * @return 联系人 */ @NotEmpty @Length(max = 200) @Column(nullable = false) public String getContact() { return contact; } /** * 设置联系人 * * @param contact * 联系人 */ public void setContact(String contact) { this.contact = contact; } /** * 获取地区名称 * * @return 地区名称 */ @Column(nullable = false) public String getAreaName() { return areaName; } /** * 设置地区名称 * * @param areaName * 地区名称 */ public void setAreaName(String areaName) { this.areaName = areaName; } /** * 获取地址 * * @return 地址 */ @NotEmpty @Length(max = 200) @Column(nullable = false) public String getAddress() { return address; } /** * 设置地址 * * @param address * 地址 */ public void setAddress(String address) { this.address = address; } /** * 获取邮编 * * @return 邮编 */ @Length(max = 200) public String getZipCode() { return zipCode; } /** * 设置邮编 * * @param zipCode * 邮编 */ public void setZipCode(String zipCode) { this.zipCode = zipCode; } /** * 获取电话 * * @return 电话 */ @Length(max = 200) public String getPhone() { return phone; } /** * 设置电话 * * @param phone * 电话 */ public void setPhone(String phone) { this.phone = phone; } /** * 获取手机 * * @return 手机 */ @Length(max = 200) public String getMobile() { return mobile; } /** * 设置手机 * * @param mobile * 手机 */ public void setMobile(String mobile) { this.mobile = mobile; } /** * 获取备注 * * @return 备注 */ @Length(max = 200) public String getMemo() { return memo; } /** * 设置备注 * * @param memo * 备注 */ public void setMemo(String memo) { this.memo = memo; } /** * 获取是否默认 * * @return 是否默认 */ @NotNull @Column(nullable = false) public Boolean getIsDefault() { return isDefault; } /** * 设置是否默认 * * @param isDefault * 是否默认 */ public void setIsDefault(Boolean isDefault) { this.isDefault = isDefault; } /** * 获取地区 * * @return 地区 */ @NotNull @ManyToOne(fetch = FetchType.LAZY) public Area getArea() { return area; } /** * 设置地区 * * @param area * 地区 */ public void setArea(Area area) { this.area = area; } /** * 持久化前处理 */ @PrePersist public void prePersist() { if (getArea() != null) { setAreaName(getArea().getFullName()); } } /** * 更新前处理 */ @PreUpdate public void preUpdate() { if (getArea() != null) { setAreaName(getArea().getFullName()); } } }
[ "wan_liang@126.com" ]
wan_liang@126.com
2c692eed8e080a27e67795be0204c6c4fa91f0ce
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
/large/module1079_public/tests/more/src/java/module1079_public_tests_more/a/Foo2.java
8e0ba4914b813605ac995ffae704b9d2330de36b
[ "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,692
java
package module1079_public_tests_more.a; import javax.net.ssl.*; import javax.rmi.ssl.*; import java.awt.datatransfer.*; /** * 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 javax.management.Attribute * @see javax.naming.directory.DirContext * @see javax.net.ssl.ExtendedSSLSession */ @SuppressWarnings("all") public abstract class Foo2<M> extends module1079_public_tests_more.a.Foo0<M> implements module1079_public_tests_more.a.IFoo2<M> { javax.rmi.ssl.SslRMIClientSocketFactory f0 = null; java.awt.datatransfer.DataFlavor f1 = null; java.beans.beancontext.BeanContext f2 = null; public M element; public static Foo2 instance; public static Foo2 getInstance() { return instance; } public static <T> T create(java.util.List<T> input) { return module1079_public_tests_more.a.Foo0.create(input); } public String getName() { return module1079_public_tests_more.a.Foo0.getInstance().getName(); } public void setName(String string) { module1079_public_tests_more.a.Foo0.getInstance().setName(getName()); return; } public M get() { return (M)module1079_public_tests_more.a.Foo0.getInstance().get(); } public void set(Object element) { this.element = (M)element; module1079_public_tests_more.a.Foo0.getInstance().set(this.element); } public M call() throws Exception { return (M)module1079_public_tests_more.a.Foo0.getInstance().call(); } }
[ "gwagenknecht@salesforce.com" ]
gwagenknecht@salesforce.com
dc2995e66d92d1d7a495439fef3324a0f64c40e0
608ef2e714347773f713bf03b755cdf349c258e6
/commonactivity/src/main/java/com/syl/commonactivity/base/BaseFragment.java
f64532e6dc12361ea7b1bdb8567735728479dc43
[]
no_license
Icarours/BasicSummary
cdb853e5e681b2a7c09ed8b47ce43af02ed308fc
d2df7d62f6ef33b60d9ac104c92bcce53f4a6b5b
refs/heads/master
2021-01-21T17:39:25.351534
2017-06-09T14:21:22
2017-06-09T14:21:22
91,821,036
0
0
null
null
null
null
UTF-8
Java
false
false
1,499
java
package com.syl.commonactivity.base; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; /** * Created by Bright on 2017/4/19. * * @Describe * @Called */ public abstract class BaseFragment extends Fragment { private View mRootView; @Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Override public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); initData();//初始化Fragment页面显示之前的一些数据 initView();//初始化Fragment页面中的视图 initListener();//设置监听 } /** * 必须提供一个根视图 * * @return */ public abstract View initRootView(); /** * 交给子类实现 */ public abstract void initView(); /** * 交给子类实现 */ public abstract void initListener(); /** * 交给子类实现 */ public abstract void initData(); @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { if (savedInstanceState == null && mRootView == null) { mRootView = initRootView(); } return mRootView; } }
[ "j376787348@163.com" ]
j376787348@163.com
7469a188bdc0cd17394ea38344c2c61bae16eed8
e82c1473b49df5114f0332c14781d677f88f363f
/MED-CLOUD/med-data/src/main/java/nta/med/data/dao/medi/ocs/impl/Ocs0223RepositoryImpl.java
437a00a0f8478b2c760ed78f346668721cdf2e78
[]
no_license
zhiji6/mih
fa1d2279388976c901dc90762bc0b5c30a2325fc
2714d15853162a492db7ea8b953d5b863c3a8000
refs/heads/master
2023-08-16T18:35:19.836018
2017-12-28T09:33:19
2017-12-28T09:33:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,625
java
package nta.med.data.dao.medi.ocs.impl; import java.util.List; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.Query; import nta.med.core.infrastructure.mapper.JpaResultMapper; import nta.med.data.dao.medi.ocs.Ocs0223RepositoryCustom; import nta.med.data.model.ihis.ocsa.OCS0223U00GrdOCS0223Info; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.util.StringUtils; /** * @author dainguyen. */ public class Ocs0223RepositoryImpl implements Ocs0223RepositoryCustom { private static final Log LOG = LogFactory.getLog(Ocs0223RepositoryImpl.class); @PersistenceContext private EntityManager entityManager; public List<OCS0223U00GrdOCS0223Info> getOCS0223U00GrdOCS0223Info(String hospitalCode, String language, String jundalPart){ StringBuilder sql = new StringBuilder(); sql.append("SELECT B.CODE JUNDAL_PART, "); sql.append(" B.CODE_NAME JUNDAL_PART_NAME, "); sql.append(" A.SEQ, "); sql.append(" A.SERIAL, "); sql.append(" A.COMMENT_TITLE, "); sql.append(" A.COMMENT_TEXT "); sql.append("FROM OCS0132 B "); sql.append(" , OCS0223 A "); sql.append("WHERE A.HOSP_CODE = :hospitalCode "); sql.append(" AND B.LANGUAGE = :language "); if (!StringUtils.isEmpty(jundalPart)) { sql.append(" AND A.JUNDAL_PART LIKE :jundal_part "); } sql.append(" AND B.CODE_TYPE = 'OCS_ACT_SYSTEM' "); sql.append(" AND B.HOSP_CODE = A.HOSP_CODE "); sql.append(" AND B.CODE = A.JUNDAL_PART "); sql.append("ORDER BY B.SORT_KEY, JUNDAL_PART_NAME, A.SERIAL, A.COMMENT_TITLE "); Query query = entityManager.createNativeQuery(sql.toString()); query.setParameter("hospitalCode", hospitalCode); query.setParameter("language", language); if (!StringUtils.isEmpty(jundalPart)) { query.setParameter("jundal_part", "%" + jundalPart + "%"); } List<OCS0223U00GrdOCS0223Info> list = new JpaResultMapper().list(query, OCS0223U00GrdOCS0223Info.class); return list; } }
[ "duc_nt@nittsusystem-vn.com" ]
duc_nt@nittsusystem-vn.com
8252cab7a6483c7160cd06739ee19d724a55bd6e
d8697d4b2a73d19f76fd71d690097a9267ec9e75
/Expass4/REST/src/main/java/REST/DAO.java
e383f70457ee4a4dd76194baaa7daeed6609e934
[]
no_license
sei019/DAT250
b48cdac991c089bcdeba3a8f25aba808d96f2f37
9f47a3e2d850c300ece17d913c90712ff89127c6
refs/heads/master
2023-01-12T11:59:36.359251
2020-11-17T02:42:58
2020-11-17T02:42:58
290,326,026
0
0
null
null
null
null
UTF-8
Java
false
false
1,240
java
package REST; import basicexample.Todo; import javax.persistence.Query; import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; import javax.persistence.Persistence; import java.util.List; public class DAO { private EntityManager entityManager; public DAO() { EntityManagerFactory factory = Persistence.createEntityManagerFactory("todos"); entityManager = factory.createEntityManager(); } public List<Todo> read() { Query q = entityManager.createQuery("Select t from Todo t"); return q.getResultList(); } public Todo read(long id) { return entityManager.find(Todo.class, id); } public void create(Todo todo) { entityManager.getTransaction().begin(); entityManager.persist(todo); entityManager.getTransaction().commit(); } public void delete(long id) { Todo todo = entityManager.find(Todo.class, id); entityManager.getTransaction().begin(); entityManager.remove(todo); entityManager.getTransaction().commit(); } public void update(Todo todo) { entityManager.getTransaction().begin(); entityManager.merge(todo); entityManager.getTransaction().commit(); } }
[ "-" ]
-
f12627b13e21285ea1c73ccee38fd6d30a4b67b4
ba0657f835fe4a2fb0b0524ad2a38012be172bc8
/src/main/java/algorithms/codingame/thegift/TheGift.java
360cf438d30d601482030c8d4a85fc44d72e7d3f
[]
no_license
jsdumas/java-dev-practice
bc2e29670dd6f1784b3a84f52e526a56a66bbba2
db85b830e7927fea863d95f5ea8baf8d3bdc448b
refs/heads/master
2020-12-02T16:28:41.081765
2017-12-08T23:10:53
2017-12-08T23:10:53
96,547,922
0
0
null
null
null
null
UTF-8
Java
false
false
1,107
java
package algorithms.codingame.thegift; import java.util.Arrays; public class TheGift { private int giftValue; private final int contributors; private final int[] contributorsBudget; public TheGift(int[] contributorsBudget, int giftValue) { this.contributors=contributorsBudget.length; this.contributorsBudget = contributorsBudget; this.giftValue = giftValue; } private String calculateParticipation() { String result=""; Arrays.sort(contributorsBudget); for (int contributorId = 0; contributorId < contributors; contributorId++) { int sharing = giftValue /(contributors-contributorId); Integer pay = Math.min(contributorsBudget[contributorId], sharing); result+=pay.toString(); if(contributorId!=contributors-1) { result+="\n"; } giftValue-=pay; } return result; } public String shareBudget() { int totalBudget = 0; for (int idContributor = 0; idContributor < contributors ; idContributor++) { totalBudget+=contributorsBudget[idContributor]; } if(totalBudget<giftValue) return "IMPOSSIBLE"; else return calculateParticipation(); } }
[ "jsdumas@free.fr" ]
jsdumas@free.fr
d5ca343a69841ab8fda253f91f53671f506f24ec
8fc353fcca109517b84f890df1f9e1f8a90adc78
/src/main/java/com/surekam/modules/sys/web/DictController.java
ddf20a443f2bdf281950e712eced157d7ef15f26
[]
no_license
yycGitHub/production-process
6ecd5ac15087288763cd8d7abe83d706f8f8e6f5
58a8628ef2f53164571b42f2629d23fb4b881e12
refs/heads/master
2022-12-08T16:55:34.955036
2020-08-31T09:03:34
2020-08-31T09:03:36
291,583,078
0
0
null
null
null
null
UTF-8
Java
false
false
3,272
java
/** * Copyright &copy; 2012-2013 <a href="https://github.com/sureserve/surekam">surekam</a> All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); */ package com.surekam.modules.sys.web; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.lang3.StringUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.mvc.support.RedirectAttributes; import com.surekam.common.config.Global; import com.surekam.common.persistence.Page; import com.surekam.common.web.BaseController; import com.surekam.modules.sys.entity.Dict; import com.surekam.modules.sys.service.DictService; /** * 字典Controller * @author sureserve * @version 2013-3-23 */ @Controller @RequestMapping(value = "${adminPath}/sys/dict") public class DictController extends BaseController { @Autowired private DictService dictService; @ModelAttribute public Dict get(@RequestParam(required=false) String id) { if (StringUtils.isNotBlank(id)){ return dictService.get(id); }else{ return new Dict(); } } @RequiresPermissions("sys:dict:view") @RequestMapping(value = {"list", ""}) public String list(Dict dict, HttpServletRequest request, HttpServletResponse response, Model model) { List<String> typeList = dictService.findTypeList(); model.addAttribute("typeList", typeList); Page<Dict> page = dictService.find(new Page<Dict>(request, response), dict); model.addAttribute("page", page); return "modules/sys/common/dictList"; } @RequiresPermissions("sys:dict:view") @RequestMapping(value = "form") public String form(Dict dict, Model model) { model.addAttribute("dict", dict); return "modules/sys/common/dictForm"; } @RequiresPermissions("sys:dict:edit") @RequestMapping(value = "save")//@Valid public String save(Dict dict, HttpServletRequest request, Model model, RedirectAttributes redirectAttributes) { if(Global.isDemoMode()){ addMessage(redirectAttributes, "演示模式,不允许操作!"); return "redirect:"+Global.getAdminPath()+"/sys/dict/?repage&type="+dict.getType(); } if (!beanValidator(model, dict)){ return form(dict, model); } dictService.save(dict); addMessage(redirectAttributes, "保存字典'" + dict.getLabel() + "'成功"); return "redirect:"+Global.getAdminPath()+"/sys/dict/?repage&type="+dict.getType(); } @RequiresPermissions("sys:dict:edit") @RequestMapping(value = "delete") public String delete(String id, RedirectAttributes redirectAttributes) { if(Global.isDemoMode()){ addMessage(redirectAttributes, "演示模式,不允许操作!"); return "redirect:"+Global.getAdminPath()+"/sys/dict/?repage"; } dictService.delete(id); addMessage(redirectAttributes, "删除字典成功"); return "redirect:"+Global.getAdminPath()+"/sys/dict/?repage"; } }
[ "2504477167@qq.com" ]
2504477167@qq.com
030c3340d4c52ce1327e81d443591403ccdafd4e
eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3
/tags/2010-06-20/seasar2-2.4.42/seasar2/s2-framework/src/main/java/org/seasar/framework/aop/interceptors/InvalidateSessionInterceptor.java
a61d6e8c7b8801a73791260e4c64b198c6accbfe
[ "Apache-2.0" ]
permissive
svn2github/s2container
54ca27cf0c1200a93e1cb88884eb8226a9be677d
625adc6c4e1396654a7297d00ec206c077a78696
refs/heads/master
2020-06-04T17:15:02.140847
2013-08-09T09:38:15
2013-08-09T09:38:15
10,850,644
0
1
null
null
null
null
UTF-8
Java
false
false
2,356
java
/* * Copyright 2004-2010 the Seasar Foundation and the Others. * * 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.seasar.framework.aop.interceptors; import java.util.Map; import org.aopalliance.intercept.MethodInvocation; import org.seasar.framework.container.ExternalContext; import org.seasar.framework.container.S2Container; import org.seasar.framework.container.filter.S2ContainerFilter; /** * メソッドの実行後にHTTPセッションを破棄するインターセプタです。 * <p> * 実際のHTTPセッションの破棄は、{@link S2ContainerFilter}によって行われます。 * </p> * * @author koichik * @see S2ContainerFilter */ public class InvalidateSessionInterceptor extends AbstractInterceptor { private static final long serialVersionUID = 1L; /** このコンポーネントを管理しているS2コンテナ */ protected S2Container container; /** * インスタンスを構築します。 * * @param container * このコンポーネントを管理しているS2コンテナ */ public InvalidateSessionInterceptor(S2Container container) { this.container = container.getRoot(); } public Object invoke(final MethodInvocation invocation) throws Throwable { final Object result = invocation.proceed(); invalidate(); return result; } /** * HTTPセッションを破棄します。 */ protected void invalidate() { final ExternalContext externalContext = container.getExternalContext(); if (externalContext != null) { final Map requestMap = externalContext.getRequestMap(); requestMap.put(S2ContainerFilter.INVALIDATE_SESSION, Boolean.TRUE); } } }
[ "koichik@319488c0-e101-0410-93bc-b5e51f62721a" ]
koichik@319488c0-e101-0410-93bc-b5e51f62721a
200eb1010afd3d2ab538662b5f49b0d9571c5b21
1a51f14e3356da0784cafa3da9812fd0ad186a52
/src/com/stock/userInfomation/UserInfomactonService.java
ac64efba7a80b65e04e846033cf9beaf391b9584
[]
no_license
heavendarren/tfkj_stock
5c25851ca3360a4c800f4cbc5639e8313d392c19
5ad5640293160ee40107887a53d6260a4c15f3d5
refs/heads/master
2020-11-29T14:44:07.613103
2017-04-07T02:29:52
2017-04-07T02:29:52
87,493,214
0
1
null
null
null
null
UTF-8
Java
false
false
1,260
java
package com.stock.userInfomation; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import com.hrbank.business.common.CommonDao; import com.hrbank.business.frame.BusinessService; import com.takucin.aceeci.frame.sql.DataRow; import com.takucin.aceeci.frame.sql.DataSet; import com.takucin.aceeci.frame.sql.ParameterSet; public class UserInfomactonService extends BusinessService{ private Log log = LogFactory.getLog(this.getClass()); private CommonDao dao = new CommonDao(); private ParameterSet getConditionParameterSet(UserInfomactonForm form){ ParameterSet set = new ParameterSet(); set.add("xiaoquname", "@xiaoquname", form.getXiaoqunameHidden()); set.add("yonghu", "@yonghu", form.getYonghuHidden()); set.add("dizi", "@dizi", form.getDizhiHidden()); // set.add("xiaoquname", "@xiaoquname", form.getXiaoquHidden()+ "%"); return set; } public DataSet<DataRow> getResult(UserInfomactonForm form, int first, int rows)throws Exception { return dao.executeQuery("GetUserInfomactonist",getConditionParameterSet(form), first, rows); } public int getResultCount(UserInfomactonForm form) throws Exception { return dao.executeQueryToCount("GetUserInfomactonCount",getConditionParameterSet(form)); } }
[ "heavendarren@126.com" ]
heavendarren@126.com
3a94fb950d107c50f30ef02366ccc42246c0846e
55821b09861478c6db214d808f12f493f54ff82a
/trunk/java.prj/ecc/src/com/dragonflow/Page/exchangeReportPage.java
25d991401a2fcbb8141137919e84a97fd547809e
[]
no_license
SiteView/ECC8.13
ede526a869cf0cb076cd9695dbc16075a1cf9716
bced98372138b09140dc108b33bb63f33ef769fe
refs/heads/master
2016-09-05T13:57:21.282048
2012-06-12T08:54:40
2012-06-12T08:54:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,683
java
/* * * Created on 2005-3-9 22:12:36 * * .java * * History: * */ package com.dragonflow.Page; import java.io.File; import java.io.StringWriter; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; import com.dragonflow.HTTP.HTTPRequestException; // Referenced classes of package com.dragonflow.Page: // CGI public class exchangeReportPage extends com.dragonflow.Page.CGI { public exchangeReportPage() { } public void printBody() throws java.lang.Exception { if (!request.actionAllowed("_tools")) { throw new HTTPRequestException(557); } else { java.lang.String s = request.getValue("file"); java.lang.String s1 = com.dragonflow.SiteView.Platform.getRoot() + java.io.File.separator + "dat" + java.io.File.separator + "monitors" + java.io.File.separator + "exchangetool.xsl"; javax.xml.transform.Transformer transformer = null; javax.xml.transform.TransformerFactory transformerfactory = javax.xml.transform.TransformerFactory .newInstance(); transformer = transformerfactory.newTransformer(new StreamSource( new File(s1))); java.io.StringWriter stringwriter = new StringWriter(); transformer.transform(new StreamSource(new File(s)), new StreamResult(stringwriter)); outputStream.println(stringwriter.toString()); outputStream.println("<br /><br />"); printFooter(outputStream); return; } } }
[ "136122085@163.com" ]
136122085@163.com
8fb857e27cece51cb2c8104a7aeabb39cca09a2e
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/test/com/vaadin/server/RemoveListenersDeprecatedTest.java
9a88d89aa9856e0c18dc06a9b0d99ddb95e258e0
[]
no_license
STAMP-project/dspot-experiments
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
121487e65cdce6988081b67f21bbc6731354a47f
refs/heads/master
2023-02-07T14:40:12.919811
2019-11-06T07:17:09
2019-11-06T07:17:09
75,710,758
14
19
null
2023-01-26T23:57:41
2016-12-06T08:27:42
null
UTF-8
Java
false
false
2,524
java
package com.vaadin.server; import com.vaadin.event.EventRouter; import com.vaadin.shared.Registration; import com.vaadin.tests.VaadinClasses; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.List; import java.util.function.Predicate; import java.util.regex.Pattern; import org.junit.Assert; import org.junit.Test; public class RemoveListenersDeprecatedTest { private static final List<Predicate<Method>> ALLOW_REMOVE_LISTENER = new ArrayList<>(); static { RemoveListenersDeprecatedTest.ALLOW_REMOVE_LISTENER.add(RemoveListenersDeprecatedTest::acceptAbstarctClientConnectorRemoveMethods); RemoveListenersDeprecatedTest.ALLOW_REMOVE_LISTENER.add(RemoveListenersDeprecatedTest::acceptAbstractDataProvider); RemoveListenersDeprecatedTest.ALLOW_REMOVE_LISTENER.add(RemoveListenersDeprecatedTest::acceptMethodEventSource); } @Test public void allRemoveListenerMethodsMarkedAsDeprecated() { Pattern removePattern = Pattern.compile("remove.*Listener"); Pattern addPattern = Pattern.compile("add.*Listener"); int count = 0; for (Class<? extends Object> serverClass : VaadinClasses.getAllServerSideClasses()) { count++; if (serverClass.equals(EventRouter.class)) { continue; } for (Method method : serverClass.getDeclaredMethods()) { if (Modifier.isPrivate(method.getModifiers())) { continue; } if ((addPattern.matcher(method.getName()).matches()) && ((method.getAnnotation(Deprecated.class)) == null)) { Class<?> returnType = method.getReturnType(); Assert.assertEquals((((("Method " + (method.getName())) + " is not deprectated in class ") + (serverClass.getName())) + " and doesn't return a Registration object"), Registration.class, returnType); } if (RemoveListenersDeprecatedTest.ALLOW_REMOVE_LISTENER.stream().anyMatch(( predicate) -> predicate.test(method))) { continue; } if (removePattern.matcher(method.getName()).matches()) { Assert.assertNotNull((((("Method " + (method.getName())) + " in class ") + (serverClass.getName())) + " has not been marked as deprecated."), method.getAnnotation(Deprecated.class)); } } } Assert.assertTrue((count > 0)); } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
2983f515673ba6df95c3b05124e3e4855042d856
86505462601eae6007bef6c9f0f4eeb9fcdd1e7b
/bin/modules/base-accelerator/yacceleratorcore/src/de/hybris/platform/yacceleratorcore/suggestion/dao/impl/DefaultSimpleSuggestionDao.java
242599ddbadd29623186396bacc97805057c48db
[]
no_license
jp-developer0/hybrisTrail
82165c5b91352332a3d471b3414faee47bdb6cee
a0208ffee7fee5b7f83dd982e372276492ae83d4
refs/heads/master
2020-12-03T19:53:58.652431
2020-01-02T18:02:34
2020-01-02T18:02:34
231,430,332
0
4
null
2020-08-05T22:46:23
2020-01-02T17:39:15
null
UTF-8
Java
false
false
6,563
java
/* * Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. */ package de.hybris.platform.yacceleratorcore.suggestion.dao.impl; import de.hybris.platform.catalog.enums.ProductReferenceTypeEnum; import de.hybris.platform.category.model.CategoryModel; import de.hybris.platform.core.model.product.ProductModel; import de.hybris.platform.core.model.user.UserModel; import de.hybris.platform.servicelayer.internal.dao.AbstractItemDao; import de.hybris.platform.servicelayer.search.FlexibleSearchQuery; import de.hybris.platform.servicelayer.search.SearchResult; import de.hybris.platform.yacceleratorcore.suggestion.dao.SimpleSuggestionDao; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.commons.collections.CollectionUtils; import org.springframework.util.Assert; /** * Default implementation of {@link SimpleSuggestionDao}. * * Finds products that are related products that the user has bought. */ public class DefaultSimpleSuggestionDao extends AbstractItemDao implements SimpleSuggestionDao { private static final int DEFAULT_LIMIT = 100; private static final String REF_QUERY_PARAM_CATEGORY = "category"; private static final String REF_QUERY_PARAM_PRODUCTS = "products"; private static final String REF_QUERY_PARAM_USER = "user"; private static final String REF_QUERY_PARAM_TYPE = "referenceType"; private static final String REF_QUERY_PARAM_TYPES = "referenceTypes"; private static final String REF_QUERY_CATEGORY_START = "SELECT {p.PK}" + " FROM {Product AS p" + " LEFT JOIN ProductReference AS r ON {p.PK}={r.target}" + " LEFT JOIN OrderEntry AS e ON {r.source}={e.product}" + " LEFT JOIN Order AS o ON {e.order}={o.PK}" + " LEFT JOIN CategoryProductRelation AS c2p ON {r.source}={c2p.target}" + " LEFT JOIN Category AS c ON {c2p.source}={c.PK} }" + " WHERE {o.user}=?user AND {c.PK}=?category"; private static final String REF_QUERY_PRODUCT_START = "SELECT DISTINCT {p.PK}, COUNT({p.PK}) AS NUM" + " FROM {Product AS p" + " LEFT JOIN ProductReference AS r ON {p.PK}={r.target} }" + " WHERE {r.source} IN (?products) AND {r.target} NOT IN (?products)"; private static final String REF_QUERY_TYPE = " AND {r.referenceType} IN (?referenceType)"; private static final String REF_QUERY_TYPES = " AND {r.referenceType} IN (?referenceTypes)"; private static final String REF_QUERY_SUB = " AND NOT EXISTS ({{" + " SELECT 1 FROM {OrderEntry AS e2 LEFT JOIN Order AS o2 ON {e2.order}={o2.PK} } " + " WHERE {e2.product}={r.target} AND {o2.user}=?user }})"; private static final String REF_QUERY_CATEGORY_ORDER = " ORDER BY {o.creationTime} DESC"; private static final String REF_QUERY_PRODUCT_GROUP = " GROUP BY {p.PK}"; private static final String REF_QUERY_PRODUCT_ORDER = " ORDER BY NUM DESC"; @Override public List<ProductModel> findProductsRelatedToPurchasedProductsByCategory(final CategoryModel category, final List<ProductReferenceTypeEnum> referenceTypes, final UserModel user, final boolean excludePurchased, final Integer limit) { Assert.notNull(category); Assert.notNull(user); final int maxResultCount = limit == null ? DEFAULT_LIMIT : limit.intValue(); final Map<String, Object> params = new HashMap<String, Object>(); final StringBuilder builder = new StringBuilder(REF_QUERY_CATEGORY_START); if (excludePurchased) { builder.append(REF_QUERY_SUB); } if (CollectionUtils.isNotEmpty(referenceTypes)) { builder.append(REF_QUERY_TYPES); params.put(REF_QUERY_PARAM_TYPES, referenceTypes); } builder.append(REF_QUERY_CATEGORY_ORDER); params.put(REF_QUERY_PARAM_USER, user); params.put(REF_QUERY_PARAM_CATEGORY, category); final FlexibleSearchQuery query = new FlexibleSearchQuery(builder.toString()); query.addQueryParameters(params); query.setNeedTotal(false); query.setCount(maxResultCount); final SearchResult<ProductModel> result = getFlexibleSearchService().search(query); return result.getResult(); } @Override public List<ProductModel> findProductsRelatedToProducts(final List<ProductModel> products, final List<ProductReferenceTypeEnum> referenceTypes, final UserModel user, final boolean excludePurchased, final Integer limit) { Assert.notNull(products); Assert.notNull(user); final int maxResultCount = limit == null ? DEFAULT_LIMIT : limit.intValue(); final Map<String, Object> params = new HashMap<String, Object>(); final StringBuilder builder = new StringBuilder(REF_QUERY_PRODUCT_START); if (excludePurchased) { builder.append(REF_QUERY_SUB); } if (CollectionUtils.isNotEmpty(referenceTypes)) { builder.append(REF_QUERY_TYPES); params.put(REF_QUERY_PARAM_TYPES, referenceTypes); } builder.append(REF_QUERY_PRODUCT_GROUP); builder.append(REF_QUERY_PRODUCT_ORDER); params.put(REF_QUERY_PARAM_USER, user); params.put(REF_QUERY_PARAM_PRODUCTS, products); final FlexibleSearchQuery query = new FlexibleSearchQuery(builder.toString()); query.addQueryParameters(params); query.setNeedTotal(false); query.setCount(maxResultCount); final SearchResult<ProductModel> result = getFlexibleSearchService().search(query); return result.getResult(); } /** * @deprecated Since 5.0. Use * {@link #findProductsRelatedToPurchasedProductsByCategory(CategoryModel, List, UserModel, boolean, Integer)} */ @Deprecated(since = "5.0") @Override public List<ProductModel> findProductsRelatedToPurchasedProductsByCategory(final CategoryModel category, final UserModel user, final ProductReferenceTypeEnum referenceType, final boolean excludePurchased, final Integer limit) { Assert.notNull(category); Assert.notNull(user); final int maxResultCount = limit == null ? DEFAULT_LIMIT : limit.intValue(); final Map<String, Object> params = new HashMap<String, Object>(); final StringBuilder builder = new StringBuilder(REF_QUERY_CATEGORY_START); if (excludePurchased) { builder.append(REF_QUERY_SUB); } if (referenceType != null) { builder.append(REF_QUERY_TYPE); params.put(REF_QUERY_PARAM_TYPE, referenceType); } builder.append(REF_QUERY_CATEGORY_ORDER); params.put(REF_QUERY_PARAM_USER, user); params.put(REF_QUERY_PARAM_CATEGORY, category); final FlexibleSearchQuery query = new FlexibleSearchQuery(builder.toString()); query.addQueryParameters(params); query.setNeedTotal(false); query.setCount(maxResultCount); final SearchResult<ProductModel> result = getFlexibleSearchService().search(query); return result.getResult(); } }
[ "juan.gonzalez.working@gmail.com" ]
juan.gonzalez.working@gmail.com
6304ee835b91b25a3de95b4ad8190187ccbe127f
b3a694913d943bdb565fbf828d6ab8a08dd7dd12
/sources/p213q/p217b/p218a/p231b/p232a/p233a/C2108b.java
77cc9ecb5b187a11792a2791a14efc030614fb31
[]
no_license
v1ckxy/radar-covid
feea41283bde8a0b37fbc9132c9fa5df40d76cc4
8acb96f8ccd979f03db3c6dbfdf162d66ad6ac5a
refs/heads/master
2022-12-06T11:29:19.567919
2020-08-29T08:00:19
2020-08-29T08:00:19
294,198,796
1
0
null
2020-09-09T18:39:43
2020-09-09T18:39:43
null
UTF-8
Java
false
false
2,544
java
package p213q.p217b.p218a.p231b.p232a.p233a; import android.net.Uri; import android.net.Uri.Builder; import android.util.Log; import java.io.IOException; import java.net.HttpURLConnection; import java.net.URL; import java.util.Map; import p213q.p214a.p215a.p216a.C1965a; /* renamed from: q.b.a.b.a.a.b */ public final class C2108b extends Thread { /* renamed from: e */ public final /* synthetic */ Map f5966e; public C2108b(Map map) { this.f5966e = map; } public final void run() { StringBuilder sb; String str; String str2; HttpURLConnection httpURLConnection; String str3 = ". "; String str4 = "HttpUrlPinger"; Map map = this.f5966e; Builder buildUpon = Uri.parse("https://pagead2.googlesyndication.com/pagead/gen_204?id=gmob-apps").buildUpon(); for (String str5 : map.keySet()) { buildUpon.appendQueryParameter(str5, (String) map.get(str5)); } String uri = buildUpon.build().toString(); try { httpURLConnection = (HttpURLConnection) new URL(uri).openConnection(); int responseCode = httpURLConnection.getResponseCode(); if (responseCode < 200 || responseCode >= 300) { StringBuilder sb2 = new StringBuilder(String.valueOf(uri).length() + 65); sb2.append("Received non-success response code "); sb2.append(responseCode); sb2.append(" from pinging URL: "); sb2.append(uri); Log.w(str4, sb2.toString()); } httpURLConnection.disconnect(); } catch (IndexOutOfBoundsException e) { str2 = e.getMessage(); sb = new StringBuilder(C1965a.m4743a(str2, C1965a.m4743a(uri, 32))); str = "Error while parsing ping URL: "; r3 = e; sb.append(str); sb.append(uri); sb.append(str3); sb.append(str2); Log.w(str4, sb.toString(), r3); } catch (IOException | RuntimeException e2) { str2 = e2.getMessage(); sb = new StringBuilder(C1965a.m4743a(str2, C1965a.m4743a(uri, 27))); str = "Error while pinging URL: "; r3 = e2; sb.append(str); sb.append(uri); sb.append(str3); sb.append(str2); Log.w(str4, sb.toString(), r3); } catch (Throwable th) { httpURLConnection.disconnect(); throw th; } } }
[ "josemmoya@outlook.com" ]
josemmoya@outlook.com
637479a28e9e566e7293fbd095ef753f586cdc35
0fa4777d8eec5d940dbfb2e3835a54f6daa59362
/build/src/main/java/com/mypurecloud/sdk/v2/model/NluConfusionMatrixRow.java
f5f63795cb587f3a03633d64bd811cfcfc5c0d81
[ "MIT" ]
permissive
ptlkarthi/platform-client-sdk-java
cb1a681745ada9e9f7f6c7ae405f62abc50727a4
4f561353ed64402f3462a7f01f03c7c380f1a7c6
refs/heads/master
2023-02-25T18:47:58.412108
2021-02-02T14:18:49
2021-02-02T14:18:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,699
java
package com.mypurecloud.sdk.v2.model; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.mypurecloud.sdk.v2.model.NluConfusionMatrixColumn; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import java.io.Serializable; /** * NluConfusionMatrixRow */ public class NluConfusionMatrixRow implements Serializable { private String name = null; private List<NluConfusionMatrixColumn> columns = new ArrayList<NluConfusionMatrixColumn>(); /** * The name of the intent for the row. **/ public NluConfusionMatrixRow name(String name) { this.name = name; return this; } @ApiModelProperty(example = "null", required = true, value = "The name of the intent for the row.") @JsonProperty("name") public String getName() { return name; } public void setName(String name) { this.name = name; } /** * The columns of confusion matrix for the intent **/ public NluConfusionMatrixRow columns(List<NluConfusionMatrixColumn> columns) { this.columns = columns; return this; } @ApiModelProperty(example = "null", required = true, value = "The columns of confusion matrix for the intent") @JsonProperty("columns") public List<NluConfusionMatrixColumn> getColumns() { return columns; } public void setColumns(List<NluConfusionMatrixColumn> columns) { this.columns = columns; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } NluConfusionMatrixRow nluConfusionMatrixRow = (NluConfusionMatrixRow) o; return Objects.equals(this.name, nluConfusionMatrixRow.name) && Objects.equals(this.columns, nluConfusionMatrixRow.columns); } @Override public int hashCode() { return Objects.hash(name, columns); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NluConfusionMatrixRow {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" columns: ").append(toIndentedString(columns)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "purecloud-jenkins@ininica.com" ]
purecloud-jenkins@ininica.com
e10a7d71102901e6b70d96fe544822d8891010ae
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/neo4j/2019/8/LabelCountsTest.java
633082cfe70af0f17bb46a0d8456551493bb7c0b
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
6,308
java
/* * Copyright (c) 2002-2019 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.neo4j.kernel.counts; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import java.util.function.Supplier; import org.neo4j.graphdb.Label; import org.neo4j.graphdb.Node; import org.neo4j.graphdb.Transaction; import org.neo4j.internal.kernel.api.Read; import org.neo4j.internal.kernel.api.TokenRead; import org.neo4j.kernel.api.KernelTransaction; import org.neo4j.kernel.impl.core.ThreadToStatementContextBridge; import org.neo4j.kernel.internal.GraphDatabaseAPI; import org.neo4j.test.extension.ImpermanentDbmsExtension; import org.neo4j.test.extension.Inject; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.neo4j.graphdb.Label.label; import static org.neo4j.internal.kernel.api.TokenRead.ANY_LABEL; @ImpermanentDbmsExtension class LabelCountsTest { @Inject private GraphDatabaseAPI db; private Supplier<KernelTransaction> transactionSupplier; @BeforeEach void exposeGuts() { transactionSupplier = () -> db.getDependencyResolver() .resolveDependency( ThreadToStatementContextBridge.class ).getKernelTransactionBoundToThisThread( true, db.databaseId() ); } @Test void shouldGetNumberOfNodesWithLabel() { // given try ( Transaction tx = db.beginTx() ) { db.createNode( label( "Foo" ) ); db.createNode( label( "Bar" ) ); db.createNode( label( "Bar" ) ); tx.commit(); } // when long fooCount = numberOfNodesWith( label( "Foo" ) ); long barCount = numberOfNodesWith( label( "Bar" ) ); // then assertEquals( 1, fooCount ); assertEquals( 2, barCount ); } @Test void shouldAccountForDeletedNodes() { // given Node node; try ( Transaction tx = db.beginTx() ) { node = db.createNode( label( "Foo" ) ); db.createNode( label( "Foo" ) ); tx.commit(); } try ( Transaction tx = db.beginTx() ) { node.delete(); tx.commit(); } // when long fooCount = numberOfNodesWith( label( "Foo" ) ); // then assertEquals( 1, fooCount ); } @Test void shouldAccountForDeletedNodesWithMultipleLabels() { // given Node node; try ( Transaction tx = db.beginTx() ) { node = db.createNode( label( "Foo" ), label( "Bar" ) ); db.createNode( label( "Foo" ) ); db.createNode( label( "Bar" ) ); tx.commit(); } try ( Transaction tx = db.beginTx() ) { node.delete(); tx.commit(); } // when long fooCount = numberOfNodesWith( label( "Foo" ) ); long barCount = numberOfNodesWith( label( "Bar" ) ); // then assertEquals( 1, fooCount ); assertEquals( 1, barCount ); } @Test void shouldAccountForAddedLabels() { // given Node n1; Node n2; Node n3; try ( Transaction tx = db.beginTx() ) { n1 = db.createNode( label( "Foo" ) ); n2 = db.createNode(); n3 = db.createNode(); tx.commit(); } try ( Transaction tx = db.beginTx() ) { n1.addLabel( label( "Bar" ) ); n2.addLabel( label( "Bar" ) ); n3.addLabel( label( "Foo" ) ); tx.commit(); } // when long fooCount = numberOfNodesWith( label( "Foo" ) ); long barCount = numberOfNodesWith( label( "Bar" ) ); // then assertEquals( 2, fooCount ); assertEquals( 2, barCount ); } @Test void shouldAccountForRemovedLabels() { // given Node n1; Node n2; Node n3; try ( Transaction tx = db.beginTx() ) { n1 = db.createNode( label( "Foo" ), label( "Bar" ) ); n2 = db.createNode( label( "Bar" ) ); n3 = db.createNode( label( "Foo" ) ); tx.commit(); } try ( Transaction tx = db.beginTx() ) { n1.removeLabel( label( "Bar" ) ); n2.removeLabel( label( "Bar" ) ); n3.removeLabel( label( "Foo" ) ); tx.commit(); } // when long fooCount = numberOfNodesWith( label( "Foo" ) ); long barCount = numberOfNodesWith( label( "Bar" ) ); // then assertEquals( 1, fooCount ); assertEquals( 0, barCount ); } /** Transactional version of {@link #countsForNode(Label)} */ private long numberOfNodesWith( Label label ) { try ( Transaction tx = db.beginTx() ) { long nodeCount = countsForNode( label ); tx.commit(); return nodeCount; } } /** @param label the label to get the number of nodes of, or {@code null} to get the total number of nodes. */ private long countsForNode( Label label ) { KernelTransaction transaction = transactionSupplier.get(); Read read = transaction.dataRead(); int labelId; if ( label == null ) { labelId = ANY_LABEL; } else { if ( TokenRead.NO_TOKEN == (labelId = transaction.tokenRead().nodeLabel( label.name() )) ) { return 0; } } return read.countsForNode( labelId ); } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
b5207de02290a4f0d6fd7bc77fad662764563111
e3ccaafebe1147dd885d859b8ff8f7898885014b
/net/src/test/java/org/jotserver/net/test/TestBaseServerOutputStream.java
64b273eca1737ae8ae4685491da862b2aa09332c
[]
no_license
osmarjunior/jOTServer
9802e8dd6ffce3af709c1facbe27b536cdff6d7d
9783fda1554951e4bf76a40076e34f618c87c844
refs/heads/master
2021-01-16T22:00:19.829822
2015-09-08T08:23:59
2015-09-08T08:23:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,138
java
package org.jotserver.net.test; import static org.junit.Assert.*; import java.io.IOException; import java.util.Arrays; import org.apache.mina.core.buffer.IoBuffer; import org.apache.mina.core.session.IoSession; import org.jmock.Expectations; import org.jmock.Mockery; import org.jotserver.net.BaseServerOutputStream; import org.junit.Before; import org.junit.Test; public class TestBaseServerOutputStream { private Mockery context = new Mockery(); private IoSession session; private BaseServerOutputStream os; @Before public void setUp() { session = context.mock(IoSession.class); os = new BaseServerOutputStream(session); } @Test public void backedByAnIoSession() throws IOException { context.checking(new Expectations() {{ allowing(session).close(false); }}); BaseServerOutputStream os = new BaseServerOutputStream(session); assertEquals(session, os.getSession()); os.close(); } @Test public void writeOneByte() throws IOException { context.checking(new Expectations() {{ oneOf(session).write(IoBuffer.wrap(new byte[] {10})); }}); os.write(10); os.flush(); context.assertIsSatisfied(); } @Test public void writeMultipleBytesOneAtATime() throws IOException { context.checking(new Expectations() {{ oneOf(session).write(IoBuffer.wrap(new byte[] {10, 11, 12, 13, 14, 15})); }}); os.write(10); os.write(11); os.write(12); os.write(13); os.write(14); os.write(15); os.flush(); context.assertIsSatisfied(); } @Test public void writeMultipleBytesIneOneChunk() throws IOException { final byte[] buf = new byte[] {10, 11, 12, 13, 14, 15}; context.checking(new Expectations() {{ oneOf(session).write(IoBuffer.wrap(buf)); }}); os.write(buf); os.flush(); context.assertIsSatisfied(); } @Test public void writeMultipleBytesIneOneChunk2() throws IOException { byte[] buf = new byte[] {10, 11, 12, 13, 14, 15}; final byte[] buf2 = Arrays.copyOfRange(buf, 1, buf.length-1); context.checking(new Expectations() {{ oneOf(session).write(IoBuffer.wrap(buf2)); }}); os.write(buf, 1, buf.length-2); os.flush(); context.assertIsSatisfied(); } @Test public void closingStreamClosesUnderlyingIoSession() throws IOException { context.checking(new Expectations() {{ oneOf(session).close(false); }}); os.close(); context.assertIsSatisfied(); } @Test public void sizeOfStreamWhenEmpty() { assertEquals(0, os.size()); } @Test public void sizeOfStreamAfterWritingOnce() throws IOException { os.write(10); assertEquals(1, os.size()); } @Test public void sizeOfStreamAfterWritingSeveralTimes() throws IOException { os.write(10); os.write(11); os.write(12); os.write(13); os.write(14); os.write(15); assertEquals(6, os.size()); } @Test public void sizeOfStreamAfterFlushing() throws IOException { context.checking(new Expectations() {{ oneOf(session).write(IoBuffer.wrap(new byte[] {10, 11, 12})); }}); os.write(10); os.write(11); os.write(12); os.flush(); os.write(13); os.write(14); os.write(15); assertEquals(3, os.size()); context.assertIsSatisfied(); } }
[ "dolb90@gmail.com" ]
dolb90@gmail.com
d2e149b1fa45952ebf04fff2e511b151811e0453
363c936f4a89b7d3f5f4fb588e8ca20c527f6022
/AL-Game/src/com/aionemu/gameserver/questEngine/model/ConditionUnionType.java
47ad24d4a86973287277b0328b4741a56c62e202
[]
no_license
G-Robson26/AionServer-4.9F
d628ccb4307aa0589a70b293b311422019088858
3376c78b8d90bd4d859a7cfc25c5edc775e51cbf
refs/heads/master
2023-09-04T00:46:47.954822
2017-08-09T13:23:03
2017-08-09T13:23:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,108
java
/** * This file is part of Aion-Lightning <aion-lightning.org>. * * Aion-Lightning 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. * * Aion-Lightning 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 Aion-Lightning. * If not, see <http://www.gnu.org/licenses/>. */ package com.aionemu.gameserver.questEngine.model; import javax.xml.bind.annotation.XmlEnum; /** * @author Mr. Poke */ @XmlEnum public enum ConditionUnionType { AND, OR; public String value() { return name(); } public static ConditionUnionType fromValue(String v) { return valueOf(v); } }
[ "falke34@a70f7278-c47d-401d-a0e4-c9401b7f63ed" ]
falke34@a70f7278-c47d-401d-a0e4-c9401b7f63ed
354d76cba9f72088f498847407885b4b0852d3ce
28725543f66badc90563a29f7cfe4879816e1ca9
/src/com/jacamars/dsp/rtb/exchanges/C1XUS.java
58846c0554abcef51d84a769fcae5881c5e55c19
[ "Apache-2.0" ]
permissive
zorrofox/Newbidder
06e0f9c99a84c4173e260257528399c89b8bb5af
da7a61ba22c3985c7c72c4d1ddf617ca3be9c380
refs/heads/master
2023-08-15T22:23:16.590842
2021-09-17T17:14:55
2021-09-17T17:14:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,156
java
package com.jacamars.dsp.rtb.exchanges; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.MissingNode; import com.fasterxml.jackson.databind.node.ObjectNode; import com.fasterxml.jackson.databind.node.TextNode; import com.jacamars.dsp.rtb.blocks.LookingGlass; import com.jacamars.dsp.rtb.pojo.BidRequest; import com.jacamars.dsp.rtb.tools.IsoTwo2Iso3; import java.io.InputStream; import java.util.HashMap; import java.util.Map; /** * A class to handle C1X ad exchange * @author Ben M. Faul * */ public class C1XUS extends BidRequest { // Reference to symbol that private static final IsoTwo2Iso3 isoMap = (IsoTwo2Iso3)LookingGlass.symbols.get("@ISO2-3"); private static Map<String,TextNode> cache = new HashMap<String,TextNode>(); public C1XUS() { super(); parseSpecial(); } /** * Make a C1X bid request using a String. * @param in String. The JSON bid request for Epom * @throws Exception on JSON errors. */ public C1XUS(String in) throws Exception { super(in); parseSpecial(); } /** * Make a C1X bid request using an input stream. * @param in InputStream. The contents of a HTTP post. * @throws Exception on JSON errors. */ public C1XUS(InputStream in) throws Exception { super(in); parseSpecial(); } /** * Create a c1x bid request from a string builder buffer * @param in StringBuilder. The text. * @throws Exception on parsing errors. */ public C1XUS(StringBuilder in) throws Exception { super(in); parseSpecial(); } /** * Process special C1X stuff, sets the exchange name. Sets encoding. */ @Override public boolean parseSpecial() { setExchange( "c1xus" ); usesEncodedAdm = false; if (rootNode == null) // can happen on initialization of the template class return false; // C1x can have protocol marker in the domain, need to strip it if (siteDomain != null) { siteDomain = siteDomain.replaceAll("http://", ""); siteDomain = siteDomain.replaceAll("https://", ""); JsonNode node = rootNode.get("site"); if (node == null) node = rootNode.get("app"); if (node.has("domain")) { ObjectNode n = (ObjectNode)node; n.remove("domain"); n.put("domain", siteDomain); } } // C1X uses ISO2 country codes, we can't digest that with our campaign processor, so we // will convert it for them and patch the bid request. // Use a cache of country codes to keep from creating a lot of objects to be later garbage collected. Object o = this.database.get("device.geo.country"); if (o instanceof MissingNode) { return true; } TextNode country = (TextNode)o; TextNode test = null; if (country != null) { test = cache.get(country.asText()); if (test == null) { String iso3 = isoMap.query(country.asText()); test = new TextNode(iso3); } if (test != country) database.put("device.geo.country", test); } return true; } /** * Create a new c1x object from this class instance. * @throws Exception on stream reading errors */ @Override public C1XUS copy(InputStream in) throws Exception { C1XUS copy = new C1XUS(in); copy.usesEncodedAdm = usesEncodedAdm; copy.usesGzipResponse = usesGzipResponse; return copy; } }
[ "ben.faul@gmail.com" ]
ben.faul@gmail.com
a3defe04e312b0036ccff75a34b2f7ce783aa372
70cbaeb10970c6996b80a3e908258f240cbf1b99
/WiFi万能钥匙dex1-dex2jar.jar.src/com/alibaba/fastjson/serializer/ObjectArraySerializer.java
12dd9e304b5234e4c29b96c2dba30ca227ca49a9
[]
no_license
nwpu043814/wifimaster4.2.02
eabd02f529a259ca3b5b63fe68c081974393e3dd
ef4ce18574fd7b1e4dafa59318df9d8748c87d37
refs/heads/master
2021-08-28T11:11:12.320794
2017-12-12T03:01:54
2017-12-12T03:01:54
113,553,417
2
1
null
null
null
null
UTF-8
Java
false
false
3,932
java
package com.alibaba.fastjson.serializer; import java.lang.reflect.Type; public class ObjectArraySerializer implements ObjectSerializer { public static final ObjectArraySerializer instance = new ObjectArraySerializer(); public final void write(JSONSerializer paramJSONSerializer, Object paramObject1, Object paramObject2, Type paramType) { int i = 0; paramType = null; SerializeWriter localSerializeWriter = paramJSONSerializer.getWriter(); Object[] arrayOfObject = (Object[])paramObject1; if (paramObject1 == null) { if (localSerializeWriter.isEnabled(SerializerFeature.WriteNullListAsEmpty)) { localSerializeWriter.write("[]"); } } int j; for (;;) { return; localSerializeWriter.writeNull(); continue; int k = arrayOfObject.length; j = k - 1; if (j == -1) { localSerializeWriter.append("[]"); } else { SerialContext localSerialContext = paramJSONSerializer.getContext(); paramJSONSerializer.setContext(localSerialContext, paramObject1, paramObject2); for (;;) { Object localObject; try { localSerializeWriter.append('['); if (localSerializeWriter.isEnabled(SerializerFeature.PrettyFormat)) { paramJSONSerializer.incrementIndent(); paramJSONSerializer.println(); if (i < k) { if (i != 0) { localSerializeWriter.write(','); paramJSONSerializer.println(); } paramJSONSerializer.write(arrayOfObject[i]); i++; continue; } paramJSONSerializer.decrementIdent(); paramJSONSerializer.println(); localSerializeWriter.write(']'); paramJSONSerializer.setContext(localSerialContext); break; } i = 0; paramObject2 = null; paramObject1 = paramType; if (i >= j) { break label307; } localObject = arrayOfObject[i]; if (localObject == null) { localSerializeWriter.append("null,"); i++; continue; } if (paramJSONSerializer.containsReference(localObject)) { paramJSONSerializer.writeReference(localObject); localSerializeWriter.append(','); continue; } paramType = localObject.getClass(); } finally { paramJSONSerializer.setContext(localSerialContext); } if (paramType == paramObject1) { ((ObjectSerializer)paramObject2).write(paramJSONSerializer, localObject, null, null); } else { paramObject2 = paramJSONSerializer.getObjectWriter(paramType); ((ObjectSerializer)paramObject2).write(paramJSONSerializer, localObject, null, null); paramObject1 = paramType; } } label307: paramObject1 = arrayOfObject[j]; if (paramObject1 != null) { break; } localSerializeWriter.append("null]"); paramJSONSerializer.setContext(localSerialContext); } } if (paramJSONSerializer.containsReference(paramObject1)) { paramJSONSerializer.writeReference(paramObject1); } for (;;) { localSerializeWriter.append(']'); break; paramJSONSerializer.writeWithFieldName(paramObject1, Integer.valueOf(j)); } } } /* Location: /Users/hanlian/Downloads/WiFi万能钥匙dex1-dex2jar.jar!/com/alibaba/fastjson/serializer/ObjectArraySerializer.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "lianh@jumei.com" ]
lianh@jumei.com
8d0fab615484e0cca8bacd4d4a8014f852df4832
d1c0bf2fc23d7235f1e8fe86552e7734350e9433
/src/main/java/daggerok/web/IndexPage.java
6e6d0f496196d9bf6ef4755991a47dd17eae9634
[]
no_license
daggerok/yet-another-heroku-spring-boot-example
0ca537553fa6ecc0e20a924c36baa107f43b1835
c298dcf577addd74e47d6db69166a2439c3c4c8a
refs/heads/master
2020-12-25T14:49:36.526003
2016-09-11T00:10:17
2016-09-11T00:10:17
67,894,124
0
0
null
null
null
null
UTF-8
Java
false
false
290
java
package daggerok.web; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; /** * Created by mak on 9/10/16. */ @Controller public class IndexPage { @GetMapping("/") public String index() { return "index"; } }
[ "daggerok@gmail.com" ]
daggerok@gmail.com
5755e8e02e306417a2eaed689a90fd196efb4086
353e503f197f7f3fedd7dae372af3c320a0e07b5
/src/us/kbase/kbasefeaturevalues/transform/FeatureClustersDownloader.java
fcebf28ee37a2fb498255f9d4856197f561d95f1
[ "MIT" ]
permissive
rsutormin/feature_values
0aafb0795be5fe6c34681902503b4c2f8ec6c2d0
66716b987a4caac09e279cb90fcf93a6ef24d030
refs/heads/master
2021-01-17T12:07:16.869264
2016-03-29T19:03:09
2016-03-29T19:03:09
61,243,868
0
0
null
2016-06-15T21:56:57
2016-06-15T21:56:56
null
UTF-8
Java
false
false
5,371
java
package us.kbase.kbasefeaturevalues.transform; import java.io.File; import java.io.PrintStream; import java.io.PrintWriter; import java.net.URL; import java.util.Arrays; import org.kohsuke.args4j.CmdLineException; import org.kohsuke.args4j.CmdLineParser; import org.kohsuke.args4j.Option; import us.kbase.auth.AuthService; import us.kbase.auth.AuthToken; import us.kbase.kbasefeaturevalues.FeatureClusters; import us.kbase.kbasefeaturevalues.LabeledCluster; import us.kbase.workspace.ObjectIdentity; import us.kbase.workspace.WorkspaceClient; public class FeatureClustersDownloader { public static void main(String[] args) throws Exception { Args parsedArgs = new Args(); CmdLineParser parser = new CmdLineParser(parsedArgs); parser.setUsageWidth(100); if (args.length == 0 || (args.length == 1 && (args[0].equals("-h") || args[0].equals("--help")))) { parser.parseArgument(); showUsage(parser, null, System.out); return; } try { parser.parseArgument(args); } catch (CmdLineException ex) { String message = ex.getMessage(); showUsage(parser, message); return; } String user = System.getProperty("test.user"); String pwd = System.getProperty("test.pwd"); String tokenString = System.getenv("KB_AUTH_TOKEN"); AuthToken token = tokenString == null ? AuthService.login(user, pwd).getToken() : new AuthToken(tokenString); String outputFileName = parsedArgs.outName; if (outputFileName == null) { outputFileName = "clusters."; if (parsedArgs.format != null) { if (parsedArgs.format.equalsIgnoreCase("TSV") || parsedArgs.format.equalsIgnoreCase("SIF")) { outputFileName += parsedArgs.format.toLowerCase(); } else { throw new IllegalStateException("Unsupported output format: " + parsedArgs.format); } } else { outputFileName += "tsv"; } } File outputFile = new File(parsedArgs.workDir, outputFileName); generate(parsedArgs.wsUrl, parsedArgs.wsName, parsedArgs.objName, parsedArgs.version, parsedArgs.format, token, new PrintWriter(outputFile)); } public static void generate(String wsUrl, String wsName, String objName, Integer version, String format, AuthToken token, PrintWriter pw) throws Exception { try { boolean isTsv = format == null || format.equalsIgnoreCase("TSV"); WorkspaceClient client = getWsClient(wsUrl, token); String ref = wsName + "/" + objName; if (version != null) ref += "/" + version; FeatureClusters data = client.getObjects(Arrays.asList(new ObjectIdentity().withRef(ref))) .get(0).getData().asClassInstance(FeatureClusters.class); for (int clustPos = 0; clustPos < data.getFeatureClusters().size(); clustPos++) { LabeledCluster cluster = data.getFeatureClusters().get(clustPos); for (String featureId : cluster.getIdToPos().keySet()) { if (isTsv) { pw.println(featureId + "\t" + clustPos); } else { pw.println(featureId.replace(' ', '_') + " pc " + clustPos); } } } } finally { pw.close(); } } private static WorkspaceClient getWsClient(String wsUrl, AuthToken token) throws Exception { WorkspaceClient wsClient = new WorkspaceClient(new URL(wsUrl), token); wsClient.setAuthAllowedForHttp(true); return wsClient; } private static void showUsage(CmdLineParser parser, String message) { showUsage(parser, message, System.err); } private static void showUsage(CmdLineParser parser, String message, PrintStream out) { if (message != null) out.println(message); out.println("Program downloads cluster set data in TSV and SIF formats."); out.println("Usage: <program> [options...]"); out.println(" Or: <program> {-h|--help} - to see this help"); parser.printUsage(out); } public static class Args { @Option(name="-ws", aliases={"--workspace_service_url"}, usage="Workspace service URL", metaVar="<ws-url>") String wsUrl; @Option(name="-wn", aliases={"--workspace_name"}, usage="Workspace name", metaVar="<ws-name>") String wsName; @Option(name="-on", aliases={"--object_name"}, usage="Object name", metaVar="<obj-name>") String objName; @Option(name="-ov", aliases={"--version"}, usage="Object version (optional)", metaVar="<obj-ver>") Integer version; @Option(name="-wd", aliases={"--working_directory"}, usage="Working directory", metaVar="<work-dir>") File workDir; @Option(name="-of", aliases={"--output_file_name"}, usage="Output file name", metaVar="<out-file>") String outName; @Option(name="-ff", aliases={"--format"}, usage="Output file format (one of TSV or SIF, default is TSV)", metaVar="<file-fmt>") String format; } }
[ "rsutormin@lbl.gov" ]
rsutormin@lbl.gov
a5a5c27e55b49efcfb6e809b277d71764752ebae
3afea60a934862ed72ad6813d560a84fa35844d1
/StudioWorkSpace/SM-TextMemo/app/src/main/java/com/smartmux/textmemo/util/Base64DecoderException.java
b562a1857cec44079bb43c2bba067617b7497453
[]
no_license
Phenix-Collection/Android-1
033b86b962c6d50939336a4fd827d73922eeb78c
18f185b5cdb6a7edff766169468587aa2dbfd9b5
refs/heads/master
2021-12-15T01:06:22.296429
2017-07-07T08:55:39
2017-07-07T08:55:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
974
java
// Copyright 2002, Google, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.smartmux.textmemo.util; /** * Exception thrown when encountering an invalid Base64 input character. * * @author nelson */ public class Base64DecoderException extends Exception { public Base64DecoderException() { super(); } public Base64DecoderException(String s) { super(s); } private static final long serialVersionUID = 1L; }
[ "Romana@Tanvir-Androids-Mac-mini.local" ]
Romana@Tanvir-Androids-Mac-mini.local
bb5380e6fec7eba8e134da07fb570c588cbe4d88
10017e6e4fae86ba9c7d6ac891c5ca8988d8b3e4
/app/src/main/java/cn/see/util/zxing/decoding/DecodeThread.java
408ff8be9c7a84c4cc2202283ea0db0f02ccb374
[]
no_license
TiAmoGxb/See
e5f94cb139d4c00f242fab1a564eea8a6b983d6b
4e7d774218828978733e6ef551bfb439e0a17978
refs/heads/master
2020-03-22T17:47:06.596872
2018-12-27T07:46:48
2018-12-27T07:46:48
140,415,559
1
0
null
null
null
null
UTF-8
Java
false
false
2,555
java
/* * Copyright (C) 2008 ZXing 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 cn.see.util.zxing.decoding; import android.os.Handler; import android.os.Looper; import com.google.zxing.BarcodeFormat; import com.google.zxing.DecodeHintType; import com.google.zxing.ResultPointCallback; import java.util.Hashtable; import java.util.Vector; import java.util.concurrent.CountDownLatch; import cn.see.util.zxing.app.CaptureActivity; /** * This thread does all the heavy lifting of decoding the images. * �����߳� */ final class DecodeThread extends Thread { public static final String BARCODE_BITMAP = "barcode_bitmap"; private final CaptureActivity activity; private final Hashtable<DecodeHintType, Object> hints; private Handler handler; private final CountDownLatch handlerInitLatch; DecodeThread(CaptureActivity activity, Vector<BarcodeFormat> decodeFormats, String characterSet, ResultPointCallback resultPointCallback) { this.activity = activity; handlerInitLatch = new CountDownLatch(1); hints = new Hashtable<DecodeHintType, Object>(3); if (decodeFormats == null || decodeFormats.isEmpty()) { decodeFormats = new Vector<BarcodeFormat>(); decodeFormats.addAll(DecodeFormatManager.ONE_D_FORMATS); decodeFormats.addAll(DecodeFormatManager.QR_CODE_FORMATS); decodeFormats.addAll(DecodeFormatManager.DATA_MATRIX_FORMATS); } hints.put(DecodeHintType.POSSIBLE_FORMATS, decodeFormats); if (characterSet != null) { hints.put(DecodeHintType.CHARACTER_SET, characterSet); } hints.put(DecodeHintType.NEED_RESULT_POINT_CALLBACK, resultPointCallback); } Handler getHandler() { try { handlerInitLatch.await(); } catch (InterruptedException ie) { // continue? } return handler; } @Override public void run() { Looper.prepare(); handler = new DecodeHandler(activity, hints); handlerInitLatch.countDown(); Looper.loop(); } }
[ "78997767@qq.com" ]
78997767@qq.com
2e3a1d04b4723c802bbc4546a4f8c1766688265b
566a9252119593c099ac8bb572b291322eb17c47
/hasting-cluster/src/test/java/com/lindzh/hasting/cluster/simple/SimpleRpcServerTest.java
b6a72e4bcf06bb905ac368b27393687b4253994e
[ "MIT" ]
permissive
BiYiTuan/hasting
7743ecf709d7eb85e376c927ad355e679e4aa917
efed0dabcc5181b9f81bb54514048b38adfd7177
refs/heads/master
2020-04-16T13:28:11.481592
2018-04-15T03:52:09
2018-04-15T03:52:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,664
java
package com.lindzh.hasting.cluster.simple; import com.lindzh.hasting.cluster.limit.LimitCache; import com.lindzh.hasting.cluster.limit.LimitConst; import com.lindzh.hasting.cluster.limit.LimitFilter; import com.lindzh.hasting.cluster.serializer.simple.SimpleSerializer; import com.lindzh.hasting.cluster.HelloRpcService; import com.lindzh.hasting.cluster.HelloRpcServiceImpl; import com.lindzh.hasting.cluster.HelloRpcTestService; import com.lindzh.hasting.cluster.HelloRpcTestServiceImpl; import com.lindzh.hasting.cluster.LoginRpcService; import com.lindzh.hasting.cluster.LoginRpcServiceImpl; import com.lindzh.hasting.cluster.limit.LimitDefine; import com.lindzh.hasting.rpc.server.SimpleRpcServer; import java.util.ArrayList; public class SimpleRpcServerTest { public static void main(String[] args) { SimpleRpcServer rpcServer = new SimpleRpcServer(); rpcServer.setHost("127.0.0.1"); rpcServer.setPort(4321); LimitCache limitCache = new LimitCache(); ArrayList<LimitDefine> limitDefines = new ArrayList<LimitDefine>(); LimitDefine define = new LimitDefine(); define.setType(LimitConst.LIMIT_ALL); define.setCount(5); define.setTtl(7000); limitDefines.add(define); limitCache.addOrUpdate(limitDefines); rpcServer.addRpcFilter(new LimitFilter(limitCache)); rpcServer.setSerializer(new SimpleSerializer()); rpcServer.register(HelloRpcService.class, new HelloRpcServiceImpl()); rpcServer.register(LoginRpcService.class, new LoginRpcServiceImpl()); rpcServer.register(HelloRpcTestService.class, new HelloRpcTestServiceImpl()); rpcServer.startService(); System.out.println("--------started----------"); } }
[ "linsony0@163.com" ]
linsony0@163.com
2fe54e3adbba73abc8b96b893b743a653621ce45
072216667ef59e11cf4994220ea1594538db10a0
/googleplay/com/google/android/gms/wearable/internal/ac.java
8a188883e27d72d5f3c65157183571101ca09ae6
[]
no_license
jackTang11/REMIUI
896037b74e90f64e6f7d8ddfda6f3731a8db6a74
48d65600a1b04931a510e1f036e58356af1531c0
refs/heads/master
2021-01-18T05:43:37.754113
2015-07-03T04:01:06
2015-07-03T04:01:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,804
java
package com.google.android.gms.wearable.internal; import android.os.Parcel; import android.os.Parcelable.Creator; import com.google.android.gms.common.internal.safeparcel.a; import com.google.android.gms.common.internal.safeparcel.b; import com.google.android.wallet.instrumentmanager.R; public class ac implements Creator<ab> { static void a(ab abVar, Parcel parcel, int i) { int bU = b.bU(parcel); b.c(parcel, 1, abVar.versionCode); b.c(parcel, 2, abVar.statusCode); b.a(parcel, 3, abVar.aWT, i, false); b.J(parcel, bU); } public /* synthetic */ Object createFromParcel(Parcel x0) { return iP(x0); } public ab iP(Parcel parcel) { int i = 0; int bT = a.bT(parcel); al alVar = null; int i2 = 0; while (parcel.dataPosition() < bT) { int bS = a.bS(parcel); switch (a.dk(bS)) { case R.styleable.WalletImFormEditText_validatorErrorString /*1*/: i2 = a.g(parcel, bS); break; case R.styleable.WalletImFormEditText_validatorRegexp /*2*/: i = a.g(parcel, bS); break; case R.styleable.WalletImFormEditText_requiredErrorString /*3*/: alVar = (al) a.a(parcel, bS, al.CREATOR); break; default: a.b(parcel, bS); break; } } if (parcel.dataPosition() == bT) { return new ab(i2, i, alVar); } throw new a.a("Overread allowed size end=" + bT, parcel); } public ab[] lP(int i) { return new ab[i]; } public /* synthetic */ Object[] newArray(int x0) { return lP(x0); } }
[ "songjd@putao.com" ]
songjd@putao.com
dc7ed859f66a65051a8784ba87d2235f566b4c82
b956f4668405571fb8f7263e054316b07f80e543
/app/src/main/java/net/vapormusic/animexstream/utils/model/MALModel/UserAnimeList/ListStatus.java
f74a725dc59d527d452fa88436b81335d4e8bdc7
[ "GPL-3.0-only", "MIT" ]
permissive
androiddevnotesforks/AnimeXStream
86383c8cd23c0b6f04400187b5c89a41462c9c8c
ea8a900769abaff526f934be65eafe871209ca66
refs/heads/dev
2023-06-07T00:16:13.912411
2021-07-03T15:26:29
2021-07-03T15:26:29
337,019,411
12
11
MIT
2021-07-03T15:32:37
2021-02-08T09:16:03
Kotlin
UTF-8
Java
false
false
1,427
java
package net.vapormusic.animexstream.utils.model.MALModel.UserAnimeList; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class ListStatus { @SerializedName("status") @Expose private String status; @SerializedName("score") @Expose private Integer score; @SerializedName("num_episodes_watched") @Expose private Integer numEpisodesWatched; @SerializedName("is_rewatching") @Expose private Boolean isRewatching; @SerializedName("updated_at") @Expose private String updatedAt; public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public Integer getScore() { return score; } public void setScore(Integer score) { this.score = score; } public Integer getNumEpisodesWatched() { return numEpisodesWatched; } public void setNumEpisodesWatched(Integer numEpisodesWatched) { this.numEpisodesWatched = numEpisodesWatched; } public Boolean getIsRewatching() { return isRewatching; } public void setIsRewatching(Boolean isRewatching) { this.isRewatching = isRewatching; } public String getUpdatedAt() { return updatedAt; } public void setUpdatedAt(String updatedAt) { this.updatedAt = updatedAt; } }
[ "d" ]
d
d6b706a36955eb7647e7c928ec7bdc1e4eabefb3
8435787e0d819ff20bb84486facb03be28118696
/src/main/java/br/com/touros/punterbot/api/core/permission/PermissionConstants.java
77409147ba6ccbd3668a8f61fee948306141b3ba
[]
no_license
romeubessadev/api-punterbot
ee43e524b5ac2052c84a13f1a2881457be3d1fcb
7629df45553d5992170c900f16846a2e4d6c2a70
refs/heads/master
2023-03-17T05:37:28.031912
2021-03-09T20:38:16
2021-03-09T20:38:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
385
java
package br.com.touros.punterbot.api.core.permission; public class PermissionConstants { public static final String ADMINISTRADOR = "ADMINISTRADOR"; public static final String JOGOS_HOJE = "JOGOS_HOJE"; public static final String JOGOS_AO_VIVO = "JOGOS_AO_VIVO"; public static final String JOGOS_AMANHA = "JOGOS_AMANHA"; public static final String ROBO = "ROBO"; }
[ "=" ]
=
102d046c9f1904231d5d87a1a91ae905609cdc19
2d83d32dbca93dd1c5d53995f7f170aa74e4f5a8
/src/main/java/com/elmakers/mine/bukkit/action/builtin/HatAction.java
3b0b578cee8527149fdd349fd836fbae3238a78e
[ "MIT" ]
permissive
ilturko/MagicPlugin
0e4f4fb2a3fcc90a5a2cdb335584605f27df02d6
257fa7bcd33180f7b0854e45a7bf83a91086b0a3
refs/heads/master
2021-01-22T07:19:10.611096
2015-10-06T18:28:07
2015-10-06T18:28:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,622
java
package com.elmakers.mine.bukkit.action.builtin; import com.elmakers.mine.bukkit.api.action.CastContext; import com.elmakers.mine.bukkit.api.magic.Mage; import com.elmakers.mine.bukkit.api.magic.MageController; import com.elmakers.mine.bukkit.api.spell.Spell; import com.elmakers.mine.bukkit.api.spell.SpellResult; import com.elmakers.mine.bukkit.api.block.MaterialAndData; import com.elmakers.mine.bukkit.action.BaseSpellAction; import com.elmakers.mine.bukkit.api.wand.Wand; import com.elmakers.mine.bukkit.magic.MagicPlugin; import com.elmakers.mine.bukkit.utility.ConfigurationUtils; import com.elmakers.mine.bukkit.utility.InventoryUtils; import com.elmakers.mine.bukkit.utility.NMSUtils; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.configuration.ConfigurationSection; import org.bukkit.enchantments.Enchantment; import org.bukkit.entity.Entity; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; public class HatAction extends BaseSpellAction { private MaterialAndData material; private boolean useItem; private Map<Enchantment, Integer> enchantments; @Override public void initialize(Spell spell, ConfigurationSection parameters) { super.initialize(spell, parameters); if (parameters.contains("enchantments")) { enchantments = new HashMap<Enchantment, Integer>(); ConfigurationSection enchantConfig = parameters.getConfigurationSection("enchantments"); Collection<String> enchantKeys = enchantConfig.getKeys(false); for (String enchantKey : enchantKeys) { try { Enchantment enchantment = Enchantment.getByName(enchantKey.toUpperCase()); enchantments.put(enchantment, enchantConfig.getInt(enchantKey)); } catch (Exception ex) { spell.getController().getLogger().warning("Invalid enchantment: " + enchantKey); } } } } private class HatUndoAction implements Runnable { private final Mage mage; public HatUndoAction(Mage mage) { this.mage = mage; } @Override public void run() { Player player = mage.getPlayer(); if (player == null) return; ItemStack helmetItem = player.getInventory().getHelmet(); if (NMSUtils.isTemporary(helmetItem)) { ItemStack replacement = NMSUtils.getReplacement(helmetItem); player.getInventory().setHelmet(replacement); } if (mage instanceof com.elmakers.mine.bukkit.magic.Mage) { ((com.elmakers.mine.bukkit.magic.Mage)mage).armorUpdated(); } } } @Override public void prepare(CastContext context, ConfigurationSection parameters) { material = ConfigurationUtils.getMaterialAndData(parameters, "material"); useItem = parameters.getBoolean("use_item", false); } @Override public SpellResult perform(CastContext context) { Entity entity = context.getTargetEntity(); if (entity == null) { entity = context.getEntity(); } if (entity == null || !(entity instanceof Player)) { return SpellResult.NO_TARGET; } Player player = (Player)entity; MaterialAndData material = this.material; MageController controller = context.getController(); Mage mage = controller.getMage(player); if (useItem) { Wand activeWand = mage.getActiveWand(); if (activeWand != null) { activeWand.deactivate();; } ItemStack itemInHand = player.getItemInHand(); if (itemInHand == null || itemInHand.getType() == Material.AIR) { return SpellResult.FAIL; } ItemStack currentItem = player.getInventory().getHelmet(); player.getInventory().setHelmet(itemInHand); player.setItemInHand(currentItem); if (mage instanceof com.elmakers.mine.bukkit.magic.Mage) { ((com.elmakers.mine.bukkit.magic.Mage)mage).armorUpdated(); } return SpellResult.CAST; } if (material == null && (context.getSpell().usesBrush() || context.getSpell().hasBrushOverride())) { material = context.getBrush(); } if (material == null) { Block targetBlock = context.getTargetBlock(); if (targetBlock != null) { material = new com.elmakers.mine.bukkit.block.MaterialAndData(targetBlock); // Check for Banners with 1.7 support Material baseMaterial = material.getMaterial(); if (baseMaterial.getId() == 176 || baseMaterial.getId() == 177) { ((com.elmakers.mine.bukkit.block.MaterialAndData)material).setMaterialId(425); } } } if (entity == null || !(entity instanceof Player) || material == null || material.getMaterial() == Material.AIR) { return SpellResult.NO_TARGET; } ItemStack hatItem = material.getItemStack(1); ItemMeta meta = hatItem.getItemMeta(); String hatName = context.getMessage("hat_name", ""); String materialName = material.getName(); if (materialName == null || materialName.isEmpty()) { materialName = "?"; } if (hatName != null && !hatName.isEmpty()) { meta.setDisplayName(hatName.replace("$hat", materialName)); } List<String> lore = new ArrayList<String>(); lore.add(context.getMessage("hat_lore")); meta.setLore(lore); hatItem.setItemMeta(meta); hatItem = InventoryUtils.makeReal(hatItem); NMSUtils.makeTemporary(hatItem, context.getMessage("removed").replace("$hat", materialName)); if (enchantments != null) { hatItem.addUnsafeEnchantments(enchantments); } ItemStack itemStack = player.getInventory().getHelmet(); if (itemStack != null && itemStack.getType() != Material.AIR) { if (NMSUtils.isTemporary(itemStack)) { itemStack = NMSUtils.getReplacement(itemStack); } if (itemStack != null) { NMSUtils.setReplacement(hatItem, itemStack); } } player.getInventory().setHelmet(hatItem); // Sanity check to make sure the block was allowed to be created ItemStack helmetItem = player.getInventory().getHelmet(); if (!NMSUtils.isTemporary(helmetItem)) { player.getInventory().setHelmet(itemStack); return SpellResult.NO_TARGET; } context.registerForUndo(new HatUndoAction(mage)); if (mage instanceof com.elmakers.mine.bukkit.magic.Mage) { ((com.elmakers.mine.bukkit.magic.Mage)mage).armorUpdated(); } return SpellResult.CAST; } @Override public void getParameterNames(Spell spell, Collection<String> parameters) { super.getParameterNames(spell, parameters); parameters.add("material"); } @Override public void getParameterOptions(Spell spell, String parameterKey, Collection<String> examples) { if (parameterKey.equals("material")) { examples.addAll(MagicPlugin.getAPI().getBrushes()); } else { super.getParameterOptions(spell, parameterKey, examples); } } @Override public boolean isUndoable() { return true; } }
[ "nathan@elmakers.com" ]
nathan@elmakers.com
6d76eb85f3d704e99763deecd99e0a09223e7eee
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
/ast_results/mtotschnig_MyExpenses/myExpenses/src/androidTest/java/org/totschnig/myexpenses/test/espresso/ExpenseEditLoadDataTest.java
64dc534dc398af65c00e3c26333f8e052e3e235d
[]
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
7,016
java
// isComment package org.totschnig.myexpenses.test.espresso; import android.Manifest; import android.content.Intent; import android.content.OperationApplicationException; import android.os.RemoteException; import android.support.test.InstrumentationRegistry; import android.support.test.rule.ActivityTestRule; import android.support.test.rule.GrantPermissionRule; import org.junit.After; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.threeten.bp.LocalDate; import org.totschnig.myexpenses.MyApplication; import org.totschnig.myexpenses.R; import org.totschnig.myexpenses.activity.ExpenseEdit; import org.totschnig.myexpenses.model.Account; import org.totschnig.myexpenses.model.AccountType; import org.totschnig.myexpenses.model.CurrencyUnit; import org.totschnig.myexpenses.model.Money; import org.totschnig.myexpenses.model.Plan; import org.totschnig.myexpenses.model.SplitTransaction; import org.totschnig.myexpenses.model.Template; import org.totschnig.myexpenses.model.Transaction; import org.totschnig.myexpenses.model.Transfer; import org.totschnig.myexpenses.util.CurrencyFormatter; import java.util.Currency; import static android.support.test.espresso.Espresso.onView; import static android.support.test.espresso.assertion.ViewAssertions.matches; import static android.support.test.espresso.matcher.ViewMatchers.withId; import static android.support.test.espresso.matcher.ViewMatchers.withText; import static org.totschnig.myexpenses.contract.TransactionsContract.Transactions.TYPE_TRANSACTION; import static org.totschnig.myexpenses.provider.DatabaseConstants.KEY_ROWID; import static org.totschnig.myexpenses.provider.DatabaseConstants.KEY_TEMPLATEID; import static org.totschnig.myexpenses.testutils.Espresso.checkEffectiveGone; import static org.totschnig.myexpenses.testutils.Espresso.checkEffectiveVisible; public class isClassOrIsInterface { private static CurrencyUnit isVariable; @Rule public ActivityTestRule<ExpenseEdit> isVariable = new ActivityTestRule<>(ExpenseEdit.class, true, true); @Rule public GrantPermissionRule isVariable = isNameExpr.isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr); private static Account isVariable; private static Account isVariable; private static Transaction isVariable; private static Transfer isVariable; private static SplitTransaction isVariable; private static Template isVariable; @Before public void isMethod() { isNameExpr = isNameExpr.isMethod(isNameExpr.isMethod("isStringConstant")); isNameExpr = new Account("isStringConstant", isNameExpr, isIntegerConstant, "isStringConstant", isNameExpr.isFieldAccessExpr, isNameExpr.isFieldAccessExpr); isNameExpr.isMethod(); isNameExpr = new Account("isStringConstant", isNameExpr, isIntegerConstant, "isStringConstant", isNameExpr.isFieldAccessExpr, isNameExpr.isFieldAccessExpr); isNameExpr.isMethod(); isNameExpr = isNameExpr.isMethod(isNameExpr.isMethod()); isNameExpr.isMethod(new Money(isNameExpr, isStringConstant)); isNameExpr.isMethod(); isNameExpr = isNameExpr.isMethod(isNameExpr.isMethod(), isNameExpr.isMethod()); isNameExpr.isMethod(new Money(isNameExpr, isStringConstant)); isNameExpr.isMethod(); isNameExpr = isNameExpr.isMethod(isNameExpr.isMethod()); isNameExpr.isMethod(); isNameExpr = isNameExpr.isMethod(isNameExpr, isNameExpr.isMethod(), true, null); isNameExpr.isMethod("isStringConstant"); isNameExpr.isMethod(new Money(isNameExpr, isStringConstant)); isNameExpr.isMethod(new Plan(isNameExpr.isMethod(), isNameExpr.isFieldAccessExpr.isFieldAccessExpr, "isStringConstant", isNameExpr.isMethod(isNameExpr.isMethod(), isNameExpr.isMethod()))); isNameExpr.isMethod(); } @After public void isMethod() throws RemoteException, OperationApplicationException { isNameExpr.isMethod(isNameExpr.isMethod()); isNameExpr.isMethod(isNameExpr.isMethod()); } @Test public void isMethod() { Intent isVariable = new Intent(isNameExpr.isMethod().isMethod(), ExpenseEdit.class); isNameExpr.isMethod(isNameExpr, isNameExpr.isMethod()); isNameExpr.isMethod(isNameExpr); isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr); isMethod(isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr)).isMethod(isMethod(isMethod("isStringConstant"))); } @Test public void isMethod() { Intent isVariable = new Intent(isNameExpr.isMethod().isMethod(), ExpenseEdit.class); isNameExpr.isMethod(isNameExpr, isNameExpr.isMethod()); isNameExpr.isMethod(isNameExpr); isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr); isMethod(isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr)).isMethod(isMethod(isMethod("isStringConstant"))); } @Test public void isMethod() { Intent isVariable = new Intent(isNameExpr.isMethod().isMethod(), ExpenseEdit.class); isNameExpr.isMethod(isNameExpr, isNameExpr.isMethod()); isNameExpr.isMethod(isNameExpr); isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr); } @Test public void isMethod() { Intent isVariable = new Intent(isNameExpr.isMethod().isMethod(), ExpenseEdit.class); isNameExpr.isMethod(isNameExpr, isNameExpr.isMethod()); isNameExpr.isMethod(isNameExpr); isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr); isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr); isMethod(isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr)).isMethod(isMethod(isMethod("isStringConstant"))); isMethod(isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr)).isMethod(isMethod(isMethod("isStringConstant"))); } }
[ "matheus@melsolucoes.net" ]
matheus@melsolucoes.net
f58e8ac8dd64681ceda3b2e107e2fb1a3b185965
34b6b232ab1782142cf4ede5767b1d8da63fe1c9
/jdisasm/src/main/java/de/unkrig/jdisasm/io/charstream/package-info.java
1ee8a5abddd4186db155e160032c6ba9d5adb6f6
[ "BSD-3-Clause" ]
permissive
aunkrig/jdisasm
1a8ca8a056e1ffdec64ad84750b894c2cad67ff0
47d7f61fc4fa82e5727c4b9d3629bd6343cc3cbe
refs/heads/master
2023-04-06T12:18:17.866251
2023-03-29T10:46:06
2023-03-29T10:46:06
72,338,223
9
2
null
null
null
null
UTF-8
Java
false
false
1,967
java
/* * JDISASM - A Java[TM] class file disassembler * * Copyright (c) 2001, Arno Unkrig * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the * following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the * following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the * following disclaimer in the documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holder 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. */ /** * A {@link de.unkrig.jdisasm.io.charstream.CharStream} is useful for implementing scanners: It provides a * one-character lookahead and convenience methods for handling characters. */ @NotNullByDefault package de.unkrig.jdisasm.io.charstream; import de.unkrig.commons.nullanalysis.NotNullByDefault;
[ "aunkrig@users.noreply.github.com" ]
aunkrig@users.noreply.github.com
094ceee92744f2ddf6d75d7e0b33e5873bb4b5b7
f6899a2cf1c10a724632bbb2ccffb7283c77a5ff
/glassfish-3.0/deployment/dol/src/main/java/com/sun/enterprise/deployment/archivist/WarPersistenceArchivist.java
5893edec671b64fa457bde7057b63c0c67b11a10
[]
no_license
Appdynamics/OSS
a8903058e29f4783e34119a4d87639f508a63692
1e112f8854a25b3ecf337cad6eccf7c85e732525
refs/heads/master
2023-07-22T03:34:54.770481
2021-10-28T07:01:57
2021-10-28T07:01:57
19,390,624
2
13
null
2023-07-08T02:26:33
2014-05-02T22:42:20
null
UTF-8
Java
false
false
4,424
java
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common Development * and Distribution License("CDDL") (collectively, the "License"). You * may not use this file except in compliance with the License. You can obtain * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html * or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific * language governing permissions and limitations under the License. * * When distributing the software, include this License Header Notice in each * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt. * Sun designates this particular file as subject to the "Classpath" exception * as provided by Sun in the GPL Version 2 section of the License file that * accompanied this code. If applicable, add the following below the License * Header, with the fields enclosed by brackets [] replaced by your own * identifying information: "Portions Copyrighted [year] * [name of copyright owner]" * * Contributor(s): * * If you wish your version of this file to be governed by only the CDDL or * only the GPL Version 2, indicate your decision by adding "[Contributor] * elects to include this software in this distribution under the [CDDL or GPL * Version 2] license." If you don't indicate a single choice of license, a * recipient has the option to distribute your version of this file under * either the CDDL, the GPL Version 2 or to extend the choice of license to * its licensees as provided above. However, if you add GPL Version 2 code * and therefore, elected the GPL Version 2 license, then the option applies * only if the new code is made subject to such option by the copyright * holder. * */ package com.sun.enterprise.deployment.archivist; import com.sun.enterprise.deployment.RootDeploymentDescriptor; import com.sun.enterprise.deployment.io.DescriptorConstants; import com.sun.enterprise.deployment.util.XModuleType; import org.glassfish.api.deployment.archive.ReadableArchive; import org.glassfish.api.deployment.archive.Archive; import org.xml.sax.SAXParseException; import org.jvnet.hk2.annotations.Service; import java.io.IOException; import java.io.InputStream; import java.util.logging.Level; import java.util.Map; import java.util.HashMap; @Service public class WarPersistenceArchivist extends PersistenceArchivist { @Override public boolean supportsModuleType(XModuleType moduleType) { return XModuleType.WAR==moduleType; } @Override public Object open(Archivist main, ReadableArchive warArchive, RootDeploymentDescriptor descriptor) throws IOException, SAXParseException { final String CLASSES_DIR = "WEB-INF/classes/"; if(logger.isLoggable(Level.FINE)) { logger.logp(Level.FINE, "EjbArchivist", "readPersistenceDeploymentDescriptors", "archive = {0}", warArchive.getURI()); } Map<String, ReadableArchive> probablePersitenceArchives = new HashMap<String, ReadableArchive>(); try { SubArchivePURootScanner warLibScanner = new SubArchivePURootScanner() { String getPathOfSubArchiveToScan() { return "WEB-INF/lib"; } }; probablePersitenceArchives = getProbablePersistenceRoots(warArchive, warLibScanner); final String pathOfPersistenceXMLInsideClassesDir = CLASSES_DIR+ DescriptorConstants.PERSISTENCE_DD_ENTRY; InputStream is = warArchive.getEntry(pathOfPersistenceXMLInsideClassesDir); if (is!=null) { is.close(); probablePersitenceArchives.put(CLASSES_DIR, warArchive.getSubArchive(CLASSES_DIR)); } for(Map.Entry<String, ReadableArchive> pathToArchiveEntry : probablePersitenceArchives.entrySet()) { readPersistenceDeploymentDescriptor(main, pathToArchiveEntry.getValue(), pathToArchiveEntry.getKey(), descriptor); } } finally { for(Archive probablePersitenceArchive : probablePersitenceArchives.values()) { probablePersitenceArchive.close(); } } return null; } }
[ "ddimalanta@appdynamics.com" ]
ddimalanta@appdynamics.com
44da683efe3107b67ecc06ddb78e4b179b4f1e57
bccb412254b3e6f35a5c4dd227f440ecbbb60db9
/hl7/model/V2_5/table/Table0056.java
549faa72e7f5838d43a90792036953e74c39ffa4
[]
no_license
nlp-lap/Version_Compatible_HL7_Parser
8bdb307aa75a5317265f730c5b2ac92ae430962b
9977e1fcd1400916efc4aa161588beae81900cfd
refs/heads/master
2021-03-03T15:05:36.071491
2020-03-09T07:54:42
2020-03-09T07:54:42
245,967,680
0
0
null
null
null
null
UTF-8
Java
false
false
347
java
package hl7.model.V2_5.table; import hl7.bean.table.Table; public class Table0056 extends Table{ private static final String VERSION = "2.5"; public static Table getInstance(){ if(table==null) new Table0056(); return table; } private Table0056(){ setTableName("DRG grouper review code"); setOID("2.16.840.1.113883.12.56"); } }
[ "terminator800@hanmail.net" ]
terminator800@hanmail.net
135cb9421ddf6d7d6dd7306782ce7da8bd71663d
5bc9d8f92f38967cc9ecc03000c0606dbbb38f74
/sca4j/tests/tags/0.1.1/test-function/src/main/java/org/sca4j/tests/function/lifecycle/EagerInitImpl.java
a08346980e8b64e877052145b0b2faf6fc9a0ca8
[]
no_license
codehaus/service-conduit
795332fad474e12463db22c5e57ddd7cd6e2956e
4687d4cfc16f7a863ced69ce9ca81c6db3adb6d2
refs/heads/master
2023-07-20T00:35:11.240347
2011-08-24T22:13:28
2011-08-24T22:13:28
36,342,601
2
0
null
null
null
null
UTF-8
Java
false
false
1,404
java
/* * SCA4J * Copyright (c) 2008-2012 Service Symphony Limited * * This proprietary software may be used only in connection with the SCA4J license * (the ?License?), a copy of which is included in the software or may be obtained * at: http://www.servicesymphony.com/licenses/license.html. * * Software distributed under the License is distributed on an as is basis, without * warranties or conditions of any kind. See the License for the specific language * governing permissions and limitations of use of the software. This software is * distributed in conjunction with other software licensed under different terms. * See the separate licenses for those programs included in the distribution for the * permitted and restricted uses of such software. * */ package org.sca4j.tests.function.lifecycle; import org.osoa.sca.annotations.Scope; import org.osoa.sca.annotations.EagerInit; import org.osoa.sca.annotations.Init; /** * @version $Rev: 2479 $ $Date: 2008-01-19 16:53:52 +0000 (Sat, 19 Jan 2008) $ */ @Scope("COMPOSITE") @EagerInit public class EagerInitImpl { private static boolean initialized; public static boolean isInitialized() { return initialized; } public static void setInitialized(boolean initialized) { EagerInitImpl.initialized = initialized; } @Init protected void init() { setInitialized(true); } }
[ "meerajk@15bcc2b3-4398-4609-aa7c-97eea3cd106e" ]
meerajk@15bcc2b3-4398-4609-aa7c-97eea3cd106e
873e9fe797d52c2058b9dd8c761255a58e88e316
f2b0a390cb3dadad68083eb21a49179d7f381e5a
/syndicflow/src/hot/com/syndiceo/Labels.java
4d14a74f4d429d32556fc77f5cf6bd8bd21b5238
[]
no_license
dthibau/syndiceo
1efcadabf19883f4f0a3a46416fafa5b8a266411
6232369175b00e38180357071340e11792c59b1e
refs/heads/master
2021-04-06T09:00:17.805523
2017-11-13T00:29:47
2017-11-13T00:29:47
83,230,743
0
0
null
null
null
null
UTF-8
Java
false
false
563
java
package com.syndiceo; import java.util.MissingResourceException; import org.jboss.seam.ScopeType; import org.jboss.seam.annotations.Name; import org.jboss.seam.annotations.Scope; @Name("Labels") @Scope(ScopeType.APPLICATION) public class Labels { public final static String get(String key) { try { return org.jboss.seam.core.ResourceBundle.instance().getString(key); } catch (MissingResourceException e) { return "??" + key + "??"; } } public final static String textToHtml(String text) { return text.replaceAll("\n", "<br/>"); } }
[ "david.thibau@gmail.com" ]
david.thibau@gmail.com
d8be4116a975a998086f5dde7267976fb84e54fc
a90450b6a44715a9752915b2407a4f827cf35baf
/WDE/src/wde/util/coord/LatLon2UTM.java
8da6be72ab53e9f9c717ce1a8f18bf049e12739c
[]
no_license
usdot-fhwa-stol/WxDE
8af0ea15dc4d88356142a8e974fac9533490541c
8614f264ed014ea545a47a134b32c0d6ca03cc9a
refs/heads/master
2023-02-18T13:58:32.514197
2017-11-06T22:33:35
2017-11-06T22:40:35
41,399,863
0
0
null
null
null
null
UTF-8
Java
false
false
5,065
java
/************************************************************************ * Source filename: LatLon2UTM.java * <p/> * Creation date: Mar 13, 2013 * <p/> * Author: zhengg * <p/> * Project: WxDE * <p/> * Objective: * <p/> * Developer's notes: * Based on code developed by Sami Salkosuo from ibm: * www.ibm.com/developerworks/java/library/j-coordconvert/ ***********************************************************************/ package wde.util.coord; public class LatLon2UTM extends MathUtil { // equatorial radius double equatorialRadius = 6378137; // polar radius double polarRadius = 6356752.314; // flattening double flattening = 0.00335281066474748;// (equatorialRadius-polarRadius)/equatorialRadius; // inverse flattening 1/flattening double inverseFlattening = 298.257223563;// 1/flattening; // Mean radius double rm = POW(equatorialRadius * polarRadius, 1 / 2.0); // Lat Lon to UTM variables // scale factor double k0 = 0.9996; // eccentricity double e = Math.sqrt(1 - POW(polarRadius / equatorialRadius, 2)); double e1sq = e * e / (1 - e * e); double n = (equatorialRadius - polarRadius) / (equatorialRadius + polarRadius); // r curv 1 double rho = 6368573.744; // r curv 2 double nu = 6389236.914; // Calculate Meridional Arc Length // Meridional Arc double S = 5103266.421; double A0 = 6367449.146; double B0 = 16038.42955; double C0 = 16.83261333; double D0 = 0.021984404; double E0 = 0.000312705; // Calculation Constants // Delta Long double p = -0.483084; double sin1 = 4.84814E-06; // Coefficients for UTM Coordinates double K1 = 5101225.115; double K2 = 3750.291596; double K3 = 1.397608151; double K4 = 214839.3105; double K5 = -2.995382942; double A6 = -1.00541E-07; public String convertLatLonToUTM(double latitude, double longitude, boolean justGrid) { validate(latitude, longitude); String UTM = ""; setVariables(latitude, longitude); String longZone = getLongZone(longitude); LatZones latZones = new LatZones(); String latZone = latZones.getLatZone(latitude); double _easting = getEasting(); double _northing = getNorthing(latitude); if (justGrid) UTM = longZone + latZone; else UTM = longZone + " " + latZone + " " + ((int) _easting) + " " + ((int) _northing); // UTM = longZone + " " + latZone + " " + decimalFormat.format(_easting) + // " "+ decimalFormat.format(_northing); return UTM; } protected void setVariables(double latitude, double longitude) { latitude = degreeToRadian(latitude); rho = equatorialRadius * (1 - e * e) / POW(1 - POW(e * SIN(latitude), 2), 3 / 2.0); nu = equatorialRadius / POW(1 - POW(e * SIN(latitude), 2), (1 / 2.0)); double var1; if (longitude < 0.0) { var1 = ((int) ((180 + longitude) / 6.0)) + 1; } else { var1 = ((int) (longitude / 6)) + 31; } double var2 = (6 * var1) - 183; double var3 = longitude - var2; p = var3 * 3600 / 10000; S = A0 * latitude - B0 * SIN(2 * latitude) + C0 * SIN(4 * latitude) - D0 * SIN(6 * latitude) + E0 * SIN(8 * latitude); K1 = S * k0; K2 = nu * SIN(latitude) * COS(latitude) * POW(sin1, 2) * k0 * (100000000) / 2; K3 = ((POW(sin1, 4) * nu * SIN(latitude) * Math.pow(COS(latitude), 3)) / 24) * (5 - POW(TAN(latitude), 2) + 9 * e1sq * POW(COS(latitude), 2) + 4 * POW(e1sq, 2) * POW(COS(latitude), 4)) * k0 * (10000000000000000L); K4 = nu * COS(latitude) * sin1 * k0 * 10000; K5 = POW(sin1 * COS(latitude), 3) * (nu / 6) * (1 - POW(TAN(latitude), 2) + e1sq * POW(COS(latitude), 2)) * k0 * 1000000000000L; A6 = (POW(p * sin1, 6) * nu * SIN(latitude) * POW(COS(latitude), 5) / 720) * (61 - 58 * POW(TAN(latitude), 2) + POW(TAN(latitude), 4) + 270 * e1sq * POW(COS(latitude), 2) - 330 * e1sq * POW(SIN(latitude), 2)) * k0 * (1E+24); } protected String getLongZone(double longitude) { double longZone = 0; if (longitude < 0.0) { longZone = ((180.0 + longitude) / 6) + 1; } else { longZone = (longitude / 6) + 31; } String val = String.valueOf((int) longZone); if (val.length() == 1) { val = "0" + val; } return val; } protected double getNorthing(double latitude) { double northing = K1 + K2 * p * p + K3 * POW(p, 4); if (latitude < 0.0) { northing = 10000000 + northing; } return northing; } protected double getEasting() { return 500000 + (K4 * p + K5 * POW(p, 3)); } }
[ "schultzjl@leidos.com" ]
schultzjl@leidos.com
cc4f9fe0d381088c56af6dce59224b538c5babca
0c24a960e365c0fe5036791197e0cf22d7804076
/src/main/java/com/wonders/stpt/match/service/IPrizeRuleService.java
6542c5f9b94c746b33ee613791abb87b4208e359
[]
no_license
zh69183787/wd-union
f90b334bb8b21212b94fc1419eb1565bf01cf483
7b447872b24c98a62603507dd2f7d6428a1d762f
refs/heads/master
2021-01-13T02:24:14.945851
2015-06-24T14:39:09
2015-06-24T14:39:09
37,951,613
0
0
null
null
null
null
UTF-8
Java
false
false
848
java
package com.wonders.stpt.match.service; import com.wonders.stpt.match.domain.MPrize; import com.wonders.stpt.match.domain.PrizeRule; import com.wonders.stpt.utils.paginator.mybatis.domain.PageList; import java.util.List; /** * Created by Administrator on 2014/9/11. */ public interface IPrizeRuleService { PageList<PrizeRule> getPrizeRules(PrizeRule rule,Integer pageIndex,Integer pageSize) throws Exception; PageList<PrizeRule> getPrizeRules(PrizeRule rule) throws Exception; PrizeRule getPrizeRule(String ruleId) throws Exception; int delete(List<String> ruleIds) throws Exception; int delete(String ruleId) throws Exception; void save(PrizeRule rule,String[] excludes) throws Exception; void update(PrizeRule rule ,boolean isDynamic)throws Exception; void validRule(MPrize prize) throws Exception; }
[ "657603429@qq.com" ]
657603429@qq.com
9ba40341498b5ca694478ff700786d0e473e4ff0
d2eee6e9a3ad0b3fd2899c3d1cf94778615b10cb
/PROMISE/archives/velocity/1.6/org/apache/velocity/runtime/parser/node/NodeUtils.java
df8a857e9d331605c6b77558fe27025df126b336
[]
no_license
hvdthong/DEFECT_PREDICTION
78b8e98c0be3db86ffaed432722b0b8c61523ab2
76a61c69be0e2082faa3f19efd76a99f56a32858
refs/heads/master
2021-01-20T05:19:00.927723
2018-07-10T03:38:14
2018-07-10T03:38:14
89,766,606
5
1
null
null
null
null
UTF-8
Java
false
false
5,915
java
import org.apache.commons.lang.text.StrBuilder; import org.apache.velocity.context.Context; import org.apache.velocity.exception.MethodInvocationException; import org.apache.velocity.runtime.parser.ParserConstants; import org.apache.velocity.runtime.parser.Token; /** * Utilities for dealing with the AST node structure. * * @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a> * @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a> * @version $Id: NodeUtils.java 687386 2008-08-20 16:57:07Z nbubna $ */ public class NodeUtils { /** * @deprecated use getSpecialText(Token t) */ public static String specialText(Token t) { if (t.specialToken == null || t.specialToken.image.startsWith("##") ) { return ""; } return getSpecialText(t).toString(); } /** * Collect all the <SPECIAL_TOKEN>s that * are carried along with a token. Special * tokens do not participate in parsing but * can still trigger certain lexical actions. * In some cases you may want to retrieve these * special tokens, this is simply a way to * extract them. * @param t the Token * @return StrBuilder with the special tokens. */ public static StrBuilder getSpecialText(Token t) { StrBuilder sb = new StrBuilder(); Token tmp_t = t.specialToken; while (tmp_t.specialToken != null) { tmp_t = tmp_t.specialToken; } while (tmp_t != null) { String st = tmp_t.image; for(int i = 0, is = st.length(); i < is; i++) { char c = st.charAt(i); if ( c == '#' || c == '$' ) { sb.append( c ); } /* * more dreaded MORE hack :) * * looking for ("\\")*"$" sequences */ if ( c == '\\') { boolean ok = true; boolean term = false; int j = i; for( ok = true; ok && j < is; j++) { char cc = st.charAt( j ); if (cc == '\\') { /* * if we see a \, keep going */ continue; } else if( cc == '$' ) { /* * a $ ends it correctly */ term = true; ok = false; } else { /* * nah... */ ok = false; } } if (term) { String foo = st.substring( i, j ); sb.append( foo ); i = j; } } } tmp_t = tmp_t.next; } return sb; } /** * complete node literal * @param t * @return A node literal. */ public static String tokenLiteral( Token t ) { if (t.kind == ParserConstants.MULTI_LINE_COMMENT) { return ""; } else if (t.specialToken == null || t.specialToken.image.startsWith("##")) { return t.image; } else { StrBuilder special = getSpecialText(t); if (special.length() > 0) { return special.append(t.image).toString(); } return t.image; } } /** * Utility method to interpolate context variables * into string literals. So that the following will * work: * * #set $name = "candy" * $image.getURI("${name}.jpg") * * And the string literal argument will * be transformed into "candy.jpg" before * the method is executed. * * @deprecated this method isn't called by any class * * @param argStr * @param vars * @return Interpoliation result. * @throws MethodInvocationException */ public static String interpolate(String argStr, Context vars) throws MethodInvocationException { if( argStr.indexOf('$') == -1 ) return argStr; StrBuilder argBuf = new StrBuilder(); for (int cIdx = 0, is = argStr.length(); cIdx < is;) { char ch = argStr.charAt(cIdx); if( ch == '$' ) { StrBuilder nameBuf = new StrBuilder(); for (++cIdx ; cIdx < is; ++cIdx) { ch = argStr.charAt(cIdx); if (ch == '_' || ch == '-' || Character.isLetterOrDigit(ch)) nameBuf.append(ch); else if (ch == '{' || ch == '}') continue; else break; } if (nameBuf.length() > 0) { Object value = vars.get(nameBuf.toString()); if (value == null) argBuf.append("$").append(nameBuf.toString()); else argBuf.append(value.toString()); } } else { argBuf.append(ch); ++cIdx; } } return argBuf.toString(); } }
[ "hvdthong@github.com" ]
hvdthong@github.com
ec898f770c02cf0368b1728cf970ea463fd5a2dd
4d6f449339b36b8d4c25d8772212bf6cd339f087
/netreflected/src/Framework/System.Web,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a/system/web/ui/webcontrols/webparts/IWebPartParametersImplementation.java
ba3958635a5ae0454650b6133bb33d3832e06819
[ "MIT" ]
permissive
lvyitian/JCOReflector
299a64550394db3e663567efc6e1996754f6946e
7e420dca504090b817c2fe208e4649804df1c3e1
refs/heads/master
2022-12-07T21:13:06.208025
2020-08-28T09:49:29
2020-08-28T09:49:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,257
java
/* * MIT License * * Copyright (c) 2020 MASES s.r.l. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ /************************************************************************************** * <auto-generated> * This code was generated from a template using JCOReflector * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. * </auto-generated> *************************************************************************************/ package system.web.ui.webcontrols.webparts; import org.mases.jcobridge.*; import org.mases.jcobridge.netreflection.*; import java.util.ArrayList; // Import section import system.web.ui.webcontrols.webparts.ParametersCallback; import system.componentmodel.PropertyDescriptorCollection; /** * The base .NET class managing System.Web.UI.WebControls.WebParts.IWebPartParameters, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Extends {@link NetObject}. * <p> * * See: <a href="https://docs.microsoft.com/en-us/dotnet/api/System.Web.UI.WebControls.WebParts.IWebPartParameters" target="_top">https://docs.microsoft.com/en-us/dotnet/api/System.Web.UI.WebControls.WebParts.IWebPartParameters</a> */ public class IWebPartParametersImplementation extends NetObject implements IWebPartParameters { /** * Fully assembly qualified name: System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a */ public static final String assemblyFullName = "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; /** * Assembly name: System.Web */ public static final String assemblyShortName = "System.Web"; /** * Qualified class name: System.Web.UI.WebControls.WebParts.IWebPartParameters */ public static final String className = "System.Web.UI.WebControls.WebParts.IWebPartParameters"; static JCOBridge bridge = JCOBridgeInstance.getInstance(assemblyFullName); /** * The type managed from JCOBridge. See {@link JCType} */ public static JCType classType = createType(); static JCEnum enumInstance = null; JCObject classInstance = null; static JCType createType() { try { return bridge.GetType(className + ", " + (JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName)); } catch (JCException e) { return null; } } void addReference(String ref) throws Throwable { try { bridge.AddReference(ref); } catch (JCNativeException jcne) { throw translateException(jcne); } } public IWebPartParametersImplementation(Object instance) throws Throwable { super(instance); if (instance instanceof JCObject) { classInstance = (JCObject) instance; } else throw new Exception("Cannot manage object, it is not a JCObject"); } public String getJCOAssemblyName() { return assemblyFullName; } public String getJCOClassName() { return className; } public String getJCOObjectName() { return className + ", " + (JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); } public Object getJCOInstance() { return classInstance; } public JCType getJCOType() { return classType; } /** * Try to cast the {@link IJCOBridgeReflected} instance into {@link IWebPartParameters}, a cast assert is made to check if types are compatible. */ public static IWebPartParameters ToIWebPartParameters(IJCOBridgeReflected from) throws Throwable { NetType.AssertCast(classType, from); return new IWebPartParametersImplementation(from.getJCOInstance()); } // Methods section public void GetParametersData(ParametersCallback callback) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Invoke("GetParametersData", callback); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void SetConsumerSchema(PropertyDescriptorCollection schema) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Invoke("SetConsumerSchema", schema == null ? null : schema.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } // Properties section public PropertyDescriptorCollection getSchema() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("Schema"); return new PropertyDescriptorCollection(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } // Instance Events section }
[ "mario.mastrodicasa@masesgroup.com" ]
mario.mastrodicasa@masesgroup.com
3411f0f1dab7466591541ed708e8c1e8a9a49ec1
5741045375dcbbafcf7288d65a11c44de2e56484
/reddit-decompilada/com/reddit/frontpage/ui/preferences/PreferencesFragment$$Lambda$34.java
eff3c90f127aa3ab349725695bd7c2d9440a7526
[]
no_license
miarevalo10/ReporteReddit
18dd19bcec46c42ff933bb330ba65280615c281c
a0db5538e85e9a081bf268cb1590f0eeb113ed77
refs/heads/master
2020-03-16T17:42:34.840154
2018-05-11T10:16:04
2018-05-11T10:16:04
132,843,706
0
0
null
null
null
null
UTF-8
Java
false
false
520
java
package com.reddit.frontpage.ui.preferences; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; final /* synthetic */ class PreferencesFragment$$Lambda$34 implements OnClickListener { private final PreferencesFragment f21509a; PreferencesFragment$$Lambda$34(PreferencesFragment preferencesFragment) { this.f21509a = preferencesFragment; } public final void onClick(DialogInterface dialogInterface, int i) { this.f21509a.m37738b(); } }
[ "mi.arevalo10@uniandes.edu.co" ]
mi.arevalo10@uniandes.edu.co
e365398d03bf945558d8eea86e69cacdef84039f
8979fc82ea7b34410b935fbea0151977a0d46439
/src/all_problems/P628_MaximumProductOfThreeNumbers.java
0ddbc3df3a454797b56dafbe44237b37d208749a
[ "MIT" ]
permissive
YC-S/LeetCode
6fa3f4e46c952b3c6bf5462a8ee0c1186ee792bd
452bb10e45de53217bca52f8c81b3034316ffc1b
refs/heads/master
2021-11-06T20:51:31.554936
2021-10-31T03:39:38
2021-10-31T03:39:38
235,529,949
1
0
null
null
null
null
UTF-8
Java
false
false
806
java
package all_problems; public class P628_MaximumProductOfThreeNumbers { public int maximumProduct(int[] nums) { int max1 = Integer.MIN_VALUE, max2 = Integer.MIN_VALUE, max3 = Integer.MIN_VALUE, min1 = Integer.MAX_VALUE, min2 = Integer.MAX_VALUE; for (int n : nums) { if (n > max1) { max3 = max2; max2 = max1; max1 = n; } else if (n > max2) { max3 = max2; max2 = n; } else if (n > max3) { max3 = n; } if (n < min1) { min2 = min1; min1 = n; } else if (n < min2) { min2 = n; } } return Math.max(max1 * max2 * max3, max1 * min1 * min2); } }
[ "yuanchenshi@gmail.com" ]
yuanchenshi@gmail.com
3e364b5c5fbf8b438c2288a642800d1337b18447
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-13138-1-21-MOEAD-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/store/XWikiHibernateStore_ESTest.java
2a49ff57b12a82e875ae3e47ba15504fe3f60538
[]
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
564
java
/* * This file was automatically generated by EvoSuite * Thu Apr 09 09:54:11 UTC 2020 */ package com.xpn.xwiki.store; 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 XWikiHibernateStore_ESTest extends XWikiHibernateStore_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
c2ad84a42f0ecc2d04523410d6ca0aacd3b360d6
39846d92fdcd9b056df9b7c1afcd277fec2bfd6a
/CDDang/app/src/main/java/com/chewuwuyou/app/ui/SearchContactActivity.java
f83b7d59b21924b08206a61909caa5ec7b998fd5
[]
no_license
wisekingokok/cdd
84fef1c7736c85a661b69c9fdf0d46e97bd638a2
c8dbb84037b58010d313878aea06ef42c8d0111e
refs/heads/master
2020-03-23T14:00:44.938787
2018-07-20T03:34:15
2018-07-20T03:34:15
141,650,274
0
0
null
null
null
null
UTF-8
Java
false
false
1,060
java
package com.chewuwuyou.app.ui; import android.app.Activity; import android.os.Bundle; import android.widget.EditText; import android.widget.TextView; import com.chewuwuyou.app.R; import com.chewuwuyou.app.widget.ListViewForScrollView; import net.tsz.afinal.annotation.view.ViewInject; public class SearchContactActivity extends BaseActivity { @ViewInject(id = R.id.et_search) private EditText mEditText; @ViewInject(id = R.id.sure) private TextView mTextView_sure; @ViewInject(id = R.id.list1) private ListViewForScrollView mListView1; @ViewInject(id = R.id.list2) private ListViewForScrollView mListView2; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_search_contact); initView(); initData(); initEvent(); } protected void initView() { } protected void initData() { } protected void initEvent() { } }
[ "wisekingokok@126.com" ]
wisekingokok@126.com
4678f5291224add16fd397740b3ae0bd09c93f53
9cc124920bdd52460cf3e602b049542f328c97aa
/rdap-service/src/main/java/org/restfulwhois/rdap/search/domain/service/package-info.java
5a8793c6ccda2b6da2acd1381514d4bdaeac4996
[ "BSD-2-Clause" ]
permissive
whileZhou/rdap
373d5e6f19a32b38594b45f6856b30593bfb18eb
94a79a8ce67b90d4f093878030b276dc83d8c998
refs/heads/master
2021-01-20T16:47:29.432866
2015-09-17T02:01:59
2015-09-17T02:01:59
38,670,099
0
0
null
2015-07-07T07:04:08
2015-07-07T07:04:08
null
UTF-8
Java
false
false
129
java
/** *org.restfulwhois.rdap.search.domain.service. * @author jiashuo * */ package org.restfulwhois.rdap.search.domain.service;
[ "jiashuo@cnnic.cn" ]
jiashuo@cnnic.cn
4b38ad5dd6ca93e5a7949dc0f247f36e78c01ca6
0bcba10fe9e1802633f6a5fa4568d63056237b2e
/Android/SpinnerImage/app/src/main/java/com/ajay/hrc/spinnerimage/MainActivity.java
8866baf6f2deead9ce214f44c967b47306d675f0
[]
no_license
singhrohaajay/Lab-programs
634a73e1245061bcf3b4456c7c429c40b37dcefa
29b89ca8eb2ecd8d76ba8b57813f8ca1b0216aff
refs/heads/master
2020-03-31T20:13:43.264654
2018-10-11T18:58:24
2018-10-11T18:58:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,249
java
package com.ajay.hrc.spinnerimage; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.ImageView; import android.widget.Spinner; import android.widget.TextView; import java.util.ArrayList; import java.util.Arrays; public class MainActivity extends AppCompatActivity implements AdapterView.OnItemSelectedListener { Spinner s; TextView tv; ImageView i; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); s = findViewById(R.id.spinner); tv = findViewById(R.id.textView); i = findViewById(R.id.imageView); ArrayAdapter<CharSequence> arrayAdapter = ArrayAdapter.createFromResource(this, R.array.countries, R.layout.support_simple_spinner_dropdown_item); arrayAdapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item); s.setAdapter(arrayAdapter); s.setOnItemSelectedListener(this); } @Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { if (parent.getId() == R.id.spinner) { switch (position) { case 0: tv.setText("Flag of United Kingdom"); i.setImageResource(R.drawable.uk); break; case 1: tv.setText("Flag of Canada"); i.setImageResource(R.drawable.canada); break; case 2: tv.setText("Flag of Australia"); i.setImageResource(R.drawable.australia); break; case 3: tv.setText("Flag of Bangladesh"); i.setImageResource(R.drawable.bangladesh); break; case 4: tv.setText("Flag of China"); i.setImageResource(R.drawable.china); break; } } } @Override public void onNothingSelected(AdapterView<?> parent) { } }
[ "you@example.com" ]
you@example.com
b8a0ac487de8f9c321f6c2388ca5b34b20b32ee3
c4d1992bbfe4552ad16ff35e0355b08c9e4998d6
/releases/2.0.0RC/src/java/org/apache/poi/hssf/record/chart/NumberFormatIndexRecord.java
7104e074b85e06c518150effc4a5cd82adbcf81d
[]
no_license
BGCX261/zkpoi-svn-to-git
36f2a50d2618c73e40f24ddc2d3df5aadc8eca30
81a63fb1c06a2dccff20cab1291c7284f1687508
refs/heads/master
2016-08-04T08:42:59.622864
2015-08-25T15:19:51
2015-08-25T15:19:51
41,594,557
0
1
null
null
null
null
UTF-8
Java
false
false
3,021
java
/* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ package org.apache.poi.hssf.record.chart; import org.apache.poi.hssf.record.RecordInputStream; import org.apache.poi.hssf.record.StandardRecord; import org.apache.poi.util.HexDump; import org.apache.poi.util.LittleEndianOutput; /** * The number format index record indexes format table. This applies to an axis.<p/> * * @author Glen Stampoultzis (glens at apache.org) */ public final class NumberFormatIndexRecord extends StandardRecord { public final static short sid = 0x104E; private short field_1_formatIndex; public NumberFormatIndexRecord() { } public NumberFormatIndexRecord(RecordInputStream in) { field_1_formatIndex = in.readShort(); } public String toString() { StringBuffer buffer = new StringBuffer(); buffer.append("[IFMT]\n"); buffer.append(" .formatIndex = ") .append("0x").append(HexDump.toHex( getFormatIndex ())) .append(" (").append( getFormatIndex() ).append(" )"); buffer.append(System.getProperty("line.separator")); buffer.append("[/IFMT]\n"); return buffer.toString(); } public void serialize(LittleEndianOutput out) { out.writeShort(field_1_formatIndex); } protected int getDataSize() { return 2; } public short getSid() { return sid; } public Object clone() { NumberFormatIndexRecord rec = new NumberFormatIndexRecord(); rec.field_1_formatIndex = field_1_formatIndex; return rec; } /** * Get the format index field for the NumberFormatIndex record. */ public short getFormatIndex() { return field_1_formatIndex; } /** * Set the format index field for the NumberFormatIndex record. */ public void setFormatIndex(short field_1_formatIndex) { this.field_1_formatIndex = field_1_formatIndex; } }
[ "you@example.com" ]
you@example.com
5dfe9fda24508c02a5c24ba9e709a54c2f07c372
79595075622ded0bf43023f716389f61d8e96e94
/app/src/main/java/gov/nist/javax/sip/parser/ProxyAuthenticateParser.java
d68bc1a54952f08e617f6025f64a8524586527cd
[]
no_license
dstmath/OppoR15
96f1f7bb4d9cfad47609316debc55095edcd6b56
b9a4da845af251213d7b4c1b35db3e2415290c96
refs/heads/master
2020-03-24T16:52:14.198588
2019-05-27T02:24:53
2019-05-27T02:24:53
142,840,716
7
4
null
null
null
null
UTF-8
Java
false
false
672
java
package gov.nist.javax.sip.parser; import gov.nist.javax.sip.header.ProxyAuthenticate; import gov.nist.javax.sip.header.SIPHeader; import java.text.ParseException; public class ProxyAuthenticateParser extends ChallengeParser { public ProxyAuthenticateParser(String proxyAuthenticate) { super(proxyAuthenticate); } protected ProxyAuthenticateParser(Lexer lexer) { super(lexer); } public SIPHeader parse() throws ParseException { headerName(TokenTypes.PROXY_AUTHENTICATE); ProxyAuthenticate proxyAuthenticate = new ProxyAuthenticate(); super.parse(proxyAuthenticate); return proxyAuthenticate; } }
[ "toor@debian.toor" ]
toor@debian.toor
914a956606619e4cbf92f11f5b8ba33f8903c69c
995f73d30450a6dce6bc7145d89344b4ad6e0622
/P40_HarmonyOS_2.0.0_Developer_Beta1/src/main/java/ohos/interwork/eventhandler/$$Lambda$CourierEx$9RJRi5QfrmVaOUM_iKUm1gp5g.java
27200e38ce46d5fb1bd743ba59bb4315735e21c9
[]
no_license
morningblu/HWFramework
0ceb02cbe42585d0169d9b6c4964a41b436039f5
672bb34094b8780806a10ba9b1d21036fd808b8e
refs/heads/master
2023-07-29T05:26:14.603817
2021-09-03T05:23:34
2021-09-03T05:23:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
763
java
package ohos.interwork.eventhandler; import ohos.utils.Parcel; import ohos.utils.Sequenceable; /* renamed from: ohos.interwork.eventhandler.-$$Lambda$CourierEx$9-RJRi5QfrmVaOU-M_iKUm1gp5g reason: invalid class name */ /* compiled from: lambda */ public final /* synthetic */ class $$Lambda$CourierEx$9RJRi5QfrmVaOUM_iKUm1gp5g implements Sequenceable.Producer { public static final /* synthetic */ $$Lambda$CourierEx$9RJRi5QfrmVaOUM_iKUm1gp5g INSTANCE = new $$Lambda$CourierEx$9RJRi5QfrmVaOUM_iKUm1gp5g(); private /* synthetic */ $$Lambda$CourierEx$9RJRi5QfrmVaOUM_iKUm1gp5g() { } @Override // ohos.utils.Sequenceable.Producer public final Object createFromParcel(Parcel parcel) { return CourierEx.lambda$static$0(parcel); } }
[ "dstmath@163.com" ]
dstmath@163.com
d9c367a6785ddd57eb1a370a6ecb1d414b973b7f
6f40baeb9b28bb1cb9738ab9624d8da4d07b9db3
/workspace/src/com/looper/work0309/W1_HomeWork.java
ef7653072b7a2a9b71dd8edc1aa39d477a1f5af5
[]
no_license
1004032560/Java
cacf3192166dc632e91be1ce4b9600191a37916d
10a84834bd6a300bf6bdcc91acebde351242aa9c
refs/heads/master
2021-04-04T05:09:24.947749
2020-05-31T14:04:34
2020-05-31T14:04:34
248,426,820
1
0
null
null
null
null
UTF-8
Java
false
false
549
java
package com.looper.work0309; public class W1_HomeWork { public static void main(String[] args) { System.out.println("小汽车信息:"); W1_Car car = new W1_Car(); car.setWheels(4); car.setWeight(2); car.setLoader(5); car.showCar(); System.out.println("==========="); System.out.println("大卡车信息:"); W1_Truck truck = new W1_Truck(); truck.setWheels(8); truck.setWeight(6); truck.setPayload(15);; truck.showTruck(); } }
[ "1004032560@qq.com" ]
1004032560@qq.com
f38450d95d8a0282c399cf302ff0826e1b8d6bab
88e17c20ce1923e5a0ffae883586d0abce7b8675
/src/de/dimm/vsm/Utilities/MaxSizeHashMap.java
bae67b8f9e3499489e56931d6cf273d580c7d053
[ "Apache-2.0" ]
permissive
markymarkmk2/VSMLib
34a418fad340b3bfecb42dd7a07d5efb89f00d38
12a5e523e51ce6973b150e627e8a2ae2597e7eaf
refs/heads/master
2020-06-09T14:14:03.639496
2017-01-03T12:27:30
2017-01-03T12:27:30
76,034,011
0
0
null
null
null
null
UTF-8
Java
false
false
604
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package de.dimm.vsm.Utilities; import java.util.LinkedHashMap; import java.util.Map; /** * * @author Administrator */ public class MaxSizeHashMap<S, T> extends LinkedHashMap<S, T> { private final int maxSize; public MaxSizeHashMap(int maxSize) { this.maxSize = maxSize; } @Override protected boolean removeEldestEntry(Map.Entry<S, T> eldest) { return size() > maxSize; } }
[ "mark@dimm.de" ]
mark@dimm.de
c1d11ebabb94121dc6335b23ac25640059187dd4
63e7479f00e08daef895633dfa32440e8ff9867c
/mathlogic4/src/ru/ifmo/ctddev/mathlogic/khovanskiy/task4/Negation.java
be073c3d5250465015b4ef6094475776b7b2d017
[]
no_license
khovanskiy/mathlogic-course
6c161c0c2a829d4478d757982e4c94623443163e
4db0b97094388d47f1fa08bb7a729157869870ac
refs/heads/master
2020-05-04T03:16:23.390923
2019-04-01T21:02:32
2019-04-01T21:02:32
178,943,682
0
0
null
null
null
null
UTF-8
Java
false
false
1,427
java
package ru.ifmo.ctddev.mathlogic.khovanskiy.task4; public class Negation extends F { private F expr; public Negation(F expr) { this.expr = expr; this.type = EEnum.NEG; } @Override public boolean equalsE(F e) { if (e.type == EEnum.NEG) { return expr.equalsE(((Negation)e).expr); } return false; } @Override public boolean equalsWithAxioms(F e) { if (e.type == EEnum.NEG) { return expr.equalsWithAxioms(((Negation) e).expr); } return false; } @Override public boolean isFree(Variable v) { return expr.isFree(v); } @Override public F getSubstituted(Variable v, Term substitution) { return neg(expr.getSubstituted(v, substitution)); } @Override public SResult getSubstitution(Variable v, F substituted) { if (substituted.type == EEnum.NEG) { Negation not = (Negation)substituted; return expr.getSubstitution(v, not.expr); } return new SResult(false, null); } @Override public boolean isFreeSub(Variable v, Variable substitution) { return expr.isFreeSub(v, substitution); } @Override public String toString() { return "!" + expr; } }
[ "victor.khovanskiy@gmail.com" ]
victor.khovanskiy@gmail.com
a5c670df3e821a5cd399cc9a223d9e03466966da
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/27/27_81db2ad95944e44de991966368b55861f8dd284d/FactorialTest/27_81db2ad95944e44de991966368b55861f8dd284d_FactorialTest_t.java
cad16e555a55f9b5b4a282fdb1a0b417a22bb8f9
[]
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
491
java
package com.mycompany.app; import org.junit.Test; import static org.junit.Assert.assertEquals; /** * Unit test for simple App. */ public class FactorialTest { @Test(expected=IllegalArgumentException.class) public void noNegativeFactorial() { Factorial.factorial(-1); } @Test public void computeFactorials() { assertEquals(1, Factorial.factorial(0)); assertEquals(1, Factorial.factorial(1)); assertEquals(120, Factorial.factorial(6)); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
14463dc820bce93c5364ee23dd9d7ab3b35c658c
d5d9dd00387650671329d7e68227fcf3741559a7
/app/src/main/java/com/tiancaijiazu/app/activitys/calendar/format/CalendarWeekDayFormatter.java
21756186f64d1428a37075d62d9f42cf2801cee6
[]
no_license
ninongsha123/ggvb
6ef0f20be7e71c5b57afb449a3dfc6afcc396c65
c6315fd0acdde67f677c3c282111a45795db0cf6
refs/heads/master
2020-12-02T15:58:08.527042
2019-12-31T09:17:10
2019-12-31T09:17:10
231,054,837
1
0
null
null
null
null
UTF-8
Java
false
false
583
java
package com.tiancaijiazu.app.activitys.calendar.format; import org.threeten.bp.DayOfWeek; import org.threeten.bp.format.TextStyle; import java.util.Locale; /** * Format the day of the week with using {@link TextStyle#SHORT} by default. * * @see java.time.DayOfWeek#getDisplayName(java.time.format.TextStyle, Locale) */ public final class CalendarWeekDayFormatter implements WeekDayFormatter { /** * {@inheritDoc} */ @Override public CharSequence format(final DayOfWeek dayOfWeek) { return dayOfWeek.getDisplayName(TextStyle.SHORT, Locale.getDefault()); } }
[ "yx9521l@163.com" ]
yx9521l@163.com
9cb08f08248fb396463060dcbaf50602588ff98a
d22a545abad4c69751c3504c702a9491ca96c225
/src/com/flurry/android/FlurryAgent$FlurryDefaultExceptionHandler.java
522ad53d50b3dd1b397dcddd908c7fe9c24b26bf
[]
no_license
anu12anu12/GiveMeDirection
c153b8aa5f8845c408460f091dc9c60c0573225d
69805bb23be09bc971c03749d76d0b033923d37a
refs/heads/master
2020-12-24T15:58:32.456406
2013-09-04T18:48:39
2013-09-04T18:48:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,007
java
package com.flurry.android; public class FlurryAgent$FlurryDefaultExceptionHandler implements Thread.UncaughtExceptionHandler { private Thread.UncaughtExceptionHandler a; FlurryAgent$FlurryDefaultExceptionHandler() { Thread.UncaughtExceptionHandler localUncaughtExceptionHandler = Thread.getDefaultUncaughtExceptionHandler(); this.a = localUncaughtExceptionHandler; } public void uncaughtException(Thread paramThread, Throwable paramThrowable) { try { FlurryAgent.h().a(paramThrowable); if (this.a == null) return; this.a.uncaughtException(paramThread, paramThrowable); return; } catch (Throwable localThrowable) { while (true) int i = ai.b("FlurryAgent", "", localThrowable); } } } /* Location: D:\Tools\extractapktools\extractapktools\dex2jar-0.0.7.11-SNAPSHOT\classes_dex2jar.jar * Qualified Name: com.flurry.android.FlurryAgent.FlurryDefaultExceptionHandler * JD-Core Version: 0.6.2 */
[ "asingh7@asingh7-PC.beaeng.mfeeng.org" ]
asingh7@asingh7-PC.beaeng.mfeeng.org
a13eae8676f6d6eb5b1ec2e52221190e71720fb0
d85eea278f53c2d60197a0b479c074b5a52bdf1e
/Services/msk-bs/src/main/java/com/msk/bs/bean/IBA2141110Result.java
8ad125151b741effd58a15542d68fd4fc10ce836
[]
no_license
YuanChenM/xcdv1.5
baeaab6e566236d0f3e170ceae186b6d2999c989
77bf0e90102f5704fe186140e1792396b7ade91d
refs/heads/master
2021-05-26T04:51:12.441499
2017-08-14T03:06:07
2017-08-14T03:06:07
100,221,981
1
2
null
null
null
null
UTF-8
Java
false
false
861
java
package com.msk.bs.bean; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * Created by zhu_kai1 on 2016/7/19. */ @ApiModel(value = "IBA2141110Result", description = "result") public class IBA2141110Result extends IBA2141110Bean { @ApiModelProperty(value = "标志产品已下架,1-代表不存在或已下架") private String isOffTheShelf; /*价盘周期编号(共5位: 年(2位) + 月(2位) + 半旬号(1位)) */ private String priceCycle; public String getIsOffTheShelf() { return isOffTheShelf; } public void setIsOffTheShelf(String isOffTheShelf) { this.isOffTheShelf = isOffTheShelf; } public String getPriceCycle() { return priceCycle; } public void setPriceCycle(String priceCycle) { this.priceCycle = priceCycle; } }
[ "yuan_chen1@hoperun.com" ]
yuan_chen1@hoperun.com
8b3454035f8dc67aae9dde0ac18b441bac1878bd
828b5327357d0fb4cb8f3b4472f392f3b8b10328
/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/typeutils/BinaryStringSerializer.java
7dd0ef62f2250397b052d1681bd69bd7bc0ab726
[ "CC-BY-3.0", "LicenseRef-scancode-unknown-license-reference", "Unlicense", "ISC", "MIT-0", "GPL-2.0-only", "BSD-2-Clause-Views", "OFL-1.1", "Apache-2.0", "LicenseRef-scancode-jdom", "GCC-exception-3.1", "MPL-2.0", "CC-PDDC", "AGPL-3.0-only", "MPL-2.0-no-copyleft-exception", "LicenseRef-scancode-public-domain", "LGPL-2.1-only", "BSD-2-Clause", "CDDL-1.1", "CDDL-1.0", "LicenseRef-scancode-other-permissive", "LicenseRef-scancode-proprietary-license", "BSD-3-Clause", "MIT", "EPL-1.0", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-free-unknown", "CC0-1.0", "Classpath-exception-2.0", "CC-BY-2.5" ]
permissive
Romance-Zhang/flink_tpc_ds_game
7e82d801ebd268d2c41c8e207a994700ed7d28c7
8202f33bed962b35c81c641a05de548cfef6025f
refs/heads/master
2022-11-06T13:24:44.451821
2019-09-27T09:22:29
2019-09-27T09:22:29
211,280,838
0
1
Apache-2.0
2022-10-06T07:11:45
2019-09-27T09:11:11
Java
UTF-8
Java
false
false
3,626
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.flink.table.runtime.typeutils; import org.apache.flink.annotation.Internal; import org.apache.flink.api.common.typeutils.SimpleTypeSerializerSnapshot; import org.apache.flink.api.common.typeutils.TypeSerializerSnapshot; import org.apache.flink.api.common.typeutils.base.TypeSerializerSingleton; import org.apache.flink.core.memory.DataInputView; import org.apache.flink.core.memory.DataOutputView; import org.apache.flink.table.dataformat.BinaryString; import org.apache.flink.table.runtime.util.SegmentsUtil; import java.io.IOException; /** * Serializer for {@link BinaryString}. */ @Internal public final class BinaryStringSerializer extends TypeSerializerSingleton<BinaryString> { private static final long serialVersionUID = 1L; public static final BinaryStringSerializer INSTANCE = new BinaryStringSerializer(); private BinaryStringSerializer() {} @Override public boolean isImmutableType() { return true; } @Override public BinaryString createInstance() { return BinaryString.fromString(""); } @Override public BinaryString copy(BinaryString from) { return from.copy(); } @Override public BinaryString copy(BinaryString from, BinaryString reuse) { return from.copy(); } @Override public int getLength() { return -1; } @Override public void serialize(BinaryString record, DataOutputView target) throws IOException { record.ensureMaterialized(); target.writeInt(record.getSizeInBytes()); SegmentsUtil.copyToView(record.getSegments(), record.getOffset(), record.getSizeInBytes(), target); } @Override public BinaryString deserialize(DataInputView source) throws IOException { return deserializeInternal(source); } public static BinaryString deserializeInternal(DataInputView source) throws IOException { int length = source.readInt(); byte[] bytes = new byte[length]; source.readFully(bytes); return BinaryString.fromBytes(bytes); } @Override public BinaryString deserialize(BinaryString record, DataInputView source) throws IOException { return deserialize(source); } @Override public void copy(DataInputView source, DataOutputView target) throws IOException { int length = source.readInt(); target.writeInt(length); target.write(source, length); } @Override public TypeSerializerSnapshot<BinaryString> snapshotConfiguration() { return new BinaryStringSerializerSnapshot(); } /** * Serializer configuration snapshot for compatibility and format evolution. */ @SuppressWarnings("WeakerAccess") public static final class BinaryStringSerializerSnapshot extends SimpleTypeSerializerSnapshot<BinaryString> { public BinaryStringSerializerSnapshot() { super(() -> INSTANCE); } } }
[ "1003761104@qq.com" ]
1003761104@qq.com
1c80ccdf9ba503a04955c38ac350347f78ec14ad
cc93a553391d0b37b17443b09cb8065d9f49dee2
/src/main/java/com/brain/contribuable/config/AsyncConfiguration.java
c89c85b09a13bb0bf0f7ed24f40dc676b64cf694
[]
no_license
sandalothier/jh-contribuable
69666ca5319f87c9f5f2815abcef76ac4530141b
c99766d6993e22511d917a870ac9598f729601f4
refs/heads/master
2022-12-25T10:15:37.031247
2019-12-26T14:35:05
2019-12-26T14:35:05
230,278,519
0
0
null
2022-12-16T05:58:26
2019-12-26T14:34:48
Java
UTF-8
Java
false
false
2,006
java
package com.brain.contribuable.config; import io.github.jhipster.async.ExceptionHandlingAsyncTaskExecutor; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler; import org.springframework.aop.interceptor.SimpleAsyncUncaughtExceptionHandler; import org.springframework.boot.autoconfigure.task.TaskExecutionProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.scheduling.annotation.AsyncConfigurer; import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import java.util.concurrent.Executor; @Configuration @EnableAsync @EnableScheduling public class AsyncConfiguration implements AsyncConfigurer { private final Logger log = LoggerFactory.getLogger(AsyncConfiguration.class); private final TaskExecutionProperties taskExecutionProperties; public AsyncConfiguration(TaskExecutionProperties taskExecutionProperties) { this.taskExecutionProperties = taskExecutionProperties; } @Override @Bean(name = "taskExecutor") public Executor getAsyncExecutor() { log.debug("Creating Async Task Executor"); ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); executor.setCorePoolSize(taskExecutionProperties.getPool().getCoreSize()); executor.setMaxPoolSize(taskExecutionProperties.getPool().getMaxSize()); executor.setQueueCapacity(taskExecutionProperties.getPool().getQueueCapacity()); executor.setThreadNamePrefix(taskExecutionProperties.getThreadNamePrefix()); return new ExceptionHandlingAsyncTaskExecutor(executor); } @Override public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() { return new SimpleAsyncUncaughtExceptionHandler(); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
d946dbcdd93b760ddc106b84adb09b1b9c1e75b1
bd91f3120baef8b9f29b68f19e9a5184dc8dcc9e
/src/main/java/com/cn/tianxia/api/utils/ipseeker/IPEntry.java
2eee25ae90ef7ce3b56fc3ba8b60d1248dd02e83
[]
no_license
xfearless1201/api
f929cbaf6d54f04a46c5dcd840a6a9917d81c11c
304a8533b31f15b8f9b75017d23a26ce5bbc0300
refs/heads/master
2022-06-21T10:44:06.679009
2019-06-17T10:42:14
2019-06-17T10:42:14
192,326,878
1
4
null
2021-08-13T15:33:07
2019-06-17T10:39:58
Java
UTF-8
Java
false
false
406
java
package com.cn.tianxia.api.utils.ipseeker; public class IPEntry { public String beginIp; public String endIp; public String country; public String area; public IPEntry() { this.beginIp = (this.endIp = this.country = this.area = ""); } public String toString() { return this.area + " " + this.country + "IP范围:" + this.beginIp + "-" + this.endIp; } }
[ "xfearless1201@gmail.com" ]
xfearless1201@gmail.com
f5680d3c449dcc21363479ced88af1e5bc195aa8
b47489e86b1779013a98b18eb8430030dd7afb83
/HowTomcatWorks/apache-tomcat-5.5.36-src/servletapi/jsr152/examples/WEB-INF/classes/compressionFilters/CompressionFilterTestServlet.java
c9b504b4738c33470c28c568c24a938503e32f31
[ "LicenseRef-scancode-other-permissive", "bzip2-1.0.6", "LicenseRef-scancode-mx4j", "CPL-1.0", "Apache-2.0", "Zlib", "EPL-1.0", "LZMA-exception" ]
permissive
cuiyuemin365/books
66be7059d309745a8045426fc193439b95a288e4
4ffdd959b4fc894f085ee5e80031ff8f77d475e6
refs/heads/master
2023-01-09T19:30:48.718134
2021-04-08T07:52:00
2021-04-08T07:52:00
120,096,744
0
0
Apache-2.0
2023-01-02T21:56:51
2018-02-03T14:08:45
Java
UTF-8
Java
false
false
1,977
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package compressionFilters; import java.io.IOException; import java.util.Enumeration; import javax.servlet.*; import javax.servlet.http.*; /** * Very Simple test servlet to test compression filter * @author Amy Roh * @version $Id: CompressionFilterTestServlet.java 939541 2010-04-30 01:43:56Z kkolinko $ */ public class CompressionFilterTestServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ServletOutputStream out = response.getOutputStream(); response.setContentType("text/plain"); Enumeration e = ((HttpServletRequest)request).getHeaders("Accept-Encoding"); while (e.hasMoreElements()) { String name = (String)e.nextElement(); out.println(name); if (name.indexOf("gzip") != -1) { out.println("gzip supported -- able to compress"); } else { out.println("gzip not supported"); } } out.println("Compression Filter Test Servlet"); out.close(); } }
[ "cuiyuemin@mofanghr.com" ]
cuiyuemin@mofanghr.com
5492b1750a6c50d7e87b3528971065013ab853e1
1cf5123e546af5ed9d64708c46be432fddb439d5
/codec-serialization/codec-serialization-kryo/src/main/java/io/esastack/codec/serialization/kryo/utils/AbstractKryoFactory.java
51e325cdf5dc2ef49a398479b9ae189a516e0daf
[ "Apache-2.0" ]
permissive
ConglinGu/codec-dubbo
463ab7e4dd71ee07b96d18744513bdaf63ec249f
54548a40b2045218328eb1656523700380daaf36
refs/heads/main
2023-04-13T23:17:48.655116
2021-05-08T09:15:22
2021-05-08T09:15:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,212
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* * Copyright 2021 OPPO ESA Stack Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.esastack.codec.serialization.kryo.utils; import com.esotericsoftware.kryo.Kryo; import com.esotericsoftware.kryo.Serializer; import com.esotericsoftware.kryo.pool.KryoFactory; import com.esotericsoftware.kryo.serializers.DefaultSerializers; import de.javakaffee.kryoserializers.ArraysAsListSerializer; import de.javakaffee.kryoserializers.BitSetSerializer; import de.javakaffee.kryoserializers.GregorianCalendarSerializer; import de.javakaffee.kryoserializers.JdkProxySerializer; import de.javakaffee.kryoserializers.RegexSerializer; import de.javakaffee.kryoserializers.SynchronizedCollectionsSerializer; import de.javakaffee.kryoserializers.URISerializer; import de.javakaffee.kryoserializers.UUIDSerializer; import de.javakaffee.kryoserializers.UnmodifiableCollectionsSerializer; import io.esastack.codec.serialization.api.SerializableClassRegistry; import io.esastack.codec.serialization.kryo.CompatibleKryo; import java.lang.reflect.InvocationHandler; import java.math.BigDecimal; import java.math.BigInteger; import java.net.URI; import java.text.SimpleDateFormat; import java.util.*; import java.util.concurrent.ConcurrentHashMap; import java.util.regex.Pattern; public abstract class AbstractKryoFactory implements KryoFactory { private static volatile Class<? extends Serializer> defaultSerializer; private final Set<Class> registrations = new LinkedHashSet<Class>(); private boolean registrationRequired; private volatile boolean kryoCreated; public AbstractKryoFactory() { } public static void setDefaultSerializer(Class<? extends Serializer> serializer) { defaultSerializer = serializer; } /** * only supposed to be called at startup time * <p> * later may consider adding support for custom serializer, custom id, etc */ public void registerClass(Class clazz) { if (kryoCreated) { throw new IllegalStateException("Can't register class after creating kryo instance"); } registrations.add(clazz); } @Override public Kryo create() { if (!kryoCreated) { kryoCreated = true; } Kryo kryo = new CompatibleKryo(); if (defaultSerializer != null) { kryo.setDefaultSerializer(defaultSerializer); } // TODO //kryo.setReferences(false); kryo.setRegistrationRequired(registrationRequired); kryo.register(Arrays.asList("").getClass(), new ArraysAsListSerializer()); kryo.register(GregorianCalendar.class, new GregorianCalendarSerializer()); kryo.register(InvocationHandler.class, new JdkProxySerializer()); kryo.register(BigDecimal.class, new DefaultSerializers.BigDecimalSerializer()); kryo.register(BigInteger.class, new DefaultSerializers.BigIntegerSerializer()); kryo.register(Pattern.class, new RegexSerializer()); kryo.register(BitSet.class, new BitSetSerializer()); kryo.register(URI.class, new URISerializer()); kryo.register(UUID.class, new UUIDSerializer()); UnmodifiableCollectionsSerializer.registerSerializers(kryo); SynchronizedCollectionsSerializer.registerSerializers(kryo); // now just added some very common classes // TODO optimization kryo.register(HashMap.class); kryo.register(ArrayList.class); kryo.register(LinkedList.class); kryo.register(HashSet.class); kryo.register(TreeSet.class); kryo.register(Hashtable.class); kryo.register(Date.class); kryo.register(Calendar.class); kryo.register(ConcurrentHashMap.class); kryo.register(SimpleDateFormat.class); kryo.register(GregorianCalendar.class); kryo.register(Vector.class); kryo.register(BitSet.class); kryo.register(StringBuffer.class); kryo.register(StringBuilder.class); kryo.register(Object.class); kryo.register(Object[].class); kryo.register(String[].class); kryo.register(byte[].class); kryo.register(char[].class); kryo.register(int[].class); kryo.register(float[].class); kryo.register(double[].class); for (Class clazz : registrations) { kryo.register(clazz); } SerializableClassRegistry.getRegisteredClasses().forEach((clazz, ser) -> { if (ser == null) { kryo.register(clazz); } else { kryo.register(clazz, (Serializer) ser); } }); return kryo; } public void setRegistrationRequired(boolean registrationRequired) { this.registrationRequired = registrationRequired; } public abstract void returnKryo(Kryo kryo); public abstract Kryo getKryo(); }
[ "chenqian@oppo.com" ]
chenqian@oppo.com
9775dd7e2332a9aaa6168e162618214ba0085a87
ccf94dcb6b1500fcbbd56964ae8c4832a496b8b3
/java/baiduads-sdk-auto/src/main/java/com/baidu/dev2/api/sdk/dpaapiproductset/model/ProductFieldType.java
df61e214d472ae2d461bdd7721dd8090959eeaff
[ "Apache-2.0" ]
permissive
baidu/baiduads-sdk
24c36b5cf3da9362ec5c8ecd417ff280421198ff
176363de5e8a4e98aaca039e4300703c3964c1c7
refs/heads/main
2023-06-08T15:40:24.787863
2023-05-20T03:40:51
2023-05-20T03:40:51
446,718,177
16
11
Apache-2.0
2023-06-02T05:19:40
2022-01-11T07:23:17
Python
UTF-8
Java
false
false
5,539
java
/* * dev2 api schema * 'dev2.baidu.com' api schema * * * 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.baidu.dev2.api.sdk.dpaapiproductset.model; import java.util.Objects; import java.util.Arrays; import com.baidu.dev2.api.sdk.dpaapiproductset.model.Condition; 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 com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonTypeName; /** * ProductFieldType */ @JsonPropertyOrder({ ProductFieldType.JSON_PROPERTY_VALUE, ProductFieldType.JSON_PROPERTY_LABEL, ProductFieldType.JSON_PROPERTY_FIELD_TYPE, ProductFieldType.JSON_PROPERTY_CONDITIONS }) @JsonTypeName("ProductFieldType") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ProductFieldType { public static final String JSON_PROPERTY_VALUE = "value"; private String value; public static final String JSON_PROPERTY_LABEL = "label"; private String label; public static final String JSON_PROPERTY_FIELD_TYPE = "fieldType"; private String fieldType; public static final String JSON_PROPERTY_CONDITIONS = "conditions"; private List<Condition> conditions = null; public ProductFieldType() { } public ProductFieldType value(String value) { this.value = value; return this; } /** * Get value * @return value **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getValue() { return value; } @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setValue(String value) { this.value = value; } public ProductFieldType label(String label) { this.label = label; return this; } /** * Get label * @return label **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_LABEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getLabel() { return label; } @JsonProperty(JSON_PROPERTY_LABEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setLabel(String label) { this.label = label; } public ProductFieldType fieldType(String fieldType) { this.fieldType = fieldType; return this; } /** * Get fieldType * @return fieldType **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_FIELD_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getFieldType() { return fieldType; } @JsonProperty(JSON_PROPERTY_FIELD_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setFieldType(String fieldType) { this.fieldType = fieldType; } public ProductFieldType conditions(List<Condition> conditions) { this.conditions = conditions; return this; } public ProductFieldType addConditionsItem(Condition conditionsItem) { if (this.conditions == null) { this.conditions = new ArrayList<>(); } this.conditions.add(conditionsItem); return this; } /** * Get conditions * @return conditions **/ @javax.annotation.Nullable @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_CONDITIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public List<Condition> getConditions() { return conditions; } @JsonProperty(JSON_PROPERTY_CONDITIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setConditions(List<Condition> conditions) { this.conditions = conditions; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ProductFieldType productFieldType = (ProductFieldType) o; return Objects.equals(this.value, productFieldType.value) && Objects.equals(this.label, productFieldType.label) && Objects.equals(this.fieldType, productFieldType.fieldType) && Objects.equals(this.conditions, productFieldType.conditions); } @Override public int hashCode() { return Objects.hash(value, label, fieldType, conditions); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ProductFieldType {\n"); sb.append(" value: ").append(toIndentedString(value)).append("\n"); sb.append(" label: ").append(toIndentedString(label)).append("\n"); sb.append(" fieldType: ").append(toIndentedString(fieldType)).append("\n"); sb.append(" conditions: ").append(toIndentedString(conditions)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "jiangyuan04@baidu.com" ]
jiangyuan04@baidu.com
6807a7bb06d47847e85dc084302d853739ccd47b
30057e353957920564ee07722427c3ff434d322f
/ProblemSolving/src/com/basics/array/StockBuyAndSell.java
c89672100b375008990576756129788cb672e18f
[]
no_license
mmanjunath998/Problem-Solving
a7f4e541b150ad3d28e545b7c990d47b020c79a9
32f21921f05ff351a6cdc52fe72e954633d9036a
refs/heads/master
2020-09-09T15:06:46.232130
2019-12-04T08:04:58
2019-12-04T08:04:58
221,479,218
0
0
null
null
null
null
UTF-8
Java
false
false
1,147
java
package com.basics.array; public class StockBuyAndSell { public static void main(String[] args){ int[] arr = {100, 180, 260, 310, 40, 535, 695,10,20,30,40}; int[] arr1 = {100,90,60,40,30}; System.out.println(find(arr)); find1(arr); find1(arr1); } public static int find(int[] arr){ int lowIndex = -1; int highIndex = -1; int diff = 0; for(int i=0, j=1; j<arr.length;){ if(arr[i] < arr[j]){ int temp = arr[j]-arr[i]; if(temp > diff){ lowIndex = i; highIndex = j; diff = temp; } j++; }else{ i = j; j++; } } System.out.println(arr[lowIndex]+": "+arr[highIndex]); return diff; } public static void find1(int[] arr){ int i = 0, j = 1; int diff = 0; for(; j<arr.length;){ if(arr[j] < arr[i]){ if(i != j-1){ diff = arr[j-1]-arr[i]; System.out.print("buying at "+arr[i]); System.out.print(" selling at "+arr[j-1]); System.out.println(" ==>profit "+diff); } i=j; j++; }else{ j++; } } if(i != arr.length-1){ System.out.print("buying at "+arr[i]); System.out.print(" selling at "+arr[j-1]); } } }
[ "manjunath@bytemark.co" ]
manjunath@bytemark.co
6c5689cfc746f96aee15316ff917d6ebe7c66812
a13ab684732add3bf5c8b1040b558d1340e065af
/java6-src/javax/rmi/CORBA/Stub.java
018909f45a2f2a757fcb7589d445f47be00b8330
[]
no_license
Alivop/java-source-code
554e199a79876343a9922e13ccccae234e9ac722
f91d660c0d1a1b486d003bb446dc7c792aafd830
refs/heads/master
2020-03-30T07:21:13.937364
2018-10-25T01:49:39
2018-10-25T01:51:38
150,934,150
5
2
null
null
null
null
UTF-8
Java
false
false
7,433
java
/* * %W% %E% * * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ /* * Licensed Materials - Property of IBM * RMI-IIOP v1.0 * Copyright IBM Corp. 1998 1999 All Rights Reserved * * US Government Users Restricted Rights - Use, duplication or * disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */ package javax.rmi.CORBA; import org.omg.CORBA.ORB; import org.omg.CORBA.INITIALIZE; import org.omg.CORBA_2_3.portable.ObjectImpl; import java.io.IOException; import java.rmi.RemoteException; import java.io.File; import java.io.FileInputStream; import java.net.MalformedURLException ; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.Properties; import java.rmi.server.RMIClassLoader; import com.sun.corba.se.impl.orbutil.GetPropertyAction; /** * Base class from which all RMI-IIOP stubs must inherit. */ public abstract class Stub extends ObjectImpl implements java.io.Serializable { private static final long serialVersionUID = 1087775603798577179L; // This can only be set at object construction time (no sync necessary). private transient StubDelegate stubDelegate = null; private static Class stubDelegateClass = null; private static final String StubClassKey = "javax.rmi.CORBA.StubClass"; private static final String defaultStubImplName = "com.sun.corba.se.impl.javax.rmi.CORBA.StubDelegateImpl"; static { Object stubDelegateInstance = (Object) createDelegateIfSpecified(StubClassKey, defaultStubImplName); if (stubDelegateInstance != null) stubDelegateClass = stubDelegateInstance.getClass(); } /** * Returns a hash code value for the object which is the same for all stubs * that represent the same remote object. * @return the hash code value. */ public int hashCode() { if (stubDelegate == null) { setDefaultDelegate(); } if (stubDelegate != null) { return stubDelegate.hashCode(this); } return 0; } /** * Compares two stubs for equality. Returns <code>true</code> when used to compare stubs * that represent the same remote object, and <code>false</code> otherwise. * @param obj the reference object with which to compare. * @return <code>true</code> if this object is the same as the <code>obj</code> * argument; <code>false</code> otherwise. */ public boolean equals(java.lang.Object obj) { if (stubDelegate == null) { setDefaultDelegate(); } if (stubDelegate != null) { return stubDelegate.equals(this, obj); } return false; } /** * Returns a string representation of this stub. Returns the same string * for all stubs that represent the same remote object. * @return a string representation of this stub. */ public String toString() { if (stubDelegate == null) { setDefaultDelegate(); } String ior; if (stubDelegate != null) { ior = stubDelegate.toString(this); if (ior == null) { return super.toString(); } else { return ior; } } return super.toString(); } /** * Connects this stub to an ORB. Required after the stub is deserialized * but not after it is demarshalled by an ORB stream. If an unconnected * stub is passed to an ORB stream for marshalling, it is implicitly * connected to that ORB. Application code should not call this method * directly, but should call the portable wrapper method * {@link javax.rmi.PortableRemoteObject#connect}. * @param orb the ORB to connect to. * @exception RemoteException if the stub is already connected to a different * ORB, or if the stub does not represent an exported remote or local object. */ public void connect(ORB orb) throws RemoteException { if (stubDelegate == null) { setDefaultDelegate(); } if (stubDelegate != null) { stubDelegate.connect(this, orb); } } /** * Serialization method to restore the IOR state. */ private void readObject(java.io.ObjectInputStream stream) throws IOException, ClassNotFoundException { if (stubDelegate == null) { setDefaultDelegate(); } if (stubDelegate != null) { stubDelegate.readObject(this, stream); } } /** * Serialization method to save the IOR state. * @serialData The length of the IOR type ID (int), followed by the IOR type ID * (byte array encoded using ISO8859-1), followed by the number of IOR profiles * (int), followed by the IOR profiles. Each IOR profile is written as a * profile tag (int), followed by the length of the profile data (int), followed * by the profile data (byte array). */ private void writeObject(java.io.ObjectOutputStream stream) throws IOException { if (stubDelegate == null) { setDefaultDelegate(); } if (stubDelegate != null) { stubDelegate.writeObject(this, stream); } } private void setDefaultDelegate() { if (stubDelegateClass != null) { try { stubDelegate = (javax.rmi.CORBA.StubDelegate) stubDelegateClass.newInstance(); } catch (Exception ex) { // what kind of exception to throw // delegate not set therefore it is null and will return default // values } } } // Same code as in PortableRemoteObject. Can not be shared because they // are in different packages and the visibility needs to be package for // security reasons. If you know a better solution how to share this code // then remove it from PortableRemoteObject. Also in Util.java private static Object createDelegateIfSpecified(String classKey, String defaultClassName) { String className = (String) AccessController.doPrivileged(new GetPropertyAction(classKey)); if (className == null) { Properties props = getORBPropertiesFile(); if (props != null) { className = props.getProperty(classKey); } } if (className == null) { className = defaultClassName; } try { return loadDelegateClass(className).newInstance(); } catch (ClassNotFoundException ex) { INITIALIZE exc = new INITIALIZE( "Cannot instantiate " + className); exc.initCause( ex ) ; throw exc ; } catch (Exception ex) { INITIALIZE exc = new INITIALIZE( "Error while instantiating" + className); exc.initCause( ex ) ; throw exc ; } } private static Class loadDelegateClass( String className ) throws ClassNotFoundException { try { ClassLoader loader = Thread.currentThread().getContextClassLoader(); return Class.forName(className, false, loader); } catch (ClassNotFoundException e) { // ignore, then try RMIClassLoader } try { return RMIClassLoader.loadClass(className); } catch (MalformedURLException e) { String msg = "Could not load " + className + ": " + e.toString(); ClassNotFoundException exc = new ClassNotFoundException( msg ) ; throw exc ; } } /** * Load the orb.properties file. */ private static Properties getORBPropertiesFile () { return (Properties) AccessController.doPrivileged(new GetORBPropertiesFileAction()); } }
[ "liulp@zjhjb.com" ]
liulp@zjhjb.com
822144ac9ae70c4d1643e29b72e3cc22296489d2
2dd7263c37dfc8cddfe0e270412944f3735faeaa
/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/aspect/UrlMatchEnum.java
4407fcea3f32697f051494eac3b872578cfdcd4f
[ "Apache-2.0", "MIT" ]
permissive
lbvs86823/jeecg-boot
aee7fff0c0a340573d805e10669fd80701c2c91b
0ee985da5a3c07d1d528048c91ff5d1b71cb4570
refs/heads/master
2022-05-01T16:12:25.310420
2022-03-10T03:33:08
2022-03-10T03:33:08
226,262,094
0
0
Apache-2.0
2019-12-06T06:32:36
2019-12-06T06:32:35
null
UTF-8
Java
false
false
2,124
java
package org.jeecg.common.aspect; /** * @Author scott * @Date 2020/1/14 13:36 * @Description: 请求URL与菜单路由URL转换规则(方便于采用菜单路由URL来配置数据权限规则) */ public enum UrlMatchEnum { CGFORM_DATA("/online/cgform/api/getData/", "/online/cgformList/"), CGFORM_EXCEL_DATA("/online/cgform/api/exportXls/", "/online/cgformList/"), CGFORM_TREE_DATA("/online/cgform/api/getTreeData/", "/online/cgformList/"), CGREPORT_DATA("/online/cgreport/api/getColumnsAndData/", "/online/cgreport/"), CGREPORT_EXCEL_DATA("/online/cgreport/api/exportXls/", "/online/cgreport/"), CGREPORT_EXCEL_DATA2("/online/cgreport/api/exportManySheetXls/", "/online/cgreport/"); UrlMatchEnum(String url, String match_url) { this.url = url; this.match_url = match_url; } /** * Request 请求 URL前缀 */ private String url; /** * 菜单路由 URL前缀 (对应菜单路径) */ private String match_url; /** * 根据req url 获取到菜单配置路径(前端页面路由URL) * * @param url * @return */ public static String getMatchResultByUrl(String url) { //获取到枚举 UrlMatchEnum[] values = UrlMatchEnum.values(); //加强for循环进行遍历操作 for (UrlMatchEnum lr : values) { //如果遍历获取的type和参数type一致 if (url.indexOf(lr.url) != -1) { //返回type对象的desc return url.replace(lr.url, lr.match_url); } } return null; } public String getMatch_url() { return match_url; } // public static void main(String[] args) { // /** // * 比如request真实请求URL: /online/cgform/api/getData/81fcf7d8922d45069b0d5ba983612d3a // * 转换匹配路由URL后(对应配置的菜单路径):/online/cgformList/81fcf7d8922d45069b0d5ba983612d3a // */ // System.out.println(UrlMatchEnum.getMatchResultByUrl("/online/cgform/api/getData/81fcf7d8922d45069b0d5ba983612d3a")); // } }
[ "zhangdaiscott@163.com" ]
zhangdaiscott@163.com
5da2e526aead0380bb05102a0c014f069e9d1586
96c48b375d20ba117b5952eb5ec6c2a24f57cd66
/src/main/java/io/renren/service/impl/InsuranceRecordCourseServiceImpl.java
ea23635aaa8100615e5a6ba36f3e1e6b3524fff0
[]
no_license
zzzzata/school-admin
1cddfa7df9029e2ea3d34396162005a5f943ba0d
baea150018b085f45135b08957aa8027bb5f24e2
refs/heads/master
2022-12-21T23:45:01.185403
2019-09-20T06:16:31
2019-09-20T06:16:31
209,701,174
0
0
null
2022-12-16T08:07:45
2019-09-20T03:54:18
Java
UTF-8
Java
false
false
8,507
java
package io.renren.service.impl; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; import org.springframework.beans.factory.annotation.Autowired; import io.renren.dao.InsuranceRecordCourseDao; import io.renren.entity.InsuranceInfoEntity; import io.renren.entity.InsuranceRecordCourseEntity; import io.renren.entity.InsuranceRecordEntity; import io.renren.entity.MallOrderEntity; import io.renren.entity.OrderMessageConsumerEntity; import io.renren.pojo.MallGoodsDetailsPOJO; import io.renren.service.InsuranceInfoService; import io.renren.service.InsuranceRecordCourseService; import io.renren.service.MallGoodsDetailsService; import io.renren.utils.R; import org.springframework.stereotype.Service; import org.springframework.web.bind.annotation.RequestBody; @Service("insuranceRecordCourseService") public class InsuranceRecordCourseServiceImpl implements InsuranceRecordCourseService { @Autowired private MallGoodsDetailsService mallGoodsDetailsService; @Autowired private InsuranceRecordCourseDao insuranceRecordCourseDao; @Override public void saveInsuranceRecordCourse(InsuranceRecordCourseEntity e) { Date ts= new Date(); if (e.getSubjectHour()==null) { e.setSubjectHour(0.0); } if (e.getTs()==null) { e.setTs(ts); } if (e.getCreationTime()==null) { e.setCreationTime(ts); } insuranceRecordCourseDao.save(e); } @Override public void updateInsuranceRecordCourse(InsuranceRecordCourseEntity e) { Date ts= new Date(); if (e.getSubjectHour()==null) { e.setSubjectHour(0.0); } if (e.getTs()==null) { e.setTs(ts); } if (e.getCreationTime()==null) { e.setCreationTime(ts); } insuranceRecordCourseDao.update(e); } @Override public List<InsuranceRecordCourseEntity> queryList(Map<String, Object> queryMap) { return insuranceRecordCourseDao.queryList(queryMap); } @Override public void updateDrByinsuranceRecordId(Long insuranceRecordId) { insuranceRecordCourseDao.updateDrByinsuranceRecordId(insuranceRecordId); } @Override public List<InsuranceRecordCourseEntity> queryGooodsCourse(Long areaId, Long goodsId,Long insuranceInfoId) { return insuranceRecordCourseDao.queryGooodsCourse(areaId, goodsId, insuranceInfoId); } @Override public List<Map<String, Object>> countGooodsCourseByArea(Long areaId, Long goodsId,Long insuranceInfoId) { return insuranceRecordCourseDao.countGooodsCourseByArea(areaId, goodsId, insuranceInfoId); } @Override public InsuranceRecordCourseEntity queryObject(Long id) { return insuranceRecordCourseDao.queryObject(id); } @Override public List<InsuranceRecordCourseEntity> InsuranceRecordCourseUpdateCheck(List<InsuranceRecordCourseEntity> detail, List<InsuranceRecordCourseEntity> courseDetail) { //1.如果没有旧课程的 直接返回新课程 if (detail==null||detail.size()==0) { return courseDetail; } //2.遍历新课程 组成map Map<String,InsuranceRecordCourseEntity> courseDetailMap= new HashMap<String,InsuranceRecordCourseEntity>(); if (courseDetail!=null&&courseDetail.size()>0) { for (InsuranceRecordCourseEntity d:courseDetail) { courseDetailMap.put(d.getSubjectCode(), d); } } //3.遍历旧课程 不能在新中找到的 设置为dr=1 for (int i=0;i<detail.size();i++) { if (courseDetailMap.size()==0||courseDetailMap.get(detail.get(i).getSubjectCode())==null) { detail.get(i).setDr(1); }else { detail.get(i).setDr(0); InsuranceRecordCourseEntity temp = courseDetailMap.get(detail.get(i).getSubjectCode()); detail.get(i).updateEntity(temp); temp.setDr(0); temp.setInsuranceRecordId(detail.get(i).getInsuranceRecordId()); courseDetailMap.put(temp.getSubjectCode(), temp); } } for (Entry<String, InsuranceRecordCourseEntity> m:courseDetailMap.entrySet()) { if (m.getValue()!=null&&m.getValue().getInsuranceRecordId()==null) { detail.add(m.getValue()); } } return detail; } @Override public R insuranceActionUpdate( List<MallGoodsDetailsPOJO> mallGoodsDetailsList,int type) { boolean iscancel=false; if (type==0) { iscancel=true; } List<Long> cancelIds=new ArrayList<Long> ();//用于存取消的id int maxCouseCount=18; StringBuilder maxCountStr= new StringBuilder(); StringBuilder maxCountNowStr= new StringBuilder(); StringBuilder nullCountNowStr= new StringBuilder(); StringBuilder errorMessage= new StringBuilder(); Map<Long,List<Long>> areaCount = new HashMap<Long,List<Long>>(); Long mallGoodsId=0L; for (MallGoodsDetailsPOJO m :mallGoodsDetailsList) { if (mallGoodsId.intValue()==0&&m.getMallGoodsId()>0) { mallGoodsId=m.getMallGoodsId(); } if (iscancel) { cancelIds.add(m.getId()); }else { List<Long> ids= areaCount.get(m.getMallAreaId())==null? new ArrayList<Long>(): areaCount.get(m.getMallAreaId()); ids.add(m.getId()); areaCount.put(m.getMallAreaId(), ids); } } if (iscancel) {//如果是取消的则执行取消操作 if (cancelIds!=null&&cancelIds.size()>0) { mallGoodsDetailsService.insuranceAction(0, cancelIds); List<Map<String, Object>> detailList = countGooodsCourseByArea(null, mallGoodsId, null); if (detailList==null||detailList.size()==0) { return R.error(500,"错误!没有取到商品中的课程信息!无法进行取消投保!"); } for (Map<String, Object> dmap : detailList) { if (dmap.get("areaId") != null && dmap.get("rs") != null ) { int resultSize = dmap.get("rs") == null ? 0 : Integer.parseInt(dmap.get("rs").toString()); if (resultSize == 0) { nullCountNowStr.append(dmap.get("areaName")).append("、"); } } } if (nullCountNowStr.length()>0) { return R.error(500,"严重提醒 :【"+nullCountNowStr.toString().substring(0,nullCountNowStr.toString().length()-1)+"】等省份还没有设置投保,请务必为这些省份勾选择投保课程" ); } } return R.ok(); //取消的跳出 } List<Map<String, Object>> detailList = countGooodsCourseByArea(null, mallGoodsId, null); if (detailList==null||detailList.size()==0) { return R.error(500,"错误!没有取到商品中的课程信息!无法进行投保!"); } for (Map<String, Object> dmap : detailList) { // 先判断本次勾选择的 if (dmap.get("areaId") != null && areaCount.get(dmap.get("areaId")) != null) { //resultSize:从库中取得的勾选的数量 int resultSize = dmap.get("rs") == null ? 0 : Integer.parseInt(dmap.get("rs").toString()); //ids:本次勾选择的数量 List<Long> ids = areaCount.get(dmap.get("areaId")); if (ids != null && ids.size() > 0) { int courseSize = ids.size(); if (resultSize >= maxCouseCount) {// 1.如果库里已经超过18次了这次还勾超过0次时 maxCountStr.append(dmap.get("areaName")).append("、"); } else if (courseSize + resultSize > maxCouseCount) {// 如果库里的勾选和本次勾选之和大于18次时 maxCountNowStr.append(dmap.get("areaName")).append("、"); } else { mallGoodsDetailsService.insuranceAction(1, ids); } } } else { // 本次没有勾选的,判断次数是否有至少一次 int resultSize = dmap.get("rs") == null ? 0 : Integer.parseInt(dmap.get("rs").toString()); if (resultSize == 0) { nullCountNowStr.append(dmap.get("areaName")).append("、"); } } } if (maxCountStr.length()>0||maxCountNowStr.length()>0||nullCountNowStr.length()>0) { errorMessage.append( maxCountStr.length()>0?"【"+maxCountStr.toString().substring(0,maxCountStr.toString().length()-1)+"】等省份之前已经勾满"+maxCouseCount+"次了,本次不允许再勾选择。":""); errorMessage.append( maxCountNowStr.length()>0?"【"+maxCountNowStr.toString().substring(0,maxCountNowStr.toString().length()-1)+"】等省份勾选超过"+maxCouseCount+"次了,请重新勾选择。":""); errorMessage.append( nullCountNowStr.length()>0?"严重提醒 :【"+nullCountNowStr.toString().substring(0,nullCountNowStr.toString().length()-1)+"】等省份还没有设置投保,请务必为这些省份勾选择投保课程":""); return R.error(500,errorMessage.toString()); } return R.ok(); } }
[ "ouchujian@hqjy.com" ]
ouchujian@hqjy.com
3dc112f9a303152134bfcbc0ff6255bfd7de799f
39a790d365b776d60040dc70509c642b2cd1f793
/a-sysmon-core/src/main/java/com/ajjpj/asysmon/servlet/trace/ATracePageDefinition.java
15bc0bf362b385478286064ede5c97536f034f62
[ "Apache-2.0" ]
permissive
KroneckerDelta/a-sysmon
a204f1973493b262fb42ac69364044386e07aa3a
e074e70d44babf1be7fd6c0103702ee265458968
refs/heads/master
2020-12-25T22:30:03.995774
2014-01-17T15:53:59
2014-01-17T15:53:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,282
java
package com.ajjpj.asysmon.servlet.trace; import com.ajjpj.asysmon.ASysMonApi; import com.ajjpj.asysmon.impl.ASysMonConfigurer; import com.ajjpj.asysmon.data.AHierarchicalData; import com.ajjpj.asysmon.data.AHierarchicalDataRoot; import com.ajjpj.asysmon.measure.scalar.AJmxGcMeasurerer; import com.ajjpj.asysmon.servlet.performance.AAbstractAsysmonPerformancePageDef; import java.text.DecimalFormat; import java.text.NumberFormat; import java.util.*; /** * @author arno */ public class ATracePageDefinition extends AAbstractAsysmonPerformancePageDef { private final ATraceFilter filter; private final ATraceCollectingDataSink collector; private static final List<ColDef> colDefs = Arrays.asList( new ColDef("%", true, 1, ColWidth.Medium), new ColDef("total µs", false, 0, ColWidth.Long), new ColDef("self µs", false, 0, ColWidth.Long), new ColDef("start @", false, 0, ColWidth.Long) ); public ATracePageDefinition(ATraceFilter traceFilter, int bufferSize) { this.filter = traceFilter; this.collector = new ATraceCollectingDataSink(traceFilter, bufferSize); } @Override public void init(ASysMonApi sysMon) { super.init(sysMon); ASysMonConfigurer.addDataSink(sysMon, collector); } @Override public String getId() { return filter.getId(); } @Override public String getShortLabel() { return filter.getShortLabel(); } @Override public String getFullLabel() { return filter.getFullLabel(); } @Override protected void doStartMeasurements() { collector.isStarted = true; } @Override protected void doStopMeasurements() { collector.isStarted = false; } @Override protected void doClearMeasurements() { collector.clear(); } @Override protected boolean isStarted() { return collector.isStarted; } @Override protected List<ColDef> getColDefs() { return colDefs; } @Override protected List<TreeNode> getData() { final List<TreeNode> result = new ArrayList<TreeNode>(); for(AHierarchicalDataRoot root: collector.getData()) { result.add(asTreeNode(root.getRootNode(), root.getUuid().toString(), System.currentTimeMillis(), root.getRootNode().getDurationNanos(), 0)); } Collections.sort(result, new Comparator<TreeNode>() { @Override public int compare(TreeNode o1, TreeNode o2) { return (int) (o2.colDataRaw[3] - o1.colDataRaw[3]); } }); return result; } private TreeNode asTreeNode(AHierarchicalData node, String id, long now, long parentNanos, int level) { final List<TreeNode> children = new ArrayList<TreeNode>(); long selfNanos = node.getDurationNanos(); final long childNow = level > 0 ? now : node.getStartTimeMillis(); int i=0; for(AHierarchicalData child: node.getChildren()) { if(child.isSerial()) { selfNanos -= child.getDurationNanos(); } children.add(asTreeNode(child, String.valueOf(i), childNow, node.getDurationNanos(), level+1)); i++; } if(selfNanos < 0) selfNanos = 0; if(selfNanos > node.getDurationNanos()) selfNanos = node.getDurationNanos(); if(selfNanos != 0 && children.size() > 0) { children.add(0, new TreeNode("<self>", true, new long[] {selfNanos * 1000 / node.getDurationNanos(), selfNanos / 1000, selfNanos / 1000, node.getStartTimeMillis() - childNow}, Collections.<TreeNode>emptyList())); } final long[] colDataRaw = new long[] { node.getDurationNanos() * 100 * 10 / parentNanos, // 100 for '%', 10 for 1 frac digit node.getDurationNanos() / 1000, selfNanos / 1000, node.getStartTimeMillis() - now }; return new TreeNode(id, node.getIdentifier(), tooltipFor(node), node.isSerial(), colDataRaw, children); } private List<List<String>> tooltipFor(AHierarchicalData node) { if(node.getParameters().isEmpty()) { return null; } if(isGarbageCollectionNode(node)) { return gcTooltipFor(node); } final List<List<String>> result = new ArrayList<List<String>>(); for(String key: new TreeSet<String>(node.getParameters().keySet())) { result.add(Arrays.asList(key, node.getParameters().get(key))); } return result; } private List<List<String>> gcTooltipFor(AHierarchicalData node) { final List<List<String>> result = new ArrayList<List<String>>(); final SortedSet<String> memKinds = new TreeSet<String>(); for(String key: new TreeSet<String>(node.getParameters().keySet())) { if(key.startsWith(AJmxGcMeasurerer.KEY_PREFIX_MEM)) { memKinds.add(key.split(":")[1]); continue; } result.add(Arrays.asList(key, node.getParameters().get(key))); } final NumberFormat nf = new DecimalFormat("0.0"); final NumberFormat nfPos = new DecimalFormat("+0.0;-0.0"); for(String memKind: memKinds) { final String usedAfter = nf. format(Long.valueOf(node.getParameters().get(AJmxGcMeasurerer.getUsedAfterKey(memKind))) / 1024.0 / 1024.0); final String committedAfter = nf. format(Long.valueOf(node.getParameters().get(AJmxGcMeasurerer.getCommittedAfterKey(memKind))) / 1024.0 / 1024.0); final String usedDelta = nfPos.format(Long.valueOf(node.getParameters().get(AJmxGcMeasurerer.getUsedDeltaKey(memKind))) / 1024.0 / 1024.0); final String committedDelta = nfPos.format(Long.valueOf(node.getParameters().get(AJmxGcMeasurerer.getCommittedDeltaKey(memKind))) / 1024.0 / 1024.0); final String memValue = usedAfter + "MB (" + usedDelta + ") / " + committedAfter + "MB (" + committedDelta + ")"; result.add(Arrays.asList(memKind, memValue)); } return result; } private boolean isGarbageCollectionNode(AHierarchicalData node) { return node.getParameters().containsKey(AJmxGcMeasurerer.KEY_ID); } }
[ "arno.haase@haase-consulting.com" ]
arno.haase@haase-consulting.com
7d2f0756c48be30ad60b0cb2ca849a99631df1a8
e5afc547f77cb9c2f1eed59f43f250f5804bd200
/Commoner/app/src/main/java/com/chenpan/commoner/receiver/DownloadReceiver.java
9b46433051311a0a80844d297760d07691e005e3
[ "Apache-2.0" ]
permissive
a616707902/Commoner
3f5ad445e8a39aec45ef440185aff1fee5b9b4bf
61f3919bcabf05a4632ad99cb26a1f13591c86be
refs/heads/master
2020-05-25T15:43:43.742473
2016-10-18T09:32:21
2016-10-18T09:32:21
60,163,597
0
0
null
null
null
null
UTF-8
Java
false
false
1,497
java
package com.chenpan.commoner.receiver; import android.app.DownloadManager; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.net.Uri; import android.text.TextUtils; import com.chenpan.commoner.R; import com.chenpan.commoner.base.MyApplication; import com.chenpan.commoner.utils.ToastFactory; import java.io.File; /** * 下载完成广播接收器 * Created by hzwangchenyan on 2015/12/30. */ public class DownloadReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { long id = intent.getLongExtra(DownloadManager.EXTRA_DOWNLOAD_ID, -1); if (id == 0) { DownloadManager dManager = (DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE); Uri uri = dManager.getUriForDownloadedFile(id); File file = new File(uri.getPath()); if (file.exists()) { Intent install = new Intent(Intent.ACTION_VIEW); install.setDataAndType(uri, "application/vnd.android.package-archive"); install.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(install); } } else { String title = MyApplication.getInstance().getDownloadList().get(id); if (!TextUtils.isEmpty(title)) { ToastFactory.show(context.getString(R.string.download_success, title)); } } } }
[ "616707902@qq.com" ]
616707902@qq.com
0f05cb3a1d1c5fbd7c60df10f2f45ce6b66c5ad7
66e2f35b7b56865552616cf400e3a8f5928d12a2
/src/main/java/com/alipay/api/domain/EbppOrderItem.java
1b85634bc2914506d29dbe73ec1e24953d6ae67e
[ "Apache-2.0" ]
permissive
xiafaqi/alipay-sdk-java-all
18dc797400847c7ae9901566e910527f5495e497
606cdb8014faa3e9125de7f50cbb81b2db6ee6cc
refs/heads/master
2022-11-25T08:43:11.997961
2020-07-23T02:58:22
2020-07-23T02:58:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,313
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 预创单单个项目 * * @author auto create * @since 1.0, 2018-12-20 19:37:39 */ public class EbppOrderItem extends AlipayObject { private static final long serialVersionUID = 2595679334591599811L; /** * 支付宝对该子项所代表的这笔业务的唯一标识。 */ @ApiField("alipay_item_id") private String alipayItemId; /** * 业务金额 */ @ApiField("biz_amount") private String bizAmount; /** * 业务产品id,由支付宝分配。 */ @ApiField("biz_prod_id") private String bizProdId; /** * 用于传递扩展参数 */ @ApiField("extend_field") private String extendField; /** * 机构端对该子项所代表的这笔业务的唯一标识。 */ @ApiField("inst_item_id") private String instItemId; /** * 支付宝流水号 */ @ApiField("linked_bill_no") private String linkedBillNo; /** * 业务状态 I - 初始状态,未支付 C - 已关单,不能继续支付 P - 已支付 S - 业务成功 F - 业务失败,退款给用户 */ @ApiField("status") private String status; public String getAlipayItemId() { return this.alipayItemId; } public void setAlipayItemId(String alipayItemId) { this.alipayItemId = alipayItemId; } public String getBizAmount() { return this.bizAmount; } public void setBizAmount(String bizAmount) { this.bizAmount = bizAmount; } public String getBizProdId() { return this.bizProdId; } public void setBizProdId(String bizProdId) { this.bizProdId = bizProdId; } public String getExtendField() { return this.extendField; } public void setExtendField(String extendField) { this.extendField = extendField; } public String getInstItemId() { return this.instItemId; } public void setInstItemId(String instItemId) { this.instItemId = instItemId; } public String getLinkedBillNo() { return this.linkedBillNo; } public void setLinkedBillNo(String linkedBillNo) { this.linkedBillNo = linkedBillNo; } public String getStatus() { return this.status; } public void setStatus(String status) { this.status = status; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
8490e2f8420c319aaeb8aad94263b2a2cc4050f8
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.minihd.qq/assets/exlibs.2.jar/classes.jar/okio/ForwardingSource.java
db0153320e5c3bbc5b99ff8aeb9103f47c6724ff
[]
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,057
java
package okio; import java.io.IOException; public abstract class ForwardingSource implements Source { private final Source delegate; public ForwardingSource(Source paramSource) { if (paramSource == null) { throw new IllegalArgumentException("delegate == null"); } this.delegate = paramSource; } public void close() throws IOException { this.delegate.close(); } public final Source delegate() { return this.delegate; } public long read(Buffer paramBuffer, long paramLong) throws IOException { return this.delegate.read(paramBuffer, paramLong); } public Timeout timeout() { return this.delegate.timeout(); } public String toString() { return getClass().getSimpleName() + "(" + this.delegate.toString() + ")"; } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.minihd.qq\assets\exlibs.2.jar\classes.jar * Qualified Name: okio.ForwardingSource * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
280184b620823a1760f4a1ab213e7415531bd089
3bb11081b5cfc8c6eac479687cee844307eb9913
/src/main/java/problems/linkedlist/ReverseLinkedList.java
02f882a364c459de7b2ae39ff444e6c19a71c644
[]
no_license
kiryl-zaytes/datastructures
c3ed0383b305a3735bf599e667ac5c177ef3e252
d4c8633e769af93f61de243bfc3a7678b90d5aa1
refs/heads/master
2020-03-26T11:56:28.505734
2019-07-02T16:57:22
2019-07-02T16:57:22
144,867,050
0
0
null
null
null
null
UTF-8
Java
false
false
1,690
java
package problems.linkedlist; import java.util.Stack; /** * Created by kiryl_zayets on 9/12/18. */ public class ReverseLinkedList { public static class ListNode<T> { T val; ListNode next; ListNode(T x) { val = x; } } public static ListNode reverseList(ListNode head) { if (head == null || head.next == null) return head; Stack<ListNode> stack = new Stack(); stack.push(head); while (head.next != null) { stack.push(head.next); head = head.next; } ListNode start = stack.pop(); head = start; while (!stack.empty()) { start.next = stack.pop(); start = start.next; } start.next = null; return head; } public static ListNode reverseRec(ListNode node){ if (node == null) return null; if (node.next == null) return node; ListNode n2 = node.next; ListNode n1 = reverseRec(n2); n2.next = node; node.next = null; return n1; } public static ListNode reverse(ListNode root){ if (root.next == null) return root; ListNode n = root.next; ListNode head = reverse(n); n.next = root; root.next = null; return head; } public static void main(String[] args) { ListNode N = new ListNode<Integer>(1); N.next = new ListNode<Integer>(2); N.next.next = new ListNode<Integer>(3); N.next.next.next = new ListNode<Integer>(4); N.next.next.next.next = new ListNode<Integer>(5); ListNode n = ReverseLinkedList.reverse(N); System.out.print(""); } }
[ "kiril.zayets@gmail.com" ]
kiril.zayets@gmail.com
42cfd3883202e12c5d0c830fa15143baeaaa12fc
f0352a890049b16e2835e9f4d6ef991910f1dc2a
/protostuff-json/src/test/java/com/dyuproject/protostuff/SmileStringMapSchemaTest.java
38e678fa68451947056da9c613b9e4594c726598
[ "BSD-3-Clause", "Apache-2.0" ]
permissive
dyu/protostuff-1.0.x
967b24521b038a71dfb8ff19114861ce4a5a6101
d7c964ec20da3fe44699d86ee95c2677ddffde96
refs/heads/master
2023-03-17T14:42:43.783630
2016-10-29T11:57:26
2016-10-29T11:57:26
59,306,509
1
0
null
null
null
null
UTF-8
Java
false
false
1,510
java
//======================================================================== //Copyright 2007-2011 David Yu dyuproject@gmail.com //------------------------------------------------------------------------ //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.dyuproject.protostuff; import java.io.IOException; import java.util.Map; /** * Json IO tests for the {@link StringMapSchema}. * * @author David Yu * @created Feb 11, 2011 */ public class SmileStringMapSchemaTest extends StringMapSchemaTest { public <T extends Map<String,String>> void mergeFrom(byte[] data, int offset, int length, T message, Schema<T> schema) throws IOException { SmileIOUtil.mergeFrom(data, offset, length, message, schema, false); } public <T extends Map<String,String>> byte[] toByteArray(T message, Schema<T> schema) throws IOException { return SmileIOUtil.toByteArray(message, schema, false); } }
[ "david.yu.ftw@gmail.com" ]
david.yu.ftw@gmail.com
605b6faed63f30ccc425309a2d5f531ed4c56d8f
55645fa0f88a4b351d977d4962034fa347186e4f
/core/sorcer-dl/src/main/java/sorcer/core/provider/logger/LoggingConfig.java
a67ca4c48d4d9488409c146903fbc95b2ef8c261
[ "Apache-2.0" ]
permissive
mwsobol/SORCER-multiFi
33dc7f7a313e1c7d7120a8c8daa1c85c821ab487
6fc08b170c9f3a203fcc5461cdb1774993204c3b
refs/heads/master
2023-07-09T11:16:20.779700
2023-06-30T04:38:39
2023-06-30T04:38:39
203,447,813
4
43
Apache-2.0
2022-01-29T18:13:11
2019-08-20T20:14:59
Java
UTF-8
Java
false
false
1,880
java
/* * Copyright 2009 the original author or authors. * Copyright 2009 SorcerSoft.org. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package sorcer.core.provider.logger; import java.io.Serializable; /** * Stores the name of a logger and the Level of that logger. This class is used * by the {@link LogManager} and associated classes to store and configure how * it works. */ public class LoggingConfig implements Serializable { private String logger; private Level lev; /** * Compare logger names */ public boolean equals(Object obj) { if (obj instanceof LoggingConfig == false) return false; return ((LoggingConfig) obj).logger.equals(logger); } /** * computes hashCode() using the logger name */ public int hashCode() { return logger.hashCode(); } /** * Create a description of this instance */ public String toString() { return logger + "@" + lev; } /** * Construct an instance using the supplied info */ public LoggingConfig(String logger, Level lev) { this.logger = logger; this.lev = lev; } /** * Get the name of the logger */ public String getLogger() { return logger; } /** * Get the associated level for this logger */ public Level getLevel() { return lev; } /** * Set the new associated level for this logger */ public void setLevel(Level lev) { this.lev = lev; } }
[ "dennis.reedy@gmail.com" ]
dennis.reedy@gmail.com
76f8f6774e8917c571df5dcb4be95f19fc79cab2
930bcfcbe7abf30ab3630fa738c647f809af1d9b
/cypress-common/src/main/java/org/interesting/cypress/common/annotation/SysLog.java
c4d24eb7bf25de11c53006c0348e718a153a6cef
[ "Apache-2.0" ]
permissive
shawnyang2019/cypress
99b4045f8f17666542b08134ea792cb7fdcdb9ef
1dc233a0367de23e252aa4e13ce358c20812e873
refs/heads/master
2020-05-19T12:20:48.831575
2019-02-22T13:43:21
2019-02-22T13:43:21
185,011,256
0
0
null
null
null
null
UTF-8
Java
false
false
513
java
package org.interesting.cypress.common.annotation; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * 系统日志注解 * * @author chenshun * @email sunlightcs@gmail.com * @date 2017年3月8日 上午10:19:56 */ @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface SysLog { String value() default ""; }
[ "vivid_xiang@163.com" ]
vivid_xiang@163.com
adfae6df293276a2a4507cfe77ccf31859f8c3db
48f3f62c0dcd97820e28729385ec8e467bb6f39d
/src/rep/jpush/IJpushService.java
90d081ec27f249abd36871d1b460c2889da79dfe
[]
no_license
renjie120/rep
d78277628fb1c45ffbc20dde9a73edd6f6589ad1
d1c47353d60b0592229b7294c1283398e5934e0d
refs/heads/master
2021-01-23T18:11:41.311688
2014-06-17T10:46:00
2014-06-17T10:46:00
19,456,996
0
1
null
null
null
null
UTF-8
Java
false
false
1,865
java
package rep.jpush; import java.util.List; import java.util.Map; /** * 推送消息提供的接口. TODO(描述类的职责) * <p style="display:none"> * modifyRecord * </p> * <p style="display:none"> * version:V1.0,author:130126,date:2014-4-10 下午3:50:39,content:TODO * </p> * * @author 130126 * @date 2014-4-10 下午3:50:39 * @since * @version */ public interface IJpushService { /** * 对指定系统的全部用户进行通知. 实际是按照标签(syscode)发送自定义的客户通知。 * * @param sysCode * @param content * @param osType 操作系统名(android,iphone,没有的话就通知两个) * @return */ public String sendNotification(String sysCode, String content, Map<String, Object> extras,String osType); /** * 对指定用户和执行系统进行发送点对点消息. 实际是按照别名(syscode+":"+userid)发送自定义的客户通知。 * * @param sysCode * @param userId * @param content * @param osType 操作系统名(android,iphone,没有的话就通知两个) * @return */ public String sendMessage(String sysCode, String userId, String content, Map<String, Object> extras,String osType); /** * 保存用户标签和别名. * * @param userId * 用户id * @param sysCode * @param deviceType * @param token * @return */ public String saveTagAndAlias(String userId, String sysCode, String deviceType, String token); /** * 删除用户标签和别名. * * @param userId * @param sysCode * @param deviceType */ public void deleteTagAndAlias(String userId, String sysCode, String deviceType); /** * 查询推送配置映射信息. * * @param userId * @param sysCode * @param deviceType * @return */ public List<JpushVO> queryTagAndAlias(String userId, String sysCode, String deviceType); }
[ "lishuiqing110@163.com" ]
lishuiqing110@163.com
16f7957039b93e2e21455b018713e1e05a41c6f9
280fa7f441a7764cdbd523dbaa7dc9f31a3733f4
/OverridingRules.java
5336cfb1d8daa62edb8b3f81dcaa73a3a4afeb4a
[]
no_license
amitsrivastava4all/JavaBatchJune9to11
48b2af0f85989bb436bb00e781b0fa4c02ff5179
6de7f6f85004afdfb5f245de6bc2bcab5d90cc9a
refs/heads/master
2020-06-01T01:56:16.820160
2017-07-27T05:33:53
2017-07-27T05:33:53
94,058,523
0
0
null
null
null
null
UTF-8
Java
false
false
440
java
class X{ int a,b,c; } class XPlus extends X { int d,e; } class Parent1{ protected X show(){ System.out.println("Parent1 Show"); X obj = new X(); return obj; } } class Child1 extends Parent1 { @Override public XPlus show(){ System.out.println("Child1 Show..."); XPlus obj = new XPlus(); return obj; } } public class OverridingRules { public static void main(String[] args) { // TODO Auto-generated method stub } }
[ "amit4alljava@gmail.com" ]
amit4alljava@gmail.com
96a7b3a6b523a2993f0e0d2fde461ff53df2fdd0
c5a67e2aeabbde81c93a329ae2e9c7ccc3631246
/src/main/java/com/vnw/data/jooq/tables/TblrefCompanysizecode.java
267f39dab311e7633d7705f0273ae24fc39e2e94
[]
no_license
phuonghuynh/dtools
319d773d01c32093fd17d128948ef89c81f3f4bf
883d15ef19da259396a7bc16ac9df590e8add015
refs/heads/master
2016-09-14T03:46:53.463230
2016-05-25T04:04:32
2016-05-25T04:04:32
59,534,869
1
0
null
null
null
null
UTF-8
Java
false
false
3,548
java
/** * This class is generated by jOOQ */ package com.vnw.data.jooq.tables; import com.vnw.data.jooq.Keys; import com.vnw.data.jooq.VnwCore; import com.vnw.data.jooq.tables.records.TblrefCompanysizecodeRecord; import java.util.Arrays; import java.util.List; import javax.annotation.Generated; import org.jooq.Field; import org.jooq.Identity; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; import org.jooq.UniqueKey; import org.jooq.impl.TableImpl; /** * This class is generated by jOOQ. */ @Generated( value = { "http://www.jooq.org", "jOOQ version:3.8.0" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class TblrefCompanysizecode extends TableImpl<TblrefCompanysizecodeRecord> { private static final long serialVersionUID = -1942961188; /** * The reference instance of <code>vnw_core.tblref_companysizecode</code> */ public static final TblrefCompanysizecode TBLREF_COMPANYSIZECODE = new TblrefCompanysizecode(); /** * The class holding records for this type */ @Override public Class<TblrefCompanysizecodeRecord> getRecordType() { return TblrefCompanysizecodeRecord.class; } /** * The column <code>vnw_core.tblref_companysizecode.companysizeid</code>. */ public final TableField<TblrefCompanysizecodeRecord, Byte> COMPANYSIZEID = createField("companysizeid", org.jooq.impl.SQLDataType.TINYINT.nullable(false), this, ""); /** * The column <code>vnw_core.tblref_companysizecode.companysizecode</code>. */ public final TableField<TblrefCompanysizecodeRecord, String> COMPANYSIZECODE = createField("companysizecode", org.jooq.impl.SQLDataType.VARCHAR.length(100), this, ""); /** * Create a <code>vnw_core.tblref_companysizecode</code> table reference */ public TblrefCompanysizecode() { this("tblref_companysizecode", null); } /** * Create an aliased <code>vnw_core.tblref_companysizecode</code> table reference */ public TblrefCompanysizecode(String alias) { this(alias, TBLREF_COMPANYSIZECODE); } private TblrefCompanysizecode(String alias, Table<TblrefCompanysizecodeRecord> aliased) { this(alias, aliased, null); } private TblrefCompanysizecode(String alias, Table<TblrefCompanysizecodeRecord> aliased, Field<?>[] parameters) { super(alias, null, aliased, parameters, ""); } /** * {@inheritDoc} */ @Override public Schema getSchema() { return VnwCore.VNW_CORE; } /** * {@inheritDoc} */ @Override public Identity<TblrefCompanysizecodeRecord, Byte> getIdentity() { return Keys.IDENTITY_TBLREF_COMPANYSIZECODE; } /** * {@inheritDoc} */ @Override public UniqueKey<TblrefCompanysizecodeRecord> getPrimaryKey() { return Keys.KEY_TBLREF_COMPANYSIZECODE_PRIMARY; } /** * {@inheritDoc} */ @Override public List<UniqueKey<TblrefCompanysizecodeRecord>> getKeys() { return Arrays.<UniqueKey<TblrefCompanysizecodeRecord>>asList(Keys.KEY_TBLREF_COMPANYSIZECODE_PRIMARY); } /** * {@inheritDoc} */ @Override public TblrefCompanysizecode as(String alias) { return new TblrefCompanysizecode(alias, this); } /** * Rename this table */ public TblrefCompanysizecode rename(String name) { return new TblrefCompanysizecode(name, null); } }
[ "phuonghqh@gmail.com" ]
phuonghqh@gmail.com
7d40b2180b25015cffea8885b6a7f1e93c4fcf74
6640889c0bd2c66a93aa9dc08550e773fa7e007b
/src/main/java/org/orbeon/saxon/instruct/DummyNamespaceResolver.java
6d2e43d845b92b7471ef26aac226477a8cac84db
[]
no_license
orbeon/saxon
ed4405924287a6d4024ec749dcf798c3f7438c33
a4626186766667a599ff23da0943b49f05819484
refs/heads/master
2023-08-26T09:26:01.830128
2021-11-09T03:32:52
2021-11-09T03:32:52
256,231
3
5
null
2016-04-14T23:45:33
2009-07-20T23:35:31
Java
UTF-8
Java
false
false
2,706
java
package org.orbeon.saxon.instruct; import org.orbeon.saxon.om.NamespaceConstant; import org.orbeon.saxon.om.NamespaceResolver; import java.io.Serializable; import java.util.ArrayList; import java.util.Iterator; import java.util.List; /** * A dummy namespace resolver used when validating QName-valued attributes written to * the result tree. The namespace node might be created after the initial validation * of the attribute, so in the first round of validation we only check the lexical form * of the value, and we defer prefix checks until later. */ public final class DummyNamespaceResolver implements Serializable, NamespaceResolver { private static DummyNamespaceResolver theInstance = new DummyNamespaceResolver(); /** * Return the singular instance of this class * @return the singular instance */ public static DummyNamespaceResolver getInstance() { return theInstance; } private DummyNamespaceResolver() {}; /** * Get the namespace URI corresponding to a given prefix. * @param prefix the namespace prefix * @param useDefault true if the default namespace is to be used when the * prefix is "" * @return the uri for the namespace, or null if the prefix is not in scope */ public String getURIForPrefix(String prefix, boolean useDefault) { if ("".equals(prefix)) { return ""; } else if ("xml".equals(prefix)) { return NamespaceConstant.XML; } else { // this is a dummy namespace resolver, we don't actually know the URI return ""; } } /** * Get an iterator over all the prefixes declared in this namespace context. This will include * the default namespace (prefix="") and the XML namespace where appropriate */ public Iterator iteratePrefixes() { List list = new ArrayList(2); list.add(""); list.add("xml"); return list.iterator(); } } // // The contents of this file are subject to the Mozilla Public License Version 1.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.mozilla.org/MPL/ // // Software distributed under the License is distributed on an "AS IS" basis, // WITHOUT WARRANTY OF ANY KIND, either express or implied. // See the License for the specific language governing rights and limitations under the License. // // The Original Code is: all this file. // // The Initial Developer of the Original Code is Michael H. Kay // // Portions created by (your name) are Copyright (C) (your legal entity). All Rights Reserved. // // Contributor(s): none. //
[ "ebruchez@orbeon.com" ]
ebruchez@orbeon.com
c906926a590189e5738f3d7399e4928729439014
000e9ddd9b77e93ccb8f1e38c1822951bba84fa9
/java/classes3/com/ziroom/ziroomcustomer/signed/a/h.java
be7f01583b75f704b735f251b19a1b9c1266bb5e
[ "Apache-2.0" ]
permissive
Paladin1412/house
2bb7d591990c58bd7e8a9bf933481eb46901b3ed
b9e63db1a4975b614c422fed3b5b33ee57ea23fd
refs/heads/master
2021-09-17T03:37:48.576781
2018-06-27T12:39:38
2018-06-27T12:41:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,694
java
package com.ziroom.ziroomcustomer.signed.a; import java.math.BigDecimal; public class h { private String a; private String b; private String c; private String d; private BigDecimal e; private String f; private BigDecimal g; private String h; private String i; private String j; private Integer k; private String l; private Integer m; private String n; public String getCertNum() { return this.l; } public Integer getCertType() { return this.m; } public BigDecimal getCommission() { return this.e; } public String getCouponCode() { return this.f; } public BigDecimal getCouponValue() { return this.g; } public Integer getIsRenew() { return this.k; } public String getLoanMoney() { return this.b; } public String getLoanMoneyLender() { return this.a; } public String getLoanStatus() { return this.h; } public String getLoanStatusDetail() { return this.j; } public String getLoanStatusMsg() { return this.i; } public String getPeriod() { return this.n; } public String getPeriodInterest() { return this.d; } public String getPeriodPayMoney() { return this.c; } public void setCertNum(String paramString) { this.l = paramString; } public void setCertType(Integer paramInteger) { this.m = paramInteger; } public void setCommission(BigDecimal paramBigDecimal) { this.e = paramBigDecimal; } public void setCouponCode(String paramString) { this.f = paramString; } public void setCouponValue(BigDecimal paramBigDecimal) { this.g = paramBigDecimal; } public void setIsRenew(Integer paramInteger) { this.k = paramInteger; } public void setLoanMoney(String paramString) { this.b = paramString; } public void setLoanMoneyLender(String paramString) { this.a = paramString; } public void setLoanStatus(String paramString) { this.h = paramString; } public void setLoanStatusDetail(String paramString) { this.j = paramString; } public void setLoanStatusMsg(String paramString) { this.i = paramString; } public void setPeriod(String paramString) { this.n = paramString; } public void setPeriodInterest(String paramString) { this.d = paramString; } public void setPeriodPayMoney(String paramString) { this.c = paramString; } } /* Location: /Users/gaoht/Downloads/zirom/classes3-dex2jar.jar!/com/ziroom/ziroomcustomer/signed/a/h.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "ght163988@autonavi.com" ]
ght163988@autonavi.com
01d7d9bfe8bc583909781cdb629eaae0fae6c6c4
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/24/24_13e5f9146de7d1b16415372f62aa0a39f89c483b/RingBuffer/24_13e5f9146de7d1b16415372f62aa0a39f89c483b_RingBuffer_s.java
078ff1194b97176b86885caa781415883193f6cc
[]
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
3,181
java
/* 4.3.7. Ring buffer. A ring buffer or circular queue is a FIFO data structure of a fixed size N. It is useful for transferring data between asynchronous processes or storing log files. When the buffer is empty, the consumer waits until data is deposited; when the buffer is full, the producer waits to deposit data. A ring buffer has the following methods: isEmpty(), isFull(), enqueue(), and dequeue(). Write an generic data type RingBuffer using an array (with circular wrap-around for efficiency). RingBuffer может быть как фифо, так и лифо. Тут просят фифо. Для этого надо контролить и точку вставки, и точку чтения. wrap-around означает, что когда ты достигаешь конца массива в добавлении, то надо начинать вставлять сначала. И так до бесконечности. При этом надо помнить позицию самого старого неперезаписанного элемента. abcdfghjkl 1234567890 */ package JavaBook.Algo_4.StacksQueues_4_3; public class RingBuffer { private int[] values; private int lastAdded; private int firstToRead; public RingBuffer(int size) { this.values = new int[size]; this.last = -1; this.firstToRead = -1; } // public RingBuffer(int[] _values) { // this(_values, _values.length); // } // public RingBuffer(int[] _values, int size) { // this.values = new int[size]; // for (int i = 0; i < _values.length; i++) { // if (_values[i] == 0) { // this.last = i-1; // break; // } // this.values[i] = _values[i]; // } // this.last = _values.length -1; // } public boolean isEmpty() { return (lastAdded == -1 || firstToRead == -1); } public boolean isFull() { return (lastAdded + 1)%values.length == firstToRead; } public void enqueue(int item){ if (this.isFull()) { System.out.println("Failed to add item, buffer is full."); } else { if (lastAdded == values.length - 1) { values[0] = item; lastAdded = 0; } else { values[++lastAdded] = item; } } } public int dequeue() { if (this.isEmpty()) { throw new IllegalArgumentException(); //return null; } else { if (firstToRead == lastAdded) { int i = firstToRead; firstToRead = -1; lastAdded = -1; return values[i]; } else if (firstToRead == values.length - 1) { firstToRead = 0; return values[values.length - 1]; } else { return values[firstToRead++]; } } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
c35a7baa91c4d2f76336c28e6f2b239d2e7d4fc0
9254e7279570ac8ef687c416a79bb472146e9b35
/imm-20200930/src/main/java/com/aliyun/imm20200930/models/ListOfficeConversionTaskResponse.java
0d292b16c16a8059aa11abbfbbf09f97ba73135d
[ "Apache-2.0" ]
permissive
lquterqtd/alibabacloud-java-sdk
3eaa17276dd28004dae6f87e763e13eb90c30032
3e5dca8c36398469e10cdaaa34c314ae0bb640b4
refs/heads/master
2023-08-12T13:56:26.379027
2021-10-19T07:22:15
2021-10-19T07:22:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,142
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.imm20200930.models; import com.aliyun.tea.*; public class ListOfficeConversionTaskResponse extends TeaModel { @NameInMap("headers") @Validation(required = true) public java.util.Map<String, String> headers; @NameInMap("body") @Validation(required = true) public ListOfficeConversionTaskResponseBody body; public static ListOfficeConversionTaskResponse build(java.util.Map<String, ?> map) throws Exception { ListOfficeConversionTaskResponse self = new ListOfficeConversionTaskResponse(); return TeaModel.build(map, self); } public ListOfficeConversionTaskResponse setHeaders(java.util.Map<String, String> headers) { this.headers = headers; return this; } public java.util.Map<String, String> getHeaders() { return this.headers; } public ListOfficeConversionTaskResponse setBody(ListOfficeConversionTaskResponseBody body) { this.body = body; return this; } public ListOfficeConversionTaskResponseBody getBody() { return this.body; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
59a1e055c9f3a22f63a23a3bedfcb05eac9eb614
f35f4008d60bf04e6e3236a60514693cae296d42
/app/src/main/java/com/google/android/gms/deviceconnection/features/DeviceFeature.java
03cd4fd401e14a34521efbbd7b78dc1c019257f0
[]
no_license
alsmwsk/golfmon
ef0c8e8c7ecaa13371deed40f7e20468b823b0e9
740132d47185bfe9ec9d6774efbde5404ea8cf6d
refs/heads/master
2020-03-22T11:16:01.438894
2018-07-06T09:47:10
2018-07-06T09:47:10
139,959,669
0
0
null
null
null
null
UTF-8
Java
false
false
490
java
package com.google.android.gms.deviceconnection.features; public abstract interface DeviceFeature { public abstract String getFeatureName(); public abstract long getLastConnectionTimestampMillis(); } /* Location: C:\Users\TGKIM\Downloads\작업폴더\리버싱\androidReversetools\jd-gui-0.3.6.windows\com.appg.golfmon-1-dex2jar.jar * Qualified Name: com.google.android.gms.deviceconnection.features.DeviceFeature * JD-Core Version: 0.7.0.1 */
[ "alsmwsk@naver.com" ]
alsmwsk@naver.com
cc15947514a8f5fe2a26fb0b4b0da4a19c4aa212
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/elastic--elasticsearch/2cc97a0d3ed2a9276378e2a6462942deab04a1fb/before/IndexedExpressionTests.java
d82efcb2885e2b728f482f5830d31747145810d1
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
4,226
java
/* * Licensed to Elasticsearch under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch licenses this file to you under * the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.elasticsearch.script.expression; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.script.Script; import org.elasticsearch.script.ScriptService; import org.elasticsearch.script.ScriptService.ScriptType; import org.elasticsearch.search.aggregations.AggregationBuilders; import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.test.ESIntegTestCase; import org.junit.Test; import java.io.IOException; import java.util.Collection; import java.util.Collections; import static org.hamcrest.Matchers.containsString; //TODO: please convert to unit tests! public class IndexedExpressionTests extends ESIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { Settings.Builder builder = Settings.builder().put(super.nodeSettings(nodeOrdinal)); builder.put("script.engine.expression.indexed.update", "off"); builder.put("script.engine.expression.indexed.search", "off"); builder.put("script.engine.expression.indexed.aggs", "off"); builder.put("script.engine.expression.indexed.mapping", "off"); return builder.build(); } @Override protected Collection<Class<? extends Plugin>> nodePlugins() { return Collections.singleton(ExpressionPlugin.class); } @Test public void testAllOpsDisabledIndexedScripts() throws IOException { if (randomBoolean()) { client().preparePutIndexedScript(ExpressionScriptEngineService.NAME, "script1", "{\"script\":\"2\"}").get(); } else { client().prepareIndex(ScriptService.SCRIPT_INDEX, ExpressionScriptEngineService.NAME, "script1").setSource("{\"script\":\"2\"}").get(); } client().prepareIndex("test", "scriptTest", "1").setSource("{\"theField\":\"foo\"}").get(); try { client().prepareUpdate("test", "scriptTest", "1") .setScript(new Script("script1", ScriptService.ScriptType.INDEXED, ExpressionScriptEngineService.NAME, null)).get(); fail("update script should have been rejected"); } catch(Exception e) { assertThat(e.getMessage(), containsString("failed to execute script")); assertThat(e.getCause().getMessage(), containsString("scripts of type [indexed], operation [update] and lang [expression] are disabled")); } try { client().prepareSearch() .setSource( new SearchSourceBuilder().scriptField("test1", new Script("script1", ScriptType.INDEXED, "expression", null))) .setIndices("test").setTypes("scriptTest").get(); fail("search script should have been rejected"); } catch(Exception e) { assertThat(e.toString(), containsString("scripts of type [indexed], operation [search] and lang [expression] are disabled")); } try { client().prepareSearch("test") .setSource( new SearchSourceBuilder().aggregation(AggregationBuilders.terms("test").script( new Script("script1", ScriptType.INDEXED, "expression", null)))).get(); } catch (Exception e) { assertThat(e.toString(), containsString("scripts of type [indexed], operation [aggs] and lang [expression] are disabled")); } } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
d4fe10109f719e39b776921ed8bded35d5b4d8af
f868dd38b990cb41dce5cd1d11d29c5ce0968701
/src/main/java/ac/za/cput/Domain/Physics.java
0d9eca2679902c4178e64b880465d5ce893ca4b1
[]
no_license
215062264/Assignment7
7ed0f40e66eb025db90ec3b372602fbe3da7ed59
0f694259e4f514fbf458d022678b1814723dc96b
refs/heads/master
2020-05-17T23:07:33.152242
2019-04-29T07:27:48
2019-04-29T07:27:48
184,019,624
0
0
null
null
null
null
UTF-8
Java
false
false
1,054
java
package ac.za.cput.Domain; public class Physics { private String subjectCode; private double mark; private Physics(){} private Physics(Physics.Builder builder) { this.subjectCode = builder.subjectCode; this.mark = builder.mark; } public String getSubjectCode() { return subjectCode; } public Double getMark() { return mark; } public static class Builder{ private String subjectCode; private double mark; public Physics.Builder subjectCode(String subjectCode) { this.subjectCode = subjectCode; return this; } public Physics.Builder mark(Double mark) { this.mark = mark; return this; } public Physics build() { return new Physics(this); } } @Override public String toString() { return "Physics{" + "subjectCode='" + subjectCode + '\'' + ", mark='" + mark + '\'' + '}'; } }
[ "Kylejosias6@gmail.com" ]
Kylejosias6@gmail.com
509ba22ebd62ab3acd1df539cf87f8c0ead21a28
028cbe18b4e5c347f664c592cbc7f56729b74060
/v2/entity-persistence/src/java/oracle/toplink/essentials/internal/expressions/LogicalExpression.java
1114329798854074b3b950465d0c429d1e6f9336
[]
no_license
dmatej/Glassfish-SVN-Patched
8d355ff753b23a9a1bd9d7475fa4b2cfd3b40f9e
269e29ba90db6d9c38271f7acd2affcacf2416f1
refs/heads/master
2021-05-28T12:55:06.267463
2014-11-11T04:21:44
2014-11-11T04:21:44
23,610,469
1
0
null
null
null
null
UTF-8
Java
false
false
5,163
java
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * // Copyright (c) 1998, 2007, Oracle. All rights reserved. * * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common Development * and Distribution License("CDDL") (collectively, the "License"). You * may not use this file except in compliance with the License. You can obtain * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html * or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific * language governing permissions and limitations under the License. * * When distributing the software, include this License Header Notice in each * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt. * Sun designates this particular file as subject to the "Classpath" exception * as provided by Sun in the GPL Version 2 section of the License file that * accompanied this code. If applicable, add the following below the License * Header, with the fields enclosed by brackets [] replaced by your own * identifying information: "Portions Copyrighted [year] * [name of copyright owner]" * * Contributor(s): * * If you wish your version of this file to be governed by only the CDDL or * only the GPL Version 2, indicate your decision by adding "[Contributor] * elects to include this software in this distribution under the [CDDL or GPL * Version 2] license." If you don't indicate a single choice of license, a * recipient has the option to distribute your version of this file under * either the CDDL, the GPL Version 2 or to extend the choice of license to * its licensees as provided above. However, if you add GPL Version 2 code * and therefore, elected the GPL Version 2 license, then the option applies * only if the new code is made subject to such option by the copyright * holder. */ package oracle.toplink.essentials.internal.expressions; import oracle.toplink.essentials.exceptions.*; import oracle.toplink.essentials.queryframework.*; import oracle.toplink.essentials.expressions.*; import oracle.toplink.essentials.internal.sessions.AbstractRecord; import oracle.toplink.essentials.internal.sessions.AbstractSession; import oracle.toplink.essentials.descriptors.ClassDescriptor; /** * Used for logical AND and OR. This is not used by NOT. */ public class LogicalExpression extends CompoundExpression { /** * LogicalExpression constructor comment. */ public LogicalExpression() { super(); } /** * INTERNAL: * Used for debug printing. */ public String descriptionOfNodeType() { return "Logical"; } /** * INTERNAL: * Check if the object conforms to the expression in memory. * This is used for in-memory querying. * If the expression in not able to determine if the object conform throw a not supported exception. */ public boolean doesConform(Object object, AbstractSession session, AbstractRecord translationRow, InMemoryQueryIndirectionPolicy valueHolderPolicy, boolean objectIsUnregistered) { // This should always be and or or. if (getOperator().getSelector() == ExpressionOperator.And) { return getFirstChild().doesConform(object, session, translationRow, valueHolderPolicy, objectIsUnregistered) && getSecondChild().doesConform(object, session, translationRow, valueHolderPolicy, objectIsUnregistered); } else if (getOperator().getSelector() == ExpressionOperator.Or) { return getFirstChild().doesConform(object, session, translationRow, valueHolderPolicy, objectIsUnregistered) || getSecondChild().doesConform(object, session, translationRow, valueHolderPolicy, objectIsUnregistered); } throw QueryException.cannotConformExpression(); } /** * INTERNAL: * Extract the primary key from the expression into the row. * Ensure that the query is quering the exact primary key. * Return false if not on the primary key. */ public boolean extractPrimaryKeyValues(boolean requireExactMatch, ClassDescriptor descriptor, AbstractRecord primaryKeyRow, AbstractRecord translationRow) { // If this is a primary key expression then it can only have and/or relationships. if (getOperator().getSelector() != ExpressionOperator.And) { // If this is an exact primary key expression it can not have ors. // After fixing bug 2782991 this must now work correctly. if (requireExactMatch || (getOperator().getSelector() != ExpressionOperator.Or)) { return false; } } boolean validExpression = getFirstChild().extractPrimaryKeyValues(requireExactMatch, descriptor, primaryKeyRow, translationRow); if (requireExactMatch && (!validExpression)) { return false; } return getSecondChild().extractPrimaryKeyValues(requireExactMatch, descriptor, primaryKeyRow, translationRow); } /** * INTERNAL: */ public boolean isLogicalExpression() { return true; } }
[ "kohsuke@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5" ]
kohsuke@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5
460b343acc2be9f46183182cae0ccca8398f7d15
f9d4e15a7a5008cd81eb19cb62835966938be8a7
/colombo-brognoli-thesis/ValidationNumReqWrappers/src/it/polimi/validationwrappers/Wrapper230.java
96c4a770899b63aa2bded2551fac3613ae75c08b
[]
no_license
nicolobrognoli/colombo-brognoli-thesis
6e607ef1d802b946ede8e8db124d818493a3cc93
912bcfc5e37b9df916929e6f014b1ce2085bac43
refs/heads/master
2021-01-01T05:38:43.665817
2015-03-15T20:07:28
2015-03-15T20:07:28
32,281,276
0
0
null
null
null
null
UTF-8
Java
false
false
1,748
java
package it.polimi.validationwrappers;import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public class Wrapper230{ private Map<String,Float> mapReward = new HashMap<String,Float>(); private List<String> rewardNameList = new ArrayList<String>(); private List<String> alternatives = new ArrayList<String>();public Wrapper230(){ rewardNameList.add("time"); mapReward.put("totaltime", 100.0f);mapReward.put("weighttime", 0.7f);mapReward.put("policytime", 0.0f); alternatives.add("A"); mapReward.put("Atime",0f); mapReward.put("AtimeMin",0.015708289325282954f); mapReward.put("AtimeMax",0.05101304966777911f); alternatives.add("B"); mapReward.put("Btime",0f); mapReward.put("BtimeMin",0.01812864102956898f); mapReward.put("BtimeMax",0.0788205656821466f); alternatives.add("C"); mapReward.put("Ctime",0f); mapReward.put("CtimeMin",0.05366302768356779f); mapReward.put("CtimeMax",0.002198105113207982f);rewardNameList.add("h"); mapReward.put("totalh", 2000f);mapReward.put("weighth", 0.3f);mapReward.put("policyh", 0.0f); mapReward.put("Ah",1f); mapReward.put("AhMin",1775.151249520005f); mapReward.put("AhMax",1774.843486969128f); mapReward.put("Bh",1f); mapReward.put("BhMin",1776.6641294962903f); mapReward.put("BhMax",1774.9405273637524f); mapReward.put("Ch",1f); mapReward.put("ChMin",1770.979545389014f); mapReward.put("ChMax",1778.6957424658601f); } public void doActivity(){ String choice = AlternativeUtility.getAlternative(alternatives,rewardNameList,mapReward);ActivityInterface obj = null;if(choice.equals("A")){obj = new A();}if(choice.equals("B")){obj = new B();}if(choice.equals("C")){obj = new C();} obj.doActivity();AlternativeUtility.updateContext(rewardNameList, choice, mapReward);}}
[ "nicolo@Laptop.local" ]
nicolo@Laptop.local
5d5776e59b5782bd12e34b6f9131c333265cfd80
c95c03f659007f347cc02e293faeb339eff85a59
/CoverageDataBase/MethodsDataBase/assertj-core-assertj-core-3.11.1/Bytes_assertLessThan_Test/should_fail_if_actual_is_greater_than_other_according_to_custom_comparison_strategy.txt
eaa303882fea8a8a7fe3c93044cf44b278d0ef69
[]
no_license
dormaayan/TestsReposirotry
e2bf6c247d933b278fcc47082afa7282dd916baa
75520c8fbbbd5f721f4c216ae7f142ec861e2c67
refs/heads/master
2020-04-11T21:34:56.287920
2019-02-06T13:34:31
2019-02-06T13:34:31
162,110,352
0
2
null
null
null
null
UTF-8
Java
false
false
422
txt
@Test public void should_fail_if_actual_is_greater_than_other_according_to_custom_comparison_strategy(){ AssertionInfo info=someInfo(); try { bytesWithAbsValueComparisonStrategy.assertLessThan(info,(byte)-8,(byte)6); } catch ( AssertionError e) { verify(failures).failure(info,shouldBeLess((byte)-8,(byte)6,absValueComparisonStrategy)); return; } failBecauseExpectedAssertionErrorWasNotThrown(); }
[ "dor.d.ma@gmail.com" ]
dor.d.ma@gmail.com
ab0d5f1fe4f07c2fe8e3439c762a83a63828a87b
82159a65b13fdfd538a17448f3a572a11489c564
/app/src/main/java/com/yandex/disk/rest/OkHttpClientFactory.java
776d7873f8cad7e90c8ed1fb9566c1d05bcd89c7
[ "Apache-2.0" ]
permissive
SammyVimes/manga
130329f9cc7be733b6a2a2cb7021b9ad42a1c6f3
971f24e943239e9c1638d5da3c96b0cd33a96c88
refs/heads/master
2021-01-19T01:06:21.141338
2018-10-01T10:59:21
2018-10-01T10:59:21
53,887,772
30
13
null
2018-04-08T05:06:01
2016-03-14T20:02:52
Java
UTF-8
Java
false
false
1,001
java
/* * (C) 2015 Yandex LLC (https://yandex.com/) * * The source code of Java SDK for Yandex.Disk REST API * is available to use under terms of Apache License, * Version 2.0. See the file LICENSE for the details. */ package com.yandex.disk.rest; import com.squareup.okhttp.OkHttpClient; import java.util.concurrent.TimeUnit; public class OkHttpClientFactory { private static final int CONNECT_TIMEOUT_MILLIS = 30 * 1000; private static final int READ_TIMEOUT_MILLIS = 30 * 1000; private static final int WRITE_TIMEOUT_MILLIS = 30 * 1000; public static OkHttpClient makeClient() { OkHttpClient client = new OkHttpClient(); client.setConnectTimeout(CONNECT_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS); client.setReadTimeout(READ_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS); client.setWriteTimeout(WRITE_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS); client.setFollowSslRedirects(true); client.setFollowRedirects(true); return client; } }
[ "samvimes@yandex.ru" ]
samvimes@yandex.ru
02fa5866eda486a7ef5149fc20fe0427fe4aeabe
03721eae1397a261bd6d97f6ebbafd93c94fe113
/src/main/java/ietf/params/xml/ns/yang/ietf/inet/types/rev130715/Uri.java
abadf5d19d2a288eafb3b71dc6e8cca93c7cf427
[ "Apache-2.0" ]
permissive
5GinFIRE/eu.5ginfire.osm3im2java
2b74003a4151a1170bbc5ecb134bd969d3048d5f
01008dec23922cbce6432bff7fd767d16b1223c5
refs/heads/master
2021-04-28T06:01:13.667382
2018-03-02T09:28:24
2018-03-02T09:28:24
122,190,723
0
0
null
2018-03-01T16:24:01
2018-02-20T11:40:34
Java
UTF-8
Java
false
false
2,171
java
package ietf.params.xml.ns.yang.ietf.inet.types.rev130715; import java.io.Serializable; import java.beans.ConstructorProperties; import com.google.common.base.Preconditions; import java.util.Objects; public class Uri implements Serializable { private static final long serialVersionUID = -8010068495094688589L; private final java.lang.String _value; @ConstructorProperties("value") public Uri(java.lang.String _value) { Preconditions.checkNotNull(_value, "Supplied value may not be null"); this._value = _value; } /** * Creates a copy from Source Object. * * @param source Source object */ public Uri(Uri source) { this._value = source._value; } public static Uri getDefaultInstance(String defaultValue) { return new Uri(defaultValue); } public java.lang.String getValue() { return _value; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + Objects.hashCode(_value); return result; } @Override public boolean equals(java.lang.Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } Uri other = (Uri) obj; if (!Objects.equals(_value, other._value)) { return false; } return true; } @Override public java.lang.String toString() { java.lang.StringBuilder builder = new java.lang.StringBuilder(ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Uri.class.getSimpleName()).append(" ["); boolean first = true; if (_value != null) { if (first) { first = false; } else { builder.append(", "); } builder.append("_value="); builder.append(_value); } return builder.append(']').toString(); } }
[ "tranoris@gmail.com" ]
tranoris@gmail.com
70662bad046a8744520bd89cd9c30e0fe653dd1e
75c8d4d130bb8588313344d15f9e33b15e813791
/java/l2server/gameserver/network/serverpackets/ExBrBroadcastEventState.java
9846062e8ad28cd26808e61ff5a2a523b0009795
[]
no_license
Hl4p3x/L2T_Server
2fd6a94f388679100115a4fb5928a8e7630656f7
66134d76aa22f90933af9119c7b198c4960283d3
refs/heads/master
2022-09-11T05:59:46.310447
2022-08-17T19:54:58
2022-08-17T19:54:58
126,422,985
2
2
null
2022-08-17T19:55:00
2018-03-23T02:38:43
Java
UTF-8
Java
false
false
2,217
java
/* * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * this program. If not, see <http://www.gnu.org/licenses/>. */ package l2server.gameserver.network.serverpackets; /** * Special event info packet. * * @author Kerberos * @author mrTJO * Format: (ch)dddddddSS */ public class ExBrBroadcastEventState extends L2GameServerPacket { private int _eventId; private int _eventState; private int _param0; private int _param1; private int _param2; private int _param3; private int _param4; private String _param5; private String _param6; public static final int APRIL_FOOLS = 20090401; public static final int EVAS_INFERNO = 20090801; // event state (0 - hide, 1 - show), day (1-14), percent (0-100) public static final int HALLOWEEN_EVENT = 20091031; // event state (0 - hide, 1 - show) public static final int RAISING_RUDOLPH = 20091225; // event state (0 - hide, 1 - show) public static final int LOVERS_JUBILEE = 20100214; // event state (0 - hide, 1 - show) public ExBrBroadcastEventState(int eventId, int eventState) { _eventId = eventId; _eventState = eventState; } public ExBrBroadcastEventState(int eventId, int eventState, int param0, int param1, int param2, int param3, int param4, String param5, String param6) { _eventId = eventId; _eventState = eventState; _param0 = param0; _param1 = param1; _param2 = param2; _param3 = param3; _param4 = param4; _param5 = param5; _param6 = param6; } @Override protected final void writeImpl() { writeD(_eventId); writeD(_eventState); writeD(_param0); writeD(_param1); writeD(_param2); writeD(_param3); writeD(_param4); writeS(_param5); writeS(_param6); } }
[ "pere@pcasafont.net" ]
pere@pcasafont.net