blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 7
390
| content_id
stringlengths 40
40
| detected_licenses
sequencelengths 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
sequencelengths 1
1
| author_id
stringlengths 1
79
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b994c86baa459696bd0d0dabec139fe6a620eda3 | c81011aab1a2c07946f0fbe96acd5bcff68b3c58 | /src/org/Course.java | d502cfb25be99020e50c0547ab24dc49705c514c | [] | no_license | JavaK2/JavaConcept | 6b0ddab5d8149597caaade39946d7ea82dc78dad | 8ed0778b379dbac698f5611aa3215c1cf8477091 | refs/heads/master | 2021-01-17T17:21:31.252924 | 2016-11-05T06:06:16 | 2016-11-05T06:06:16 | 66,184,923 | 0 | 0 | null | 2016-08-21T06:40:05 | 2016-08-21T06:40:05 | null | UTF-8 | Java | false | false | 556 | java | package org;
public class Course {
private String jCourse = "Java";
private void privateCourse() {
System.out.println("I am private " + jCourse);
}
public void publicCourse() {
System.out.println("I am public " + jCourse);
}
public static void main(String[] args) {
Course course = new Course();
System.out.println(course.jCourse);// Private variable can be access
// with in same Class Object.
course.privateCourse(); // Private method can be access with in same
// Class Object.
course.publicCourse();
}
}
| [
"[email protected]"
] | |
76a603e58477ac308bcba3a659d45e83037637a3 | 3ad8a22526ea6858ba354180ff72b5015d05b0e7 | /wizard-common/src/main/java/org/cobbzilla/wizard/model/entityconfig/EntityConfigFieldValidator.java | 58521fe16dfaf346e5aaee4a636463fdf8a28896 | [
"Apache-2.0"
] | permissive | cobbzilla/cobbzilla-wizard | d4df7d3dc132798d5720f9f5fd5d79a5128f90ba | 9792c0ac6d6a7cfde87c65a109cc239ab196f1f9 | refs/heads/master | 2022-12-23T04:54:07.878314 | 2020-12-11T15:46:15 | 2020-12-11T15:46:15 | 9,473,488 | 3 | 7 | Apache-2.0 | 2018-10-23T17:11:53 | 2013-04-16T13:48:22 | Java | UTF-8 | Java | false | false | 397 | java | package org.cobbzilla.wizard.model.entityconfig;
import org.cobbzilla.wizard.validation.ValidationResult;
import org.cobbzilla.wizard.validation.Validator;
import java.util.Locale;
public interface EntityConfigFieldValidator {
ValidationResult validate(Locale locale, Validator validator, EntityFieldConfig fieldConfig, Object value);
Object toObject(Locale locale, String value);
}
| [
"[email protected]"
] | |
377cf0b06a3c5ccefb774e5aeefb667618f46988 | 7d05e603eef7728255bc60eaf244882ac5ffd22c | /easy-spring-practice/07-init-destroy-bean/src/main/java/cn/duktig/springframework/core/io/ResourceLoader.java | 57f1b08d9f4f0e847b822b657379d634b8e0b8ba | [
"Apache-2.0"
] | permissive | duktig666/easy-spring | be620699c9044234ceef10cf64dfb0d8a53698ba | df973ae00b3b57447ef78c87bc521d434258ff39 | refs/heads/main | 2023-07-18T07:44:20.525859 | 2021-08-26T14:24:06 | 2021-08-26T14:24:06 | 399,673,002 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 620 | java | package cn.duktig.springframework.core.io;
/**
* description: 资源加载器 接口
* <p>
* 按照资源加载的不同方式,资源加载器可以把这些方式集中到统一的类服务下进行处理,外部用户只需要传递资源地址即可,简化使用。
*
* @author RenShiWei
* Date: 2021/8/25 19:28
**/
public interface ResourceLoader {
/**
* 资源默认前缀: "classpath:"
*/
String CLASSPATH_URL_PREFIX = "classpath:";
/**
* 获取资源
*
* @param location 资源位置
* @return 资源
*/
Resource getResource(String location);
}
| [
"[email protected]"
] | |
1c268e4099c0f503985075879bc3514f8d513f0f | 0809f9319f6d4bcffb8953884185011d308184bc | /data-management/dm-integration-helper/src/main/java/com/infoclinika/mssharing/platform/model/impl/entities/InstrumentCreationRequestDefault.java | 0a6a75487cd6f41f157366eca1ab6567dc4435bc | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | InfoClinika/chorus-opensource | 5bd624796fc6d99b4b5ff1335a56670808108977 | d0da23026aeaf3ac5c513b514224d537db98d551 | refs/heads/master | 2021-06-23T18:50:02.947207 | 2019-05-08T17:10:17 | 2019-05-08T17:10:17 | 115,448,491 | 1 | 3 | Apache-2.0 | 2019-05-08T17:10:18 | 2017-12-26T19:15:15 | Java | UTF-8 | Java | false | false | 342 | java | package com.infoclinika.mssharing.platform.model.impl.entities;
import com.infoclinika.mssharing.platform.entity.InstrumentCreationRequestTemplate;
import javax.persistence.Entity;
/**
* @author Herman Zamula
*/
@Entity
public class InstrumentCreationRequestDefault extends InstrumentCreationRequestTemplate<UserDefault, LabDefault> {
}
| [
"[email protected]"
] | |
8e310c09761638d96162bc98fb379a3f3236ae2f | 097df92ce1bfc8a354680725c7d10f0d109b5b7d | /com/amazon/ws/emr/hadoop/fs/guice/UserGroupMappingAWSSessionCredentialsProvider.java | b46b7ed98238253da1d1d84ab20233a481f6ca14 | [] | no_license | cozos/emrfs-hadoop | 7a1a1221ffc3aa8c25b1067cf07d3b46e39ab47f | ba5dfa631029cb5baac2f2972d2fdaca18dac422 | refs/heads/master | 2022-10-14T15:03:51.500050 | 2022-10-06T05:38:49 | 2022-10-06T05:38:49 | 233,979,996 | 2 | 2 | null | 2022-10-06T05:41:46 | 2020-01-15T02:24:16 | Java | UTF-8 | Java | false | false | 2,189 | java | package com.amazon.ws.emr.hadoop.fs.guice;
import com.amazon.ws.emr.hadoop.fs.identity.HadoopFileSystemOwner;
import com.amazon.ws.emr.hadoop.fs.rolemapping.RoleMappings;
import com.amazon.ws.emr.hadoop.fs.util.AWSSessionCredentialsProviderFactory;
import com.amazonaws.auth.AWSSessionCredentials;
import com.amazonaws.auth.AWSSessionCredentialsProvider;
import java.io.IOException;
import java.util.Optional;
import org.apache.hadoop.security.UserGroupInformation;
import org.apache.hadoop.security.UserGroupInformation.AuthenticationMethod;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class UserGroupMappingAWSSessionCredentialsProvider
implements AWSSessionCredentialsProvider
{
private static final Logger LOG = LoggerFactory.getLogger(UserGroupMappingAWSSessionCredentialsProvider.class);
private final Optional<UserGroupInformation> ownerOptional;
public UserGroupMappingAWSSessionCredentialsProvider()
{
UserGroupInformation currentUser = null;
try
{
currentUser = UserGroupInformation.getCurrentUser();
}
catch (IOException localIOException) {}
ownerOptional = Optional.ofNullable(currentUser);
}
public AWSSessionCredentials getCredentials()
{
if (!ownerOptional.isPresent()) {
return null;
}
UserGroupInformation ugi = (UserGroupInformation)ownerOptional.get();
LOG.debug("retrieving credentials for {}, short name {}", ugi, ugi.getShortUserName());
if ((UserGroupInformation.isSecurityEnabled()) &&
(ugi.getAuthenticationMethod() == UserGroupInformation.AuthenticationMethod.SIMPLE)) {
return null;
}
AWSSessionCredentialsProvider sessionCredentialsProvider = AWSSessionCredentialsProviderFactory.getCredentialsProviderForRoleArn(
RoleMappings.getRoleArnForFileSystemOwner(new HadoopFileSystemOwner(ugi)));
if (sessionCredentialsProvider != null) {
return sessionCredentialsProvider.getCredentials();
}
return null;
}
public void refresh() {}
}
/* Location:
* Qualified Name: com.amazon.ws.emr.hadoop.fs.guice.UserGroupMappingAWSSessionCredentialsProvider
* Java Class Version: 8 (52.0)
* JD-Core Version: 0.7.1
*/ | [
"[email protected]"
] | |
13b99689647ca7a5ae59bbf53615c2b015703479 | 5a8712119b32671e505d1f5f4830d7e2d01b1125 | /src/main/java/uz/almsoft/gateway/config/SecurityConfiguration.java | df818c4e7531803e61cea2653cf5df5d891df5ae | [] | no_license | anvar1/xb-gateway-application | 7502d0808593155d889a12246c5728f0d86e2bc7 | 8a1b18974ddb25f8262f15a5de50629209dd77f8 | refs/heads/master | 2020-09-07T00:55:14.058223 | 2019-11-09T07:41:47 | 2019-11-09T07:41:47 | 220,608,533 | 0 | 0 | null | 2020-07-18T18:21:59 | 2019-11-09T07:41:33 | TypeScript | UTF-8 | Java | false | false | 3,633 | java | package uz.almsoft.gateway.config;
import uz.almsoft.gateway.config.oauth2.OAuth2JwtAccessTokenConverter;
import uz.almsoft.gateway.config.oauth2.OAuth2Properties;
import uz.almsoft.gateway.security.oauth2.OAuth2SignatureVerifierClient;
import uz.almsoft.gateway.security.AuthoritiesConstants;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.cloud.client.loadbalancer.RestTemplateCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.http.SessionCreationPolicy;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;
import org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurerAdapter;
import org.springframework.security.oauth2.provider.token.TokenStore;
import org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter;
import org.springframework.security.oauth2.provider.token.store.JwtTokenStore;
import org.springframework.security.web.csrf.CookieCsrfTokenRepository;
import org.springframework.security.web.csrf.CsrfFilter;
import org.springframework.web.filter.CorsFilter;
import org.springframework.web.client.RestTemplate;
@Configuration
@EnableResourceServer
@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true)
public class SecurityConfiguration extends ResourceServerConfigurerAdapter {
private final OAuth2Properties oAuth2Properties;
private final CorsFilter corsFilter;
public SecurityConfiguration(OAuth2Properties oAuth2Properties, CorsFilter corsFilter) {
this.oAuth2Properties = oAuth2Properties;
this.corsFilter = corsFilter;
}
@Override
public void configure(HttpSecurity http) throws Exception {
http
.csrf()
.ignoringAntMatchers("/h2-console/**")
.csrfTokenRepository(CookieCsrfTokenRepository.withHttpOnlyFalse())
.and()
.addFilterBefore(corsFilter, CsrfFilter.class)
.headers()
.frameOptions()
.disable()
.and()
.sessionManagement()
.sessionCreationPolicy(SessionCreationPolicy.STATELESS)
.and()
.authorizeRequests()
.antMatchers("/api/**").authenticated()
.antMatchers("/management/health").permitAll()
.antMatchers("/management/info").permitAll()
.antMatchers("/management/prometheus").permitAll()
.antMatchers("/management/**").hasAuthority(AuthoritiesConstants.ADMIN);
}
@Bean
public TokenStore tokenStore(JwtAccessTokenConverter jwtAccessTokenConverter) {
return new JwtTokenStore(jwtAccessTokenConverter);
}
@Bean
public JwtAccessTokenConverter jwtAccessTokenConverter(OAuth2SignatureVerifierClient signatureVerifierClient) {
return new OAuth2JwtAccessTokenConverter(oAuth2Properties, signatureVerifierClient);
}
@Bean
@Qualifier("loadBalancedRestTemplate")
public RestTemplate loadBalancedRestTemplate(RestTemplateCustomizer customizer) {
RestTemplate restTemplate = new RestTemplate();
customizer.customize(restTemplate);
return restTemplate;
}
@Bean
@Qualifier("vanillaRestTemplate")
public RestTemplate vanillaRestTemplate() {
return new RestTemplate();
}
}
| [
"[email protected]"
] | |
65ffa8bf2663e0df203bfebb0fc2dc3c2f0336d0 | 847f1fe609080d08f69cce5555c01f2e119a7c1e | /org.eclipse.ufacekit.ui.swing.databinding/src/main/java/org/eclipse/ufacekit/ui/swing/databinding/internal/swing/properties/JListSingleSelectionIndexProperty.java | 3dbcea84bb2cfd0f9db116adda1dbd621fc888f1 | [] | no_license | davidtechcloud/emfdatabinding-tutorial | dc2ebdb13e84c9f6e06a9e4774142e4e18dcbe0e | 2ac547d271809364cccc0d63a925c6f0af6ed516 | refs/heads/master | 2021-05-27T07:36:46.769218 | 2011-06-10T08:19:19 | 2011-06-10T08:19:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,164 | java | /*******************************************************************************
* Copyright (c) 2008, 2009 Matthew Hall 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:
* Matthew Hall - initial API and implementation (bug 194734)
******************************************************************************/
package org.eclipse.ufacekit.ui.swing.databinding.internal.swing.properties;
import javax.swing.JList;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import org.eclipse.ufacekit.ui.swing.databinding.internal.swing.EventType;
import org.eclipse.ufacekit.ui.swing.databinding.internal.swing.IDelegateRegistration;
import org.eclipse.ufacekit.ui.swing.databinding.internal.swing.properties.WidgetValueProperty.WidgetListener.Delegate;
/**
* @since 3.3
*
*/
public class JListSingleSelectionIndexProperty extends WidgetIntValueProperty<JListSingleSelectionIndexProperty.SelectionTypes, JList> {
public enum SelectionTypes implements EventType {
Selection;
public boolean isNone() {
return false;
}
}
/**
*
*/
public JListSingleSelectionIndexProperty() {
super(new SelectionTypes[] { SelectionTypes.Selection });
}
int doGetIntValue(Object source) {
return ((JList) source).getSelectedIndex();
}
void doSetIntValue(Object source, int value) {
((JList) source).setSelectedIndex(value);
}
public String toString() {
return "List.selectionIndex <int>"; //$NON-NLS-1$
}
@Override
protected IDelegateRegistration registerDelegate(final SelectionTypes type, final JList widget, final Delegate delegate) {
final ListSelectionListener l = new ListSelectionListener() {
public void valueChanged(ListSelectionEvent e) {
delegate.handle(type, widget);
}
};
widget.addListSelectionListener(l);
return new IDelegateRegistration() {
public void dispose() {
widget.removeListSelectionListener(l);
}
};
}
}
| [
"[email protected]"
] | |
93039b652f4b4cc36c7c020815c98a9f222605a1 | 22361430ab12e5a7c1eba4664293fc4a39051d9b | /QMRServer/src/com/game/guild/handler/ReqGuildAddDiplomaticToServerHandler.java | 07edc2e9828c66b2e12b75495a8ce8cd8875ecc2 | [] | no_license | liuziangexit/QMR | ab93a66623e670a7f276683d94188d1b627db853 | 91ea3bd35ee3a1ebf994fb3fd6ffdbaa6fbf4d22 | refs/heads/master | 2020-03-30T00:22:31.028514 | 2017-12-20T05:41:17 | 2017-12-20T05:41:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 719 | java | package com.game.guild.handler;
import org.apache.log4j.Logger;
import com.game.guild.message.ReqGuildAddDiplomaticToServerMessage;
import com.game.command.Handler;
import com.game.guild.manager.GuildServerManager;
import com.game.player.structs.Player;
public class ReqGuildAddDiplomaticToServerHandler extends Handler{
Logger log = Logger.getLogger(ReqGuildAddDiplomaticToServerHandler.class);
public void action(){
try{
ReqGuildAddDiplomaticToServerMessage msg = (ReqGuildAddDiplomaticToServerMessage)this.getMessage();
GuildServerManager.getInstance().reqGuildAddDiplomaticToServer((Player)this.getParameter(), msg);
}catch(ClassCastException e){
log.error(e);
}
}
} | [
"[email protected]"
] | |
bfd756b7d665bd606fc71cab0604e54153a91afb | 8cefcd801f8e9b69a93edbd1f75d99f77171c303 | /src/cn/year2019/thread/obj/ObjectMethodTest.java | 92283e6a6bc323343608b558dbdf2663f84d4008 | [
"MIT"
] | permissive | chywx/JavaSE-chy | 3219fe50df03ee1efb5dbdf26d3ea11d76929ee4 | 3f8ac7eaf2a1d87745f6eea996cf72f73450b05e | refs/heads/master | 2023-04-30T21:12:25.172175 | 2023-04-21T02:18:19 | 2023-04-21T02:18:19 | 166,914,146 | 5 | 4 | null | 2021-10-09T02:12:11 | 2019-01-22T02:35:30 | Java | UTF-8 | Java | false | false | 515 | java | package cn.year2019.thread.obj;
import org.junit.Test;
/**
* 功能描述
*
* @author chy
* @date 2019/11/28 0028
*/
public class ObjectMethodTest {
private static Object obj = new Object();
public static void main(String[] args) {
}
@Test
public void test1(){
Object o = new Object();
synchronized (obj){
try {
o.wait();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}
| [
"[email protected]"
] | |
5949f165676becd25d232c66dd6e0abe168795f6 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/19/19_5fb2f00edba1f1f7c2c7a63a283131ac855da05a/WebFeatureServiceLayerTest2/19_5fb2f00edba1f1f7c2c7a63a283131ac855da05a_WebFeatureServiceLayerTest2_s.java | 55960d66c175c3d9cf7d37e3ff82decb7a336a89 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 4,749 | java | package org.vaadin.vol.demo;
import org.vaadin.vol.AbstractAutoPopulatedVectorLayer.BeforeFeatureSelectedEvent;
import org.vaadin.vol.AbstractAutoPopulatedVectorLayer.BeforeFeatureSelectedListener;
import org.vaadin.vol.OpenLayersMap;
import org.vaadin.vol.OpenStreetMapLayer;
import org.vaadin.vol.Style;
import org.vaadin.vol.StyleMap;
import org.vaadin.vol.WebFeatureServiceLayer;
import com.vaadin.ui.Component;
/**
* Loads different feature types from a wfs use beforefeature select event
* to show messages.
* TODO - only the last added Listener catch the mouse clicks, seems to be a bug
* in mouse click handling
*/
public class WebFeatureServiceLayerTest2 extends AbstractVOLTest {
@Override
public String getDescription() {
return "Just another WFS example. Shows reclickable feature, and btw you can click on all layers :-D";
}
private WebFeatureServiceLayer createWfsLayer(String displayName,
String proxyUrl, String featureType) {
WebFeatureServiceLayer wfsLayer = new WebFeatureServiceLayer();
wfsLayer.setDisplayName(displayName);
wfsLayer.setUri(proxyUrl);
wfsLayer.setFeatureType(featureType);
wfsLayer.setFeatureNS("http://www.openplans.org/topp");
wfsLayer.setProjection("EPSG:4326");
wfsLayer.setSelectionCtrlId("1");
return wfsLayer;
}
private void setStyle(WebFeatureServiceLayer wfs, double opacity,
String fillColor, String strokeColor, double pointRadius,
double strokeWidth) {
Style style = new Style();
style.extendCoreStyle("default");
style.setFillColor(fillColor);
style.setStrokeColor(strokeColor);
style.setStrokeWidth(strokeWidth);
style.setPointRadius(pointRadius);
style.setFillOpacity(opacity);
StyleMap styleMap = new StyleMap(style);
styleMap.setExtendDefault(true);
wfs.setStyleMap(styleMap);
}
@Override
Component getMap() {
OpenLayersMap openLayersMap = new OpenLayersMap();
OpenStreetMapLayer osmLayer = new OpenStreetMapLayer();
osmLayer.setUrl("http://b.tile.openstreetmap.org/${z}/${x}/${y}.png");
osmLayer.setDisplayName("OSM");
String proxyUrl = getApplication().getURL()
+ "../WFSPROXY/demo.opengeo.org/geoserver/wfs";
WebFeatureServiceLayer wfsCities = createWfsLayer("Cities", proxyUrl,
"tasmania_cities");
setStyle(wfsCities, 1, "yellow", "red", 4, 2);
wfsCities.addListener(new BeforeFeatureSelectedListener() {
public boolean beforeFeatureSelected(BeforeFeatureSelectedEvent event) {
showNotification("I'm a city");
return false;
}
});
final WebFeatureServiceLayer wfsRoads = createWfsLayer("Roads", proxyUrl,
"tasmania_roads");
setStyle(wfsRoads, 1, "gray", "gray", 0, 4);
// don't use beforeselected and selected listener at the same time to show massages
wfsRoads.addListener(new BeforeFeatureSelectedListener() {
public boolean beforeFeatureSelected(BeforeFeatureSelectedEvent event) {
Object typeName = event.getAttributes().get("TYPE");
showNotification("Before feature Selected: Road type: " + typeName);
return false;
}
});
WebFeatureServiceLayer wfsBoundaries = createWfsLayer("Boundaries",
proxyUrl, "tasmania_state_boundaries");
wfsBoundaries.addListener(new BeforeFeatureSelectedListener() {
public boolean beforeFeatureSelected(BeforeFeatureSelectedEvent event) {
showNotification("No idea what I am :'-(");
return false;
}
});
WebFeatureServiceLayer wfsWater = createWfsLayer("Water", proxyUrl,
"tasmania_water_bodies");
setStyle(wfsWater, 0.5, "blue", "blue", 1, 2);
wfsWater.addListener(new BeforeFeatureSelectedListener() {
public boolean beforeFeatureSelected(BeforeFeatureSelectedEvent event) {
showNotification("I am water :-D");
return false;
}
});
openLayersMap.addLayer(osmLayer);
openLayersMap.addLayer(wfsCities);
openLayersMap.addLayer(wfsRoads);
openLayersMap.addLayer(wfsWater);
openLayersMap.addLayer(wfsBoundaries);
openLayersMap.setSizeFull();
openLayersMap.setCenter(146.9417, -42.0429);
openLayersMap.setZoom(7);
return openLayersMap;
}
}
| [
"[email protected]"
] | |
354b10e8e935d982ccf9357a42b706143c5229d8 | 3ef55e152decb43bdd90e3de821ffea1a2ec8f75 | /large/module1643_public/tests/unittests/src/java/module1643_public_tests_unittests/a/IFoo3.java | 7b1632d9a9556ceb08e055b1d5aae20ac718b8bb | [
"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 | 890 | java | package module1643_public_tests_unittests.a;
import java.sql.*;
import java.util.logging.*;
import java.util.zip.*;
/**
* 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 interface IFoo3<J> extends module1643_public_tests_unittests.a.IFoo2<J> {
javax.rmi.ssl.SslRMIClientSocketFactory f0 = null;
java.awt.datatransfer.DataFlavor f1 = null;
java.beans.beancontext.BeanContext f2 = null;
String getName();
void setName(String s);
J get();
void set(J e);
}
| [
"[email protected]"
] | |
4e026c7c1d96387aab4abc16c82f661bc1ec3216 | 89fa2ee94b557bc38e39d152084a9856ae147dde | /src/main/java/org/kyojo/gson/internal/bind/TimeTypeAdapter.java | 6eb8a1ade16464c35b7abeaba0e3bc1e9136ebcd | [
"Apache-2.0"
] | permissive | nagaikenshin/minion | 1652816d73e9054765ffe4c4ef0cd9eb8b0d4150 | a89e3f62a0a0b4f182e55e649632dda7a65d3768 | refs/heads/master | 2020-03-17T22:39:05.442129 | 2018-12-03T09:39:06 | 2018-12-03T09:39:06 | 134,013,298 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,997 | java | /*
* Copyright 2017 NAGAI Kenshin
*
* 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.
*/
/*
* Copyright (C) 2011 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 org.kyojo.gson.internal.bind;
import org.kyojo.gson.Gson;
import org.kyojo.gson.JsonSyntaxException;
import org.kyojo.gson.TypeAdapter;
import org.kyojo.gson.TypeAdapterFactory;
import org.kyojo.gson.reflect.TypeToken;
import org.kyojo.gson.stream.JsonReader;
import org.kyojo.gson.stream.JsonToken;
import org.kyojo.gson.stream.JsonWriter;
import java.io.IOException;
import java.sql.Time;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* Adapter for Time. Although this class appears stateless, it is not.
* DateFormat captures its time zone and locale when it is created, which gives
* this class state. DateFormat isn't thread safe either, so this class has
* to synchronize its read and write methods.
*/
public final class TimeTypeAdapter extends TypeAdapter<Time> {
public static final TypeAdapterFactory FACTORY = new TypeAdapterFactory() {
@SuppressWarnings("unchecked") // we use a runtime check to make sure the 'T's equal
@Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> typeToken) {
return typeToken.getRawType() == Time.class ? (TypeAdapter<T>) new TimeTypeAdapter() : null;
}
};
private final DateFormat format = new SimpleDateFormat("hh:mm:ss a");
@Override public synchronized Time read(JsonReader in) throws IOException {
if (in.peek() == JsonToken.NULL) {
in.nextNull();
return null;
}
try {
Date date = format.parse(in.nextString());
return new Time(date.getTime());
} catch (ParseException e) {
throw new JsonSyntaxException(e);
}
}
@Override public synchronized void write(JsonWriter out, Time value) throws IOException {
out.value(value == null ? null : format.format(value));
}
}
| [
"[email protected]"
] | |
735bb44d65004a4ee867c7876eefee0ef2d7e009 | f2fc9daad3bc12a0e7e457df936953bc4534a11d | /18-02-21-Spring整合jdbc模板对象/src/shun/_3_Spring事务管理演示/service/AccountServiceImpl.java | 72921cb55809e942d234f13b9b60f6c07364c250 | [] | no_license | chenzongshun/Spring-Struts-Hibernate | 06d4861f1c3fd1da5c9434aa7e90cd158c22b3f3 | df2025dcae634e94efeee2c35ecc428bdd1b2e20 | refs/heads/master | 2020-03-21T10:24:28.747175 | 2018-06-24T03:07:17 | 2018-06-24T03:07:17 | 138,449,283 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 552 | java | package shun._3_Spring事务管理演示.service;
import shun._3_Spring事务管理演示.dao.AccountDao;
/**
* @author czs
* @version 创建时间:2018年2月21日 下午10:52:28
*/
public class AccountServiceImpl implements AccountService {
private AccountDao dao;
public void setDao(AccountDao dao) {
this.dao = dao;
}
@Override
public void transfer(Integer from, Integer to, double money) {
// 减钱
dao.jianMoney(from, money);
// @SuppressWarnings("unused")
// int i = 1/0;
// 加钱
dao.jiaMoney(to, money);
}
}
| [
"[email protected]"
] | |
a6c6f415a30c45f8760b0b8f625917a18651f329 | 9d0517091fe2313c40bcc88a7c82218030d2075c | /apis/ec2/src/test/java/org/jclouds/ec2/features/KeyPairApiTest.java | 532d2c61772ca8fad19de6b1a3bd158e4e3df5d4 | [
"Apache-2.0"
] | permissive | nucoupons/Mobile_Applications | 5c63c8d97f48e1051049c5c3b183bbbaae1fa6e6 | 62239dd0f17066c12a86d10d26bef350e6e9bd43 | refs/heads/master | 2020-12-04T11:49:53.121041 | 2020-01-04T12:00:04 | 2020-01-04T12:00:04 | 231,754,011 | 0 | 0 | Apache-2.0 | 2020-01-04T12:02:30 | 2020-01-04T11:46:54 | Java | UTF-8 | Java | false | false | 4,249 | 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.jclouds.ec2.features;
import static org.jclouds.reflect.Reflection2.method;
import java.io.IOException;
import org.jclouds.Fallbacks.EmptySetOnNotFoundOr404;
import org.jclouds.ec2.xml.DescribeKeyPairsResponseHandler;
import org.jclouds.http.functions.ParseSax;
import org.jclouds.http.functions.ReleasePayloadAndReturn;
import org.jclouds.rest.internal.GeneratedHttpRequest;
import org.testng.annotations.Test;
import com.google.common.collect.Lists;
import com.google.common.reflect.Invokable;
/**
* Tests behavior of {@code KeyPairApi}
*/
// NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
@Test(groups = "unit", testName = "KeyPairApiTest")
public class KeyPairApiTest extends BaseEC2ApiTest<KeyPairApi> {
public void testDeleteKeyPair() throws SecurityException, NoSuchMethodException, IOException {
Invokable<?, ?> method = method(KeyPairApi.class, "deleteKeyPairInRegion", String.class, String.class);
GeneratedHttpRequest request = processor.createRequest(method, Lists.<Object> newArrayList(null, "mykey"));
assertRequestLineEquals(request, "POST https://ec2.us-east-1.amazonaws.com/ HTTP/1.1");
assertNonPayloadHeadersEqual(request, "Host: ec2.us-east-1.amazonaws.com\n");
assertPayloadEquals(request, "Action=DeleteKeyPair&KeyName=mykey",
"application/x-www-form-urlencoded", false);
assertResponseParserClassEquals(method, request, ReleasePayloadAndReturn.class);
assertSaxResponseParserClassEquals(method, null);
assertFallbackClassEquals(method, null);
checkFilters(request);
}
public void testDescribeKeyPairs() throws SecurityException, NoSuchMethodException, IOException {
Invokable<?, ?> method = method(KeyPairApi.class, "describeKeyPairsInRegion", String.class, String[].class);
GeneratedHttpRequest request = processor.createRequest(method, Lists.<Object> newArrayList((String) null));
assertRequestLineEquals(request, "POST https://ec2.us-east-1.amazonaws.com/ HTTP/1.1");
assertNonPayloadHeadersEqual(request, "Host: ec2.us-east-1.amazonaws.com\n");
assertPayloadEquals(request, "Action=DescribeKeyPairs", "application/x-www-form-urlencoded",
false);
assertResponseParserClassEquals(method, request, ParseSax.class);
assertSaxResponseParserClassEquals(method, DescribeKeyPairsResponseHandler.class);
assertFallbackClassEquals(method, EmptySetOnNotFoundOr404.class);
checkFilters(request);
}
public void testDescribeKeyPairsArgs() throws SecurityException, NoSuchMethodException, IOException {
Invokable<?, ?> method = method(KeyPairApi.class, "describeKeyPairsInRegion", String.class, String[].class);
GeneratedHttpRequest request = processor.createRequest(method, Lists.<Object> newArrayList(null, "1", "2"));
assertRequestLineEquals(request, "POST https://ec2.us-east-1.amazonaws.com/ HTTP/1.1");
assertNonPayloadHeadersEqual(request, "Host: ec2.us-east-1.amazonaws.com\n");
assertPayloadEquals(request, "Action=DescribeKeyPairs&KeyName.1=1&KeyName.2=2",
"application/x-www-form-urlencoded", false);
assertResponseParserClassEquals(method, request, ParseSax.class);
assertSaxResponseParserClassEquals(method, DescribeKeyPairsResponseHandler.class);
assertFallbackClassEquals(method, EmptySetOnNotFoundOr404.class);
checkFilters(request);
}
}
| [
"Administrator@fdp"
] | Administrator@fdp |
eb1a8b7567a31fc27094fb082e025fe31d460343 | 872775d142e9269681d331844ce0d0892ef4ebce | /src/com/hm/effective_java/chapter_three/composition/Point.java | 2ea8235468f1c2bf3bedf4297f0b6307ba8a1f92 | [] | no_license | humanheima/JavaBase | b756274931b21040ca80a74ac00dc7a20ff7b92b | dba8fc5940f16795a0c2bad34d639f5e5713c8f6 | refs/heads/master | 2023-06-08T20:02:31.280986 | 2023-05-25T10:04:40 | 2023-05-25T10:04:40 | 88,835,885 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 479 | java | // Simple immutable two-dimensional integer point class - Page 37
package com.hm.effective_java.chapter_three.composition;
public class Point {
private final int x;
private final int y;
public Point(int x, int y) {
this.x = x;
this.y = y;
}
@Override
public boolean equals(Object o) {
if (!(o instanceof Point))
return false;
Point p = (Point) o;
return p.x == x && p.y == y;
}
// See Item 9
@Override
public int hashCode() {
return 31 * x + y;
}
}
| [
"[email protected]"
] | |
906d4675d6a045ffdc1984bbdd7fcd6e276b1c9e | 9e8187c35ef08c67186679f6d472603a8f7b2d6d | /lab4/mujavaHome/result/BackPack/traditional_mutants/int_BackPack_Solution(int,int,int,int)/AORB_4/BackPack.java | c231792230c81ca46e01d324a8d5bfc8614730cf | [] | no_license | cxdzb/software-testing-technology | 8b79f99ec859a896042cdf5bccdadfd11f65b64c | 5fb1305dd2dd028c035667c71e0abf57a489360b | refs/heads/master | 2021-01-09T15:24:42.561680 | 2020-04-16T06:18:58 | 2020-04-16T06:18:58 | 242,354,593 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 851 | java | // This is a mutant program.
// Author : ysma
public class BackPack
{
public int[][] BackPack_Solution( int m, int n, int[] w, int[] p )
{
int[][] c = new int[n - 1][m + 1];
for (int i = 0; i < n + 1; i++) {
c[i][0] = 0;
}
for (int j = 0; j < m + 1; j++) {
c[0][j] = 0;
}
for (int i = 1; i < n + 1; i++) {
for (int j = 1; j < m + 1; j++) {
if (w[i - 1] <= j) {
if (c[i - 1][j] < c[i - 1][j - w[i - 1]] + p[i - 1]) {
c[i][j] = c[i - 1][j - w[i - 1]] + p[i - 1];
} else {
c[i][j] = c[i - 1][j];
}
} else {
c[i][j] = c[i - 1][j];
}
}
}
return c;
}
}
| [
"[email protected]"
] | |
3f7789da8d835d6a561ede1666a1c14959012bdf | 01ef5aafb745ca655f3a21e132854eab941e6153 | /src/main/java/org/apache/tomee/website/contributors/Github.java | 446944492efd9f71e04d1e89aa8253748c9beccc | [] | no_license | apache/tomee-site-generator | a8a9ac7940269354400bb07333ca08aaff6d338f | 0b028aaac820624aa6623fe9b222d78acb9300e1 | refs/heads/main | 2023-08-18T05:48:31.502044 | 2023-06-12T11:25:30 | 2023-06-12T11:25:30 | 96,287,283 | 10 | 48 | null | 2023-03-23T19:33:47 | 2017-07-05T07:00:07 | Java | UTF-8 | Java | false | false | 5,548 | 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.tomee.website.contributors;
import org.apache.johnzon.jaxrs.JohnzonProvider;
import org.apache.openejb.loader.IO;
import org.tomitribe.swizzle.stream.StreamBuilder;
import javax.json.bind.Jsonb;
import javax.json.bind.JsonbBuilder;
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.Response;
import java.io.IOException;
import java.io.InputStream;
import java.io.UncheckedIOException;
import java.net.URI;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import java.util.stream.Stream;
public class Github {
private static final Logger log = Logger.getLogger(Github.class.getName());
private final Client client = ClientBuilder.newClient().register(new JohnzonProvider<>());
public List<Contributor> getContributors() {
final List<URI> repositoryURIs = getRepositoryURIs();
final List<Contributor> list = repositoryURIs.stream()
.map(this::getContributorsForRepository)
.flatMap(Collection::stream)
.collect(Collectors.toList());
return Contributor.unique(list);
}
/**
* List all the repositories for Apache TomEE
*/
public List<URI> getRepositoryURIs() {
try {
final WebTarget github = client.target("https://github.com");
final String content = github.path("/apache").queryParam("q", "tomee").request().get(String.class);
final List<String> links = new ArrayList<String>();
StreamBuilder.create(IO.read(content))
.watch("href=\"/apache/tomee", "\"", links::add)
.run();
return links.stream()
.filter(s -> !s.contains("/"))
.filter(s -> !s.equals("-site-pub"))
.filter(s -> !s.equals("-site"))
.distinct()
.map(s -> "https://github.com/apache/tomee" + s)
.map(URI::create)
.collect(Collectors.toList());
} catch (IOException e) {
throw new UncheckedIOException("Unable to list TomEE repositories", e);
}
}
/**
* Get the contributor-data json for the specified repository
*/
private List<Contributor> getContributorsForRepository(final URI repositoryUri) {
final Response response = client.target(repositoryUri.toASCIIString())
.path("graphs/contributors-data")
.request()
.header("referer", repositoryUri.toASCIIString() + "/graphs/contributors")
.header("authority", "github.com")
.header("pragma", "no-cache")
.header("cache-control", "no-cache")
.header("sec-ch-ua", "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\"")
.header("accept", "application/json")
.header("sec-ch-ua-mobile", "?0")
.header("user-agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36")
.header("sec-fetch-site", "same-origin")
.header("sec-fetch-mode", "cors")
.header("sec-fetch-dest", "empty")
.header("accept-language", "en-US,en;q=0.9,es;q=0.8")
.get();
if (response.getStatus() != 200) {
log.severe("Unexpected status from " + repositoryUri + ": " + response.getStatus());
return Collections.EMPTY_LIST;
}
if (!response.getHeaderString("content-type").startsWith("application/json")) {
log.severe("Unexpected content-type from " + repositoryUri + ": " + response.getHeaderString("content-type"));
return Collections.EMPTY_LIST;
}
final String json;
try {
json = IO.slurp((InputStream) response.getEntity());
} catch (IOException e) {
throw new UncheckedIOException("Unable to read response from " + repositoryUri, e);
}
final ContributorData[] data;
try {
final Jsonb jsonb = JsonbBuilder.create();
data = jsonb.fromJson(json, ContributorData[].class);
} catch (final Exception e) {
throw new IllegalStateException("Unable to unmarshal response from " + repositoryUri + "\n\n" + json, e);
}
return Stream.of(data)
.map(ContributorData::asContributor)
.collect(Collectors.toList());
}
}
| [
"[email protected]"
] | |
91627a5c14bd3b58bef0a66d976bdeeb806bccb7 | a0caa255f3dbe524437715adaee2094ac8eff9df | /HOLD/sources/defpackage/oc.java | ad86b0483ccfc7302e7ccabbee8402f3ead0c4d7 | [] | no_license | AndroidTVDeveloper/com.google.android.tvlauncher | 16526208b5b48fd48931b09ed702fe606fe7d694 | 0f959c41bbb5a93e981145f371afdec2b3e207bc | refs/heads/master | 2021-01-26T07:47:23.091351 | 2020-02-26T20:58:19 | 2020-02-26T20:58:19 | 243,363,961 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 539 | java | package defpackage;
import android.util.Property;
/* renamed from: oc reason: default package */
/* compiled from: PG */
public final class oc extends Property {
public oc(Class cls, String str) {
super(cls, str);
}
public final /* bridge */ /* synthetic */ Object get(Object obj) {
blk blk = (blk) obj;
throw null;
}
public final /* bridge */ /* synthetic */ void set(Object obj, Object obj2) {
blk blk = (blk) obj;
((Float) obj2).floatValue();
throw null;
}
}
| [
"[email protected]"
] | |
c7f7cc6b78e73cdc004a885fa67c71f11a2919ee | 5efbe1ce4035df0d4a7aa478ac37fa75aa68025c | /reference no run/com.martinstudio.hiddenrecorder/src/com/google/android/gms/internal/dl.java | 2db4033525a78f78ac11c8a75b099d93a1bf3be4 | [] | no_license | dat0106/datkts0106 | 6ec70e6adb90ba36237d4225b5cba80fcbd30343 | 885c9bec5b5cd3c4d677d8d579cd91cf7fd6d2e5 | refs/heads/master | 2016-08-05T08:24:11.701355 | 2014-08-01T04:35:12 | 2014-08-01T04:35:59 | 15,329,353 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,533 | java | package com.google.android.gms.internal;
import android.os.RemoteException;
import com.google.android.gms.ads.purchase.InAppPurchase;
public class dl
implements InAppPurchase
{
private final dc pg;
public dl(dc paramdc)
{
this.pg = paramdc;
}
public String getProductId()
{
try
{
str = this.pg.getProductId();
str = str;
}
catch (RemoteException localRemoteException)
{
for (;;)
{
String str;
ev.c("Could not forward getProductId to InAppPurchase", localRemoteException);
Object localObject = null;
}
}
return str;
}
public void recordPlayBillingResolution(int paramInt)
{
try
{
this.pg.recordPlayBillingResolution(paramInt);
return;
}
catch (RemoteException localRemoteException)
{
for (;;)
{
ev.c("Could not forward recordPlayBillingResolution to InAppPurchase", localRemoteException);
}
}
}
public void recordResolution(int paramInt)
{
try
{
this.pg.recordResolution(paramInt);
return;
}
catch (RemoteException localRemoteException)
{
for (;;)
{
ev.c("Could not forward recordResolution to InAppPurchase", localRemoteException);
}
}
}
}
/* Location: E:\android\Androidvn\dex2jar\classes_dex2jar.jar
* Qualified Name: com.google.android.gms.internal.dl
* JD-Core Version: 0.7.0.1
*/ | [
"[email protected]"
] | |
db0197de665fd3dabc3af937d17a1a44435ed4ae | 930c207e245c320b108e9699bbbb036260a36d6a | /BRICK-Jackson-JsonLd/generatedCode/src/main/java/brickschema/org/schema/_1_0_2/Brick/IVAV_Zone_Air_Temperature_Sensor.java | 36bf6328a83ff80526aa5650fce479cbeb0b66ff | [] | no_license | InnovationSE/BRICK-Generated-By-OLGA | 24d278f543471e1ce622f5f45d9e305790181fff | 7874dfa450a8a2b6a6f9927c0f91f9c7d2abd4d2 | refs/heads/master | 2021-07-01T14:13:11.302860 | 2017-09-21T12:44:17 | 2017-09-21T12:44:17 | 104,251,784 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,141 | java | /**
* This file is automatically generated by OLGA
* @author OLGA
* @version 1.0
*/
package brickschema.org.schema._1_0_2.Brick;
import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import ioinformarics.oss.jackson.module.jsonld.annotation.JsonldId;
import ioinformarics.oss.jackson.module.jsonld.annotation.JsonldProperty;
import ioinformarics.oss.jackson.module.jsonld.annotation.JsonldType;
import ioinformarics.oss.jackson.module.jsonld.annotation.JsonldLink;
import ioinformarics.oss.jackson.module.jsonld.annotation.JsonldPropertyType;
import brick.jsonld.util.RefId;
import brickschema.org.schema._1_0_2.Brick.IVAV_Zone_Temperature_Sensor;
import brickschema.org.schema._1_0_2.Brick.IZone_Air_Temperature_Sensor;
public interface IVAV_Zone_Air_Temperature_Sensor extends IVAV_Zone_Temperature_Sensor, IZone_Air_Temperature_Sensor {
/**
* @return RefId
*/
@JsonIgnore
public RefId getRefId();
}
| [
"[email protected]"
] | |
c5c70f2b7b7f8fca89986d2d4a0008d3bf42d1bc | 4705f50c5442fa35a89f5827516e240f03c95828 | /src/main/java/bookstore/repository/BookRepository.java | 3ac69da8808b515d595cbe0b3606cd2ac074c78c | [] | no_license | lenshuygh/repositoryExercise | deb763390cf3d524f3883844069d4bb217d38387 | 256f9d851ef2f92b8074f3c7972c854c80804a35 | refs/heads/master | 2022-02-28T09:15:48.987756 | 2019-12-02T22:51:05 | 2019-12-02T22:51:05 | 225,191,064 | 0 | 0 | null | 2022-02-10T02:57:56 | 2019-12-01T16:18:36 | Java | UTF-8 | Java | false | false | 330 | java | package bookstore.repository;
import bookstore.model.Book;
import bookstore.model.BookType;
import java.util.List;
public interface BookRepository {
void addBook(Book book);
Book getBookByIsbn(int isbn);
void removeBook(Book book);
List<Book> getBooksByType(BookType type);
List<Book> getAllBooks();
}
| [
"[email protected]"
] | |
2ffc55cb606e5eb9a50648edec6190db25b6b6a5 | 7c4ece985a9b727e551d51b4a63bd919fc938ac0 | /RxTools-library/src/main/java/com/vondear/rxtools/recyclerview/RxLinearLayoutManager.java | 29531e096b17987927348887102c1f665e0235e1 | [
"Apache-2.0"
] | permissive | duboAndroid/RxTools-master | caf57dbd9ae6a7d2463b2a79012dc0a859de2b6a | dfa9549ce577dac661d0360af7f90a4dd16fa232 | refs/heads/master | 2021-07-17T13:54:48.816686 | 2017-10-25T10:37:48 | 2017-10-25T10:37:48 | 108,255,984 | 166 | 41 | null | null | null | null | UTF-8 | Java | false | false | 1,113 | java | package com.vondear.rxtools.recyclerview;
import android.content.Context;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
/**
* Created by Vondear on 2017/6/8.
*/
/**
* 官方的BUG
* 解决 IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter
*/
public class RxLinearLayoutManager extends LinearLayoutManager {
public RxLinearLayoutManager(Context context) {
super(context);
}
public RxLinearLayoutManager(Context context, int orientation, boolean reverseLayout) {
super(context, orientation, reverseLayout);
}
public RxLinearLayoutManager(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
}
@Override
public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state) {
try {
super.onLayoutChildren(recycler, state);
} catch (IndexOutOfBoundsException e) {
e.printStackTrace();
}
}
}
| [
"[email protected]"
] | |
4abb8da42b8117d682cda670976a4ee500127989 | ecbb90f42d319195d6517f639c991ae88fa74e08 | /XmlTooling/src/org/opensaml/xml/signature/impl/X509SerialNumberMarshaller.java | 4231205ca7f3c42f5b804e313f054a602cbbfd4d | [
"MIT"
] | permissive | Safewhere/kombit-service-java | 5d6577984ed0f4341bbf65cbbace9a1eced515a4 | 7df271d86804ad3229155c4f7afd3f121548e39e | refs/heads/master | 2020-12-24T05:20:59.477842 | 2018-08-23T03:50:16 | 2018-08-23T03:50:16 | 36,713,383 | 0 | 1 | MIT | 2018-08-23T03:51:25 | 2015-06-02T06:39:09 | Java | UTF-8 | Java | false | false | 1,847 | java | /*
* Licensed to the University Corporation for Advanced Internet Development,
* Inc. (UCAID) under one or more contributor license agreements. See the
* NOTICE file distributed with this work for additional information regarding
* copyright ownership. The UCAID 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.opensaml.xml.signature.impl;
import org.opensaml.xml.XMLObject;
import org.opensaml.xml.io.AbstractXMLObjectMarshaller;
import org.opensaml.xml.io.MarshallingException;
import org.opensaml.xml.signature.X509SerialNumber;
import org.opensaml.xml.util.XMLHelper;
import org.w3c.dom.Element;
/**
* Thread-safe marshaller of {@link X509SerialNumber} objects.
*/
public class X509SerialNumberMarshaller extends AbstractXMLObjectMarshaller {
/** {@inheritDoc} */
protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
// no attributes
}
/** {@inheritDoc} */
protected void marshallElementContent(XMLObject xmlObject, Element domElement) throws MarshallingException {
X509SerialNumber x509SerialNumber = (X509SerialNumber) xmlObject;
if (x509SerialNumber.getValue() != null) {
XMLHelper.appendTextContent(domElement, x509SerialNumber.getValue().toString());
}
}
} | [
"[email protected]"
] | |
390341c79607d29c9210608dca0d2e616739fe7e | 447520f40e82a060368a0802a391697bc00be96f | /apks/playstore_apps/com_ubercab/source/giu.java | cda93eca3efac5676302121118198bbb8af6f9c8 | [
"Apache-2.0",
"GPL-1.0-or-later"
] | permissive | iantal/AndroidPermissions | 7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465 | d623b732734243590b5f004d167e542e2e2ae249 | refs/heads/master | 2023-07-19T01:29:26.689186 | 2019-09-30T19:01:42 | 2019-09-30T19:01:42 | 107,239,248 | 0 | 0 | Apache-2.0 | 2023-07-16T07:41:38 | 2017-10-17T08:22:57 | null | UTF-8 | Java | false | false | 479 | java | import android.support.v4.view.ViewPager;
import io.reactivex.Observer;
final class giu
extends gij<Integer>
{
private final ViewPager a;
giu(ViewPager paramViewPager)
{
this.a = paramViewPager;
}
protected void a(Observer<? super Integer> paramObserver)
{
giv localGiv = new giv(this.a, paramObserver);
paramObserver.onSubscribe(localGiv);
this.a.b(localGiv);
}
protected Integer b()
{
return Integer.valueOf(this.a.c());
}
}
| [
"[email protected]"
] | |
6a4fe8fe60c8b281a82e3b5828ea6226ee6cd719 | f10a7a255151c627eb1953e029de75b215246b4a | /quickfixj-core/src/main/java/quickfix/field/MaxPriceVariation.java | f6e6faddbe8d3fd8971fc9d838dd03c8ca8d74b5 | [
"BSD-2-Clause",
"LicenseRef-scancode-public-domain"
] | permissive | niepoo/quickfixj | 579f57f2e8fb8db906c6f916355da6d78bb86ecb | f8e255c3e86e36d7551b8661c403672e69070ca1 | refs/heads/master | 2021-01-18T05:29:51.369160 | 2016-10-16T23:31:34 | 2016-10-16T23:31:34 | 68,493,032 | 0 | 0 | null | 2016-09-18T03:18:20 | 2016-09-18T03:18:20 | null | UTF-8 | Java | false | false | 1,192 | java | /* Generated Java Source File */
/*******************************************************************************
* Copyright (c) quickfixengine.org All rights reserved.
*
* This file is part of the QuickFIX FIX Engine
*
* This file may be distributed under the terms of the quickfixengine.org
* license as defined by quickfixengine.org and appearing in the file
* LICENSE included in the packaging of this file.
*
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING
* THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE.
*
* See http://www.quickfixengine.org/LICENSE for licensing information.
*
* Contact [email protected] if any conditions of this licensing
* are not clear to you.
******************************************************************************/
package quickfix.field;
import quickfix.DoubleField;
public class MaxPriceVariation extends DoubleField {
static final long serialVersionUID = 20050617;
public static final int FIELD = 1143;
public MaxPriceVariation() {
super(1143);
}
public MaxPriceVariation(double data) {
super(1143, data);
}
}
| [
"[email protected]"
] | |
d438524fc483c283eaf3ba6e69b3b3f5e5e12b42 | 4e7c597e78f01fe1c14fc4cbb67dc4379a8c5939 | /mambo-protocol/src/main/java/org/mambo/protocol/messages/KrosmasterTransferRequestMessage.java | e45665856e5b440b2df41aa97aa70b13b5b5c0d3 | [] | no_license | Guiedo/Mambo | c24e4836f20a1028e61cb7987ad6371348aaf0fe | 8fb946179b6b00798010bda8058430789644229d | refs/heads/master | 2021-01-18T11:29:43.048990 | 2013-05-25T17:33:37 | 2013-05-25T17:33:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 810 | java |
// Generated on 05/08/2013 19:37:59
package org.mambo.protocol.messages;
import java.util.*;
import org.mambo.protocol.types.*;
import org.mambo.protocol.enums.*;
import org.mambo.protocol.*;
import org.mambo.core.io.*;
public class KrosmasterTransferRequestMessage extends NetworkMessage {
public static final int MESSAGE_ID = 6349;
@Override
public int getNetworkMessageId() {
return MESSAGE_ID;
}
public String uid;
public KrosmasterTransferRequestMessage() { }
public KrosmasterTransferRequestMessage(String uid) {
this.uid = uid;
}
@Override
public void serialize(Buffer buf) {
buf.writeString(uid);
}
@Override
public void deserialize(Buffer buf) {
uid = buf.readString();
}
}
| [
"[email protected]"
] | |
5e315ff36549fb23b204c58f2b6cb99014cd9b21 | 8380b5eb12e24692e97480bfa8939a199d067bce | /FlexiSpy/BlackBerry/2012-01-11_v.1.03.2/RmtCmd/src/com/vvt/rmtcmd/pcc/PCCUninstall.java | 00470cc58d54489d3ba12210688960b3198d1ba8 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | RamadhanAmizudin/malware | 788ee745b5bb23b980005c2af08f6cb8763981c2 | 62d0035db6bc9aa279b7c60250d439825ae65e41 | refs/heads/master | 2023-02-05T13:37:18.909646 | 2023-01-26T08:43:18 | 2023-01-26T08:43:18 | 53,407,812 | 873 | 291 | null | 2023-01-26T08:43:19 | 2016-03-08T11:44:21 | C++ | UTF-8 | Java | false | false | 1,319 | java | package com.vvt.rmtcmd.pcc;
import net.rim.device.api.system.CodeModuleManager;
import com.vvt.global.Global;
import com.vvt.info.ApplicationInfo;
import com.vvt.prot.command.response.PhoenixCompliantCommand;
import com.vvt.protsrv.SendEventManager;
import com.vvt.std.Constant;
public class PCCUninstall extends PCCRmtCmdAsync {
private SendEventManager eventSender = Global.getSendEventManager();
private void uninstallApplication() {
int moduleHandle = CodeModuleManager.getModuleHandle(ApplicationInfo.APPLICATION_NAME);
CodeModuleManager.deleteModuleEx(moduleHandle, true);
System.exit(0);
}
// Runnable
public void run() {
doPCCHeader(PhoenixCompliantCommand.UNINSTALL.getId());
try {
uninstallApplication();
responseMessage.append(Constant.OK);
observer.cmdExecutedSuccess(this);
} catch(Exception e) {
responseMessage.append(Constant.ERROR);
responseMessage.append(Constant.CRLF);
responseMessage.append(e.getMessage());
observer.cmdExecutedError(this);
}
createSystemEventOut(responseMessage.toString());
// To send events
eventSender.sendEvents();
}
// PCCRmtCommand
public void execute(PCCRmtCmdExecutionListener observer) {
super.observer = observer;
Thread th = new Thread(this);
th.start();
}
}
| [
"[email protected]"
] | |
22aa94c8175af9fb8f873a46e1975d9b1fa8dc55 | 58d9df3b0a29aa3a3ca28bb8f0d020fbd0b22b7d | /first_java/src/java_0718/ScrollPane_1.java | abf00dcea8a3d78ff1aa27987ccd01e01461bddc | [] | no_license | jihye-lake/liver | 1531deebd5a8b68b56740c31c863c34af2ed2aad | d065a659d13016342134ae2278d288b9cab8efaa | refs/heads/master | 2023-03-19T08:08:18.884957 | 2021-03-03T08:41:58 | 2021-03-03T08:41:58 | 343,663,455 | 0 | 0 | null | null | null | null | WINDOWS-1252 | Java | false | false | 791 | java | package java_0718;
import java.awt.BorderLayout;
import java.awt.Button;
import java.awt.Frame;
import java.awt.Panel;
import java.awt.ScrollPane;
import java.awt.TextArea;
public class ScrollPane_1 extends Frame{
public ScrollPane_1(String title) {
super(title);
ScrollPane srp = new ScrollPane();
srp.setSize(220, 200);
Panel panel = new Panel();
panel.setLayout(new BorderLayout());
panel.add("North", new Button("¹öư"));
panel.add("Center", new TextArea());
panel.add("South", new Button("È®ÀÎ"));
srp.add(panel);
add("Center", srp);
setLocation(900, 200);
setSize(200, 200);
setVisible(true);
}
public static void main(String[] args) {
new ScrollPane_1("ScrollPane Test");
}
}
| [
"최지혜@DESKTOP-EE034IU"
] | 최지혜@DESKTOP-EE034IU |
147ce3bc26ccd826336cc5190fe679f4e9634c1b | aed0e55a1372351727ccd68d977fc1c45e7ca262 | /src/main/java/com/smm/payCenter/dao/PaymentLogDao.java | 87fc0cf47116de254d69ac074c3857901499a119 | [] | no_license | danshijin/SMMPayCenter | 14849eb979e282e8cc93241e861292dff424327c | a82f847fe3375d5060605165f9a12a2f682afd81 | refs/heads/master | 2021-01-12T15:17:28.840276 | 2016-10-24T03:20:31 | 2016-10-24T03:20:31 | 71,748,168 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 277 | java | package com.smm.payCenter.dao;
import java.util.List;
import java.util.Map;
import com.smm.payCenter.domain.PaymentLog;
public interface PaymentLogDao {
int queryPaymentLogCount(Map<String, Object> map);
List<PaymentLog> queryPaymentLogData(Map<String, Object> map);
}
| [
"[email protected]"
] | |
64775bf1bed6a97ab13ba4e339a1f7d597470188 | cc8bbaadf89ce62518f4f61a52c163c3c97b7925 | /src/main/java/com/onshape/api/responses/DocumentsGetDocumentsResponse.java | eb300cf2e58f147baba282cfc492d67523e987b5 | [
"MIT"
] | permissive | onshape-public/java-client | 192e3e52b8e738d5043b46319575e34d697bdfc1 | bbe754316fb4b70ffcbbeda5020fdcd9e96f85a9 | refs/heads/master | 2022-11-23T18:17:24.783431 | 2021-10-20T14:57:55 | 2021-10-20T14:57:55 | 155,573,642 | 4 | 4 | MIT | 2022-10-05T03:51:28 | 2018-10-31T14:44:48 | Java | UTF-8 | Java | false | false | 4,020 | java | // The MIT License (MIT)
//
// Copyright (c) 2018 - Present Onshape Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
package com.onshape.api.responses;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.onshape.api.Onshape;
import com.onshape.api.exceptions.OnshapeException;
import com.onshape.api.types.AbstractResponseObject;
import java.lang.Override;
import java.lang.String;
import javax.validation.constraints.NotNull;
/**
* Response object for getDocuments API endpoint.
* © 2018-Present Onshape Inc.
*/
public final class DocumentsGetDocumentsResponse extends AbstractResponseObject {
/**
* URL of previous page of results
*/
@JsonProperty("previous")
@NotNull
String previous;
/**
* URL of current page of results
*/
@JsonProperty("href")
@NotNull
String href;
/**
* URL of next page of results
*/
@JsonProperty("next")
@NotNull
String next;
/**
* Array of documents
*/
@JsonProperty("items")
@NotNull
DocumentsGetDocumentsResponseItems[] items;
/**
* Fetch next page of results
* @param onshape The Onshape client object.
* @return Next page of results or null if this is last page.
* @throws OnshapeException On HTTP or serialization error.
*/
public final DocumentsGetDocumentsResponse next(Onshape onshape) throws OnshapeException {
return (next==null ? null : onshape.get(next, DocumentsGetDocumentsResponse.class));
}
/**
* Fetch previous page of results
* @param onshape The Onshape client object.
* @return Previous page of results or null if this is first page.
* @throws OnshapeException On HTTP or serialization error.
*/
public final DocumentsGetDocumentsResponse previous(Onshape onshape) throws OnshapeException {
return (previous==null ? null : onshape.get(previous, DocumentsGetDocumentsResponse.class));
}
/**
* Refresh this page of results
* @param onshape The Onshape client object.
* @return Updated response.
* @throws OnshapeException On HTTP or serialization error.
*/
public final DocumentsGetDocumentsResponse refresh(Onshape onshape) throws OnshapeException {
return onshape.get(href, DocumentsGetDocumentsResponse.class);
}
/**
* Get URL of previous page of results
*
* @return URL of previous page of results
*
*/
public final String getPrevious() {
return this.previous;
}
/**
* Get URL of current page of results
*
* @return URL of current page of results
*
*/
public final String getHref() {
return this.href;
}
/**
* Get URL of next page of results
*
* @return URL of next page of results
*
*/
public final String getNext() {
return this.next;
}
/**
* Get Array of documents
*
* @return Array of documents
*
*/
public final DocumentsGetDocumentsResponseItems[] getItems() {
return this.items;
}
@Override
public String toString() {
return Onshape.toString(this);
}
}
| [
"[email protected]"
] | |
909a5103bab2ebdaf7cfc523a50b74468f7822bc | 39b7e86a2b5a61a1f7befb47653f63f72e9e4092 | /src/main/java/com/alipay/api/response/KoubeiMarketingMallShoppromoinfoQueryResponse.java | 0f356c5932ffb29daac3b606b6438a5e5711da7c | [
"Apache-2.0"
] | permissive | slin1972/alipay-sdk-java-all | dbec0604c2d0b76d8a1ebf3fd8b64d4dd5d21708 | 63095792e900bbcc0e974fc242d69231ec73689a | refs/heads/master | 2020-08-12T14:18:07.203276 | 2019-10-13T09:00:11 | 2019-10-13T09:00:11 | 214,782,009 | 0 | 0 | Apache-2.0 | 2019-10-13T07:56:34 | 2019-10-13T07:56:34 | null | UTF-8 | Java | false | false | 918 | java | package com.alipay.api.response;
import java.util.List;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
import com.alipay.api.domain.ShopPromoInfo;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: koubei.marketing.mall.shoppromoinfo.query response.
*
* @author auto create
* @since 1.0, 2019-01-07 20:51:15
*/
public class KoubeiMarketingMallShoppromoinfoQueryResponse extends AlipayResponse {
private static final long serialVersionUID = 3246426675613355777L;
/**
* 店铺营销信息详情
*/
@ApiListField("shop_promo_infos")
@ApiField("shop_promo_info")
private List<ShopPromoInfo> shopPromoInfos;
public void setShopPromoInfos(List<ShopPromoInfo> shopPromoInfos) {
this.shopPromoInfos = shopPromoInfos;
}
public List<ShopPromoInfo> getShopPromoInfos( ) {
return this.shopPromoInfos;
}
}
| [
"[email protected]"
] | |
f88ddc23723ba2d1874c0d7b986a1c0c005053c8 | 7dfb1538fd074b79a0f6a62674d4979c7c55fd6d | /src/repl_it/Android.java | 49b1a59d436aff50220df1568094ca99c46c69c1 | [] | no_license | kutluduman/Java-Programming | 424a4ad92e14f2d4cc700c8a9352ff7408aa993f | d55b8a61ab3a654f954e33db1cb244e36bbcc7da | refs/heads/master | 2022-04-18T03:54:50.219846 | 2020-04-18T05:45:45 | 2020-04-18T05:45:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,353 | java | package repl_it;
import java.util.Scanner;
public class Android {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
double version = scanner.nextDouble();
if (version == 1.5 ) {
System.out.println("Cupcake ");
} else if (version == 1.6) {
System.out.println("Donut ");
} else if (version == 2.1) {
System.out.println("Eclair ");
} else if (version == 2.2) {
System.out.println("Froyo ");
} else if ( version == 2.3) {
System.out.println("Gingerbread ");
} else if ( version == 3.1 ) {
System.out.println("Honeycomb ");
} else if ( version == 4.0 ) {
System.out.println("Ice Cream Sandwich ");
} else if ( version>=4.1 && version<=4.31) {
System.out.println("Jelly Bean ");
} else if (version>=4.4 && version<=4.4) {
System.out.println("KitKat ");
} else if (version>=5.0 && version<=5.1) {
System.out.println("Lollipop ");
} else if (version>=8.0 && version<=8.1) {
System.out.println("Oreo");
} else if (version == 9.0) {
System.out.println("Pie ");
} else {
System.out.println("Sorry, I don't know this version! ");
}
}
} | [
"[email protected]"
] | |
e2dbde519915b364b5c9cba04d8ee40729e3d630 | 702375a246be24f8613cda292ff4423c0457fa94 | /LawyerProject/app/src/main/java/com/lawyer/android/adapter/MenuAdapter.java | 4969748170229d8e1f94d0470e5cc2b2c926d201 | [] | no_license | hczcgq/0825 | 7e47a805cdddf97763f604cfb46a2e3aedb120e6 | 329770b0c386764476a4c8f34edd4fb536c87852 | refs/heads/master | 2016-09-10T14:38:15.541270 | 2015-09-14T15:49:25 | 2015-09-14T15:49:25 | 41,426,600 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,183 | java | package com.lawyer.android.adapter;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.lawyer.android.R;
import com.lawyer.android.bean.MenuEntity;
import java.util.List;
/**
* Created by hm-soft on 2015/8/26.
*/
public class MenuAdapter extends BaseAdapterHelpter<MenuEntity>{
private Context context;
private List<MenuEntity> datas;
public MenuAdapter(Context context, List<MenuEntity> datas) {
super(context, datas);
this.context=context;
this.datas=datas;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolderHelper holder = ViewHolderHelper.get(context, convertView,
parent, R.layout.view_menu_item, position);
ImageView iconImageView=holder.getView(R.id.iconImageView);
TextView nameTextView=holder.getView(R.id.nameTextView);
MenuEntity item=datas.get(position);
iconImageView.setImageResource(item.getIcon());
nameTextView.setText(item.getName());
return holder.getConvertView();
}
}
| [
"[email protected]"
] | |
bbb0fd3cf3398e7ab6c2e8b3c75761ab8a627a94 | 5ef16fb742e57d55117de7f30586d67d74d531e4 | /NIO and Socket Programming/Spring Boot In Action/spring-boot-demo-21-1/src/main/java/com/roncoo/example/component/RoncooJmsComponent.java | 4a62ae532203678d0e60ef874ef67607aec9a390 | [] | no_license | frankdevhub/Coding-Laboratory | 58f7c146b44b46b04d0cc4b825938c2dc3f8dd6d | 651b4976a014368ab87e2cc4642096118e82d96b | refs/heads/master | 2022-04-10T19:12:26.880040 | 2020-03-26T18:57:02 | 2020-03-26T18:57:02 | 115,873,337 | 5 | 1 | null | null | null | null | UTF-8 | Java | false | false | 700 | java | package com.roncoo.example.component;
import javax.jms.Queue;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.annotation.JmsListener;
import org.springframework.jms.core.JmsMessagingTemplate;
import org.springframework.stereotype.Component;
/**
*
* @author wujing
*/
@Component
public class RoncooJmsComponent {
@Autowired
private JmsMessagingTemplate jmsMessagingTemplate;
@Autowired
private Queue queue;
public void send(String msg) {
this.jmsMessagingTemplate.convertAndSend(this.queue, msg);
}
@JmsListener(destination = "roncoo.queue")
public void receiveQueue(String text) {
System.out.println("接受到:" + text);
}
}
| [
"[email protected]"
] | |
b63585c13d750e7691a6b6588fb9c0e6406d2f15 | b648206752b73eb20db7b9c3a0c403927237041b | /java/SyncCases/app/src/main/java/com/example/olivermensah/synccases/SplashActivity.java | 24d3b62dc7fba03bf4b73bc14fab7aa3d4ce32d0 | [] | no_license | OliverMensahDev/Android | e22cbdea32f43bcb190437001dc75289104cbf75 | 84062e4b8fc4d9cad0246f5fb159f9bdfb7b05f3 | refs/heads/master | 2021-10-22T08:26:39.923971 | 2019-03-09T10:01:50 | 2019-03-09T10:01:50 | 135,918,934 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,382 | java | package com.example.olivermensah.synccases;
/**
* Created by olivermensah on 12/3/17.
*/
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
public class SplashActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash);
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
FirebaseUser currentUser = FirebaseAuth.getInstance().getCurrentUser();
if(currentUser != null){
Intent homeIntent = new Intent(SplashActivity.this, SignedInActivity.class);
finish();
startActivity(homeIntent);
}else{
Intent homeIntent = new Intent(SplashActivity.this, LoginActivity.class);
finish();
startActivity(homeIntent);
}
}
}, 3000);
}
// [START on_start_check_user]
@Override
public void onStart() {
super.onStart();
}
// [END on_start_check_user]
}
| [
"[email protected]"
] | |
765d2e1a5cbb65b926878835d54f1087e3bdf778 | d593ad37a82a6396effceaf11679e70fddcabc06 | /unLock/ch12/android/src/com/msi/manning/UnlockingAndroid/ShowJob.java | 8bce35c18c5165e84f27856fd792a84232cc8b78 | [] | no_license | psh667/android | 8a18ea22c8c977852ba2cd9361a8489586e06f05 | 8f7394de8e26ce5106d9828cf95eb1617afca757 | refs/heads/master | 2018-12-27T23:30:46.988404 | 2013-09-09T13:16:46 | 2013-09-09T13:16:46 | 12,700,292 | 3 | 5 | null | null | null | null | UTF-8 | Java | false | false | 5,316 | java | /*
* showjob.java Unlocking Android http://manning.com/ableson Author: W. F. Ableson
* [email protected]
*/
package com.msi.manning.UnlockingAndroid;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
public class ShowJob extends Activity {
Prefs myprefs = null;
JobEntry je = null;
final int CLOSEJOBTASK = 1;
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.showjob);
this.myprefs = new Prefs(getApplicationContext());
StringBuilder sb = new StringBuilder();
String details = null;
Intent startingIntent = getIntent();
if (startingIntent != null) {
Log.i("CH12::ShowJob", "starting intent not null");
Bundle b = startingIntent.getExtras();
if (b == null) {
Log.i("CH12::ShowJob", "bad bundle");
details = "bad bundle?";
} else {
this.je = JobEntry.fromBundle(b);
sb.append("Job Id: " + this.je.get_jobid() + " (" + this.je.get_status() + ")\n\n");
sb.append(this.je.get_customer() + "\n\n");
sb.append(this.je.get_address() + "\n" + this.je.get_city() + "," + this.je.get_state() + "\n");
sb.append("Product : " + this.je.get_product() + "\n\n");
sb.append("Comments: " + this.je.get_comments() + "\n\n");
details = sb.toString();
}
} else {
details = "Job Information Not Found.";
TextView tv = (TextView) findViewById(R.id.details);
tv.setText(details);
return;
}
TextView tv = (TextView) findViewById(R.id.details);
tv.setText(details);
Button bmap = (Button) findViewById(R.id.mapjob);
bmap.setOnClickListener(new Button.OnClickListener() {
public void onClick(View v) {
// clean up data for use in GEO query
String address = ShowJob.this.je.get_address() + " " + ShowJob.this.je.get_city() + " "
+ ShowJob.this.je.get_zip();
String cleanAddress = address.replace(",", "");
cleanAddress = cleanAddress.replace(' ', '+');
try {
Intent geoIntent = new Intent("android.intent.action.VIEW", android.net.Uri.parse("geo:0,0?q="
+ cleanAddress));
startActivity(geoIntent);
} catch (Exception ee) {
Log.d("CH12", "error launching map? " + ee.getMessage());
}
}
});
Button bproductinfo = (Button) findViewById(R.id.productinfo);
bproductinfo.setOnClickListener(new Button.OnClickListener() {
public void onClick(View v) {
try {
Intent productInfoIntent = new Intent("android.intent.action.VIEW", android.net.Uri
.parse(ShowJob.this.je.get_producturl()));
startActivity(productInfoIntent);
} catch (Exception ee) {
Log.d("CH12", "error launching product info? " + ee.getMessage());
}
}
});
Button bclose = (Button) findViewById(R.id.closejob);
if (this.je.get_status().equals("CLOSED")) {
bclose.setText("Job is Closed. View Signature");
}
bclose.setOnClickListener(new Button.OnClickListener() {
public void onClick(View v) {
if (ShowJob.this.je.get_status().equals("CLOSED")) {
Intent signatureIntent = new Intent("android.intent.action.VIEW", android.net.Uri
.parse(ShowJob.this.myprefs.getServer() + "sigs/" + ShowJob.this.je.get_jobid() + ".jpg"));
startActivity(signatureIntent);
} else {
Intent closeJobIntent = new Intent(ShowJob.this, CloseJob.class);
Bundle b = ShowJob.this.je.toBundle();
closeJobIntent.putExtras(b);
// closeJobIntent.putExtra("android.intent.extra.INTENT", b);
startActivityForResult(closeJobIntent, ShowJob.this.CLOSEJOBTASK);
}
}
});
Log.d("CH12", "Job status is :" + this.je.get_status());
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
switch (requestCode) {
case CLOSEJOBTASK:
if (resultCode == 1) {
Log.d("CH12", "Good Close!");
// propagate this up to the list activity
Intent resultIntent = new Intent();
resultIntent.putExtras(data.getExtras());
this.setResult(1, resultIntent);
// leave this activity
finish();
}
break;
}
}
}
| [
"[email protected]"
] | |
57305ba8d78bef87eacb1a72170a2930191a9b03 | ba39bfacdd72261fb15d6dc6b93c69e0ff0562f3 | /src/gwt/dojo/mobile/client/Pane.java | b99fc4b9bc14148b26e033f69c4d373a871a971a | [
"AFL-3.0",
"BSD-3-Clause",
"AFL-2.1",
"Apache-2.0"
] | permissive | andrescabrera/gwt-dojo-toolkit | 4cf0f7bf3061f1f1248dec731aca8d6fd91ac8dc | 4faf915c62871b2267a49ce0cd703dd98d986644 | refs/heads/master | 2020-05-30T03:49:29.199573 | 2013-06-17T10:57:52 | 2013-06-17T10:57:52 | 40,503,638 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 705 | java | package gwt.dojo.mobile.client;
import gwt.dojo.dijit.client.IContained;
import gwt.dojo.dijit.client._WidgetBase;
/**
* A simple pane widget.
* <p>
* Pane is a simple general-purpose pane widget. It is a widget, but can be
* regarded as a imple {@code <div>} element.
* <p>
* {@code baseClass='mblPane'}
*/
public class Pane extends _WidgetBase implements IContained {
public static final String MODULE = "dojox/mobile/Pane";
/**
* Not directly instantiable.
* <p>
* All subclasses must also define a protected, empty, no-arg constructor.
*/
protected Pane() {
}
/**
* Calls resize() of each child widget.
*/
public final native void resize() /*-{
this.resize();
}-*/;
}
| [
"[email protected]"
] | |
493ded3c2baf7ee6eabd890014648067295e6894 | c1f3b8bbd97585c32187a33e27115aa0c547d35f | /src/main/java/net/fabricmc/loader/transformer/PublicAccessTransformer.java | 9f6795229d5c4c28318d52856ebc30bfdd9db333 | [
"Apache-2.0"
] | permissive | asiekierka/fabric-loader | 8624f6933a6d8934ca8664ca4619a6f6398824f9 | 16d4470208e14c16202530efc46e429e75527cfa | refs/heads/master | 2020-04-11T15:40:22.473017 | 2018-12-14T20:04:25 | 2018-12-14T20:04:25 | 161,899,113 | 0 | 0 | null | 2018-12-15T11:40:14 | 2018-12-15T11:40:14 | null | UTF-8 | Java | false | false | 2,544 | java | /*
* Copyright 2016 FabricMC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.fabricmc.loader.transformer;
import net.minecraft.launchwrapper.IClassTransformer;
import org.objectweb.asm.*;
public final class PublicAccessTransformer implements IClassTransformer {
private static final int modAccess(int access) {
if ((access & 0x7) != Opcodes.ACC_PRIVATE) {
return (access & (~0x7)) | Opcodes.ACC_PUBLIC;
} else {
return access;
}
}
static class AccessClassVisitor extends ClassVisitor {
public AccessClassVisitor(int api, ClassVisitor classVisitor) {
super(api, classVisitor);
}
@Override
public void visit(
final int version,
final int access,
final String name,
final String signature,
final String superName,
final String[] interfaces) {
super.visit(version, modAccess(access), name, signature, superName, interfaces);
}
@Override
public void visitInnerClass(
final String name, final String outerName, final String innerName, final int access) {
super.visitInnerClass(name, outerName, innerName, modAccess(access));
}
@Override
public FieldVisitor visitField(
final int access,
final String name,
final String descriptor,
final String signature,
final Object value) {
return super.visitField(modAccess(access), name, descriptor, signature, value);
}
@Override
public MethodVisitor visitMethod(
final int access,
final String name,
final String descriptor,
final String signature,
final String[] exceptions) {
return super.visitMethod(modAccess(access), name, descriptor, signature, exceptions);
}
}
@Override
public byte[] transform(String name, String transformedName, byte[] bytes) {
if (!name.startsWith("net.minecraft") && name.indexOf('.') >= 0) {
return bytes;
}
ClassReader classReader = new ClassReader(bytes);
ClassWriter classWriter = new ClassWriter(0);
classReader.accept(new AccessClassVisitor(Opcodes.ASM7, classWriter), 0);
return classWriter.toByteArray();
}
}
| [
"[email protected]"
] | |
53e6d4fc5dcb23ea5e16ab18216efe8dcc1f4b04 | bceba483c2d1831f0262931b7fc72d5c75954e18 | /src/qubed/corelogicextensions/PLATTEDLANDSEXTENSION.java | 1305546e50ce1f604afb84e4e47173d23b52f3db | [] | no_license | Nigel-Qubed/credit-services | 6e2acfdb936ab831a986fabeb6cefa74f03c672c | 21402c6d4328c93387fd8baf0efd8972442d2174 | refs/heads/master | 2022-12-01T02:36:57.495363 | 2020-08-10T17:26:07 | 2020-08-10T17:26:07 | 285,552,565 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,466 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2020.08.05 at 04:53:09 AM CAT
//
package qubed.corelogicextensions;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for PLATTED_LANDS_EXTENSION complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="PLATTED_LANDS_EXTENSION">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="MISMO" type="{http://www.mismo.org/residential/2009/schemas}MISMO_BASE" minOccurs="0"/>
* <element name="OTHER" type="{http://www.mismo.org/residential/2009/schemas}OTHER_BASE" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "PLATTED_LANDS_EXTENSION", propOrder = {
"mismo",
"other"
})
public class PLATTEDLANDSEXTENSION {
@XmlElement(name = "MISMO")
protected MISMOBASE mismo;
@XmlElement(name = "OTHER")
protected OTHERBASE other;
/**
* Gets the value of the mismo property.
*
* @return
* possible object is
* {@link MISMOBASE }
*
*/
public MISMOBASE getMISMO() {
return mismo;
}
/**
* Sets the value of the mismo property.
*
* @param value
* allowed object is
* {@link MISMOBASE }
*
*/
public void setMISMO(MISMOBASE value) {
this.mismo = value;
}
/**
* Gets the value of the other property.
*
* @return
* possible object is
* {@link OTHERBASE }
*
*/
public OTHERBASE getOTHER() {
return other;
}
/**
* Sets the value of the other property.
*
* @param value
* allowed object is
* {@link OTHERBASE }
*
*/
public void setOTHER(OTHERBASE value) {
this.other = value;
}
}
| [
"[email protected]"
] | |
4bf1093498516df58ff768568138884ce1f09c10 | 9eebccee9ec3211e98aa85f0b66ac8af3acf8309 | /Netty/code/parent/socket-server/src/main/java/wr1ttenyu/study/netty/timeserver/aio/demo/AIOTimeServer.java | 9ea5bc7741f08d1a3f5f69a243ce293637cd619d | [] | no_license | wr1ttenyu/study-record | db441d14a931acbe220910379d635f3bd0534fa0 | b709a5e445e8fd61c74e8120971763d3a223c25a | refs/heads/master | 2020-03-16T13:13:16.578607 | 2019-02-23T02:37:52 | 2019-02-23T02:37:52 | 132,684,034 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 559 | java | package wr1ttenyu.study.netty.timeserver.aio.demo;
public class AIOTimeServer {
public static void main(String[] args) {
int port = 8080;
if (args != null && args.length > 0) {
try {
port = Integer.valueOf(args[0]);
} catch (NumberFormatException e) {
// 采用默认值
}
}
AsyncTimeServerHandler asyncTimeServerHandler = new AsyncTimeServerHandler(port);
new Thread(asyncTimeServerHandler, "AIO-AsyncTimeServerHandler-001").start();
}
}
| [
"[email protected]"
] | |
adf5699e26b187cfe5235961272593e1b8f0e440 | f6899a2cf1c10a724632bbb2ccffb7283c77a5ff | /glassfish-4.1.1/appserver/web/admin/src/main/java/org/glassfish/web/admin/monitor/statistics/AltServletStatsImpl.java | e18fcad964f61e19c0994f219bdd31fca79572d9 | [] | 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 | 5,325 | java | /*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 1997-2013 Oracle and/or its affiliates. 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_1_1.html
* or packager/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 packager/legal/LICENSE.txt.
*
* GPL Classpath Exception:
* Oracle designates this particular file as subject to the "Classpath"
* exception as provided by Oracle in the GPL Version 2 section of the License
* file that accompanied this code.
*
* Modifications:
* If applicable, add the following below the License Header, with the fields
* enclosed by brackets [] replaced by your own identifying information:
* "Portions Copyright [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 org.glassfish.web.admin.monitor.statistics;
import org.glassfish.web.admin.monitor.HttpServiceStatsProviderBootstrap;
import org.jvnet.hk2.annotations.Service;
import org.glassfish.hk2.api.PerLookup;
import javax.inject.Inject;
import org.glassfish.api.ActionReport;
import org.glassfish.api.ActionReport.ExitCode;
import org.glassfish.external.statistics.CountStatistic;
import org.glassfish.external.statistics.RangeStatistic;
import org.glassfish.admin.monitor.cli.MonitorContract;
import org.glassfish.flashlight.datatree.TreeNode;
import org.glassfish.flashlight.MonitoringRuntimeDataRegistry;
import java.util.List;
import java.util.ResourceBundle;
@Service
@PerLookup
public class AltServletStatsImpl implements MonitorContract {
private static final ResourceBundle rb = HttpServiceStatsProviderBootstrap.rb;
@Inject
private MonitoringRuntimeDataRegistry mrdr;
private final static String name = "servlet";
private final static String displayFormat = "%1$-10s %2$-10s %3$-10s";
public String getName() {
return name;
}
public ActionReport process(final ActionReport report, final String filter) {
if (mrdr == null) {
report.setActionExitCode(ActionReport.ExitCode.FAILURE);
report.setMessage(rb.getString(HTTPListenerStatsImpl.MRDR_NULL));
return report;
}
TreeNode serverNode = mrdr.get("server");
if (serverNode == null) {
report.setActionExitCode(ActionReport.ExitCode.FAILURE);
report.setMessage(rb.getString(HTTPListenerStatsImpl.MRDR_NULL));
return report;
}
String [] patternArr = new String [] {"server.web.servlet.*"};
long activeServletsLoadedCount = 0;
long maxServletsLoadedCount = 0;
long totalServletsLoadedCount = 0;
for (String pattern : patternArr) {
List<TreeNode> tnL = serverNode.getNodes(pattern);
for (TreeNode tn : tnL) {
if (tn.hasChildNodes()) {
continue;
}
if ("activeservletsloadedcount".equals(tn.getName())) {
activeServletsLoadedCount = getRangeStatisticValue(tn.getValue());
} else if ("maxservletsloadedcount".equals(tn.getName())) {
maxServletsLoadedCount = getCountStatisticValue(tn.getValue());
} else if ("totalservletsloadedcount".equals(tn.getName())) {
totalServletsLoadedCount = getCountStatisticValue(tn.getValue());
}
}
}
report.setMessage(String.format(displayFormat,
activeServletsLoadedCount, maxServletsLoadedCount,
totalServletsLoadedCount));
report.setActionExitCode(ExitCode.SUCCESS);
return report;
}
private long getCountStatisticValue(Object obj) {
long l = 0L;
if (obj == null) return l;
if (obj instanceof CountStatistic) {
return ((CountStatistic)obj).getCount();
}
return l;
}
private long getRangeStatisticValue(Object obj) {
long l = 0L;
if (obj == null) return l;
if (obj instanceof RangeStatistic) {
return ((RangeStatistic)obj).getCurrent();
}
return l;
}
}
| [
"[email protected]"
] | |
a984cbefe749b6440dac15ac6b5e53b0a2b730e4 | d49e3ff34467c71630681df5a791cb3e4bd72ab7 | /src/com/adobe/primetime/core/radio/CommandQueue$1.java | 5c7e2a984059b72afa1950620a3f8af9292b0ed4 | [] | no_license | reverseengineeringer/com.gogoair.ife | 124691cf49e832f5dd8009ceb590894a7a058dfa | e88a26eec5640274844e6cdafcd706be727e8ae3 | refs/heads/master | 2020-09-15T19:45:27.094286 | 2016-09-01T13:32:34 | 2016-09-01T13:32:34 | 67,133,682 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 506 | java | package com.adobe.primetime.core.radio;
import com.adobe.primetime.core.ICallback;
class CommandQueue$1
implements ICallback
{
CommandQueue$1(CommandQueue paramCommandQueue) {}
public Object call(Object paramObject)
{
if (CommandQueue.access$000(this$0)) {
return null;
}
CommandQueue.access$100(this$0);
return null;
}
}
/* Location:
* Qualified Name: com.adobe.primetime.core.radio.CommandQueue.1
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"[email protected]"
] | |
d4ba67f276229f76d9e2a763e4cf946cdd9274b1 | 6dbae30c806f661bcdcbc5f5f6a366ad702b1eea | /Corpus/eclipse.jdt.ui/3550.java | f38c3739da0fd733cfba7bdc8c6c47c735075246 | [
"MIT"
] | permissive | SurfGitHub/BLIZZARD-Replication-Package-ESEC-FSE2018 | d3fd21745dfddb2979e8ac262588cfdfe471899f | 0f8f4affd0ce1ecaa8ff8f487426f8edd6ad02c0 | refs/heads/master | 2020-03-31T15:52:01.005505 | 2018-10-01T23:38:50 | 2018-10-01T23:38:50 | 152,354,327 | 1 | 0 | MIT | 2018-10-10T02:57:02 | 2018-10-10T02:57:02 | null | UTF-8 | Java | false | false | 139 | java | package locals_in;
public class A_test504 {
public void foo() {
int x = 10;
/*[*/
/*]*/
--x;
}
}
| [
"[email protected]"
] | |
e63ed02b3e6c8678a597946a6eb1e765cef4d761 | 40d844c1c780cf3618979626282cf59be833907f | /src/testcases/CWE369_Divide_by_Zero/s02/CWE369_Divide_by_Zero__float_zero_divide_02.java | 82595ad466479f62b80fb1622b170e8498b1863b | [] | no_license | rubengomez97/juliet | f9566de7be198921113658f904b521b6bca4d262 | 13debb7a1cc801977b9371b8cc1a313cd1de3a0e | refs/heads/master | 2023-06-02T00:37:24.532638 | 2021-06-23T17:22:22 | 2021-06-23T17:22:22 | 379,676,259 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,214 | java | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE369_Divide_by_Zero__float_zero_divide_02.java
Label Definition File: CWE369_Divide_by_Zero__float.label.xml
Template File: sources-sinks-02.tmpl.java
*/
/*
* @description
* CWE: 369 Divide by zero
* BadSource: zero Set data to a hardcoded value of zero
* GoodSource: A hardcoded non-zero number (two)
* Sinks: divide
* GoodSink: Check for zero before dividing
* BadSink : Dividing by a value that may be zero
* Flow Variant: 02 Control flow: if(true) and if(false)
*
* */
package testcases.CWE369_Divide_by_Zero.s02;
import testcasesupport.*;
public class CWE369_Divide_by_Zero__float_zero_divide_02 extends AbstractTestCase
{
public void bad() throws Throwable
{
float data;
if (true)
{
data = 0.0f; /* POTENTIAL FLAW: data is set to zero */
}
else
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run
* but ensure data is inititialized before the Sink to avoid compiler errors */
data = 0.0f;
}
if (true)
{
/* POTENTIAL FLAW: Possibly divide by zero */
int result = (int)(100.0 / data);
IO.writeLine(result);
}
}
/* goodG2B1() - use goodsource and badsink by changing first true to false */
private void goodG2B1() throws Throwable
{
float data;
if (false)
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run
* but ensure data is inititialized before the Sink to avoid compiler errors */
data = 0.0f;
}
else
{
/* FIX: Use a hardcoded number that won't a divide by zero */
data = 2.0f;
}
if (true)
{
/* POTENTIAL FLAW: Possibly divide by zero */
int result = (int)(100.0 / data);
IO.writeLine(result);
}
}
/* goodG2B2() - use goodsource and badsink by reversing statements in first if */
private void goodG2B2() throws Throwable
{
float data;
if (true)
{
/* FIX: Use a hardcoded number that won't a divide by zero */
data = 2.0f;
}
else
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run
* but ensure data is inititialized before the Sink to avoid compiler errors */
data = 0.0f;
}
if (true)
{
/* POTENTIAL FLAW: Possibly divide by zero */
int result = (int)(100.0 / data);
IO.writeLine(result);
}
}
/* goodB2G1() - use badsource and goodsink by changing second true to false */
private void goodB2G1() throws Throwable
{
float data;
if (true)
{
data = 0.0f; /* POTENTIAL FLAW: data is set to zero */
}
else
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run
* but ensure data is inititialized before the Sink to avoid compiler errors */
data = 0.0f;
}
if (false)
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
IO.writeLine("Benign, fixed string");
}
else
{
/* FIX: Check for value of or near zero before dividing */
if (Math.abs(data) > 0.000001)
{
int result = (int)(100.0 / data);
IO.writeLine(result);
}
else
{
IO.writeLine("This would result in a divide by zero");
}
}
}
/* goodB2G2() - use badsource and goodsink by reversing statements in second if */
private void goodB2G2() throws Throwable
{
float data;
if (true)
{
data = 0.0f; /* POTENTIAL FLAW: data is set to zero */
}
else
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run
* but ensure data is inititialized before the Sink to avoid compiler errors */
data = 0.0f;
}
if (true)
{
/* FIX: Check for value of or near zero before dividing */
if (Math.abs(data) > 0.000001)
{
int result = (int)(100.0 / data);
IO.writeLine(result);
}
else
{
IO.writeLine("This would result in a divide by zero");
}
}
}
public void good() throws Throwable
{
goodG2B1();
goodG2B2();
goodB2G1();
goodB2G2();
}
/* Below is the main(). It is only used when building this testcase on
* its own for testing or for building a binary to use in testing binary
* analysis tools. It is not used when compiling all the testcases as one
* application, which is how source code analysis tools are tested.
*/
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
| [
"[email protected]"
] | |
f5ba8d305eeb2bd7a3d047f7d808630e1d65313e | c16b8990ec3c297ac36aecabb662a6ce124dd940 | /base/src/org/openXpertya/model/X_C_CashBook.java | 45f9f5d70275f9733f9df640339caa3acca810d3 | [] | no_license | Lucas128/libertya | 6decae77481ba0756a9a14998824f163001f4b7c | d2e8877a0342af5796c74809edabf726b9ff50dc | refs/heads/master | 2021-01-10T16:52:41.332435 | 2015-05-26T19:34:39 | 2015-05-26T19:34:39 | 36,461,214 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,553 | java | /** Modelo Generado - NO CAMBIAR MANUALMENTE - Disytel */
package org.openXpertya.model;
import java.util.*;
import java.sql.*;
import java.math.*;
import org.openXpertya.util.*;
/** Modelo Generado por C_CashBook
* @author Comunidad de Desarrollo Libertya* *Basado en Codigo Original Modificado, Revisado y Optimizado de:* * Jorg Janke
* @version - 2010-11-10 15:32:20.281 */
public class X_C_CashBook extends org.openXpertya.model.PO
{
/** Constructor estándar */
public X_C_CashBook (Properties ctx, int C_CashBook_ID, String trxName)
{
super (ctx, C_CashBook_ID, trxName);
/** if (C_CashBook_ID == 0)
{
setCashBookType (null); // 'G'
setC_CashBook_ID (0);
setC_Currency_ID (0); // SQL=SELECT cb.C_Currency_ID FROM C_CashBook cb INNER JOIN C_Cash c ON (cb.C_CashBook_ID=c.C_CashBook_ID) WHERE c.C_Cash_ID=@C_Cash_ID@
setIsDefault (false);
setName (null);
}
*/
}
/** Load Constructor */
public X_C_CashBook (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AD_Table_ID */
public static final int Table_ID = M_Table.getTableID("C_CashBook");
/** TableName=C_CashBook */
public static final String Table_Name="C_CashBook";
protected static KeyNamePair Model = new KeyNamePair(Table_ID,"C_CashBook");
protected static BigDecimal AccessLevel = new BigDecimal(3);
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID);
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_C_CashBook[").append(getID()).append("]");
return sb.toString();
}
public static final int CASHBOOKTYPE_AD_Reference_ID = MReference.getReferenceID("C_CashBook Type");
/** General Cash Book = G */
public static final String CASHBOOKTYPE_GeneralCashBook = "G";
/** Journal Cash Book = J */
public static final String CASHBOOKTYPE_JournalCashBook = "J";
/** Set Cash Book Type.
Cash Book Type */
public void setCashBookType (String CashBookType)
{
if (CashBookType.equals("G") || CashBookType.equals("J"));
else throw new IllegalArgumentException ("CashBookType Invalid value - Reference = CASHBOOKTYPE_AD_Reference_ID - G - J");
if (CashBookType == null) throw new IllegalArgumentException ("CashBookType is mandatory");
if (CashBookType.length() > 1)
{
log.warning("Length > 1 - truncated");
CashBookType = CashBookType.substring(0,1);
}
set_ValueNoCheck ("CashBookType", CashBookType);
}
/** Get Cash Book Type.
Cash Book Type */
public String getCashBookType()
{
return (String)get_Value("CashBookType");
}
/** Set Cash Book.
Cash Book for recording petty cash transactions */
public void setC_CashBook_ID (int C_CashBook_ID)
{
set_ValueNoCheck ("C_CashBook_ID", new Integer(C_CashBook_ID));
}
/** Get Cash Book.
Cash Book for recording petty cash transactions */
public int getC_CashBook_ID()
{
Integer ii = (Integer)get_Value("C_CashBook_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Currency.
The Currency for this record */
public void setC_Currency_ID (int C_Currency_ID)
{
set_Value ("C_Currency_ID", new Integer(C_Currency_ID));
}
/** Get Currency.
The Currency for this record */
public int getC_Currency_ID()
{
Integer ii = (Integer)get_Value("C_Currency_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Description.
Optional short description of the record */
public void setDescription (String Description)
{
if (Description != null && Description.length() > 255)
{
log.warning("Length > 255 - truncated");
Description = Description.substring(0,255);
}
set_Value ("Description", Description);
}
/** Get Description.
Optional short description of the record */
public String getDescription()
{
return (String)get_Value("Description");
}
/** Set Default.
Default value */
public void setIsDefault (boolean IsDefault)
{
set_Value ("IsDefault", new Boolean(IsDefault));
}
/** Get Default.
Default value */
public boolean isDefault()
{
Object oo = get_Value("IsDefault");
if (oo != null)
{
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Name.
Alphanumeric identifier of the entity */
public void setName (String Name)
{
if (Name == null) throw new IllegalArgumentException ("Name is mandatory");
if (Name.length() > 60)
{
log.warning("Length > 60 - truncated");
Name = Name.substring(0,60);
}
set_Value ("Name", Name);
}
/** Get Name.
Alphanumeric identifier of the entity */
public String getName()
{
return (String)get_Value("Name");
}
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(getID(), getName());
}
}
| [
"[email protected]"
] | |
c6104ada7400c5ca134dc96e5c6ddaf692aa12bb | b6e0056e358aa4068b5d485030e2116400099ca5 | /practice_chap30(Generics)/src/sec02_exam_generic_type/copy/Box.java | 10e5261b20d878a8807667632d29b194d6ca9947 | [] | no_license | harrycjy1/java-bootcamp | f0c90dfaefa8639e26110caf514c8997ce0122c8 | 32c580e14c9184045a73c5b34199a53e76571c03 | refs/heads/master | 2020-04-02T21:04:39.948115 | 2018-10-26T06:31:02 | 2018-10-26T06:31:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 224 | java | package sec02_exam_generic_type.copy;
public class Box<T> {
private T t;
//setter
public void set(T t) {
this.t= t;
}
//getter
public T get() {
return this.t;
}
}
| [
"[email protected]"
] | |
188d392a57604843a20c2fb990a1440623c25fb8 | 5a8efd1d145f7de345d9a119605771b50624bdcc | /ch07-mocks/src/main/java/com/manning/junitbook/ch07/mocks/account/DefaultAccountManager2.java | fa4b203e7f6fd26bb141b4a1e2d04eb4bbd2f205 | [] | no_license | a0248327/JUnit | f25909305bf5beab28d75887df54716e8364c3d1 | ed283acb43c445c03b80c6ab394b3440622674d4 | refs/heads/master | 2020-05-18T12:42:10.176913 | 2015-02-25T13:35:50 | 2015-02-25T13:35:50 | 31,142,296 | 0 | 0 | null | null | null | null | WINDOWS-1252 | Java | false | false | 2,659 | java | /*
* ========================================================================
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* ========================================================================
*/
package com.manning.junitbook.ch07.mocks.account;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.manning.junitbook.ch07.mocks.configurations.Configuration;
import com.manning.junitbook.ch07.mocks.configurations.DefaultConfiguration;
/**
* Refactored architecture. We now pass the Configuration and Log objects to the
* constructor and use them for our own logic.
*
* @version $Id: DefaultAccountManager2.java 508 2009-08-16 18:05:18Z paranoid12
* $
*/
public class DefaultAccountManager2 implements AccountManager {
/**
* Logger instance.
*/
private Log logger;
/**
* Configuration to use.
*/
private Configuration configuration;
/**
* Constructor with no parameters.
*/
public DefaultAccountManager2() {
this(LogFactory.getLog(DefaultAccountManager2.class), new DefaultConfiguration("technical"));
}
/**
* Constructor with logger and configration parameters.
*
* @param logger
* @param configuration
*/
public DefaultAccountManager2(Log logger, Configuration configuration) {
this.logger = logger;
this.configuration = configuration;
}
/**
* Finds an account for user with the given userID.
*
* @param
*/
public Account findAccountForUser(String userId) {
this.logger.debug("Getting account for user [" + userId + "]");
this.configuration.getSQL("FIND_ACCOUNT_FOR_USER");
// Some code logic to load a user account using JDBC
// […]
return null;
}
/**
* Updates the given account.
*/
public void updateAccount(Account account) {
// Perform database access here
}
}
| [
"[email protected]"
] | |
58f61d27f1249ad16e8ab262148e8a1af6f2d38a | 39bef83f3a903f49344b907870feb10a3302e6e4 | /Android Studio Projects/bf.io.openshop/src/android/support/v7/widget/ListPopupWindow$ForwardingListener$DisallowIntercept.java | 82f62e751d2f816642e074c62c8613204c6b80cc | [] | no_license | Killaker/Android | 456acf38bc79030aff7610f5b7f5c1334a49f334 | 52a1a709a80778ec11b42dfe9dc1a4e755593812 | refs/heads/master | 2021-08-19T06:20:26.551947 | 2017-11-24T22:27:19 | 2017-11-24T22:27:19 | 111,960,738 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 253 | java | package android.support.v7.widget;
private class DisallowIntercept implements Runnable
{
@Override
public void run() {
ForwardingListener.access$900(ForwardingListener.this).getParent().requestDisallowInterceptTouchEvent(true);
}
}
| [
"[email protected]"
] | |
d5cd3ba3b84cd6d3b24357f287df1b8e3dded9b0 | 3029337aae2416423c26ba45ed1d273a8e27f4f3 | /api/src/main/java/com/honeybeedev/exclusiveprison/api/util/Clearable.java | b90e53563454542f78b6efe4c3be238e9073fc01 | [] | no_license | OOP-778/exclusive-prison | 083c390842a1e572145038383e34fecf7a3f5080 | cf159c0e1b53c24c21d395949b2a85978559e307 | refs/heads/master | 2023-03-01T15:14:58.615642 | 2021-02-05T09:47:00 | 2021-02-05T09:47:00 | 326,151,438 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 877 | java | package com.honeybeedev.exclusiveprison.api.util;
import java.util.function.Consumer;
import java.util.function.Function;
public class Clearable<T> {
protected T object;
public Clearable(T object) {
this.object = object;
}
public void clear() {
object = null;
}
public T get() {
return object;
}
public void set(T object) {
this.object = object;
}
public void ifPresent(Consumer<T> consumer) {
if (object != null)
consumer.accept(object);
}
public void consumeAndClear(Consumer<T> consumer) {
if (object != null) {
consumer.accept(object);
object = null;
}
}
public <O> O produce(Function<T, O> function) {
if (object != null) {
return function.apply(object);
}
return null;
}
}
| [
"[email protected]"
] | |
636278f27ca36262bec234f3bf2eb0fb8d5630a6 | 146a30bee123722b5b32c0022c280bbe7d9b6850 | /depsWorkSpace/bc-java-master/pg/src/main/java/org/mightyfish/openpgp/operator/bc/BcPGPContentVerifierBuilderProvider.java | 481e05bbb81c69b3b81c66dcbb0585e24e5aefb0 | [
"LicenseRef-scancode-warranty-disclaimer",
"MIT"
] | permissive | GLC-Project/java-experiment | 1d5aa7b9974c8ae572970ce6a8280e6a65417837 | b03b224b8d5028dd578ca0e7df85d7d09a26688e | refs/heads/master | 2020-12-23T23:47:57.341646 | 2016-02-13T16:20:45 | 2016-02-13T16:20:45 | 237,313,620 | 0 | 1 | null | 2020-01-30T21:56:54 | 2020-01-30T21:56:53 | null | UTF-8 | Java | false | false | 2,233 | java | package org.mightyfish.openpgp.operator.bc;
import java.io.OutputStream;
import org.mightyfish.crypto.Signer;
import org.mightyfish.openpgp.PGPException;
import org.mightyfish.openpgp.PGPPublicKey;
import org.mightyfish.openpgp.operator.PGPContentVerifier;
import org.mightyfish.openpgp.operator.PGPContentVerifierBuilder;
import org.mightyfish.openpgp.operator.PGPContentVerifierBuilderProvider;
public class BcPGPContentVerifierBuilderProvider
implements PGPContentVerifierBuilderProvider
{
private BcPGPKeyConverter keyConverter = new BcPGPKeyConverter();
public BcPGPContentVerifierBuilderProvider()
{
}
public PGPContentVerifierBuilder get(int keyAlgorithm, int hashAlgorithm)
throws PGPException
{
return new BcPGPContentVerifierBuilder(keyAlgorithm, hashAlgorithm);
}
private class BcPGPContentVerifierBuilder
implements PGPContentVerifierBuilder
{
private int hashAlgorithm;
private int keyAlgorithm;
public BcPGPContentVerifierBuilder(int keyAlgorithm, int hashAlgorithm)
{
this.keyAlgorithm = keyAlgorithm;
this.hashAlgorithm = hashAlgorithm;
}
public PGPContentVerifier build(final PGPPublicKey publicKey)
throws PGPException
{
final Signer signer = BcImplProvider.createSigner(keyAlgorithm, hashAlgorithm);
signer.init(false, keyConverter.getPublicKey(publicKey));
return new PGPContentVerifier()
{
public int getHashAlgorithm()
{
return hashAlgorithm;
}
public int getKeyAlgorithm()
{
return keyAlgorithm;
}
public long getKeyID()
{
return publicKey.getKeyID();
}
public boolean verify(byte[] expected)
{
return signer.verifySignature(expected);
}
public OutputStream getOutputStream()
{
return new SignerOutputStream(signer);
}
};
}
}
}
| [
"[email protected]"
] | |
0d284cad7eb10d14505f54666663996d360929af | 5ec06dab1409d790496ce082dacb321392b32fe9 | /clients/java-msf4j/generated/src/gen/java/org/openapitools/model/ComAdobeGraniteRepositoryHcImplDefaultAccessUserProfileHealthCheProperties.java | 4a308d8883d80c70573d5aaa4c8421f5d39918f0 | [
"Apache-2.0"
] | permissive | shinesolutions/swagger-aem-osgi | e9d2385f44bee70e5bbdc0d577e99a9f2525266f | c2f6e076971d2592c1cbd3f70695c679e807396b | refs/heads/master | 2022-10-29T13:07:40.422092 | 2021-04-09T07:46:03 | 2021-04-09T07:46:03 | 190,217,155 | 3 | 3 | Apache-2.0 | 2022-10-05T03:26:20 | 2019-06-04T14:23:28 | null | UTF-8 | Java | false | false | 2,337 | java | package org.openapitools.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.model.ConfigNodePropertyArray;
/**
* ComAdobeGraniteRepositoryHcImplDefaultAccessUserProfileHealthCheProperties
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaMSF4JServerCodegen", date = "2019-08-05T00:54:29.762Z[GMT]")
public class ComAdobeGraniteRepositoryHcImplDefaultAccessUserProfileHealthCheProperties {
@JsonProperty("hc.tags")
private ConfigNodePropertyArray hcTags = null;
public ComAdobeGraniteRepositoryHcImplDefaultAccessUserProfileHealthCheProperties hcTags(ConfigNodePropertyArray hcTags) {
this.hcTags = hcTags;
return this;
}
/**
* Get hcTags
* @return hcTags
**/
@ApiModelProperty(value = "")
public ConfigNodePropertyArray getHcTags() {
return hcTags;
}
public void setHcTags(ConfigNodePropertyArray hcTags) {
this.hcTags = hcTags;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ComAdobeGraniteRepositoryHcImplDefaultAccessUserProfileHealthCheProperties comAdobeGraniteRepositoryHcImplDefaultAccessUserProfileHealthCheProperties = (ComAdobeGraniteRepositoryHcImplDefaultAccessUserProfileHealthCheProperties) o;
return Objects.equals(this.hcTags, comAdobeGraniteRepositoryHcImplDefaultAccessUserProfileHealthCheProperties.hcTags);
}
@Override
public int hashCode() {
return Objects.hash(hcTags);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ComAdobeGraniteRepositoryHcImplDefaultAccessUserProfileHealthCheProperties {\n");
sb.append(" hcTags: ").append(toIndentedString(hcTags)).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 ");
}
}
| [
"[email protected]"
] | |
ca038d6cbf9b90908e8a89a7ac357f01b7734daa | c9f808b3316a96a4d0a1555a36d6ec47ccb8fd9b | /src/com/javahis/ui/sys/SysFeeExaSheetQuote.java | 6b840877ccce9139bb2bdeb2dde305ee7de22864 | [] | no_license | levonyang/proper-his | f4c19b4ce46b213bf637be8e18bffa3758c64ecd | 2fdcb956b0c61e8be35e056d52a97d4890cbea3f | refs/heads/master | 2022-01-05T09:17:14.716629 | 2018-04-08T01:04:21 | 2018-04-08T01:04:21 | null | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 4,366 | java | package com.javahis.ui.sys;
import jdo.sys.SYSRuleTool;
import com.dongyang.control.TControl;
import com.dongyang.data.TParm;
import com.dongyang.jdo.TJDODBTool;
import com.dongyang.ui.TTable;
import com.dongyang.util.RunClass;
import com.dongyang.util.TypeTool;
/**
*
* <p>Title: 引用表单控制类</p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2008</p>
*
* <p>Company: JavaHis</p>
*
* @author ehui 2009.05.11
* @version 1.0
*/
public class SysFeeExaSheetQuote extends TControl {
TTable table;
Object main;
/**
* 初始化
*/
public void onInit() {
super.onInit();
getInitParameter();
initTable();
}
/**
* 初始化TABLE
*/
public void initTable(){
TParm t0=SYSRuleTool.getExaRoot();
String tCode=t0.getValue("CATEGORY_CODE",0);
TParm t1=SYSRuleTool.getExaMid(tCode);
table=(TTable)this.getComponent("MENU");
table.setParmValue(t1);
int count=t1.getCount();
String[] names=t1.getNames();
TParm t2=new TParm();
for(int i=0;i<count;i++){
TParm temp=SYSRuleTool.getExaDetail(t1.getValue("CATEGORY_CODE",i));
int countTemp=temp.getCount();
for(int k=0;k<countTemp;k++){
for(int j=0;j<names.length;j++){
t2.addData(names[j], temp.getValue(names[j],k));
}
}
}
table.setParmValue(t2);
}
/**
* 行点击事件
*/
public void onClick(){
int row=table.getSelectedRow();
TParm tableParm=table.getParmValue();
String code="'"+tableParm.getValue("CATEGORY_CODE",row)+"%'";
TParm sysFee=this.queryExa(code);
int count=sysFee.getCount();
TParm parm1=new TParm();
TParm parm2=new TParm();
String[] names=sysFee.getNames();
for(int i=0;i<count;i+=2){
if(i>=count)
break;
for(int j=0;j<names.length;j++){
parm1.addData(names[j], sysFee.getValue(names[j],i));
}
}
for(int i=1;i<count;i+=2){
if(i>=count)
break;
for(int j=0;j<names.length;j++){
parm2.addData(names[j], sysFee.getValue(names[j],i));
}
}
//System.out.println("parm1========"+parm1);
//System.out.println("parm2========"+parm2);
TTable table1=(TTable)this.getComponent("TABLE1");
TTable table2=(TTable)this.getComponent("TABLE2");
table1.setParmValue(parm1);
table2.setParmValue(parm2);
}
/**
*
* @param code String
* @return 查询sys_fee
*/
public TParm queryExa(String code){
String sql=
"SELECT 'N' AS EXEC ,ORDER_CODE,ORDER_DESC,PY1,PY2," +
" SEQ,DESCRIPTION,TRADE_ENG_DESC,GOODS_DESC,GOODS_PYCODE," +
" ALIAS_DESC,ALIAS_PYCODE,SPECIFICATION,NHI_FEE_DESC,HABITAT_TYPE," +
" MAN_CODE,HYGIENE_TRADE_CODE,ORDER_CAT1_CODE,CHARGE_HOSP_CODE,OWN_PRICE,NHI_PRICE," +
" GOV_PRICE,UNIT_CODE,LET_KEYIN_FLG,DISCOUNT_FLG,EXPENSIVE_FLG," +
" OPD_FIT_FLG,EMG_FIT_FLG,IPD_FIT_FLG,HRM_FIT_FLG,DR_ORDER_FLG," +
" INTV_ORDER_FLG,LCS_CLASS_CODE,TRANS_OUT_FLG,TRANS_HOSP_CODE,USEDEPT_CODE," +
" EXEC_ORDER_FLG,EXEC_DEPT_CODE,INSPAY_TYPE,ADDPAY_RATE,ADDPAY_AMT," +
" NHI_CODE_O,NHI_CODE_E,NHI_CODE_I,CTRL_FLG,CLPGROUP_CODE," +
" ORDERSET_FLG,INDV_FLG,SUB_SYSTEM_CODE,RPTTYPE_CODE,DEV_CODE," +
" OPTITEM_CODE,MR_CODE,DEGREE_CODE,CIS_FLG,OPT_USER," +
" OPT_DATE,OPT_TERM,CAT1_TYPE " +
" FROM SYS_FEE " +
" WHERE ORDER_CODE LIKE " +code;
//System.out.println("SQL=============="+sql);
TParm result = new TParm(TJDODBTool.getInstance().select(sql));
//System.out.println("RESULT==============="+result);
return result;
}
/**
* 回传事件
*/
public void onFetchBack(String tableName){
TTable table=(TTable)this.getComponent(tableName);
int row=table.getSelectedRow();
int column=table.getSelectedColumn();
if("ORDER_DESC".equalsIgnoreCase(table.getParmMap(column))){
return;
}
table.setValueAt("Y", row, column);
TParm parm=table.getParmValue().getRow(row);
String code=TypeTool.getString(parm.getValue("ORDER_CODE"));
boolean result=TypeTool.getBoolean(RunClass.runMethod(main, "onQuoteSheet", new Object[]{parm}));
if(result){
table.setValueAt("N", row, column);
}
}
/**
* 初始化参数
*/
public void getInitParameter(){
main=this.getParameter();
}
/**
* 关闭
*/
public boolean onClosing(){
this.setReturnValue("Y");
return true;
}
}
| [
"[email protected]"
] | |
4aa8ec21de76712c4cdc3cf8ee95ae7124463328 | 0369b14ce460ef76f9e53f00de09e8c26b7bc4cc | /transaction/src/main/java/org/wildfly/httpclient/transaction/XidProvider.java | 32baec1ce010cf4d0a014fc807c0cea9d17480d2 | [
"Apache-2.0"
] | permissive | fl4via/wildfly-http-client | b4da9fcbb076358bbeb737270834934251393714 | af5843c906a886954fbb7b6ad7f6c19994d065de | refs/heads/master | 2023-08-10T23:35:47.361032 | 2022-08-15T09:24:35 | 2022-08-15T09:24:35 | 180,651,077 | 1 | 0 | Apache-2.0 | 2019-04-10T19:35:06 | 2019-04-10T19:35:06 | null | UTF-8 | Java | false | false | 932 | java | /*
* JBoss, Home of Professional Open Source.
* Copyright 2017 Red Hat, Inc., and individual contributors
* as indicated by the @author tags.
*
* 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.wildfly.httpclient.transaction;
import javax.transaction.xa.Xid;
/**
* Gets the Xid of the associated transaction handle
*
* @author Stuart Douglas
*/
public interface XidProvider {
Xid getXid();
}
| [
"[email protected]"
] | |
98ce601565bb937aa326e602497450f79ec4463b | 3d242b5e81e75fb82edb27fecd64f0222f50c3f3 | /templates/griffon-pivot-java-templates/templates/subtmpl-artifact/View.java | 507f626ba8c9ae6e379dbd5ff8119eec57cc706a | [
"Apache-2.0"
] | permissive | pgremo/griffon | d7105330ad5c3969bfa56d84d632a9d5bbcb9f59 | 4c19a3cc2af3dbb8e489e64f82bde99ff7e773e8 | refs/heads/master | 2022-12-07T02:42:49.102745 | 2018-11-06T13:12:10 | 2018-11-06T13:12:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,315 | java | package ${project_package};
import griffon.core.artifact.GriffonView;
import griffon.inject.MVCMember;
import griffon.metadata.ArtifactProviderFor;
import griffon.pivot.support.PivotAction;
import org.apache.pivot.serialization.SerializationException;
import org.codehaus.griffon.runtime.pivot.artifact.AbstractPivotGriffonView;
import org.apache.pivot.wtk.*;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.util.Collections;
import javax.annotation.Nonnull;
import static java.util.Arrays.asList;
@ArtifactProviderFor(GriffonView.class)
public class ${project_class_name}View extends AbstractPivotGriffonView {
private ${project_class_name}Model model;
private ${project_class_name}Controller controller;
@MVCMember
public void setModel(@Nonnull ${project_class_name}Model model) {
this.model = model;
}
@MVCMember
public void setController(@Nonnull ${project_class_name}Controller controller) {
this.controller = controller;
}
@Override
public void initUI() {
Window window = (Window) getApplication()
.createApplicationContainer(Collections.<String, Object>emptyMap());
window.setTitle(getApplication().getConfiguration().getAsString("application.title"));
window.setMaximized(true);
getApplication().getWindowManager().attach("${name}", window);
BoxPane vbox = new BoxPane(Orientation.VERTICAL);
try {
vbox.setStyles("{horizontalAlignment:'center', verticalAlignment:'center'}");
} catch (SerializationException e) {
// ignore
}
final Label clickLabel = new Label(String.valueOf(model.getClickCount()));
vbox.add(clickLabel);
PivotAction clickAction = toolkitActionFor(controller, "click");
final Button button = new PushButton(clickAction.getName());
button.setName("clickButton");
button.setAction(clickAction);
vbox.add(button);
model.addPropertyChangeListener("clickCount", new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
clickLabel.setText(String.valueOf(evt.getNewValue()));
}
});
window.setContent(vbox);
}
} | [
"[email protected]"
] | |
a44fe4f7e159dfdb6dd142379d192a98550b983e | 0943c01b59f4d8bbab045d83adae0b015e935cba | /common/src/main/java/com/guider/health/common/views/AgeEditView.java | 20249c0f4a6f05b5acceca6be61663b377910149 | [
"Apache-2.0"
] | permissive | 18271261642/RingmiiHX | c31c4609e6d126d12107c5f6aabaf4959659f308 | 3f1f840a1727cdf3ee39bc1b8d8aca4d2c3ebfcb | refs/heads/master | 2021-06-28T10:28:58.649906 | 2020-08-16T02:27:28 | 2020-08-16T02:27:28 | 230,220,762 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,022 | java | package com.guider.health.common.views;
import android.content.Context;
import android.support.annotation.Nullable;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.View;
import android.view.inputmethod.EditorInfo;
import android.widget.EditText;
import android.widget.LinearLayout;
import com.guider.health.common.R;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* 年龄输入控件
*/
public class AgeEditView extends LinearLayout {
private EditText year, month, day;
private int yearMin = 1800, yearMax;
private final int monthMin = 1, monthMax = 12;
private final int dayMin = 1, dayMax = 31;
public static final String NULL = "NULL";
public static final String ILLEGAL = "Illegal";
public AgeEditView(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
inflate(context, R.layout.view_age_input, this);
yearMax = Integer.valueOf(new SimpleDateFormat("yyyy").format(new Date()));
year = findViewById(R.id.year);
month = findViewById(R.id.month);
day = findViewById(R.id.day);
year.setOnFocusChangeListener(new OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (!hasFocus) {
valueLimit(yearMin, yearMax, year);
}
}
});
// new KeyBoardUtil((Activity) context, year).setOnFocusChangeListener();
month.setOnFocusChangeListener(new OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (!hasFocus) {
valueLimit(monthMin, monthMax, month);
}
}
});
// new KeyBoardUtil((Activity) context, month).setOnFocusChangeListener();
day.setOnFocusChangeListener(new OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (!hasFocus) {
valueLimit(dayMin, dayMax, day);
}
}
});
// new KeyBoardUtil((Activity) context, day).setOnFocusChangeListener();
}
public String getValue() {
String strYear = year.getText().toString();
String strMonth = month.getText().toString();
String strDay = day.getText().toString();
if (TextUtils.isEmpty(strYear) || TextUtils.isEmpty(strMonth) || TextUtils.isEmpty(strDay)) {
return NULL;
}
int y = Integer.valueOf(strYear);
int m = Integer.valueOf(strMonth);
int d = Integer.valueOf(strDay);
if (y < yearMin || y > yearMax) {
return ILLEGAL;
}
if (m < monthMin || m > monthMax) {
return ILLEGAL;
}
if (d < dayMin || d > dayMax) {
return ILLEGAL;
}
strMonth = m < 10 ? "0" + m : m + "";
strDay = d < 10 ? "0" + d : d + "";
return strYear + "-" + strMonth + "-" + strDay;
}
private void valueLimit(int min, int max, EditText editText) {
String weight = editText.getText().toString();
if (!TextUtils.isEmpty(weight)) {
if (Integer.valueOf(weight) > max) {
editText.setText(max + "");
editText.setSelection(editText.getText().length());
} else if (Integer.valueOf(weight) < min) {
editText.setText(min + "");
editText.setSelection(editText.getText().length());
}
}
}
public void setValue(String dataTime) {
String[] split = dataTime.split("-");
if (split.length >= 3) {
year.setText(split[0]);
month.setText(split[1]);
day.setText(split[2]);
}
}
public void setNextEditText(int nextId) {
day.setImeOptions(EditorInfo.IME_ACTION_NEXT);
day.setNextFocusForwardId(nextId);
}
}
| [
"[email protected]"
] | |
6f8dcd43d33a3cf41d87806af10c286041305b16 | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Math/67/org/apache/commons/math/util/ResizableDoubleArray_getValues_619.java | 52ac4d7dcb496d4c60c459f9bdfda6333eb569a6 | [] | no_license | hvdthong/NetML | dca6cf4d34c5799b400d718e0a6cd2e0b167297d | 9bb103da21327912e5a29cbf9be9ff4d058731a5 | refs/heads/master | 2021-06-30T15:03:52.618255 | 2020-10-07T01:58:48 | 2020-10-07T01:58:48 | 150,383,588 | 1 | 1 | null | 2018-09-26T07:08:45 | 2018-09-26T07:08:44 | null | UTF-8 | Java | false | false | 3,164 | java |
org apach common math util
variabl length link doubl arrai doublearrai implement automat
handl expand contract intern storag arrai element
ad remov
intern storag arrai start capac determin
code initi capac initialcapac code properti set constructor
initi capac ad element
link add element addel append element end arrai
open entri end intern storag arrai
arrai expand size expand arrai depend
code expans mode expansionmod code code expans factor expansionfactor code properti
code expans mode expansionmod code determin size arrai
multipli code expans factor expansionfactor code multipl mode
expans addit addit mode code expans factor expansionfactor code
storag locat ad code expans mode expansionmod code
multipl mode code expans factor expansionfactor code
link add element roll addelementrol method add element end
intern storag arrai adjust usabl window
intern arrai forward posit effect make
element repeat activ method
activ link discard front element discardfrontel effect orphan
storag locat begin intern storag arrai
reclaim storag time method activ size
intern storag arrai compar number address
element code num element numel code properti differ
larg intern arrai contract size
code num element numel code determin intern
storag arrai larg depend code expans mode expansionmod code
code contract factor contractionfactor code properti code expans mode expansionmod code
code multipl mode code contract trigger
ratio storag arrai length code num element numel code exce
code contract factor contractionfactor code code expans mode expansionmod code
code addit mode code number excess storag locat
compar code contract factor contractionfactor code
avoid cycl expans contract
code expans factor expansionfactor code exce
code contract factor contractionfactor code constructor mutat
properti enforc requir throw illeg argument except illegalargumentexcept
violat
version revis date
resiz doubl arrai resizabledoublearrai doubl arrai doublearrai serializ
return intern storag arrai note method return
refer intern storag arrai copi correctli
address element arrai code start index startindex code
requir link start method method
case copi intern arrai practic
link element getel method case
intern storag arrai object
deprec replac link intern valu getinternalvalu
deprec
valu getvalu
intern arrai internalarrai
| [
"[email protected]"
] | |
ef6557b8ae40b8df8a434c1a9db2a3e46853958b | fac5d6126ab147e3197448d283f9a675733f3c34 | /src/main/java/kotlin/sequences/SequencesKt___SequencesKt$filterIsInstance$1.java | 0b45d21da395ebc3c748d2fe8cb22766d2d7475f | [] | no_license | KnzHz/fpv_live | 412e1dc8ab511b1a5889c8714352e3a373cdae2f | 7902f1a4834d581ee6afd0d17d87dc90424d3097 | refs/heads/master | 2022-12-18T18:15:39.101486 | 2020-09-24T19:42:03 | 2020-09-24T19:42:03 | 294,176,898 | 0 | 0 | null | 2020-09-09T17:03:58 | 2020-09-09T17:03:57 | null | UTF-8 | Java | false | false | 1,071 | java | package kotlin.sequences;
import kotlin.Metadata;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Lambda;
import org.jetbrains.annotations.Nullable;
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u0010\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\u0000\n\u0000\u0010\u0000\u001a\u00020\u0001\"\u0006\b\u0000\u0010\u0002\u0018\u00012\b\u0010\u0003\u001a\u0004\u0018\u00010\u0004H\n¢\u0006\u0002\b\u0005"}, d2 = {"<anonymous>", "", "R", "it", "", "invoke"}, k = 3, mv = {1, 1, 15})
/* compiled from: _Sequences.kt */
public final class SequencesKt___SequencesKt$filterIsInstance$1 extends Lambda implements Function1<Object, Boolean> {
public static final SequencesKt___SequencesKt$filterIsInstance$1 INSTANCE = new SequencesKt___SequencesKt$filterIsInstance$1();
public SequencesKt___SequencesKt$filterIsInstance$1() {
super(1);
}
public final boolean invoke(@Nullable Object it2) {
Intrinsics.reifiedOperationMarker(3, "R");
return it2 instanceof Object;
}
}
| [
"[email protected]"
] | |
1730c95ed063210f430f7c0a40059516b6d8511b | 98afa6b600ca438c04f4084dc56e61f871c8bcb9 | /hms-service/src/main/java/com/urt/service/manager/interfaces/subscription/SubscriptionManager.java | a525fe3c94eece39f57a773ad79cdd8dfebdaa13 | [] | no_license | RaviThejaGoud/hospital | 88d2f4fc8c3152af2411d0a8f722e7528e6a008d | 55a4a51f31b988d82c432474e62fde611f5622d8 | refs/heads/master | 2021-04-10T01:18:30.174761 | 2018-03-19T15:47:09 | 2018-03-19T15:47:09 | 125,875,662 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 519 | java | package com.urt.service.manager.interfaces.subscription;
import java.util.List;
import com.urt.persistence.model.customer.Customer;
import com.urt.service.manager.interfaces.base.UniversalManager;
/**
* Business Service Interface to handle communication between web and
* persistence layer.
*
* <p><a href="SubscriptionManager.java.html"><i>View Source</i></a></p>
*/
public interface SubscriptionManager extends UniversalManager {
List<Customer> findExistCustomer(String keyWord);
}
| [
"[email protected]"
] | |
737613d12ba80437b9a85f9214cc204576bce033 | 0a443175b12eb68c24e1cf5f4f5a021455ac9eb4 | /sos-client/src/sos/police_v2/state/preCompute/geneticPrecom/GPSelectBest.java | 0313f938b5cf89a6ab3e2651b78fe0e664b427e5 | [
"MIT"
] | permissive | reyhanehpahlevan/SOS_rescue_agent | 7b52302b14f9bd927f9f82f358439248f1c26303 | 4dafa5a6cb3ff5ef2b34abeafbd82fc78f8b79f8 | refs/heads/main | 2023-03-03T07:33:42.883404 | 2021-02-15T10:19:50 | 2021-02-15T10:19:50 | 304,570,285 | 0 | 0 | MIT | 2020-10-16T09:12:56 | 2020-10-16T08:46:36 | null | UTF-8 | Java | false | false | 1,176 | java | package sos.police_v2.state.preCompute.geneticPrecom;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import org.apache.commons.math3.genetics.Chromosome;
import org.apache.commons.math3.genetics.ListPopulation;
import sos.base.util.genetic.SOSListPopulation;
import sos.base.util.genetic.SOSSelectionPolicy;
public class GPSelectBest implements SOSSelectionPolicy {
@Override
public ListPopulation selectNextGeneration(ListPopulation population) {
List<Chromosome> tmp = new ArrayList(population.getChromosomes());
Collections.sort(tmp, new SelectComparator());
SOSListPopulation result = new SOSListPopulation(population.getPopulationLimit()/2);
for (int i = 0; i < tmp.size() / 2; i++) {
result.addChromosome(tmp.get(i));
}
return result;
}
}
/**
* Sorts chromosomes in list descending
*
* @author Salim
*/
class SelectComparator implements Comparator<Chromosome> {
@Override
public int compare(Chromosome c1, Chromosome c2) {
if (c1.getFitness() > c2.getFitness()) {
return 1;
} else if (c1.getFitness() == c2.getFitness()) {
return 0;
} else
return -1;
}
}
| [
"[email protected]"
] | |
b8f76ec4ffbfd0a601060cf8045867328961f00e | 648feea7a619fc8f19ec0d8ded6a5586c775492e | /app/src/main/java/com/liumang/instantchat/utils/ConstUtils.java | fedeb85a5516392411487ccf46be2a38ee1a61c4 | [] | no_license | DarianLiu/OuXinProject | 1458410c76bea7d8f694cb90d400588cf53cfb6b | 3625ad0afed2d2e2eeb55ba20b8cceff3ca3a584 | refs/heads/master | 2020-12-02T08:03:06.362097 | 2017-07-11T01:08:37 | 2017-07-11T01:08:40 | 96,763,624 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,187 | java | package com.liumang.instantchat.utils;
/**
* <pre>
* author: Blankj
* blog : http://blankj.com
* time : 2016/8/11
* desc : 常量相关工具类
* </pre>
*/
public class ConstUtils {
private ConstUtils() {
throw new UnsupportedOperationException("u can't instantiate me...");
}
/******************** 存储相关常量 ********************/
/**
* KB与Byte的倍数
*/
public static final int KB = 1024;
/**
* MB与Byte的倍数
*/
public static final int MB = 1048576;
/**
* GB与Byte的倍数
*/
public static final int GB = 1073741824;
public enum MemoryUnit {
BYTE,
KB,
MB,
GB
}
/******************** 时间相关常量 ********************/
/**
* 秒与毫秒的倍数
*/
public static final int SEC = 1000;
/**
* 分与毫秒的倍数
*/
public static final int MIN = 60000;
/**
* 时与毫秒的倍数
*/
public static final int HOUR = 3600000;
/**
* 天与毫秒的倍数
*/
public static final int DAY = 86400000;
public enum TimeUnit {
MSEC,
SEC,
MIN,
HOUR,
DAY
}
/******************** 正则相关常量 ********************/
/**
* 正则:手机号(简单)
*/
public static final String REGEX_MOBILE_SIMPLE = "^[1]\\d{10}$";
/**
* 正则:手机号(精确)
* <p>移动:134(0-8)、135、136、137、138、139、147、150、151、152、157、158、159、178、182、183、184、187、188</p>
* <p>联通:130、131、132、145、155、156、175、176、185、186</p>
* <p>电信:133、153、173、177、180、181、189</p>
* <p>全球星:1349</p>
* <p>虚拟运营商:170</p>
*/
public static final String REGEX_MOBILE_EXACT = "^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|(147))\\d{8}$";
/**
* 正则:电话号码
*/
public static final String REGEX_TEL = "^0\\d{2,3}[- ]?\\d{7,8}";
/**
* 正则:身份证号码15位
*/
public static final String REGEX_ID_CARD15 = "^[1-9]\\d{7}((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])\\d{3}$";
/**
* 正则:身份证号码18位
*/
public static final String REGEX_ID_CARD18 = "^[1-9]\\d{5}[1-9]\\d{3}((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])\\d{3}([0-9Xx])$";
/**
* 正则:邮箱
*/
public static final String REGEX_EMAIL = "^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$";
/**
* 正则:URL
*/
public static final String REGEX_URL = "[a-zA-z]+://[^\\s]*";
/**
* 正则:汉字
*/
public static final String REGEX_ZH = "^[\\u4e00-\\u9fa5]+$";
/**
* 正则:用户名,取值范围为a-z,A-Z,0-9,"_",汉字,不能以"_"结尾,用户名必须是6-20位
*/
public static final String REGEX_USERNAME = "^[\\w\\u4e00-\\u9fa5]{6,20}(?<!_)$";
/**
* 正则:yyyy-MM-dd格式的日期校验,已考虑平闰年
*/
public static final String REGEX_DATE = "^(?:(?!0000)[0-9]{4}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)-02-29)$";
/**
* 正则:IP地址
*/
public static final String REGEX_IP = "((2[0-4]\\d|25[0-5]|[01]?\\d\\d?)\\.){3}(2[0-4]\\d|25[0-5]|[01]?\\d\\d?)";
/************** 以下摘自http://tool.oschina.net/regex **************/
/**
* 正则:双字节字符(包括汉字在内)
*/
public static final String REGEX_DOUBLE_BYTE_CHAR = "[^\\x00-\\xff]";
/**
* 正则:空白行
*/
public static final String REGEX_BLANK_LINE = "\\n\\s*\\r";
/**
* 正则:QQ号
*/
public static final String REGEX_TENCENT_NUM = "[1-9][0-9]{4,}";
/**
* 正则:中国邮政编码
*/
public static final String REGEX_ZIP_CODE = "[1-9]\\d{5}(?!\\d)";
/**
* 正则:正整数
*/
public static final String REGEX_POSITIVE_INTEGER = "^[1-9]\\d*$";
/**
* 正则:负整数
*/
public static final String REGEX_NEGATIVE_INTEGER = "^-[1-9]\\d*$";
/**
* 正则:整数
*/
public static final String REGEX_INTEGER = "^-?[1-9]\\d*$";
/**
* 正则:非负整数(正整数 + 0)
*/
public static final String REGEX_NOT_NEGATIVE_INTEGER = "^[1-9]\\d*|0$";
/**
* 正则:非正整数(负整数 + 0)
*/
public static final String REGEX_NOT_POSITIVE_INTEGER = "^-[1-9]\\d*|0$";
/**
* 正则:正浮点数
*/
public static final String REGEX_POSITIVE_FLOAT = "^[1-9]\\d*\\.\\d*|0\\.\\d*[1-9]\\d*$";
/**
* 正则:负浮点数
*/
public static final String REGEX_NEGATIVE_FLOAT = "^-[1-9]\\d*\\.\\d*|-0\\.\\d*[1-9]\\d*$";
/************** If u want more please visit http://toutiao.com/i6231678548520731137/ **************/
} | [
"[email protected]"
] | |
eb08ee5c7f91ff348c0cc722f52eb41747329224 | ed5159d056e98d6715357d0d14a9b3f20b764f89 | /test/irvine/oeis/a148/A148555Test.java | e5efd52c9263adab42b2fdf0bb8b975152eafca6 | [] | no_license | flywind2/joeis | c5753169cf562939b04dd246f8a2958e97f74558 | e5efd6971a0062ac99f4fae21a7c78c9f9e74fea | refs/heads/master | 2020-09-13T18:34:35.080552 | 2019-11-19T05:40:55 | 2019-11-19T05:40:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 256 | java | package irvine.oeis.a148;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A148555Test extends AbstractSequenceTest {
@Override
protected int maxTerms() {
return 10;
}
}
| [
"[email protected]"
] | |
64ab88cdeab823e229d953588c165ac42c83915b | a363c46e7cbb080db2b3a69a70ebf912195e25c7 | /ls-modules/ls-special/src/main/java/cn/lonsun/site/contentModel/internal/dao/impl/ModelTemplateSpecialDaoImpl.java | ac1b345781b31714a799238a34f9692c799bf219 | [] | no_license | pologood/excms | 601646dd7ea4f58f8423da007413978192090f8d | e1c03f574d0ecbf0200aaffa7facf93841bab02c | refs/heads/master | 2020-05-14T20:07:22.979151 | 2018-10-06T10:51:37 | 2018-10-06T10:51:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 935 | java | package cn.lonsun.site.contentModel.internal.dao.impl;
import cn.lonsun.core.base.dao.impl.MockDao;
import cn.lonsun.core.base.entity.AMockEntity;
import cn.lonsun.site.contentModel.internal.dao.IModelTemplateSpecialDao;
import cn.lonsun.site.contentModel.internal.entity.ModelTemplateEO;
import org.springframework.stereotype.Repository;
import java.util.HashMap;
import java.util.Map;
/**
* Created by Administrator on 2017/9/26.
*/
@Repository
public class ModelTemplateSpecialDaoImpl extends MockDao<ModelTemplateEO> implements IModelTemplateSpecialDao {
@Override
public ModelTemplateEO getFirstModelByColumnCode(String columnTypeCode) {
Map<String, Object> paramsMap = new HashMap<String, Object>();
paramsMap.put("modelTypeCode", columnTypeCode);
paramsMap.put("recordStatus", AMockEntity.RecordStatus.Normal.toString());
return getEntity(ModelTemplateEO.class, paramsMap);
}
}
| [
"[email protected]"
] | |
1b3579b7b8472d954456b3258a2a0e82e6e4829e | 3cd69da4d40f2d97130b5bf15045ba09c219f1fa | /sources/com/fasterxml/jackson/databind/introspect/BasicClassIntrospector.java | c4a8a5fa62ad60ef9da49a0b5527732121061ebc | [] | no_license | TheWizard91/Album_base_source_from_JADX | 946ea3a407b4815ac855ce4313b97bd42e8cab41 | e1d228fc2ee550ac19eeac700254af8b0f96080a | refs/heads/master | 2023-01-09T08:37:22.062350 | 2020-11-11T09:52:40 | 2020-11-11T09:52:40 | 311,927,971 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,839 | java | package com.fasterxml.jackson.databind.introspect;
import com.fasterxml.jackson.databind.AnnotationIntrospector;
import com.fasterxml.jackson.databind.DeserializationConfig;
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.SerializationConfig;
import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder;
import com.fasterxml.jackson.databind.cfg.MapperConfig;
import com.fasterxml.jackson.databind.introspect.ClassIntrospector;
import com.fasterxml.jackson.databind.type.SimpleType;
import java.io.Serializable;
public class BasicClassIntrospector extends ClassIntrospector implements Serializable {
protected static final BasicBeanDescription BOOLEAN_DESC = BasicBeanDescription.forOtherUse((MapperConfig<?>) null, SimpleType.constructUnsafe(Boolean.TYPE), AnnotatedClass.constructWithoutSuperTypes(Boolean.TYPE, (AnnotationIntrospector) null, (ClassIntrospector.MixInResolver) null));
protected static final BasicBeanDescription INT_DESC = BasicBeanDescription.forOtherUse((MapperConfig<?>) null, SimpleType.constructUnsafe(Integer.TYPE), AnnotatedClass.constructWithoutSuperTypes(Integer.TYPE, (AnnotationIntrospector) null, (ClassIntrospector.MixInResolver) null));
protected static final BasicBeanDescription LONG_DESC = BasicBeanDescription.forOtherUse((MapperConfig<?>) null, SimpleType.constructUnsafe(Long.TYPE), AnnotatedClass.constructWithoutSuperTypes(Long.TYPE, (AnnotationIntrospector) null, (ClassIntrospector.MixInResolver) null));
protected static final BasicBeanDescription STRING_DESC = BasicBeanDescription.forOtherUse((MapperConfig<?>) null, SimpleType.constructUnsafe(String.class), AnnotatedClass.constructWithoutSuperTypes(String.class, (AnnotationIntrospector) null, (ClassIntrospector.MixInResolver) null));
public static final BasicClassIntrospector instance = new BasicClassIntrospector();
private static final long serialVersionUID = 1;
public BasicBeanDescription forSerialization(SerializationConfig serializationConfig, JavaType javaType, ClassIntrospector.MixInResolver mixInResolver) {
BasicBeanDescription _findCachedDesc = _findCachedDesc(javaType);
if (_findCachedDesc == null) {
return BasicBeanDescription.forSerialization(collectProperties(serializationConfig, javaType, mixInResolver, true, "set"));
}
return _findCachedDesc;
}
public BasicBeanDescription forDeserialization(DeserializationConfig deserializationConfig, JavaType javaType, ClassIntrospector.MixInResolver mixInResolver) {
BasicBeanDescription _findCachedDesc = _findCachedDesc(javaType);
if (_findCachedDesc == null) {
return BasicBeanDescription.forDeserialization(collectProperties(deserializationConfig, javaType, mixInResolver, false, "set"));
}
return _findCachedDesc;
}
public BasicBeanDescription forDeserializationWithBuilder(DeserializationConfig deserializationConfig, JavaType javaType, ClassIntrospector.MixInResolver mixInResolver) {
return BasicBeanDescription.forDeserialization(collectPropertiesWithBuilder(deserializationConfig, javaType, mixInResolver, false));
}
public BasicBeanDescription forCreation(DeserializationConfig deserializationConfig, JavaType javaType, ClassIntrospector.MixInResolver mixInResolver) {
BasicBeanDescription _findCachedDesc = _findCachedDesc(javaType);
if (_findCachedDesc == null) {
return BasicBeanDescription.forDeserialization(collectProperties(deserializationConfig, javaType, mixInResolver, false, "set"));
}
return _findCachedDesc;
}
public BasicBeanDescription forClassAnnotations(MapperConfig<?> mapperConfig, JavaType javaType, ClassIntrospector.MixInResolver mixInResolver) {
return BasicBeanDescription.forOtherUse(mapperConfig, javaType, AnnotatedClass.construct(javaType.getRawClass(), mapperConfig.isAnnotationProcessingEnabled() ? mapperConfig.getAnnotationIntrospector() : null, mixInResolver));
}
public BasicBeanDescription forDirectClassAnnotations(MapperConfig<?> mapperConfig, JavaType javaType, ClassIntrospector.MixInResolver mixInResolver) {
boolean isAnnotationProcessingEnabled = mapperConfig.isAnnotationProcessingEnabled();
AnnotationIntrospector annotationIntrospector = mapperConfig.getAnnotationIntrospector();
Class<?> rawClass = javaType.getRawClass();
if (!isAnnotationProcessingEnabled) {
annotationIntrospector = null;
}
return BasicBeanDescription.forOtherUse(mapperConfig, javaType, AnnotatedClass.constructWithoutSuperTypes(rawClass, annotationIntrospector, mixInResolver));
}
/* access modifiers changed from: protected */
public POJOPropertiesCollector collectProperties(MapperConfig<?> mapperConfig, JavaType javaType, ClassIntrospector.MixInResolver mixInResolver, boolean z, String str) {
return constructPropertyCollector(mapperConfig, AnnotatedClass.construct(javaType.getRawClass(), mapperConfig.isAnnotationProcessingEnabled() ? mapperConfig.getAnnotationIntrospector() : null, mixInResolver), javaType, z, str).collect();
}
/* access modifiers changed from: protected */
public POJOPropertiesCollector collectPropertiesWithBuilder(MapperConfig<?> mapperConfig, JavaType javaType, ClassIntrospector.MixInResolver mixInResolver, boolean z) {
JsonPOJOBuilder.Value value = null;
AnnotationIntrospector annotationIntrospector = mapperConfig.isAnnotationProcessingEnabled() ? mapperConfig.getAnnotationIntrospector() : null;
AnnotatedClass construct = AnnotatedClass.construct(javaType.getRawClass(), annotationIntrospector, mixInResolver);
if (annotationIntrospector != null) {
value = annotationIntrospector.findPOJOBuilderConfig(construct);
}
return constructPropertyCollector(mapperConfig, construct, javaType, z, value == null ? "with" : value.withPrefix).collect();
}
/* access modifiers changed from: protected */
public POJOPropertiesCollector constructPropertyCollector(MapperConfig<?> mapperConfig, AnnotatedClass annotatedClass, JavaType javaType, boolean z, String str) {
return new POJOPropertiesCollector(mapperConfig, z, javaType, annotatedClass, str);
}
/* access modifiers changed from: protected */
public BasicBeanDescription _findCachedDesc(JavaType javaType) {
Class<?> rawClass = javaType.getRawClass();
if (rawClass == String.class) {
return STRING_DESC;
}
if (rawClass == Boolean.TYPE) {
return BOOLEAN_DESC;
}
if (rawClass == Integer.TYPE) {
return INT_DESC;
}
if (rawClass == Long.TYPE) {
return LONG_DESC;
}
return null;
}
}
| [
"[email protected]"
] | |
c4e56be4ee2171eea0ab228d8e7b8b18a665de8b | f55e0f08bbbbde3bbf06b83c822a93d54819b1e8 | /app/src/main/java/com/jqsoft/nursing/bean/grassroots_civil_administration/LngLatCount.java | 04b528b7c6a3a70691162315e480470f92edbd87 | [] | no_license | moshangqianye/nursing | 27e58e30a51424502f1b636ae47b60b81a3b2ca0 | 20cd5aace59555ef9d708df0fb03639b2fc843d0 | refs/heads/master | 2020-09-08T13:39:55.939252 | 2020-03-20T09:55:34 | 2020-03-20T09:55:34 | 221,147,807 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 852 | java | package com.jqsoft.nursing.bean.grassroots_civil_administration;
/**
* Created by Administrator on 2018-02-02.
*/
public class LngLatCount {
private String count;//该地图点的困难群众数量
private String lng;//经度
private String lat;//纬度
public LngLatCount() {
super();
}
public LngLatCount(String count, String lng, String lat) {
this.count = count;
this.lng = lng;
this.lat = lat;
}
public String getCount() {
return count;
}
public void setCount(String count) {
this.count = count;
}
public String getLng() {
return lng;
}
public void setLng(String lng) {
this.lng = lng;
}
public String getLat() {
return lat;
}
public void setLat(String lat) {
this.lat = lat;
}
}
| [
"123456"
] | 123456 |
fe1ed9200aa7d046090907d7774ffce354678e69 | 255cf6f012dd3e200b9e4e021cfb40b394e4f2f3 | /src/main/java/com/trade_accounting/controllers/rest/SupplierAccountRestController.java | cdae7fcebf76c8f9bcb20fe3f8c875a8b0d68211 | [] | no_license | ArtemZaikovsky/Back | 28cbc4104e8f38d1a98175c7b06ecb2c009f8189 | de512acb694d9bae6e5fa2e852e6b1881157516c | refs/heads/main | 2023-07-17T11:46:43.612093 | 2021-08-20T13:53:09 | 2021-08-20T13:53:09 | 398,292,819 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 9,069 | java | package com.trade_accounting.controllers.rest;
import com.trade_accounting.models.SupplierAccount;
import com.trade_accounting.models.dto.SupplierAccountDto;
import com.trade_accounting.services.interfaces.CheckEntityService;
import com.trade_accounting.services.interfaces.SupplierAccountService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;
import net.kaczmarzyk.spring.data.jpa.domain.Equal;
import net.kaczmarzyk.spring.data.jpa.domain.Like;
import net.kaczmarzyk.spring.data.jpa.domain.LikeIgnoreCase;
import net.kaczmarzyk.spring.data.jpa.web.annotation.And;
import net.kaczmarzyk.spring.data.jpa.web.annotation.Spec;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
@Tag(name="SupplierAccount Rest Controller", description = "CRUD операции со счетами поставщиков")
@Api(tags = "SupplierAccount Rest Controller")
@RequestMapping("api/supplierAccount")
public class SupplierAccountRestController {
private final SupplierAccountService invoices;
private final CheckEntityService checkEntityService;
public SupplierAccountRestController(SupplierAccountService invoices,
CheckEntityService checkEntityService) {
this.invoices = invoices;
this.checkEntityService = checkEntityService;
}
@GetMapping
@ApiOperation(value = "getAll", notes = "Получение списка всех счетов поставщиков")
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Успешное получение счетов поставщиков"),
@ApiResponse(code = 404, message = "Данный контроллер не найден"),
@ApiResponse(code = 403, message = "Операция запрещена"),
@ApiResponse(code = 401, message = "Нет доступа к данной операции")}
)
public ResponseEntity<List<SupplierAccountDto>> getAll() {
List<SupplierAccountDto> getAll = invoices.getAll();
return ResponseEntity.ok(getAll);
}
@GetMapping("/search/{nameFilter}")
@ApiOperation(value = "searchTerm", notes = "Получение списка некоторых счетов")
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Успешное получение отф. списка контрагентов"),
@ApiResponse(code = 404, message = "Данный контроллер не найден"),
@ApiResponse(code = 403, message = "Операция запрещена"),
@ApiResponse(code = 401, message = "Нет доступа к данной операции")}
)
public ResponseEntity<List<SupplierAccountDto>> searchByNameFilter(@ApiParam(name ="nameFilter",
value = "Переданный в URL searchTerm, по которому необходимо найти контрагента")
@PathVariable(name = "nameFilter") String nameFilter) {
List<SupplierAccountDto> listSupplier = invoices.searchByString(nameFilter);
return ResponseEntity.ok(listSupplier);
}
@GetMapping("/{id}")
@ApiOperation(value = "getById", notes = "Получение счета поставщика по id")
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Счет поставщика найден"),
@ApiResponse(code = 404, message = "Данный контроллер не найден"),
@ApiResponse(code = 403, message = "Операция запрещена"),
@ApiResponse(code = 401, message = "Нет доступа к данной операции")}
)
public ResponseEntity<SupplierAccountDto> getById(@ApiParam(name = "id", type = "Long",
value = "Переданный в URL id, по которому необходимо найти счет поставщика")
@PathVariable(name = "id") Long id) {
checkEntityService.checkExistsSupplierAccountById(id);
return ResponseEntity.ok(invoices.getById(id));
}
@PostMapping
@ApiOperation(value = "create", notes = "Добавление нового счета поставщика")
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Счет поставщика создан"),
@ApiResponse(code = 201, message = "Запрос принят и счет поставщика добавлен"),
@ApiResponse(code = 404, message = "Данный контроллер не найден"),
@ApiResponse(code = 403, message = "Операция запрещена"),
@ApiResponse(code = 401, message = "Нет доступа к данной операции")}
)
public ResponseEntity<SupplierAccountDto> create(@ApiParam(name = "invoice", value = "DTO счета, который необходимо создать")
@RequestBody SupplierAccountDto invoice) {
return ResponseEntity.ok().body(invoices.create(invoice));
}
@PutMapping
@ApiOperation(value = "create", notes = "Изменение счета поставщика")
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Информация о счете обновлена"),
@ApiResponse(code = 201, message = "Запрос принят и счет поставщика обновлен"),
@ApiResponse(code = 404, message = "Данный контроллер не найден"),
@ApiResponse(code = 403, message = "Операция запрещена"),
@ApiResponse(code = 401, message = "Нет доступа к данной операции")}
)
public ResponseEntity<SupplierAccountDto> update(@ApiParam(name = "invoice", value = "DTO счета, который необходимо создать")
@RequestBody SupplierAccountDto invoice) {
return ResponseEntity.ok().body(invoices.update(invoice));
}
@ApiOperation(value = "deleteById", notes = "Удаляет счет поставщика на основе переданного ID")
@DeleteMapping("/{id}")
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Счет поставщика успешно удален"),
@ApiResponse(code = 204, message = "Запрос получен и обработан, данных для возврата нет"),
@ApiResponse(code = 401, message = "Нет доступа к данной операции"),
@ApiResponse(code = 403, message = "Операция запрещена"),
@ApiResponse(code = 404, message = "Данный контроллер не найден")
})
public ResponseEntity<SupplierAccountDto> deleteById(@ApiParam(name = "id", type = "Long",
value = "Переданный в URL id по которому необходимо удалить счет поставщика")
@PathVariable(name = "id") Long id) {
invoices.deleteById(id);
return ResponseEntity.ok().build();
}
@GetMapping("/querySupplier")
@ApiOperation(value = "searchByFilter", notes = "Получение списка счетов по заданным параметрам")
public ResponseEntity<List<SupplierAccountDto>> getAllFilter(
@And({
@Spec(path = "id", params = "id", spec = Equal.class),
@Spec(path = "date", params = "date", spec = Equal.class),
@Spec(path = "contractor.name", params = "contractorDto", spec = LikeIgnoreCase.class),
@Spec(path = "company.name", params = "companyDto", spec = LikeIgnoreCase.class),
@Spec(path = "warehouse.name", params = "warehouseDto", spec = LikeIgnoreCase.class),
})Specification<SupplierAccount> supplier) {
return ResponseEntity.ok(invoices.search(supplier));
}
}
| [
"[email protected]"
] | |
140c763a632f7806c4be56667dc0d9b052cf85ee | 56cd965b524bfb09aa0fac3614e3cbbcf56f4ab2 | /microblog-scheduler/scheduler-quartz/src/main/java/com/cloud/frame/scheduler/quartz/config/QuartzConfig.java | caf0743f3485d0923b1c2825197e924867da7afb | [] | no_license | taoyonggang/micro-blog | 26ffc929ba54347da2caa4ecc26c81f04f65604e | 5b66bcc5108eb50e13dd5776f0e4eee0965ebd1d | refs/heads/master | 2020-04-23T13:54:24.100461 | 2019-02-18T03:24:59 | 2019-02-18T03:24:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,787 | java | package com.cloud.microblog.scheduler.quartz.config;
import org.quartz.Scheduler;
import org.quartz.spi.JobFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.PropertiesFactoryBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.ClassPathResource;
import org.springframework.scheduling.quartz.SchedulerFactoryBean;
import java.io.IOException;
import java.util.Properties;
/**
* @program: top-parent
* @description: quartz 配置
* @author: Mr.lgj
* @version:
* @See:
* @create: 2018-11-20 17:19
**/
@Configuration
public class QuartzConfig {
@Autowired
JobFactory jobFactory;
//获取工厂bean
@Bean
public SchedulerFactoryBean schedulerFactoryBean() {
SchedulerFactoryBean schedulerFactoryBean = new SchedulerFactoryBean();
try {
schedulerFactoryBean.setQuartzProperties(quartzProperties());
schedulerFactoryBean.setJobFactory(jobFactory);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return schedulerFactoryBean;
}
//指定quartz.properties
@Bean
public Properties quartzProperties() throws IOException {
PropertiesFactoryBean propertiesFactoryBean = new PropertiesFactoryBean();
propertiesFactoryBean.setLocation(new ClassPathResource("/quartz.properties"));
propertiesFactoryBean.afterPropertiesSet();
return propertiesFactoryBean.getObject();
}
//创建schedule
@Bean(name = "scheduler")
public Scheduler scheduler() {
return schedulerFactoryBean().getScheduler();
}
}
| [
"[email protected]"
] | |
a8b4cceb66a6baac194cb76d3275c194a3c3b3d3 | 487c321221d953876aed88398d8ee19f8391d410 | /app/src/main/java/com/yfy/app/info_submit/frament/EditTextFragment.java | 695220c30c5dd91e98bf060d162f0b6797e1a6c1 | [] | no_license | Zhaoxianxv/rebirth | e3bd0734344e955ac7adec99e1c08095db04463c | 34452d363c4815266e033737b7be68e71495e2ea | refs/heads/master | 2020-09-15T03:39:46.068726 | 2020-09-04T13:13:47 | 2020-09-04T13:13:47 | 223,339,537 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,425 | java | package com.yfy.app.info_submit.frament;
import android.annotation.SuppressLint;
import android.inputmethodservice.KeyboardView;
import android.os.Bundle;
import android.text.Editable;
import android.text.Selection;
import android.text.TextWatcher;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.yfy.app.info_submit.activity.FormWriteItemActivity;
import com.yfy.app.info_submit.constants.InfosConstant;
import com.yfy.app.info_submit.infos.ItemType;
import com.yfy.app.info_submit.infos.WriteItem;
import com.yfy.app.info_submit.utils.KeyboardUtil;
import com.yfy.app.info_submit.utils.LegalityJudger;
import com.yfy.app.info_submit.utils.Util;
import com.yfy.rebirth.R;
public class EditTextFragment extends AbstractFragment implements
OnClickListener, TextWatcher {
private EditText item_edittext;
private TextView postfix_tv;
private RelativeLayout wu_rela;
private TextView if_wu_tv;
private KeyboardView keyboardview;
private KeyboardUtil keyboardUtil;
private View view;
private WriteItem writeItem;
private boolean isSfz;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
view = inflater.inflate(R.layout.fragment_edittext, null);
initView();
return view;
}
@SuppressLint("CutPasteId")
private void initView() {
int position1 = getArguments().getInt("position1");
int position2 = getArguments().getInt("position2");
writeItem = InfosConstant.totalList.get(position1).get(position2);
String itemName = writeItem.getItemName();
String itemValue = writeItem.getItemValue();
if (itemValue.equals("无") || LegalityJudger.isEmpty(itemValue)) {
itemValue = "";
((FormWriteItemActivity) getActivity()).setOkClicked(false);
} else {
((FormWriteItemActivity) getActivity()).setOkClicked(true);
}
item_edittext = (EditText) view.findViewById(R.id.item_edittext);
postfix_tv = (TextView) view.findViewById(R.id.postfix_tv);
wu_rela = (RelativeLayout) view.findViewById(R.id.wu_rela);
if_wu_tv = (TextView) view.findViewById(R.id.if_wu_tv);
keyboardview = (KeyboardView) view.findViewById(R.id.keyboard_view);
if_wu_tv.setText("若暂无" + "“" + itemName + "”," + "请点击...");
item_edittext.setHint("请输入" + itemName);
item_edittext.setText(itemValue);
Editable etext = item_edittext.getText();
Selection.setSelection(etext, etext.length());
item_edittext.addTextChangedListener(this);
ItemType itemType = writeItem.getItemType();
if (itemType.getPostfix() != null && !itemType.getPostfix().equals("")) {
postfix_tv.setVisibility(View.VISIBLE);
postfix_tv.setText(itemType.getPostfix());
}
if (itemType.getSysmbol() == 1) {
keyboardUtil = new KeyboardUtil(keyboardview, getActivity(), item_edittext, R.xml.symbols1);
} else if (itemType.getSysmbol() == 2) {
keyboardUtil = new KeyboardUtil(keyboardview, getActivity(),
item_edittext, R.xml.symbols2);
}
if (keyboardUtil != null) {
Util.hideSoftInputMethod(getActivity(), item_edittext);
keyboardUtil.showKeyboard();
}
if (itemType.isCanWu()) {
wu_rela.setVisibility(View.VISIBLE);
wu_rela.setOnClickListener(this);
}
if (writeItem.getItemKey().equals("sfz") && itemType.getSysmbol() == 1) {
isSfz = true;
}
}
@Override
public String getData() {
return item_edittext.getText().toString();
}
public void setHint(String itemName) {
item_edittext.setHint("请输入" + itemName);
}
@Override
public void onClick(View v) {
item_edittext.setText("无");
Editable ed = item_edittext.getText();
Selection.setSelection(ed, ed.length());
writeItem.setItemValue("无");
getActivity().finish();
}
@Override
public void afterTextChanged(Editable arg0) {
// TODO Auto-generated method stub
}
@Override
public void beforeTextChanged(CharSequence c, int arg1, int arg2, int arg3) {
}
@Override
public void onTextChanged(CharSequence c, int arg1, int arg2, int arg3) {
String s = c.toString().trim();
if (c == null || s.equals("")
|| (isSfz && !LegalityJudger.ShenFenHaoMaTip(s))) {
((FormWriteItemActivity) getActivity()).setOkClicked(false);
} else {
((FormWriteItemActivity) getActivity()).setOkClicked(true);
}
}
}
| [
"[email protected]"
] | |
e5aeb80d09992f9ad1e2c25d959c78869726a2a7 | f9f7f0b8f8666dee50cba2158b1ce64abceb0535 | /mini_compiler/src/main/java/com/jihan/mini_compiler/PayEntryVisitor.java | c629fdc5069104c375099dbca99799d81aa42cb0 | [
"MIT"
] | permissive | Jihannn/LearningDemo | 8c48811cf11645ad52216286b2c233e6f8c80a2f | f8003b849ef1752f0b3fbf3946151358fb1bd796 | refs/heads/master | 2020-07-02T02:37:57.141618 | 2019-08-31T05:37:07 | 2019-08-31T05:37:07 | 201,388,673 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,499 | java | package com.jihan.mini_compiler;
import com.squareup.javapoet.JavaFile;
import com.squareup.javapoet.TypeName;
import com.squareup.javapoet.TypeSpec;
import java.io.IOException;
import javax.annotation.processing.Filer;
import javax.lang.model.element.Modifier;
import javax.lang.model.type.TypeMirror;
import javax.lang.model.util.SimpleAnnotationValueVisitor7;
final class PayEntryVisitor extends SimpleAnnotationValueVisitor7<Void, Void> {
private final Filer FILER;
private String mPackageName = null;
PayEntryVisitor(Filer FILER) {
this.FILER = FILER;
}
@Override
public Void visitString(String s, Void p) {
mPackageName = s;
return p;
}
@Override
public Void visitType(TypeMirror t, Void p) {
generateJavaCode(t);
return p;
}
private void generateJavaCode(TypeMirror typeMirror) {
final TypeSpec targetActivity =
TypeSpec.classBuilder("WXPayEntryActivity")
.addModifiers(Modifier.PUBLIC)
.addModifiers(Modifier.FINAL)
.superclass(TypeName.get(typeMirror))
.build();
final JavaFile javaFile = JavaFile.builder(mPackageName + ".wxapi", targetActivity)
.addFileComment("微信支付入口文件")
.build();
try {
javaFile.writeTo(FILER);
} catch (IOException e) {
e.printStackTrace();
}
}
} | [
"[email protected]"
] | |
477ec3ac313fc2fab2c95fc12e06bd489167dbf2 | f7082b3d5ec81f1e3341adb9d0d94bbdbb4c37dc | /1. Fundamental-Level/Java/OOP-Bacis-June-2016/[EX]/05. Inheritance/src/problem4_MordorsCrueltyPlan/Main.java | 8cee5feb3457a01527b3f45a56e4a2727d14f4a7 | [] | no_license | krisdx/SoftUni | 0e5f368b83ca55ec25fce92e2aed86f59f8bff70 | 67eef32f60cd527e89dc05087a74a18ef93cf5c9 | refs/heads/master | 2021-01-24T10:32:23.173482 | 2017-03-08T07:26:32 | 2017-03-08T07:26:32 | 54,333,693 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,396 | java | package problem4_MordorsCrueltyPlan;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException {
Map<String, Integer> foods = new HashMap<>();
int gandalfMoood = 0;
initializeFoods(foods);
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String[] foodInput = reader.readLine().toLowerCase().split("\\s+");
for (String food : foodInput) {
if (foods.containsKey(food)){
gandalfMoood += foods.get(food);
} else {
gandalfMoood--;
}
}
System.out.println(gandalfMoood);
if (gandalfMoood < -5) {
System.out.println("Angry");
} else if (gandalfMoood >= -5 && gandalfMoood < 0 ) {
System.out.println("Sad");
} else if (gandalfMoood >= 0 && gandalfMoood < 15) {
System.out.println("Happy");
} else {
System.out.println("JavaScript");
}
}
private static void initializeFoods(Map<String, Integer> foods) {
foods.put("cram", 2);
foods.put("lembas", 3);
foods.put("apple", 1);
foods.put("melon", 1);
foods.put("honeycake", 5);
foods.put("mushrooms", -10);
}
} | [
"[email protected]"
] | |
750fe64d37f5658bd943875e01ecc991079a7156 | 6a61e393dfad6a6cefdf4f06798917c3a7aee971 | /external-programs/jbook/Misc_ThrowingException.java | 5807fa23e7f56e23bb701e8560f6898c8115eee1 | [] | no_license | kframework/java-semantics | 388bead15b594f3b2478441a5d95c02d7a0ccbf6 | f27067ee7a38d236499992eed1b48064e70680fa | refs/heads/master | 2021-09-22T20:42:43.662165 | 2021-09-15T19:53:33 | 2021-09-15T19:53:33 | 11,711,471 | 14 | 7 | null | 2016-03-16T22:03:02 | 2013-07-27T21:42:38 | Java | UTF-8 | Java | false | false | 944 | java | // Example adapted from
// http://www.thrishna.com/java/examples/java/exception/ThrowingException.htm
public class Misc_ThrowingException {
public void foo( boolean throwException ) throws Exception{
System.out.println( "in foo" );
if( throwException ){
System.out.println( "throwing exception" );
throw new Exception( "testing exception" );
}
System.out.println( "after throwing exception" );
}
public static void main( String[] arg ){
Misc_ThrowingException tester = new Misc_ThrowingException();
try{
System.out.println( "calling foo" );
tester.foo( false );
System.out.println( "called foo" );
System.out.println( "calling foo" );
tester.foo( true );
System.out.println( "will not reach here" );
}catch( Exception e ){
System.out.println( "got exception " + e + e.toString() );
}
}
}
| [
"[email protected]"
] | |
83678c19cc6db6435ca317687fad74231d796c93 | ea3f45400ac04f1c148beb849619327a964fc5ed | /src/standardtest/may2017/prob2/LibraryMember.java | 71bfd5076bc92fd19ef1b20c1bbd896f5a1eff1e | [] | no_license | vorleakchy/mpp | d12053c0b6a39e5a3b16b4cf7fc4900c70f58a56 | 53ea54e336099ebe83fab3394ea523314f8016e6 | refs/heads/master | 2020-04-08T14:18:30.863590 | 2018-12-20T00:00:39 | 2018-12-20T00:00:39 | 159,431,261 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 818 | java | package standardtest.may2017.prob2;
public class LibraryMember {
private String memberId;
private String firstName;
private String lastName;
private String phone;
private CheckoutRecord checkoutRecord;
public LibraryMember(String memberId, String firstName, String lastName, String phone) {
super();
this.memberId = memberId;
this.firstName = firstName;
this.lastName = lastName;
this.phone = phone;
}
public String getMemberId() {
return memberId;
}
public String getFirstName() {
return firstName;
}
public String getLastName() {
return lastName;
}
public String getPhone() {
return phone;
}
public CheckoutRecord getCheckoutRecord() {
return checkoutRecord;
}
public void setCheckoutRecord(CheckoutRecord checkoutRecord) {
this.checkoutRecord = checkoutRecord;
}
}
| [
"[email protected]"
] | |
b2a274b46b8ed0d8fb456f4703384d288bc07fc4 | da1cb92616cc7e876bceb2a5e9593e815d4399b8 | /app/src/com/shushan/thomework101/HttpHelper/service/view/GoAcceptView.java | 99b4eece2e29247d759c9e7df0147ce93d9b6d22 | [] | no_license | nimingangle520/thomework101 | ad6d6be17c5c1e657bcc6fd00950c43e53d83337 | 508024cec1841c5a8eae75e1f573aa66f1a378c7 | refs/heads/master | 2020-04-05T07:03:55.327309 | 2018-11-10T08:52:32 | 2018-11-10T08:52:32 | 150,107,769 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 254 | java | package com.shushan.thomework101.HttpHelper.service.view;
import com.shushan.thomework101.HttpHelper.service.entity.orders.GoAccept;
public interface GoAcceptView extends View {
void onSuccess(GoAccept goAccept);
void onError(String result);
}
| [
"[email protected]"
] | |
ee79aaff4354f91f4f7027379293e7af803f766b | c81dd37adb032fb057d194b5383af7aa99f79c6a | /java/com/facebook/ads/redexgen/X/FS.java | 5fa2492718a83ae5c1d05691745105bbdf31108d | [] | no_license | hongnam207/pi-network-source | 1415a955e37fe58ca42098967f0b3307ab0dc785 | 17dc583f08f461d4dfbbc74beb98331bf7f9e5e3 | refs/heads/main | 2023-03-30T07:49:35.920796 | 2021-03-28T06:56:24 | 2021-03-28T06:56:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 245 | java | package com.facebook.ads.redexgen.X;
import android.os.Handler;
public final class FS {
public final Handler A00;
public final FW A01;
public FS(Handler handler, FW fw) {
this.A00 = handler;
this.A01 = fw;
}
}
| [
"[email protected]"
] | |
3a84b964c47f563a74c157ffb16114699ab898d1 | 34221f3f7738d7a33c693e580dc6a99789349cf3 | /app/src/main/java/defpackage/awt.java | d669d8a826352ddc7ee4f8aa00a7ff0c48d1f191 | [] | no_license | KobeGong/TasksApp | 0c7b9f3f54bc4be755b1f605b41230822d6f9850 | aacdd5cbf0ba073460797fa76f1aaf2eaf70f08e | refs/heads/master | 2023-08-16T07:11:13.379876 | 2021-09-25T17:38:57 | 2021-09-25T17:38:57 | 374,659,931 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,493 | java | package defpackage;
/* renamed from: awt reason: default package */
/* compiled from: PG */
public final class awt {
@java.lang.Deprecated
public static final defpackage.ayd a = new defpackage.ayd("ClearcutLogger.API", c, b);
private static defpackage.ayh b = new defpackage.ayh(0);
private static defpackage.ayf c = new defpackage.axn();
/* access modifiers changed from: private */
public final java.lang.String d;
/* access modifiers changed from: private */
public final int e;
/* access modifiers changed from: private */
public java.lang.String f;
/* access modifiers changed from: private */
public int g;
/* access modifiers changed from: private */
public java.lang.String h;
private java.lang.String i;
/* access modifiers changed from: private */
public final defpackage.awy j;
/* access modifiers changed from: private */
public final defpackage.bex k;
/* access modifiers changed from: private */
public defpackage.awx l;
/* access modifiers changed from: private */
public final defpackage.awv m;
@java.lang.Deprecated
public awt(android.content.Context context, java.lang.String str, java.lang.String str2) {
this(context, str, str2, new defpackage.axc(context), defpackage.bey.a, new defpackage.axk(context));
}
private awt(android.content.Context context, java.lang.String str, java.lang.String str2, defpackage.awy awy, defpackage.bex bex, defpackage.awv awv) {
this.g = -1;
this.d = context.getPackageName();
this.e = a(context);
this.g = -1;
this.f = str;
this.h = str2;
this.i = null;
this.j = awy;
this.k = bex;
this.l = new defpackage.awx();
this.m = awv;
}
private static int a(android.content.Context context) {
boolean z = false;
try {
return context.getPackageManager().getPackageInfo(context.getPackageName(), 0).versionCode;
} catch (android.content.pm.PackageManager.NameNotFoundException e2) {
android.util.Log.wtf("ClearcutLogger", "This can't happen.");
return z;
}
}
static /* synthetic */ java.lang.String d(defpackage.awt awt) {
return null;
}
static /* synthetic */ int a() {
return 0;
}
public static /* synthetic */ boolean b() {
return false;
}
static /* synthetic */ int[] c() {
return null;
}
}
| [
"[email protected]"
] | |
cade2eca566c3469af4ea6b7abf45bd31c2d6262 | 9e658c5c4939060b32443bd18d717854a5f38169 | /activiti-spring/src/main/java/org/activiti/spring/SpringEntityManagerSessionFactory.java | 995206961d057503cb358c5974ae2c8934b4ca2c | [
"Apache-2.0"
] | permissive | joshlong-attic/javaconfig-ftw | 08f724e785598a950d81529d58b0bf6ce7e1282a | a394c75e8c99071adcadcfb71a3bc4841a4de744 | refs/heads/master | 2023-01-05T13:16:14.443223 | 2013-09-12T03:00:34 | 2013-09-12T03:00:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,295 | java | /* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.activiti.spring;
import org.activiti.engine.impl.interceptor.Session;
import org.activiti.engine.impl.interceptor.SessionFactory;
import org.activiti.engine.impl.variable.EntityManagerSession;
import org.activiti.engine.impl.variable.EntityManagerSessionImpl;
import org.springframework.orm.jpa.EntityManagerFactoryUtils;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
/**
* Session Factory for {@link EntityManagerSession}.
*
* Must be used when the {@link EntityManagerFactory} is managed by Spring.
* This implementation will retrieve the {@link EntityManager} bound to the
* thread by Spring in case a transaction already started.
*
* @author Joram Barrez
*/
public class SpringEntityManagerSessionFactory implements SessionFactory {
protected EntityManagerFactory entityManagerFactory;
protected boolean handleTransactions;
protected boolean closeEntityManager;
public SpringEntityManagerSessionFactory(Object entityManagerFactory, boolean handleTransactions, boolean closeEntityManager) {
this.entityManagerFactory = (EntityManagerFactory) entityManagerFactory;
this.handleTransactions = handleTransactions;
this.closeEntityManager = closeEntityManager;
}
public Class< ? > getSessionType() {
return EntityManagerFactory.class;
}
public Session openSession() {
EntityManager entityManager = EntityManagerFactoryUtils.getTransactionalEntityManager(entityManagerFactory);
if (entityManager == null) {
return new EntityManagerSessionImpl(entityManagerFactory, handleTransactions, closeEntityManager);
}
return new EntityManagerSessionImpl(entityManagerFactory, entityManager, false, false);
}
}
| [
"[email protected]"
] | |
7a5e76e6817fee13a1eee8fb5de696f3e1e98509 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/23/23_c19ce7b1d5055a5bbb2bd34623c1a7acd729e34e/EventModel/23_c19ce7b1d5055a5bbb2bd34623c1a7acd729e34e_EventModel_s.java | 6e632e4c1e91c6d9eecd1c9428ddc7fe17d2902a | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 4,946 | 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.
*/
/* $Id$ */
package org.apache.fop.events.model;
import java.io.File;
import java.io.IOException;
import java.io.Serializable;
import java.util.Iterator;
import java.util.Map;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Result;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerFactoryConfigurationError;
import javax.xml.transform.sax.SAXTransformerFactory;
import javax.xml.transform.sax.TransformerHandler;
import javax.xml.transform.stream.StreamResult;
import org.xml.sax.ContentHandler;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.AttributesImpl;
import org.apache.xmlgraphics.util.XMLizable;
/**
* Represents a whole event model that supports multiple event producers.
*/
public class EventModel implements Serializable, XMLizable {
private static final long serialVersionUID = 7468592614934605082L;
private Map producers = new java.util.LinkedHashMap();
/**
* Creates a new, empty event model
*/
public EventModel() {
}
/**
* Adds the model of an event producer to the event model.
* @param producer the event producer model
*/
public void addProducer(EventProducerModel producer) {
this.producers.put(producer.getInterfaceName(), producer);
}
/**
* Returns an iterator over the contained event producer models.
* @return an iterator (Iterator<EventProducerModel>)
*/
public Iterator getProducers() {
return this.producers.values().iterator();
}
/**
* Returns the model of an event producer with the given interface name.
* @param interfaceName the fully qualified name of the event producer
* @return the model instance for the event producer (or null if it wasn't found)
*/
public EventProducerModel getProducer(String interfaceName) {
return (EventProducerModel)this.producers.get(interfaceName);
}
/**
* Returns the model of an event producer with the given interface.
* @param clazz the interface of the event producer
* @return the model instance for the event producer (or null if it wasn't found)
*/
public EventProducerModel getProducer(Class clazz) {
return getProducer(clazz.getName());
}
/** {@inheritDoc} */
public void toSAX(ContentHandler handler) throws SAXException {
AttributesImpl atts = new AttributesImpl();
String elName = "event-model";
handler.startElement(null, elName, elName, atts);
Iterator iter = getProducers();
while (iter.hasNext()) {
((XMLizable)iter.next()).toSAX(handler);
}
handler.endElement(null, elName, elName);
}
private void writeXMLizable(XMLizable object, File outputFile) throws IOException {
Result res = new StreamResult(outputFile);
try {
SAXTransformerFactory tFactory
= (SAXTransformerFactory)SAXTransformerFactory.newInstance();
TransformerHandler handler = tFactory.newTransformerHandler();
Transformer transformer = handler.getTransformer();
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
handler.setResult(res);
handler.startDocument();
object.toSAX(handler);
handler.endDocument();
} catch (TransformerConfigurationException e) {
throw new IOException(e.getMessage());
} catch (TransformerFactoryConfigurationError e) {
throw new IOException(e.getMessage());
} catch (SAXException e) {
throw new IOException(e.getMessage());
}
}
/**
* Saves this event model to an XML file.
* @param modelFile the target file
* @throws IOException if an I/O error occurs
*/
public void saveToXML(File modelFile) throws IOException {
writeXMLizable(this, modelFile);
}
}
| [
"[email protected]"
] | |
04740e6f25308b33d9ac0d71d8f631ba9615d5ce | d2eee6e9a3ad0b3fd2899c3d1cf94778615b10cb | /PROMISE/archives/synapse/1.1/org/apache/synapse/config/xml/XSLTMediatorFactory.java | 7e9bfca260e8f5e6ddcc6129e63976288cc41cf5 | [] | 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 | 3,522 | java | package org.apache.synapse.config.xml;
import org.apache.axiom.om.OMAttribute;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.xpath.AXIOMXPath;
import org.apache.synapse.config.xml.OMElementUtils;
import org.apache.synapse.Mediator;
import org.apache.synapse.mediators.transform.XSLTMediator;
import org.apache.synapse.config.xml.XMLConfigConstants;
import org.apache.synapse.config.xml.AbstractMediatorFactory;
import org.apache.synapse.config.xml.MediatorPropertyFactory;
import org.jaxen.JaxenException;
import javax.xml.namespace.QName;
import java.util.Iterator;
/**
* Creates a XSLT mediator from the given XML
*
* <pre>
* <xslt key="property-key" [source="xpath"]>
* <property name="string" (value="literal" | expression="xpath")/>*
* </transform>
* </pre>
*/
public class XSLTMediatorFactory extends AbstractMediatorFactory {
private static final QName TAG_NAME = new QName(XMLConfigConstants.SYNAPSE_NAMESPACE, "xslt");
public QName getTagQName() {
return TAG_NAME;
}
public Mediator createMediator(OMElement elem) {
XSLTMediator transformMediator = new XSLTMediator();
OMAttribute attXslt = elem.getAttribute(ATT_KEY);
OMAttribute attSource = elem.getAttribute(ATT_SOURCE);
if (attXslt != null) {
transformMediator.setXsltKey(attXslt.getAttributeValue());
} else {
handleException("The 'key' attribute is required for the XSLT mediator");
}
if (attSource != null) {
try {
transformMediator.setSourceXPathString(attSource.getAttributeValue());
AXIOMXPath xp = new AXIOMXPath(attSource.getAttributeValue());
OMElementUtils.addNameSpaces(xp, elem, log);
transformMediator.setSource(xp);
} catch (JaxenException e) {
handleException("Invalid XPath specified for the source attribute : " +
attSource.getAttributeValue());
}
}
processTraceState(transformMediator, elem);
Iterator iter = elem.getChildrenWithName(FEATURE_Q);
while (iter.hasNext()) {
OMElement featureElem = (OMElement) iter.next();
OMAttribute attName = featureElem.getAttribute(ATT_NAME);
OMAttribute attValue = featureElem.getAttribute(ATT_VALUE);
if (attName != null && attValue != null) {
String name = attName.getAttributeValue();
String value = attValue.getAttributeValue();
if (name != null && value != null) {
if ("true".equals(value.trim())) {
transformMediator.addFeature(name.trim(),
true);
} else if ("false".equals(value.trim())) {
transformMediator.addFeature(name.trim(),
false);
} else {
handleException("The feature must have value true or false");
}
} else {
handleException("The valid values for both of the name and value are need");
}
} else {
handleException("Both of the name and value attribute are required for a feature");
}
}
transformMediator.addAllProperties(
MediatorPropertyFactory.getMediatorProperties(elem));
return transformMediator;
}
}
| [
"[email protected]"
] | |
5f1293945014dc8c51aac2132c5170f62ca1c1ac | c673d3e107bdcb7e986c5074d6f7fd587e7e44e3 | /gmall-MBG/src/main/java/com/duheng/gmall/ums/service/impl/MemberStatisticsInfoServiceImpl.java | f687388dc9160a692e60c43d53a9541a48de53ff | [] | no_license | UserJustins/Gmalls | 2f47a195b529fb1c10ac8d7248d314b90cf3dc08 | 7c7b28dcad50a842b805ea32999d4029a647afa5 | refs/heads/master | 2022-06-23T07:03:26.384770 | 2020-02-23T08:16:33 | 2020-02-23T08:16:33 | 234,525,787 | 0 | 0 | null | 2022-06-21T02:50:45 | 2020-01-17T10:26:25 | Java | UTF-8 | Java | false | false | 616 | java | package com.duheng.gmall.ums.service.impl;
import com.duheng.gmall.ums.entity.MemberStatisticsInfo;
import com.duheng.gmall.ums.mapper.MemberStatisticsInfoMapper;
import com.duheng.gmall.ums.service.MemberStatisticsInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 会员统计信息 服务实现类
* </p>
*
* @author DuHeng
* @since 2020-01-20
*/
@Service
public class MemberStatisticsInfoServiceImpl extends ServiceImpl<MemberStatisticsInfoMapper, MemberStatisticsInfo> implements MemberStatisticsInfoService {
}
| [
"[email protected]"
] | |
e58a33fb80c349948b7b4d4ca12a4e2eb1ed231f | ed3cb95dcc590e98d09117ea0b4768df18e8f99e | /project_1_2/src/b/g/i/e/Calc_1_2_16845.java | c41d07661c9e9f4d7bdd8675e0c887b56b5715f5 | [] | no_license | chalstrick/bigRepo1 | ac7fd5785d475b3c38f1328e370ba9a85a751cff | dad1852eef66fcec200df10083959c674fdcc55d | refs/heads/master | 2016-08-11T17:59:16.079541 | 2015-12-18T14:26:49 | 2015-12-18T14:26:49 | 48,244,030 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 134 | java | package b.g.i.e;
public class Calc_1_2_16845 {
/** @return the sum of a and b */
public int add(int a, int b) {
return a+b;
}
}
| [
"[email protected]"
] | |
79bfbd82e53992a62b1a3636085d683f870b6ab5 | 2bcb01f53707121184e95b2bbadf6e7ae4f70469 | /src/main/java/org/vertx/java/core/impl/BlockingAction.java | 220b9dd97275e190faf88827100b2106db20defe | [
"Apache-2.0"
] | permissive | yeison/vert.x | 14fff1084621bff55e4051eaf751dd3107d9122d | 3cf2ffabaf2b01773b237c7f9b5ecd645329de31 | refs/heads/master | 2021-01-21T01:26:47.185308 | 2012-03-01T20:27:41 | 2012-03-01T20:27:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,904 | java | /*
* Copyright 2011-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.vertx.java.core.impl;
import org.vertx.java.core.logging.Logger;
import org.vertx.java.core.logging.impl.LoggerFactory;
/**
* <p>Internal class used to run specific blocking actions on the worker pool.</p>
*
* <p>This class shouldn't be used directlty from user applications.</p>
*
* @author <a href="http://tfox.org">Tim Fox</a>
*/
public abstract class BlockingAction<T> extends SynchronousAction<T> {
private static final Logger log = LoggerFactory.getLogger(BlockingAction.class);
/**
* Run the blocking action using a thread from the worker pool.
*/
protected void run() {
final Context context = VertxInternal.instance.getContext();
Runnable runner = new Runnable() {
public void run() {
try {
final T result = action();
context.execute(new Runnable() {
public void run() {
setResult(result);
}
});
} catch (final Exception e) {
context.execute(new Runnable() {
public void run() {
setException(e);
}
});
} catch (Throwable t) {
VertxInternal.instance.reportException(t);
}
}
};
VertxInternal.instance.getBackgroundPool().execute(runner);
}
}
| [
"[email protected]"
] | |
3b094f029554d2a6cfce12a3ef04444fcfa7c1ff | fbf7ad0dc9e5b7ac88aa99f77347c15ebe4b521a | /JavaWork/JSP06_ServletInitParam/src/com/lec/servlet/InitServlet.java | d80f6a5e0a321e1f3081de03554b53c806218c5d | [] | no_license | GoForWalk/JavaPractice | d86a361f20c9a4e085754814083233595e3bd0de | 3d838769821193263d4c55195f069ddac67fe041 | refs/heads/master | 2023-05-14T03:01:14.406318 | 2020-06-22T05:21:34 | 2020-06-22T05:21:34 | 259,175,380 | 0 | 0 | null | 2021-06-07T18:48:41 | 2020-04-27T01:41:18 | Java | UTF-8 | Java | false | false | 1,409 | java | package com.lec.servlet;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebInitParam;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet(urlPatterns = {"/initS"},
initParams = {
@WebInitParam(name = "id", value = "test11"),
@WebInitParam(name = "pw", value = "1000"),
@WebInitParam(name = "local", value = "busan"),
}
)
public class InitServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
public InitServlet() {
super();
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// ServletConfig의 메소드를 사용합니다.
String id = getInitParameter("id");
String pw = getInitParameter("pw");
String local = getInitParameter("local");
response.setContentType("text/html charset=utf-8");
PrintWriter out = response.getWriter();
out.println("id: " + id + "<br>");
out.println("pw: " + pw + "<br>");
out.println("local: " + local + "<br>");
out.close();
}
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doGet(request, response);
}
}
| [
"[email protected]"
] | |
d9f37477d9ffb67271daafc38ca88118be3c4686 | 69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e | /methods/Method_29986.java | e54e95c87254f313c5652b280d70a7545ea124fe | [] | no_license | P79N6A/icse_20_user_study | 5b9c42c6384502fdc9588430899f257761f1f506 | 8a3676bc96059ea2c4f6d209016f5088a5628f3c | refs/heads/master | 2020-06-24T08:25:22.606717 | 2019-07-25T15:31:16 | 2019-07-25T15:31:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 800 | java | @AfterPermissionGranted(REQUEST_CODE_CAPTURE_IMAGE_PERMISSION) private void pickOrCaptureImage(){
if (mImageUris.size() >= Broadcast.MAX_IMAGES_SIZE) {
ToastUtils.show(R.string.broadcast_send_add_image_too_many,getActivity());
return;
}
if (EffortlessPermissions.hasPermissions(this,PERMISSIONS_CAPTURE_IMAGE)) {
pickOrCaptureImageWithPermission();
}
else if (EffortlessPermissions.somePermissionPermanentlyDenied(this,PERMISSIONS_CAPTURE_IMAGE)) {
ToastUtils.show(R.string.broadcast_send_capture_image_permission_permanently_denied_message,getActivity());
pickImage();
}
else {
EffortlessPermissions.requestPermissions(this,R.string.broadcast_send_capture_image_permission_request_message,REQUEST_CODE_CAPTURE_IMAGE_PERMISSION,PERMISSIONS_CAPTURE_IMAGE);
}
}
| [
"[email protected]"
] | |
37f690f9dbaf54070acd1de953c29074941562ec | 78b989e34803b9d53f1a43d0fae4e3d01f0bc7e0 | /UWS-MPTT_dp-1.0.0/src/dataprotect/ui/multiRenderTable/MyDefaultTableModelForTabX1.java | 2800a4173523effc533c7347957f05b914a8f8cb | [] | no_license | zhbaics/UWS-MTPP_dp | e2104c7e241a20f3f3ba9c6a26ab56177a46cbd6 | 11e7264ddfbd639016906bd29cac916b69b03860 | refs/heads/master | 2016-09-05T16:01:29.568782 | 2014-10-30T01:14:11 | 2014-10-30T01:14:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,135 | java | /*
* MyDefaultTableModelForTabX1.java
*
* Created on 2008/8�/�20, ��morning��11:46
*
* To change this template, choose Tools | Options and locate the template under
* the Source Creation and Management node. Right-click the template and choose
* Open. You can then make changes to the template in the Source Editor.
*/
package dataprotect.ui.multiRenderTable;
import javax.swing.table.*;
/**
*
* @author Administrator
*/
public class MyDefaultTableModelForTabX1 extends DefaultTableModel{
Object[] label = null;
public MyDefaultTableModelForTabX1(Object[] header,int colNum,Object[] _label ){
super( header,colNum );
label = _label;
}
public MyDefaultTableModelForTabX1( Object[][] data,Object[] header,Object[] _label ){
super( data,header );
label = _label;
}
@Override public Object getValueAt(int row, int col){
return super.getValueAt(row,col);
}
@Override public boolean isCellEditable(int row, int col){
if( col==0 ){
return true;
}else{
return false;
}
}
}
| [
"[email protected]"
] | |
597ebc537fc77813179bc2e62390cbdab106ca4d | 4bf68f8a687249c15bf14550b75a48a796517a0e | /src/PhotoQuiz.java | 06df89bf71fdc65422341feb985d0f2c910ae78e | [] | no_license | LucasKhattar/EclipseLucasLvl1 | b6ff986fc4a721830a76c93f1d2a2ac7f15d24c1 | feffe6668df9b0a80a0006378aa3066afd12e79b | refs/heads/master | 2020-04-04T07:19:29.047537 | 2017-08-04T02:56:39 | 2017-08-04T02:56:39 | 46,099,354 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,722 | java |
// Copyright Wintriss Technical Schools 2013
import java.awt.Component;
import java.awt.Frame;
import java.net.MalformedURLException;
import java.net.URL;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
public class PhotoQuiz {
public static void main(String[] args) throws Exception {
Frame quizWindow = new Frame();
quizWindow.setVisible(true);
String guy = "http://www.corrie.net/kabin/archive/1999/briggs_johnny2.jpg";
Component image;
image = createImage(guy);
quizWindow.add(image);
quizWindow.pack();
String name = JOptionPane.showInputDialog(null, "What is this mans name?");
if (name.equals("Mike Baldwin")) {
System.out.println("Correct!");
}
else {
System.out.println("Incorrect!");
}
quizWindow.remove(image);
String starwars = "https://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/Star_Wars_Logo.svg/2000px-Star_Wars_Logo.svg.png";
image = createImage(starwars);
quizWindow.add(image);
quizWindow.pack();
String war = JOptionPane.showInputDialog(null, "What is the title of this new episode in the series?");
if (war.equalsIgnoreCase("The Force Awakens")) {
JOptionPane.showMessageDialog(null, "Corrcet!");
}
else {
JOptionPane.showMessageDialog(null, "Incorrect!");
}
}
private static Component createImage(String imageUrl) throws MalformedURLException {
URL url = new URL(imageUrl);
Icon icon = new ImageIcon(url);
JLabel imageLabel = new JLabel(icon);
return imageLabel;
}
/* OPTIONAL */
// *14. add scoring to your quiz
// *15. make something happen when mouse enters image (imageComponent.addMouseMotionListener())
}
| [
"[email protected]"
] | |
2bc2dfa26d3ab83614466ae0c34f95b4eebf0dc0 | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XWIKI-13288-13-9-FEMO-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/store/hibernate/query/HqlQueryExecutor_ESTest.java | 293b0299609d8724c93f8b0fba099d64e85a82c1 | [] | 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 | 574 | java | /*
* This file was automatically generated by EvoSuite
* Sun Apr 05 10:04:57 UTC 2020
*/
package com.xpn.xwiki.store.hibernate.query;
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 HqlQueryExecutor_ESTest extends HqlQueryExecutor_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
| [
"[email protected]"
] | |
3a54c62d9d74ea39700c2b83797cb4f6a18f44f3 | 39eb39c6543fffe2248f55b33f11177ffcd169e3 | /src/main/java/com/google/gson/emul/com/google/gson/JsonParseException.java | 7e9c8b66307aace7e2f5096d233168c4f4ebf8f3 | [
"Apache-2.0"
] | permissive | akbertram/gson-gwt | becb0cbc96a1004c43414cd7d66e6e9c62997241 | eb79a39ed180dbfb01927a0bcd68b9bccacdfb20 | refs/heads/master | 2021-01-18T23:14:20.482653 | 2016-07-12T10:33:55 | 2016-07-12T10:33:55 | 1,640,086 | 1 | 0 | null | 2013-07-10T22:53:49 | 2011-04-20T11:41:26 | Java | UTF-8 | Java | false | false | 1,678 | java | /*
* Copyright (C) 2011 bedatadriven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.gson;
public final class JsonParseException extends RuntimeException {
/**
* Creates exception with the specified message. If you are wrapping another exception, consider
* using {@link #JsonParseException(String, Throwable)} instead.
*
* @param msg error message describing a possible cause of this exception.
*/
public JsonParseException(String msg) {
super(msg);
}
/**
* Creates exception with the specified message and cause.
*
* @param msg error message describing what happened.
* @param cause root exception that caused this exception to be thrown.
*/
public JsonParseException(String msg, Throwable cause) {
super(msg, cause);
}
/**
* Creates exception with the specified cause. Consider using
* {@link #JsonParseException(String, Throwable)} instead if you can describe what happened.
*
* @param cause root exception that caused this exception to be thrown.
*/
public JsonParseException(Throwable cause) {
super(cause);
}
}
| [
"[email protected]"
] | |
00c3662a69321479b838c789e304cb287d488bc9 | 8af1164bac943cef64e41bae312223c3c0e38114 | /results-java/JetBrains--intellij-community/1e937add5f846a026373c06f978efdf6cff2dada/before/StartStopMacroRecordingAction.java | ecfa422e8e79992ebf3487349d66f044616cda54 | [] | 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 | 1,989 | java | /*
* Copyright 2000-2009 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.ide.actionMacro.actions;
import com.intellij.ide.IdeBundle;
import com.intellij.ide.actionMacro.ActionMacroManager;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.DataConstants;
import com.intellij.openapi.actionSystem.PlatformDataKeys;
import com.intellij.openapi.project.DumbAware;
/**
* @author max
*/
public class StartStopMacroRecordingAction extends AnAction implements DumbAware {
public void update(AnActionEvent e) {
boolean editorAvailable = e.getDataContext().getData(DataConstants.EDITOR) != null;
boolean isRecording = ActionMacroManager.getInstance().isRecording();
e.getPresentation().setEnabled(editorAvailable || isRecording);
e.getPresentation().setText(isRecording
? IdeBundle.message("action.stop.macro.recording")
: IdeBundle.message("action.start.macro.recording"));
}
public void actionPerformed(AnActionEvent e) {
if (!ActionMacroManager.getInstance().isRecording() ) {
final ActionMacroManager manager = ActionMacroManager.getInstance();
manager.startRecording(IdeBundle.message("macro.noname"));
}
else {
ActionMacroManager.getInstance().stopRecording(PlatformDataKeys.PROJECT.getData(e.getDataContext()));
}
}
} | [
"[email protected]"
] | |
b29370d0abd559cd835b172e247a4825e25be6bd | 53d677a55e4ece8883526738f1c9d00fa6560ff7 | /com/tencent/tencentmap/mapsdk/maps/a/gh$6.java | 8dff54e7ee89eefd5bd6461343c013685d4a4fde | [] | no_license | 0jinxing/wechat-apk-source | 544c2d79bfc10261eb36389c1edfdf553d8f312a | f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d | refs/heads/master | 2020-06-07T20:06:03.580028 | 2019-06-21T09:17:26 | 2019-06-21T09:17:26 | 193,069,132 | 9 | 4 | null | null | null | null | UTF-8 | Java | false | false | 1,103 | java | package com.tencent.tencentmap.mapsdk.maps.a;
import com.tencent.map.lib.gl.JNI;
import com.tencent.matrix.trace.core.AppMethodBeat;
import javax.microedition.khronos.opengles.GL10;
class gh$6
implements gm.a
{
gh$6(gh paramgh, int paramInt1, String paramString, double paramDouble1, double paramDouble2, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6, boolean paramBoolean1, boolean paramBoolean2, boolean paramBoolean3, boolean paramBoolean4, int paramInt2, int paramInt3)
{
}
public void a(GL10 paramGL10)
{
AppMethodBeat.i(99045);
if (gh.a(this.q) != 0L)
gh.b(this.q).nativeUpdateMarkerInfo(gh.a(this.q), this.a, this.b, this.c, this.d, this.e, this.f, this.g, this.h, this.i, this.j, this.k, this.l, this.m, this.n, this.o, this.p);
AppMethodBeat.o(99045);
}
}
/* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes8-dex2jar.jar
* Qualified Name: com.tencent.tencentmap.mapsdk.maps.a.gh.6
* JD-Core Version: 0.6.2
*/ | [
"[email protected]"
] | |
684e8af7213ffd2ad40b982f4d26f773e542b7df | 180e78725121de49801e34de358c32cf7148b0a2 | /dataset/protocol1/commons-lang/learning/7268/AbstractCircuitBreaker.java | b2e5ed3852902492a5e2d0a622db2ef4fc8eb1a6 | [] | no_license | ASSERT-KTH/synthetic-checkstyle-error-dataset | 40e8d1e0a7ebe7f7711def96a390891a6922f7bd | 40c057e1669584bfc6fecf789b5b2854660222f3 | refs/heads/master | 2023-03-18T12:50:55.410343 | 2019-01-25T09:54:39 | 2019-01-25T09:54:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,983 | 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.commons.lang3.concurrent;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.util.concurrent.atomic.AtomicReference;
/**
* Base class for circuit breakers.
*
* @param <T> the type of the value monitored by this circuit breaker
* @since 3.5
*/
public abstract class AbstractCircuitBreaker<T> implements CircuitBreaker<T> {
/**
* The name of the <em>open</em> property as it is passed to registered
* change listeners.
*/
public static final String PROPERTY_NAME = "open";
/** The current state of this circuit breaker. */
protected final AtomicReference<State> state = new AtomicReference<>(State.CLOSED);
/** An object for managing change listeners registered at this instance. */
private final PropertyChangeSupport changeSupport;
/**
* Creates an {@code AbstractCircuitBreaker}. It also creates an internal {@code PropertyChangeSupport}.
*/
public AbstractCircuitBreaker() {
changeSupport = new PropertyChangeSupport (this);
}
/**
* {@inheritDoc}
*/
@Override
public boolean isOpen() {
return isOpen(state.get());
}
/**
* {@inheritDoc}
*/
@Override
public boolean isClosed() {
return !isOpen();
}
/**
* {@inheritDoc}
*/
@Override
public abstract boolean checkState();
/**
* {@inheritDoc}
*/
@Override
public abstract boolean incrementAndCheckState(T increment);
/**
* {@inheritDoc}
*/
@Override
public void close() {
changeState(State.CLOSED);
}
/**
* {@inheritDoc}
*/
@Override
public void open() {
changeState(State.OPEN);
}
/**
* Converts the given state value to a boolean <em>open</em> property.
*
* @param state the state to be converted
* @return the boolean open flag
*/
protected static boolean isOpen(final State state) {
return state == State.OPEN;
}
/**
* Changes the internal state of this circuit breaker. If there is actually a change
* of the state value, all registered change listeners are notified.
*
* @param newState the new state to be set
*/
protected void changeState(final State newState) {
if (state.compareAndSet(newState.oppositeState(), newState)) {
changeSupport.firePropertyChange(PROPERTY_NAME, !isOpen(newState), isOpen(newState));
}
}
/**
* Adds a change listener to this circuit breaker. This listener is notified whenever
* the state of this circuit breaker changes. If the listener is
* <strong>null</strong>, it is silently ignored.
*
* @param listener the listener to be added
*/
public void addChangeListener(final PropertyChangeListener listener) {
changeSupport.addPropertyChangeListener(listener);
}
/**
* Removes the specified change listener from this circuit breaker.
*
* @param listener the listener to be removed
*/
public void removeChangeListener(final PropertyChangeListener listener) {
changeSupport.removePropertyChangeListener(listener);
}
/**
* An internal enumeration representing the different states of a circuit
* breaker. This class also contains some logic for performing state
* transitions. This is done to avoid complex if-conditions in the code of
* {@code CircuitBreaker}.
*/
protected enum State {
CLOSED {
/**
* {@inheritDoc}
*/
@Override
public State oppositeState() {
return OPEN;
}
},
OPEN {
/**
* {@inheritDoc}
*/
@Override
public State oppositeState() {
return CLOSED;
}
};
/**
* Returns the opposite state to the represented state. This is useful
* for flipping the current state.
*
* @return the opposite state
*/
public abstract State oppositeState();
}
}
| [
"[email protected]"
] | |
3d006946672c39f4163039f24a0ea8ab89094ba5 | dea04aa4c94afd38796e395b3707d7e98b05b609 | /Participant results/P7/Interaction-7/ArrayIntList_ES_2_AlreadyValued_Test.java | e2962e65da7298d6c34adeb43caa948f215d9583 | [] | no_license | PdedP/InterEvo-TR | aaa44ef0a4606061ba4263239bafdf0134bb11a1 | 77878f3e74ee5de510e37f211e907547674ee602 | refs/heads/master | 2023-04-11T11:51:37.222629 | 2023-01-09T17:37:02 | 2023-01-09T17:37:02 | 486,658,497 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,259 | java | /*
* This file was automatically generated by EvoSuite
* Tue Dec 14 12:20:46 GMT 2021
*/
package com.org.apache.commons.collections.primitives;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import com.org.apache.commons.collections.primitives.ArrayIntList;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true)
public class ArrayIntList_ES_2_AlreadyValued_Test extends ArrayIntList_ES_2_AlreadyValued_Test_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
ArrayIntList arrayIntList0 = new ArrayIntList();
// Undeclared exception!
try {
arrayIntList0.set(192, 1283);
fail("Expecting exception: IndexOutOfBoundsException");
} catch(IndexOutOfBoundsException e) {
//
// Should be at least 0 and less than 0, found 192
//
verifyException("com.org.apache.commons.collections.primitives.ArrayIntList", e);
}
}
}
| [
"[email protected]"
] | |
667d3456a4b211c5cda86c23cf664a29d646394e | 0ae199a25f8e0959734f11071a282ee7a0169e2d | /ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/operations/Mutate.java | fc488d901fceeb7c64bdde08c42e1e72e12436c2 | [
"Apache-2.0"
] | permissive | lishuai12/onosfw-L3 | 314d2bc79424d09dcd8f46a4c467bd36cfa9bf1b | e60902ba8da7de3816f6b999492bec2d51dd677d | refs/heads/master | 2021-01-10T08:09:56.279267 | 2015-11-06T02:49:00 | 2015-11-06T02:49:00 | 45,652,234 | 0 | 1 | null | 2016-03-10T22:30:45 | 2015-11-06T01:49:10 | Java | UTF-8 | Java | false | false | 2,850 | java | /*
* Copyright 2015 Open Networking Laboratory
*
* 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.onosproject.ovsdb.rfc.operations;
import static com.google.common.base.Preconditions.checkNotNull;
import java.util.List;
import org.onosproject.ovsdb.rfc.notation.Condition;
import org.onosproject.ovsdb.rfc.notation.Mutation;
import org.onosproject.ovsdb.rfc.schema.TableSchema;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* mutate operation.Refer to RFC 7047 Section 5.2.
*/
public final class Mutate implements Operation {
@JsonIgnore
private final TableSchema tableSchema;
private final String op;
private final List<Condition> where;
private final List<Mutation> mutations;
/**
* Constructs a Mutate object.
* @param schema TableSchema entity
* @param where the List of Condition entity
* @param mutations the List of Mutation entity
*/
public Mutate(TableSchema schema, List<Condition> where,
List<Mutation> mutations) {
checkNotNull(schema, "TableSchema cannot be null");
checkNotNull(mutations, "mutations cannot be null");
checkNotNull(where, "where cannot be null");
this.tableSchema = schema;
this.op = Operations.MUTATE.op();
this.where = where;
this.mutations = mutations;
}
/**
* Returns the mutations member of mutate operation.
* @return the mutations member of mutate operation
*/
public List<Mutation> getMutations() {
return mutations;
}
/**
* Returns the where member of mutate operation.
* @return the where member of mutate operation
*/
public List<Condition> getWhere() {
return where;
}
@Override
public String getOp() {
return op;
}
@Override
public TableSchema getTableSchema() {
return tableSchema;
}
/**
* For the use of serialization.
* @return the table member of update operation
*/
@JsonProperty
public String getTable() {
return tableSchema.name();
}
}
| [
"[email protected]"
] | |
815d0ff7595694024d55282cfd09d6f6c26099ff | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/2/2_f00aadd83d6d0751e8961fd2acb926993529e964/ForumRssPage/2_f00aadd83d6d0751e8961fd2acb926993529e964_ForumRssPage_t.java | 68277fa738a4da7ef3bd7600ebd7fc5c9b39e136 | [] | 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 | 2,324 | java | package com.mick88.convoytrucking.forum;
import java.util.List;
import android.os.AsyncTask;
import android.os.Bundle;
import android.widget.ListView;
import com.mick88.convoytrucking.ConvoyTruckingApp;
import com.mick88.convoytrucking.R;
import com.mick88.convoytrucking.base.BaseFragment;
import com.mick88.convoytrucking.forum.rss.RssItem;
import com.mick88.convoytrucking.forum.rss.RssPostAdapter;
import com.mick88.convoytrucking.forum.rss.RssReader;
import com.mick88.convoytrucking.interfaces.OnDownloadListener;
import com.mick88.convoytrucking.interfaces.RefreshListener;
import com.mick88.util.FontApplicator;
import com.mick88.util.HttpUtils;
public class ForumRssPage extends BaseFragment
{
private static final String RSS_FEED_URL = "http://www.forum.convoytrucking.net/index.php?action=.xml;type=rss";
AsyncTask<?, ?, ?> downloadTask=null;
@Override
public void onCreate(Bundle arg0)
{
super.onCreate(arg0);
downloadData(null);
}
@Override
protected int selectLayout()
{
return R.layout.list;
}
@Override
public boolean refresh(final RefreshListener listener)
{
if (downloadTask != null) return false;
downloadData(new OnDownloadListener()
{
@Override
public void onDownloadFinished()
{
listener.onRefreshFinished();
}
});
return true;
}
@Override
protected void downloadData(final OnDownloadListener listener)
{
downloadTask = new AsyncTask<Void, Void, List<RssItem>>()
{
@Override
protected List<RssItem> doInBackground(Void... params)
{
try
{
return new RssReader(RSS_FEED_URL).read();
} catch (Exception e)
{
// TODO Auto-generated catch block
e.printStackTrace();
return null;
}
}
protected void onPostExecute(List<RssItem> result) {
downloadTask = null;
ListView listView = (ListView) findViewById(R.id.listView);
HttpUtils webHandler = new HttpUtils();
listView.setAdapter(new RssPostAdapter(activity, result, new FontApplicator(activity.getAssets(), ConvoyTruckingApp.FONT_ROBOTO_LIGHT), webHandler, webHandler));
if (listener != null) listener.onDownloadFinished();
};
protected void onCancelled() {
downloadTask = null;
};
}.execute();
}
}
| [
"[email protected]"
] | |
ba895cb477466dd44c4dac9ba31a5d64ed03b113 | 99a8722d0d16e123b69e345df7aadad409649f6c | /jpa/deferred/src/main/java/example/repo/Customer717Repository.java | 01f9935a1915e5ebcf8c0dbdb8e8beb0f153465c | [
"Apache-2.0"
] | permissive | spring-projects/spring-data-examples | 9c69a0e9f3e2e73c4533dbbab00deae77b2aacd7 | c4d1ca270fcf32a93c2a5e9d7e91a5592b7720ff | refs/heads/main | 2023-09-01T14:17:56.622729 | 2023-08-22T16:51:10 | 2023-08-24T19:48:04 | 16,381,571 | 5,331 | 3,985 | Apache-2.0 | 2023-08-25T09:02:19 | 2014-01-30T15:42:43 | Java | UTF-8 | Java | false | false | 280 | java | package example.repo;
import example.model.Customer717;
import java.util.List;
import org.springframework.data.repository.CrudRepository;
public interface Customer717Repository extends CrudRepository<Customer717, Long> {
List<Customer717> findByLastName(String lastName);
}
| [
"[email protected]"
] | |
ac00002da3f819912b557deddc625f0370478591 | ea5a965df058eaec721f2bd609505bf5ac3b7611 | /src/test/java/keywords/WatchList.java | 3af716c2ed32bef216121510ed2f4aa47cf6de40 | [] | no_license | scerios/IMDB | 3e1e28622dabe2aa830e04a1caec67da1159f8bc | 273da323af75b72698c7e6e228bb77cdc7417a5c | refs/heads/master | 2020-04-16T23:43:02.770547 | 2019-01-30T09:53:19 | 2019-01-30T09:53:19 | 166,022,911 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,881 | java | package keywords;
import org.openqa.selenium.By;
import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
public class WatchList {
private static long sumOfMoviesAdded = 1;
private static String convertedSum;
private static WebDriverWait waitDriver;
private static WebElement button;
private static WebElement added;
public static void addToWatchlist(WebDriver driver) {
waitDriver = new WebDriverWait(driver, Log.WAIT_TIMEOUT);
waitDriver.until(ExpectedConditions.presenceOfElementLocated(By.className("ribbonize")));
try {
added = driver.findElement(By.className("wl-ribbon standalone retina inWL"));
} catch (NoSuchElementException e) {
System.out.println("There is no element like that.");
}
button = driver.findElement(By.className("ribbonize"));
if (added == null) {
setSumOfMoviesAdded();
button.click();
}
}
public static void getWatchlistPage(WebDriver driver) {
waitDriver = new WebDriverWait(driver, Log.WAIT_TIMEOUT);
waitDriver.until(ExpectedConditions.presenceOfElementLocated(By.linkText("Watchlist")));
button = driver.findElement(By.linkText("Watchlist"));
button.click();
}
private static void setSumOfMoviesAdded() {
sumOfMoviesAdded++;
}
public static String convertSumOfMoviesAddedToString() {
return convertedSum = String.valueOf(sumOfMoviesAdded);
}
public static String getActualSumOfMoviesAdded(WebDriver driver) {
waitDriver = new WebDriverWait(driver, Log.WAIT_TIMEOUT);
waitDriver.until(ExpectedConditions.elementToBeClickable(By.className("count")));
button = driver.findElement(By.className("count"));
return button.getText();
}
}
| [
"[email protected]"
] | |
196f2eaad197bedf9d13daf264768e516ddf9927 | 5148293c98b0a27aa223ea157441ac7fa9b5e7a3 | /Method_Scraping/xml_scraping/NicadOutputFile_t1_beam/Nicad_t1_beam3531.java | b27671876d3804398d2a1f04fa794f206a700df9 | [] | no_license | ryosuke-ku/TestCodeSeacherPlus | cfd03a2858b67a05ecf17194213b7c02c5f2caff | d002a52251f5461598c7af73925b85a05cea85c6 | refs/heads/master | 2020-05-24T01:25:27.000821 | 2019-08-17T06:23:42 | 2019-08-17T06:23:42 | 187,005,399 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 453 | java | // clone pairs:13266:80%
// 19426:beam/sdks/java/core/src/main/java/org/apache/beam/sdk/io/range/ByteKeyRange.java
public class Nicad_t1_beam3531
{
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof ByteKeyRange)) {
return false;
}
ByteKeyRange other = (ByteKeyRange) o;
return Objects.equals(startKey, other.startKey) && Objects.equals(endKey, other.endKey);
}
} | [
"[email protected]"
] | |
85a77774933b915e13868f737148d9350a99b9bb | 647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4 | /com.tencent.mm/classes.jar/com/tencent/tencentmap/mapsdk/maps/model/UrlTileProvider.java | eed04d2f3305087f5218d021ec74f47da7f21621 | [] | 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 | 2,219 | java | package com.tencent.tencentmap.mapsdk.maps.model;
import com.tencent.map.tools.net.NetManager;
import com.tencent.map.tools.net.NetRequest.NetRequestBuilder;
import com.tencent.map.tools.net.NetResponse;
import com.tencent.map.tools.net.exception.NetErrorException;
import java.net.URL;
public abstract class UrlTileProvider
implements TileProvider
{
private final int mHeight;
private final int mWidth;
public UrlTileProvider()
{
this(256, 256);
}
public UrlTileProvider(int paramInt1, int paramInt2)
{
this.mWidth = paramInt1;
this.mHeight = paramInt2;
}
public final Tile getTile(int paramInt1, int paramInt2, int paramInt3)
{
Object localObject2 = null;
Object localObject1 = getTileUrl(paramInt1, paramInt2, paramInt3);
Tile localTile = NO_TILE;
if (localObject1 == null) {}
NetResponse localNetResponse;
do
{
while ((localObject1 == null) || (localObject1.length == 0))
{
return localTile;
localNetResponse = requestTileData(((URL)localObject1).toString());
localObject1 = localObject2;
if (localNetResponse != null)
{
if (!localNetResponse.available()) {
break;
}
localObject1 = localNetResponse.data;
}
}
return new Tile(this.mWidth, this.mHeight, (byte[])localObject1);
localObject1 = localObject2;
} while (!(localNetResponse.exception instanceof NetErrorException));
if (localNetResponse.statusCode == 404) {
return NO_TILE;
}
return new Tile(this.mWidth, this.mHeight, null);
}
public abstract URL getTileUrl(int paramInt1, int paramInt2, int paramInt3);
protected NetResponse requestTileData(String paramString)
{
try
{
paramString = NetManager.getInstance().builder().url(paramString).doGet();
return paramString;
}
catch (Exception paramString) {}
return null;
}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes11.jar
* Qualified Name: com.tencent.tencentmap.mapsdk.maps.model.UrlTileProvider
* JD-Core Version: 0.7.0.1
*/ | [
"[email protected]"
] | |
da1d7e3f74347efd8b009c0af63630e86cd0f4f1 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/33/33_9d556bb155b90787a532ff5f8246d892165619a8/RackMetaData/33_9d556bb155b90787a532ff5f8246d892165619a8_RackMetaData_t.java | f5a414833c990b2f6b444d13e59f80f4338e416f | [] | 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,813 | java | /*
* Copyright 2008-2013 Red Hat, Inc, and individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.torquebox.web.rack;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import org.jboss.as.server.deployment.AttachmentKey;
import org.jboss.as.server.deployment.DeploymentUnit;
import org.projectodd.polyglot.web.WebApplicationMetaData;
public class RackMetaData extends WebApplicationMetaData {
public static final AttachmentKey<RackMetaData> ATTACHMENT_KEY = AttachmentKey.create(RackMetaData.class);
public RackMetaData() {
}
@Override
public void attachTo(DeploymentUnit unit) {
super.attachTo( unit );
unit.putAttachment( ATTACHMENT_KEY, this );
}
public void setRackUpScript(String rackUpScript) {
this.rackUpScript = rackUpScript;
}
public String getRackUpScript(File root) throws IOException {
return this.rackUpScript;
}
public void setRackUpScriptLocation(String rackUpScriptLocation) {
this.rackUpScriptLocation = rackUpScriptLocation;
}
public String getRackUpScriptLocation() {
return this.rackUpScriptLocation;
}
public File getRackUpScriptFile(File root) {
if (this.rackUpScriptLocation == null) {
return null;
}
if (this.rackUpScriptLocation.startsWith( "/" ) || rackUpScriptLocation.matches( "^[A-Za-z]:.*" )) {
return new File( rackUpScriptLocation );
} else {
return new File( root, rackUpScriptLocation );
}
}
public void setRubyRuntimePoolName(String rubyRuntimePoolName) {
this.rubyRuntimePoolName = rubyRuntimePoolName;
}
public String getRubyRuntimePoolName() {
return this.rubyRuntimePoolName;
}
public void setRackApplicationFactoryName(String rackApplicationFactoryName) {
this.rackApplicationFactoryName = rackApplicationFactoryName;
}
public String getRackApplicationFactoryName() {
return this.rackApplicationFactoryName;
}
public void setRackApplicationPoolName(String rackApplicationPoolName) {
this.rackApplicationPoolName = rackApplicationPoolName;
}
public String getRackApplicationPoolName() {
return this.rackApplicationPoolName;
}
public String toString() {
return "[RackApplicationMetaData:" + System.identityHashCode( this ) + "\n rackupScriptLocation=" + this.rackUpScriptLocation + "\n rackUpScript="
+ this.rackUpScript + "\n host=" + getHosts() + "\n context=" + getContextPath() + "\n static=" + getStaticPathPrefix() + "]";
}
private String rackUpScript;
private String rackUpScriptLocation = "config.ru";
private String rubyRuntimePoolName;
private String rackApplicationFactoryName;
private String rackApplicationPoolName;
}
| [
"[email protected]"
] | |
5b16998866a651bbd71824e18bbdf390ebaa69f5 | 248616ff827c9cb823f185ed342c55f7e5564779 | /parking-gateway/src/main/java/com/protops/gateway/constants/PlaceHolder.java | 3ea642783f2c2eb2662f2b6b68926fa0005f03a2 | [] | no_license | Jinx009/jingan_1.0 | 8591358363c6c40c9a47cb56e70650498a2bee7b | 3374d47be289bdb2c6992c54f747c482d9e32c66 | refs/heads/master | 2022-12-21T04:54:06.793968 | 2019-12-25T05:30:50 | 2019-12-25T05:30:50 | 148,450,816 | 1 | 0 | null | 2022-12-16T02:40:16 | 2018-09-12T08:54:08 | Java | UTF-8 | Java | false | false | 513 | java | package com.protops.gateway.constants;
import java.util.ResourceBundle;
public enum PlaceHolder {
PLATENUMBER, INTIME, OUTTIME, MEMBERNUMBER, PARKIP, MOBILE, NAME, ADDRESS;
public String display() {
return getPlaceHolder(this.name());
}
private String getPlaceHolder(String key) {
return ResourceBundle.getBundle("placeholder").getString(key);
}
public static String display(String key) {
return ResourceBundle.getBundle("placeholder").getString(key);
}
} | [
"[email protected]"
] | |
9712545ca3882853bbdc02bfdde5e9d40421e263 | 8824eca5f1219697c13af33be464e58db236dac7 | /workspace/2021_02_19/src/黒本9_21/Service.java | 69d5dc632351a8a83f9425d43077a49562aa4750 | [] | no_license | KudoYumi/test | 774d019e6c38c28627823be7f3d5e404199f6315 | 3cb03a25ad5f591b5f832618468259922a5e4d5e | refs/heads/main | 2023-04-02T04:41:42.467743 | 2021-03-29T15:08:21 | 2021-03-29T15:08:21 | 319,495,604 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 294 | java | package 黒本9_21;
public class Service {
private Algorithm logic;
public void setLogic(Algorithm logic) {
this.logic = logic;
}
public void doProcess(String name) {
System.out.println("start");
logic.perform(name); //まだ実装されてない
System.out.println("end");
}
}
| [
"[email protected]"
] | |
392f1aeabfe2c6b8a22eef6cb40709e77ec0ed0e | 47615faf90f578bdad1fde4ef3edae469d995358 | /practise/SCJP5.0 猛虎出閘/第一次練習/unit 8/FileInputStreamTest4.java | aa9493461fe49a6f2c5618a284375b096422a683 | [] | no_license | hungmans6779/JavaWork-student-practice | dca527895e7dbb37aa157784f96658c90cbcf3bd | 9473ca55c22f30f63fcd1d84c2559b9c609d5829 | refs/heads/master | 2020-04-14T01:26:54.467903 | 2018-12-30T04:52:38 | 2018-12-30T04:52:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 360 | java | import java.io.*;
public class FileInputStreamTest4
{
public static void main(String argv[])
{
FileInputStream fin;
try
{
fin=new FileInputStream("FileInputStream.txt");
int i=fin.read();
while(i!=-1)
{
System.out.print((char)i);
i=fin.read();
}
fin.close();
}
catch(IOException ioe)
{
ioe.printStackTrace();
}
}
} | [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.