blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
390
content_id
stringlengths
40
40
detected_licenses
listlengths
0
35
license_type
stringclasses
2 values
repo_name
stringlengths
6
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
539 values
visit_date
timestamp[us]date
2016-08-02 21:09:20
2023-09-06 10:10:07
revision_date
timestamp[us]date
1990-01-30 01:55:47
2023-09-05 21:45:37
committer_date
timestamp[us]date
2003-07-12 18:48:29
2023-09-05 21:45:37
github_id
int64
7.28k
684M
star_events_count
int64
0
77.7k
fork_events_count
int64
0
48k
gha_license_id
stringclasses
13 values
gha_event_created_at
timestamp[us]date
2012-06-11 04:05:37
2023-09-14 21:59:18
gha_created_at
timestamp[us]date
2008-05-22 07:58:19
2023-08-28 02:39:21
gha_language
stringclasses
62 values
src_encoding
stringclasses
26 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
128
12.8k
extension
stringclasses
11 values
content
stringlengths
128
8.19k
authors
listlengths
1
1
author_id
stringlengths
1
79
eec5c0892fac59b4905e1058924f4dd1d005d155
91297ffb10fb4a601cf1d261e32886e7c746c201
/css.lib/src/org/netbeans/modules/css/lib/api/Node.java
f8adb1d6015b544b6d91b39396c5fe95b2c4a2e7
[]
no_license
JavaQualitasCorpus/netbeans-7.3
0b0a49d8191393ef848241a4d0aa0ecc2a71ceba
60018fd982f9b0c9fa81702c49980db5a47f241e
refs/heads/master
2023-08-12T09:29:23.549956
2019-03-16T17:06:32
2019-03-16T17:06:32
167,005,013
0
0
null
null
null
null
UTF-8
Java
false
false
2,526
java
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright 2011 Oracle and/or its affiliates. All rights reserved. * * Oracle and Java are registered trademarks of Oracle and/or its affiliates. * Other names may be trademarks of their respective owners. * * 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 * http://www.netbeans.org/cddl-gplv2.html * or nbbuild/licenses/CDDL-GPL-2-CP. 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 * nbbuild/licenses/CDDL-GPL-2-CP. 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. If applicable, add the following below the * License Header, with the fields enclosed by brackets [] replaced by * your own identifying information: * "Portions Copyrighted [year] [name of copyright owner]" * * 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 do not 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. * * Contributor(s): * * Portions Copyrighted 2011 Sun Microsystems, Inc. */ package org.netbeans.modules.css.lib.api; import java.util.List; import java.util.Map; /** * Node of the css source parse tree. * * @author marekfukala */ public interface Node { public int from(); public int to(); public String name(); public NodeType type(); public List<Node> children(); public Node parent(); public CharSequence image(); }
[ "taibi@sonar-scheduler.rd.tut.fi" ]
taibi@sonar-scheduler.rd.tut.fi
2609fb6c08fe70c6d4513c4f34f167a90c7d3ce4
47686bbdcf8be3ee0cda1442d32fd61465a917d3
/ppl-engine-ds/src/main/java/com/sap/research/primelife/ds/pdp/matching/PolicyUpdater.java
ca86a00f34ca58f4c1d4db8425368c1762d913d0
[]
no_license
jjsendor/fiware-ppl
f08e8cb2e7336eaae39389936cab58cfc931a09a
841b01e89b929c1104b5689a23bb826337183646
refs/heads/master
2021-01-09T07:03:00.610271
2014-04-30T14:09:06
2014-04-30T14:09:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,728
java
/******************************************************************************* * Copyright (c) 2013, SAP AG * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - Neither the name of the SAP AG nor the names of its contributors may * be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. ******************************************************************************/ package com.sap.research.primelife.ds.pdp.matching; import javax.xml.bind.JAXBElement; import javax.xml.bind.JAXBException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.sap.research.primelife.dao.DaoImpl; import com.sap.research.primelife.dao.PolicyDao; import com.sap.research.primelife.exceptions.SyntaxException; import com.sap.research.primelife.exceptions.WritingException; //import com.sap.research.primelife.obligation.matching.client.IOMEService; //import com.sap.research.primelife.obligation.matching.client.IOMEServiceGetMatchingPreferencePPLDeserializationExceptionFaultFaultMessage; //import com.sap.research.primelife.obligation.matching.client.IOMEServiceGetMatchingPreferencePPLStickyPolicyExceptionFaultFaultMessage; //import com.sap.research.primelife.obligation.matching.client.OMEService; import eu.primelife.ppl.policy.impl.AuthorizationType; import eu.primelife.ppl.policy.impl.AuthorizationsSetType; import eu.primelife.ppl.policy.impl.DataHandlingPolicyType; import eu.primelife.ppl.policy.impl.DataHandlingPreferencesType; import eu.primelife.ppl.policy.impl.ObjectFactory; import eu.primelife.ppl.policy.obligation.impl.ObligationsSet; /** * Contains the logic to update data handling preferences. * Depends on the HandyAuthorizationsSet and the ObligationMatching Webservice. * For an overview of the matching and updating algorithm, see the file authorizationMatching.pdf * * */ public class PolicyUpdater { private static DaoImpl<DataHandlingPreferencesType> dao = new DaoImpl<DataHandlingPreferencesType>(); private static DaoImpl<AuthorizationsSetType> authDao = new DaoImpl<AuthorizationsSetType>(); @SuppressWarnings("unused") private static DaoImpl<ObligationsSet> oblDao = new DaoImpl<ObligationsSet>(); private static PolicyDao polDao = new PolicyDao(); private static ObjectFactory ofPrimelife = new ObjectFactory(); private static final Logger LOGGER = LoggerFactory.getLogger(PolicyUpdater.class); /** * Updates data handling preferences in the database to match against the policy. * @param dhprefs - the preferences to be updated and persisted * @param policy - the policy to match against */ public static void updatePreferences(DataHandlingPreferencesType dhprefs, DataHandlingPolicyType policy) { AuthorizationsSetType auth = null; LOGGER.info("updating Preferences"); try { // because we don't know in advance which attributes have to be changed or added, // we simply create a new authorizationsSet and remove the old one auth = polDao.cloneAuthorizationSet(dhprefs.getAuthorizationsSet()); } catch (SyntaxException e) { LOGGER.error("Failed cloning the authorizationSet", e); } catch (WritingException e) { LOGGER.error("Failed cloning the authorizationSet", e); } catch (JAXBException e) { LOGGER.error("Failed cloning the authorizationSet", e); } //deleting the old authorizationsSet would be nice, but does not work // authDao.deleteObject(dhprefs.getAuthorizationsSet()); AuthorizationsSetType newAuthSet = mergeAuthorizations(auth, policy.getAuthorizationsSet()); // persist the updated authorizationsSet if (newAuthSet != null) { authDao.persistObject(newAuthSet); } // set the updated authorizationsSet dhprefs.setAuthorizationsSet(newAuthSet); dao.updateObject(dhprefs); // create an updated obligationsSet, call the ome // ObligationsSet obl = policy.getObligationsSet(); // oblDao.deleteObject(policy.getObligationsSet()); // ObligationsSet newObligations = mergeObligations(obl, policy.getObligationsSet()); // oblDao.persistObject(newObligations); // dhprefs.setObligationsSet(newObligations); // dao.updateObject(dhprefs); } // private static ObligationsSet mergeObligations(ObligationsSet prefs, // ObligationsSet policy) { // OMEService service = new OMEService(); // IOMEService ome = service.getBasicHttpBindingIOMEService(); // // try { // return ome.getMatchingPreference(prefs, policy); // } catch (IOMEServiceGetMatchingPreferencePPLDeserializationExceptionFaultFaultMessage e) { // LOGGER.error("Failed to call OME", e); // e.printStackTrace(); // } catch (IOMEServiceGetMatchingPreferencePPLStickyPolicyExceptionFaultFaultMessage e) { // LOGGER.error("Failed to call OME", e); // e.printStackTrace(); // } // return null; // } /** * Matches an {@link AuthorizationsSet} policy against {@link AuthorizationsSet} preferences. * @param authorizationsPolicy * the DataHandlingPolicy of the ACP * @param authorizationsPreferences * the DataHandlingPreference of the DS preferences of one PII * @return * {@link AuthorizationsSet} sticky policy */ public static AuthorizationsSetType mergeAuthorizations(AuthorizationsSetType authorizationsPreferences, AuthorizationsSetType authorizationsPolicy) { HandyAuthorizationsSet policy = new HandyAuthorizationsSet(authorizationsPolicy); HandyAuthorizationsSet pref = new HandyAuthorizationsSet(authorizationsPreferences); if (policy.isEmpty()) { //nothing is allowed in the policy, every preference will match //so we don't change the preferences LOGGER.info("the policy is empty, we don't have to update the preferences."); return authorizationsPreferences; } LOGGER.info("comparing authorization elements of policy with preferences."); // update authorization elements AuthorizationsSetType finalAuth = ofPrimelife.createAuthorizationsSetType(); // updated the auth for downstream usage explicitly JAXBElement<? extends AuthorizationType> dsu = policy.getAuthzForDownstreamUsage().createUpdatedPreference(pref.getAuthzForDownstreamUsage()); // update the auth for purpose explicitly JAXBElement<? extends AuthorizationType> purp = policy.getAuthzForPurpose().createUpdatedPreference(pref.getAuthzForPurpose()); finalAuth.getAuthorization().add(dsu); finalAuth.getAuthorization().add(purp); return finalAuth; } }
[ "francesco.di.cerbo@sap.com" ]
francesco.di.cerbo@sap.com
80974eb95eff3d98f826de262cdc440daca77d22
e44759c6e645b4d024e652ab050e7ed7df74eba3
/src/org/ace/insurance/medical/process/persistence/ProcessDAO.java
5e834e7c660ea58ede762be791111835f8846950
[]
no_license
LifeTeam-TAT/MI-Core
5f779870b1328c23b192668308ee25c532ab6280
8c5c4466da13c7a8bc61df12a804f840417e2513
refs/heads/master
2023-04-04T13:36:11.616392
2021-04-02T14:43:34
2021-04-02T14:43:34
354,033,545
0
0
null
null
null
null
UTF-8
Java
false
false
3,244
java
package org.ace.insurance.medical.process.persistence; import java.util.List; import javax.persistence.PersistenceException; import javax.persistence.Query; import org.ace.insurance.common.TableName; import org.ace.insurance.medical.process.Process; import org.ace.insurance.medical.process.persistence.interfaces.IProcessDAO; import org.ace.java.component.persistence.BasicDAO; import org.ace.java.component.persistence.exception.DAOException; import org.springframework.stereotype.Repository; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; /*************************************************************************************** * @author HS * @Date 2013-02-11 * @Version 1.0 * @Purpose This class serves as the DAO to manipulate the <code>Process</code> * object. * ***************************************************************************************/ @Repository("ProcessDAO") public class ProcessDAO extends BasicDAO implements IProcessDAO { /** * @see org.ace.insurance.medical.process.persistence.interfaces.IProcessDAO * #insert(org.ace.insurance.medical.process.Process) */ @Transactional(propagation = Propagation.REQUIRED) public void insert(Process process) throws DAOException { try { em.persist(process); em.flush(); } catch (PersistenceException pe) { throw translate("Failed to insert Process", pe); } } /** * @see org.ace.insurance.medical.process.persistence.interfaces.IProcessDAO * #update(org.ace.insurance.medical.process.Process) */ @Transactional(propagation = Propagation.REQUIRED) public void update(Process process) throws DAOException { try { em.merge(process); em.flush(); } catch (PersistenceException pe) { throw translate("Failed to update Process", pe); } } /** * @see org.ace.insurance.medical.process.persistence.interfaces.IProcessDAO * #delete(org.ace.insurance.medical.process.Process) */ @Transactional(propagation = Propagation.REQUIRED) public void delete(Process process) throws DAOException { try { process = em.merge(process); em.remove(process); em.flush(); } catch (PersistenceException pe) { throw translate("Failed to update Process", pe); } } /** * @see org.ace.insurance.medical.process.persistence.interfaces.IProcessDAO * #findAll() */ @Transactional(propagation = Propagation.REQUIRED) public List<Process> findAll() throws DAOException { List<Process> result = null; try { Query q = em.createNamedQuery("Process.findAll"); Query qq = em.createNamedQuery("Process.findByName"); result = q.getResultList(); em.flush(); } catch (PersistenceException pe) { throw translate("Failed to find all of Process", pe); } return result; } @Transactional(propagation = Propagation.REQUIRED) public String findByName(String name) throws DAOException { String result = ""; try { Query qq = em.createNamedQuery("Process.findByName"); qq.setParameter("processName", name); result = (String) qq.getSingleResult(); em.flush(); } catch (PersistenceException pe) { throw translate("Failed to find all of Process", pe); } return result; } }
[ "lifeteam.tat@gmail.com" ]
lifeteam.tat@gmail.com
0cef3aa1fedcf20de7368c0e8a392fb22ee0acb4
34742e70c5f7c6e58bbf69c0ae96cec5a685d62d
/app/src/main/java/me/pwcong/tankattack/App.java
1e40e7e24fed53fd8f9cd85b82a00af85924d879
[]
no_license
pwcong/TankAttack
698da8f64da90545ff13d35c28da22ee38c5a4e7
356ce543bdb21693ef7592c318ceb7a948cd3ca2
refs/heads/master
2020-06-14T09:41:39.212270
2016-12-25T07:44:13
2016-12-25T07:44:13
75,202,077
0
0
null
null
null
null
UTF-8
Java
false
false
357
java
package me.pwcong.tankattack; import android.app.Application; /** * Created by Pwcong on 2016/11/30. */ public class App extends Application { private static App instance; @Override public void onCreate() { super.onCreate(); instance = this; } public static App getInstance() { return instance; } }
[ "pwcong@foxmail.com" ]
pwcong@foxmail.com
63b60d59428dd2af7faabc5a149f5d20110ab14a
e42afd54dcc0add3d2b8823ee98a18c50023a396
/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/MetadataStoreName.java
f720b87ef54ecb076edcdf368760213b745c6f35
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
degloba/google-cloud-java
eea41ebb64f4128583533bc1547e264e730750e2
b1850f15cd562c659c6e8aaee1d1e65d4cd4147e
refs/heads/master
2022-07-07T17:29:12.510736
2022-07-04T09:19:33
2022-07-04T09:19:33
180,201,746
0
0
Apache-2.0
2022-07-04T09:17:23
2019-04-08T17:42:24
Java
UTF-8
Java
false
false
6,531
java
/* * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.cloud.aiplatform.v1beta1; import com.google.api.pathtemplate.PathTemplate; import com.google.api.resourcenames.ResourceName; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableMap; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Objects; import javax.annotation.Generated; // AUTO-GENERATED DOCUMENTATION AND CLASS. @Generated("by gapic-generator-java") public class MetadataStoreName implements ResourceName { private static final PathTemplate PROJECT_LOCATION_METADATA_STORE = PathTemplate.createWithoutUrlEncoding( "projects/{project}/locations/{location}/metadataStores/{metadata_store}"); private volatile Map<String, String> fieldValuesMap; private final String project; private final String location; private final String metadataStore; @Deprecated protected MetadataStoreName() { project = null; location = null; metadataStore = null; } private MetadataStoreName(Builder builder) { project = Preconditions.checkNotNull(builder.getProject()); location = Preconditions.checkNotNull(builder.getLocation()); metadataStore = Preconditions.checkNotNull(builder.getMetadataStore()); } public String getProject() { return project; } public String getLocation() { return location; } public String getMetadataStore() { return metadataStore; } public static Builder newBuilder() { return new Builder(); } public Builder toBuilder() { return new Builder(this); } public static MetadataStoreName of(String project, String location, String metadataStore) { return newBuilder() .setProject(project) .setLocation(location) .setMetadataStore(metadataStore) .build(); } public static String format(String project, String location, String metadataStore) { return newBuilder() .setProject(project) .setLocation(location) .setMetadataStore(metadataStore) .build() .toString(); } public static MetadataStoreName parse(String formattedString) { if (formattedString.isEmpty()) { return null; } Map<String, String> matchMap = PROJECT_LOCATION_METADATA_STORE.validatedMatch( formattedString, "MetadataStoreName.parse: formattedString not in valid format"); return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("metadata_store")); } public static List<MetadataStoreName> parseList(List<String> formattedStrings) { List<MetadataStoreName> list = new ArrayList<>(formattedStrings.size()); for (String formattedString : formattedStrings) { list.add(parse(formattedString)); } return list; } public static List<String> toStringList(List<MetadataStoreName> values) { List<String> list = new ArrayList<>(values.size()); for (MetadataStoreName value : values) { if (value == null) { list.add(""); } else { list.add(value.toString()); } } return list; } public static boolean isParsableFrom(String formattedString) { return PROJECT_LOCATION_METADATA_STORE.matches(formattedString); } @Override public Map<String, String> getFieldValuesMap() { if (fieldValuesMap == null) { synchronized (this) { if (fieldValuesMap == null) { ImmutableMap.Builder<String, String> fieldMapBuilder = ImmutableMap.builder(); if (project != null) { fieldMapBuilder.put("project", project); } if (location != null) { fieldMapBuilder.put("location", location); } if (metadataStore != null) { fieldMapBuilder.put("metadata_store", metadataStore); } fieldValuesMap = fieldMapBuilder.build(); } } } return fieldValuesMap; } public String getFieldValue(String fieldName) { return getFieldValuesMap().get(fieldName); } @Override public String toString() { return PROJECT_LOCATION_METADATA_STORE.instantiate( "project", project, "location", location, "metadata_store", metadataStore); } @Override public boolean equals(Object o) { if (o == this) { return true; } if (o != null || getClass() == o.getClass()) { MetadataStoreName that = ((MetadataStoreName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.location, that.location) && Objects.equals(this.metadataStore, that.metadataStore); } return false; } @Override public int hashCode() { int h = 1; h *= 1000003; h ^= Objects.hashCode(project); h *= 1000003; h ^= Objects.hashCode(location); h *= 1000003; h ^= Objects.hashCode(metadataStore); return h; } /** Builder for projects/{project}/locations/{location}/metadataStores/{metadata_store}. */ public static class Builder { private String project; private String location; private String metadataStore; protected Builder() {} public String getProject() { return project; } public String getLocation() { return location; } public String getMetadataStore() { return metadataStore; } public Builder setProject(String project) { this.project = project; return this; } public Builder setLocation(String location) { this.location = location; return this; } public Builder setMetadataStore(String metadataStore) { this.metadataStore = metadataStore; return this; } private Builder(MetadataStoreName metadataStoreName) { this.project = metadataStoreName.project; this.location = metadataStoreName.location; this.metadataStore = metadataStoreName.metadataStore; } public MetadataStoreName build() { return new MetadataStoreName(this); } } }
[ "neenushaji@google.com" ]
neenushaji@google.com
7feed1d2f5c3a20942a60af0e1a44f55a4ef8a06
a9cbd6bdb43843f4905d668f42dda66dda8265ec
/nalu-plugin-gwt-processor/src/test/resources/com/github/nalukit/nalu/processor/application/applicationAnnotationOnClass/ApplicationAnnotationInterfaceOnAClass.java
4896585e59f78db4cba3bcf07428157dc8fc2f5d
[ "Apache-2.0" ]
permissive
RaulPampliegaMayoral/nalu
0b96954941b5ed904ad67797627fc2befd6e7523
a717108fff4a0b787af2edc5166dfefd3faf8b20
refs/heads/master
2020-09-06T11:37:26.260269
2019-11-06T19:58:31
2019-11-06T19:58:31
188,907,687
0
0
Apache-2.0
2019-11-08T07:29:01
2019-05-27T20:51:20
Java
UTF-8
Java
false
false
1,164
java
/* * Copyright (c) 2018 - 2019 - Frank Hossfeld * * 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.github.nalukit.nalu.processor.application.applicationAnnotationOnClass; import com.github.nalukit.nalu.client.application.IsApplication; import com.github.nalukit.nalu.client.application.annotation.Application; import com.github.nalukit.nalu.processor.common.MockContext; import com.github.nalukit.nalu.processor.common.MockShell; @Application(shell = MockShell.class, startRoute = "/search", context = MockContext.class) public class ApplicationAnnotationInterfaceOnAClass implements IsApplication { }
[ "frank.hossfeld@googlemail.com" ]
frank.hossfeld@googlemail.com
674e3db1af8556bcbc2062fd2a4b052b8af2ba7d
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
/Code Snippet Repository/Hibernate/Hibernate5925.java
b9b7cf257669c7e23575d221552734ac4e50af2b
[]
no_license
saber13812002/DeepCRM
3336a244d4852a364800af3181e03e868cf6f9f5
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
refs/heads/master
2023-03-16T00:08:06.473699
2018-04-18T05:29:50
2018-04-18T05:29:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
551
java
@Test @TestForIssue( jiraKey = "" ) public void testStaticMetamodel() { EntityManagerFactory emf = TestingEntityManagerFactoryGenerator.generateEntityManagerFactory( AvailableSettings.LOADED_CLASSES, Arrays.asList( Company.class ) ); try { assertNotNull( "'Company_.id' should not be null)", Company_.id ); assertNotNull( "'Company_.address' should not be null)", Company_.address ); assertNotNull( "'AbstractAddressable_.address' should not be null)", AbstractAddressable_.address ); } finally { emf.close(); } }
[ "Qing.Mi@my.cityu.edu.hk" ]
Qing.Mi@my.cityu.edu.hk
50431a52a3161b0bf8f718ee6e41c29e05c8b256
4a4c12c9210f3d763690c65c3a1bb3d5255a72b1
/app/src/main/java/com/minilook/minilook/ui/gallery/adapter/SelectedAdapter.java
5091565630e310cfe93d80507cfd5d18f916b8be
[]
no_license
sjyun87/minilook
f6fd0d745955a97eb0f9462d8623187e96baf239
5e4dfcb684cfaf00f6db46e10209a7a52671a563
refs/heads/master
2023-04-01T07:40:13.654554
2021-04-16T08:33:01
2021-04-16T08:33:01
275,824,566
0
0
null
null
null
null
UTF-8
Java
false
false
2,543
java
package com.minilook.minilook.ui.gallery.adapter; import android.view.ViewGroup; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; import com.minilook.minilook.data.model.gallery.PhotoDataModel; import com.minilook.minilook.ui.gallery.viewholder.SelectedItemVH; import com.minilook.minilook.ui.base.BaseAdapterDataModel; import com.minilook.minilook.ui.base.BaseAdapterDataView; import java.util.ArrayList; import java.util.List; public class SelectedAdapter extends RecyclerView.Adapter<SelectedItemVH> implements BaseAdapterDataModel<PhotoDataModel>, BaseAdapterDataView<PhotoDataModel> { private final List<PhotoDataModel> items = new ArrayList<>(); @NonNull @Override public SelectedItemVH onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { return new SelectedItemVH(parent); } @Override public void onBindViewHolder(@NonNull SelectedItemVH holder, int position) { holder.bind(items.get(position)); } @Override public int getItemCount() { return getSize(); } @Override public void add(PhotoDataModel $item) { items.add($item); } @Override public void add(int $index, PhotoDataModel $item) { items.add($index, $item); } @Override public void addAll(List<PhotoDataModel> $items) { items.addAll($items); } @Override public void set(int $index, PhotoDataModel $item) { items.set($index, $item); } @Override public void set(List<PhotoDataModel> $items) { items.clear(); items.addAll($items); } @Override public PhotoDataModel get(int $index) { return items.get($index); } @Override public List<PhotoDataModel> get() { return items; } @Override public int get(PhotoDataModel $item) { return items.indexOf($item); } @Override public void remove(int $index) { items.remove($index); } @Override public void remove(PhotoDataModel $item) { items.remove($item); } @Override public void removeAll() { items.clear(); } @Override public void clear() { items.clear(); } @Override public int getSize() { return items.size(); } @Override public void refresh() { notifyDataSetChanged(); } @Override public void refresh(int $position) { notifyItemChanged($position); } @Override public void refresh(int $start, int $row) { notifyItemRangeInserted($start, $row); } }
[ "saira_@naver.com" ]
saira_@naver.com
2f1b53b8b73ad5f79a992846c479c238f59380cf
95c49f466673952b465e19a5ee3ae6eff76bee00
/src/main/java/com/baidu/tts/p270d/p271a/EngineDownloadHandler.java
47dfddfbc3caeaa4bb2fd7581fa7898972865b7d
[]
no_license
Phantoms007/zhihuAPK
58889c399ae56b16a9160a5f48b807e02c87797e
dcdbd103436a187f9c8b4be8f71bdf7813b6d201
refs/heads/main
2023-01-24T01:34:18.716323
2020-11-25T17:14:55
2020-11-25T17:14:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,394
java
package com.baidu.tts.p270d.p271a; import com.baidu.tts.chainofresponsibility.logger.LoggerProxy; import com.baidu.tts.p270d.p271a.DownloadEngine; import java.util.concurrent.Future; /* renamed from: com.baidu.tts.d.a.e */ /* compiled from: EngineDownloadHandler */ public class EngineDownloadHandler { /* renamed from: a */ private Future<Void> f10413a; /* renamed from: b */ private DownloadEngine.CallableC2609a f10414b; /* renamed from: a */ public void mo20975a(Future<Void> future) { this.f10413a = future; } /* renamed from: a */ public void mo20974a(DownloadEngine.CallableC2609a aVar) { this.f10414b = aVar; } /* renamed from: a */ public void mo20973a() { LoggerProxy.m10812d("EngineDownloadHandler", "before stop"); try { LoggerProxy.m10812d("EngineDownloadHandler", "stop fileId=" + this.f10414b.mo20960c().mo20965a()); } catch (Exception unused) { } Future<Void> future = this.f10413a; if (future != null) { boolean cancel = future.cancel(true); LoggerProxy.m10812d("EngineDownloadHandler", "unDone = " + cancel); } DownloadEngine.CallableC2609a aVar = this.f10414b; if (aVar != null) { aVar.mo20959b(); } LoggerProxy.m10812d("EngineDownloadHandler", "after stop"); } }
[ "seasonpplp@qq.com" ]
seasonpplp@qq.com
4ac2a9822dc805fccb9ac0f1a35a9787be481e5c
b287cbcc7d41f12a198112c4c5f19f6c73d864e4
/app/src/main/java/com/example/bozhilun/android/b15p/b15pdb/B15PBloodDB.java
09a007f93bb3843e5690d16f184c929b7989571a
[ "Apache-2.0" ]
permissive
sengeiou/RaceFitPro
dffc24ee4a70bae7f944f47696ed09bc799e0e83
8487da3a9cea4eefed27c727e02fc6786a91b603
refs/heads/master
2022-11-16T18:38:02.142577
2020-07-08T08:43:17
2020-07-08T08:43:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,520
java
package com.example.bozhilun.android.b15p.b15pdb; import org.greenrobot.greendao.annotation.Entity; import org.greenrobot.greendao.annotation.Id; import org.greenrobot.greendao.annotation.Generated; @Entity public class B15PBloodDB { @Id(autoincrement = true) private Long _id; private String devicesMac; private String bloodData; private String bloodTime; private int bloodNumberH; private int bloodNumberL; private int isUpdata; @Generated(hash = 1076682131) public B15PBloodDB(Long _id, String devicesMac, String bloodData, String bloodTime, int bloodNumberH, int bloodNumberL, int isUpdata) { this._id = _id; this.devicesMac = devicesMac; this.bloodData = bloodData; this.bloodTime = bloodTime; this.bloodNumberH = bloodNumberH; this.bloodNumberL = bloodNumberL; this.isUpdata = isUpdata; } @Generated(hash = 478437982) public B15PBloodDB() { } public Long get_id() { return _id; } public void set_id(Long _id) { this._id = _id; } public String getDevicesMac() { return devicesMac; } public void setDevicesMac(String devicesMac) { this.devicesMac = devicesMac; } public String getBloodData() { return bloodData; } public void setBloodData(String bloodData) { this.bloodData = bloodData; } public String getBloodTime() { return bloodTime; } public void setBloodTime(String bloodTime) { this.bloodTime = bloodTime; } public int getBloodNumberH() { return bloodNumberH; } public void setBloodNumberH(int bloodNumberH) { this.bloodNumberH = bloodNumberH; } public int getBloodNumberL() { return bloodNumberL; } public void setBloodNumberL(int bloodNumberL) { this.bloodNumberL = bloodNumberL; } public int getIsUpdata() { return isUpdata; } public void setIsUpdata(int isUpdata) { this.isUpdata = isUpdata; } @Override public String toString() { return "B15PBloodDB{" + "_id=" + _id + ", devicesMac='" + devicesMac + '\'' + ", bloodData='" + bloodData + '\'' + ", bloodTime='" + bloodTime + '\'' + ", bloodNumberH=" + bloodNumberH + ", bloodNumberL=" + bloodNumberL + ", isUpdata=" + isUpdata + '}'; } }
[ "758378737@qq.com" ]
758378737@qq.com
e2e1860ec0b2b9699ca5fc9cf004f5871d616ccf
02c51349cfcb777add358c5d2a259b9b98b3dfa8
/grb-article-service/src/main/java/tn/gov/cni/dpp/GrbArticleServiceApplication.java
5febd7d7408eb2051ad4c468afb91d262ce40bfa
[]
no_license
cherifgit/grb-training
01193db78e44176f9b10cb6613bf5402870d3f74
3ce7796f6bb8ba948fc19ce77e5690288fb4e32e
refs/heads/master
2020-12-30T05:35:56.214476
2020-02-07T10:04:44
2020-02-07T10:04:44
238,878,254
0
0
null
null
null
null
UTF-8
Java
false
false
1,155
java
package tn.gov.cni.dpp; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard; import org.springframework.context.ApplicationContext; import tn.gov.cni.dpp.domaine.Article; import tn.gov.cni.dpp.repository.ArticleRepository; @SpringBootApplication @EnableCircuitBreaker @EnableHystrixDashboard @EnableDiscoveryClient public class GrbArticleServiceApplication { public static void main(String[] args) { ApplicationContext applicationContext = SpringApplication.run(GrbArticleServiceApplication.class, args); ArticleRepository articleRepository = applicationContext.getBean(ArticleRepository.class); Article article=new Article("pantallon"); articleRepository.save(article); Article article2=new Article("chemise"); articleRepository.save(article2); Article article3=new Article("cravate"); articleRepository.save(article3); } }
[ "you@example.com" ]
you@example.com
219516c74f0c8a56321c7e6df3a61e5295979316
1e708e4a1023e8fb9e66bed3e98d0b7969ad30da
/app/src/main/vysor/android/support/v7/app/TwilightCalculator.java
a1678e4f39acf66a5b509bb982314acf175af314
[]
no_license
wjfsanhe/Vysor-Research
c139a2120bcf94057fc1145ff88bd9f6aa443281
f0b6172b9704885f95466a7e99f670fae760963f
refs/heads/master
2020-03-31T16:23:18.137882
2018-12-11T07:35:31
2018-12-11T07:35:31
152,373,344
0
0
null
null
null
null
UTF-8
Java
false
false
2,487
java
// // Decompiled by Procyon v0.5.30 // package android.support.v7.app; class TwilightCalculator { private static final float ALTIDUTE_CORRECTION_CIVIL_TWILIGHT = -0.10471976f; private static final float C1 = 0.0334196f; private static final float C2 = 3.49066E-4f; private static final float C3 = 5.236E-6f; public static final int DAY = 0; private static final float DEGREES_TO_RADIANS = 0.017453292f; private static final float J0 = 9.0E-4f; public static final int NIGHT = 1; private static final float OBLIQUITY = 0.4092797f; private static final long UTC_2000 = 946728000000L; private static TwilightCalculator sInstance; public int state; public long sunrise; public long sunset; static TwilightCalculator getInstance() { if (TwilightCalculator.sInstance == null) { TwilightCalculator.sInstance = new TwilightCalculator(); } return TwilightCalculator.sInstance; } public void calculateTwilight(final long n, final double n2, final double n3) { final float n4 = (n - 946728000000L) / 8.64E7f; final float n5 = 6.24006f + 0.01720197f * n4; final double n6 = 3.141592653589793 + (1.796593063 + (n5 + 0.03341960161924362 * Math.sin(n5) + 3.4906598739326E-4 * Math.sin(2.0f * n5) + 5.236000106378924E-6 * Math.sin(3.0f * n5))); final double n7 = -n3 / 360.0; final double n8 = n7 + (9.0E-4f + Math.round(n4 - 9.0E-4f - n7)) + 0.0053 * Math.sin(n5) + -0.0069 * Math.sin(2.0 * n6); final double asin = Math.asin(Math.sin(n6) * Math.sin(0.4092797040939331)); final double n9 = n2 * 0.01745329238474369; final double n10 = (Math.sin(-0.10471975803375244) - Math.sin(n9) * Math.sin(asin)) / (Math.cos(n9) * Math.cos(asin)); if (n10 >= 1.0) { this.state = 1; this.sunset = -1L; this.sunrise = -1L; } else if (n10 <= -1.0) { this.state = 0; this.sunset = -1L; this.sunrise = -1L; } else { final float n11 = (float)(Math.acos(n10) / 6.283185307179586); this.sunset = 946728000000L + Math.round(8.64E7 * (n8 + n11)); this.sunrise = 946728000000L + Math.round(8.64E7 * (n8 - n11)); if (this.sunrise < n && this.sunset > n) { this.state = 0; } else { this.state = 1; } } } }
[ "903448239@qq.com" ]
903448239@qq.com
4b50cac4115eb3dc20c37be4645606a823fd2eca
6a123b6cf379a555cc68e92d0d640380133d0ea5
/custom/gpcommerce/gpcommercefulfilmentprocess/testsrc/com/gp/commerce/fulfilmentprocess/test/actions/consignmentfulfilment/AbstractTestConsActionTemp.java
af49875f5ec7253faacfa72058bc0fdb752e9327
[]
no_license
Myzenvei/Docs
c9357221bc306dc754b322350fc676dee1972e39
45809ee928669142073354e1126e7444dedd4730
refs/heads/master
2020-06-30T17:23:52.981874
2019-07-15T09:39:19
2019-07-15T09:39:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,435
java
/* * [y] hybris Platform * * Copyright (c) 2017 SAP SE or an SAP affiliate company. All rights reserved. * * This software is the confidential and proprietary information of SAP * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with SAP. */ package com.gp.commerce.fulfilmentprocess.test.actions.consignmentfulfilment; import de.hybris.platform.processengine.model.BusinessProcessModel; import com.gp.commerce.fulfilmentprocess.constants.GpcommerceFulfilmentProcessConstants; import com.gp.commerce.fulfilmentprocess.test.actions.TestActionTemp; import org.apache.log4j.Logger; /** * */ public abstract class AbstractTestConsActionTemp extends TestActionTemp { private static final Logger LOG = Logger.getLogger(AbstractTestConsActionTemp.class); @Override public String execute(final BusinessProcessModel process) throws Exception //NOPMD { //getQueueService().actionExecuted(getParentProcess(process), this); LOG.info(getResult()); return getResult(); } public BusinessProcessModel getParentProcess(final BusinessProcessModel process) { final String parentCode = (String) getProcessParameterValue(process, GpcommerceFulfilmentProcessConstants.PARENT_PROCESS); return getBusinessProcessService().getProcess(parentCode); } }
[ "shikhgupta@deloitte.com" ]
shikhgupta@deloitte.com
88a3b65844a68b3644d9c198cf0e72b7e90034d6
8091dc59cc76869befe9b0a8f350fbc56c2836e5
/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/update/gui/UpdateSummaryTableModel.java
f7f98ff666ac5beddf2cb7efed3dea0d070316d2
[]
no_license
igorhvr/squirrel-sql
4560c39c9221f04a49487b5f3d66b1559a32c21a
3457d91b397392e1a9649ffb00cbfd093e453654
refs/heads/master
2020-04-05T08:32:51.484469
2011-08-10T18:59:26
2011-08-10T18:59:26
2,188,276
2
5
null
null
null
null
UTF-8
Java
false
false
4,683
java
/* * Copyright (C) 2008 Rob Manning * manningr@users.sourceforge.net * * This library 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 library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package net.sourceforge.squirrel_sql.client.update.gui; import java.util.ArrayList; import java.util.List; import javax.swing.table.AbstractTableModel; import net.sourceforge.squirrel_sql.fw.util.StringManager; import net.sourceforge.squirrel_sql.fw.util.StringManagerFactory; /** * Model for the UpdateSummaryTable. */ public class UpdateSummaryTableModel extends AbstractTableModel { private static final long serialVersionUID = 1L; private List<ArtifactStatus> _artifacts = new ArrayList<ArtifactStatus>(); /** Internationalized strings for this class. */ private static final StringManager s_stringMgr = StringManagerFactory.getStringManager(UpdateSummaryTableModel.class); private interface i18n { // i18n[UpdateSummaryTable.yes=yes] String YES_VAL = s_stringMgr.getString("UpdateSummaryTable.yes"); // i18n[UpdateSummaryTable.no=no] String NO_VAL = s_stringMgr.getString("UpdateSummaryTable.no"); } private final static Class<?>[] s_dataTypes = new Class[] { String.class, // ArtifactName String.class, // Type String.class, // Installed? UpdateSummaryTableActionItem.class, // Install/Update/Remove }; private final String[] s_hdgs = new String[] { s_stringMgr.getString("UpdateSummaryTable.artifactNameLabel"), s_stringMgr.getString("UpdateSummaryTable.typeLabel"), s_stringMgr.getString("UpdateSummaryTable.installedLabel"), s_stringMgr.getString("UpdateSummaryTable.actionLabel"), }; private final int[] s_columnWidths = new int[] { 150, 100, 100, 50 }; UpdateSummaryTableModel(List<ArtifactStatus> artifacts) { _artifacts = artifacts; } /** * @see javax.swing.table.TableModel#getValueAt(int, int) */ public Object getValueAt(int row, int col) { final ArtifactStatus as = _artifacts.get(row); switch (col) { case 0: return as.getName(); case 1: return as.getType(); case 2: return as.isInstalled() ? i18n.YES_VAL : i18n.NO_VAL; case 3: if (as.isCoreArtifact()) { return ArtifactAction.INSTALL; } return as.getArtifactAction(); default: throw new IndexOutOfBoundsException("" + col); } } /** * @see javax.swing.table.TableModel#getRowCount() */ public int getRowCount() { return _artifacts.size(); } /** * @see javax.swing.table.TableModel#getColumnCount() */ public int getColumnCount() { return s_hdgs.length; } /** * @see javax.swing.table.AbstractTableModel#getColumnName(int) */ public String getColumnName(int col) { return s_hdgs[col]; } /** * @see javax.swing.table.AbstractTableModel#getColumnClass(int) */ public Class<?> getColumnClass(int col) { return s_dataTypes[col]; } /** * @see javax.swing.table.AbstractTableModel#isCellEditable(int, int) */ public boolean isCellEditable(int row, int col) { return col == 3; } /** * @see javax.swing.table.AbstractTableModel#setValueAt(java.lang.Object, int, int) */ public void setValueAt(Object value, int row, int col) { final ArtifactStatus as = _artifacts.get(row); ArtifactAction action = ArtifactAction.valueOf(value.toString()); as.setArtifactAction(action); } /** * @return the column width for the specified column */ public int getColumnWidth(int col) { return s_columnWidths[col]; } }
[ "manningr@0ceafaf9-a5ae-48a7-aaeb-8ec3e0f2870c" ]
manningr@0ceafaf9-a5ae-48a7-aaeb-8ec3e0f2870c
e12fb33605a2a646f59d7e4831336eced2350186
6dc8b8b3e518529022c133ead80fcd13f2bad7f5
/Storage/src/main/java/com/zy/storage/chaincache/StorageChain.java
7d0f061da4fe22fe4b577f430d90d272adaec5e1
[]
no_license
hahajing0000/proj4_2
d36b5e2ba2177598d44f11d842ed39d07302383a
579a07aa92af6a6cd1d01bdaadeb5a6b17dea9f4
refs/heads/master
2022-04-23T23:59:25.663394
2020-04-27T01:58:56
2020-04-27T01:58:56
256,433,498
0
0
null
null
null
null
UTF-8
Java
false
false
2,401
java
package com.zy.storage.chaincache; import com.zy.storage.callback.ResultCallback; /** * @author:zhangyue * @date:2020/4/23 * 存储链的基类 */ public abstract class StorageChain<T> { /** * 下一个节点 */ protected StorageChain nextChain; /** * 上一个节点 */ protected StorageChain previousChain; /** * 设置下游链以及将下游链的上一节点指定为当前节点 * @param _storageChain */ public void setNextChain(StorageChain _storageChain){ nextChain=_storageChain; _storageChain.previousChain=this; } /** * 存储数据 * @param key * @param data */ public void save(String key,T data){ saveData(key,data); if (this.nextChain!=null){ this.nextChain.save(key,data); } } /** * 获取数据 * @param key * @param result */ public void get(final String key, final ResultCallback<T> result){ getData(key,new ResultCallback<T>(){ @Override public void getData(T data) { if (null==data&&nextChain!=null){ nextChain.get(key,result); }else{ /** * 同步给上一存储链节点 */ if (previousChain!=null){ previousChain.save(key,data); } result.getData(data); } } }); } /** * 按key删除数据 * @param key */ public void removeAtKey(String key){ removeByKey(key); if (nextChain!=null){ nextChain.removeAtKey(key); } } /** * 清理数据 */ public void clear(){ clearData(); if (nextChain!=null){ nextChain.clear(); } } /** * 存储数据 * @param key * @param data */ protected abstract void saveData(String key, T data); /** * 获取数据 * @param key * @param callback */ protected abstract void getData(String key,ResultCallback callback); /** * 按key删除指定数据 * @param key */ protected abstract void removeByKey(String key); /** * 清理数据 */ protected abstract void clearData(); }
[ "444511958@qq.com" ]
444511958@qq.com
b6a549fac7ed6d826a466b0eb312f1bfaba34d5a
bb4608456555a78e66b023bb7bdd81212ce41379
/8-MyResource/source/old/app-batch/src/main/java/com/asynclife/batch/domain/IlleageAccountrException.java
82b342a33585e0c6f80b77ae12e50927591e40fb
[]
no_license
tanbinh123/technology
a7ee4602ced63af7a895aa7851075b412a6a33d9
9de5edd304dea32fb9d974e3912a0a1aa19404ef
refs/heads/master
2022-01-05T07:25:30.733047
2019-01-13T17:56:13
2019-01-13T17:56:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
485
java
package com.asynclife.batch.domain; /** * @author Tobias Flohre */ public class IlleageAccountrException extends RuntimeException { private static final long serialVersionUID = 1L; public IlleageAccountrException() { super(); } public IlleageAccountrException(String message, Throwable cause) { super(message, cause); } public IlleageAccountrException(String message) { super(message); } public IlleageAccountrException(Throwable cause) { super(cause); } }
[ "asynclife@163.com" ]
asynclife@163.com
6318131e79a2e7b14ff948f94cfb3ceb05bcd900
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XRENDERING-418-19-11-PESA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/rendering/internal/parser/xhtml/wikimodel/XWikiCommentHandler_ESTest_scaffolding.java
26fcd23abd1b74b5cfa75e5aa4649ea9fc00317d
[]
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
475
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Fri Apr 03 01:38:32 UTC 2020 */ package org.xwiki.rendering.internal.parser.xhtml.wikimodel; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class XWikiCommentHandler_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
39b3326fb8b09dd9e34396265baa866008706a8d
c99dc235e704cc507a940bac4fb52e0b225a7420
/src/main/java/Chapter06/lesson03/net/mindview/simple02/List09.java
081c7552dee9be77f504e1634d01da85cb095d72
[]
no_license
alsamancov/BruceEckel-
6d468dccbafb47ab7c8c1bc1fa61e7b8bfc93ed8
43a34f7c012908416942f91bcef8ceda925ae552
refs/heads/master
2016-08-12T06:05:54.871313
2016-01-20T11:21:59
2016-01-20T11:21:59
45,980,024
0
0
null
null
null
null
UTF-8
Java
false
false
246
java
package Chapter06.lesson03.net.mindview.simple02; /** * Created by Alexey on 11/19/2015. */ public class List09 { public List09(){ System.out.println("Chapter06.lesson03." + "net.mindview.simple02.List09"); } }
[ "alsamancov@gmail.com" ]
alsamancov@gmail.com
c293db77b585a29b40f93a5b3ae695e3a8e04305
0e82998236daecca067d58da6ebcf8ad1824bf19
/src/main/java/net/viperfish/planner/core/Metric.java
e94eae99018606df8993c542039eb2d4374183a9
[ "BSD-3-Clause" ]
permissive
shilongdai/9planner
5ef192850976fdac25b451344680df3d2f5cd226
b672527233f8535b4a2522dc23414f14c597411c
refs/heads/master
2022-12-08T13:36:02.022482
2020-09-07T20:39:20
2020-09-07T20:39:20
293,627,372
0
0
null
null
null
null
UTF-8
Java
false
false
1,095
java
package net.viperfish.planner.core; import java.util.HashMap; import java.util.Map; import java.util.Objects; public class Metric { private double scale; private Map<String, Object> details; public Metric() { this(0); } public Metric(double scale) { this.scale = scale; this.details = new HashMap<>(); } public double getScale() { return scale; } public Map<String, Object> getDetails() { return new HashMap<>(details); } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Metric metric = (Metric) o; return Double.compare(metric.scale, scale) == 0 && Objects.equals(details, metric.details); } @Override public int hashCode() { return Objects.hash(scale, details); } @Override public String toString() { return "Metric{" + "scale=" + scale + ", details=" + details + '}'; } }
[ "sdai@viperfish.net" ]
sdai@viperfish.net
6ad27b77086c3a0bd947516f7e5617caa96e1005
016397e143894ab8845ac66cb31202808761afa6
/GaiaMA/GaiaLog/src/org/gaia/log/LogForEachRunFileAppender.java
55f52e0fe8d4c69eaf8a8f27a3ed74ef925a95c0
[]
no_license
srvarey/postion
9e9b3f0d5342a29e4a162949188573fccae9eba3
b03c079124d7cbc7a705e537f2c8ea0c1ddc8ef5
refs/heads/master
2021-01-10T03:43:43.122014
2015-10-02T05:53:24
2015-10-02T05:53:24
43,537,770
0
0
null
null
null
null
UTF-8
Java
false
false
3,290
java
/** * Copyright (C) 2013 Gaia Transparence * Gaia Transparence, 1 allée Paul Barillon - 94300 VINCENNES * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3.0 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.gaia.log; import java.io.File; import java.io.IOException; import org.apache.log4j.FileAppender; import org.apache.log4j.Layout; import org.apache.log4j.spi.ErrorCode; /** * This is a customized log4j appender, which will create a new file for every * run of the application. * * */ public class LogForEachRunFileAppender extends FileAppender { public LogForEachRunFileAppender() { } public LogForEachRunFileAppender(Layout layout, String filename, boolean append, boolean bufferedIO, int bufferSize) throws IOException { super(layout, filename, append, bufferedIO, bufferSize); } public LogForEachRunFileAppender(Layout layout, String filename, boolean append) throws IOException { super(layout, filename, append); } public LogForEachRunFileAppender(Layout layout, String filename) throws IOException { super(layout, filename); } @Override public void activateOptions() { if (fileName != null) { try { fileName = getNewLogFileName(); setFile(fileName, fileAppend, bufferedIO, bufferSize); } catch (Exception e) { errorHandler.error("Error while activating log options", e, ErrorCode.FILE_OPEN_FAILURE); } } } /** *Return the file names * */ private String getNewLogFileName() { if (fileName != null) { final String DOT = "."; final String HIPHEN = "-"; final File logFile = new File(fileName); final String logfileName = logFile.getName(); String newFileName = ""; final int dotIndex = logfileName.indexOf(DOT); if (dotIndex != -1) { /** * the file name has an extension. so, insert the time stamp * between the file name and the extension */ newFileName = logfileName.substring(0, dotIndex) + HIPHEN + +System.currentTimeMillis() + DOT + logfileName.substring(dotIndex + 1); } else { /** * the file name has no extension. So, just append the timestamp * at the end. */ newFileName = logfileName + HIPHEN + System.currentTimeMillis(); } return logFile.getParent() + File.separator + newFileName; } return null; } }
[ "srvarey@gmail.com" ]
srvarey@gmail.com
383cedc295a5a32e7b8133b2a1785cfe6494a468
a6e2cd9ea01bdc5cfe58acce25627786fdfe76e9
/src/main/java/com/alipay/api/response/AlipayEcapiprodDrawndnDrawndnlistQueryResponse.java
3b7f4c93522e9655497aa669e44fd8a56a134965
[ "Apache-2.0" ]
permissive
cc-shifo/alipay-sdk-java-all
38b23cf946b73768981fdeee792e3dae568da48c
938d6850e63160e867d35317a4a00ed7ba078257
refs/heads/master
2022-12-22T14:06:26.961978
2020-09-23T04:00:10
2020-09-23T04:00:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,109
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.DrawndnVo; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.ecapiprod.drawndn.drawndnlist.query response. * * @author auto create * @since 1.0, 2019-03-08 15:29:11 */ public class AlipayEcapiprodDrawndnDrawndnlistQueryResponse extends AlipayResponse { private static final long serialVersionUID = 8256399241148847992L; /** * 支用列表 */ @ApiListField("drawndn_list") @ApiField("drawndn_vo") private List<DrawndnVo> drawndnList; /** * 唯一一次请求标示 */ @ApiField("request_id") private String requestId; public void setDrawndnList(List<DrawndnVo> drawndnList) { this.drawndnList = drawndnList; } public List<DrawndnVo> getDrawndnList( ) { return this.drawndnList; } public void setRequestId(String requestId) { this.requestId = requestId; } public String getRequestId( ) { return this.requestId; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
baa8724d7787c7e5a623ce240a26c2a0662279b3
3b72d12871b48a8bae6d65789a5edf8667b8706b
/zqq/dgg_zqq/src/main/java/net/dgg/zqq/dao/order/ApplicantDao.java
304d4e8a3f2b951ebadbaa398ce09531a267c048
[]
no_license
xeon-ye/dgg-pro
53d344ab34c5ddf423485cc8ee5f7de6368d9571
cc25cb60f1c1c89b4591bbdaec8db1eeba818377
refs/heads/master
2023-05-04T20:08:42.972557
2019-09-17T08:45:53
2019-09-17T08:45:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
443
java
package net.dgg.zqq.dao.order; import org.springframework.stereotype.Repository; import java.util.List; import java.util.Map; /** * @author 刘阳 * @ClassName <ApplicantDao> * @despriction 查询申请人信息 * @create 2018/10/13 11:24 **/ @Repository public interface ApplicantDao { /** * 查询订单申请人和联系人信息 * * @param map * @return */ List<Map> queryApplicantMap(Map map); }
[ "chenxin4@dgg.net" ]
chenxin4@dgg.net
ce84ff00700d5a9cb83c9bb8a7016d021aa151c0
0386dd72896464326174b50eb6743a02d1a87c3f
/examples/simple20/src/main/java/org/apache/myfaces/examples/example1/UCaseForm.java
a54749b99056d21597e2ee1589c7534e825f4eb7
[]
no_license
bschuette/tomahawk
f6922930bbb54e6914325fce11764eeeff63ef07
8e300e4adbadeb7221df00c3bb2e71ead86b656f
refs/heads/master
2023-01-04T06:06:33.733606
2020-11-05T20:33:48
2020-11-05T20:33:48
310,410,746
0
0
null
null
null
null
UTF-8
Java
false
false
1,763
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.myfaces.examples.example1; import java.io.Serializable; /** * DOCUMENT ME! * @author Manfred Geiler * @version $Revision: 472610 $ $Date: 2006-11-08 14:46:34 -0500 (mié, 08 nov 2006) $ */ public class UCaseForm implements Serializable { /** * serial id for serialisation versioning */ private static final long serialVersionUID = 1L; private String text = ""; public void uppercase() { text = text.toUpperCase(); } public void lowercase() { text = text.toLowerCase(); } public String getText() { return text; } public void setText(String text) { this.text = text; } /** * Test method for method binding. */ public String jumpHome() { System.out.println("JumpHome Action was called."); return "jump_home"; } }
[ "bjoern@schuette.se" ]
bjoern@schuette.se
ef8f865e0215775780749680a12e59bbbc02ca13
f0b00a54576553334d0d980c053acf8c20d98ab2
/java-prepare/example/Pre01_6.java
c52a53bc8f63ab44b8ed0671b89af58924cf3e5b
[]
no_license
KANG-SEONGHYEON/bitcamp
35de0cfda9e13412548f6c59028aa2acbbf00e2d
606b45bb519b18f7be5333565760e67aa884750b
refs/heads/master
2021-05-08T05:38:29.152680
2018-02-15T15:10:25
2018-02-15T15:10:25
104,423,409
0
0
null
null
null
null
UTF-8
Java
false
false
338
java
package bitcamp.java100; public class Pre01_6 { public static void main(String[] args){ byte[] arr1; arr1 = null; arr1 = new byte[3]; arr1[0] = 10; arr1[1] = 20; arr1[2] = 30; System.out.printf("%d, %d, %d\n", arr1[0], arr1[1], arr1[2]); arr1[3] = 40; } }
[ "wlswlsqud@gmail.com" ]
wlswlsqud@gmail.com
141ddf5d2cd4f7339dcfe0055f1140feef45fe1a
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/dbeaver/2016/12/SSHConstants.java
4f4a6ad3eb8082c23a1b3149fb8c5a08a8bf9777
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
1,536
java
/* * DBeaver - Universal Database Manager * Copyright (C) 2010-2016 Serge Rieder (serge@jkiss.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License (version 2) * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ package org.jkiss.dbeaver.model.impl.net; /** * Constants for SSH tunnel */ public class SSHConstants { public static final int DEFAULT_SSH_PORT = 22; public static final int DEFAULT_CONNECT_TIMEOUT = 10000; public static final String PROP_HOST = "host"; public static final String PROP_PORT = "port"; public static final String PROP_AUTH_TYPE = "authType"; public static final String PROP_KEY_PATH = "keyPath"; public static final String PROP_ALIVE_INTERVAL = "aliveInterval"; public static final String PROP_ALIVE_COUNT = "aliveCount"; public static final String PROP_CONNECT_TIMEOUT = "sshConnectTimeout"; public static enum AuthType { PASSWORD, PUBLIC_KEY } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
099f7e48f35f23f19f06531f2c7ef1780f85edab
2760cbcf6a5cf401c37ad47b7055cd455d170ca9
/javademo/src/java0721_exception_stream/Java153_exception.java
c5b894b89464438ac9e34f9e27bd3eb3d9f8ceb8
[]
no_license
davidkim9204/KH
d761f3a2721e1c3edf124c6ebf3e229b2836dfe8
d2f39c5c8075c54d84c565783e4c0e0e6314ce64
refs/heads/master
2021-01-12T12:27:49.630370
2016-11-02T08:11:03
2016-11-02T08:11:03
72,500,407
0
0
null
null
null
null
UTF-8
Java
false
false
673
java
package java0721_exception_stream; /* * 사용자(프로그래머)가 예외클래스를 만들 수 있도록 제공이 되는데 * 이때 java.lang.Exception을 상속받아 구현한다. */ //전부 exception에서 상속받아왔음 class User extends Exception{ public User(String message){ super(message); } }//end User public class Java153_exception { public static void main(String[] args) { int num=9; try{ if(num<10 || num>99) throw new User("2자리만 입력하세요."); System.out.println(num); }catch(User ex){ System.out.println(ex.toString()); } }//end main() }//end class
[ "user1@user1-PC" ]
user1@user1-PC
fce1ca738da5b26df30d04cf87761799076a4bb2
3534bc9ad76465d9a237ff34ce9352e15e359cb4
/app/src/main/java/com/dream/myliu/liangwarehouse/entity/Wares.java
5b11c38eb5e1b61463451de926e9eb361f6eba46
[]
no_license
dearHaoGeGe/LiangWarehouse
e1f6e51423b25b6fd3cdf007501f6cb284556d77
38e3137ae5add467ff05b7fcb0cf791f022657e9
refs/heads/master
2021-01-01T05:07:37.149441
2016-05-13T07:18:15
2016-05-13T07:18:15
58,711,483
1
0
null
null
null
null
UTF-8
Java
false
false
958
java
package com.dream.myliu.liangwarehouse.entity; import java.io.Serializable; /** */ public class Wares implements Serializable { private Long id; private String name; private String imgUrl; private String description; private Float price; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getImgUrl() { return imgUrl; } public void setImgUrl(String imgUrl) { this.imgUrl = imgUrl; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public Float getPrice() { return price; } public void setPrice(Float price) { this.price = price; } }
[ "862157904@qq.com" ]
862157904@qq.com
efb3d7b30e458cffcad0cb07299bb1845e5e5578
8d7c7d45f535f15936d1b22b48e1f64a5bfd1779
/TalentRoni_vlad_omer/src/a/Address.java
9b303867bed92f61697876f33441ff1e4051c94e
[]
no_license
roncohen15/822-126
4b1a44416ea61a90979d26712851b4979541bc18
05aa777ed5bcb4754614a7e934b0ef68fe0bfc0b
refs/heads/master
2023-04-02T23:24:08.278172
2021-04-05T10:26:10
2021-04-05T10:26:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
761
java
package a; public class Address implements Cloneable { private String street; private int number; public Address(String street, int number) { super(); this.street = street; this.number = number; } public String getStreet() { return street; } public void setStreet(String street) { this.street = street; } public int getNumber() { return number; } public void setNumber(int number) { this.number = number; } @Override public String toString() { return "Address [street=" + street + ", number=" + number + "]"; } // shalow public Address getClone() { Address other; try { other = (Address) this.clone(); return other; } catch (CloneNotSupportedException e) { e.printStackTrace(); return null; } } }
[ "eldarba@gmail.com" ]
eldarba@gmail.com
bdaec482f12395b0e7aec3def6c352d74c67b4d1
4ee8aae05a349bd9b747e791eee6f688125442c7
/application/src/main/java/holunda/taskassignment/business/BusinessDataServiceBean.java
136d24068ba77b7d700524ee442faa54a040c1c7
[ "BSD-3-Clause" ]
permissive
holunda-io/example-task-assignment-with-dmn
2f70ed83864d39187f629f34a33e4447c2d7b9aa
01d265c1084eec58e23879bbef762736fade13c4
refs/heads/master
2022-07-03T18:01:34.101971
2022-06-03T07:46:36
2022-06-03T07:46:36
112,216,289
1
1
null
null
null
null
UTF-8
Java
false
false
1,331
java
package holunda.taskassignment.business; import holunda.taskassignment.api.BusinessDataService; import holunda.taskassignment.api.model.BusinessData; import holunda.taskassignment.api.model.BusinessKey; import holunda.taskassignment.business.jpa.PackageRepository; import holunda.taskassignment.business.jpa.entity.PackageEntity; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Service; import java.util.HashMap; import java.util.Map; import java.util.Set; /** * Implementation of {@link BusinessDataService}} that uses {@link PackageEntity#toMap()} to extract required keys. */ @Service public class BusinessDataServiceBean implements BusinessDataService { @Autowired @Qualifier("readOnly") private PackageRepository packageRepository; @Override public BusinessData loadBusinessData(BusinessKey businessKey, Set<String> keys) { final PackageEntity packageEntity = packageRepository.findOne(businessKey.getValue()); final Map<String, Integer> values = new HashMap<>(); if (packageEntity != null) { Map<String, Integer> p = packageEntity.toMap(); for (final String key : keys) { values.put(key, p.get(key)); } } return new BusinessData(values); } }
[ "jan.galinski@holisticon.de" ]
jan.galinski@holisticon.de
7924ebea78943925766be62351b3692ff51f2945
f0e8fe7eab635f2adf766ee9ca7dd4d4977b94f7
/main/ar.com.oxen.nibiru.validation/ar.com.oxen.nibiru.validation.generic/src/main/java/ar/com/oxen/nibiru/validation/generic/NotEmptyValidator.java
e6b19dda1f01e8da5495cfa524f2c74ca2023d96
[]
no_license
lbrasseur/nibiru
2d2ebdfce9175db7114890c54cb3e1ed1c607563
1764153c2f38f3430042132a5b8ff5e0d5572207
refs/heads/master
2022-07-28T00:08:56.059668
2015-09-08T14:25:05
2015-09-08T14:25:05
32,324,375
0
0
null
2022-07-08T19:06:32
2015-03-16T12:49:02
Java
UTF-8
Java
false
false
757
java
package ar.com.oxen.nibiru.validation.generic; import ar.com.oxen.nibiru.validation.api.ValidationException; import ar.com.oxen.nibiru.validation.api.Validator; /** * Validatro for using on required fields. * The validated object: * - Must not be null * - It String representation must not be "" neither spaces. */ public class NotEmptyValidator implements Validator<Object> { private String errorCode = "required"; public NotEmptyValidator() { super(); } public NotEmptyValidator(String errorCode) { super(); this.errorCode = errorCode; } @Override public void validate(Object object) throws ValidationException { if (object == null || object.toString().trim().equals("")) { throw new ValidationException(errorCode); } } }
[ "lbrasseur@gmail.com" ]
lbrasseur@gmail.com
48dc405487740c34659ec5340cdab36b646799ae
1a07fa87ddbd138ab44567d1247ac3aee2339caa
/src/main/java/com/shimizukenta/httpserver/HttpRequestMessage.java
cc1ea0ac798fcbede2cbe81577c4d0ecf9a11680
[ "Apache-2.0" ]
permissive
kenta-shimizu/httpserver4java8
fcbf23c443b054e685940769d56a730be6cec1de
9415f4e3e0166bf7c27fc6552eeb40375daecb95
refs/heads/main
2023-03-22T17:33:18.349756
2021-03-14T15:59:24
2021-03-14T15:59:24
338,604,219
0
0
null
null
null
null
UTF-8
Java
false
false
882
java
package com.shimizukenta.httpserver; public interface HttpRequestMessage extends HttpMessage { /** * Returns Request-Line. * * <p> * <string>Not</strong> include CRLF.<br /> * </p> * * @return HTTP-Request-Line-String */ public String requestLine(); /** * Returns URI. * * @return URI */ public String uri(); /** * Returns Absolute-Path from URI. * * @return Absolute-Path */ public String absPath(); /** * Returns HttpRequestQuery from URI. * * @return HttpRequestQuery from URI * @throws HttpServerRequestMessageParseException */ public HttpRequestQuery getQueryFromUri() throws HttpServerRequestMessageParseException; /** * Returns Method. * * @return Method */ public HttpRequestMethod method(); /** * Returns Method-String. * * @return Method-String */ public String methodString(); }
[ "shimizukentagm1@gmail.com" ]
shimizukentagm1@gmail.com
c6a7c2069500b8c7b75cdc648748ce13ba187787
b9263ee71cfd60946d596d1f944c5b9b8fa61b97
/webtemplate/src/main/java/com/ethercis/opt/mapper/IsmTransition.java
e8bc3da6921396dd86033f263802f82bf92b3923
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
ethercis/ehrservice
cea214ba50f1c4d06b768206e6d06614955d6d69
e24a91d4c870c4b139852bae3d4dcc13cf5c733b
refs/heads/remote-github
2022-10-18T11:54:50.725055
2019-08-20T03:04:31
2019-08-20T03:04:31
45,239,946
8
23
NOASSERTION
2022-10-05T19:08:46
2015-10-30T08:58:55
Java
UTF-8
Java
false
false
3,428
java
/* * Copyright (c) Ripple Foundation CIC Ltd, UK, 2017 * Author: Christian Chevalley * This file is part of Project Ethercis * * 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.ethercis.opt.mapper; import com.ethercis.opt.TermDefinition; import com.ethercis.opt.ValuePoint; import org.openehr.build.RMObjectBuildingException; import org.openehr.schemas.v1.*; import java.util.*; /** * Created by christian on 1/31/2018. */ public class IsmTransition { static final String type = "ISM_TRANSITION"; CCOMPLEXOBJECT ccomplexobject; Map<String, TermDefinition> termDef; public IsmTransition(CCOMPLEXOBJECT ccomplexobject, Map<String, TermDefinition> termDef) { this.ccomplexobject = ccomplexobject; this.termDef = termDef; } public Map<String, Object> toMap(String name) throws NoSuchFieldException, RMObjectBuildingException { Map<String, Object> attributeMap = new HashMap<>(); attributeMap.put(Constants.TYPE, type); attributeMap.put(Constants.ATTRIBUTE_NAME, name); attributeMap.put(Constants.MANDATORY_ATTRIBUTES, new ValuePoint(type).attributes()); List valueList = new ArrayList<>(); Map<String, Object> constraintsMap = new HashMap<>(); attributeMap.put(Constants.CONSTRAINT, constraintsMap); for (CATTRIBUTE attribute : ccomplexobject.getAttributesArray()) { if (attribute.getRmAttributeName().equals(Constants.CURRENT_STATE)) { for (COBJECT cobject : attribute.getChildrenArray()) { if (cobject.getRmTypeName().equals("DV_CODED_TEXT")) { constraintsMap.put(Constants.CURRENT_STATE, new CodedText((CCOMPLEXOBJECT) cobject, termDef).toMap(Constants.CURRENT_STATE)); } } } else if (attribute.getRmAttributeName().equals(Constants.CAREFLOW_STEP)) { for (COBJECT cobject : attribute.getChildrenArray()) { if (cobject.getRmTypeName().equals("DV_CODED_TEXT")) { constraintsMap.put(Constants.CAREFLOW_STEP, new CodedText((CCOMPLEXOBJECT) cobject, termDef).toMap(Constants.CAREFLOW_STEP)); } } } } Map<String, Object> range = new HashMap<>(); constraintsMap.put(Constants.OCCURRENCE, range); range.put(Constants.MIN_OP, ccomplexobject.getOccurrences().isSetLowerIncluded() ? ">=" : ">"); range.put(Constants.MIN, ccomplexobject.getOccurrences().isSetLower() ? ccomplexobject.getOccurrences().getLower() : -1); range.put(Constants.MAX_OP, ccomplexobject.getOccurrences().isSetUpperIncluded() ? "<=" : "<"); range.put(Constants.MAX, ccomplexobject.getOccurrences().isSetUpper() ? ccomplexobject.getOccurrences().getUpper() : -1); valueList.add(attributeMap); return attributeMap; } }
[ "christian@adoc.co.th" ]
christian@adoc.co.th
3227d793ed06fff1a86b750aad962673fac6fd6b
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/6/6_5bbb726d12110f4ac948f028f7a2659bbf842b54/DumbTime/6_5bbb726d12110f4ac948f028f7a2659bbf842b54_DumbTime_t.java
c13065ebfdfa0c2e2395e9b649185bbc880f4539
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
5,534
java
/** * Copyright (C) 2011 Joseph Lehner <joseph.c.lehner@gmail.com> * * This file is part of RxDroid. * * RxDroid is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * RxDroid is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with RxDroid. If not, see <http://www.gnu.org/licenses/>. * * */ package at.caspase.rxdroid; import java.sql.Time; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone; import at.caspase.rxdroid.util.Hasher; /** * A crude time class that is not aware of time zones. * <p> * The purpose of this class is to handle the time offsets frequently encountered * in RxDroid without having to deal with unexpected timezone issues. Thus, in the * context of this application, it could actually be considered smart. * <p> * Also note that, even though the interface shares similarity with <code>java.util.Date</code>, * DumbTime intentionally does not extend this class as it would only cause confusion and enable * operations that make no sense, like comparing a DumbTime with a <code>java.util.Date</code>. * @author Joseph Lehner * */ public class DumbTime implements Comparable<DumbTime> { private static final String[] FORMATS = { "HH:mm:ss", "HH:mm" }; private int mHours; private int mMinutes; private int mSeconds; private int mMillis = 0; public DumbTime(int hours, int minutes, int seconds) { setHours(hours); setMinutes(minutes); setSeconds(seconds); } public DumbTime(int hours, int minutes) { this(hours, minutes, 0); } /** * Creates an instance using an offset from midnight. * * @param offset An offset from midnight, in milliseconds. The permissible range is thus [0, 86400000). */ public DumbTime(long offset) { this(offset, false); } /** * Creates an instance using an offset from midnight. * * @param offset An offset from midnight, in milliseconds. The permissible range is thus [0, 86400000), unless <code> * allowMoreThan24Hours</code> is <code>true</code>. * @param allowMoreThan24Hours See above. */ public DumbTime(long offset, boolean allowMoreThan24Hours) { if(offset >= 86400000 && !allowMoreThan24Hours) throw new IllegalArgumentException(offset + " is out of range"); mHours = (int) offset % 3600000; offset -= 3600000L * mHours; mMinutes = (int) offset % (60 * 1000); offset -= 60000L * mMinutes; mSeconds = (int) offset % 1000; offset -= 1000L * mSeconds; mMillis = (int) offset; } public int getHours() { return mHours; } public int getMinutes() { return mMinutes; } public int getSeconds() { return mSeconds; } public long getTime() { return mMillis + 1000 * (mHours * 3600 + mMinutes * 60 + mSeconds); } public void setHours(int hours) { if(hours < 0 || hours > 23) throw new IllegalArgumentException(); mHours = hours; } public void setMinutes(int minutes) { if(minutes < 0 || minutes > 59) throw new IllegalArgumentException(); mMinutes = minutes; } public void setSeconds(int seconds) { if(seconds < 0 || seconds > 59) throw new IllegalArgumentException(); mSeconds = seconds; } public boolean before(DumbTime time) { return getTime() < time.getTime(); } public boolean after(DumbTime time) { return getTime() > time.getTime(); } public int compareTo(DumbTime other) { if(this.getTime() == other.getTime()) return 0; return this.before(other) ? -1 : 1; } @Override public boolean equals(Object o) { if(o == null || !(o instanceof DumbTime)) return false; return getTime() == ((DumbTime) o).getTime(); } @Override public int hashCode() { final Hasher hasher = new Hasher(); hasher.hash(mMillis); hasher.hash(mSeconds); hasher.hash(mMinutes); hasher.hash(mHours); return hasher.getHashCode(); } @Override public String toString() { return toString(false); } public String toString(boolean withSeconds) { // this java.sql.Time will have a date of 1970-01-01 // which we can ignore, as we only need the time final Time time = new Time(getTime()); final SimpleDateFormat sdf = new SimpleDateFormat(withSeconds ? FORMATS[0] + ".SSS" : FORMATS[1]); sdf.setTimeZone(TimeZone.getTimeZone("UTC")); return sdf.format(time); } public static DumbTime valueOf(String timeString) { if(timeString != null) { for(String format : FORMATS) { final SimpleDateFormat sdf = new SimpleDateFormat(format); try { final Date date = sdf.parse(timeString); return new DumbTime(date.getHours(), date.getMinutes(), date.getSeconds()); } catch(ParseException e) { // ignore } } } throw new IllegalArgumentException("timeString=" + timeString); } public static DumbTime fromTime(Time time) { return new DumbTime(time.getHours(), time.getMinutes(), time.getSeconds()); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
1863c11c79df68719136e65eac3a0302c6973c51
080d6dff5c1a42521e79a75f7902f9a410a67ad5
/src/main/java/com/ua/impl_Sony/LegSony.java
660516a96c10966e0b25bd104be8a0e579c02de6
[]
no_license
Vygovsky/springSimpleDemo
47bec571cac387fd93e7a13d267cb26e9c3ed58f
4bd9489f28c78c7e04d970220bb867db45b5c73f
refs/heads/master
2020-04-08T16:13:52.296270
2018-12-17T11:42:08
2018-12-17T11:42:08
159,510,055
0
0
null
null
null
null
UTF-8
Java
false
false
234
java
package com.ua.impl_Sony; import com.ua.interface_.Leg; import org.springframework.stereotype.Component; @Component public class LegSony implements Leg { public void go() { System.out.println("Go from LegSony"); } }
[ "vigmol@ukr.net" ]
vigmol@ukr.net
233d39593908e176f432c77028943c348ab1ec53
2dcc440fa85d07e225104f074bcf9f061fe7a7ae
/gameserver/src/main/java/org/jts/dataparser/data/holder/doordata/DefaultSignBoard.java
3f1338d385e6bc5ec057e4bd737f2824d5a93694
[]
no_license
VitaliiBashta/L2Jts
a113bc719f2d97e06db3e0b028b2adb62f6e077a
ffb95b5f6e3da313c5298731abc4fcf4aea53fd5
refs/heads/master
2020-04-03T15:48:57.786720
2018-10-30T17:34:29
2018-10-30T17:35:04
155,378,710
0
3
null
null
null
null
UTF-8
Java
false
false
503
java
package org.jts.dataparser.data.holder.doordata; import org.jts.dataparser.data.annotations.value.ObjectValue; import org.jts.dataparser.data.annotations.value.StringValue; import org.jts.dataparser.data.common.Point3; /** * @author : Camelion * @date : 26.08.12 22:31 */ public class DefaultSignBoard { @StringValue(withoutName = true) public String signBoardName; // Название, есть у всех @ObjectValue public Point3 pos; // Позиция, есть у всех }
[ "Vitalii.Bashta@accenture.com" ]
Vitalii.Bashta@accenture.com
b9be18d39a50f82bf979a51140b1f5df76fd464d
d982e105c1d20aaf0cf24b3d062c7fcbb94abaac
/2019/src/leecode/回溯排列组合/Permutations.java
63ec2942d8535bb4b5bb0fd88d4e51a6d8853647
[]
no_license
wangxizzz/Algorithm
626670baa8b780a234eb92402646db6a7ee8c741
b1fcf9d7a40255edd39fe5690de4b1a74e6be50b
refs/heads/master
2021-06-13T00:37:10.157203
2021-03-16T15:41:31
2021-03-16T15:41:31
157,090,539
1
0
null
null
null
null
UTF-8
Java
false
false
3,013
java
package leecode.回溯排列组合; import java.util.ArrayList; import java.util.List; /** * @author wangxi created on 2020/12/19 23:16 * @version v1.0 * https://leetcode-cn.com/problems/permutations/ * * 解题的步骤是:先画图,再编码 * * 在画图的过程中思考清楚: * 1、分支如何产生; * 2、题目需要的解在哪里?是在叶子结点、还是在非叶子结点、还是在从跟结点到叶子结点的路径? * 3、哪些搜索会产生不需要的解的?例如:产生重复是什么原因,如果在浅层就知道这个分支不能产生需要的结果,应该提前剪枝,剪枝的条件是什么,代码怎么写? * https://leetcode-cn.com/problems/permutations/solution/hui-su-suan-fa-python-dai-ma-java-dai-ma-by-liweiw/ */ public class Permutations { public static void main(String[] args) { Permutations permutations = new Permutations(); int[] nums = {1,2,3}; permutations.permute01(nums); permutations.permute02(nums); } public List<List<Integer>> permute02(int[] nums) { int len = nums.length; // 使用一个动态数组保存所有可能的全排列 List<List<Integer>> res = new ArrayList<>(); if (len == 0) { return res; } boolean[] used = new boolean[len]; List<Integer> path = new ArrayList<>(len); dfs02(nums, len, path, used, res); return res; } private void dfs02(int[] nums, int len, List<Integer> path, boolean[] used, List<List<Integer>> res) { if (path.size() == len) { res.add(new ArrayList<>(path)); return; } for (int i = 0; i < len; i++) { if (!used[i]) { path.add(nums[i]); used[i] = true; System.out.println(" 递归之前 => " + path); dfs02(nums, len, path, used, res); used[i] = false; path.remove(path.size() - 1); System.out.println("递归之后 => " + path); } } } // 解法1 public List<List<Integer>> permute01(int[] nums) { List<List<Integer>> res = new ArrayList<>(); if (nums == null || nums.length <= 0) { return res; } dfs01(nums, new ArrayList<>(), res); return res; } private void dfs01(int[] nums, List<Integer> list, List<List<Integer>> res) { if (list.size() == nums.length) { res.add(new ArrayList<>(list)); return; } for (int i = 0; i < nums.length; i++) { if (list.contains(nums[i])) { continue; } list.add(nums[i]); dfs01(nums, list, res); // 想要判断回退后i的值,只需要根据回退前最后一个压栈i的值,即就是return的i的值 list.remove(list.size() - 1); } } }
[ "979675820@qq.com" ]
979675820@qq.com
ca100ac4d214a73e7b5bd7e7d4cf42b27e5aa7c6
c5d87143c46ed0921f253200ab999e90ea39f4f9
/src/com/uniwin/framework/service/impl/DocServiceImpl.java
90eafccda2b7154e6c41da0aed3b2b1dbd9f203a
[]
no_license
hebut/jxkh
eb4a491fe34fe92be8c1855f85a804946e4446b7
70ea411aa0f9abbd88ee4d4ab88ea28fcb1a2392
refs/heads/master
2021-01-23T13:22:38.196081
2014-02-24T08:23:17
2014-02-24T08:23:17
15,934,048
0
1
null
null
null
null
UTF-8
Java
false
false
1,432
java
package com.uniwin.framework.service.impl; import java.util.List; import com.uniwin.basehs.service.impl.BaseServiceImpl; import com.uniwin.framework.service.DocService; public class DocServiceImpl extends BaseServiceImpl implements DocService { public List findByKdid(List deplist,List rolelist) { StringBuffer queryString = new StringBuffer( "from WkTDoc as doc left join fetch doc.wktroles c where c.krId in ("); for (int i = 0; i < rolelist.size(); i++) { Long role = (Long) rolelist.get(i); queryString.append(role); if (i < rolelist.size() - 1) { queryString.append(","); } } queryString.append(") and doc.docKdid in ( "); for (int i = 0; i < deplist.size(); i++) { Long dept = (Long) deplist.get(i); queryString.append(dept); if (i < deplist.size() - 1) { queryString.append(","); } } queryString.append(") "); return getHibernateTemplate().find(queryString.toString()); } public List findbykuid(Long kuid){ String queryString="from WkTDoc as wd where wd.docKuid=? order by wd.doctime desc "; return getHibernateTemplate().find(queryString, new Object[] {kuid}); } public List findByKdidkrid(Long kdid, Long krid) { String queryString="from WkTDoc as doc left join fetch doc.wktroles c where c.krId=? and doc.docKdid = ?)"; return getHibernateTemplate().find(queryString,new Object[]{krid,kdid}); } }
[ "770506199@qq.com" ]
770506199@qq.com
1998676213fd911196819778142e37d603a0de0d
3808acbd8a9f6ca7a3e921a3ca58c237fd4c3106
/flash-dog-server/src/main/java/com/skymobi/monitor/model/ChartView.java
e813488d67e7de67e525ed9eafeed5084d1bdec6
[]
no_license
tangjiquan/flash-dog-parent
0c266fd99ed3bdc506a713fd8a9e701fba4159dc
ca4cb280d7427c369a65fadabf836b2b6992e401
refs/heads/master
2021-08-15T04:38:39.211766
2017-11-17T10:33:42
2017-11-17T10:33:42
111,091,214
1
0
null
null
null
null
UTF-8
Java
false
false
606
java
package com.skymobi.monitor.model; import com.google.common.collect.Lists; import java.util.List; /** * @author hushan * 图表视图 */ public class ChartView { private String title; private List<String> metricNames= Lists.newArrayList(); public List<String> getMetricNames() { return metricNames; } public void setMetricNames(List<String> metricNames) { this.metricNames = metricNames; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } }
[ "2495527426@qq.com" ]
2495527426@qq.com
bd30cc08353ea4ee297bffc2c313ad43297e394d
a006be286d4482aecf4021f62edd8dd9bb600040
/src/main/java/com/alipay/api/response/AlipayFundTransBatchCreateorderResponse.java
98a058bf6aead983ff0a2cb719c36f9d394bb07d
[]
no_license
zero-java/alipay-sdk
16e520fbd69974f7a7491919909b24be9278f1b1
aac34d987a424497d8e8b1fd67b19546a6742132
refs/heads/master
2021-07-19T12:34:20.765988
2017-12-13T07:43:24
2017-12-13T07:43:24
96,759,166
0
0
null
2017-07-25T02:02:45
2017-07-10T09:20:13
Java
UTF-8
Java
false
false
1,093
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.fund.trans.batch.createorder response. * * @author auto create * @since 1.0, 2017-02-22 15:58:25 */ public class AlipayFundTransBatchCreateorderResponse extends AlipayResponse { private static final long serialVersionUID = 5793965332319263537L; /** * 业务类型 */ @ApiField("biz_type") private String bizType; /** * 扩展信息;创建付款单时传入的相关数据 */ @ApiField("ext_param") private String extParam; /** * 单据号 */ @ApiField("transfer_no") private String transferNo; public void setBizType(String bizType) { this.bizType = bizType; } public String getBizType( ) { return this.bizType; } public void setExtParam(String extParam) { this.extParam = extParam; } public String getExtParam( ) { return this.extParam; } public void setTransferNo(String transferNo) { this.transferNo = transferNo; } public String getTransferNo( ) { return this.transferNo; } }
[ "443683059a" ]
443683059a
f2e097d5591c7ac3e4b2bfc7464ee2ac3ee317b2
784e29cb5b5e2642c7054b3b965426b5a9bd2338
/testsuite/testsuite-jaxrs-jsonb/src/test/java/org/wildfly/swarm/jaxrs/JaxrsJsonbTest.java
2dacdb08c0ba229cd7abd357cb2e2dd96c2c4178
[ "Apache-2.0" ]
permissive
mirostary/thorntail
05f51eef2d9bcb4e681fbf425a2dbb7a5ea88867
ed9b80c0719fd781f59ff10c9a527ae5160b5560
refs/heads/master
2022-11-08T09:07:05.632038
2020-06-22T08:21:48
2020-06-22T08:21:48
268,496,800
0
0
Apache-2.0
2020-06-01T10:57:40
2020-06-01T10:57:39
null
UTF-8
Java
false
false
2,748
java
package org.wildfly.swarm.jaxrs; 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.Entity; import javax.ws.rs.core.MediaType; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.container.test.api.RunAsClient; import org.jboss.arquillian.junit.Arquillian; import org.jboss.resteasy.plugins.providers.jsonb.JsonBindingProvider; import org.jboss.shrinkwrap.api.Archive; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @RunWith(Arquillian.class) public class JaxrsJsonbTest { private Client client; @Before public void setup() throws Exception { client = ClientBuilder.newClient(); } @After public void tearDown() throws Exception { client.close(); } @Deployment public static Archive<?> createDeployment() throws Exception { JAXRSArchive deployment = ShrinkWrap.create(JAXRSArchive.class); deployment.addResource(MyResource.class); deployment.addResource(MyApplication.class); deployment.addResource(Dog.class); deployment.addAllDependencies(); return deployment; } @Test @RunAsClient public void testJaxrsJsonb() throws Exception { Dog dog = new Dog(); dog.name = "Falco"; dog.age = 4; dog.bitable = false; Jsonb jsonb = JsonbBuilder.create(); String response = client.target("http://localhost:8080/jsonb") .request(MediaType.APPLICATION_JSON) .post(Entity.entity(jsonb.toJson(dog), MediaType.APPLICATION_JSON), String.class); Dog dog2 = jsonb.fromJson(response, Dog.class); Assert.assertEquals(dog.name, dog2.name); Assert.assertEquals(dog.age, dog2.age); Assert.assertTrue(dog2.bitable); } @Test @RunAsClient public void testJaxrsJsonbWithProvider() throws Exception { Dog dog = new Dog(); dog.name = "Falco"; dog.age = 4; dog.bitable = false; Dog dog2 = client.target("http://localhost:8080/jsonb") .register(new JsonBindingProvider()) .request(MediaType.APPLICATION_JSON) .post(Entity.entity(dog, MediaType.APPLICATION_JSON), Dog.class); Assert.assertEquals(dog.name, dog2.name); Assert.assertEquals(dog.age, dog2.age); Assert.assertTrue(dog2.bitable); } }
[ "lthon@redhat.com" ]
lthon@redhat.com
07586c3c9b417cf06f296a9c1c1a0f1932953c48
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/2/894.java
ac9c35acda414fff74bee3860a6c49d472035b28
[ "MIT" ]
permissive
qiuchili/ggnn_graph_classification
c2090fefe11f8bf650e734442eb96996a54dc112
291ff02404555511b94a4f477c6974ebd62dcf44
refs/heads/master
2021-10-18T14:54:26.154367
2018-10-21T23:34:14
2018-10-21T23:34:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,311
java
public class shu { public int num; public String author_name = new String(new char[27]); } package <missing>; public class GlobalMembers { public static int Main() { int[] ere = new int[26]; int m; int i; int max = 0; int key; for (i = 0;i < 26;i++) { ere[i] = 0; } String a; shu[] book = tangible.Arrays.initializeWithDefaultshuInstances(999); String tempVar = ConsoleInput.scanfRead(); if (tempVar != null) { m = Integer.parseInt(tempVar); } for (i = 0;i < m;i++) { String tempVar2 = ConsoleInput.scanfRead(); if (tempVar2 != null) { book[i].num = Integer.parseInt(tempVar2); } String tempVar3 = ConsoleInput.scanfRead(); if (tempVar3 != null) { book[i].author_name = tempVar3.charAt(0); } } for (i = 0;i < m;i++) { a = book[i].author_name; while (a != '\0') { ere[a - 'A']++; a = a.Substring(1); } } for (i = 0;i < 26;i++) { if (ere[i] >= max) { max = ere[i]; key = i; } } System.out.printf("%c\n",(key + 'A')); System.out.printf("%d\n",ere[key]); for (i = 0;i < m;i++) { a = book[i].author_name; while (a != '\0') { if ((key + 'A') == a) { System.out.printf("%d\n",book[i].num); break; } a = a.Substring(1); } } return 0; } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
ebe81b4417caff71836a5e022761526fa456eae4
c5e6c9fc7942572ddbdfb0c087505254d2a4ffc4
/game6/xxkg/src/main/java/com/tumei/modelconf/festival/FestivalLogonConf.java
49bcb40c31ac38c867873dcf8f4ec0f90a0ffa57
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
zhangwei9757/xiaocaibao
60074b00651ae41506c4eabb2636dfaae7947d7c
9e2ad2669af0b0453ea9149f8732953c57c2bb7e
refs/heads/master
2020-03-25T01:26:04.975319
2018-10-15T09:30:17
2018-10-15T09:30:17
143,237,486
1
0
null
null
null
null
UTF-8
Java
false
false
341
java
package com.tumei.modelconf.festival; import org.springframework.data.annotation.Id; import org.springframework.data.mongodb.core.mapping.Document; /** * Created by Administrator on 2017/1/17 0017. */ @Document(collection = "Feslogin") public class FestivalLogonConf { @Id public String id; public int key; public int[] rewards; }
[ "245370344@qq.com" ]
245370344@qq.com
5eccb6d11e1af78cf9c2edc05f53d5ab93f90803
b7408ff39c38a2d4fbbf52d20d37a98310191c74
/yzyj/yzyj_app/src/main/java/com/core/umen/ios/IOSBroadcast.java
b786d846bbc46a76a27e551f299abea9b5a69f11
[]
no_license
xiaoxian075/aten
344c84891b890e43a68f89176705f022057aad70
117f32d2bc6f42fc1accfeb0035382b70d3b2b7e
refs/heads/master
2021-01-22T14:02:29.354545
2017-09-04T10:08:39
2017-09-04T10:08:39
100,698,762
0
0
null
null
null
null
UTF-8
Java
false
false
343
java
package com.core.umen.ios; import com.core.umen.IOSNotification; public class IOSBroadcast extends IOSNotification { public IOSBroadcast(String appkey,String appMasterSecret) throws Exception { setAppMasterSecret(appMasterSecret); setPredefinedKeyValue("appkey", appkey); this.setPredefinedKeyValue("type", "broadcast"); } }
[ "xiaoxian075@126.com" ]
xiaoxian075@126.com
ac9dab0cb84609e5b64b7e533d3f040ceb34a6d0
3e519985adc42b000f3888b9ba00e59bfe6ccee9
/mall_gift/src/main/java/com/ningpai/coupon/dao/impl/CouponNoMapperImpl.java
6978e5825047db70907c8092b77d14f3d819e8e6
[]
no_license
zhenchai/mall
8475077cf7a5fe5208510a3408502143667e9f17
c6fa070691bd62c53dbaa0b467bcb389bc66a373
refs/heads/master
2020-04-13T10:10:49.514859
2018-11-18T10:45:42
2018-11-18T10:45:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,281
java
/*  * Copyright 2013 NingPai, Inc. All rights reserved.  * NINGPAI PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.  */ package com.ningpai.coupon.dao.impl; import java.util.List; import java.util.Map; import org.springframework.stereotype.Repository; import com.ningpai.coupon.bean.CouponNo; import com.ningpai.coupon.dao.CouponNoMapper; import com.ningpai.manager.base.BasicSqlSupport; /** * 优惠券卷码实现类 * * @author ggn 2014-03-19 * */ @Repository("CouponNoMapper") public class CouponNoMapperImpl extends BasicSqlSupport implements CouponNoMapper { /* * 创建优惠券卷码 * * @see com.ningpai.coupon.dao.CouponNoMapper#createCouponNo(java.util.List) */ @Override public int createCouponNo(List<CouponNo> list) { return this.insert("com.ningpai.web.dao.CouponNoMapper.createCouponNo", list); } /* * 删除优惠券卷码 * * @see com.ningpai.coupon.dao.CouponNoMapper#delCouponNo(java.lang.Long) */ @Override public int delCouponNo(Long couponId) { return this.update("com.ningpai.web.dao.CouponNoMapper.delCouponNo", couponId); } /* * 批量删除优惠券卷码 * * @see com.ningpai.coupon.dao.CouponNoMapper#delAllCouponNo(java.util.List) */ @Override public int delAllCouponNo(List<Long> list) { return this.update("com.ningpai.web.dao.CouponNoMapper.delAllCouponNo", list); } /* * 查询所有卷吗 * * @see * com.ningpai.coupon.dao.CouponNoMapper#selectNoByCouponId(java.lang.Long) */ @Override public List<CouponNo> selectNoByCouponId(Long couponId) { return this.selectList( "com.ningpai.web.dao.CouponNoMapper.selectNoByCouponId", couponId); } /* * 修改优惠券使用 * * @see * com.ningpai.coupon.dao.CouponNoMapper#updateCodeIsUse(com.ningpai.coupon * .bean.CouponNo) */ @Override public int updateCodeIsUse(CouponNo cn) { return this.update( "com.ningpai.web.dao.CouponNoMapper.updateCodeIsUse", cn); } /* * 修改优惠券为已经领取 * * @see * com.ningpai.coupon.dao.CouponNoMapper#updateNoIsGet(com.ningpai.coupon * .bean.CouponNo) */ @Override public int updateNoIsGet(CouponNo cn) { return this.update("com.ningpai.web.dao.CouponNoMapper.updateNoIsGet", cn); } /* * 查询未使用的卷码 * * @see * com.ningpai.coupon.dao.CouponNoMapper#selectNoByCouponIdByStatus(java * .lang.Long) */ @Override public CouponNo selectNoByCouponIdByStatus(Long couponId) { return this .selectOne( "com.ningpai.web.dao.CouponNoMapper.selectNoByCouponIdByStatus", couponId); } /* * 修改优惠劵劵码的使用状态 * * @see * com.ningpai.coupon.dao.CouponNoMapper#modifyNoStatus(com.ningpai.coupon * .bean.CouponNo) */ @Override public int modifyNoStatus(CouponNo no) { return this.update("com.ningpai.web.dao.CouponNoMapper.modifyNoStatus", no); } /* * 赠送优惠劵 * * @see * com.ningpai.coupon.dao.CouponNoMapper#giveCusCoupon(com.ningpai.coupon * .bean.CouponNo) */ @Override public int giveCusCoupon(CouponNo no) { return this.update("com.ningpai.web.dao.CouponNoMapper.giveCusCoupon", no); } /* * 分页查询数据 * * @see * com.ningpai.coupon.dao.CouponNoMapper#selectNoListByCouponId(java.util * .Map) */ @Override public List<Object> selectNoListByCouponId(Map<String, Object> map) { return this.selectList( "com.ningpai.web.dao.CouponNoMapper.selectNoListByCouponId", map); } /* * 查询总数 * * @see * com.ningpai.coupon.dao.CouponNoMapper#selectNoCountByCouponId(java.util * .Map) */ @Override public int selectNoCountByCouponId(Map<String, Object> map) { return this.selectOne( "com.ningpai.web.dao.CouponNoMapper.selectNoCountByCouponId", map); } /* * 修改领取状态 * * @see * com.ningpai.coupon.dao.CouponNoMapper#changeCouponGetAndStatus(java.lang * .Long) */ @Override public int changeCouponGetAndStatus(Long codeId) { return this.update( "com.ningpai.web.dao.CouponNoMapper.changeCouponGetAndStatus", codeId); } /* * 获取领取优惠券数量 * * @see * com.ningpai.coupon.dao.CouponNoMapper#getCouponGetNoByCouponId(java.lang * .Long) */ @Override public int getCouponGetNoByCouponId(Long couponId) { return this.selectOne( "com.ningpai.web.dao.CouponNoMapper.getCouponGetNoByCouponId", couponId); } /* * 获取优惠券 * * @see * com.ningpai.coupon.dao.CouponNoMapper#updateCouponCustomer(java.util.Map) */ @Override public int updateCouponCustomer(Map<String, Object> param) { return this.update( "com.ningpai.web.dao.CouponNoMapper.updateCouponCustomer", param); } /* * 查询获取会员卷张数 * * @see com.ningpai.coupon.dao.CouponNoMapper#selectReadyGet(java.util.Map) */ @Override public int selectReadyGet(Map<String, Object> param) { return this.selectOne( "com.ningpai.web.dao.CouponNoMapper.selectReadyGet", param); } /* * 返还优惠劵 * * @see com.ningpai.coupon.dao.CouponNoMapper#returnCouponNo(java.lang.Long) */ @Override public int returnCouponNo(String codeNo) { return this.update("com.ningpai.web.dao.CouponNoMapper.backCouponNo", codeNo); } /* * 根据优惠券ID查询该优惠券被领取的张数 * * @see * com.ningpai.coupon.dao.CouponNoMapper#queryUsedCountByCouponId(java.lang * .Long) */ @Override public Long queryUsedCountByCouponId(Long couponId) { return this.selectOne( "com.ningpai.web.dao.CouponNoMapper.queryUsedCountByCouponId", couponId); } @Override public int selectCountAllByCouponId(Long couponId) { return this.selectOne( "com.ningpai.web.dao.CouponNoMapper.selectCountAllByCouponId", couponId); } @Override public int selectCouponNoByStatus(Long couponId) { return this.selectOne( "com.ningpai.web.dao.CouponNoMapper.selectCouponNoByStatus", couponId); } /* * * @see * com.ningpai.coupon.dao.CouponNoMapper#newSelectCouponList(java.util.Map) */ @Override public List<Object> newSelectCouponList(Map<String, Object> map) { return this.selectList( "com.ningpai.web.dao.CouponNoMapper.newselectNoListByCouponId", map); } }
[ "wdpxl@sina.com" ]
wdpxl@sina.com
2c3c765d9e2ab0f1596dd57d7f93d9b9840fe4b8
ab8a34e5b821dde7b09abe37c838de046846484e
/twilio/sample-code-master/api/v2010/credential_list_mapping/fetch-default/fetch-default.7.x.java
515c909e0f26235571aa028ebc8ea78a316d06a3
[]
no_license
sekharfly/twilio
492b599fff62618437c87e05a6c201d6de94527a
a2847e4c79f9fbf5c53f25c8224deb11048fe94b
refs/heads/master
2020-03-29T08:39:00.079997
2018-09-21T07:20:24
2018-09-21T07:20:24
149,721,431
0
1
null
null
null
null
UTF-8
Java
false
false
799
java
// Install the Java helper library from twilio.com/docs/java/install import com.twilio.Twilio; import com.twilio.rest.api.v2010.account.sip.domain.CredentialListMapping; public class Example { // Find your Account Sid and Token at twilio.com/console public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; public static final String AUTH_TOKEN = "your_auth_token"; public static void main(String[] args) { Twilio.init(ACCOUNT_SID, AUTH_TOKEN); CredentialListMapping credentialListMapping = CredentialListMapping.fetcher( "SDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") .fetch(); System.out.println(credentialListMapping.getFriendlyName()); } }
[ "sekharfly@gmail.com" ]
sekharfly@gmail.com
f3d46a92347e0c6b5760c02cc77b3deb089850c8
a1d88edfa76f6b56371a33287701c70c3164235f
/sqlLite/app/src/main/java/com/example/sqllite/DisplayWordActivity.java
b552d78df3d5f875082de95c030c71daeea4aebf
[]
no_license
nabinkhanal32/sqlLite
c66a5464cf5bc050c33eacc6af90edb28d6613bd
7023600fbb940b658e8e3d73415b3334effe351d
refs/heads/master
2020-05-18T16:28:37.168804
2019-05-02T06:06:37
2019-05-02T06:06:37
184,526,939
0
0
null
null
null
null
UTF-8
Java
false
false
1,394
java
package com.example.sqllite; import android.database.sqlite.SQLiteDatabase; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.widget.ArrayAdapter; import android.widget.ListView; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import helper.MyHelper; import helper.Word; public class DisplayWordActivity extends AppCompatActivity { private ListView lstWord; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_display_word); lstWord = findViewById(R.id.lstWord); LoadWord(); } public void LoadWord() { final MyHelper myHelper = new MyHelper(this); final SQLiteDatabase sqLiteDatabase =myHelper.getWritableDatabase(); List<Word> wordList= new ArrayList<>(); wordList = myHelper.GetAllWords(sqLiteDatabase); HashMap<String,String> hashMap = new HashMap<>(); for (int i =0; i<wordList.size(); i++) { hashMap.put(wordList.get(i).getWord(),wordList.get(i).getMeaning()); } ArrayAdapter<String> stringArrayAdapter = new ArrayAdapter<>( this, android.R.layout.simple_list_item_1, new ArrayList<String>(hashMap.keySet()) ); lstWord.setAdapter(stringArrayAdapter); } }
[ "softwarica@softwarica.com" ]
softwarica@softwarica.com
4e1c1afbceefcf47a8088ebdf44c92ffaf318f92
34ba9070ed1c52dd88c497b660618115f4874aca
/src/main/java/org/nthdimenzion/ddd/infrastructure/multitenant/ITenantAwareDataSourceFactory.java
15ccbdb8a863a757d5d8028286068483a50f4732
[]
no_license
Mohan-Sharma/DHR
0e7f0d3c08493f0ed1010f41f97f07644cce487d
4f67115e0b2d71a2ae66a8e9f60221277c237c50
refs/heads/master
2021-01-19T20:57:04.378634
2016-09-21T12:13:19
2016-09-21T12:13:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
376
java
package org.nthdimenzion.ddd.infrastructure.multitenant; import javax.sql.DataSource; import java.util.Map; public interface ITenantAwareDataSourceFactory { Map<Object,DataSourceHolder> initialiseConfiguredTenantDataSources(); Map<Object, DataSourceHolder> fetchConfiguredTenantDataSourceHolders(); Map<Object,DataSource> fetchConfiguredTenantDataSource(); }
[ "samir_padhy@nthdimenzion.com" ]
samir_padhy@nthdimenzion.com
19edcfb39d89164ff593fb5e19d78c3ceddc5d07
d132a32f07cdc583c021e56e61a4befff6228900
/src/main/java/net/minecraft/network/play/server/S34PacketMaps.java
5dffc2b6df379604d36c1aeb3a9bc3f53ead26d6
[]
no_license
TechCatOther/um_clean_forge
27d80cb6e12c5ed38ab7da33a9dd9e54af96032d
b4ddabd1ed7830e75df9267e7255c9e79d1324de
refs/heads/master
2020-03-22T03:14:54.717880
2018-07-02T09:28:10
2018-07-02T09:28:10
139,421,233
0
0
null
null
null
null
UTF-8
Java
false
false
3,895
java
package net.minecraft.network.play.server; import java.io.IOException; import java.util.Collection; import net.minecraft.network.INetHandler; import net.minecraft.network.Packet; import net.minecraft.network.PacketBuffer; import net.minecraft.network.play.INetHandlerPlayClient; import net.minecraft.util.Vec4b; import net.minecraft.world.storage.MapData; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class S34PacketMaps implements Packet { private int mapId; private byte field_179739_b; private Vec4b[] field_179740_c; private int field_179737_d; private int field_179738_e; private int field_179735_f; private int field_179736_g; private byte[] field_179741_h; private static final String __OBFID = "CL_00001311"; public S34PacketMaps() {} public S34PacketMaps(int p_i45975_1_, byte p_i45975_2_, Collection p_i45975_3_, byte[] p_i45975_4_, int p_i45975_5_, int p_i45975_6_, int p_i45975_7_, int p_i45975_8_) { this.mapId = p_i45975_1_; this.field_179739_b = p_i45975_2_; this.field_179740_c = (Vec4b[])p_i45975_3_.toArray(new Vec4b[p_i45975_3_.size()]); this.field_179737_d = p_i45975_5_; this.field_179738_e = p_i45975_6_; this.field_179735_f = p_i45975_7_; this.field_179736_g = p_i45975_8_; this.field_179741_h = new byte[p_i45975_7_ * p_i45975_8_]; for (int j1 = 0; j1 < p_i45975_7_; ++j1) { for (int k1 = 0; k1 < p_i45975_8_; ++k1) { this.field_179741_h[j1 + k1 * p_i45975_7_] = p_i45975_4_[p_i45975_5_ + j1 + (p_i45975_6_ + k1) * 128]; } } } public void readPacketData(PacketBuffer buf) throws IOException { this.mapId = buf.readVarIntFromBuffer(); this.field_179739_b = buf.readByte(); this.field_179740_c = new Vec4b[buf.readVarIntFromBuffer()]; for (int i = 0; i < this.field_179740_c.length; ++i) { short short1 = (short)buf.readByte(); this.field_179740_c[i] = new Vec4b((byte)(short1 >> 4 & 15), buf.readByte(), buf.readByte(), (byte)(short1 & 15)); } this.field_179735_f = buf.readUnsignedByte(); if (this.field_179735_f > 0) { this.field_179736_g = buf.readUnsignedByte(); this.field_179737_d = buf.readUnsignedByte(); this.field_179738_e = buf.readUnsignedByte(); this.field_179741_h = buf.readByteArray(); } } public void writePacketData(PacketBuffer buf) throws IOException { buf.writeVarIntToBuffer(this.mapId); buf.writeByte(this.field_179739_b); buf.writeVarIntToBuffer(this.field_179740_c.length); Vec4b[] avec4b = this.field_179740_c; int i = avec4b.length; for (int j = 0; j < i; ++j) { Vec4b vec4b = avec4b[j]; buf.writeByte((vec4b.func_176110_a() & 15) << 4 | vec4b.func_176111_d() & 15); buf.writeByte(vec4b.func_176112_b()); buf.writeByte(vec4b.func_176113_c()); } buf.writeByte(this.field_179735_f); if (this.field_179735_f > 0) { buf.writeByte(this.field_179736_g); buf.writeByte(this.field_179737_d); buf.writeByte(this.field_179738_e); buf.writeByteArray(this.field_179741_h); } } public void func_180741_a(INetHandlerPlayClient p_180741_1_) { p_180741_1_.handleMaps(this); } @SideOnly(Side.CLIENT) public int getMapId() { return this.mapId; } @SideOnly(Side.CLIENT) public void func_179734_a(MapData p_179734_1_) { p_179734_1_.scale = this.field_179739_b; p_179734_1_.playersVisibleOnMap.clear(); int i; for (i = 0; i < this.field_179740_c.length; ++i) { Vec4b vec4b = this.field_179740_c[i]; p_179734_1_.playersVisibleOnMap.put("icon-" + i, vec4b); } for (i = 0; i < this.field_179735_f; ++i) { for (int j = 0; j < this.field_179736_g; ++j) { p_179734_1_.colors[this.field_179737_d + i + (this.field_179738_e + j) * 128] = this.field_179741_h[i + j * this.field_179735_f]; } } } public void processPacket(INetHandler handler) { this.func_180741_a((INetHandlerPlayClient)handler); } }
[ "alone.inbox@gmail.com" ]
alone.inbox@gmail.com
3d2e3c16d88089a4b37630e91f4b5ea479241c86
19f3e4df408f56e7f4fe20c8cdecedbd71d9887e
/38_java/classes-dex2jar/net/youmi/android/a/h/j.java
39d012c71557578b86cf9aff4955d3a999695e07
[]
no_license
XuGuangHuiGit/softwareSecurity
5ed6dfe1316672a061dbe03bf235c452342b296f
9f1eb53d3e06751fe17dbf43a5d7a5fa95051313
refs/heads/master
2020-04-08T01:42:39.467579
2018-11-24T05:46:28
2018-11-24T05:46:28
158,906,469
0
0
null
null
null
null
UTF-8
Java
false
false
1,327
java
package net.youmi.android.a.h; import java.util.Locale; import net.youmi.android.c.b.e; public class j { private String a; private String b; private String c; private String d; public String a() { return this.a; } public void a(String paramString) { this.a = e.b(paramString); } public String b() { return this.c; } public void b(String paramString) { this.c = e.b(paramString); } public String c() { return this.b; } public void c(String paramString) { this.b = e.b(paramString); } public String d() { return this.d; } public void d(String paramString) { this.d = e.b(paramString); } public boolean e() { return (this.a != null) && (this.b != null) && (this.c != null); } public String toString() { try { String str = String.format(Locale.getDefault(), "u:[%s],r:[%s],e:[%s],t:[%s]", new Object[] { this.a, this.c, this.b, this.d }); return str; } catch (Throwable localThrowable) {} return super.toString(); } } /* Location: C:\Users\guanghui\Desktop\软件安全\38\classes-dex2jar.jar * Qualified Name: net.youmi.android.a.h.j * JD-Core Version: 0.7.0.1 */
[ "xgh.bupt@gmail.com" ]
xgh.bupt@gmail.com
8564a5bce4934a24706d4cd5c80436dfba7ef3bd
d9eee40a76aecafde448db9f380e28e835f197c8
/src/com/smart/platform/gui/ste/SelectfilesDialog.java
d5a56bcd358ef484d343f4a95131ac513388e911
[]
no_license
liveqmock/SmartServer
94d1b1dc5b21e2b334298db93b40125250b15b82
914f34191cd827ffbabbabccfef828e488a1ae96
refs/heads/master
2021-01-21T16:54:21.468977
2013-10-28T13:21:05
2013-10-28T13:21:05
null
0
0
null
null
null
null
GB18030
Java
false
false
3,854
java
package com.smart.platform.gui.ste; import java.awt.BorderLayout; import java.awt.Container; import java.awt.Dialog; import java.awt.Dimension; import java.awt.event.ActionEvent; import java.io.File; import java.util.Enumeration; import java.util.Properties; import java.util.Vector; import javax.swing.DefaultListModel; import javax.swing.JButton; import javax.swing.JFileChooser; import javax.swing.JList; import javax.swing.JPanel; import javax.swing.JScrollPane; import com.smart.platform.communicate.RecordTrunk; import com.smart.platform.gui.control.CDialog; import com.smart.platform.gui.control.DBTableModel; /** * 选择上传附件 * @deprecated * @author Administrator * */ public class SelectfilesDialog extends CDialog { DBTableModel stedbmodel = null; int sterow = 0; private JList listFiles; public SelectfilesDialog(Dialog dlg, DBTableModel stedbmodel, int sterow) { super(dlg, "选择要上传的文件", true); this.stedbmodel = stedbmodel; this.sterow = sterow; initDialog(); setPreferredSize(new Dimension(640,300)); localCenter(); setDefaultCloseOperation(CDialog.DISPOSE_ON_CLOSE); bindData(); } @Override public void setVisible(boolean b) { // TODO Auto-generated method stub if(b){ selectFile(); } super.setVisible(b); } void bindData(){ if(stedbmodel!=null){ RecordTrunk rec=stedbmodel.getRecordThunk(sterow); Enumeration<File> en=rec.getWantuploadfiles().elements(); while(en.hasMoreElements()){ listmodel.addElement(en.nextElement()); } } } void initDialog() { Container cp = this.getContentPane(); cp.setLayout(new BorderLayout()); listmodel = new DefaultListModel(); listFiles = new JList(listmodel); cp.add(listFiles); cp.add(new JScrollPane(listFiles), BorderLayout.CENTER); JPanel jpbtm=new JPanel(); cp.add(jpbtm,BorderLayout.SOUTH); JButton btn=new JButton("增加文件"); btn.setActionCommand("增加文件"); btn.addActionListener(this); jpbtm.add(btn); btn=new JButton("取消文件"); btn.setActionCommand("取消文件"); btn.addActionListener(this); jpbtm.add(btn); btn=new JButton("确定"); btn.setActionCommand("确定"); btn.addActionListener(this); jpbtm.add(btn); btn=new JButton("取消"); btn.setActionCommand("取消"); btn.addActionListener(this); jpbtm.add(btn); } void selectFile(){ jfc.setMultiSelectionEnabled(true); int ret=jfc.showOpenDialog(this); if(ret!=JFileChooser.APPROVE_OPTION){ return; } File[] selectedfs=jfc.getSelectedFiles(); for(int i=0;selectedfs!=null && i<selectedfs.length;i++){ listmodel.addElement(selectedfs[i]); } } boolean ok=false; JFileChooser jfc=new JFileChooser(); private DefaultListModel listmodel; @Override public void actionPerformed(ActionEvent e) { if(e.getActionCommand().equals("增加文件")){ selectFile(); }else if(e.getActionCommand().equals("确定")){ Vector<File> ftable=new Vector<File>(); for(int i=0;i<listmodel.size();i++){ ftable.add((File)listmodel.elementAt(i)); } stedbmodel.getRecordThunk(sterow).setWantuploadfile(ftable); ok=true; dispose(); }else if(e.getActionCommand().equals("取消")){ ok=false; dispose(); }else if(e.getActionCommand().equals("取消文件")){ int si=listFiles.getSelectedIndex(); if(si>=0){ listmodel.remove(si); } } } public boolean getOk(){ return ok; } public static void main(String[] argv){ Properties prop=System.getProperties(); Enumeration en=prop.keys(); while(en.hasMoreElements()){ String s=(String)en.nextElement(); if(s.toLowerCase().indexOf("home")>=0){ System.out.println(s); } } System.out.println(prop.getProperty("user.home")); /* SelectfilesDialog dlg=new SelectfilesDialog(null,null,0); dlg.pack(); dlg.setVisible(true); */ } }
[ "jsetter2046@gmail.com" ]
jsetter2046@gmail.com
d75d09235672cc3dbee2c31b7851cf592f7b2476
d5f5fa26bd4e39154cb5498735e91810275d586a
/SVN_Source_26/.svn/pristine/ba/ba610467b734f4e572e92403a9400869225c8319.svn-base
5d4c59b4f8965538f19c87656379a744500dd547
[]
no_license
henlisishi/Paopaokan
72804819a644b1cd003a3e9ce77cef434d31f809
51d1cdd9dece55b411a7dc0d4fe9024968c6f7e3
refs/heads/master
2023-03-16T17:00:48.784381
2019-04-28T02:35:36
2019-04-28T02:35:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
663
package com.app.pao.entity.network; import java.io.Serializable; /** * 跑步历史速度实例 * * @author Raul * */ public class GetWorkoutSpeedEntity implements Serializable { private float speed; private String timeoffset; public GetWorkoutSpeedEntity() { } public GetWorkoutSpeedEntity(float speed, String timeoffset) { super(); this.speed = speed; this.timeoffset = timeoffset; } public Float getSpeed() { return speed; } public void setSpeed(float speed) { this.speed = speed; } public String getTimeoffset() { return timeoffset; } public void setTimeoffset(String timeoffset) { this.timeoffset = timeoffset; } }
[ "raul.fan@fizzo.cn" ]
raul.fan@fizzo.cn
e83505feb935ec86ef3a8c9f6f6f36e296d9ff3b
139960e2d7d55e71c15e6a63acb6609e142a2ace
/mobile_app1/module1022/src/main/java/module1022packageJava0/Foo101.java
78e07501a9defdac8b2a76ccb8e7db37046263dd
[ "Apache-2.0" ]
permissive
uber-common/android-build-eval
448bfe141b6911ad8a99268378c75217d431766f
7723bfd0b9b1056892cef1fef02314b435b086f2
refs/heads/master
2023-02-18T22:25:15.121902
2023-02-06T19:35:34
2023-02-06T19:35:34
294,831,672
83
7
Apache-2.0
2021-09-24T08:55:30
2020-09-11T23:27:37
Java
UTF-8
Java
false
false
296
java
package module1022packageJava0; import java.lang.Integer; public class Foo101 { Integer int0; public void foo0() { new module1022packageJava0.Foo100().foo3(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } }
[ "oliviern@uber.com" ]
oliviern@uber.com
64751559fce3a09cc7a845be02d5fe76a7781c49
124df74bce796598d224c4380c60c8e95756f761
/com.raytheon.viz.ghg/src/com/raytheon/viz/ghg/monitor/listener/GhgMonitorTableSelectionListener.java
18445455f6227ec00b179fce286951a7ed032753
[]
no_license
Mapoet/AWIPS-Test
19059bbd401573950995c8cc442ddd45588e6c9f
43c5a7cc360b3cbec2ae94cb58594fe247253621
refs/heads/master
2020-04-17T03:35:57.762513
2017-02-06T17:17:58
2017-02-06T17:17:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,315
java
/** * This software was developed and / or modified by Raytheon Company, * pursuant to Contract DG133W-05-CQ-1067 with the US Government. * * U.S. EXPORT CONTROLLED TECHNICAL DATA * This software product contains export-restricted data whose * export/transfer/disclosure is restricted by U.S. law. Dissemination * to non-U.S. persons whether in the United States or abroad requires * an export license or other authorization. * * Contractor Name: Raytheon Company * Contractor Address: 6825 Pine Street, Suite 340 * Mail Stop B8 * Omaha, NE 68106 * 402.291.0100 * * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ package com.raytheon.viz.ghg.monitor.listener; import com.raytheon.viz.ghg.monitor.event.GhgMonitorTableSelectionEvent; /** * Table selection interface. * * <pre> * * SOFTWARE HISTORY * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Jun 2, 2010 mpduff Initial creation * * </pre> * * @author mpduff * @version 1.0 */ public interface GhgMonitorTableSelectionListener { public void notifyUpdate(GhgMonitorTableSelectionEvent evt); }
[ "joshua.t.love@saic.com" ]
joshua.t.love@saic.com
4d83bb60c5f622718263a99862a86d8f14634d73
634ae05c5e190412b2c50a7b5317c3d331322bdf
/Sandbox/src/main/java/basic/SwitchString.java
dd9695c523b9f9908044570440ffd186164871f7
[]
no_license
ganqzz/java_workspace
1b919aff1f177c5b6971e7f19f465129a247ed72
3a7285e9b1945c8b55a4b02bbb20aee3d31a9086
refs/heads/master
2023-07-16T06:03:36.310878
2021-09-04T03:44:37
2021-09-04T03:44:37
389,467,395
0
0
null
null
null
null
UTF-8
Java
false
false
648
java
package basic; class SwitchString { public static void main(String[] args) { int h = 0; String s = args.length == 0 ? "" : args[0].trim().toLowerCase(); switch (s) { case "hoge": System.out.println("Case1: " + s); break; case "fuga": System.out.println("Case2: " + s); // break; // スルー case "fefe": System.out.println("Case3: " + s); break; default: System.out.println("Default."); break; } System.out.println(); } }
[ "ganqzz@users.noreply.github.com" ]
ganqzz@users.noreply.github.com
f07962e6331d1e2b74cce8453f9f384a16c6a765
5f53b1ea0bbb537188aa6110db524bc7f1926def
/header/src/main/java/org/zstack/header/host/TakeSnapshotOnHypervisorMsg.java
292afb46540ac0f4848b2c74d72207664b8cc6d4
[ "Apache-2.0" ]
permissive
dangpf/zstack
86293e2a5b479cf70c96a903c90523f29e41fd22
8db5d96d06f961d366c67c16394f4e4572c02115
refs/heads/master
2021-01-18T13:06:11.080079
2016-09-01T09:57:37
2016-09-01T09:58:40
56,648,736
1
0
null
2016-04-20T02:28:56
2016-04-20T02:28:55
null
UTF-8
Java
false
false
1,645
java
package org.zstack.header.host; import org.zstack.header.core.ApiTimeout; import org.zstack.header.message.NeedReplyMessage; import org.zstack.header.volume.APICreateVolumeSnapshotMsg; import org.zstack.header.volume.VolumeInventory; @ApiTimeout(apiClasses = {APICreateVolumeSnapshotMsg.class}) public class TakeSnapshotOnHypervisorMsg extends NeedReplyMessage implements HostMessage { private String hostUuid; private String vmUuid; private String snapshotName; private VolumeInventory volume; private String installPath; private boolean fullSnapshot; public boolean isFullSnapshot() { return fullSnapshot; } public void setFullSnapshot(boolean fullSnapshot) { this.fullSnapshot = fullSnapshot; } public String getSnapshotName() { return snapshotName; } public void setSnapshotName(String snapshotName) { this.snapshotName = snapshotName; } @Override public String getHostUuid() { return hostUuid; } public void setHostUuid(String hostUuid) { this.hostUuid = hostUuid; } public String getVmUuid() { return vmUuid; } public void setVmUuid(String vmUuid) { this.vmUuid = vmUuid; } public VolumeInventory getVolume() { return volume; } public void setVolume(VolumeInventory volume) { this.volume = volume; } public String getInstallPath() { return installPath; } public void setInstallPath(String installPath) { this.installPath = installPath; } }
[ "xing5820@gmail.com" ]
xing5820@gmail.com
b4507f7f9a4d9476be1e2fddd2b9d2279430ac98
ed5159d056e98d6715357d0d14a9b3f20b764f89
/src/irvine/oeis/a289/A289751.java
10d639f2572cfa14b38a2fb227ae74d75b2b15b6
[]
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
418
java
package irvine.oeis.a289; // Generated by gen_seq4.pl pfprime 0 4 10 +137 3 at 2019-07-30 14:36 // DO NOT EDIT here! import irvine.oeis.PowerFactorPrimeSequence; /** * A289751 Numbers k such that <code>(4*10^k + 137)/3</code> is prime. * @author Georg Fischer */ public class A289751 extends PowerFactorPrimeSequence { /** Construct the sequence. */ public A289751() { super(1, 0, 4, 10, +137, 3); } }
[ "sean.irvine@realtimegenomics.com" ]
sean.irvine@realtimegenomics.com
312de9b48c1b9dd7b0e22cd0eed2fb978ea25033
5643e2dc3946ffb490ac8d9f9e5e27c386656f46
/app/src/main/java/android/luna/ViewUi/bottombar/OnTabReselectListener.java
ba37e0dae8a2eb487f28856b1b76d4e3ea01b152
[]
no_license
cremlee/App
c22402df07a3e4ec483eed4ee3575cafd8899b69
454d5d43b27328282d18ffb6a66026dd0f0eeddc
refs/heads/master
2021-06-24T16:43:23.337350
2018-08-10T00:09:53
2018-08-10T00:09:53
143,685,409
0
0
null
null
null
null
UTF-8
Java
false
false
1,125
java
package android.luna.ViewUi.bottombar; import android.support.annotation.IdRes; /* * BottomBar library for Android * Copyright (c) 2016 Iiro Krankka (http://github.com/roughike). * * 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. */ public interface OnTabReselectListener { /** * The method being called when currently visible {@link BottomBarTab} is * reselected. Use this method for scrolling to the top of your content, * as recommended by the Material Design spec * * @param tabId the {@link BottomBarTab} that was reselected. */ void onTabReSelected(@IdRes int tabId); }
[ "hhjtlee@163.com" ]
hhjtlee@163.com
0d462ae8235014b9c936c286913a67e19de43e6c
498dd2daff74247c83a698135e4fe728de93585a
/clients/google-api-services-vision/v1p1beta1/1.30.1/com/google/api/services/vision/v1p1beta1/model/AsyncAnnotateFileResponse.java
77156c741cca2be1a98e5f7190cf0cc42757b1cc
[ "Apache-2.0" ]
permissive
googleapis/google-api-java-client-services
0e2d474988d9b692c2404d444c248ea57b1f453d
eb359dd2ad555431c5bc7deaeafca11af08eee43
refs/heads/main
2023-08-23T00:17:30.601626
2023-08-20T02:16:12
2023-08-20T02:16:12
147,399,159
545
390
Apache-2.0
2023-09-14T02:14:14
2018-09-04T19:11:33
null
UTF-8
Java
false
false
2,297
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. */ /* * This code was generated by https://github.com/googleapis/google-api-java-client-services/ * Modify at your own risk. */ package com.google.api.services.vision.v1p1beta1.model; /** * The response for a single offline file annotation request. * * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is * transmitted over HTTP when working with the Cloud Vision API. For a detailed explanation see: * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a> * </p> * * @author Google, Inc. */ @SuppressWarnings("javadoc") public final class AsyncAnnotateFileResponse extends com.google.api.client.json.GenericJson { /** * The output location and metadata from AsyncAnnotateFileRequest. * The value may be {@code null}. */ @com.google.api.client.util.Key private OutputConfig outputConfig; /** * The output location and metadata from AsyncAnnotateFileRequest. * @return value or {@code null} for none */ public OutputConfig getOutputConfig() { return outputConfig; } /** * The output location and metadata from AsyncAnnotateFileRequest. * @param outputConfig outputConfig or {@code null} for none */ public AsyncAnnotateFileResponse setOutputConfig(OutputConfig outputConfig) { this.outputConfig = outputConfig; return this; } @Override public AsyncAnnotateFileResponse set(String fieldName, Object value) { return (AsyncAnnotateFileResponse) super.set(fieldName, value); } @Override public AsyncAnnotateFileResponse clone() { return (AsyncAnnotateFileResponse) super.clone(); } }
[ "chingor@google.com" ]
chingor@google.com
c5f0bda02cdf36e157d4160c176e3268a0923a98
e67dddc05c8b7c143a35aad37c2ca88ca5aa3637
/笔试/src/wangwei/t2/Test.java
41337d13985c39d0a53b8f0feddc4938a145dbee
[]
no_license
Linliquan/java-learn
886ff104e64b38982d7083a116b399bed847b717
4ff318715d9d89c55d93fa230d52115f09e58559
refs/heads/master
2022-07-04T07:23:15.042731
2021-08-07T09:55:37
2021-08-07T09:55:37
182,282,157
4
0
null
2022-06-21T04:15:10
2019-04-19T15:03:39
Java
UTF-8
Java
false
false
2,535
java
package wangwei.t2; import java.util.*; import java.math.*; public class Test{ static int maxn=(int)(100+10); static int n,m; static BigInteger MOD =new BigInteger("100000"); static String INF=""; static BigInteger[][] map=new BigInteger[maxn][maxn]; static BigInteger base=new BigInteger("2"); static void init() { for(int i=0;i<=n;i++) { for(int j=0;j<=n;j++) { if(i!=j) map[i][j]=new BigInteger(INF); else map[i][j]=new BigInteger("0"); } } } static BigInteger[] dis=new BigInteger[maxn]; static boolean[] vis =new boolean[maxn]; static void dijkstra(int start) { for(int i=0;i<n;i++) { dis[i]=map[start][i]; vis[i]=false; } dis[start]=new BigInteger("0"); vis[start]=true; for(int i=0;i<n-1;i++) { int k=-1; BigInteger minD=new BigInteger(INF); for(int j=0;j<n;j++) { if(!vis[j]&&dis[j].compareTo(minD)<0) { minD=dis[j]; k=j; } } if(k==-1) break; vis[k]=true; for(int j=0;j<n;j++) { if(!vis[j]&&dis[j].compareTo(dis[k].add(map[k][j]))>0) dis[j]=dis[k].add(map[k][j]); } } } public static void main(String[] args) { Scanner cin=new Scanner(System.in); for(int i=0;i<=160;i++) INF+="9"; while(cin.hasNext()) { n=cin.nextInt(); m=cin.nextInt(); init(); for(int k=0;k<m;k++) { int u=cin.nextInt(); int v=cin.nextInt(); if(!map[u][v].toString().equals(INF)) continue; map[u][v]=map[v][u]=new BigInteger( base.pow(k).toString()); } dijkstra(0); for(int i=1;i<n;i++) { BigInteger d=dis[i]; if(d.toString().equals(INF)) System.out.println("-1"); else System.out.println(d.mod(MOD)); } } cin.close(); } } //import java.util.Scanner; // //public class Test { // public static void main(String[] args) { // Scanner sc = new Scanner(System.in); // // int [] a = new int[36]; // for(int i = 0; i < 36; i++){ // a[i] = sc.nextInt(); // } // // } //}
[ "1511387837@qq.com" ]
1511387837@qq.com
da2f70467bf53f9ccfcac5f9f4f1b5f988b4465b
712453a48b3ac198460d7143fec3d1e7abf812c2
/api-gateway/src/main/java/eu/opertusmundi/web/config/OAuthUserInfoDetailResolver.java
b7d826384ea5432e7608e22a7bc6a09a39e2b883
[ "Apache-2.0" ]
permissive
OpertusMundi/api-gateway-interim
1c2cdde9f684042c4e69bdfb23474b791520a30b
6d95a5ac01e30f7bf431c31db2ffc6d790dab081
refs/heads/master
2023-02-17T06:07:16.964937
2021-01-15T12:08:01
2021-01-15T12:08:01
302,048,239
0
0
null
null
null
null
UTF-8
Java
false
false
2,109
java
package eu.opertusmundi.web.config; import java.util.List; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.context.annotation.Configuration; @Configuration @ConfigurationProperties(prefix = "opertus-mundi.auth") public class OAuthUserInfoDetailResolver { private List<String> nameAliases; private List<String> emailAliases; private List<String> localeAliases; private List<String> imageAliases; public static final String NAME_PROPERTY = "name"; public static final String EMAIL_PROPERTY = "email"; public static final String LOCALE_PROPERTY = "locale"; public static final String IMAGE_PROPERTY = "image"; public List<String> getNameAliases() { return this.nameAliases; } public void setNameAliases(List<String> nameAliases) { this.nameAliases = nameAliases; } public List<String> getEmailAliases() { return this.emailAliases; } public void setEmailAliases(List<String> emailAliases) { this.emailAliases = emailAliases; } public List<String> getLocaleAliases() { return this.localeAliases; } public void setLocaleAliases(List<String> localeAliases) { this.localeAliases = localeAliases; } public List<String> getImageAliases() { return this.imageAliases; } public void setImageAliases(List<String> imageAliases) { this.imageAliases = imageAliases; } public String resolve(String key) { if (this.nameAliases.stream().anyMatch(alias -> key.trim().equals(alias))) { return NAME_PROPERTY; } if (this.emailAliases.stream().anyMatch(alias -> key.trim().equals(alias))) { return EMAIL_PROPERTY; } if (this.localeAliases.stream().anyMatch(alias -> key.trim().equals(alias))) { return LOCALE_PROPERTY; } if (this.imageAliases.stream().anyMatch(alias -> key.trim().equals(alias))) { return IMAGE_PROPERTY; } return null; } }
[ "yannis.kouvaras@kupa.gr" ]
yannis.kouvaras@kupa.gr
fd26c90b5eeb9e944b8f7e4e2e7b0169968ae161
b79d189fc142f49adc1c34dd9a72bb82926a5a87
/AcademicoJSF/src/main/java/pe/edu/upeu/ServletInitializer.java
b2194cab3caadee4861d12c343afde39b1af3398
[]
no_license
davidmp/ProyectJavaArquitecturas
c749fba1bf184167f328d60a2638f2123d805212
8c780af50c9930973f870e290674c0cfac110790
refs/heads/master
2020-03-26T21:55:08.801988
2018-11-21T17:12:08
2018-11-21T17:12:08
145,417,711
2
4
null
null
null
null
UTF-8
Java
false
false
3,057
java
package pe.edu.upeu; import java.util.Collections; import javax.faces.application.ProjectStage; import javax.servlet.ServletContext; import javax.servlet.ServletException; import org.primefaces.util.Constants; import org.springframework.beans.factory.config.CustomScopeConfigurer; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.web.servlet.ServletContextInitializer; import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; import org.springframework.context.MessageSource; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.context.support.ResourceBundleMessageSource; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; //import org.springframework.faces.mvc.JsfView; //import org.springframework.web.servlet.view.UrlBasedViewResolver; @Configuration @EnableAutoConfiguration //(exclude = { JpaConfig.class }) @ComponentScan @SpringBootApplication public class ServletInitializer extends SpringBootServletInitializer { @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { return application.sources(AcademicoJsfApplication.class); } @Bean public static CustomScopeConfigurer customScopeConfigurer() { CustomScopeConfigurer configurer = new CustomScopeConfigurer(); configurer.setScopes(Collections.<String, Object>singletonMap(FacesViewScope.NAME, new FacesViewScope())); return configurer; } @Bean public ServletContextInitializer servletContextCustomizer() { return new ServletContextInitializer() { @Override public void onStartup(ServletContext sc) throws ServletException { sc.setInitParameter(Constants.ContextParams.THEME, "start"); sc.setInitParameter(Constants.ContextParams.FONT_AWESOME, "true"); sc.setInitParameter(ProjectStage.PROJECT_STAGE_PARAM_NAME, ProjectStage.Development.name()); } }; } // @Bean // public UrlBasedViewResolver setupViewResolver() { // UrlBasedViewResolver resolver = new UrlBasedViewResolver(); // resolver.setViewClass(JsfView.class); // resolver.setPrefix("/WEB-INF/modulos/"); // resolver.setSuffix(".xhtml"); // // return resolver; // } @Bean public MessageSource messageSourceOther() { ResourceBundleMessageSource messageSource = new ResourceBundleMessageSource(); messageSource.setBasename("messages"); return messageSource; } public void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("/resources/**").addResourceLocations("/resources/"); registry.addResourceHandler("/webjars/**").addResourceLocations("/webjars/"); } }
[ "mamanipari@gmail.com" ]
mamanipari@gmail.com
bb546de612ae8338a066695a15431d66987e68a8
4550f69306fe18febc0dddf54bbfebfd438a6956
/src/main/java/fr/ippon/myinvoice/web/filter/gzip/GZipServletFilter.java
69a1555323635f923178aa69b787f49bc9872cc1
[]
no_license
BulkSecurityGeneratorProject/sample-cassandra-multi-criteria
569519427b5693a4a170fb97b602eefa404c4c9f
57c80bc43d460a2d3a66deb1dd7638eb3803dafb
refs/heads/master
2022-12-21T00:00:17.813296
2015-06-01T16:03:10
2015-06-01T16:03:10
296,565,024
0
0
null
2020-09-18T08:44:11
2020-09-18T08:44:10
null
UTF-8
Java
false
false
4,349
java
package fr.ippon.myinvoice.web.filter.gzip; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.servlet.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.zip.GZIPOutputStream; public class GZipServletFilter implements Filter { private Logger log = LoggerFactory.getLogger(GZipServletFilter.class); @Override public void init(FilterConfig filterConfig) throws ServletException { // Nothing to initialize } @Override public void destroy() { // Nothing to destroy } @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest httpRequest = (HttpServletRequest) request; HttpServletResponse httpResponse = (HttpServletResponse) response; if (!isIncluded(httpRequest) && acceptsGZipEncoding(httpRequest) && !response.isCommitted()) { // Client accepts zipped content if (log.isTraceEnabled()) { log.trace("{} Written with gzip compression", httpRequest.getRequestURL()); } // Create a gzip stream final ByteArrayOutputStream compressed = new ByteArrayOutputStream(); final GZIPOutputStream gzout = new GZIPOutputStream(compressed); // Handle the request final GZipServletResponseWrapper wrapper = new GZipServletResponseWrapper(httpResponse, gzout); wrapper.setDisableFlushBuffer(true); chain.doFilter(request, wrapper); wrapper.flush(); gzout.close(); // double check one more time before writing out // repsonse might have been committed due to error if (response.isCommitted()) { return; } // return on these special cases when content is empty or unchanged switch (wrapper.getStatus()) { case HttpServletResponse.SC_NO_CONTENT: case HttpServletResponse.SC_RESET_CONTENT: case HttpServletResponse.SC_NOT_MODIFIED: return; default: } // Saneness checks byte[] compressedBytes = compressed.toByteArray(); boolean shouldGzippedBodyBeZero = GZipResponseUtil.shouldGzippedBodyBeZero(compressedBytes, httpRequest); boolean shouldBodyBeZero = GZipResponseUtil.shouldBodyBeZero(httpRequest, wrapper.getStatus()); if (shouldGzippedBodyBeZero || shouldBodyBeZero) { // No reason to add GZIP headers or write body if no content was written or status code specifies no // content response.setContentLength(0); return; } // Write the zipped body GZipResponseUtil.addGzipHeader(httpResponse); response.setContentLength(compressedBytes.length); response.getOutputStream().write(compressedBytes); } else { // Client does not accept zipped content - don't bother zipping if (log.isTraceEnabled()) { log.trace("{} Written without gzip compression because the request does not accept gzip", httpRequest.getRequestURL()); } chain.doFilter(request, response); } } /** * Checks if the request uri is an include. These cannot be gzipped. */ private boolean isIncluded(final HttpServletRequest request) { String uri = (String) request.getAttribute("javax.servlet.include.request_uri"); boolean includeRequest = !(uri == null); if (includeRequest && log.isDebugEnabled()) { log.debug("{} resulted in an include request. This is unusable, because" + "the response will be assembled into the overrall response. Not gzipping.", request.getRequestURL()); } return includeRequest; } private boolean acceptsGZipEncoding(HttpServletRequest httpRequest) { String acceptEncoding = httpRequest.getHeader("Accept-Encoding"); return acceptEncoding != null && acceptEncoding.contains("gzip"); } }
[ "julien.dubois@gmail.com" ]
julien.dubois@gmail.com
e2a65a95f9d99743af1e51b4c4f1240fd590a2de
8c81eeaa4bde7c4f9e402c1647940de5deb146fc
/src/CreateTree.java
f23ae39518e128529bc7e3a9c83a1d6e41334f1b
[]
no_license
Luciwar/Example
f4b51b53eef6189ba18ea7714f5ee38be4287864
15b5d4d48e930d75597555b1c9c128b8501812f4
refs/heads/master
2020-06-04T23:41:07.098593
2018-10-11T15:31:24
2018-10-11T15:31:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,450
java
package Utils; import java.util.HashMap; import java.util.Scanner; /** * Created by Trung on 10/19/2017. */ public class CreateTree { /** * Source: GeeksForGeeks.org * Input format: * # of edges * Nodes * * Example: For a tree * 1 * / \ * 2 3 * / \ * 4 5 * * Input will be: * 4 * 1 2 L 1 3 R 2 4 L 3 5 R * * @return A tree */ public static TreeNode readConsole() { TreeNode root; Scanner sc = new Scanner(System.in); HashMap<Integer, TreeNode> m = new HashMap<>(); int n = 0; if (sc.hasNext()) n = sc.nextInt(); root = null; while (n > 0 && sc.hasNext()) { int n1 = sc.nextInt(); int n2 = sc.nextInt(); char lr = sc.next().charAt(0); // cout << n1 << " " << n2 << " " << (char)lr << endl; TreeNode parent = m.get(n1); if (parent == null) { parent = new TreeNode(n1); m.put(n1, parent); if (root == null) root = parent; } TreeNode child = new TreeNode(n2); if (lr == 'L') parent.setLeft(child); else parent.setRight(child); m.put(n2, child); n--; } return root; } }
[ "linhhoang13k@gmail.com" ]
linhhoang13k@gmail.com
034187cdae80c7801084c23b13e1c415fa086dd7
5ea5372d306353fdc6416ac56aeb437f6103fc89
/test/net/ion/rosetta/query/QueryParser.java
dcb00117493dc1c869a514d3e28370c4b6cdbeae
[]
no_license
nextjava/craken
3e71e9a86a2fa8657814a8bf3b2e0f3e8b779ef3
6ff5401fdc32f30f5a045e10a6a8a1aff81c6fe8
refs/heads/master
2021-01-18T07:38:56.203488
2013-08-19T00:53:28
2013-08-19T00:53:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,124
java
package net.ion.rosetta.query; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import net.ion.rosetta.OperatorTable; import net.ion.rosetta.Parser; import net.ion.rosetta.Parsers; import net.ion.rosetta.Scanners; import net.ion.rosetta.Terminals; import net.ion.rosetta.functors.Binary; import net.ion.rosetta.functors.Map; import net.ion.rosetta.pattern.Patterns; public class QueryParser { private enum BinaryOperator implements Binary<Filter> { AND { public Filter map(Filter a, Filter b) { return new And(a, b); } }, OR { public Filter map(Filter a, Filter b) { return new Or(a, b); } } } public static final Parser<String> SINGLE_QUOTE_STRING = Scanners.pattern(Patterns.regex("((\\\\.)|[^\'\\\\])*"), "quoted string").between(Scanners.isChar('\''), Scanners.isChar('\'')).source(); public static final Map<String, String> SINGLE_QUOTE_STRING_MAP = new Map<String, String>() { public String map(String text) { return text.substring(1, text.length() - 1).replace("\\'", "'"); } @Override public String toString() { return "SINGLE_QUOTE_STRING"; } }; private static final Parser<Filter> TOKEN = Terminals.StringLiteral.PARSER.map(new net.ion.rosetta.functors.Map<String, Filter>() { public Token map(String s) { return new Token(s); } }); private static final Terminals OPERATORS = Terminals.operators("+", ",", "(", ")"); private static final Parser<Object> TOKENIZER = Parsers.<Object> or(SINGLE_QUOTE_STRING.map(SINGLE_QUOTE_STRING_MAP), OPERATORS.tokenizer()); private static Parser<?> term(String... names) { return OPERATORS.token(names); } private static <T> Parser<T> op(String name, T value) { return term(name).retn(value); } private static Parser<Filter> query(Parser<Filter> atom) { Parser.Reference<Filter> ref = Parser.newReference(); Parser<Filter> unit = ref.lazy().between(term("("), term(")")).or(atom); Parser<Filter> parser = new OperatorTable<Filter>().infixl(op(",", BinaryOperator.OR), 10).infixl(op("+", BinaryOperator.AND), 20).build(unit); ref.set(parser); return parser; } private static Parser<Void> nodelim = Parsers.always(); private static final Parser<Filter> parser = query(TOKEN).from(TOKENIZER, nodelim); public static Filter parse(String source) { /* * String decoded = ""; char[] chars = source.toCharArray(); for (int i = 0; i < chars.length; i++) { if (chars[i] == '%') { int a = chars[++i]; int b = chars[++i]; if (a >= 'A') a = a-'A'; else a = a-'0'; if (b >= 'A') b = b-'A'; else b = b-'0'; decoded += (char)(16*a+b); } decoded += chars[i]; } */ source = source.replace("+", "%2B"); try { source = URLDecoder.decode(source, "UTF-8"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } System.out.println(source); return parser.parse(source); } public static void main(String args[]) { // System.out.println(SINGLE_QUOTE_STRING.parse("'foo'")); System.out.println(QueryParser.parse("'hi: bye'+'ho!:bo+ o\\\'n'")); } }
[ "bleujin@gmail.com" ]
bleujin@gmail.com
d4505b4f87269a7488cf046d297374daf552f993
6c53b2b97e7d6873709ae1106e929bbe181a9379
/src/java/com/eviware/soapui/support/propertyexpansion/PropertyExpansionDropTarget.java
f72b49205997f68b064803fb0d9f3093738820c5
[]
no_license
stallewar/soapui-
ca7824f4c4bc268b9a7798383f4f2a141d38214b
0464f7826945709032964af67906e7d6e61b698a
refs/heads/master
2023-03-19T05:23:56.746903
2011-07-12T08:29:36
2011-07-12T08:29:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,305
java
/* * soapUI, copyright (C) 2004-2011 eviware.com * * soapUI is free software; you can redistribute it and/or modify it under the * terms of version 2.1 of the GNU Lesser General Public License as published by * the Free Software Foundation. * * soapUI 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 at gnu.org. */ package com.eviware.soapui.support.propertyexpansion; import java.awt.datatransfer.DataFlavor; import java.awt.datatransfer.Transferable; import java.awt.dnd.DropTargetDragEvent; import java.awt.dnd.DropTargetDropEvent; import java.awt.dnd.DropTargetEvent; import java.awt.dnd.DropTargetListener; import javax.swing.text.JTextComponent; import com.eviware.soapui.SoapUI; import com.eviware.soapui.model.propertyexpansion.PropertyExpansionImpl; import com.eviware.soapui.model.propertyexpansion.PropertyExpansionUtils; import com.eviware.soapui.model.tree.nodes.PropertyTreeNode.PropertyModelItem; import com.eviware.soapui.support.UISupport; import com.eviware.soapui.support.xml.JXEditTextArea; import com.eviware.soapui.support.xml.XmlUtils; public final class PropertyExpansionDropTarget implements DropTargetListener { private final PropertyExpansionTarget target; public PropertyExpansionDropTarget( PropertyExpansionTarget target ) { this.target = target; } public void dragEnter( DropTargetDragEvent dtde ) { if( !isAcceptable( dtde.getTransferable() ) ) dtde.rejectDrag(); } public void dragExit( DropTargetEvent dtde ) { if( dtde.getDropTargetContext().getComponent() instanceof JTextComponent ) ( ( JTextComponent )dtde.getDropTargetContext().getComponent() ).getCaret().setVisible( false ); else if( dtde.getDropTargetContext().getComponent() instanceof JXEditTextArea ) ( ( JXEditTextArea )dtde.getDropTargetContext().getComponent() ).setCaretVisible( false ); } public void dragOver( DropTargetDragEvent dtde ) { if( !isAcceptable( dtde.getTransferable() ) ) dtde.rejectDrag(); if( dtde.getDropTargetContext().getComponent() instanceof JTextComponent ) { JTextComponent textField = ( JTextComponent )dtde.getDropTargetContext().getComponent(); int pos = textField.viewToModel( dtde.getLocation() ); if( pos != -1 ) { textField.setCaretPosition( pos ); textField.getCaret().setVisible( true ); } } if( dtde.getDropTargetContext().getComponent() instanceof JXEditTextArea ) { JXEditTextArea textField = ( JXEditTextArea )dtde.getDropTargetContext().getComponent(); int pos = textField.pointToOffset( dtde.getLocation() ); if( pos != -1 ) { textField.setCaretPosition( pos ); textField.setCaretVisible( true ); } } dtde.acceptDrag( dtde.getDropAction() ); } public void drop( DropTargetDropEvent dtde ) { if( !isAcceptable( dtde.getTransferable() ) ) dtde.rejectDrop(); else { try { Transferable transferable = dtde.getTransferable(); Object transferData = transferable.getTransferData( transferable.getTransferDataFlavors()[0] ); if( transferData instanceof PropertyModelItem ) { dtde.acceptDrop( dtde.getDropAction() ); PropertyModelItem modelItem = ( PropertyModelItem )transferData; String xpath = modelItem.getXPath(); if( xpath == null && XmlUtils.seemsToBeXml( modelItem.getProperty().getValue() ) ) { xpath = UISupport.selectXPath( "Create PropertyExpansion", "Select XPath below", modelItem .getProperty().getValue(), null ); if( xpath != null ) xpath = PropertyExpansionUtils.shortenXPathForPropertyExpansion( xpath, modelItem.getProperty() .getValue() ); } target.insertPropertyExpansion( new PropertyExpansionImpl( modelItem.getProperty(), xpath ), dtde.getLocation() ); dtde.dropComplete( true ); } } catch( Exception e ) { SoapUI.logError( e ); } if( dtde.getDropTargetContext().getComponent() instanceof JTextComponent ) ( ( JTextComponent )dtde.getDropTargetContext().getComponent() ).getCaret().setVisible( false ); else if( dtde.getDropTargetContext().getComponent() instanceof JXEditTextArea ) ( ( JXEditTextArea )dtde.getDropTargetContext().getComponent() ).setCaretVisible( false ); } } public void dropActionChanged( DropTargetDragEvent dtde ) { } public boolean isAcceptable( Transferable transferable ) { DataFlavor[] flavors = transferable.getTransferDataFlavors(); for( int i = 0; i < flavors.length; i++ ) { DataFlavor flavor = flavors[i]; if( flavor.isMimeTypeEqual( DataFlavor.javaJVMLocalObjectMimeType ) ) { try { Object modelItem = transferable.getTransferData( flavor ); if( modelItem instanceof PropertyModelItem ) { return PropertyExpansionUtils.canExpandProperty( target.getContextModelItem(), ( ( PropertyModelItem )modelItem ).getProperty() ); } } catch( Exception ex ) { SoapUI.logError( ex ); } } } return false; } }
[ "oysteigi@bluebear.(none)" ]
oysteigi@bluebear.(none)
f7135dbe570d10f037792be41ce922703a1ab09d
c800b6aa137b5b95a52a13501ffc1a563087237a
/src/main/java/cn/com/sky/algorithms/leetcode/easy/LargestPalindromeProduct479.java
34f5e07083f07c1e2a0213de17e88901f3c4e12c
[]
no_license
git-sky/algorithms
a0b85a550c4605e207a75ba9083b9243cbadf319
582faffa813fce70e0e5afbb3d990f07219d3e2d
refs/heads/master
2021-01-19T00:43:08.133723
2018-02-24T05:59:25
2018-02-24T05:59:25
73,152,330
0
0
null
null
null
null
UTF-8
Java
false
false
493
java
package cn.com.sky.algorithms.leetcode.easy; /** * <pre> * * 479. Largest Palindrome Product * * Find the largest palindrome made from the product of two n-digit numbers. * * Since the result could be very large, you should return the largest palindrome mod 1337. * * Example: * * Input: 2 * * Output: 987 * * Explanation: 99 x 91 = 9009, 9009 % 1337 = 987 * * Note: * * The range of n is [1,8]. * * * </pre> */ public class LargestPalindromeProduct479 { }
[ "linkme2008@sina.com" ]
linkme2008@sina.com
685d67648b92680225c7fd4f770d8f6569592d12
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/22/22_758b398893395d5d52d3df897a6772cdc5ccd1d6/Seed/22_758b398893395d5d52d3df897a6772cdc5ccd1d6_Seed_t.java
d8434003d77175aa5e28625a79fbc09bb9786b5d
[]
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,553
java
package EvolvingPlants; import java.awt.Graphics; import tools.RandTools; public class Seed extends PlantPart { private Stem[] stems = null; public boolean germinated = false; double xMod = 0; private double energyPerGrow; public Seed(Plant thisPlant, float x, float y) { super(thisPlant, x, y); energy = thisPlant.genes.seedEnergy; energyPerGrow = thisPlant.genes.energyTransfer * Math.pow(thisPlant.genes.energyTransfer + 0.2, 1.25); xMod = RandTools.getDouble(-thisPlant.genes.seedSpread, thisPlant.genes.seedSpread); } @Override public void tick() { if (!germinated) { if (y < Main.frame.getHeight() - 30) { y += 2; thisPlant.y += 2; double var = (RandTools.getDouble(-xMod, xMod) / 2); x += xMod + var; thisPlant.x += xMod + var; } else if (!thisPlant.genes.germinate) thisPlant.exists = false; else if (stems == null) { germinate(); } } else { for (Stem s : stems) { s.tick(); if (energy > 0) { energy -= energyPerGrow; s.energy += energyPerGrow; } } } } @Override public void render(Graphics g) { if (stems != null) for (Stem s : stems) s.render(g); if (Main.world.viewSeeds) { g.setColor(thisPlant.seedColour); int seedSize = (int) (energy / 15); g.fillOval(Math.round(x - (seedSize / 2)), Math.round(y - (seedSize / 2)), seedSize, seedSize); } } public void germinate() { if (energy > thisPlant.genes.seedEnergy / 2) { energy -= 0.4; if (thisPlant.genes.germinate && Main.world.isSpaceToGerminate(thisPlant)) { germinated = true; if (thisPlant.parentOne != null && thisPlant.parentTwo != null) { thisPlant.parentOne.numGerminatedOffspring++; thisPlant.parentTwo.numGerminatedOffspring++; } int numStems = (int) Math.min(thisPlant.numberOfStemsLeft, thisPlant.genes.numberOfSeedStems); stems = new Stem[numStems]; for (int i = 0; i < numStems; i++) stems[i] = new Stem(thisPlant, x, y); thisPlant.numberOfStemsLeft -= numStems; } } else thisPlant.exists = false; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
42632e2b2332bd14eaefa23daf68d117f136a893
e94283089810516f048bd58590036c88588112cb
/src/S0145BinaryTreePostorderTraversal.java
2f9d9071fe4c21c139712643fc706eaf1a52ab8a
[]
no_license
camelcc/leetcode
e0839e6267ebda5eef57da065d4adaefecb4b557
d982b9e71bc475a599df45d66cf2b78cf017594d
refs/heads/master
2022-07-19T06:24:49.148849
2022-07-10T07:00:34
2022-07-10T07:00:34
135,386,923
5
1
null
null
null
null
UTF-8
Java
false
false
1,850
java
import util.TreeNode; import java.util.ArrayList; import java.util.List; import java.util.Stack; public class S0145BinaryTreePostorderTraversal { public List<Integer> postorderTraversal(TreeNode root) { List<Integer> res = new ArrayList<>(); if (root == null) { return res; } TreeNode dummy = new TreeNode(0); dummy.left = new TreeNode(0); dummy.right = root; Stack<TreeNode> d = new Stack<>(); d.push(dummy); d.push(dummy.left); Stack<Stack<TreeNode>> stacks = new Stack<>(); stacks.push(d); do { Stack<TreeNode> outer = stacks.pop(); res.add(outer.pop().val); if (outer.isEmpty()) { continue; } stacks.push(outer); if (outer.peek().right == null) { continue; } TreeNode n = outer.peek().right; Stack<TreeNode> t = new Stack<>(); t.push(n); while (true) { if (n.left != null) { t.push(n.left); n = n.left; continue; } if (n.right != null) { stacks.push(t); t = new Stack<>(); t.push(n.right); n = n.right; continue; } break; } stacks.push(t); } while (!stacks.isEmpty()); res.remove(0); res.remove(res.size()-1); return res; // if (root.left != null) { // res.addAll(postorderTraversal(root.left)); // } // if (root.right != null) { // res.addAll(postorderTraversal(root.right)); // } // res.add(root.val); } }
[ "camel.young@gmail.com" ]
camel.young@gmail.com
1c07c16109ce2c058b7c9abb2548639637b35ab3
3c048d15b17bb465426c8758b488befc6a8f26fd
/src/main/java/com/github/chen0040/leetcode/day17/medium/EvaluateDivision.java
da5fb89f87d3fcab420d07f5fa168ad45cf2315f
[ "MIT" ]
permissive
aspineonxyz/java-leetcode
d6b54565f5042535727a2b8986f13c56b0d010be
83cc0ab474cb171cb3d6be869209b4a8c96857ea
refs/heads/master
2020-07-16T04:23:01.528912
2017-08-20T03:29:50
2017-08-20T03:29:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,976
java
package com.github.chen0040.leetcode.day17.medium; import java.util.*; /** * Created by xschen on 12/8/2017. * * link: https://leetcode.com/problems/evaluate-division/description/ */ public class EvaluateDivision { static class Edge { boolean inverse = false; double value; String from; String to; public Edge(String from, String to, double value, boolean inverse) { this.from = from; this.to = to; this.value = value; this.inverse = inverse; } public double compute() { if(inverse) return 1.0 / value; return value; } public String toString(){ return from + "->" + to; } } static class Graph { Map<String, List<Edge>> adjList = new HashMap<String, List<Edge>>(); public void addEdge(String from, String to, double value) { Edge e1 = new Edge(from, to, value, false); adj(from).add(e1); Edge e2 = new Edge(to, from, value, true); adj(to).add(e2); } public List<Edge> adj(String v){ List<Edge> adj_v = null; if(adjList.containsKey(v)) { adj_v = adjList.get(v); } else { adj_v = new ArrayList<Edge>(); adjList.put(v, adj_v); } return adj_v; } public double search(String s, String t) { Set<String> marked = new HashSet<String>(); Queue<String> queue = new LinkedList<String>(); Map<String, Edge> edgeTo = new HashMap<String, Edge>(); Map<String, Double> costs = new HashMap<String, Double>(); queue.add(s); costs.put(s, 0.0); while(!queue.isEmpty()) { String v = queue.remove(); marked.add(v); if(v.equals(t)) { break; } List<Edge> adj_v = adj(v); for(Edge e : adj_v){ String w = e.to; if(!costs.containsKey(w) || costs.get(w) > costs.get(v) + 1) { edgeTo.put(w, e); costs.put(w, costs.get(v) + 1); if(!marked.contains(w)) { queue.add(w); } } } } if(marked.contains(t)){ String x = t; Stack<Edge> stack = new Stack<Edge>(); while(!x.equals(s)) { Edge e = edgeTo.get(x); stack.push(e); x = e.from; } List<Edge> path = new ArrayList<Edge>(); while(!stack.isEmpty()) { path.add(stack.pop()); } double result = 1.0; for(int i=0; i < path.size(); ++i) { result = result * path.get(i).compute(); } return result; } else { return -1.0; } } } public class Solution { public double[] calcEquation(String[][] equations, double[] values, String[][] queries) { Set<String> known = new HashSet<String>(); Graph g = new Graph(); for(int i=0; i < equations.length; ++i) { String[] equation = equations[i]; String from = equation[0]; String to = equation[1]; known.add(from); known.add(to); double value = values[i]; g.addEdge(from, to, value); } double[] result = new double[queries.length]; for(int i=0; i < queries.length; ++i) { String[] query = queries[i]; String from = query[0]; String to = query[1]; if(from.equals(to)) { if(!known.contains(from)) { result[i] = -1.0; } else { result[i] = 1.0; } } else { result[i] = g.search(from, to); } } return result; } } }
[ "xs0040@gmail.com" ]
xs0040@gmail.com
fbcd86418ae3486a4801efd3c877ac19171ead72
fa1408365e2e3f372aa61e7d1e5ea5afcd652199
/src/testcases/CWE134_Uncontrolled_Format_String/s01/CWE134_Uncontrolled_Format_String__File_printf_73b.java
2618fadf0cee4b343c2f01758b6d17b2922c9b8a
[]
no_license
bqcuong/Juliet-Test-Case
31e9c89c27bf54a07b7ba547eddd029287b2e191
e770f1c3969be76fdba5d7760e036f9ba060957d
refs/heads/master
2020-07-17T14:51:49.610703
2019-09-03T16:22:58
2019-09-03T16:22:58
206,039,578
1
2
null
null
null
null
UTF-8
Java
false
false
1,847
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE134_Uncontrolled_Format_String__File_printf_73b.java Label Definition File: CWE134_Uncontrolled_Format_String.label.xml Template File: sources-sinks-73b.tmpl.java */ /* * @description * CWE: 134 Uncontrolled Format String * BadSource: File Read data from file (named c:\data.txt) * GoodSource: A hardcoded string * Sinks: printf * GoodSink: dynamic printf format with string defined * BadSink : dynamic printf without validation * Flow Variant: 73 Data flow: data passed in a LinkedList from one method to another in different source files in the same package * * */ package testcases.CWE134_Uncontrolled_Format_String.s01; import testcasesupport.*; import java.util.LinkedList; public class CWE134_Uncontrolled_Format_String__File_printf_73b { public void badSink(LinkedList<String> dataLinkedList ) throws Throwable { String data = dataLinkedList.remove(2); if (data != null) { /* POTENTIAL FLAW: uncontrolled string formatting */ System.out.printf(data); } } /* goodG2B() - use GoodSource and BadSink */ public void goodG2BSink(LinkedList<String> dataLinkedList ) throws Throwable { String data = dataLinkedList.remove(2); if (data != null) { /* POTENTIAL FLAW: uncontrolled string formatting */ System.out.printf(data); } } /* goodB2G() - use BadSource and GoodSink */ public void goodB2GSink(LinkedList<String> dataLinkedList ) throws Throwable { String data = dataLinkedList.remove(2); if (data != null) { /* FIX: explicitly defined string formatting */ System.out.printf("%s%n", data); } } }
[ "bqcuong2212@gmail.com" ]
bqcuong2212@gmail.com
4126fa91c0e0708073c4b10b6a20c2a760f352b0
0b57ce7d4f8dd0cca4a49184db3ac8e09b1a0ef2
/DriverAssistant/app/src/main/java/consumer/entities/AddAccountInformation/Data.java
728928e5665bae470294a1aaf9396c5663462a6b
[]
no_license
Deepankur-Sadana/DriverAssistant
8a9db13676f7c38ff431ac533fcf075fc2947360
96ca05163b75826afbcea5e043b83f05601438c0
refs/heads/master
2021-01-10T18:00:49.571196
2015-11-16T11:29:37
2015-11-16T11:29:37
46,269,111
0
0
null
null
null
null
UTF-8
Java
false
false
3,383
java
package consumer.entities.AddAccountInformation; import java.util.HashMap; import java.util.Map; public class Data { private Integer account_id; private String account_name; private String account_number; private String account_ifsc_code; private String account_type; private String account_branch_name; private String created_at; private String updated_at; private Map<String, Object> additionalProperties = new HashMap<String, Object>(); /** * * @return * The account_id */ public Integer getAccount_id() { return account_id; } /** * * @param account_id * The account_id */ public void setAccount_id(Integer account_id) { this.account_id = account_id; } /** * * @return * The account_name */ public String getAccount_name() { return account_name; } /** * * @param account_name * The account_name */ public void setAccount_name(String account_name) { this.account_name = account_name; } /** * * @return * The account_number */ public String getAccount_number() { return account_number; } /** * * @param account_number * The account_number */ public void setAccount_number(String account_number) { this.account_number = account_number; } /** * * @return * The account_ifsc_code */ public String getAccount_ifsc_code() { return account_ifsc_code; } /** * * @param account_ifsc_code * The account_ifsc_code */ public void setAccount_ifsc_code(String account_ifsc_code) { this.account_ifsc_code = account_ifsc_code; } /** * * @return * The account_type */ public String getAccount_type() { return account_type; } /** * * @param account_type * The account_type */ public void setAccount_type(String account_type) { this.account_type = account_type; } /** * * @return * The account_branch_name */ public String getAccount_branch_name() { return account_branch_name; } /** * * @param account_branch_name * The account_branch_name */ public void setAccount_branch_name(String account_branch_name) { this.account_branch_name = account_branch_name; } /** * * @return * The created_at */ public String getCreated_at() { return created_at; } /** * * @param created_at * The created_at */ public void setCreated_at(String created_at) { this.created_at = created_at; } /** * * @return * The updated_at */ public String getUpdated_at() { return updated_at; } /** * * @param updated_at * The updated_at */ public void setUpdated_at(String updated_at) { this.updated_at = updated_at; } public Map<String, Object> getAdditionalProperties() { return this.additionalProperties; } public void setAdditionalProperty(String name, Object value) { this.additionalProperties.put(name, value); } }
[ "you@example.com" ]
you@example.com
85bc7e964210299add234db4e95a558db3966a99
72cbd420d57f970a6bfbf9cf4dc62f662e6a0ebb
/plugin/core/src/com/perl5/lang/perl/idea/editor/smartkeys/options/PerlSmartKeyOptions.java
a02f6c7dcfc320a8095be7fe56d983665c0cc812
[ "Apache-2.0" ]
permissive
xcodejoy/Perl5-IDEA
e36061de84cc1780ed76711190bb5ce4b05fa3f0
2179a9ab2e9006d4c5501a878f484293220046ac
refs/heads/master
2020-09-19T09:15:35.960543
2019-11-23T08:46:28
2019-11-23T08:46:28
224,215,081
1
0
NOASSERTION
2019-11-26T14:44:56
2019-11-26T14:44:55
null
UTF-8
Java
false
false
1,987
java
/* * Copyright 2015-2019 Alexandr Evstigneev * * 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.perl5.lang.perl.idea.editor.smartkeys.options; import com.intellij.openapi.options.BeanConfigurable; import com.intellij.openapi.options.UnnamedConfigurable; import com.intellij.ui.IdeBorderFactory; import com.perl5.PerlBundle; import com.perl5.lang.perl.idea.codeInsight.Perl5CodeInsightSettings; import javax.swing.*; public class PerlSmartKeyOptions extends BeanConfigurable<Perl5CodeInsightSettings> implements UnnamedConfigurable { public PerlSmartKeyOptions() { super(Perl5CodeInsightSettings.getInstance()); checkBox(PerlBundle.message("perl.options.auto.heredoc"), () -> getInstance().HEREDOC_AUTO_INSERTION, value -> getInstance().HEREDOC_AUTO_INSERTION = value); checkBox(PerlBundle.message("perl.options.auto.colon"), () -> getInstance().AUTO_INSERT_COLON, value -> getInstance().AUTO_INSERT_COLON = value); checkBox(PerlBundle.message("perl.options.smart.comma.sequence"), () -> getInstance().SMART_COMMA_SEQUENCE_TYPING, value -> getInstance().SMART_COMMA_SEQUENCE_TYPING = value); } @Override public JComponent createComponent() { JComponent panel = super.createComponent(); if (panel != null) { panel.setBorder(IdeBorderFactory.PlainSmallWithIndent.createTitledBorder(null, "Perl5", 0, 0, null, null)); } return panel; } }
[ "hurricup@gmail.com" ]
hurricup@gmail.com
6ef4699a52420965897113ea84a1715f0a445f1b
ad894c109141f30022b71baf67c0997baaf48f58
/src/test/java/com/mycompany/myapp/service/mapper/DepartmentMapperTest.java
e2dd1c4cfe3f9845bedd8f64ba393ee91ea271ff
[]
no_license
henrique-barreto/jhipster-sample-application
c646be5001c3c391b7e1bd79dcd257a1df9516af
81b99155a92c894060cf29d103143ff2d98fe8d5
refs/heads/master
2022-12-24T14:56:28.176605
2020-01-30T18:15:39
2020-01-30T18:15:39
237,275,221
0
0
null
2022-12-16T04:43:44
2020-01-30T18:13:53
Java
UTF-8
Java
false
false
578
java
package com.mycompany.myapp.service.mapper; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; public class DepartmentMapperTest { private DepartmentMapper departmentMapper; @BeforeEach public void setUp() { departmentMapper = new DepartmentMapperImpl(); } @Test public void testEntityFromId() { Long id = 2L; assertThat(departmentMapper.fromId(id).getId()).isEqualTo(id); assertThat(departmentMapper.fromId(null)).isNull(); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
eb606df67c908d07911ba20a9e644a5423612f8d
9a6ea6087367965359d644665b8d244982d1b8b6
/src/main/java/X/AnonymousClass3B7.java
a064976f820e2d2d97eac2be2101b2fbe7b6c70f
[]
no_license
technocode/com.wa_2.21.2
a3dd842758ff54f207f1640531374d3da132b1d2
3c4b6f3c7bdef7c1523c06d5bd9a90b83acc80f9
refs/heads/master
2023-02-12T11:20:28.666116
2021-01-14T10:22:21
2021-01-14T10:22:21
329,578,591
2
1
null
null
null
null
UTF-8
Java
false
false
1,032
java
package X; import android.content.Context; import java.io.IOException; import java.util.Properties; /* renamed from: X.3B7 reason: invalid class name */ public class AnonymousClass3B7 { public AnonymousClass3BE A00; public AnonymousClass3BI A01; public final Context A02; public final Properties A03; public final AnonymousClass3B6 A04; public final AnonymousClass3BL A05; public AnonymousClass3B7(Context context, AnonymousClass3BL r5) { String str; this.A05 = r5; this.A02 = context; this.A00 = r5.A03; Properties properties = new Properties(); try { properties.load(this.A02.getAssets().open("version.properties")); this.A03 = properties; this.A04 = new AnonymousClass3B6(this); if (r5.A03 != null && (str = r5.A00) != null) { this.A01 = new AnonymousClass3BI(this.A00, str); } } catch (IOException e) { throw new RuntimeException(e); } } }
[ "madeinborneo@gmail.com" ]
madeinborneo@gmail.com
974befb31a2fbc27bc583f5e3e97543fda7320ed
dca28901fb2e0fbb4b6b04a8dca852d2b2449e91
/jtransc-media-game/src/com/jtransc/game/batch/BatchBuilder.java
05f57974824f02d796289e34438543e3d012f499
[]
no_license
wiltonlazary/jtransc-media
73f2afe60de0736afa66ecc7d13194fd0d747ffe
6f5f8a4cbdcad4208efb897621fdb864493de036
refs/heads/master
2021-01-12T03:48:27.034325
2016-12-04T15:03:27
2016-12-04T15:03:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,754
java
package com.jtransc.game.batch; import com.jtransc.FastMemory; import com.jtransc.FastMemory4Float; import com.jtransc.FastMemory4Int; import com.jtransc.Mem; import com.jtransc.game.math.Point; import com.jtransc.media.JTranscRender; public class BatchBuilder { public FastMemory vertices = FastMemory.alloc(4 * 6 * 16 * 1024); public FastMemory4Float verticesFloat = new FastMemory4Float(vertices); public FastMemory4Int verticesInt = new FastMemory4Int(vertices); public short[] indices = new short[6 * 1024 * 6]; public int[] batches = new int[16 * 256]; public int verticesIndex = 0; public int indicesIndex = 0; public int batchCount = 0; // Data public Batch current = new Batch(); public void start() { Mem.select(vertices); } public void reset() { verticesIndex = 0; indicesIndex = 0; batchCount = 0; current.reset(); } private void flush() { if (current.triangleCount <= 0) return; current.write(batches, batchCount * 16); batchCount++; current.startIndex = indicesIndex; current.triangleCount = 0; } public void quad(int texture, Point p0, Point p1, Point p2, Point p3, float tx0, float ty0, float tx1, float ty1, int color1, int color2) { if (current.texture != texture) { flush(); current.texture = texture; } int vii = verticesIndex; int vi = vii * 6; short[] i = indices; int ii = indicesIndex; //println("${p0.x}, ${p0.y}, ${p1.x}, ${p1.y} :: $x, $y, $w, $h :: $matrix") Mem.sf32(vi + 0, (float) p0.x); Mem.sf32(vi + 1, (float) p0.y); Mem.sf32(vi + 2, tx0); Mem.sf32(vi + 3, ty0); Mem.si32(vi + 4, color1); Mem.si32(vi + 5, color2); Mem.sf32(vi + 6, (float) p1.x); Mem.sf32(vi + 7, (float) p1.y); Mem.sf32(vi + 8, tx1); Mem.sf32(vi + 9, ty0); Mem.si32(vi + 10, color1); Mem.si32(vi + 11, color2); Mem.sf32(vi + 12, (float) p2.x); Mem.sf32(vi + 13, (float) p2.y); Mem.sf32(vi + 14, tx0); Mem.sf32(vi + 15, ty1); Mem.si32(vi + 16, color1); Mem.si32(vi + 17, color2); Mem.sf32(vi + 18, (float) p3.x); Mem.sf32(vi + 19, (float) p3.y); Mem.sf32(vi + 20, tx1); Mem.sf32(vi + 21, ty1); Mem.si32(vi + 22, color1); Mem.si32(vi + 23, color2); i[ii + 0] = (short) (vii + 0); i[ii + 1] = (short) (vii + 1); i[ii + 2] = (short) (vii + 2); i[ii + 3] = (short) (vii + 1); i[ii + 4] = (short) (vii + 3); i[ii + 5] = (short) (vii + 2); verticesIndex += 4; indicesIndex += 6; current.triangleCount += 2; } public void render() { flush(); //println(vertices.slice(0 until 4 * 6)) //println(indices.slice(0 until 6)) //println(batches[0]) //println(batches[1]) //println(batches[2]) //println(batches[3]) JTranscRender.render(vertices, verticesIndex, indices, indicesIndex, batches, batchCount); } }
[ "soywiz@gmail.com" ]
soywiz@gmail.com
d2ddefc94aaf37d884ae346da6d58351ef77ebff
1f207999be869a53c773c4b3dc4cff3d78f60aca
/pay-java-parent/pay-java-demo/src/main/java/com/egzosn/pay/demo/controller/PayTestController.java
4ac98df2da7be6b4b4016ce3cfcd35969b936b86
[ "Apache-2.0" ]
permissive
BrendaHub/quanmin_admin
8b4f1643112910b728adc172324b8fb8a2f672dc
866548dc219a2eaee0a09efbc3b6410eb3c2beb9
refs/heads/master
2021-05-09T04:17:03.818182
2018-01-28T15:00:12
2018-01-28T15:00:12
119,267,872
1
1
null
null
null
null
UTF-8
Java
false
false
353
java
package com.egzosn.pay.demo.controller; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import io.swagger.annotations.Api; @Api(tags="支付模块") @Controller public class PayTestController { @RequestMapping("/pay/testindex.do") public String index() { return "/demo/index"; } }
[ "13552666934@139.com" ]
13552666934@139.com
96d0e12544c21615b261c607ed1544d2291a4cbf
66b2d0cc86ec6717464053113f72b46e67b1dfec
/17_电商虚拟交易(项目)/day95_电商虚拟交易(项目)/代码/sleuth_parent/sleuth_client1/src/main/java/com/sleuth/Application1.java
1d218214452f5bee6763d6d68fcdb63a05b0e159
[]
no_license
wjphappy90/360Java
c33ca9bbb85b310f01ee42c585dd1aa28682e7b4
867dfb7f4788ca4df44e14dd21ffa9322a5dbb43
refs/heads/master
2022-11-28T09:03:28.791935
2020-08-10T02:20:48
2020-08-10T02:20:48
285,675,392
0
1
null
null
null
null
UTF-8
Java
false
false
546
java
package com.sleuth; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; import org.springframework.web.client.RestTemplate; /** * Created by 传智播客*黑马程序员. */ @SpringBootApplication public class Application1 { @Bean RestTemplate restTemplate() { return new RestTemplate(); } public static void main(String[] args) { SpringApplication.run(Application1.class, args); } }
[ "981146457@qq.com" ]
981146457@qq.com
4a1df13566a6c6a63e9ced2d6867a063660bb154
cc6243837f70bd001af3905efc345ec210bd6e76
/javalib/src/main/java/com/bhargavaroyal/javalib/collections/arraylist/ArrayListSortExample.java
fa3bb2d293c51e8a1d950ac6ae8b91b485d6beff
[]
no_license
bhargavaroyal/OutlineAndJav
01ddb3e30e4c7b1db4ea869d587335a0b9fd9efa
526ce6b697078226a8428ee6219d3a49063ed05c
refs/heads/main
2023-08-03T09:11:06.291351
2021-09-18T16:52:56
2021-09-18T16:52:56
387,354,146
0
0
null
null
null
null
UTF-8
Java
false
false
1,072
java
package com.bhargavaroyal.javalib.collections.arraylist; import java.util.ArrayList; import java.util.Comparator; import java.util.List; public class ArrayListSortExample { public static void main(String[] args) { List<String> names = new ArrayList<>(); names.add("Lisa"); names.add("Jennifer"); names.add("Mark"); names.add("David"); System.out.println("Names : " + names); // Sort an ArrayList using its sort() method. You must pass a Comparator to the ArrayList.sort() method. names.sort(new Comparator<String>() { @Override public int compare(String name1, String name2) { return name1.compareTo(name2); } }); // The above `sort()` method call can also be written simply using lambda expression /* names.sort((name1, name2) -> name1.compareTo(name2)); // Following is an even more concise solution names.sort(Comparator.naturalOrder());*/ System.out.println("Sorted Names : " + names); } }
[ "bhargavaroyal@gmail.com" ]
bhargavaroyal@gmail.com
42f5748b62be3f5a44546d16cc4a562c883ce89f
7b73756ba240202ea92f8f0c5c51c8343c0efa5f
/classes2/vyw.java
8e98f6b4f49a98f2f224e47b211732394f1bf0fa
[]
no_license
meeidol-luo/qooq
588a4ca6d8ad579b28dec66ec8084399fb0991ef
e723920ac555e99d5325b1d4024552383713c28d
refs/heads/master
2020-03-27T03:16:06.616300
2016-10-08T07:33:58
2016-10-08T07:33:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
653
java
import android.os.Bundle; import com.tencent.mobileqq.hotpatch.NotVerifyClass; import com.tencent.mobileqq.nearby.business.NearbyCardHandler; public final class vyw implements Runnable { public vyw(NearbyCardHandler paramNearbyCardHandler, Bundle paramBundle) { boolean bool = NotVerifyClass.DO_VERIFY_CLASS; } public void run() { this.jdField_a_of_type_ComTencentMobileqqNearbyBusinessNearbyCardHandler.a(this.jdField_a_of_type_AndroidOsBundle, null, null, false, false, false); } } /* Location: E:\apk\QQ_91\classes2-dex2jar.jar!\vyw.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "1776098770@qq.com" ]
1776098770@qq.com
602df737e9ecaea4b9c862513c27150fdff10dec
0e4756fbda5832b02258425dd0e94382fdcb40d1
/netty/chat_netty3/server/src/main/java/com/cn/server/Server.java
9df52b38f17f9848bd8feccf5589abb402393203
[]
no_license
bobobokey/learndemo
d1da80636864825a8d1a6e6fe1168b599de119d9
24d6200e39d49362ce37023367627f536ecfa814
refs/heads/master
2022-04-28T14:44:17.970284
2022-04-28T04:33:01
2022-04-28T04:33:01
486,090,706
0
0
null
2022-04-28T04:33:02
2022-04-27T07:30:09
null
UTF-8
Java
false
false
1,583
java
package com.cn.server; import java.net.InetSocketAddress; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import org.jboss.netty.bootstrap.ServerBootstrap; import org.jboss.netty.channel.ChannelPipeline; import org.jboss.netty.channel.ChannelPipelineFactory; import org.jboss.netty.channel.Channels; import org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory; import org.springframework.stereotype.Component; import com.cn.common.core.codc.RequestDecoder; import com.cn.common.core.codc.ResponseEncoder; /** * netty服务端入门 * * */ @Component public class Server { /** * 启动 */ public void start() { //服务类 ServerBootstrap bootstrap = new ServerBootstrap(); //boss线程监听端口,worker线程负责数据读写 ExecutorService boss = Executors.newCachedThreadPool(); ExecutorService worker = Executors.newCachedThreadPool(); //设置niosocket工厂 bootstrap.setFactory(new NioServerSocketChannelFactory(boss, worker)); //设置管道的工厂 bootstrap.setPipelineFactory(new ChannelPipelineFactory() { @Override public ChannelPipeline getPipeline() throws Exception { ChannelPipeline pipeline = Channels.pipeline(); pipeline.addLast("decoder", new RequestDecoder()); pipeline.addLast("encoder", new ResponseEncoder()); pipeline.addLast("helloHandler", new ServerHandler()); return pipeline; } }); bootstrap.setOption("backlog", 1024); bootstrap.bind(new InetSocketAddress(10102)); System.out.println("start!!!"); } }
[ "32060663+csy512889371@users.noreply.github.com" ]
32060663+csy512889371@users.noreply.github.com
2eea8251ddc20ed9c4ba3e13c85a36c38a9eb0f2
6cac09e70051fb70a44fdf3b5e10493b718a1484
/src/main/java/cn/mmf/lastsmith/blades/BladeRoukanken.java
c445f3208086ebd49e2f839dc90b9ec202a7de5a
[ "MIT" ]
permissive
Nanamiya738/The-Last-Smith
bf5e9c526139c62a093920c5df93c54365dccfe2
23702d9e16eb203651223257cdf27e65c5ad11cb
refs/heads/master
2022-09-03T23:51:25.095138
2020-03-18T17:55:35
2020-03-18T17:55:35
267,525,039
0
0
MIT
2020-05-29T04:41:25
2020-05-28T07:39:28
null
UTF-8
Java
false
false
7,798
java
package cn.mmf.lastsmith.blades; import cn.mcmod_mmf.mmlib.util.RecipesUtil; import cn.mmf.lastsmith.TLSMain; import cn.mmf.lastsmith.event.RegisterSlashBladeEvent; import cn.mmf.lastsmith.event.RegisterSlashBladeRecipeEvent; import cn.mmf.lastsmith.item.ItemSlashBladeNamedTLS; import cn.mmf.lastsmith.recipe.RecipeAwakeBladeTLS; import cn.mmf.lastsmith.se.SELoader; import cn.mmf.lastsmith.util.BladeUtil; import mods.flammpfeil.slashblade.ItemSlashBladeNamed; import mods.flammpfeil.slashblade.SlashBlade; import mods.flammpfeil.slashblade.item.ItemSlashBlade; import mods.flammpfeil.slashblade.specialeffect.SpecialEffects; import net.minecraft.init.Enchantments; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.common.Mod.EventBusSubscriber; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; @EventBusSubscriber public class BladeRoukanken { @SubscribeEvent public static void BladeRegister(RegisterSlashBladeEvent event) { ItemStack customblade = new ItemStack(BladeLoader.bladeNamed, 1, 0); NBTTagCompound tag1 = new NBTTagCompound(); customblade.setTagCompound(tag1); BladeUtil.IsFakeBlade.set(tag1, true); ItemSlashBladeNamed.CurrentItemName.set(tag1, "flammpfeil.slashblade.named.kanrou_fake"); ItemSlashBladeNamed.CustomMaxDamage.set(tag1, 70); ItemSlashBlade.setBaseAttackModifier(tag1, 7.0F); ItemSlashBlade.TextureName.set(tag1, "named/roukan/texture_fake_0"); ItemSlashBlade.ModelName.set(tag1, "named/agito"); BladeLoader.registerCustomItemStack("flammpfeil.slashblade.named.kanrou_fake", customblade); ItemSlashBladeNamedTLS.NamedBlades.add("flammpfeil.slashblade.named.kanrou_fake"); ItemStack customblade2 = new ItemStack(BladeLoader.bladeNamed, 1, 0); NBTTagCompound tag2 = new NBTTagCompound(); customblade2.setTagCompound(tag2); ItemSlashBladeNamed.CurrentItemName.set(tag2, "flammpfeil.slashblade.named.kanrou"); ItemSlashBladeNamed.CustomMaxDamage.set(tag2, 70); ItemSlashBlade.setBaseAttackModifier(tag2, 9.0F); ItemSlashBlade.TextureName.set(tag2, "named/roukan/texture_fake"); ItemSlashBlade.ModelName.set(tag2, "named/agito"); BladeLoader.registerCustomItemStack("flammpfeil.slashblade.named.kanrou", customblade2); ItemSlashBladeNamedTLS.NamedBlades.add("flammpfeil.slashblade.named.kanrou"); ItemStack customblade3 = new ItemStack(BladeLoader.bladeNamed, 1, 0); NBTTagCompound tag3 = new NBTTagCompound(); customblade3.setTagCompound(tag3); ItemSlashBladeNamed.IsDefaultBewitched.set(tag3, true); BladeUtil.IsBewitchedActived.set(tag3, true); ItemSlashBladeNamed.CurrentItemName.set(tag3, "flammpfeil.slashblade.named.roukan"); ItemSlashBladeNamed.CustomMaxDamage.set(tag3, 40); ItemSlashBlade.setBaseAttackModifier(tag3, 15.0F); ItemSlashBlade.SpecialAttackType.set(tag3, 8); customblade3.addEnchantment(Enchantments.UNBREAKING, 2); customblade3.addEnchantment(Enchantments.KNOCKBACK, 1); customblade3.addEnchantment(Enchantments.SHARPNESS, 4); SpecialEffects.addEffect(customblade3, SELoader.EXTREME_SHARPNESS); ItemSlashBlade.TextureName.set(tag3, "named/roukan/texture"); ItemSlashBlade.ModelName.set(tag3, "named/roukan/model"); BladeLoader.registerCustomItemStack("flammpfeil.slashblade.named.roukan", customblade3); ItemSlashBladeNamedTLS.NamedBlades.add("flammpfeil.slashblade.named.roukan"); ItemStack customblade4 = new ItemStack(BladeLoader.bladeNamed, 1, 0); NBTTagCompound tag4 = new NBTTagCompound(); customblade4.setTagCompound(tag4); ItemSlashBladeNamed.IsDefaultBewitched.set(tag4, true); BladeUtil.IsBewitchedActived.set(tag4, true); ItemSlashBladeNamed.CurrentItemName.set(tag4, "flammpfeil.slashblade.named.roukan_nether"); ItemSlashBladeNamed.CustomMaxDamage.set(tag4, 40); ItemSlashBlade.AttackAmplifier.set(tag4, 4F); ItemSlashBlade.setBaseAttackModifier(tag4, 16.0F); ItemSlashBlade.SpecialAttackType.set(tag4, 9); customblade4.addEnchantment(Enchantments.UNBREAKING, 3); customblade4.addEnchantment(Enchantments.KNOCKBACK, 2); customblade4.addEnchantment(Enchantments.SHARPNESS, 5); customblade4.addEnchantment(Enchantments.FIRE_ASPECT, 2); SpecialEffects.addEffect(customblade4, SELoader.EXTREME_SHARPNESS); ItemSlashBlade.TextureName.set(tag4, "named/roukan/texture_tx"); ItemSlashBlade.ModelName.set(tag4, "named/roukan/model"); BladeLoader.registerCustomItemStack("flammpfeil.slashblade.named.roukan_nether", customblade4); ItemSlashBladeNamedTLS.NamedBlades.add("flammpfeil.slashblade.named.roukan_nether"); } @SubscribeEvent public static void onRecipeRegister(RegisterSlashBladeRecipeEvent event) { ItemStack request_1 = new ItemStack(BladeLoader.blade); NBTTagCompound tag1 = new NBTTagCompound(); ItemSlashBlade.KillCount.set(tag1, 50); request_1.setTagCompound(tag1); RecipesUtil.addRecipe(TLSMain.MODID,"flammpfeil.slashblade.named.kanrou_fake", new RecipeAwakeBladeTLS( new ResourceLocation(TLSMain.MODID, "flammpfeil.slashblade.named.kanrou_fake"), "sakura_blade", BladeLoader.getCustomBlade("flammpfeil.slashblade.named.kanrou_fake"), request_1, new Object[] { "PDP", "DSD", "PBP", 'D', "leafSakura", 'P', "ingotGold", 'S', SlashBlade.getCustomBlade(SlashBlade.ProudSoulStr), 'B', request_1 })); ItemStack request_2 = BladeLoader.getCustomBlade("flammpfeil.slashblade.named.kanrou_fake"); NBTTagCompound tag2 = ItemSlashBlade.getItemTagCompound(request_2); ItemSlashBlade.KillCount.set(tag2, 200); ItemSlashBlade.ProudSoul.set(tag2, 1000); request_2.setTagCompound(tag2); RecipesUtil.addRecipe(TLSMain.MODID,"flammpfeil.slashblade.named.kanrou", new RecipeAwakeBladeTLS( new ResourceLocation(TLSMain.MODID, "flammpfeil.slashblade.named.kanrou"), "sakura_blade", BladeLoader.getCustomBlade("flammpfeil.slashblade.named.kanrou"), request_2, new Object[] { "PSD", "SDS", "BSP", 'D', SlashBlade.getCustomBlade(SlashBlade.IngotBladeSoulStr), 'P', "gemDiamond", 'S', "fullSakura", 'B', request_2 })); ItemStack request_3 = BladeLoader.getCustomBlade("flammpfeil.slashblade.named.kanrou"); NBTTagCompound tag3 = ItemSlashBlade.getItemTagCompound(request_3); ItemSlashBlade.KillCount.set(tag3, 1000); ItemSlashBlade.ProudSoul.set(tag3, 5000); ItemSlashBlade.RepairCount.set(tag3, 1); request_3.addEnchantment(Enchantments.SHARPNESS, 1); request_3.setTagCompound(tag3); RecipesUtil.addRecipe(TLSMain.MODID,"flammpfeil.slashblade.named.roukan", new RecipeAwakeBladeTLS( new ResourceLocation(TLSMain.MODID, "flammpfeil.slashblade.named.roukan"), "sakura_blade", BladeLoader.getCustomBlade("flammpfeil.slashblade.named.roukan"), request_3, new Object[] { "SPD", "PBP", "DPS", 'D', "blockSakura", 'P', "blockDiamond", 'S', SlashBlade.getCustomBlade(SlashBlade.SphereBladeSoulStr), 'B', request_3 })); ItemStack request_4 = BladeLoader.getCustomBlade("flammpfeil.slashblade.named.roukan"); NBTTagCompound tag4 = ItemSlashBlade.getItemTagCompound(request_4); ItemSlashBlade.KillCount.set(tag4, 2500); ItemSlashBlade.ProudSoul.set(tag4, 25000); ItemSlashBlade.RepairCount.set(tag4, 5); request_4.addEnchantment(Enchantments.FIRE_ASPECT, 1); request_4.setTagCompound(tag4); RecipesUtil.addRecipe(TLSMain.MODID,"flammpfeil.slashblade.named.roukan_nether", new RecipeAwakeBladeTLS( new ResourceLocation(TLSMain.MODID, "flammpfeil.slashblade.named.roukan_nether"), "sharpness", BladeLoader.getCustomBlade("flammpfeil.slashblade.named.roukan_nether"), request_4, new Object[] { "DSD", "PBP", "DSD", 'D', "sphereSakura", 'P', "blockDiamond", 'S', "netherStar", 'B', request_4 })); } }
[ "617510630@qq.com" ]
617510630@qq.com
71321b35d100cfc2c6e4b4ae9415443a1e59eea9
7120f0438c1a4a20d67e88c822a601ad61ef5c4d
/zyr-web/src/main/java/com/zgm/zen/jkglyz/PettyGirl.java
7ea98734cb8654f9faa6004498c533f87c646fd6
[]
no_license
zgmzyr/zyr
f94dea3d7f7f962b6df5e18185d3e61d77dc009a
fea3c44fe6fbe0c110805487096f203fcb8b823b
refs/heads/master
2021-01-17T15:09:02.961884
2016-06-26T08:38:14
2016-06-26T08:38:14
9,864,102
0
0
null
null
null
null
UTF-8
Java
false
false
523
java
package com.zgm.zen.jkglyz; public class PettyGirl implements IGoodBodyGirl, IGreatTemperamentGirl { private String name; public PettyGirl(String name){ this.name = name; } @Override public void goodLooking() { System.out.println(this.name + "---脸蛋很漂亮!"); } @Override public void niceFigure() { System.out.println(this.name + "---身材很棒!"); } @Override public void greatTemperament() { System.out.println(this.name + "---气质非常好!"); } }
[ "Administrator@zgm" ]
Administrator@zgm
e3eb36e3fba7371b8bd612ce96f765e463ec8feb
4e8d52f594b89fa356e8278265b5c17f22db1210
/WebServiceArtifacts/WeatherV1SoapService/com/flightstats/weather/service/v1/VisibilityV1.java
acb7b90ade787ef9d880ca4c3d912e1127d343c5
[]
no_license
ouniali/WSantipatterns
dc2e5b653d943199872ea0e34bcc3be6ed74c82e
d406c67efd0baa95990d5ee6a6a9d48ef93c7d32
refs/heads/master
2021-01-10T05:22:19.631231
2015-05-26T06:27:52
2015-05-26T06:27:52
36,153,404
1
2
null
null
null
null
UTF-8
Java
false
false
2,548
java
package com.flightstats.weather.service.v1; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for visibilityV1 complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="visibilityV1"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="miles" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="lessThan" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/> * &lt;element name="cavok" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "visibilityV1", propOrder = { "miles", "lessThan", "cavok" }) public class VisibilityV1 { protected String miles; protected Boolean lessThan; protected Boolean cavok; /** * Gets the value of the miles property. * * @return * possible object is * {@link String } * */ public String getMiles() { return miles; } /** * Sets the value of the miles property. * * @param value * allowed object is * {@link String } * */ public void setMiles(String value) { this.miles = value; } /** * Gets the value of the lessThan property. * * @return * possible object is * {@link Boolean } * */ public Boolean isLessThan() { return lessThan; } /** * Sets the value of the lessThan property. * * @param value * allowed object is * {@link Boolean } * */ public void setLessThan(Boolean value) { this.lessThan = value; } /** * Gets the value of the cavok property. * * @return * possible object is * {@link Boolean } * */ public Boolean isCavok() { return cavok; } /** * Sets the value of the cavok property. * * @param value * allowed object is * {@link Boolean } * */ public void setCavok(Boolean value) { this.cavok = value; } }
[ "ouni_ali@yahoo.fr" ]
ouni_ali@yahoo.fr
bbb6b305263ed7b612878dc3941f549faec0d579
d6ab38714f7a5f0dc6d7446ec20626f8f539406a
/backend/collecting/collectedFiles/Java/edited/iluwatarjava-design-patternsblobfaa29f8025f6fb90472dacb6e8ad8569605f8d61facadesrcmainjavacomiluwatarfacadeDwarvenGoldmineFacade.java
5b1377d9baea9b0063996641028835486d13dbb0
[]
no_license
haditabatabaei/webproject
8db7178affaca835b5d66daa7d47c28443b53c3d
86b3f253e894f4368a517711bbfbe257be0259fd
refs/heads/master
2020-04-10T09:26:25.819406
2018-12-08T12:21:52
2018-12-08T12:21:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
965
java
package com.iluwatar.facade; import java.util.ArrayList; import java.util.Collection; import java.util.List; public class DwarvenGoldmineFacade { private final List<DwarvenMineWorker> workers; public DwarvenGoldmineFacade() { workers = new ArrayList<>(); workers.add(new DwarvenGoldDigger()); workers.add(new DwarvenCartOperator()); workers.add(new DwarvenTunnelDigger()); } public void startNewDay() { makeActions(workers, DwarvenMineWorker.Action.WAKE_UP, DwarvenMineWorker.Action.GO_TO_MINE); } public void digOutGold() { makeActions(workers, DwarvenMineWorker.Action.WORK); } public void endDay() { makeActions(workers, DwarvenMineWorker.Action.GO_HOME, DwarvenMineWorker.Action.GO_TO_SLEEP); } private static void makeActions(Collection<DwarvenMineWorker> workers, DwarvenMineWorker.Action... actions) { for (DwarvenMineWorker worker : workers) { worker.action(actions); } } }
[ "mahdisadeghzadeh24@gamil.com" ]
mahdisadeghzadeh24@gamil.com
2a1ceb1757fb896b1d18c80ebb577b2bdf2930d2
d312ffae3a5c7dae52753b77da90f44a12e4fd9e
/src/main/java/com/gilmarcarlos/developer/gcursos/service/eventos/online/CertificadoOnlineService.java
edf0935a51c2d46439e44d058ad92400331bd5d5
[]
no_license
gilmardeveloper/java-cursos
46b42502914d1c953f904a0508238192a5b72963
ed2a9543365bf995896487bcaf957b5a746204df
refs/heads/master
2020-04-03T11:45:40.593463
2018-10-29T15:21:45
2018-10-29T15:21:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,983
java
package com.gilmarcarlos.developer.gcursos.service.eventos.online; import java.awt.Graphics2D; import java.awt.Image; import java.awt.image.BufferedImage; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.gilmarcarlos.developer.gcursos.model.eventos.online.CertificadoOnline; import com.gilmarcarlos.developer.gcursos.repository.eventos.online.CertificadoOnlineRepository; /** * Classe com serviços de persistência para entidade (CertificadoOnline) * * @author Gilmar Carlos * */ @Service public class CertificadoOnlineService { @Autowired private CertificadoOnlineRepository repository; public CertificadoOnline salvar(CertificadoOnline certificado) { return repository.save(certificado); } /** * Método que atualiza o conteudo do certificado * * @param certificado representa um certificado * @return CertificadoOnline * */ public CertificadoOnline atualizarConteudo(CertificadoOnline certificado) { CertificadoOnline temp = buscarPor(certificado.getEventoOnline().getId()); temp.setConteudo(certificado.getConteudo()); return salvar(temp); } /** * Método que atualiza a imagem de fundo do certificado * * @param certificado representa um certificado * @return CertificadoOnline * */ public CertificadoOnline atualizarImagemFundo(CertificadoOnline certificado) { CertificadoOnline temp = buscarPor(certificado.getEventoOnline().getId()); temp.setImagemFundo(certificado.getImagemFundo()); return salvar(temp); } public void deletar(Long id) { repository.deleteById(id); } public CertificadoOnline buscarPor(Long id) { return repository.buscarPor(id); } /** * Método que verifica as dimenssões de uma imagem * * @param imagem representa um buffer * @param altura representa a altura de uma imagem * @param largura representa a largura de uma imagem * @return BufferedImage * */ public BufferedImage verifica(BufferedImage imagem, Integer altura, Integer largura) { if(imagem.getHeight() > altura || imagem.getWidth() > largura) { imagem = redimensionar(imagem, largura, altura); } if(imagem.getHeight() < altura || imagem.getWidth() < largura) { imagem = redimensionar(imagem, largura, altura); } return imagem; } /** * Método que redimensiona as dimenssões de uma imagem * * @param imagem representa um buffer * @param altura representa a altura de uma imagem * @param largura representa a largura de uma imagem * @return BufferedImage * */ private BufferedImage redimensionar(BufferedImage imagem, Integer largura, Integer altura) { Image tmp = imagem.getScaledInstance(largura, altura, Image.SCALE_DEFAULT); // .SCALE_SMOOTH); imagem = new BufferedImage(largura, altura, BufferedImage.SCALE_DEFAULT); // .TYPE_INT_ARGB); Graphics2D g2d = imagem.createGraphics(); g2d.drawImage(tmp, 0, 0, null); g2d.dispose(); return imagem; } }
[ "gilmarcarlos.developer@gmail.com" ]
gilmarcarlos.developer@gmail.com
b79748afbf2bf11dfc9a86e965e7e1912b6df974
0ac05e3da06d78292fdfb64141ead86ff6ca038f
/OSWE/oswe/openCRX/rtjar/rt.jar.src/org/w3c/dom/html/HTMLMapElement.java
580af11c94296dd80d7e888b3ad6efacc895b1f3
[]
no_license
qoo7972365/timmy
31581cdcbb8858ac19a8bb7b773441a68b6c390a
2fc8baba4f53d38dfe9c2b3afd89dcf87cbef578
refs/heads/master
2023-07-26T12:26:35.266587
2023-07-17T12:35:19
2023-07-17T12:35:19
353,889,195
7
1
null
null
null
null
UTF-8
Java
false
false
355
java
package org.w3c.dom.html; public interface HTMLMapElement extends HTMLElement { HTMLCollection getAreas(); String getName(); void setName(String paramString); } /* Location: /Users/timmy/timmy/OSWE/oswe/openCRX/rt.jar!/org/w3c/dom/html/HTMLMapElement.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */
[ "t0984456716" ]
t0984456716
4df9b64e91752483a5d679fb9b852f926a92e7f2
4aba828da7ecabfc4363dda79807436a2470f316
/src/test/java/com/ning/atlas/spi/TestUri.java
93411c419ce0f67a926ea0bdd224421d06b2682b
[ "MIT", "BSD-3-Clause", "Apache-2.0" ]
permissive
darthjoel/atlas
2290db32accf9cba7a78f1a57b84df3839216de9
94e6764da3f791b179fda8bcbdc9d1b89de3bcd2
refs/heads/master
2020-12-25T09:57:52.249902
2012-04-19T00:15:02
2012-04-19T00:15:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,195
java
package com.ning.atlas.spi; import com.google.common.collect.ImmutableMap; import com.ning.atlas.Base; import org.junit.Test; import org.stringtemplate.v4.ST; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.Map; import static java.util.Arrays.asList; import static org.hamcrest.CoreMatchers.equalTo; import static org.junit.Assert.assertThat; import static org.junit.matchers.JUnitMatchers.hasItem; public class TestUri { @Test public void testScheme() throws Exception { Uri uri = Uri.valueOf("provisioner:galaxy:v2"); assertThat(uri.getScheme(), equalTo("provisioner")); } @Test public void testJustScheme() throws Exception { Uri uri = Uri.valueOf("waffle"); assertThat(uri.getScheme(), equalTo("waffle")); assertThat(uri.getFragment(), equalTo("")); } @Test public void testFragment() throws Exception { Uri uri = Uri.valueOf("provisioner:galaxy:v2"); assertThat(uri.getFragment(), equalTo("galaxy:v2")); } @Test public void testFragmentExcludesParams() throws Exception { Uri uri = Uri.valueOf("hello:world?a=1&b=2"); assertThat(uri.getFragment(), equalTo("world")); } @Test public void testParams1() throws Exception { Uri uri = Uri.valueOf("hello:world?a=1&b=2"); Map<String, Collection<String>> params = uri.getFullParams(); assertThat(params.get("a"), hasItem("1")); assertThat(params.get("b"), hasItem("2")); } @Test public void testParams2() throws Exception { Uri uri = Uri.valueOf("hello?a=1&b=2"); Map<String, Collection<String>> params = uri.getFullParams(); assertThat(params.get("a"), hasItem("1")); assertThat(params.get("b"), hasItem("2")); } @Test public void testParams3() throws Exception { Uri uri = Uri.valueOf("hello:?a=1&b=2"); Map<String, Collection<String>> params = uri.getFullParams(); assertThat(params.get("a"), hasItem("1")); assertThat(params.get("b"), hasItem("2")); } @Test public void testAdditionalParams() throws Exception { Uri uri = Uri.valueOf("hello:?a=1", ImmutableMap.<String, Collection<String>>of("b", Arrays.asList("2"))); Map<String, Collection<String>> params = uri.getFullParams(); assertThat(params.get("a"), hasItem("1")); assertThat(params.get("b"), hasItem("2")); } @Test public void testAdditionalParams2() throws Exception { Uri uri = Uri.valueOf("hello", ImmutableMap.<String, Collection<String>>of("a", Arrays.asList("1"), "b", Arrays.asList("2"))); Map<String, Collection<String>> params = uri.getFullParams(); assertThat(params.get("a"), hasItem("1")); assertThat(params.get("b"), hasItem("2")); } @Test public void testCanonicalization() throws Exception { Uri uri = new Uri("hello", "world", ImmutableMap.<String, Collection<String>>of("a", Arrays.asList("hello", "world"), "b", Arrays.asList("hello world"))); assertThat(uri.toString(), equalTo("hello:world?a=hello&a=world&b=hello world")); } @Test public void testSchemeWithNoStuff() throws Exception { Uri uri = new Uri("rds", "", ImmutableMap.<String, Collection<String>>of("hello", Arrays.asList("world"))); assertThat(uri.getScheme(), equalTo("rds")); } @Test public void testSchemeWithNoStuff2() throws Exception { Uri uri = Uri.valueOf("rds", ImmutableMap.<String, Collection<String>>of("hello", Arrays.asList("world"))); assertThat(uri.getScheme(), equalTo("rds")); } @Test public void testSchemeWithNoStuff3() throws Exception { Uri uri = Uri.valueOf("rds", ImmutableMap.<String, Collection<String>>of("hello", Arrays.asList("world"))); Uri dup = Uri.valueOf(uri.toString()); assertThat(dup.getScheme(), equalTo("rds")); } @Test public void testTemplateInUri() throws Exception { Uri uri = Uri.valueOf("hello:{name}"); assertThat(uri.isTemplate(), equalTo(true)); } @Test public void testTemplateInUri2() throws Exception { Uri uri = Uri.valueOf("hello:name?{key}=value"); assertThat(uri.isTemplate(), equalTo(true)); } @Test public void testTemplateInUri3() throws Exception { Uri uri = Uri.valueOf("hello:name?key={value}"); assertThat(uri.isTemplate(), equalTo(true)); } @Test public void testTemplateInUri4() throws Exception { Uri uri = Uri.valueOf("{hello}:name?key=value"); assertThat(uri.isTemplate(), equalTo(true)); } @Test public void testTemplateUri5() throws Exception { Uri uri = Uri.valueOf("hello:{name}?key={value}", Collections.<String, Collection<String>>emptyMap()); assertThat(uri.toStringUnEscaped(), equalTo("hello:{name}?key={value}")); assertThat(uri.isTemplate(), equalTo(true)); } @Test public void testUgh() throws Exception { Uri uri = Uri.valueOf("{base.fragment}?port={my.port}", Collections.<String, Collection<String>>emptyMap()); } @Test public void testNotTemplateInUri() throws Exception { Uri uri = Uri.valueOf("!hello:{name}"); assertThat(uri.isTemplate(), equalTo(false)); assertThat(uri.getScheme(), equalTo("hello")); } @Test public void testNotTemplateInUri2() throws Exception { Uri uri = Uri.valueOf("!hello:name?{key}=value"); assertThat(uri.isTemplate(), equalTo(false)); } @Test public void testNotTemplateInUri3() throws Exception { Uri uri = Uri.valueOf("!hello:name?key={value}"); assertThat(uri.isTemplate(), equalTo(false)); } @Test public void testNotTemplateInUri4() throws Exception { Uri uri = Uri.valueOf("!{hello}:name?key=value"); assertThat(uri.isTemplate(), equalTo(false)); assertThat(uri.getScheme(), equalTo("{hello}")); } @Test public void testActuallyApplyTemplate() throws Exception { Uri<Base> base_uri = Uri.valueOf("mysql:blog"); Uri<Provisioner> uri = Uri.valueOf("rds?name={base.fragment}&engine=MySQL"); assertThat(uri.toStringUnEscaped(), equalTo("rds?engine=MySQL&name={base.fragment}")); ST st = new ST(uri.toStringUnEscaped(), '{', '}'); st.add("base", base_uri); assertThat(st.render(), equalTo("rds?engine=MySQL&name=blog")); } @Test public void testSpaces() throws Exception { Uri<String> u = Uri.valueOf("script:sculptor/install.sh {virtual.fragment}?unwind=sculptor/uninstall.sh {virtual.fragment}"); String unwind = u.getParams().get("unwind"); assertThat(unwind, equalTo("sculptor/uninstall.sh {virtual.fragment}")); } }
[ "brianm@skife.org" ]
brianm@skife.org
0a98d6a1a0c31e200225dd5d9514671916e1b41c
e96b0019599c7d410a896a20b006a07648172622
/src/main/java/com/iqmsoft/mongo/solr/controller/SpringMongoSolrController.java
06ffee11a7050a772cb2c99c8d181f1782a1b8a7
[]
no_license
Murugar/SpringBootMongoSolr
a94aedd83ceb0a1074db173c2a001f1a658dccac
820c0366f3bca75bec427468b678b0b0173a4a98
refs/heads/master
2021-01-22T05:24:05.506251
2017-02-11T14:17:02
2017-02-11T14:17:02
81,657,194
0
0
null
null
null
null
UTF-8
Java
false
false
1,748
java
package com.iqmsoft.mongo.solr.controller; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.servlet.ModelAndView; import com.iqmsoft.mongo.solr.mongo.model.TestDocument; import com.iqmsoft.mongo.solr.service.TestDocumentService; import com.iqmsoft.mongo.solr.solr.model.TestSolrDocument; @RestController @SuppressWarnings("all") public class SpringMongoSolrController { @Autowired private TestDocumentService testDocumentService; @RequestMapping( path = "createDocument", method = RequestMethod.POST, consumes = {"application/x-www-form-urlencoded;charset=UTF-8"}, produces = "application/json;charset=UTF-8") @ResponseBody public TestSolrDocument createDocument(TestDocument document) { return testDocumentService.saveMongoAndIndex(document); } @RequestMapping(path = "clearAll", method = RequestMethod.GET) public String clearAll() { testDocumentService.clear(); return "Clear All Success!"; } @RequestMapping(path = "indexMongo", method = RequestMethod.GET) public String indexMongo() { testDocumentService.indexMongo(); return "Index Mongo Success!"; } @RequestMapping(path = "createDocument", method = RequestMethod.GET) public ModelAndView newDocument() { ModelAndView view = new ModelAndView("/createDocumentForm"); view.addObject(new TestDocument()); return view; } }
[ "davanon2014@gmail.com" ]
davanon2014@gmail.com
604b6d8068e39d33d729b62c14dc77419ba7b331
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/30/30_8e2477a6e9856d62263da1432e585b212e08a56f/SupplierService/30_8e2477a6e9856d62263da1432e585b212e08a56f_SupplierService_t.java
f377868c83185495966e731653c94716e8e0a1f2
[]
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
835
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package aic2010.services; import aic2010.exception.UnknownProductException; import aic2010.model.Product; import java.math.BigDecimal; import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebService; import javax.jws.soap.SOAPBinding; /** * * @author rudolf */ @WebService(targetNamespace="http://infosys.tuwien.ac.at/aic10/ass1/dto/supplier") @SOAPBinding(style=SOAPBinding.Style.RPC, parameterStyle=SOAPBinding.ParameterStyle.BARE) public interface SupplierService { @WebMethod(operationName="order") public BigDecimal order(@WebParam(name="product") Product product, @WebParam(name="amount")Integer amount) throws UnknownProductException; }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
29c5fac6b81307b1a615290131401ab834108a41
08deccdb56475ccb2d0a4992be99e236c9a22264
/hongbao-api-web/src/main/java/com/yanbao/vo/HotGoodsVo.java
31d91c0850f8717bd1a3d8dad8d76d794833bd36
[]
no_license
dream-home/hongbao
92a70099c236855b32aebe3b252192c782e93c87
a660cc02ba0fd218b7c3a171ad4a217edfd4713d
refs/heads/master
2021-07-05T12:29:06.735635
2017-09-28T04:02:52
2017-09-28T04:02:52
105,000,363
0
0
null
null
null
null
UTF-8
Java
false
false
4,361
java
package com.yanbao.vo; import com.yanbao.core.model.SimpleModel; /** * 商品表 * * @date 2016年3月28日 */ public class HotGoodsVo extends SimpleModel { private static final long serialVersionUID = 6468123345520931799L; /** 商品分类ID */ private String goodsSortId; /** 商铺Id */ private String storeId; /** 商铺名称 */ private String storeName; /** 名称 */ private String name; /** 图片 */ private String icon; /** 商品价格 */ private Double price; /** 竞拍价 */ private Double drawPrice; /** 参与竞拍人数 */ private Integer drawNum; /** 商品介绍 */ private String detail; /** 商品类型:0:系统发布:1:商家发布 */ private Integer goodsType; /** 库存 */ private Integer stock; /** 当前期数编号 */ private Integer curIssueNo; /** 当前期数Id */ private String curIssueId; /** 是否置顶:0:否,1:是 */ private Integer isTop; /** 是否推荐:0:否;1:是 */ private Integer isRecommend; /** 是否委托出售:0:否,1:是 */ private Integer saleSwitch; /** 一级分销比例 */ private Double firstReferrerScale = 0d; /** 二级分销比例 */ private Double secondReferrerScale = 0d; /** 三级分销比例 */ private Double thirdReferrerScale = 0d; /** 商家赠送Ep */ private Double businessSendEp = 0d; /** 分类名称 **/ private String goodsSortName; public String getGoodsSortName() { return goodsSortName; } public void setGoodsSortName(String goodsSortName) { this.goodsSortName = goodsSortName; } public String getGoodsSortId() { return goodsSortId; } public void setGoodsSortId(String goodsSortId) { this.goodsSortId = goodsSortId; } public String getStoreId() { return storeId; } public void setStoreId(String storeId) { this.storeId = storeId; } public String getStoreName() { return storeName; } public void setStoreName(String storeName) { this.storeName = storeName; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getIcon() { return icon; } public void setIcon(String icon) { this.icon = icon; } public Double getPrice() { return price; } public void setPrice(Double price) { this.price = price; } public Double getDrawPrice() { return drawPrice; } public void setDrawPrice(Double drawPrice) { this.drawPrice = drawPrice; } public Integer getDrawNum() { return drawNum; } public void setDrawNum(Integer drawNum) { this.drawNum = drawNum; } public String getDetail() { return detail; } public void setDetail(String detail) { this.detail = detail; } public Integer getGoodsType() { return goodsType; } public void setGoodsType(Integer goodsType) { this.goodsType = goodsType; } public Integer getStock() { return stock; } public void setStock(Integer stock) { this.stock = stock; } public Integer getCurIssueNo() { return curIssueNo; } public void setCurIssueNo(Integer curIssueNo) { this.curIssueNo = curIssueNo; } public String getCurIssueId() { return curIssueId; } public void setCurIssueId(String curIssueId) { this.curIssueId = curIssueId; } public Integer getIsTop() { return isTop; } public void setIsTop(Integer isTop) { this.isTop = isTop; } public Integer getIsRecommend() { return isRecommend; } public void setIsRecommend(Integer isRecommend) { this.isRecommend = isRecommend; } public Integer getSaleSwitch() { return saleSwitch; } public void setSaleSwitch(Integer saleSwitch) { this.saleSwitch = saleSwitch; } public Double getFirstReferrerScale() { return firstReferrerScale; } public void setFirstReferrerScale(Double firstReferrerScale) { this.firstReferrerScale = firstReferrerScale; } public Double getSecondReferrerScale() { return secondReferrerScale; } public void setSecondReferrerScale(Double secondReferrerScale) { this.secondReferrerScale = secondReferrerScale; } public Double getThirdReferrerScale() { return thirdReferrerScale; } public void setThirdReferrerScale(Double thirdReferrerScale) { this.thirdReferrerScale = thirdReferrerScale; } public Double getBusinessSendEp() { return businessSendEp; } public void setBusinessSendEp(Double businessSendEp) { this.businessSendEp = businessSendEp; } }
[ "1510331524@qq.com" ]
1510331524@qq.com
1b435d2c2dd5e93f0702b7ef21fdcf27d8ed12fa
bfb8198e6554bbc21694ce83745f0915a3d6de07
/src/main/java/com/lhf/mango/entity/Article.java
af68643a220be016a23676149ab5b2f082409ac7
[]
no_license
JavaCodeMood/mango-example1
4207ec4f9c1b6ddd42f64e8ae394c08139b6ed59
01401e52cf8454c94bbb2c4898048b8695f93da6
refs/heads/master
2020-04-24T15:06:19.698996
2019-02-22T11:10:12
2019-02-22T11:10:12
172,051,856
1
0
null
null
null
null
UTF-8
Java
false
false
1,395
java
package com.lhf.mango.entity; import org.jfaster.mango.annotation.ID; import java.util.Date; /** * @ClassName: Article * @Desc: 文章实体 * @Author: liuhefei * @Date: 2018/12/20 19:26 */ public class Article { @ID private Integer id; private String title; private String content; private String author; private Date updateTime; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } public String getAuthor() { return author; } public void setAuthor(String author) { this.author = author; } public Date getUpdateTime() { return updateTime; } public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; } @Override public String toString() { return "Article{" + "id=" + id + ", title='" + title + '\'' + ", content='" + content + '\'' + ", author='" + author + '\'' + ", updateTime=" + updateTime + '}'; } }
[ "2510736432@qq.com" ]
2510736432@qq.com
8e9ea9fdc161f77693dcb886fe3bf64091f422e3
0ab9b096276583a795ea962b14278da34f8997c4
/src/main/java/org/dependencytrack/util/HttpUtil.java
819e0aa1f738d849337006176f2dcbab5c16091c
[ "Apache-2.0" ]
permissive
Ramos-dev/dependency-track
e048b7006dad526b4f6832a307ef3e083721ffb9
01b86792fa03aae76cc800b8249b72c751b4c8ae
refs/heads/master
2022-10-05T18:04:51.530566
2019-01-05T03:28:45
2019-01-05T03:28:45
164,811,876
0
1
Apache-2.0
2022-09-15T09:03:07
2019-01-09T07:30:21
Java
UTF-8
Java
false
false
1,340
java
/* * This file is part of Dependency-Track. * * 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) Steve Springett. All Rights Reserved. */ package org.dependencytrack.util; import java.util.Base64; import static org.apache.http.HttpHeaders.AUTHORIZATION; public class HttpUtil { /** * Private constructor. */ private HttpUtil() { } public static String basicAuthHeader(String username, String password) { return AUTHORIZATION + ": " + basicAuthHeader(username, password); } public static String basicAuthHeaderValue(String username, String password) { return "Basic " + Base64.getEncoder().encodeToString( String.format("%s:%s", username,password) .getBytes() ); } }
[ "steve@springett.us" ]
steve@springett.us
e5fbcbc8b68df7aedd9b01a3ae9550a1402b35b8
6baf1fe00541560788e78de5244ae17a7a2b375a
/hollywood/com.oculus.browser-base/sources/defpackage/C1501Yo0.java
2875d67a5ef93009541f5dd394bc32c5869db5dd
[]
no_license
phwd/quest-tracker
286e605644fc05f00f4904e51f73d77444a78003
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
refs/heads/main
2023-03-29T20:33:10.959529
2021-04-10T22:14:11
2021-04-10T22:14:11
357,185,040
4
2
null
2021-04-12T12:28:09
2021-04-12T12:28:08
null
UTF-8
Java
false
false
960
java
package defpackage; /* renamed from: Yo0 reason: default package and case insensitive filesystem */ /* compiled from: chromium-OculusBrowser.apk-stable-281887347 */ public final class C1501Yo0 extends AbstractC4340q31 { public static final CC[] b; public static final CC c; public C3093in0 d; static { CC[] ccArr = {new CC(16, 0)}; b = ccArr; c = ccArr[0]; } public C1501Yo0() { super(16, 0); } public static C1501Yo0 d(C2740gj0 gj0) { C4709sD sDVar = new C4709sD(gj0); sDVar.b(); try { C1501Yo0 yo0 = new C1501Yo0(sDVar.c(b).b); yo0.d = C3093in0.d(sDVar.s(8, true)); return yo0; } finally { sDVar.a(); } } @Override // defpackage.AbstractC4340q31 public final void a(C1648aL aLVar) { aLVar.x(c).i(this.d, 8, true); } public C1501Yo0(int i) { super(16, i); } }
[ "cyuubiapps@gmail.com" ]
cyuubiapps@gmail.com
007797935b902771373884538ad4545f81834545
635162ba17786e6f366f712cb8c31ffb42633554
/project/securities-portal/src/main/java/cn/hzstk/securities/sys/mapper/RoleMapper.java
396ab4175d10e56994838c817a1abcc8e4528db8
[]
no_license
macrogoal/wwh.stock
19aeed117f57acc1f22f3ed0caf34e481f00eb9c
8847a4bc6707dd881ea28133b621cf81431d845b
refs/heads/master
2020-04-17T05:51:47.771160
2018-04-04T06:21:15
2018-04-04T06:21:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,032
java
package cn.hzstk.securities.sys.mapper; import cn.hzstk.securities.sys.domain.Role; import org.apache.ibatis.annotations.*; import tk.mybatis.mapper.common.Mapper; import java.util.List; import java.util.Map; /** * Created by allenwc on 15/9/10. */ public interface RoleMapper extends Mapper<Role> { @Select("select * from sys_role where valid='1' and id in (select role_id from sys_r_user_role where valid='1' and user_id=#{value})") @Results(value = { @Result(property = "id", column = "ID"), @Result(property = "name", column = "NAME"), @Result(property = "code", column = "code"), @Result(property = "note", column = "note") }) public List<Role> getRolesByUser(Long userId); @Delete("DELETE FROM sys_r_user_role where user_id=#{userId}") public void deleteByUser(Long userId); @Insert("INSERT INTO sys_r_user_role(user_id,role_id,CREATE_DATE,CREATOR) VALUES (#{userId},#{roleId},NOW(),#{creator})") public void insertRoleUser(Map map); }
[ "wwzero@hotmail.com" ]
wwzero@hotmail.com
a2cdff9d5c051bc9dda8f5cf574c808dd5fb4a3c
c0542546866385891c196b665d65a8bfa810f1a3
/decompiled/android/service/notification/IStatusBarNotificationHolder.java
254d0b9ae2ab486ca06cef694b2b33f80b558b7d
[]
no_license
auxor/android-wear-decompile
6892f3564d316b1f436757b72690864936dd1a82
eb8ad0d8003c5a3b5623918c79334290f143a2a8
refs/heads/master
2016-09-08T02:32:48.433800
2015-10-12T02:17:27
2015-10-12T02:19:32
42,517,868
5
1
null
null
null
null
UTF-8
Java
false
false
3,415
java
package android.service.notification; import android.os.Binder; import android.os.IBinder; import android.os.IInterface; import android.os.Parcel; import android.os.RemoteException; public interface IStatusBarNotificationHolder extends IInterface { public static abstract class Stub extends Binder implements IStatusBarNotificationHolder { private static final String DESCRIPTOR = "android.service.notification.IStatusBarNotificationHolder"; static final int TRANSACTION_get = 1; private static class Proxy implements IStatusBarNotificationHolder { private IBinder mRemote; Proxy(IBinder remote) { this.mRemote = remote; } public IBinder asBinder() { return this.mRemote; } public String getInterfaceDescriptor() { return Stub.DESCRIPTOR; } public StatusBarNotification get() throws RemoteException { Parcel _data = Parcel.obtain(); Parcel _reply = Parcel.obtain(); try { StatusBarNotification _result; _data.writeInterfaceToken(Stub.DESCRIPTOR); this.mRemote.transact(Stub.TRANSACTION_get, _data, _reply, 0); _reply.readException(); if (_reply.readInt() != 0) { _result = (StatusBarNotification) StatusBarNotification.CREATOR.createFromParcel(_reply); } else { _result = null; } _reply.recycle(); _data.recycle(); return _result; } catch (Throwable th) { _reply.recycle(); _data.recycle(); } } } public Stub() { attachInterface(this, DESCRIPTOR); } public static IStatusBarNotificationHolder asInterface(IBinder obj) { if (obj == null) { return null; } IInterface iin = obj.queryLocalInterface(DESCRIPTOR); if (iin == null || !(iin instanceof IStatusBarNotificationHolder)) { return new Proxy(obj); } return (IStatusBarNotificationHolder) iin; } public IBinder asBinder() { return this; } public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException { switch (code) { case TRANSACTION_get /*1*/: data.enforceInterface(DESCRIPTOR); StatusBarNotification _result = get(); reply.writeNoException(); if (_result != null) { reply.writeInt(TRANSACTION_get); _result.writeToParcel(reply, TRANSACTION_get); return true; } reply.writeInt(0); return true; case IBinder.INTERFACE_TRANSACTION /*1598968902*/: reply.writeString(DESCRIPTOR); return true; default: return super.onTransact(code, data, reply, flags); } } } StatusBarNotification get() throws RemoteException; }
[ "itop.my@gmail.com" ]
itop.my@gmail.com
fa0a3948377c02692d324d09a64ac54d3f4fbf18
a16611c75fa0c8699bdf97ab1a9d24c442d48a57
/ucloude-framework/src/main/java/cn/uway/ucloude/support/bean/PropConverter.java
48c98dfb7970283292ccd05719f93e8ae5359ab2
[]
no_license
un-knower/yuncaiji_v4
cfaf3f18accb794901f70f7252af30280414e7ed
a4ff027e485272b73e2c6fb3f1dd098f5499086b
refs/heads/master
2020-03-17T23:14:40.121595
2017-05-21T05:55:51
2017-05-21T05:55:51
134,036,686
0
1
null
2018-05-19T06:35:12
2018-05-19T06:35:12
null
UTF-8
Java
false
false
209
java
package cn.uway.ucloude.support.bean; public interface PropConverter<Source, Output> { /** * @param source 是原对象 * @return 这个属性的值 */ Output convert(Source source); }
[ "1852300415@qq.com" ]
1852300415@qq.com
91de96fff3de9440bbbadc15b257b01cadbcd4ca
8bf7fc828ddc913fc885d8c72585a2e5481d7d88
/app/src/main/java/zhushen/com/shejimoshi/chapter18/example1/ProxySubject.java
483c25e8714deef150592b5c4771008651ec398a
[ "MIT" ]
permissive
keeponZhang/android_design_pattern_book_source
eacfb6b6d338e7b2c52042d5a0cdb5c27e1be3ec
8c8e98c2071546da5fc517f1c937f302d3a5ec52
refs/heads/master
2022-12-16T03:43:31.622111
2020-09-11T11:43:58
2020-09-11T11:43:58
293,052,105
0
0
null
null
null
null
UTF-8
Java
false
false
353
java
package zhushen.com.shejimoshi.chapter18.example1; /** * Created by Zhushen on 2018/5/30. */ public class ProxySubject extends Subject { private RealSubject realSubject; public ProxySubject(RealSubject realSubject) { this.realSubject = realSubject; } @Override public void visit() { realSubject.visit(); } }
[ "zhangwengao@yy.com" ]
zhangwengao@yy.com
c2f523caae89ea1844678bde2e9d190fe2c1f52c
b23404e272db01f2bf46320565c11b9e02cf0c61
/new/pps/src/main/java/ice/cn/joy/ggg/api/model/PageSupport.java
47ebce3910e38623f22b0be1a961cfd7f4857329
[]
no_license
brucesq/brucedamon001
95ab98798f1c29d722a397681956c24ff4091385
92ab181f90005afffb354d10768921545912119c
refs/heads/master
2021-05-29T09:35:05.115101
2011-12-20T05:42:28
2011-12-20T05:42:28
32,131,555
0
1
null
null
null
null
UTF-8
Java
false
false
3,962
java
// ********************************************************************** // // Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved. // // This copy of Ice is licensed to you under the terms described in the // ICE_LICENSE file included in this distribution. // // ********************************************************************** // Ice version 3.4.0 package cn.joy.ggg.api.model; // <auto-generated> // // Generated from file `community.ice' // // Warning: do not edit this file. // // </auto-generated> public class PageSupport implements java.lang.Cloneable, java.io.Serializable { public int pageNo; public int pageSize; public int totalSize; public Ice.Object result; public PageSupport() { } public PageSupport(int pageNo, int pageSize, int totalSize, Ice.Object result) { this.pageNo = pageNo; this.pageSize = pageSize; this.totalSize = totalSize; this.result = result; } public boolean equals(java.lang.Object rhs) { if(this == rhs) { return true; } PageSupport _r = null; try { _r = (PageSupport)rhs; } catch(ClassCastException ex) { } if(_r != null) { if(pageNo != _r.pageNo) { return false; } if(pageSize != _r.pageSize) { return false; } if(totalSize != _r.totalSize) { return false; } if(result != _r.result && result != null && !result.equals(_r.result)) { return false; } return true; } return false; } public int hashCode() { int __h = 0; __h = 5 * __h + pageNo; __h = 5 * __h + pageSize; __h = 5 * __h + totalSize; if(result != null) { __h = 5 * __h + result.hashCode(); } return __h; } public java.lang.Object clone() { java.lang.Object o = null; try { o = super.clone(); } catch(CloneNotSupportedException ex) { assert false; // impossible } return o; } public void __write(IceInternal.BasicStream __os) { __os.writeInt(pageNo); __os.writeInt(pageSize); __os.writeInt(totalSize); __os.writeObject(result); } private class Patcher implements IceInternal.Patcher { public void patch(Ice.Object v) { try { result = (Ice.Object)v; } catch(ClassCastException ex) { IceInternal.Ex.throwUOE(type(), v.ice_id()); } } public String type() { return "::Ice::Object"; } } public void __read(IceInternal.BasicStream __is) { pageNo = __is.readInt(); pageSize = __is.readInt(); totalSize = __is.readInt(); __is.readObject(new Patcher()); } public int getPageNo() { return pageNo; } public void setPageNo(int pageNo) { this.pageNo = pageNo; } public int getPageSize() { return pageSize; } public void setPageSize(int pageSize) { this.pageSize = pageSize; } public int getTotalSize() { return totalSize; } public void setTotalSize(int totalSize) { this.totalSize = totalSize; } public Ice.Object getResult() { return result; } public void setResult(Ice.Object result) { this.result = result; } }
[ "quanzhi@8cf3193c-f4eb-11de-8355-bf90974c4141" ]
quanzhi@8cf3193c-f4eb-11de-8355-bf90974c4141
fde6b5781035dd1c33d30dfbfd0df4f88a784392
720ba343ce147af5b3881679e3b2aebd21d62910
/multi-language/src/main/java/com/greentea/multilang/controller/FileController.java
65333afcdfa7117f3746a16a30243b7156ad1de5
[]
no_license
tomlxq/ShowCase
698ffdaf16979c8197cba5a1f97c179b25617281
17717c3411c98ede281c75a747ff3583b82e5997
refs/heads/master
2021-01-20T10:10:49.638899
2018-11-22T16:31:56
2018-11-22T16:31:56
28,090,123
1
0
null
null
null
null
UTF-8
Java
false
false
2,678
java
package com.greentea.multilang.controller; import org.apache.commons.io.FileUtils; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletRequest; import java.io.File; import java.io.IOException; import java.util.HashMap; import java.util.Map; /** * 说明: * * @author tom * @version 创建时间: 2015/1/12 20:47 */ @Controller public class FileController { @RequestMapping("/file") public ModelAndView showContacts() { Map model = new HashMap(); return new ModelAndView("file", model); } @RequestMapping(value = "/file", method = RequestMethod.POST) public void addUser(@RequestParam MultipartFile[] file_upload, HttpServletRequest request) throws IOException { //如果只是上传一个文件,则只需要MultipartFile类型接收文件即可,而且无需显式指定@RequestParam注解 //如果想上传多个文件,那么这里就要用MultipartFile[]类型来接收文件,并且还要指定@RequestParam注解 //并且上传多个文件时,前台表单中的所有<input type="file"/>的name都应该是myfiles,否则参数里的myfiles无法获取到所有上传的文件 for (MultipartFile file : file_upload) { if (file.isEmpty()) { System.out.println("文件未上传"); } else { System.out.println("文件长度: " + file.getSize()); System.out.println("文件类型: " + file.getContentType()); System.out.println("文件名称: " + file.getName()); System.out.println("文件原名: " + file.getOriginalFilename()); System.out.println("========================================"); //如果用的是Tomcat服务器,则文件会上传到\\%TOMCAT_HOME%\\webapps\\YourWebProject\\WEB-INF\\upload\\文件夹中 String realPath = request.getSession().getServletContext().getRealPath("/WEB-INF/upload"); FileUtils.forceMkdir(new File(realPath)); //这里不必处理IO流关闭的问题,因为FileUtils.copyInputStreamToFile()方法内部会自动把用到的IO流关掉,我是看它的源码才知道的 FileUtils.copyInputStreamToFile(file.getInputStream(), new File(realPath, file.getOriginalFilename())); } } } }
[ "21429503@qq.com" ]
21429503@qq.com
2ee09bb86bee13e8ebebf267d16d55aa90313e54
eace8b32a87489266bec9f2a867f89e6b9caa5e7
/GingerUI/gingerui/src/main/java/com/spicerack/framework/frameworkutilities/LogUtil.java
72a68f794e6887fee2e02342367343d04c92a6cd
[]
no_license
nageshphaniraj81/SpiceRack
d3e161918b9f4a7c40b23f9762f991df98d13699
4a3078f426f46d3d8c9cb491bf2ce65e0c9b5cdd
refs/heads/master
2021-01-20T02:42:30.159445
2019-03-14T10:40:31
2019-03-14T10:40:31
89,444,622
0
0
null
null
null
null
UTF-8
Java
false
false
2,040
java
/* * */ package com.spicerack.framework.frameworkutilities; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.time.ZonedDateTime; import java.time.format.DateTimeFormatter; import com.spicerack.framework.configuration.ConfigReader; import com.spicerack.framework.configuration.Settings; /** * The Class LogUtil used to generate userdefined logs */ public class LogUtil { /** The date. */ // File format for the log file ZonedDateTime date = ZonedDateTime.now(); /** The formatter. */ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("ddMMyyyyHHMMSS"); /** The file name format. */ String fileNameFormat = date.format(formatter); /** The buffered writter. */ private BufferedWriter bufferedWritter = null; /** * Instantiates a new log util. * * @throws IOException * Signals that an I/O exception has occurred. */ public LogUtil() throws IOException{ // Initializing configuration Settings ConfigReader.populateSetting(); } /** * Creates the log file in the location specified in * Global Configuration properties file. */ private void CreateLogFile() { try { File dir = new File(Settings.LogFolder); if (!dir.exists()) dir.mkdir(); File logFile = new File(dir + "/" +fileNameFormat+".log"); FileWriter fileWriter = new FileWriter(logFile.getAbsolutePath()); bufferedWritter = new BufferedWriter(fileWriter); } catch (Exception e) { System.out.println(e.toString()); } } /** * To write the log message in the log. * * @param message * the message */ public void Write(String message) { CreateLogFile(); try { formatter = DateTimeFormatter.ofPattern("dd-MM-yy:HH_MM_SS"); String dateFormat = date.format(formatter); bufferedWritter.write(" ["+dateFormat+"] "+message); bufferedWritter.newLine(); bufferedWritter.flush(); } catch (Exception e) { System.out.println(e.toString()); } } }
[ "nageshphaniraj81@gmail.com" ]
nageshphaniraj81@gmail.com