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
aa4967e860296729c05ae3f766da0c2b7ebd637f
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
/Code Snippet Repository/Struts/Struts3655.java
773357880b556f84fdbc004b05683c46ca85786e
[]
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
565
java
public void testPutContinueMapping() throws Exception { req.setRequestURI("/myapp/animals/dog/fido"); req.setServletPath("/animals/dog/fido"); req.setMethod("PUT"); req.addHeader("Expect", "100-continue"); ActionMapping mapping = mapper.getMapping(req, configManager); assertEquals("/animals", mapping.getNamespace()); assertEquals("dog", mapping.getName()); assertEquals("updateContinue", mapping.getMethod()); assertEquals("fido", ((String[]) mapping.getParams().get("id"))[0]); }
[ "Qing.Mi@my.cityu.edu.hk" ]
Qing.Mi@my.cityu.edu.hk
195ba0bd9a5c5fe8cbd98cc1a946c9b85269057c
32155e5a4910c5d17615b3f291bbdc3c625cc4f9
/senpure-web/src/main/java/com/senpure/base/WebConstant.java
a44edc8a90b9ea8a9e43d2485e5257fac98967d2
[]
no_license
senpure/senpure4
3c588a6615708f0444da5f1b5ce4afc7d92bc95c
e3a007320c7923b6bd59c769bc9b9d2b13338ab8
refs/heads/master
2020-03-21T05:15:12.371086
2018-06-21T09:52:45
2018-06-21T09:52:45
107,912,311
0
0
null
null
null
null
UTF-8
Java
false
false
179
java
package com.senpure.base; /** * Created by 罗中正 on 2017/8/24. */ public class WebConstant { public static final String ACTION_RESULT_MODEL_VIEW_KEY="action.result"; }
[ "senpure@senpure.com" ]
senpure@senpure.com
9d8eca4c2144767828799b276a6e4fa8f710dc45
04d05451fdc5951d4dcb473256e4e1bd17701098
/webpp/src/main/java/de/weltraumschaf/citer/domain/NodeEntity.java
47e3ae73fbdec92eac700fe99c94c5c818167617
[]
no_license
Weltraumschaf/Citer
6610f8f2bf5cd3bfa6ab5cb6ba1aa0c521342612
aff64a723605de640f9ab403c88ca150c5179a69
refs/heads/master
2021-09-08T03:51:17.302431
2020-04-24T19:20:34
2020-04-24T19:20:34
3,381,521
1
0
null
2021-09-01T18:36:33
2012-02-07T21:19:10
JavaScript
UTF-8
Java
false
false
2,450
java
/* * LICENSE * * "THE BEER-WARE LICENSE" (Revision 43): * "Sven Strittmatter" <weltraumschaf(at)googlemail(dot)com> wrote this file. * As long as you retain this notice you can do whatever you want with * this stuff. If we meet some day, and you think this stuff is worth it, * you can buy me a non alcohol-free beer in return. * * Copyright (C) 2012 "Sven Strittmatter" <weltraumschaf(at)googlemail(dot)com> */ package de.weltraumschaf.citer.domain; import javax.xml.bind.annotation.XmlTransient; import org.joda.time.DateTime; import org.neo4j.graphdb.Node; import org.neo4j.graphdb.Transaction; /** * * @author Sven Strittmatter <weltraumschaf@googlemail.com> */ abstract public class NodeEntity { public static final String ID = "id"; public static final String DATE_CREATED = "created"; public static final String DATE_UPDATED = "updated"; private final Node underlyingNode; public NodeEntity(Node underlyingNode) { this.underlyingNode = underlyingNode; } @XmlTransient public Node getUnderlyingNode() { return underlyingNode; } public String getId() { return (String)getProperty(ID); } public void setId(String id) { setProperty(ID, id); } public DateTime getDateCreated() { String date = (String)getProperty(DATE_CREATED); return new DateTime(date); } public void setDateCreated(DateTime date) { setProperty(DATE_CREATED, date.toString()); } public DateTime getDateUpdated() { String date = (String)getProperty(DATE_UPDATED); return new DateTime(date); } public void setDateUpdated(DateTime date) { setProperty(DATE_UPDATED, date.toString()); } protected void setProperty(String key, Object value) { Transaction tx = underlyingNode.getGraphDatabase() .beginTx(); try { underlyingNode.setProperty(key, value); tx.success(); } finally { tx.finish(); } } protected Object getProperty(String key) { return underlyingNode.getProperty(key); } @Override public int hashCode() { return underlyingNode.hashCode(); } @Override public boolean equals(Object other) { return other instanceof NodeEntity && getUnderlyingNode().equals(((NodeEntity)other).getUnderlyingNode()); } }
[ "ich@weltraumschaf.de" ]
ich@weltraumschaf.de
4173c038cd07082b295544cf49d0ab4b54992c2a
0efd81befd1445937adf7ad76ea9b0f32b5f625d
/.history/CodeForces/NapoleanCake_20210316102316.java
0e6784021496fd534ad9c79377e1b033eb980b56
[]
no_license
Aman-kulshreshtha/100DaysOfCode
1a080eb36a65c50b7e18db7c4eac508c3f51e2c4
be4cb2fd80cfe5b7e2996eed0a35ad7f390813c1
refs/heads/main
2023-03-23T07:11:26.924928
2021-03-21T16:16:46
2021-03-21T16:16:46
346,999,930
0
0
null
2021-03-12T09:41:46
2021-03-12T08:49:46
null
UTF-8
Java
false
false
1,128
java
import java.util.*; public class NapoleanCake { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t = sc.nextInt(); while(t-- > 0) { int n = sc.nextInt(); int[] cake = new int[n]; for(int i = 0 ; i < n ;i++) { int cream = sc.nextInt(); if(i != n-1 && cream != 0) { cake[i+1]--; if(i+1-cream >= 0 ) { cake[i+1-cream]++; }else { cake[0]++; } } } for(int k = 1 ; k < n ; k++) { cake[k] += cake[k-1]; } for(int k = 0 ; k <n; k++) { /* if(cake[k] >0) { System.out.print(1 + " "); }else { System.out.print(0 + " "); } */ System.out.print(cake[k] + " "); } System.out.println(); } sc.close(); System.exit(0); } }
[ "aman21102000@gmail.com" ]
aman21102000@gmail.com
0ae937379459fb88baba1a7b2978899832d85e7c
139960e2d7d55e71c15e6a63acb6609e142a2ace
/mobile_app1/module25/src/main/java/module25packageJava0/Foo1.java
78a68ee862f15847fc344056d1a498ff98aa6784
[ "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
505
java
package module25packageJava0; import java.lang.Integer; public class Foo1 { Integer int0; Integer int1; public void foo0() { new module25packageJava0.Foo0().foo8(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } public void foo5() { foo4(); } public void foo6() { foo5(); } public void foo7() { foo6(); } public void foo8() { foo7(); } }
[ "oliviern@uber.com" ]
oliviern@uber.com
1d0a499d8aee0f4f627ba2348a4064ba66716e11
b2b0f00fd6a06e7aab45f96339be0b97edc077e6
/2D AI Engine/src/com/emptyPockets/engine2D/steering/behaviors/Flee.java
df13b880b8b224a70c4eb8f2b7fe6cd1b62df148
[]
no_license
cdbhimani/joeydevolopmenttesting
ecb5d8b6bed2401a972bc4f72226550f6fb2ffbf
7f5ad39c9bea54db2a6bc26a84905e541fd7c3d5
refs/heads/master
2020-03-27T22:40:44.688037
2018-02-08T07:28:54
2018-02-08T07:28:54
40,646,759
2
0
null
null
null
null
UTF-8
Java
false
false
1,136
java
package com.emptyPockets.engine2D.steering.behaviors; import com.emptyPockets.engine2D.entities.types.Vehicle; import com.emptyPockets.engine2D.shapes.Vector2D; import com.emptyPockets.engine2D.steering.SteeringControler; public class Flee extends AbstractBehavior{ public boolean useFleePanic = false; public float fleePanicDistance; public Vector2D fleePos; public Flee(SteeringControler steering) { super("Flee",steering); } @Override public void calculate(Vector2D force) { if(useFleePanic){ flee(vehicle, fleePos, force); } else{ flee(vehicle, fleePos, fleePanicDistance,force); } } public static void flee(Vehicle veh,Vector2D targetPos,Vector2D rst) { Vector2D.subtract(veh.pos, targetPos, rst); rst.nor(); rst.mul(veh.maxSpeed); rst.sub(veh.vel); } public static void flee(Vehicle veh,Vector2D targetPos,float fleeDistance, Vector2D rst) { Vector2D.subtract(veh.pos, targetPos, rst); if (rst.len2() > fleeDistance * fleeDistance) { rst.x = 0; rst.y = 0; return; } rst.nor(); rst.mul(veh.maxSpeed); rst.sub(veh.vel); } }
[ "joey.enfield@gmail.com" ]
joey.enfield@gmail.com
9866b44398335a08551732e5f7aac36dd91cfbe6
d52fd93e19f1b228589cde9f983ac4eaeb2b2e2f
/flexodesktop/GUI/flexo/src/main/java/org/openflexo/components/SaveDialog.java
31fbf1b5f629f356b6f589d8b409ae07d45a6526
[]
no_license
bmangez/openflexo
597dbb3836bcb0ebe7ab1e4f601a22fca470d4d7
7d8773c59b96f460864b4408cf1f2cfc9633cf8d
refs/heads/master
2020-12-25T04:54:16.874230
2012-12-05T16:19:04
2012-12-06T15:41:49
2,393,923
0
0
null
null
null
null
UTF-8
Java
false
false
1,415
java
/* * (c) Copyright 2010-2011 AgileBirds * * This file is part of OpenFlexo. * * OpenFlexo 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. * * OpenFlexo 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 OpenFlexo. If not, see <http://www.gnu.org/licenses/>. * */ package org.openflexo.components; import java.awt.Component; import javax.swing.JOptionPane; import org.openflexo.localization.FlexoLocalization; /** * @author gpolet * */ public class SaveDialog extends JOptionPane { private int retval = JOptionPane.CANCEL_OPTION; public SaveDialog(Component parent) { retval = JOptionPane.showConfirmDialog(parent, FlexoLocalization.localizedForKey("project_has_unsaved_changes") + "\n" + FlexoLocalization.localizedForKey("would_you_like_to_save_the_changes?"), FlexoLocalization.localizedForKey("exiting_flexo"), JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); } public int getRetval() { return retval; } }
[ "guillaume.polet@gmail.com" ]
guillaume.polet@gmail.com
bd07910f2e3cb38beab2cb202841eea5019776c3
443928d406ef51efd35020de050decd8151dae9b
/asnlab-uper/src/main/java/com/hisense/hiatmp/asn/v2x/DefAcceleration/Acceleration.java
2bd3b183e1ae3a1135e1ada320d4f6ff17d97844
[ "Apache-2.0" ]
permissive
zyjohn0822/asn1-uper-v2x-se
ad430889ca9f3d42f2c083810df2a5bc7b18ec22
85f9bf98a12a57a04260282a9154f1b988de8dec
refs/heads/master
2023-04-21T11:44:34.222501
2021-05-08T08:23:27
2021-05-08T08:23:27
365,459,042
2
1
null
null
null
null
UTF-8
Java
false
false
1,459
java
/* * Generated by ASN.1 Java Compiler (https://www.asnlab.org/) * From ASN.1 module "DefAcceleration" */ package com.hisense.hiatmp.asn.v2x.DefAcceleration; import org.asnlab.asndt.runtime.conv.AsnConverter; import org.asnlab.asndt.runtime.conv.EncodingRules; import org.asnlab.asndt.runtime.conv.IntegerConverter; import org.asnlab.asndt.runtime.type.AsnType; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class Acceleration { public final static AsnType TYPE = DefAcceleration.type(65537); public final static AsnConverter CONV = IntegerConverter.INSTANCE; public static void ber_encode(Integer object, OutputStream out) throws IOException { TYPE.encode(object, EncodingRules.BASIC_ENCODING_RULES, CONV, out); } public static Integer ber_decode(InputStream in) throws IOException { return (Integer) TYPE.decode(in, EncodingRules.BASIC_ENCODING_RULES, CONV); } public static void per_encode(Integer object, boolean align, OutputStream out) throws IOException { TYPE.encode(object, align ? EncodingRules.ALIGNED_PACKED_ENCODING_RULES : EncodingRules.UNALIGNED_PACKED_ENCODING_RULES, CONV, out); } public static Integer per_decode(boolean align, InputStream in) throws IOException { return (Integer) TYPE.decode(in, align ? EncodingRules.ALIGNED_PACKED_ENCODING_RULES : EncodingRules.UNALIGNED_PACKED_ENCODING_RULES, CONV); } }
[ "31430762+zyjohn0822@users.noreply.github.com" ]
31430762+zyjohn0822@users.noreply.github.com
21f8327bba71e7515c6c31da44ddb55eaf9400ba
0048deca25c643d2090f69fac14f12ac054c313f
/src/main/java/kr/or/ddit/frMyEndProject/dao/FrMyEndProjectDaoImpl.java
8cd75a2a34dd03ce1eaa70f2a1e118086588a246
[]
no_license
dh37789/project_002
1a73d711eadc0071db4806bdbd20c1c5777eef96
65a95a53c54cec3eea34fd49bb22e34fca333d42
refs/heads/master
2020-05-02T03:03:05.253238
2019-03-26T05:34:31
2019-03-26T05:34:31
177,718,405
0
0
null
null
null
null
UTF-8
Java
false
false
1,114
java
package kr.or.ddit.frMyEndProject.dao; import java.util.HashMap; import java.util.List; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; import com.ibatis.sqlmap.client.SqlMapClient; import kr.or.ddit.vo.ProjectVO; @Repository("frMyEndProjectDao") public class FrMyEndProjectDaoImpl implements FrMyEndProjectDao{ @Autowired private SqlMapClient client; @Override public List<HashMap<String, Object>> endProjectList(Map<String, String> params) throws Exception { return client.queryForList("project.endProjectList", params); } @Override public ProjectVO endProjectView(Map<String, String> params) throws Exception { return (ProjectVO) client.queryForObject("project.endProjectView", params); } @Override public int endCount(Map<String, String> params) throws Exception { return (int) client.queryForObject("project.endCount", params); } @Override public int frEndPayment(Map<String, String> params) throws Exception { return (int) client.queryForObject("project.frEndPayment", params); } }
[ "dhaudgkr@gmail.com" ]
dhaudgkr@gmail.com
6c1ec211bfc6551b06fd9e13005e3151ce5ebbe1
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-13193-1-7-NSGA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/extension/job/plan/internal/DefaultExtensionPlan_ESTest.java
d23e1b8cf8fc912e3bea8d52622a551150f7ed04
[]
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
584
java
/* * This file was automatically generated by EvoSuite * Fri Apr 03 03:40:55 UTC 2020 */ package org.xwiki.extension.job.plan.internal; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class DefaultExtensionPlan_ESTest extends DefaultExtensionPlan_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
da7a39058fd3f07b7fb4071d040e6390b12ad5e4
bf7b4c21300a8ccebb380e0e0a031982466ccd83
/middlewareConcepts2014-master/Assignment3/lib/jacorb-3.4/test/regression/src/test/java/org/jacorb/test/notification/queue/RWLockEventQueueDecoratorTest.java
6b62ee222abe2afe5ff4a7aa34d72684a757f535
[]
no_license
Puriakshat/Tuberlin
3fe36b970aabad30ed95e8a07c2f875e4912a3db
28dcf7f7edfe7320c740c306b1c0593a6c1b3115
refs/heads/master
2021-01-19T07:30:16.857479
2014-11-06T18:49:16
2014-11-06T18:49:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,975
java
/* * JacORB - a free Java ORB * * Copyright (C) 1999-2012 Gerald Brose / The JacORB Team. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ package org.jacorb.test.notification.queue; import org.easymock.MockControl; import org.jacorb.notification.interfaces.Message; import org.jacorb.notification.queue.MessageQueueAdapter; import org.jacorb.notification.queue.RWLockEventQueueDecorator; import org.junit.Before; import org.junit.Test; public class RWLockEventQueueDecoratorTest { private RWLockEventQueueDecorator objectUnderTest_; private MockControl controlInitialQueue_; private MessageQueueAdapter mockInitialQueue_; private MockControl controlReplacementQueue_; private MessageQueueAdapter mockReplacementQueue_; @Before public void setUp() throws Exception { controlInitialQueue_ = MockControl.createControl(MessageQueueAdapter.class); mockInitialQueue_ = (MessageQueueAdapter) controlInitialQueue_.getMock(); objectUnderTest_ = new RWLockEventQueueDecorator(mockInitialQueue_); controlReplacementQueue_ = MockControl.createControl(MessageQueueAdapter.class); mockReplacementQueue_ = (MessageQueueAdapter) controlReplacementQueue_.getMock(); } @Test public void testReplaceEmpty() throws Exception { mockInitialQueue_.hasPendingMessages(); controlInitialQueue_.setReturnValue(false); controlInitialQueue_.replay(); controlReplacementQueue_.replay(); objectUnderTest_.replaceDelegate(mockReplacementQueue_); } @Test public void testReplaceNonEmpty() throws Exception { final MockControl controlMessage = MockControl.createControl(Message.class); final Message mockMessage = (Message) controlMessage.getMock(); final Message[] mesgs = new Message[] { mockMessage }; mockInitialQueue_.hasPendingMessages(); controlInitialQueue_.setReturnValue(true); mockInitialQueue_.getAllMessages(); controlInitialQueue_.setReturnValue(mesgs); controlInitialQueue_.replay(); mockReplacementQueue_.enqeue(mockMessage); controlReplacementQueue_.replay(); objectUnderTest_.replaceDelegate(mockReplacementQueue_); } }
[ "puri.akshat@gmail.com" ]
puri.akshat@gmail.com
f77b96acd7d44aa7b8d5b6c60f49cad482809ca0
5ecd15baa833422572480fad3946e0e16a389000
/framework/MCS-Open/subsystems/generator/main/api/java/com/volantis/mcs/build/themes/ThemeTarget.java
d784e5e1739935c3d60e64600f287e5685fc13f6
[]
no_license
jabley/volmobserverce
4c5db36ef72c3bb7ef20fb81855e18e9b53823b9
6d760f27ac5917533eca6708f389ed9347c7016d
refs/heads/master
2021-01-01T05:31:21.902535
2009-02-04T02:29:06
2009-02-04T02:29:06
38,675,289
0
1
null
null
null
null
UTF-8
Java
false
false
4,012
java
/* This file is part of Volantis Mobility Server. Volantis Mobility Server 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. Volantis Mobility Server 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 Volantis Mobility Server.  If not, see <http://www.gnu.org/licenses/>. */ /* ---------------------------------------------------------------------------- * $Header: /src/voyager/com/volantis/mcs/build/themes/ThemeTarget.java,v 1.4 2002/09/10 09:37:17 mat Exp $ * ---------------------------------------------------------------------------- * (c) Volantis Systems Ltd 2002. * ---------------------------------------------------------------------------- * Change History: * * Date Who Description * --------- --------------- ----------------------------------------------- * 27-Apr-02 Doug VBM:2002040803 - Created. * 02-May-02 Doug VBM:2002040803 - Added code to process the * naturalName property. * 06-May-02 Doug VBM:2002040803 - Ensured database tables are * prefixed with VM. * 28-Aug-02 Mat VBM:2002040825 - Tables should not now be * prefixed with VM as the prefix is allocated at * runtime. * ---------------------------------------------------------------------------- */ package com.volantis.mcs.build.themes; import com.volantis.mcs.build.*; import com.volantis.mcs.build.parser.*; import java.util.List; import org.jdom.ProcessingInstruction; /** * Instances of this class handle processing instructions with a target of * "imdapi". */ public class ThemeTarget implements ProcessingInstructionTarget { // Javadoc inherited from super class. public void handleProcessingInstruction (SchemaParser parser, String target, String data) { ProcessingInstruction pi = new ProcessingInstruction (target, data); SchemaObject object = parser.getCurrentObject (); if (object instanceof ThemeElementInfo) { ThemeElementInfo info = (ThemeElementInfo) object; info.setStylePropertyElement(true); info.setNaturalName(getRequiredValue(pi, "naturalName")); info.setEnumerationName(pi.getValue("enumeration")); info.setVersions(pi); } } /** * Retrieve a named value from the ProcessingInstruction object. If it does * not exist throw an Exception. * @param pi the ProcessingInstruction object. * @param name the name that identifies the value to retrieve. * @return the value. */ protected String getRequiredValue(ProcessingInstruction pi, String name) { String value = pi.getValue(name); if(value == null) { throw new IllegalStateException("Style Value Processing instruction " + "must provide a \"" + name + "\" attribute"); } return value; } } /* * Local variables: * c-basic-offset: 2 * End: */ /* =========================================================================== Change History =========================================================================== $Log$ 16-Sep-05 9512/1 pduffin VBM:2005091408 Fixed up some issues with theme generator and added support for border-collapse and caption-side 08-Dec-04 6416/3 ianw VBM:2004120703 New Build 08-Dec-04 6416/1 ianw VBM:2004120703 New Build 19-Nov-04 5733/2 geoff VBM:2004093001 Support OMA WCSS subset of CSS2 =========================================================================== */
[ "iwilloug@b642a0b7-b348-0410-9912-e4a34d632523" ]
iwilloug@b642a0b7-b348-0410-9912-e4a34d632523
9d581b778e4210e0524263705145c92d4353b590
3d4349c88a96505992277c56311e73243130c290
/Preparation/processed-dataset/data-class_4_262/34.java
e53c7046a0b7803e580a8283e3ec9ee5404385da
[]
no_license
D-a-r-e-k/Code-Smells-Detection
5270233badf3fb8c2d6034ac4d780e9ce7a8276e
079a02e5037d909114613aedceba1d5dea81c65d
refs/heads/master
2020-05-20T00:03:08.191102
2019-05-15T11:51:51
2019-05-15T11:51:51
185,272,690
7
4
null
null
null
null
UTF-8
Java
false
false
603
java
//}}} //{{{ removeBufferChangeListener() method /** * @deprecated Call {@link JEditBuffer#removeBufferListener(BufferListener)}. */ @Deprecated public void removeBufferChangeListener(BufferChangeListener listener) { BufferListener[] listeners = getBufferListeners(); for (int i = 0; i < listeners.length; i++) { BufferListener l = listeners[i]; if (l instanceof BufferChangeListener.Adapter) { if (((BufferChangeListener.Adapter) l).getDelegate() == listener) { removeBufferListener(l); return; } } } }
[ "dariusb@unifysquare.com" ]
dariusb@unifysquare.com
c16746153003a7fcd5a162bbc4bee8c1154412d7
a52b1d91a5a2984591df9b2f03b1014c263ee8ab
/net/minecraft/client/renderer/entity/layers/LayerArrow.java
e04c7a602e67f23945d8599a8d6dfdd3a0cc833f
[]
no_license
MelonsYum/leap-client
5c200d0b39e0ca1f2071f9264f913f9e6977d4b4
c6611d4b9600311e1eb10f87a949419e34749373
refs/heads/main
2023-08-04T17:40:13.797831
2021-09-17T00:18:38
2021-09-17T00:18:38
411,085,054
3
3
null
2021-09-28T00:33:06
2021-09-28T00:33:05
null
UTF-8
Java
false
false
3,727
java
/* */ package net.minecraft.client.renderer.entity.layers; /* */ /* */ import java.util.Random; /* */ import net.minecraft.client.model.ModelBox; /* */ import net.minecraft.client.model.ModelRenderer; /* */ import net.minecraft.client.renderer.GlStateManager; /* */ import net.minecraft.client.renderer.RenderHelper; /* */ import net.minecraft.client.renderer.entity.RendererLivingEntity; /* */ import net.minecraft.entity.Entity; /* */ import net.minecraft.entity.EntityLivingBase; /* */ import net.minecraft.entity.projectile.EntityArrow; /* */ import net.minecraft.util.MathHelper; /* */ /* */ public class LayerArrow /* */ implements LayerRenderer { /* */ private final RendererLivingEntity field_177168_a; /* */ private static final String __OBFID = "CL_00002426"; /* */ /* */ public LayerArrow(RendererLivingEntity p_i46124_1_) { /* 20 */ this.field_177168_a = p_i46124_1_; /* */ } /* */ /* */ /* */ public void doRenderLayer(EntityLivingBase p_177141_1_, float p_177141_2_, float p_177141_3_, float p_177141_4_, float p_177141_5_, float p_177141_6_, float p_177141_7_, float p_177141_8_) { /* 25 */ int var9 = p_177141_1_.getArrowCountInEntity(); /* */ /* 27 */ if (var9 > 0) { /* */ /* 29 */ EntityArrow var10 = new EntityArrow(p_177141_1_.worldObj, p_177141_1_.posX, p_177141_1_.posY, p_177141_1_.posZ); /* 30 */ Random var11 = new Random(p_177141_1_.getEntityId()); /* 31 */ RenderHelper.disableStandardItemLighting(); /* */ /* 33 */ for (int var12 = 0; var12 < var9; var12++) { /* */ /* 35 */ GlStateManager.pushMatrix(); /* 36 */ ModelRenderer var13 = this.field_177168_a.getMainModel().getRandomModelBox(var11); /* 37 */ ModelBox var14 = var13.cubeList.get(var11.nextInt(var13.cubeList.size())); /* 38 */ var13.postRender(0.0625F); /* 39 */ float var15 = var11.nextFloat(); /* 40 */ float var16 = var11.nextFloat(); /* 41 */ float var17 = var11.nextFloat(); /* 42 */ float var18 = (var14.posX1 + (var14.posX2 - var14.posX1) * var15) / 16.0F; /* 43 */ float var19 = (var14.posY1 + (var14.posY2 - var14.posY1) * var16) / 16.0F; /* 44 */ float var20 = (var14.posZ1 + (var14.posZ2 - var14.posZ1) * var17) / 16.0F; /* 45 */ GlStateManager.translate(var18, var19, var20); /* 46 */ var15 = var15 * 2.0F - 1.0F; /* 47 */ var16 = var16 * 2.0F - 1.0F; /* 48 */ var17 = var17 * 2.0F - 1.0F; /* 49 */ var15 *= -1.0F; /* 50 */ var16 *= -1.0F; /* 51 */ var17 *= -1.0F; /* 52 */ float var21 = MathHelper.sqrt_float(var15 * var15 + var17 * var17); /* 53 */ var10.prevRotationYaw = var10.rotationYaw = (float)(Math.atan2(var15, var17) * 180.0D / Math.PI); /* 54 */ var10.prevRotationPitch = var10.rotationPitch = (float)(Math.atan2(var16, var21) * 180.0D / Math.PI); /* 55 */ double var22 = 0.0D; /* 56 */ double var24 = 0.0D; /* 57 */ double var26 = 0.0D; /* 58 */ this.field_177168_a.func_177068_d().renderEntityWithPosYaw((Entity)var10, var22, var24, var26, 0.0F, p_177141_4_); /* 59 */ GlStateManager.popMatrix(); /* */ } /* */ /* 62 */ RenderHelper.enableStandardItemLighting(); /* */ } /* */ } /* */ /* */ /* */ public boolean shouldCombineTextures() { /* 68 */ return false; /* */ } /* */ } /* Location: C:\Users\wyatt\Downloads\Leap-Client.jar!\net\minecraft\client\renderer\entity\layers\LayerArrow.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */
[ "90357372+danny-125@users.noreply.github.com" ]
90357372+danny-125@users.noreply.github.com
adf19f1659181aa363a2bfada4faba251655e257
433c9727ce54a03faca8b87b3e79561e9be6df00
/app/src/main/java/com/zhkj/sfb/common/CommonBean.java
bce6f355928dd0f6ba32ab30ae9baa3a62fb9dc9
[]
no_license
TasteBlood/SFB-APP
a17be7b53e95cf4355e82231ae3033b81253787c
b6438038693750cac1a86d73e3fb20145d12c380
refs/heads/master
2021-09-23T20:18:44.904542
2018-09-27T10:33:03
2018-09-27T10:33:03
118,541,766
0
0
null
null
null
null
UTF-8
Java
false
false
435
java
package com.zhkj.sfb.common; /** * Created by Administrator on 2016/9/21. */ public class CommonBean { private Object info; private Integer status; public Object getInfo() { return info; } public void setInfo(Object info) { this.info = info; } public Integer getStatus() { return status; } public void setStatus(Integer status) { this.status = status; } }
[ "xxw0701@sina.com" ]
xxw0701@sina.com
70599ac5da2fab58d0dbf5834db99e118de7292c
75d9386780c96c2730376bcbe89b31f2bc514e56
/Selenium/src/day6/DropDownEg2.java
ed02786628da35554df468c7b0ae83766284482f
[]
no_license
shaath/Surendra_Jawed
47c0f40a07b097a3c5efc9fdbda263f7aef9a9c9
70353d50e7bd00d8d1cb38a1c69c05321762623f
refs/heads/master
2021-01-01T04:31:45.877214
2017-07-14T03:24:42
2017-07-14T03:24:42
97,188,271
0
0
null
null
null
null
UTF-8
Java
false
false
866
java
package day6; import java.util.List; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.support.ui.Select; public class DropDownEg2 { public static void main(String[] args) { WebDriver driver=new FirefoxDriver(); driver.get("http://www.khuranatravel.com/"); driver.manage().window().maximize(); driver.findElement(By.xpath(".//*[@id='outerWrapper']/div[2]/div[5]/div/a")).click(); WebElement f=driver.findElement(By.id("fromCity")); Select fDrop=new Select(f); List<WebElement> flist=fDrop.getOptions(); System.out.println(flist.size()); for (int i = 0; i < flist.size(); i++) { fDrop.selectByIndex(i); String fCity=flist.get(i).getText(); System.out.println(i+"----"+fCity); } } }
[ "you@example.com" ]
you@example.com
c61baadbb8e7ef398c1c20d9f60fc10e4bb41aae
5e0c911526d1fceb7accf9b509861c9ad5c6f317
/services/coordinator/src/main/java/com/dremio/service/coordinator/DremioAssumeRoleCredentialsProviderV1.java
5cfebefa95064814ec6c484591031978386ba25f
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
brandonmcclure/dremio-oss
ef62d34dc43f597779d81f2dc81cce0bf96dc67f
82e1ecff69d66cad33547bb9128f3d9b531e7026
refs/heads/master
2023-06-13T04:19:56.608897
2021-06-12T00:42:03
2021-06-12T00:42:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,309
java
/* * Copyright (C) 2017-2019 Dremio Corporation * * 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.dremio.service.coordinator; import javax.inject.Provider; import com.amazonaws.auth.AWSCredentials; import com.amazonaws.auth.AWSCredentialsProvider; import com.amazonaws.auth.AWSSessionCredentials; import com.dremio.common.AutoCloseables; import com.dremio.common.utils.AssumeRoleCredentialsProvider; import software.amazon.awssdk.auth.credentials.AwsSessionCredentials; /** * Gives an aws sdk v1 compatible version. */ public class DremioAssumeRoleCredentialsProviderV1 implements AWSCredentialsProvider,AutoCloseable { private static Provider<AssumeRoleCredentialsProvider> credentialsProvider; public static void setAssumeRoleProvider(Provider<AssumeRoleCredentialsProvider> credentialsProvider) { DremioAssumeRoleCredentialsProviderV1.credentialsProvider = credentialsProvider; } @Override public AWSCredentials getCredentials() { // wrap the v2 session credentials to a v1 // TODO : this might cause class loader issues with glue // need to resolve with data source roles. final AwsSessionCredentials awsCredentials = (AwsSessionCredentials) credentialsProvider.get().resolveCredentials(); return new AWSSessionCredentials() { @Override public String getSessionToken() { return awsCredentials.sessionToken(); } @Override public String getAWSAccessKeyId() { return awsCredentials.accessKeyId(); } @Override public String getAWSSecretKey() { return awsCredentials.secretAccessKey(); } }; } @Override public void close() throws Exception { AutoCloseables.close(credentialsProvider.get()); } @Override public void refresh() { } }
[ "yongyan@dremio.com" ]
yongyan@dremio.com
caf04d4e59ee651278c55b5bd9b3a3ab14c0cfa9
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/36/org/apache/commons/math/random/ISAACRandom_next_139.java
764a4bf799a4f6a36fc9a2a8e463fe245396eaec
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
771
java
org apach common math random href http burtleburtl net bob rand isaacafa html isaac fast cryptograph pseudo random number gener isaac indirect shift accumul add count gener bit random number isaac design cryptograph secur inspir rc4 cycl guarante valu valu averag result uniformli distribut unbias unpredict seed code base minor improv origin implement algorithm bob jenkin version isaac random isaacrandom bit stream gener bitsstreamgener serializ inherit doc inheritdoc overrid bit count isaac count size rsl count bit
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
39a89f482c7cd760668c79545b286a82e52ca9aa
5e6abc6bca67514b4889137d1517ecdefcf9683a
/Server/src/main/java/plugin/interaction/item/withobject/SapCollectPlugin.java
8bf5c59b3ce921fd311ba27831ad3cc6e81d8030
[]
no_license
dginovker/RS-2009-317
88e6d773d6fd6814b28bdb469f6855616c71fc26
9d285c186656ace48c2c67cc9e4fb4aeb84411a4
refs/heads/master
2022-12-22T18:47:47.487468
2019-09-20T21:24:34
2019-09-20T21:24:34
208,949,111
2
2
null
2022-12-15T23:55:43
2019-09-17T03:15:17
Java
UTF-8
Java
false
false
3,231
java
package plugin.interaction.item.withobject; import org.gielinor.cache.def.impl.ItemDefinition; import org.gielinor.game.interaction.NodeUsageEvent; import org.gielinor.game.interaction.OptionHandler; import org.gielinor.game.interaction.UseWithHandler; import org.gielinor.game.node.Node; import org.gielinor.game.node.entity.player.Player; import org.gielinor.game.node.item.Item; import org.gielinor.game.world.update.flag.context.Animation; import org.gielinor.rs2.plugin.Plugin; /** * Represents the plugin used to collect sap. * @author 'Vexia * @version 1.0 */ public final class SapCollectPlugin extends UseWithHandler { /** * Represents the bucket of sap item. */ private static final Item BUCKET_OF_SAP = new Item(4687); /** * Represents the bucket item. */ private static final Item BUCKET = new Item(1925); /** * Represents the animation to use. */ private static final Animation ANIMATION = new Animation(2009); /** * Represents the tree ids. */ private static final int[] IDS = new int[]{ 1276, 1277, 1278, 1279, 1280, 1315, 1316, 1318, 1319, 1330, 1331, 1332, 3033, 3034, 3035, 3036, 3879, 3881, 3882, 3883, 10041, 14308, 14309, 30132, 30133, 37477, 37478, 37652 }; /** * Constructs a new {@code SapCollectPlugin} {@code Object}. */ public SapCollectPlugin() { super(946); } @Override public Plugin<Object> newInstance(Object arg) throws Throwable { for (int i : IDS) { addHandler(i, OBJECT_TYPE, this); } new SapEmptyPlugin().newInstance(arg); return this; } @Override public boolean handle(NodeUsageEvent event) { final Player player = event.getPlayer(); if (!player.getInventory().remove(BUCKET)) { player.getActionSender().sendMessage("I need an empty bucket to collect the sap."); return true; } player.animate(ANIMATION); player.getInventory().remove(BUCKET); player.getInventory().add(BUCKET_OF_SAP); player.getActionSender().sendMessage("You cut the tree and allow its sap to drip down into your bucket."); return true; } /** * Represents the plugin used to empty a bucket of sap. * @author 'Vexia * @version 1.0 */ public static final class SapEmptyPlugin extends OptionHandler { @Override public Plugin<Object> newInstance(Object arg) throws Throwable { ItemDefinition.forId(4687).getConfigurations().put("option:empty", this); return this; } @Override public boolean handle(Player player, Node node, String option) { Item item = (Item) node; if (item.getSlot() < 0) { return false; } player.getInventory().replace(BUCKET, item.getSlot()); player.getActionSender().sendMessage("You empty the contents of the bucket on the floor."); return true; } @Override public boolean isWalk() { return false; } } }
[ "dcress01@uoguelph.ca" ]
dcress01@uoguelph.ca
516aef44ac4f1145b1e02c095358f1d5414201ac
535b101c4fc4bcf4e6e0d22da4758ca69442837e
/src/main/java/com/e1858/wuye/pojo/DataTable.java
ae063d29e80aa137802cc681b904ebd059ba0455
[]
no_license
majiajia1989/JiaYe
ed5fa101a7837cebf8472e49ca59bec750ab3031
00a6f6fb3ed0387e75e05b0c6db414761839fa28
refs/heads/master
2021-03-12T20:37:30.785818
2014-05-15T06:27:31
2014-05-15T06:27:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,011
java
package com.e1858.wuye.pojo; import java.util.ArrayList; import java.util.List; public class DataTable<T> { private String sEcho; private long iTotalDisplayRecords; private long iTotalRecords; private List<T> aaData = new ArrayList<T>(); public String getsEcho() { return sEcho; } public void setsEcho(String sEcho) { this.sEcho = sEcho; } public long getiTotalDisplayRecords() { return iTotalDisplayRecords; } public void setiTotalDisplayRecords(long iTotalDisplayRecords) { this.iTotalDisplayRecords = iTotalDisplayRecords; } public long getiTotalRecords() { return iTotalRecords; } public void setiTotalRecords(long iTotalRecords) { this.iTotalRecords = iTotalRecords; } public List<T> getAaData() { return aaData; } public void setAaData(List<T> aaData) { this.aaData = aaData; } public class RowCnt { private long rowCnt=0; public long getRowCnt() { return rowCnt; } public void setRowCnt(long rowCnt) { this.rowCnt = rowCnt; } } }
[ "734432230@qq.com" ]
734432230@qq.com
a2054618018837d4979cd0cbe28903559084e00b
11201bc32f4b8d479cd5f7d5fd4859085207068f
/src/reviewpackage/MethodDecideOrReject.java
7ae3c10a297a2f6dd94c5d08245c050bfb22866b
[]
no_license
Bir-Eda/My-Java-Projects
842337614591955410a2730b355d55754e8fa804
eefe94288b94884b9cd813a2c712e2269bf4df14
refs/heads/master
2023-03-15T17:52:04.595827
2021-03-08T03:41:58
2021-03-08T03:41:58
258,254,372
0
0
null
null
null
null
UTF-8
Java
false
false
689
java
package reviewpackage; public class MethodDecideOrReject { public static void main(String[] args) { decideOrAcceptReject("Why All Schools are Holiday?"); } public static void decideOrAcceptReject(String sentence){ int num=0; for(int i=0; i<sentence.length(); i++) { if (sentence.charAt(i) >= 65 && sentence.charAt(i) <= 90) { num++; } } System.out.println(num); if(num>4){ System.out.println("Ok"); } else{ System.out.println("Sorry"); } } }
[ "60522150+Bir-Eda@users.noreply.github.com" ]
60522150+Bir-Eda@users.noreply.github.com
25960eef70ba3c7d7aaebe9fb2d5e255fbc59904
ab2678c3d33411507d639ff0b8fefb8c9a6c9316
/jgralab/src/de/uni_koblenz/jgralab/greql2/parser/SimpleToken.java
b6e7aa57deb95385788252eb33e100331b9d402d
[]
no_license
dmosen/wiki-analysis
b58c731fa2d66e78fe9b71699bcfb228f4ab889e
e9c8d1a1242acfcb683aa01bfacd8680e1331f4f
refs/heads/master
2021-01-13T01:15:10.625520
2013-10-28T13:27:16
2013-10-28T13:27:16
8,741,553
2
0
null
null
null
null
UTF-8
Java
false
false
1,763
java
/* * JGraLab - The Java Graph Laboratory * * Copyright (C) 2006-2011 Institute for Software Technology * University of Koblenz-Landau, Germany * ist@uni-koblenz.de * * For bug reports, documentation and further information, visit * * http://jgralab.uni-koblenz.de * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, see <http://www.gnu.org/licenses>. * * Additional permission under GNU GPL version 3 section 7 * * If you modify this Program, or any covered work, by linking or combining * it with Eclipse (or a modified version of that program or an Eclipse * plugin), containing parts covered by the terms of the Eclipse Public * License (EPL), the licensors of this Program grant you additional * permission to convey the resulting work. Corresponding Source for a * non-source form of such a combination shall include the source code for * the parts of JGraLab used as well as that of the covered work. */ package de.uni_koblenz.jgralab.greql2.parser; public class SimpleToken extends Token { public SimpleToken(TokenTypes type, int position, int length) { super(type, position, length); } }
[ "dmosen@uni-koblenz.de" ]
dmosen@uni-koblenz.de
3cd039691b04ae36972a39419778d1a255acd6bc
071ff2e7cc2e098568c703153b6cc15cdbb05c14
/api/cas-server-core-api-cookie/src/main/java/org/apereo/cas/web/cookie/CasCookieBuilder.java
9cdf0d20b2026757d1ba3ec1dc0d6a0c485f3af4
[ "Apache-2.0", "LicenseRef-scancode-free-unknown", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
restmad/cas
7a569e39df70e6766e1112b2a884e636587fc604
ef86873eb27e12acd1ed37399e4ee1aae941e9bf
refs/heads/master
2020-04-15T09:53:25.124088
2019-04-15T15:10:46
2019-04-15T15:10:46
164,570,430
0
0
Apache-2.0
2019-04-15T15:10:47
2019-01-08T05:36:40
Java
UTF-8
Java
false
false
1,905
java
package org.apereo.cas.web.cookie; import org.apereo.cas.authentication.RememberMeCredential; import org.springframework.webflow.execution.RequestContext; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * This is {@link CasCookieBuilder}. * * @author Misagh Moayyed * @since 6.1.0 */ public interface CasCookieBuilder { /** * Adds the cookie, taking into account {@link RememberMeCredential#REQUEST_PARAMETER_REMEMBER_ME} * in the request. * * @param requestContext the request context * @param cookieValue the cookie value */ void addCookie(RequestContext requestContext, String cookieValue); /** * Add cookie. * * @param request the request * @param response the response * @param cookieValue the cookie value */ void addCookie(HttpServletRequest request, HttpServletResponse response, String cookieValue); /** * Add cookie. * * @param response the response * @param cookieValue the cookie value */ void addCookie(HttpServletResponse response, String cookieValue); /** * Retrieve cookie value. * * @param request the request * @return the cookie value */ String retrieveCookieValue(HttpServletRequest request); /** * Remove cookie. * * @param response the response */ void removeCookie(HttpServletResponse response); /** * Gets cookie path. * * @return the cookie path */ String getCookiePath(); /** * Sets cookie path. * * @param path the path */ void setCookiePath(String path); /** * Gets cookie domain. * * @return the cookie domain */ String getCookieDomain(); /** * Get cookie name. * * @return the string */ String getCookieName(); }
[ "mmoayyed@unicon.net" ]
mmoayyed@unicon.net
0d2ad01bc3d133dfc071816e1b31edb92d8dd059
92225460ebca1bb6a594d77b6559b3629b7a94fa
/src/com/kingdee/eas/fdc/finance/app/ContractPayPlanNewController.java
77240681b3fee5c73a3e2977d66bdaf570c92947
[]
no_license
yangfan0725/sd
45182d34575381be3bbdd55f3f68854a6900a362
39ebad6e2eb76286d551a9e21967f3f5dc4880da
refs/heads/master
2023-04-29T01:56:43.770005
2023-04-24T05:41:13
2023-04-24T05:41:13
512,073,641
0
1
null
null
null
null
UTF-8
Java
false
false
4,387
java
package com.kingdee.eas.fdc.finance.app; import com.kingdee.bos.BOSException; //import com.kingdee.bos.metadata.*; import com.kingdee.bos.framework.*; import com.kingdee.bos.util.*; import com.kingdee.bos.Context; import java.lang.String; import com.kingdee.eas.common.EASBizException; import com.kingdee.bos.metadata.entity.EntityViewInfo; import com.kingdee.bos.dao.IObjectPK; import com.kingdee.bos.metadata.entity.SelectorItemCollection; import com.kingdee.eas.framework.CoreBaseCollection; import com.kingdee.bos.metadata.entity.SorterItemCollection; import com.kingdee.bos.util.*; import com.kingdee.bos.metadata.entity.FilterInfo; import com.kingdee.eas.fdc.finance.ContractPayPlanNewCollection; import com.kingdee.bos.BOSException; import com.kingdee.bos.Context; import com.kingdee.eas.fdc.finance.ContractPayPlanNewInfo; import com.kingdee.eas.framework.CoreBaseInfo; import com.kingdee.bos.framework.*; import com.kingdee.bos.util.BOSUuid; import com.kingdee.eas.framework.app.BillBaseController; import java.rmi.RemoteException; import com.kingdee.bos.framework.ejb.BizController; public interface ContractPayPlanNewController extends BillBaseController { public boolean exists(Context ctx, IObjectPK pk) throws BOSException, EASBizException, RemoteException; public boolean exists(Context ctx, FilterInfo filter) throws BOSException, EASBizException, RemoteException; public boolean exists(Context ctx, String oql) throws BOSException, EASBizException, RemoteException; public ContractPayPlanNewInfo getContractPayPlanNewInfo(Context ctx, IObjectPK pk) throws BOSException, EASBizException, RemoteException; public ContractPayPlanNewInfo getContractPayPlanNewInfo(Context ctx, IObjectPK pk, SelectorItemCollection selector) throws BOSException, EASBizException, RemoteException; public ContractPayPlanNewInfo getContractPayPlanNewInfo(Context ctx, String oql) throws BOSException, EASBizException, RemoteException; public IObjectPK addnew(Context ctx, ContractPayPlanNewInfo model) throws BOSException, EASBizException, RemoteException; public void addnew(Context ctx, IObjectPK pk, ContractPayPlanNewInfo model) throws BOSException, EASBizException, RemoteException; public void update(Context ctx, IObjectPK pk, ContractPayPlanNewInfo model) throws BOSException, EASBizException, RemoteException; public void updatePartial(Context ctx, ContractPayPlanNewInfo model, SelectorItemCollection selector) throws BOSException, EASBizException, RemoteException; public void updateBigObject(Context ctx, IObjectPK pk, ContractPayPlanNewInfo model) throws BOSException, RemoteException; public void delete(Context ctx, IObjectPK pk) throws BOSException, EASBizException, RemoteException; public IObjectPK[] getPKList(Context ctx) throws BOSException, EASBizException, RemoteException; public IObjectPK[] getPKList(Context ctx, String oql) throws BOSException, EASBizException, RemoteException; public IObjectPK[] getPKList(Context ctx, FilterInfo filter, SorterItemCollection sorter) throws BOSException, EASBizException, RemoteException; public ContractPayPlanNewCollection getContractPayPlanNewCollection(Context ctx) throws BOSException, RemoteException; public ContractPayPlanNewCollection getContractPayPlanNewCollection(Context ctx, EntityViewInfo view) throws BOSException, RemoteException; public ContractPayPlanNewCollection getContractPayPlanNewCollection(Context ctx, String oql) throws BOSException, RemoteException; public IObjectPK[] delete(Context ctx, FilterInfo filter) throws BOSException, EASBizException, RemoteException; public IObjectPK[] delete(Context ctx, String oql) throws BOSException, EASBizException, RemoteException; public void delete(Context ctx, IObjectPK[] arrayPK) throws BOSException, EASBizException, RemoteException; public String approveSucc(Context ctx, ContractPayPlanNewInfo model) throws BOSException, RemoteException; public boolean submitBill(Context ctx, ContractPayPlanNewInfo model) throws BOSException, RemoteException; public boolean auditBill(Context ctx, ContractPayPlanNewInfo model) throws BOSException, RemoteException; public boolean unauditBill(Context ctx, ContractPayPlanNewInfo model) throws BOSException, RemoteException; public boolean isFinal(Context ctx, BOSUuid bosId) throws BOSException, RemoteException; }
[ "yfsmile@qq.com" ]
yfsmile@qq.com
8993857a7b54136e8af212c213591656308d452e
967ceeb47d218c332caba343018011ebe5fab475
/WEB-INF/retail_scm_core_src/com/skynet/retailscm/truckdriver/TruckDriverTable.java
ea45b734a6be5257602675decdf8b88af01a8be8
[ "Apache-2.0" ]
permissive
flair2005/retail-scm-integrated
bf14139a03083db9c4156a11c78a6f36f36b2e0b
eacb3bb4acd2e8ee353bf80e8ff636f09f803658
refs/heads/master
2021-06-23T08:02:37.521318
2017-08-10T17:18:50
2017-08-10T17:18:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,107
java
package com.skynet.retailscm.truckdriver; import com.skynet.retailscm.AccessKey; public class TruckDriverTable{ public static AccessKey withId(Object value){ AccessKey accessKey = new AccessKey(); accessKey.setColumnName(COLUMN_ID); accessKey.setValue(value); return accessKey; } //Add extra identifiers //only this package can use this, so the scope is default, not public, not private either nor protected static final String TABLE_NAME="truck_driver_data"; static final String COLUMN_ID = "id"; static final String COLUMN_NAME = "name"; static final String COLUMN_DRIVER_LICENSE_NUMBER = "driver_license_number"; static final String COLUMN_CONTACT_NUMBER = "contact_number"; static final String COLUMN_BELONGS_TO = "belongs_to"; static final String COLUMN_VERSION = "version"; static final String []ALL_CLOUMNS = {COLUMN_ID, COLUMN_NAME, COLUMN_DRIVER_LICENSE_NUMBER, COLUMN_CONTACT_NUMBER, COLUMN_BELONGS_TO, COLUMN_VERSION}; static final String []NORMAL_CLOUMNS = { COLUMN_NAME, COLUMN_DRIVER_LICENSE_NUMBER, COLUMN_CONTACT_NUMBER, COLUMN_BELONGS_TO }; }
[ "philip_chang@163.com" ]
philip_chang@163.com
7a8fd1cfd9b7e380be59793350195b2a516a0d43
78f7fd54a94c334ec56f27451688858662e1495e
/partyanalyst-service/trunk/src/test/java/com/itgrids/partyanalyst/dao/hibernate/CadreLanguageEfficiencyDAOHibernateTest.java
3b40c7fc1ec05418512b2696679ec0d763401c7b
[]
no_license
hymanath/PA
2e8f2ef9e1d3ed99df496761a7b72ec50d25e7ef
d166bf434601f0fbe45af02064c94954f6326fd7
refs/heads/master
2021-09-12T09:06:37.814523
2018-04-13T20:13:59
2018-04-13T20:13:59
129,496,146
1
0
null
null
null
null
UTF-8
Java
false
false
2,482
java
package com.itgrids.partyanalyst.dao.hibernate; import java.util.List; import org.appfuse.dao.BaseDaoTestCase; import com.itgrids.partyanalyst.dao.ICadreLanguageEfficiencyDAO; import com.itgrids.partyanalyst.model.CadreLanguageEfficiency; import com.itgrids.partyanalyst.utils.IConstants; public class CadreLanguageEfficiencyDAOHibernateTest extends BaseDaoTestCase { ICadreLanguageEfficiencyDAO cadreLanguageEfficiencyDAO; public ICadreLanguageEfficiencyDAO getCadreLanguageEfficiencyDAO() { return cadreLanguageEfficiencyDAO; } public void setCadreLanguageEfficiencyDAO( ICadreLanguageEfficiencyDAO cadreLanguageEfficiencyDAO) { this.cadreLanguageEfficiencyDAO = cadreLanguageEfficiencyDAO; } public void testFindByCadreId() { List<CadreLanguageEfficiency> result=cadreLanguageEfficiencyDAO.findByCadreId(10L); for(CadreLanguageEfficiency cadreLanguageEfficiency: result){ System.out.print("id:"+ cadreLanguageEfficiency.getCadreLanguageEfficiencyId()+"\t"); System.out.print("Cadre Id"+cadreLanguageEfficiency.getCadre().getCadreId()+"\t"); System.out.print("language Id:"+cadreLanguageEfficiency.getLanguage().getLanguageId()+"\t"); System.out.print("speak"+cadreLanguageEfficiency.getIsAbleToSpeak()+"\t"); System.out.print("read"+cadreLanguageEfficiency.getIsAbleToRead()+"\t"); System.out.println("write"+cadreLanguageEfficiency.getIsAbleToWrite()+"\t"); } } public void testFindByCadreIdandLanguage() { List<CadreLanguageEfficiency> result=cadreLanguageEfficiencyDAO.findByCadreIdandLanguage(2l, IConstants.LANGUAGE_ENGLISH); System.out.println(result.size()); for(CadreLanguageEfficiency cadreLanguageEfficiency: result){ System.out.print("id:"+ cadreLanguageEfficiency.getCadreLanguageEfficiencyId()+"\t"); System.out.print("Cadre Id"+cadreLanguageEfficiency.getCadre().getCadreId()+"\t"); System.out.print("language Id:"+cadreLanguageEfficiency.getLanguage().getLanguageId()+"\t"); System.out.print("speak"+cadreLanguageEfficiency.getIsAbleToSpeak()+"\t"); System.out.print("read"+cadreLanguageEfficiency.getIsAbleToRead()+"\t"); System.out.println("write"+cadreLanguageEfficiency.getIsAbleToWrite()+"\t"); } } public void testDeleteSkillsByCadreId() { int result=cadreLanguageEfficiencyDAO.deleteLanguageDetailsByCadre(5l, 1l); System.out.println("No of records deleted:"+result); setComplete(); } }
[ "itgrids@b17b186f-d863-de11-8533-00e0815b4126" ]
itgrids@b17b186f-d863-de11-8533-00e0815b4126
e31f98531bc5246b5f47600969249f66cce09bc6
92cbd2c7a3826e40f9ffac7b54b0eec6316bea52
/portal3/src/main/java/com/costrella/sp/security/AuthoritiesConstants.java
a285e6b36999bc58483f407f738e87d97a809e5f
[]
no_license
costrella/hackathon2017
5478927e6bb061a23efb9ef86650db080773ce23
053ae4545ac90c00be585fe7aa64725c436143f2
refs/heads/master
2021-07-20T09:28:14.236510
2017-10-29T13:28:00
2017-10-29T13:28:00
108,632,337
0
1
null
null
null
null
UTF-8
Java
false
false
346
java
package com.costrella.sp.security; /** * Constants for Spring Security authorities. */ public final class AuthoritiesConstants { public static final String ADMIN = "ROLE_ADMIN"; public static final String USER = "ROLE_USER"; public static final String ANONYMOUS = "ROLE_ANONYMOUS"; private AuthoritiesConstants() { } }
[ "misiek.mk@gmail.com" ]
misiek.mk@gmail.com
71232e48c7658ecf7a50d34ff8fc9145e1ec4b90
6be0aeb751f6e5893a4af029206dfa0e9a2b2c8e
/ClavaAst/src/pt/up/fe/specs/clava/ast/expr/OverloadExpr.java
e032db1e7e14ee9b43ea46491f05d4325cd42fd8
[ "Apache-2.0" ]
permissive
TheNunoGomes/clava
15188cdeebad25f105d066f06ed7429da55c3205
4a25a5fbd4bcd740c1fbe3d8b6e271c65ae311ae
refs/heads/master
2023-03-22T12:23:22.335685
2021-03-08T17:48:01
2021-03-08T17:48:01
295,422,617
1
0
Apache-2.0
2020-12-14T19:14:45
2020-09-14T13:20:31
Mercury
UTF-8
Java
false
false
3,974
java
/** * Copyright 2017 SPeCS. * * 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. under the License. */ package pt.up.fe.specs.clava.ast.expr; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Optional; import java.util.stream.Collectors; import org.suikasoft.jOptions.Datakey.DataKey; import org.suikasoft.jOptions.Datakey.KeyFactory; import org.suikasoft.jOptions.Interfaces.DataStore; import pt.up.fe.specs.clava.ClavaNode; import pt.up.fe.specs.clava.ast.decl.Decl; import pt.up.fe.specs.clava.language.CXXOperator; import pt.up.fe.specs.clava.utils.Nameable; /** * A reference to an overloaded function set, either an UnresolvedLookupExpr or an UnresolvedMemberExpr. * * @author JoaoBispo * */ public abstract class OverloadExpr extends Expr implements Nameable { /// DATAKEYS BEGIN /** * The nested-name qualifier that precedes the name, or empty string if it has none. */ public final static DataKey<String> QUALIFIER = KeyFactory.string("qualifier"); /** * The looked up name. */ public final static DataKey<String> NAME = KeyFactory.string("name"); /** * The declarations in the unresolved set. */ public final static DataKey<List<Decl>> UNRESOLVED_DECLS = KeyFactory .generic("unresolvedDecls", (List<Decl>) new ArrayList<Decl>()); public final static DataKey<List<String>> TEMPLATE_ARGUMENTS = KeyFactory .generic("templateArguments", (List<String>) new ArrayList<String>()) .setDefault(() -> new ArrayList<>()); /// DATAKEYS END // private final String qualifier; public OverloadExpr(DataStore data, Collection<? extends ClavaNode> children) { super(data, children); // this.qualifier = null; } // public OverloadExpr(String qualifier, ExprData exprData, ClavaNodeInfo info, // Collection<? extends ClavaNode> children) { // super(new LegacyToDataStore().setExpr(exprData).setNodeInfo(info).getData(), children); // // if (qualifier != null && !qualifier.isEmpty()) { // set(QUALIFIER, qualifier); // } // // // super(exprData, info, children); // // // this.qualifier = qualifier; // } public Optional<String> getQualifier() { String qualifier = get(QUALIFIER); return qualifier.isEmpty() ? Optional.empty() : Optional.of(qualifier); // return hasValue(QUALIFIER) ? Optional.of(get(QUALIFIER)) : Optional.empty(); // return Optional.ofNullable(qualifier); } @Override public String getName() { return get(NAME); } @Override public void setName(String name) { set(NAME, name); } @Override public String getCode() { StringBuilder code = new StringBuilder(); // Append qualifier, if present getQualifier().ifPresent(code::append); // Case operator Optional<CXXOperator> operator = CXXOperator.parseTry(get(NAME)); if (operator.isPresent()) { code.append(operator.get().getString()); // return code.toString(); } else { code.append(get(NAME)); } // code.append(get(NAME)); List<String> templateArgs = get(TEMPLATE_ARGUMENTS); if (!templateArgs.isEmpty()) { code.append(templateArgs.stream().collect(Collectors.joining(", ", "<", ">"))); } return code.toString(); } }
[ "joaobispo@gmail.com" ]
joaobispo@gmail.com
9f0db7583a6f35803021dfa8c05836de5483d1bc
437993373001070be4ba440d21b854fd0c529e86
/jdk1.7-source-analysis/src/com/sun/corba/se/PortableActivationIDL/_ServerProxyStub.java
85d5d8271f6ee4fad10841e8f2181ac52780c81b
[]
no_license
robbinGithub/jdk1.7-source-analysis
4d18f22522a7250dd9aae22eb9f3c23125eae057
4f2a9afef13f2d89582ff604b936806c96a50370
refs/heads/master
2021-09-03T23:51:00.156164
2018-01-13T00:30:00
2018-01-13T00:30:00
117,300,798
0
0
null
null
null
null
UTF-8
Java
false
false
3,840
java
package com.sun.corba.se.PortableActivationIDL; /** * com/sun/corba/se/PortableActivationIDL/_ServerProxyStub.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from ../../../../src/share/classes/com/sun/corba/se/PortableActivationIDL/activation.idl * Friday, June 21, 2013 12:58:50 PM PDT */ /** Server callback interface, passed to Activator in registerServer method. */ public class _ServerProxyStub extends org.omg.CORBA.portable.ObjectImpl implements com.sun.corba.se.PortableActivationIDL.ServerProxy { /** Shutdown this server. Returns after orb.shutdown() completes. */ public void shutdown () { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("shutdown", true); $in = _invoke ($out); return; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { shutdown ( ); } finally { _releaseReply ($in); } } // shutdown /** Install the server. Returns after the install hook completes * execution in the server. */ public void install () { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("install", true); $in = _invoke ($out); return; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { install ( ); } finally { _releaseReply ($in); } } // install /** Uninstall the server. Returns after the uninstall hook * completes execution. */ public void uninstall () { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("uninstall", true); $in = _invoke ($out); return; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { uninstall ( ); } finally { _releaseReply ($in); } } // uninstall // Type-specific CORBA::Object operations private static String[] __ids = { "IDL:PortableActivationIDL/ServerProxy:1.0"}; public String[] _ids () { return (String[])__ids.clone (); } private void readObject (java.io.ObjectInputStream s) throws java.io.IOException { String str = s.readUTF (); String[] args = null; java.util.Properties props = null; org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str); org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate (); _set_delegate (delegate); } private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException { String[] args = null; java.util.Properties props = null; String str = org.omg.CORBA.ORB.init (args, props).object_to_string (this); s.writeUTF (str); } } // class _ServerProxyStub
[ "robbin2117@163.com" ]
robbin2117@163.com
778643058f30008f2ba33af207d8c7ff1783a7f7
c5b931b9cbfa3dbbfe519ff46da8a00bf6710494
/src/main/java/com/github/alexthe666/iceandfire/client/render/entity/layer/LayerTrollEyes.java
1d73957342a11f1d0a5fff38fa175ce342a0f310
[]
no_license
ETStareak/Ice_and_Fire
4df690c161036188f25a39711759fa03f9543958
31dcce21f06763fee7e33683a631f0a133f67130
refs/heads/1.8.4-1.12.2
2023-03-17T01:05:31.176702
2022-02-21T17:34:49
2022-02-21T17:34:49
260,837,962
1
0
null
2020-05-15T16:25:56
2020-05-03T05:54:48
Java
UTF-8
Java
false
false
2,022
java
package com.github.alexthe666.iceandfire.client.render.entity.layer; import com.github.alexthe666.iceandfire.client.render.entity.RenderTroll; import com.github.alexthe666.iceandfire.entity.EntityGorgon; import com.github.alexthe666.iceandfire.entity.EntityTroll; import com.github.alexthe666.iceandfire.entity.StoneEntityProperties; import net.ilexiconn.llibrary.server.entity.EntityPropertiesHandler; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.entity.layers.LayerRenderer; public class LayerTrollEyes implements LayerRenderer<EntityTroll> { private RenderTroll renderer; public LayerTrollEyes(RenderTroll renderer) { this.renderer = renderer; } @Override public void doRenderLayer(EntityTroll troll, float f, float f1, float f6, float f2, float f3, float f4, float f5) { StoneEntityProperties properties = EntityPropertiesHandler.INSTANCE.getProperties(troll, StoneEntityProperties.class); if (!EntityGorgon.isStoneMob(troll)) { this.renderer.bindTexture(troll.getType().TEXTURE_EYES); GlStateManager.enableBlend(); GlStateManager.blendFunc(GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ONE); GlStateManager.disableLighting(); GlStateManager.depthFunc(514); OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240.0F, 0.0F); GlStateManager.enableLighting(); Minecraft.getMinecraft().entityRenderer.setupFogColor(true); this.renderer.getMainModel().render(troll, f, f1, f2, f3, f4, f5); Minecraft.getMinecraft().entityRenderer.setupFogColor(false); this.renderer.setLightmap(troll); GlStateManager.disableBlend(); GlStateManager.depthFunc(515); } } @Override public boolean shouldCombineTextures() { return true; } }
[ "alex.rowlands@cox.net" ]
alex.rowlands@cox.net
4e95951538df3239e31baaa44a3ec67c59561faa
9a064f03b5d437ffbacf74ac3018626fbd1b1b0b
/src/main/java/com/learn/java/leetcode/lc0300/Solution.java
e2a39f2d9dccd5f5e124c089e4a34b7b425a83f0
[ "Apache-2.0" ]
permissive
philippzhang/leetcodeLearnJava
c2437785010b7bcf50d62eeab33853a744fa1e40
ce39776b8278ce614f23f61faf28ca22bfa525e7
refs/heads/master
2022-12-21T21:43:46.677833
2021-07-12T08:13:37
2021-07-12T08:13:37
183,338,794
2
0
Apache-2.0
2022-12-16T03:55:00
2019-04-25T02:12:20
Java
UTF-8
Java
false
false
1,933
java
package com.learn.java.leetcode.lc0300; import java.util.ArrayList; import java.util.List; public class Solution { /** * 采用二分查找 O(nlogn) * @param nums * @return */ public int lengthOfLIS(int[] nums) { if(nums==null||nums.length==0){ return 0; } List<Integer> list = new ArrayList<>(); list.add(nums[0]); for(int i =1;i<nums.length;i++){ int length = list.size(); if(nums[i]>list.get(length-1)){ list.add(nums[i]); }else{ int pos = binarySearch(list,nums[i]); list.set(pos,nums[i]); } } return list.size(); } private int binarySearch(List<Integer> list,int target){ int index = -1; int begin = 0; int end = list.size()-1; while(index ==-1){ int mid = (begin+end)/2; int v= list.get(mid); if(target==v){ index = mid; }else if(target<v){ if(mid ==0||target>list.get(mid-1)){ index = mid; } end = mid -1; }else{ if(mid ==list.size()-1||target<list.get(mid+1)){ index = mid+1; } begin = mid +1; } } return index; } public int lengthOfLIS3(int[] nums) { if(nums==null||nums.length==0){ return 0; } List<Integer> list = new ArrayList<>(); list.add(nums[0]); for(int i =1;i<nums.length;i++){ int length = list.size(); if(nums[i]>list.get(length-1)){ list.add(nums[i]); }else{ for(int j =0;j<length;j++){ if(list.get(j)>=nums[i]){ list.set(j,nums[i]); break; } } } } return list.size(); } /** * 采用动态规划时间复杂度O(n*n) * @param nums * @return */ public int lengthOfLIS2(int[] nums) { if(nums==null||nums.length==0){ return 0; } int[] dp = new int[nums.length]; dp[0]=1; int result = 1; for(int i =1;i<dp.length;i++){ dp[i] = 1; for(int j =0;j<i;j++){ if(nums[j]<nums[i]&&dp[i]<dp[j]+1){ dp[i] = dp[j]+1; } } result = Math.max(result,dp[i]); } return result; } }
[ "yangshuo.zhang@tendcloud.com" ]
yangshuo.zhang@tendcloud.com
25fe7ffc2d10d0b6ede7d0400369570f34a3b631
4968c5642c5e5261b635d3f31e1890fba7277868
/fav/src/com/osource/base/service/impl/SequenceServiceImpl.java
9523b4191b5973e4eecf58cf684e12dacc3c58eb
[]
no_license
cllcsh/collectionplus
01116dc8594e0be6e5a10623e3db2ec9d103d2c2
4a62418d73745a9136d4163527d532e2d3e8b483
refs/heads/master
2016-08-11T16:16:24.556377
2016-04-21T07:51:03
2016-04-21T07:51:03
54,613,229
0
0
null
2016-03-24T14:39:53
2016-03-24T03:55:39
null
UTF-8
Java
false
false
1,344
java
/** * @author luoj * @create 2009-10-27 * @file SequenceServiceImpl.java * @since v0.1 * */ package com.osource.base.service.impl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Isolation; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import com.osource.base.dao.SequenceDao; import com.osource.core.IDCache; import com.osource.core.SequenceService; import com.osource.core.exception.IctException; import com.osource.orm.ibatis.BaseServiceImpl; /** * @author luoj * */ @Service("sequenceService") @Transactional public class SequenceServiceImpl extends BaseServiceImpl implements SequenceService { @Autowired private SequenceDao sequenceDao; public SequenceDao getSequenceDao() { return sequenceDao; } public void setSequenceDao(SequenceDao sequenceDao) { this.sequenceDao = sequenceDao; } /* (non-Javadoc) * @see com.osource.core.SequenceService#loadTableIds(java.lang.String) */ @Transactional(propagation=Propagation.REQUIRES_NEW,isolation=Isolation.SERIALIZABLE) public IDCache loadTableIds(String tableName) throws IctException { return sequenceDao.loadTableIds(tableName); } }
[ "cllc@cllc.me" ]
cllc@cllc.me
93be15353fe219a0f5e1ea5101322f0cddb2fe1f
5b48723314d5c6568f07de5644ee3e1ed1d0162c
/rpc-dubbo-004-sample-redis/rpc-dubbo-004-sample-redis-provider/src/main/java/com/github/bjlhx15/idgenerator/sample/dubbo/provider/TestController.java
6c5e4442702c423a3b27774c07fc5c613ece2cc2
[ "Apache-2.0" ]
permissive
bjlhx15/rpc-dubbo
29574fffec484072b7fb80af89f2236456fa3852
921e57d578b2af56614bd1794a802b75db73a033
refs/heads/master
2022-01-18T04:02:11.919031
2020-02-27T01:51:07
2020-02-27T01:51:07
243,190,240
0
1
Apache-2.0
2022-01-12T23:05:34
2020-02-26T06:56:22
Java
UTF-8
Java
false
false
515
java
package com.github.bjlhx15.idgenerator.sample.dubbo.provider; import com.github.bjlhx15.idgenerator.sample.dubbo.service.ITestService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; @RestController public class TestController { @Autowired private ITestService iTestService; @GetMapping("get") public String get() { return iTestService.get(); } }
[ "lihongxu6@jd.com" ]
lihongxu6@jd.com
d633c8d54c08883c10ba3410b3851db916c331a2
fc27243c870f11acb225caddf9504d329f2873e1
/src/interfaces/exercises/military_elite/implementations/SoldierImpl.java
af7c567285e3920c396666eaf8233549fb1260ce
[]
no_license
CordonaCodeCraft/softuni-java-oop
8daf0390fb325977da5f1587253e0e736d6f0368
11d5583c4b33fc99d136753143593ce9ea05c2c5
refs/heads/master
2023-03-27T22:49:15.703834
2021-04-01T14:20:35
2021-04-01T14:20:35
353,724,428
0
0
null
null
null
null
UTF-8
Java
false
false
1,324
java
package interfaces.exercises.military_elite.implementations; import interfaces.exercises.military_elite.interfaces.Soldier; import java.util.Objects; public class SoldierImpl implements Soldier, Comparable<SoldierImpl> { private final int id; private final String firstName; private final String lastName; public SoldierImpl(int id, String firstName, String lastName) { this.id = id; this.firstName = firstName; this.lastName = lastName; } @Override public int getId() { return this.id; } @Override public String getFirstName() { return this.firstName; } @Override public String getLastName() { return this.lastName; } @Override public boolean equals(Object other) { if (this == other) return true; if (other == null || getClass() != other.getClass()) return false; SoldierImpl soldier = (SoldierImpl) other; return id == soldier.id && firstName.equals(soldier.firstName) && lastName.equals(soldier.lastName); } @Override public int hashCode() { return Objects.hash(id, firstName, lastName); } @Override public int compareTo(SoldierImpl other) { return Integer.compare(this.id, other.id); } }
[ "67237998+VentsislavStoevski@users.noreply.github.com" ]
67237998+VentsislavStoevski@users.noreply.github.com
1ca8392084e3ab0b8aacb214e1f043377726022c
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a037/A037922Test.java
dfc3bec3b51fd2d1d1bdbb9271a43ba9d7fbb4f2
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package irvine.oeis.a037; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A037922Test extends AbstractSequenceTest { }
[ "sean.irvine@realtimegenomics.com" ]
sean.irvine@realtimegenomics.com
6cbc64a7b004d016bb3ebedd28d328827f16c63d
0d4edfbd462ed72da9d1e2ac4bfef63d40db2990
/app/src/main/java/com/dvc/mybilibili/mvp/model/api/service/bangumi/entity/BangumiVideo.java
975610a31e08824a81c249ee0c884a6ea68a4aa2
[]
no_license
dvc890/MyBilibili
1fc7e0a0d5917fb12a7efed8aebfd9030db7ff9f
0483e90e6fbf42905b8aff4cbccbaeb95c733712
refs/heads/master
2020-05-24T22:49:02.383357
2019-11-23T01:14:14
2019-11-23T01:14:14
187,502,297
31
3
null
null
null
null
UTF-8
Java
false
false
462
java
package com.dvc.mybilibili.mvp.model.api.service.bangumi.entity; import android.support.annotation.Keep; import com.alibaba.fastjson.annotation.JSONField; @Keep /* compiled from: BL */ public class BangumiVideo { public int aid; @JSONField(name = "pic") public String cover; @JSONField(name = "video_review") public String danmaku; @JSONField(name = "is_auto") public int isAuto; public String play; public String title; }
[ "dvc890@139.com" ]
dvc890@139.com
c51f182053b030f2fad612ad91d7de9b815b27ba
1ecae42ff90c437ce67b217b66856fee393e013f
/.JETEmitters/src/org/talend/designer/codegen/translators/databases/oracle/TOracleOutputBulkBeginJava.java
25ad38de84919cad5f0c91bfe718f8164d7ae304
[]
no_license
dariofabbri/etl
e66233c970ab95a191816afe8c2ef64a8819562a
cb700ac6375ad57e5b78b8ab82958e4a3f9a09a7
refs/heads/master
2021-01-19T07:41:08.260696
2013-02-09T11:57:12
2013-02-09T11:57:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,430
java
package org.talend.designer.codegen.translators.databases.oracle; import org.talend.core.model.process.INode; import org.talend.core.model.process.ElementParameterParser; import org.talend.core.model.metadata.IMetadataTable; import org.talend.designer.codegen.config.CodeGeneratorArgument; import java.util.List; public class TOracleOutputBulkBeginJava { protected static String nl; public static synchronized TOracleOutputBulkBeginJava create(String lineSeparator) { nl = lineSeparator; TOracleOutputBulkBeginJava result = new TOracleOutputBulkBeginJava(); nl = null; return result; } public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl; protected final String TEXT_1 = ""; protected final String TEXT_2 = NL + "\t\tString fileName_"; protected final String TEXT_3 = " = (new java.io.File("; protected final String TEXT_4 = ")).getAbsolutePath().replace(\"\\\\\",\"/\");"; protected final String TEXT_5 = NL + "\t\tString directory_"; protected final String TEXT_6 = " = null;" + NL + "\t\tif((fileName_"; protected final String TEXT_7 = ".indexOf(\"/\") != -1)) { " + NL + "\t\t directory_"; protected final String TEXT_8 = " = fileName_"; protected final String TEXT_9 = ".substring(0, fileName_"; protected final String TEXT_10 = ".lastIndexOf(\"/\")); " + NL + "\t\t} else {" + NL + "\t\t directory_"; protected final String TEXT_11 = " = \"\";" + NL + "\t\t}" + NL + "\t\t//create directory only if not exists" + NL + "\t\tif(directory_"; protected final String TEXT_12 = " != null && directory_"; protected final String TEXT_13 = ".trim().length() != 0) {" + NL + " \t\t\tjava.io.File dir_"; protected final String TEXT_14 = " = new java.io.File(directory_"; protected final String TEXT_15 = ");" + NL + "\t\t\tif(!dir_"; protected final String TEXT_16 = ".exists()) {" + NL + " \t\t\tdir_"; protected final String TEXT_17 = ".mkdirs();" + NL + "\t\t\t}" + NL + "\t\t}"; protected final String TEXT_18 = NL + "\t\tint nb_line_"; protected final String TEXT_19 = " = 0;" + NL + "\t\t" + NL + "\t\tfinal String OUT_DELIM_"; protected final String TEXT_20 = " = "; protected final String TEXT_21 = ";" + NL + "\t\t" + NL + "\t\tfinal String OUT_DELIM_ROWSEP_"; protected final String TEXT_22 = " = "; protected final String TEXT_23 = ";" + NL + "\t\t" + NL + "\t\tfinal String OUT_DELIM_ROWSEP_WITH_LOB_"; protected final String TEXT_24 = " = \"|\";"; protected final String TEXT_25 = "\t\t\t\t" + NL + "\t\tfinal String OUT_FIELDS_ENCLOSURE_LEFT_"; protected final String TEXT_26 = " = "; protected final String TEXT_27 = ";" + NL + "\t\t" + NL + "\t\tfinal String OUT_FIELDS_ENCLOSURE_RIGHT_"; protected final String TEXT_28 = " = "; protected final String TEXT_29 = ";"; protected final String TEXT_30 = "\t\t" + NL + "\t\tfinal java.io.BufferedWriter out"; protected final String TEXT_31 = " = new java.io.BufferedWriter(new java.io.OutputStreamWriter(" + NL + " \t\tnew java.io.FileOutputStream(fileName_"; protected final String TEXT_32 = ", "; protected final String TEXT_33 = "),"; protected final String TEXT_34 = "),"; protected final String TEXT_35 = ");"; protected final String TEXT_36 = NL; public String generate(Object argument) { final StringBuffer stringBuffer = new StringBuffer(); stringBuffer.append(TEXT_1); CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument; INode node = (INode)codeGenArgument.getArgument(); String cid = node.getUniqueName(); List<IMetadataTable> metadatas = node.getMetadataList(); if ((metadatas!=null)&&(metadatas.size()>0)) { IMetadataTable metadata = metadatas.get(0); if (metadata!=null) { String filename = ElementParameterParser.getValueWithUIFieldKey( node, "__FILENAME__", "FILENAME" ); String fieldSeparator = ElementParameterParser.getValueWithUIFieldKey( node, "__FIELDSEPARATOR__", "FIELDSEPARATOR" ); String rowSeparator = ElementParameterParser.getValueWithUIFieldKey( node, "__ROWSEPARATOR__", "ROWSEPARATOR" ); String encoding = ElementParameterParser.getValue( node, "__ENCODING__" ); boolean isAppend = ("true").equals(ElementParameterParser.getValue(node,"__APPEND__")); boolean useFieldsEnclosure = ("true").equals(ElementParameterParser.getValue(node,"__USE_FIELDS_ENCLOSURE__")); String fieldsEnclosureLift = ElementParameterParser.getValue(node,"__FIELDS_ENCLOSURE_LEFT__"); String fieldsEnclosureRight = ElementParameterParser.getValue(node,"__FIELDS_ENCLOSURE_RIGHT__"); String bufferSize = ElementParameterParser.getValue(node,"__BUFFER_SIZE__"); stringBuffer.append(TEXT_2); stringBuffer.append(cid); stringBuffer.append(TEXT_3); stringBuffer.append(filename ); stringBuffer.append(TEXT_4); if(("true").equals(ElementParameterParser.getValue(node,"__CREATE__"))){ stringBuffer.append(TEXT_5); stringBuffer.append(cid); stringBuffer.append(TEXT_6); stringBuffer.append(cid); stringBuffer.append(TEXT_7); stringBuffer.append(cid); stringBuffer.append(TEXT_8); stringBuffer.append(cid); stringBuffer.append(TEXT_9); stringBuffer.append(cid); stringBuffer.append(TEXT_10); stringBuffer.append(cid); stringBuffer.append(TEXT_11); stringBuffer.append(cid); stringBuffer.append(TEXT_12); stringBuffer.append(cid); stringBuffer.append(TEXT_13); stringBuffer.append(cid); stringBuffer.append(TEXT_14); stringBuffer.append(cid); stringBuffer.append(TEXT_15); stringBuffer.append(cid); stringBuffer.append(TEXT_16); stringBuffer.append(cid); stringBuffer.append(TEXT_17); } stringBuffer.append(TEXT_18); stringBuffer.append(cid); stringBuffer.append(TEXT_19); stringBuffer.append(cid ); stringBuffer.append(TEXT_20); stringBuffer.append(fieldSeparator ); stringBuffer.append(TEXT_21); stringBuffer.append(cid ); stringBuffer.append(TEXT_22); stringBuffer.append(rowSeparator); stringBuffer.append(TEXT_23); stringBuffer.append(cid ); stringBuffer.append(TEXT_24); if (useFieldsEnclosure) { stringBuffer.append(TEXT_25); stringBuffer.append(cid ); stringBuffer.append(TEXT_26); stringBuffer.append(fieldsEnclosureLift); stringBuffer.append(TEXT_27); stringBuffer.append(cid ); stringBuffer.append(TEXT_28); stringBuffer.append(fieldsEnclosureRight); stringBuffer.append(TEXT_29); } stringBuffer.append(TEXT_30); stringBuffer.append(cid ); stringBuffer.append(TEXT_31); stringBuffer.append(cid); stringBuffer.append(TEXT_32); stringBuffer.append( isAppend); stringBuffer.append(TEXT_33); stringBuffer.append( encoding); stringBuffer.append(TEXT_34); stringBuffer.append(bufferSize); stringBuffer.append(TEXT_35); } } stringBuffer.append(TEXT_36); return stringBuffer.toString(); } }
[ "danilo.brunamonti@gmail.com" ]
danilo.brunamonti@gmail.com
47aae4d210bcf4471ce2c933b3115b0f9d819b66
03ece1382cd835db0ff398d1087ecae135d285f3
/src/main/java/com/paro/Structural_Patterns/AdapterPattern/Type1/XpayToPayDAdapter.java
704b1748441658bc36f77005add3133b978ab027
[]
no_license
paro87/Java_Design_Patterns
57831b0171557739d3ec74b1d1111a3eedcfdc45
6f51b86d5302306ced3c9d6cf539641f8f4e43f8
refs/heads/master
2022-12-29T01:01:07.873008
2020-05-28T19:45:42
2020-05-28T19:45:42
267,679,893
0
0
null
2020-10-13T22:23:39
2020-05-28T19:37:06
Java
UTF-8
Java
false
false
1,720
java
package com.paro.Structural_Patterns.AdapterPattern.Type1; public class XpayToPayDAdapter implements PayD{ private String custCardNo; private String cardOwnerName; private String cardExpMonthDate; private Integer cVVNo; private Double totalAmount; private final Xpay xpay; public XpayToPayDAdapter(Xpay xpay){ this.xpay=xpay; setProp(); } @Override public String getCustCardNo() { return custCardNo; } @Override public String getCardOwnerName() { return cardOwnerName; } @Override public String getCardExpMonthDate() { return cardExpMonthDate; } @Override public Integer getCVVNo() { return cVVNo; } @Override public Double getTotalAmount() { return totalAmount; } @Override public void setCustCardNo(String custCardNo) { this.custCardNo = custCardNo; } @Override public void setCardOwnerName(String cardOwnerName) { this.cardOwnerName = cardOwnerName; } @Override public void setCardExpMonthDate(String cardExpMonthDate) { this.cardExpMonthDate = cardExpMonthDate; } @Override public void setCVVNo(Integer cVVNo) { this.cVVNo = cVVNo; } @Override public void setTotalAmount(Double totalAmount) { this.totalAmount = totalAmount; } private void setProp(){ setCardOwnerName(this.xpay.getCustomerName()); setCustCardNo(this.xpay.getCreditCardNo()); setCardExpMonthDate(this.xpay.getCardExpMonth()+"/"+this.xpay.getCardExpYear()); setCVVNo(this.xpay.getCardCVVNo().intValue()); setTotalAmount(this.xpay.getAmount()); } }
[ "pelvan657@yahoo.com" ]
pelvan657@yahoo.com
37847b80d6d2bb2f8f1fe58943a499e3c18efcc0
bc794d54ef1311d95d0c479962eb506180873375
/stocks/stock-core/src/main/java/com/teratech/stock/core/ifaces/base/UniteGestionManager.java
a65bd1e0f0791448c57724f44a3097fee48bd1ad
[]
no_license
Teratech2018/Teratech
d1abb0f71a797181630d581cf5600c50e40c9663
612f1baf9636034cfa5d33a91e44bbf3a3f0a0cb
refs/heads/master
2021-04-28T05:31:38.081955
2019-04-01T08:35:34
2019-04-01T08:35:34
122,177,253
0
0
null
null
null
null
UTF-8
Java
false
false
476
java
package com.teratech.stock.core.ifaces.base; import com.bekosoftware.genericmanagerlayer.core.ifaces.GenericManager; import com.teratech.stock.model.base.UniteGestion; /** * Interface etendue par les interfaces locale et remote du manager * @since Mon Feb 19 16:55:37 GMT+01:00 2018 * */ public interface UniteGestionManager extends GenericManager<UniteGestion, Long> { public final static String SERVICE_NAME = "UniteGestionManager"; }
[ "bekondo_dieu@yahoo.fr" ]
bekondo_dieu@yahoo.fr
0af7cd120ab3241b401e685c76a67121991ff2e4
d09894c10c3fc15f966f8e30aecb756b068cbe7f
/src/com/zzx/demo/Map/EntryDemo.java
d885894782a3f2a2fbbcd49ad801ef12166ec7f4
[]
no_license
Zhang-Zexi/demo1
2e3ff611fdbb47880c13e23fe88be0e03e2a72cd
b31e36974da54d19d9eb877773ac488ca9f28ce7
refs/heads/master
2020-04-12T14:03:49.397136
2019-12-20T07:15:11
2019-12-20T07:15:11
162,540,795
0
0
null
null
null
null
UTF-8
Java
false
false
414
java
package com.zzx.demo.Map; import java.util.HashMap; import java.util.Map; /** * @ClassName EntryDemo * @Description 最常见的遍历map方式 * @Author zhangzx * @Date 2018/12/21 18:00 * Version 1.0 **/ public class EntryDemo { Map<Integer, Integer> map = new HashMap<Integer, Integer>(); // for (MapDemo.Entry<Integer, Integer> entry : map.entrySet()) { // System.out.println(); // } }
[ "zhangzx@allinfinance.com" ]
zhangzx@allinfinance.com
0d11e4facde04a61eff04392399b74c7624fe24a
ea8013860ed0b905c64f449c8bce9e0c34a23f7b
/SystemUIGoogle/sources/com/android/wm/shell/splitscreen/SplitScreenController$ISplitScreenImpl$$ExternalSyntheticLambda3.java
c16037cb09f680d214ae0328ea2b8cf34f84179f
[]
no_license
TheScarastic/redfin_b5
5efe0dc0d40b09a1a102dfb98bcde09bac4956db
6d85efe92477576c4901cce62e1202e31c30cbd2
refs/heads/master
2023-08-13T22:05:30.321241
2021-09-28T12:33:20
2021-09-28T12:33:20
411,210,644
1
0
null
null
null
null
UTF-8
Java
false
false
1,056
java
package com.android.wm.shell.splitscreen; import android.app.PendingIntent; import android.content.Intent; import android.os.Bundle; import java.util.function.Consumer; /* loaded from: classes2.dex */ public final /* synthetic */ class SplitScreenController$ISplitScreenImpl$$ExternalSyntheticLambda3 implements Consumer { public final /* synthetic */ PendingIntent f$0; public final /* synthetic */ Intent f$1; public final /* synthetic */ int f$2; public final /* synthetic */ int f$3; public final /* synthetic */ Bundle f$4; public /* synthetic */ SplitScreenController$ISplitScreenImpl$$ExternalSyntheticLambda3(PendingIntent pendingIntent, Intent intent, int i, int i2, Bundle bundle) { this.f$0 = pendingIntent; this.f$1 = intent; this.f$2 = i; this.f$3 = i2; this.f$4 = bundle; } @Override // java.util.function.Consumer public final void accept(Object obj) { ((SplitScreenController) obj).startIntent(this.f$0, this.f$1, this.f$2, this.f$3, this.f$4); } }
[ "warabhishek@gmail.com" ]
warabhishek@gmail.com
2466ab795b7bed37d3358602eb5acce6336297d3
4fbaaa8d863c64b82cf3b66e5bfcc2109e0c19b6
/com/bccard/golf/action/event/GolfEvntKvpBridgeActn.java
d102c334e5befe8829076438238002bcc3c19fc7
[]
no_license
nexcra/wfwsample
6b1e542ca884274c1834672de61311a6766b343f
6f52426a13aae4e75a13a47f8597aa1f81d2b2a6
refs/heads/master
2020-05-23T14:31:10.027807
2012-05-09T05:59:00
2012-05-09T05:59:00
33,128,506
1
1
null
null
null
null
UHC
Java
false
false
3,681
java
/*************************************************************************************************** * 이 소스는 ㈜비씨카드 소유입니다. * 이 소스를 무단으로 도용하면 법에 따라 처벌을 받을 수 있습니다. * 클래스명 : GolfEvntKvpBridgeActn * 작성자 : (주)미디어포스 임은혜 * 내용 : KVP event bridge * 적용범위 : golf * 작성일자 : 2010-05-25 ************************** 수정이력 **************************************************************** * 일자 버전 작성자 변경사항 * ***************************************************************************************************/ package com.bccard.golf.action.event; import java.io.IOException; import java.util.Map; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.bccard.waf.common.BaseException; import com.bccard.waf.core.ActionResponse; import com.bccard.waf.core.RequestParser; import com.bccard.waf.core.WaContext; import com.bccard.golf.common.GolfActn; import com.bccard.golf.common.GolfException; import com.bccard.golf.common.BaseAction; import com.bccard.golf.common.loginAction.SessionUtil; import com.bccard.golf.dbtao.DbTaoDataSet; import com.bccard.golf.dbtao.DbTaoResult; import com.bccard.golf.dbtao.proc.event.GolfEvntGolfShowPopDaoProc; import com.bccard.golf.user.entity.UcusrinfoEntity; /****************************************************************************** * Golf * @author (주)미디어포스 * @version 1.0 ******************************************************************************/ public class GolfEvntKvpBridgeActn extends GolfActn{ public static final String TITLE = "KVP event bridge"; /*************************************************************************************** * 골프 사용자화면 * @param context WaContext 객체. * @param request HttpServletRequest 객체. * @param response HttpServletResponse 객체. * @return ActionResponse Action 처리후 화면에 디스플레이할 정보. ***************************************************************************************/ public ActionResponse execute( WaContext context, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException, BaseException { String subpage_key = "default"; // 00.레이아웃 URL 저장 String layout = super.getActionParam(context, "layout"); request.setAttribute("layout", layout); try { // 02.입력값 조회 RequestParser parser = context.getRequestParser(subpage_key, request, response); Map paramMap = BaseAction.getParamToMap(request); paramMap.put("title", TITLE); String idx = ""; String actKey = super.getActionKey(context); if(actKey.equals("GolfEvtKvpBridge1")){ idx = "1"; }else if(actKey.equals("GolfEvtKvpBridge2")){ idx = "2"; }else if(actKey.equals("GolfEvtKvpBridge3")){ idx = "3"; } //debug("idx : " + idx + " / actKey : " + actKey); paramMap.put("idx", idx); // 03.Proc 에 던질 값 세팅 (Proc에 dataSet 형태의 배열(?)로 request값 또는 조회값을 던진다.) DbTaoDataSet dataSet = new DbTaoDataSet(TITLE); request.setAttribute("paramMap", paramMap); //모든 파라미터값을 맵에 담아 반환한다. } catch(Throwable t) { debug(TITLE, t); //t.printStackTrace(); throw new GolfException(TITLE, t); } return super.getActionResponse(context, subpage_key); } }
[ "killme0y@gmail.com@1c71d765-022b-4f35-e49a-0c25170da86e" ]
killme0y@gmail.com@1c71d765-022b-4f35-e49a-0c25170da86e
c8c54ac1940edeccc1a19af28cd8020daf13da74
1c5fd654b46d3fb018032dc11aa17552b64b191c
/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/ClearCachesApplicationListener.java
71891e2683b8da5200a285f8be9d9047c786ad32
[ "Apache-2.0" ]
permissive
yangfancoming/spring-boot-build
6ce9b97b105e401a4016ae4b75964ef93beeb9f1
3d4b8cbb8fea3e68617490609a68ded8f034bc67
refs/heads/master
2023-01-07T11:10:28.181679
2021-06-21T11:46:46
2021-06-21T11:46:46
193,871,877
0
0
Apache-2.0
2022-12-27T14:52:46
2019-06-26T09:19:40
Java
UTF-8
Java
false
false
937
java
package org.springframework.boot; import java.lang.reflect.Method; import org.springframework.context.ApplicationListener; import org.springframework.context.event.ContextRefreshedEvent; import org.springframework.util.ReflectionUtils; /** * {@link ApplicationListener} to cleanup caches once the context is loaded. */ class ClearCachesApplicationListener implements ApplicationListener<ContextRefreshedEvent> { @Override public void onApplicationEvent(ContextRefreshedEvent event) { ReflectionUtils.clearCache(); clearClassLoaderCaches(Thread.currentThread().getContextClassLoader()); } private void clearClassLoaderCaches(ClassLoader classLoader) { if (classLoader == null) return; try { Method clearCacheMethod = classLoader.getClass().getDeclaredMethod("clearCache"); clearCacheMethod.invoke(classLoader); }catch (Exception ex) { // Ignore } clearClassLoaderCaches(classLoader.getParent()); } }
[ "34465021+jwfl724168@users.noreply.github.com" ]
34465021+jwfl724168@users.noreply.github.com
fc4903b24414de147511cb2c17cf795edf07f61b
079232cc8952af38105cbae03a12f027d9314e10
/faichuis-mbg/src/main/java/com/faichuis/faichuismall/mapper/CmsSubjectCommentMapper.java
649cf49bfbfbbb7aa923c6e2610450af22ea3ee2
[]
no_license
Faichuis/faichuis_play
8b64f730c1f40e663b2866861de9dd132ff6d4e0
90684eba68388ca3ddd336d4b8b8ee7fc38405ad
refs/heads/master
2023-07-03T07:47:09.351916
2021-08-09T13:51:26
2021-08-09T13:51:26
381,465,503
0
0
null
null
null
null
UTF-8
Java
false
false
1,034
java
package com.faichuis.faichuismall.mapper; import com.faichuis.faichuismall.model.CmsSubjectComment; import com.faichuis.faichuismall.model.CmsSubjectCommentExample; import java.util.List; import org.apache.ibatis.annotations.Param; public interface CmsSubjectCommentMapper { long countByExample(CmsSubjectCommentExample example); int deleteByExample(CmsSubjectCommentExample example); int deleteByPrimaryKey(Long id); int insert(CmsSubjectComment record); int insertSelective(CmsSubjectComment record); List<CmsSubjectComment> selectByExample(CmsSubjectCommentExample example); CmsSubjectComment selectByPrimaryKey(Long id); int updateByExampleSelective(@Param("record") CmsSubjectComment record, @Param("example") CmsSubjectCommentExample example); int updateByExample(@Param("record") CmsSubjectComment record, @Param("example") CmsSubjectCommentExample example); int updateByPrimaryKeySelective(CmsSubjectComment record); int updateByPrimaryKey(CmsSubjectComment record); }
[ "465766401@qq.com" ]
465766401@qq.com
8a08fcd80e7582ffa197a0c2d9731a9bf25eeb43
0575519d38b04c3aaac0294e957e8bb709ba71f3
/BaseContructor/app/src/main/java/com/iblogstreet/basecontructor/utils/MultiDownloaderUtils.java
b35727ef2ee4efd73bc7fa9ff1ac00205d579e18
[]
no_license
sayhellotogithub/MyAndroid
36ff07a936bec245bc93f039e8c76e61a20200da
5767b3fbf9c848b06588f859d1d60f79c6f49619
refs/heads/master
2021-01-10T04:02:47.190375
2016-03-23T16:51:40
2016-03-23T16:51:40
54,399,699
0
0
null
null
null
null
UTF-8
Java
false
false
7,771
java
package com.iblogstreet.basecontructor.utils; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; import java.io.FileReader; import java.io.FileWriter; import java.io.InputStream; import java.io.RandomAccessFile; import java.net.HttpURLConnection; import java.net.URL; /** * Created by Administrator on 2016/3/17. * 多线程下载原理 *多线程下载就是将同一个网络上的原始文件根据线程个数分成均等份,然后每个单独的线程下载对应 的一部分,然后再将下载好的文件按照原始文件的顺序“拼接”起来就构成了完整的文件了。这样就大大 提高了文件的下载效率。 多线程下载大致可分为以下几个步骤: 一、获取服务器上的目标文件的大小 显然这一步是需要先访问一下网络,只需要获取到目标文件的总大小即可。目的是为了计算每个线程 应该分配的下载任务。 二、计算每个线程下载的起始位置和结束位置 我们可以把原始文件当成一个字节数组,每个线程只下载该“数组”的指定起始位置和指定结束位置 之间的部分。在第一步中我们已经知道了“数组”的总长度。因此只要再知道总共开启的线程的个数就好 计算每个线程要下载的范围了。 每个线程需要下载的字节个数(blockSize)=总字节数(totalSize)/线程数(threadCount)。 假设给线程按照 0,1,2,3...n 的方式依次进行编号,那么第 n 个线程下载文件的范围为: 起始脚标 startIndex=n*blockSize。 结束脚标 endIndex=(n-1)*blockSize-1。 考虑到 totalSize/threadCount 不一定能整除,因此对已最后一个线程应该特殊处理,最后一个线程的起 始脚标计算公式不变,但是结束脚标 endIndex=totalSize-1;即可。 三、在本地创建一个跟原始文件同样大小的文件 在本地可以通过 RandomAccessFile 创建一个跟目标文件同样大小的文件,该 api 支持文件任意位置的 读写操作。这样就给多线程下载提供了方便,每个线程只需在指定起始和结束脚标范围内写数据即可。 四、开启多个子线程开始下载 五、记录下载进度 为每一个单独的线程创建一个临时文件,用于记录该线程下载的进度。对于单独的一个线程,每下载 一部分数据就在本地文件中记录下当前下载的字节数。这样子如果下载任务异常终止了,那么下次重新开 始下载时就可以接着上次的进度下载。 六、删除临时文件 当多个线程都下载完成之后,最后一个下载完的线程将所有的临时文件删除。 */ public class MultiDownloaderUtils { private String sourcePath; private int threadCount; private String targetPath; //未完成任务的线程 private int threadRunning; public MultiDownloaderUtils(String sourcePath, int threadCount, String targetPath) { this.sourcePath = sourcePath; this.threadCount = threadCount; this.targetPath = targetPath; } public void download(){ try { URL url=new URL(sourcePath); HttpURLConnection connection= (HttpURLConnection) url.openConnection(); connection.setRequestMethod("GET"); connection.setConnectTimeout(ConstantUtils.CONNECT_TIMEOUT); connection.setReadTimeout(ConstantUtils.READ_TIMEOUT); connection.connect(); int responseCode=connection.getResponseCode(); if(responseCode==200){ int totalSize=connection.getContentLength(); //计算每个线程下载的平均字节数 int avgSize=totalSize/threadCount; for(int i=0;i<threadCount;i++){ final int startIndex=i*avgSize; int endIndex=0; if(i==threadCount-1){ endIndex=totalSize-1; } else { endIndex=(i+1)*avgSize-1; } threadRunning++; //开启子线程,实现下载 new MyDownloadThread(i,startIndex,endIndex,targetPath,sourcePath).start(); } } } catch (java.io.IOException e) { e.printStackTrace(); } } class MyDownloadThread extends Thread{ private int id; private int startIndex; private int endIndex; private String targetPath; private String sourcePath; public MyDownloadThread(int id,int startIndex,int endIndex,String targetPath,String sourcePath){ this.id=id; this.startIndex=startIndex; this.endIndex=endIndex; this.sourcePath=sourcePath; this.targetPath=targetPath; } public void run(){ try { URL url=new URL(sourcePath); HttpURLConnection connection= (HttpURLConnection) url.openConnection(); connection.setRequestMethod("GET"); File file=new File("d://"+id+".tmp"); //该属性设置后,返回的状态码就不再是200,而是206 int currentIndex=-1; if(file.exists()){ BufferedReader reader=new BufferedReader(new FileReader(file)); String readLine=reader.readLine(); currentIndex=Integer.valueOf(readLine); reader.close(); }else{ currentIndex=startIndex; } //只有设置了该属性才能下载指定范围的文件 connection.setRequestProperty("Range","bytes="+currentIndex+"-"+endIndex); connection.setConnectTimeout(ConstantUtils.CONNECT_TIMEOUT); connection.setReadTimeout(ConstantUtils.READ_TIMEOUT); connection.connect(); int responseCode=connection.getResponseCode(); if(responseCode==206){ InputStream inputStream=connection.getInputStream(); //支持随机读写的文件类 RandomAccessFile raf=new RandomAccessFile(targetPath,"rws"); raf.seek(currentIndex); byte[] buffer=new byte[1024*16]; int len=-1; int totalDownloaded=0; while((len=inputStream.read(buffer))!=-1){ raf.write(buffer,0,len); totalDownloaded+=len; //写进度 BufferedWriter writer=new BufferedWriter(new FileWriter(file)); writer.write(currentIndex+totalDownloaded+""); writer.close(); System.out.println(id+"下载了:"+totalDownloaded+","+(totalDownloaded+currentIndex-startIndex)*100/(endIndex-startIndex)+"%"); } raf.close(); inputStream.close(); connection.disconnect(); threadRunning--; if(threadRunning==0){ for(int i=0;i<threadCount;i++){ File tmpFile=new File("d://"+i+".tmp"); tmpFile.delete(); } } } else{ System.out.println("返回的状态码为:"+responseCode+" 下载失败!"); } } catch (java.io.IOException e) { e.printStackTrace(); } } } }
[ "wang.jun16@163.com" ]
wang.jun16@163.com
c9d7621b78c2763b4b361028cf413328f984c425
6f149d706b9d5ec0287dad020983553a2dcfd749
/src/main/java/com/stars/modules/hotUpdate/event/HotUpdateDeleteItemEvent.java
5150a824f7af28a0de441305035fbbdc111efe60
[]
no_license
guihuoliuying/stars
baaa49d1a167ff2cefc28b85d87da5d5cb06dfa7
a83ccd5726db8d01e7e3d6e9b6dd1f3a87212a6b
refs/heads/master
2022-12-23T04:45:08.906978
2019-05-25T08:36:53
2019-05-25T08:36:53
180,155,705
4
5
null
2022-12-16T04:49:10
2019-04-08T13:31:50
Java
UTF-8
Java
false
false
859
java
package com.stars.modules.hotUpdate.event; import com.stars.core.event.Event; import com.stars.modules.hotUpdate.HotUpdateConstant; import java.util.Map; /** * Created by wuyuxing on 2017/1/4. */ public class HotUpdateDeleteItemEvent extends Event { private Map<Integer,Integer> awardMap; private String logSignal = HotUpdateConstant.DELETE_LOG_SIGNAL; public HotUpdateDeleteItemEvent(Map<Integer, Integer> awardMap) { this.awardMap = awardMap; } public Map<Integer, Integer> getAwardMap() { return awardMap; } public void setAwardMap(Map<Integer, Integer> awardMap) { this.awardMap = awardMap; } public String getLogSignal() { return logSignal; } public void setLogSignal(String logSignal) { this.logSignal = logSignal; } }
[ "zhaowenshuo@zhaowenshuos-Mac-mini.local" ]
zhaowenshuo@zhaowenshuos-Mac-mini.local
69c6dc35f9eb558d2141c0b83d7f7d9688b75e09
2d17b8bb715ea5a658c798a0cf735f444d3cae57
/src/main/java/slimeknights/tconstruct/world/client/SlimeColorReloadListener.java
ad3c296d5babef77988b69888752fe422e85ca52
[ "MIT" ]
permissive
koh-gh/TinkersConstruct
ac077e30fcfe160dea19e1add3f5ec3346385d09
58104e74a4130169fb9695f9e0ec424f182344a7
refs/heads/1.16
2023-04-01T23:52:28.222223
2022-03-18T01:50:44
2022-03-18T01:50:44
132,241,625
0
0
MIT
2022-02-03T13:35:44
2018-05-05T11:25:09
Java
UTF-8
Java
false
false
1,519
java
package slimeknights.tconstruct.world.client; import net.minecraft.client.resources.ColorMapLoader; import net.minecraft.client.resources.ReloadListener; import net.minecraft.profiler.IProfiler; import net.minecraft.resources.IResourceManager; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.ModLoader; import slimeknights.tconstruct.TConstruct; import slimeknights.tconstruct.shared.block.SlimeType; import java.io.IOException; /** * Color reload listener for all slime foliage types */ public class SlimeColorReloadListener extends ReloadListener<int[]> { private final SlimeType color; private final ResourceLocation path; public SlimeColorReloadListener(SlimeType color) { this.color = color; this.path = TConstruct.getResource("textures/colormap/" + color.getString() + "_grass_color.png"); } /** * Performs any reloading that can be done off-thread, such as file IO */ @Override protected int[] prepare(IResourceManager resourceManager, IProfiler profiler) { if (!ModLoader.isLoadingStateValid()) { return new int[0]; } try { return ColorMapLoader.loadColors(resourceManager, path); } catch (IOException ioexception) { TConstruct.LOG.error("Failed to load slime colors", ioexception); return new int[0]; } } @Override protected void apply(int[] buffer, IResourceManager resourceManager, IProfiler profiler) { if (buffer.length != 0) { SlimeColorizer.setGrassColor(color, buffer); } } }
[ "knightminer4@gmail.com" ]
knightminer4@gmail.com
a488f913949cd2f07dd83c20ab206e6cfe9873a5
e1d87c5ae5e3b625c2155a4b43f9243edfabfa36
/yingjinglvyou/src/main/java/com/basulvyou/system/ui/activity/SendCarpoolingActivity.java
32e3f2912986fefa04c12ea85c737bd73de21de7
[]
no_license
MrZJ/bangelvyou
22a2ba37903b18efb1efb921a39f3153d39f3b3c
d5f9e9e3bd819009be88d6c18c3309b4577bcf21
refs/heads/main
2023-01-10T03:46:21.469892
2020-11-17T07:24:56
2020-11-17T07:24:56
307,940,686
0
0
null
null
null
null
UTF-8
Java
false
false
2,105
java
package com.basulvyou.system.ui.activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.ImageView; import android.widget.Toast; import com.basulvyou.system.R; /** * 发起拼车界面 */ public class SendCarpoolingActivity extends BaseActivity implements View.OnClickListener{ private View owner,passenger; private ImageView close; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_send_carpooling); initView(); initListener(); } private void initView(){ initTopView(); setLeftBackButton(); setTitle("发布拼车"); owner = findViewById(R.id.lin_send_carpooling_owner); passenger = findViewById(R.id.lin_send_carpooling_passenger); close = (ImageView) findViewById(R.id.img_send_carpooling_close); } @Override public void initListener() { super.initListener(); initSideBarListener(); owner.setOnClickListener(this); passenger.setOnClickListener(this); close.setOnClickListener(this); } @Override public void onClick(View v) { if(v.getId() == R.id.img_send_carpooling_close){ SendCarpoolingActivity.this.finish(); return; } if (!configEntity.isLogin) { Toast.makeText(this, "请先登录", Toast.LENGTH_SHORT).show(); Intent loginIntent = new Intent(this, LoginActivity.class); startActivity(loginIntent); return; } Intent intent = new Intent(this,SendInfomationActivity.class); switch (v.getId()){ case R.id.lin_send_carpooling_owner://我是车主 intent.putExtra("type","101"); startActivity(intent); break; case R.id.lin_send_carpooling_passenger://我的乘客 intent.putExtra("type","102"); startActivity(intent); break; } } }
[ "1176851478@qq.com" ]
1176851478@qq.com
c9b274f4ccde0744faf6be5ad40003f180a9c6e4
4db3e2c1bb7d8f86f002a444b11f1c3e6e6678e1
/common/src/main/java/liquid/web/domain/SearchBarForm.java
519dfcedaf50e57fc98a9862de5d8d7f9c68fd5c
[ "Apache-2.0" ]
permissive
superliujian/liquid
1998e40327d2718cf0a07bb1d02503fce3b60f26
c61b8639ca1668caea348a4b79f49b1a80e6dc52
refs/heads/master
2021-01-17T05:56:26.585604
2015-04-06T04:20:01
2015-04-06T04:20:01
33,525,184
1
0
null
2015-04-07T06:02:58
2015-04-07T06:02:58
null
UTF-8
Java
false
false
3,479
java
package liquid.web.domain; import liquid.util.DateUtil; import org.hibernate.validator.constraints.NotEmpty; import javax.validation.constraints.NotNull; import java.util.Arrays; import java.util.Calendar; /** * Created by mat on 10/18/14. */ public class SearchBarForm { @Deprecated private String action; @Deprecated private String types[][]; /** * order id or customer id. */ private Long id; /** * order or customer */ private String type; /** * type ahead */ private String text; @NotNull @NotEmpty private String startDate; @NotNull @NotEmpty private String endDate; /** * The number of page. */ private int number; public SearchBarForm() { Calendar calendar = Calendar.getInstance(); calendar.set(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), 1, 0, 0, 0); startDate = DateUtil.dayStrOf(calendar.getTime()); calendar.set(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH) + 1, 0, 0, 0, 0); endDate = DateUtil.dayStrOf(calendar.getTime()); } @Deprecated public String getAction() { return action; } @Deprecated public void setAction(String action) { this.action = action; } @Deprecated public String[][] getTypes() { return types; } @Deprecated public void setTypes(String[][] types) { this.types = types; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getText() { return text; } public void setText(String text) { this.text = text; } public String getStartDate() { return startDate; } public void setStartDate(String startDate) { this.startDate = startDate; } public String getEndDate() { return endDate; } public void setEndDate(String endDate) { this.endDate = endDate; } public int getNumber() { return number; } public void setNumber(int number) { this.number = number; } public static String toQueryStrings(SearchBarForm searchBarForm) { StringBuilder sb = new StringBuilder("?"); sb.append("startDate=").append(searchBarForm.getStartDate()).append("&"); sb.append("endDate=").append(searchBarForm.getEndDate()).append("&"); sb.append("type=").append(null == searchBarForm.getType() ? "" : searchBarForm.getType()).append("&"); sb.append("id=").append(null == searchBarForm.getId() ? "" : searchBarForm.getId()).append("&"); return sb.toString(); } @Override public String toString() { final StringBuilder sb = new StringBuilder("{Class=SearchBarForm"); sb.append(", action='").append(action).append('\''); sb.append(", types=").append(Arrays.toString(types)); sb.append(", id=").append(id); sb.append(", type='").append(type).append('\''); sb.append(", text='").append(text).append('\''); sb.append(", startDate='").append(startDate).append('\''); sb.append(", endDate='").append(endDate).append('\''); sb.append(", number=").append(number); sb.append('}'); return sb.toString(); } }
[ "redbrick9@gmail.com" ]
redbrick9@gmail.com
5da8aa30052e5f19fe2795efc7c4d2649dd0d1bd
1be23a01a4c01da80ca4880e328ae15fef4e5dec
/jiayida-admin/src/main/java/com/joinway/admin/controller/TabController.java
c94f418b544ffb72411663b2655270973a3bf24c
[]
no_license
scorpiopapa/spring-driving
6d70d775c4b0326ca5014022aa41d3d269a95fb5
698ce13ebffebd4c57a4516ad03f313f1c52cdc9
refs/heads/master
2020-05-29T13:03:44.785571
2014-09-04T15:10:01
2014-09-04T15:10:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
622
java
package com.joinway.admin.controller; import org.springframework.stereotype.Controller; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.ModelAndView; @Controller @RequestMapping("tabs") @Validated public class TabController { @RequestMapping("notice/history/mass") public ModelAndView page(@RequestParam("noticeId") String noticeId){ ModelAndView mv = new ModelAndView("mass"); mv.addObject("noticeId", noticeId); return mv; } }
[ "liliang2005@gmail.com" ]
liliang2005@gmail.com
8a1ca24ecb48aeb5a12a0bf300ae9c6631bb2d8e
d361b2f722a774f62f364e343a1b238eb60a1155
/jdbpro/src/main/java/com/github/drinkjava2/jdbpro/inline/PreparedSQL.java
447fdf699ea48a8fedf6581836e51f7f869e74a5
[ "Apache-2.0" ]
permissive
lixinlin/jDbPro
23c3fba833903235349b9be24931fbfc87f0a204
b2cf3fda98ffe5699cd398c0b1917171bf8c8b3a
refs/heads/master
2020-03-21T11:12:36.545713
2018-03-12T07:47:00
2018-03-12T07:47:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,061
java
/* * Copyright 2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.github.drinkjava2.jdbpro.inline; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.apache.commons.dbutils.ResultSetHandler; import com.github.drinkjava2.jdbpro.DbProRuntimeException; import com.github.drinkjava2.jdbpro.handler.Wrap; /** * PreparedSQL is a POJO used for store SQL、parameter array、handler array * * @author Yong Zhu * @since 1.7.0 */ @SuppressWarnings("all") public class PreparedSQL { private String sql; private Object[] params; private Class<?>[] handlerClasses; private ResultSetHandler[] handlers; public PreparedSQL() { // default Constructor } public PreparedSQL(String sql, Object[] parameters) { this.sql = sql; this.params = parameters; } public String getSql() { return sql; } public void setSql(String sql) { this.sql = sql; } public Object[] getParams() { if (params == null) return new Object[] {}; return params; } public void setParams(Object[] params) { this.params = params; } public Class<?>[] getHandlerClasses() { return handlerClasses; } public void setHandlerClasses(Class<?>[] handlerClasses) { this.handlerClasses = handlerClasses; } public ResultSetHandler[] getHandlers() { return handlers; } public void setHandlers(ResultSetHandler<?>[] handlers) { this.handlers = handlers; } public ResultSetHandler getWrappedHandler() { List<ResultSetHandler> l = new ArrayList<ResultSetHandler>(); if (handlerClasses != null && handlerClasses.length != 0) try { for (int i = 0; i < handlerClasses.length; i++) l.add((ResultSetHandler) handlerClasses[i].newInstance()); } catch (Exception e) { throw new DbProRuntimeException(e); } if (handlers != null && handlers.length != 0) try { for (int i = 0; i < handlers.length; i++) l.add(handlers[i]); } catch (Exception e) { throw new DbProRuntimeException(e); } if (l.isEmpty()) return null;// I don't in charge of check null if (l.size() == 1) return l.get(0); return new Wrap(l.toArray(new ResultSetHandler[l.size()])); } public String getDebugInfo() { return new StringBuffer("SQL: ").append(this.getSql()).append("\nParameters: ") .append(Arrays.deepToString(this.getParams())).append("\nHandler Class:") .append(Arrays.deepToString(this.getHandlerClasses())).append("\nHandlers:") .append(Arrays.deepToString(this.getHandlers())).append("\n").toString(); } }
[ "yong9981@gmail.com" ]
yong9981@gmail.com
662c0fae78db7440656028e1d37f1d11d96edfe7
1465bbefeaf484c893d72b95b2996a504ce30577
/zcommon/src/org/zkoss/text/DateFormats.java
8b5aac0dc9b8f4258e1b06ef61bc816d3b8bf5e9
[]
no_license
dije/zk
a2c74889d051f988e23cb056096d07f8b41133e9
17b8d24a970d63f65f1f3a9ffe4be999b5000304
refs/heads/master
2021-01-15T19:40:42.842829
2011-10-21T03:23:53
2011-10-21T03:23:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,176
java
/* DateFormats.java Purpose: Description: History: 91/01/17 15:22:22, Create, Tom M. Yeh. Copyright (C) 2001 Potix Corporation. All Rights Reserved. {{IS_RIGHT This program is distributed under LGPL Version 3.0 in the hope that it will be useful, but WITHOUT ANY WARRANTY. }}IS_RIGHT */ package org.zkoss.text; import java.util.Locale; import java.util.Date; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.text.ParseException; import org.zkoss.util.Locales; /** * DateFormat relevant utilities. * * @author tomyeh */ public class DateFormats { private final static InheritableThreadLocal<DateFormatInfo> _thdLocale = new InheritableThreadLocal<DateFormatInfo>(); /** Sets the info of date/time format for the current thread. * It does not have effect on other threads. * <p>When Invoking this method under a thread, * remember to clean up the setting upon completing each request. * * <pre><code>DateFormatInfo old = DateFormats.setLocalFormatFormatInfo(info); *try { * ... *} finally { * DateFormats.setLocalFormatInfo(old); *}</code></pre> * @param info the format info. It could be null (and the JVM's default * is used). * @return the previous format info being set, or null if not set. * @since 5.0.7 */ public static DateFormatInfo setLocalFormatInfo(DateFormatInfo info) { DateFormatInfo old = _thdLocale.get(); _thdLocale.set(info); return old; } /** Returns the info of date/time format for the current thread, * or null if not set. * @since 5.0.7 */ public static DateFormatInfo getLocalFormatInfo() { return _thdLocale.get(); } /** Returns the current date format; never null. * <p>If a format info is set by {@link #setLocalFormatInfo}, * {@link DateFormatInfo#getDateFormat} of the info will be called first. * If no info is set or the info returns null, * <code>java.text.DateFormat.getDateInstance(style, locale)</code> * will be called instead. * If no format is found and the value of <code>defaultFormat</code> is not null, * <code>defaultFormat</code> will be returned. * Otherwise, "M/d/yy" is returned. * * @param style the giving formatting style. For example, * {@link DateFormat#SHORT} for "M/d/yy" in the US locale. * @param locale the locale. If null, {@link Locales#getCurrent} * is assumed. * @param defaultFormat the default format. It is used if no default * format. If null, "M/d/yy" is assumed. * @since 5.0.7 */ public static String getDateFormat(int style, Locale locale, String defaultFormat) { if (locale == null) locale = Locales.getCurrent(); final DateFormatInfo info = getLocalFormatInfo(); if (info != null) { final String fmt = info.getDateFormat(style, locale); if (fmt != null) return fmt; } final DateFormat df = DateFormat.getDateInstance(style, locale); if (df instanceof SimpleDateFormat) { final String fmt = ((SimpleDateFormat)df).toPattern(); if (fmt != null && !"M/d/yy h:mm a".equals(fmt)) return fmt; // note: JVM use "M/d/yy h:mm a" if not found! } return defaultFormat != null ? defaultFormat: "M/d/yy"; } /** Returns the current time format; never null. * <p>If a format info is set by {@link #setLocalFormatInfo}, * {@link DateFormatInfo#getTimeFormat} of the info will be called first. * If no info is set or the info returns null, * <code>java.text.DateFormat.getTimeInstance(style, locale)</code> * will be called instead. * If no format is found and the value of <code>defaultFormat</code> is not null, * <code>defaultFormat</code> will be returned. * Otherwise, "h:mm a" is returned. * * @param style the giving formatting style. For example, * {@link DateFormat#SHORT} for "h:mm a" in the US locale. * @param locale the locale. If null, {@link Locales#getCurrent} * is assumed. * @param defaultFormat the default format. It is used if no default * format. If null, "h:mm a" is assumed. * @since 5.0.7 */ public static final String getTimeFormat(int style, Locale locale, String defaultFormat) { if (locale == null) locale = Locales.getCurrent(); final DateFormatInfo info = getLocalFormatInfo(); if (info != null) { final String fmt = info.getTimeFormat(style, locale); if (fmt != null) return fmt; } final DateFormat df = DateFormat.getTimeInstance(style, locale); if (df instanceof SimpleDateFormat) { final String fmt = ((SimpleDateFormat)df).toPattern(); if (fmt != null && !"M/d/yy h:mm a".equals(fmt)) return fmt; // note: JVM use "M/d/yy h:mm a" if not found! } return "h:mm a"; } /** Returns the current date/time format; never null. * <p>If a format info is set by {@link #setLocalFormatInfo}, * {@link DateFormatInfo#getDateTimeFormat} of the info will be called first. * If no info is set or the info returns null, * <code>java.text.DateFormat.getDateTimeInstance(dateStyle, timeStyle, locale)</code> * will be called instead. * If no format is found and the value of <code>defaultFormat</code> is not null, * <code>defaultFormat</code> will be returned. * Otherwise, "M/d/yy h:mm a" is returned. * * @param dateStyle the giving formatting style. For example, * {@link DateFormat#SHORT} for "M/d/yy" in the US locale. * @param timeStyle the giving formatting style. For example, * {@link DateFormat#SHORT} for "h:mm a" in the US locale. * @param locale the locale. If null, {@link Locales#getCurrent} * is assumed. * @since 5.0.7 */ public static final String getDateTimeFormat(int dateStyle, int timeStyle, Locale locale, String defaultFormat) { if (locale == null) locale = Locales.getCurrent(); final DateFormatInfo info = getLocalFormatInfo(); if (info != null) { final String fmt = info.getDateTimeFormat(dateStyle, timeStyle, locale); if (fmt != null) return fmt; } final DateFormat df = DateFormat.getDateTimeInstance(dateStyle, timeStyle, locale); if (df instanceof SimpleDateFormat) { final String fmt = ((SimpleDateFormat)df).toPattern(); if (fmt != null) return fmt; } return defaultFormat != null ? defaultFormat: "M/d/yy h:mm a"; } /** Formats a Date object based on the current Locale * and the default date format ({@link DateFormat#DEFAULT}. * * @param dateOnly indicates whether to show only date; false to show * both date and time */ public static final String format(Date d, boolean dateOnly) { return getDateFormat(dateOnly).format(d); } /** * Parses a string, that is formatted by {@link #format}, to a date. * It assumes the current locale is {@link Locales#getCurrent}. * * @param dateOnly indicates whether to show only date; false to show * both date and time * @since 5.0.5 */ public static final Date parse(String s, boolean dateOnly) throws ParseException { return getDateFormat(dateOnly).parse(s); } private static final DateFormat getDateFormat(boolean dateOnly) { final Locale locale = Locales.getCurrent(); return dateOnly ? DateFormat.getDateInstance(DateFormat.DEFAULT, locale): DateFormat.getDateTimeInstance( DateFormat.DEFAULT, DateFormat.DEFAULT, locale); } }
[ "tomyeh@zkoss.org" ]
tomyeh@zkoss.org
3ad4091f56a8757775ca57ac2304c9691e49e812
7770487e11420cc77549421421e1a4680abffaee
/src/main/java/com/bluetop/payment/core/pay/domain/H5_info.java
3e0830c2c89525d181794e03b11e41f82c938b4e
[]
no_license
thestar111/sdk-payment-stater
c182dc1901d091bd837d140374385e13d71f554b
c7d4b7f8406339707412b6a73aa35d1018ae6032
refs/heads/master
2023-05-11T10:20:35.191099
2021-06-05T15:22:18
2021-06-05T15:22:18
373,673,162
0
0
null
null
null
null
UTF-8
Java
false
false
383
java
package com.bluetop.payment.core.pay.domain; import lombok.Data; import java.io.Serializable; /** * <微信H5描述信息> * * @author zhouping * @version 1.0 * @date 2020/9/24 4:22 下午 * @see [相关类/方法] * @since JDK 1.8 */ @Data public class H5_info implements Serializable { private String type; private String wap_url; private String wap_name; }
[ "zhouping19911013@163.com" ]
zhouping19911013@163.com
5953ba1e4323a07ca01d6f4df963e0068fe72e28
fa1408365e2e3f372aa61e7d1e5ea5afcd652199
/src/testcases/CWE80_XSS/s01/CWE80_XSS__CWE182_Servlet_URLConnection_54c.java
11de849c4f8edba13ff20004d1e323daa8d2fca1
[]
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,404
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE80_XSS__CWE182_Servlet_URLConnection_54c.java Label Definition File: CWE80_XSS__CWE182_Servlet.label.xml Template File: sources-sink-54c.tmpl.java */ /* * @description * CWE: 80 Cross Site Scripting (XSS) * BadSource: URLConnection Read data from a web server with URLConnection * GoodSource: A hardcoded string * Sinks: * BadSink : Display of data in web page after using replaceAll() to remove script tags, which will still allow XSS (CWE 182: Collapse of Data into Unsafe Value) * Flow Variant: 54 Data flow: data passed as an argument from one method through three others to a fifth; all five functions are in different classes in the same package * * */ package testcases.CWE80_XSS.s01; import testcasesupport.*; import javax.servlet.http.*; public class CWE80_XSS__CWE182_Servlet_URLConnection_54c { public void badSink(String data , HttpServletRequest request, HttpServletResponse response) throws Throwable { (new CWE80_XSS__CWE182_Servlet_URLConnection_54d()).badSink(data , request, response); } /* goodG2B() - use goodsource and badsink */ public void goodG2BSink(String data , HttpServletRequest request, HttpServletResponse response) throws Throwable { (new CWE80_XSS__CWE182_Servlet_URLConnection_54d()).goodG2BSink(data , request, response); } }
[ "bqcuong2212@gmail.com" ]
bqcuong2212@gmail.com
eca0b972a62a7695e50d1bda9027516a2fc6a73d
81b3984cce8eab7e04a5b0b6bcef593bc0181e5a
/android/CarLife/app/src/main/java/com/baidu/che/codriver/p122h/C2537a.java
ebb6404aedfb02d2be1d70dbd448cf9ef0a60f83
[]
no_license
ausdruck/Demo
20ee124734d3a56b99b8a8e38466f2adc28024d6
e11f8844f4852cec901ba784ce93fcbb4200edc6
refs/heads/master
2020-04-10T03:49:24.198527
2018-07-27T10:14:56
2018-07-27T10:14:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,387
java
package com.baidu.che.codriver.p122h; import android.content.Context; import android.media.AudioManager; import android.media.AudioManager.OnAudioFocusChangeListener; import android.os.Handler; import com.baidu.che.codriver.sdk.p081a.C2602k; import com.baidu.che.codriver.sdk.p081a.C2602k.C1981b; import com.baidu.che.codriver.util.C2725h; /* compiled from: AudioFocusManager */ /* renamed from: com.baidu.che.codriver.h.a */ public class C2537a implements OnAudioFocusChangeListener { /* renamed from: a */ public static final String f8326a = "AudioFocusManager"; /* renamed from: b */ private static final Object f8327b = new Object(); /* renamed from: c */ private static C2537a f8328c; /* renamed from: d */ private AudioManager f8329d; /* renamed from: e */ private boolean f8330e = false; /* renamed from: f */ private Handler f8331f; private C2537a() { } /* renamed from: a */ public static C2537a m9625a() { if (f8328c == null) { synchronized (f8327b) { if (f8328c == null) { f8328c = new C2537a(); } } } return f8328c; } /* renamed from: a */ public void m9626a(Context context) { if (this.f8329d == null) { this.f8329d = (AudioManager) context.getSystemService("audio"); } if (this.f8331f == null) { this.f8331f = new Handler(); } } /* renamed from: b */ public int m9627b() { C2725h.m10207b(f8326a, "AudioFocusManager.requestVrAudioFocus() mHasFocus=" + this.f8330e); if (1 != this.f8329d.requestAudioFocus(this, 3, 2)) { return 0; } C2725h.m10207b(f8326a, "requestVrAudioFocus succeed!"); return 1; } /* renamed from: c */ public int m9628c() { C2725h.m10207b(f8326a, "AudioFocusManager.abandonVrAudioFocus() mHasFocus=" + this.f8330e); if (1 != this.f8329d.abandonAudioFocus(this)) { return 0; } C2725h.m10207b(f8326a, "abandonVrAudioFocus succeed!"); return 1; } public void onAudioFocusChange(int focusChange) { C2725h.m10207b(f8326a, "onAudioFocusChange focusChange=" + focusChange); C1981b systemTool = C2602k.m9819a().m9822b(); switch (focusChange) { } } }
[ "objectyan@gmail.com" ]
objectyan@gmail.com
2015acc3f9aac3e53c6affcd5e1ae0e95f40c19f
6e41615e6f4850cf891e52c2710aeeee0704e9ca
/src/main/java/br/ucb/prevejo/comunidade/topico/TopicoRepository.java
39b3f2991be44890126be5d826c07754b0ba94b9
[]
no_license
prevejo/appservice
2d0150fcb22639011a583ea217df41f8c0c6befb
5d11a0e623ad6b1fe0ec1213d49d67d87b9ecae4
refs/heads/master
2021-06-22T01:55:39.828402
2020-09-03T16:58:33
2020-09-03T16:58:33
226,908,051
0
0
null
2021-06-04T02:21:44
2019-12-09T15:47:12
Java
UTF-8
Java
false
false
770
java
package br.ucb.prevejo.comunidade.topico; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; import org.springframework.stereotype.Repository; import org.springframework.transaction.annotation.Transactional; import java.util.List; import java.util.Optional; @Repository @Transactional(readOnly = true) public interface TopicoRepository extends JpaRepository<Topico, Integer> { @Query(value = "SELECT t.id as id, t.titulo as titulo FROM Topico t ") List<TopicoDTO> findAllDTO(); @Query(value = "SELECT t.id as id, t.titulo as titulo FROM Topico t WHERE t.id = :id") Optional<TopicoDTO> findTopicoDTOById(@Param("id") int id); }
[ "universo42.01@gmail.com" ]
universo42.01@gmail.com
a22cb37688bd449b085d45571d35497fe8b0e044
81a6dca5c8f3dec7f0495b2c3ef8007c8a060612
/hybris/bin/ext-platform-optional/platformwebservices/web/testsrc/de/hybris/platform/webservices/util/objectgraphtransformer/misc/InDto2.java
384ec2875d9200b05279c50dcb2d532b38b5766f
[]
no_license
BaggaShivanshu/hybris-hy400
d8dbf4aba43b3dccfef7582b687480dafaa69b0b
6914d3fc7947dcfb2bbe87f59d636525187c72ad
refs/heads/master
2020-04-22T09:41:49.504834
2018-12-04T18:44:28
2018-12-04T18:44:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
937
java
/* * [y] hybris Platform * * Copyright (c) 2018 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 de.hybris.platform.webservices.util.objectgraphtransformer.misc; import de.hybris.platform.webservices.util.objectgraphtransformer.GraphNode; @GraphNode(target = InDto2.class) public class InDto2 extends InDto1 { private String anotherValue; /** * @return the anotherValue */ public String getAnotherValue() { return anotherValue; } /** * @param anotherValue the anotherValue to set */ public void setAnotherValue(final String anotherValue) { this.anotherValue = anotherValue; } }
[ "richard.leiva@digitaslbi.com" ]
richard.leiva@digitaslbi.com
90234d9e8abaf55c20ef67005cab335f0c34ee2d
9c717bf635f994cac440cff7153b9f92b605c831
/src/main/java/org/mycontroller/standalone/api/jaxrs/mapper/PayloadJson.java
29706948efdaa154b383b3f01e2f50d9368a2400
[ "Apache-2.0" ]
permissive
arturmon/mycontroller
c3122254fe3abdb7552b03fe1a78a24718bbef61
8a945c4f15cdebaec0a26137f2a631f6e6cfae17
refs/heads/master
2020-12-25T23:56:39.588646
2015-11-22T00:49:30
2015-11-22T00:49:30
43,523,710
2
0
null
2016-12-06T07:53:16
2015-10-01T22:05:09
Java
UTF-8
Java
false
false
2,961
java
/** * Copyright (C) 2015 Jeeva Kandasamy (jkandasa@gmail.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.mycontroller.standalone.api.jaxrs.mapper; /** * @author Jeeva Kandasamy (jkandasa) * @since 0.0.2 */ public class PayloadJson { private Integer nodeId; private Integer sensorId; private Integer sensorRefId; private Integer variableType; private String payload; private String buttonType; public enum BUTTON_TYPE { ON_OFF, ARMED, TRIPPED, LOCK_UNLOCK, INCREASE, DECREASE, UP, DOWN, STOP, RGB, RGBW; public static BUTTON_TYPE get(int id) { for (BUTTON_TYPE type : values()) { if (type.ordinal() == id) { return type; } } throw new IllegalArgumentException(String.valueOf(id)); } } public PayloadJson() { } public String toString() { StringBuilder builder = new StringBuilder(); builder.append("Node Id:").append(this.nodeId); builder.append(", Sensor Id:").append(this.sensorId); builder.append(", SensorRefId:").append(this.sensorRefId); builder.append(", Variable Type:").append(this.variableType); builder.append(", Button Type:").append(this.buttonType); builder.append(", Payload:").append(this.payload); return builder.toString(); } public Integer getNodeId() { return nodeId; } public Integer getSensorId() { return sensorId; } public Integer getVariableType() { return variableType; } public String getPayload() { return payload; } public void setNodeId(Integer nodeId) { this.nodeId = nodeId; } public void setSensorId(Integer sensorId) { this.sensorId = sensorId; } public void setVariableType(Integer variableType) { this.variableType = variableType; } public void setPayload(String payload) { this.payload = payload; } public Integer getSensorRefId() { return sensorRefId; } public void setSensorRefId(Integer sensorRefId) { this.sensorRefId = sensorRefId; } public String getButtonType() { return buttonType; } public void setButtonType(String buttonType) { this.buttonType = buttonType; } }
[ "jkandasa@gmail.com" ]
jkandasa@gmail.com
54f096ab140287e1afb128a7af3f6f179861c894
b00c54389a95d81a22e361fa9f8bdf5a2edc93e3
/cts/hostsidetests/theme/app/src/android/theme/app/modifiers/DatePickerModifier.java
26ccd67c7913501a694353108c51d153d864c7c7
[]
no_license
mirek190/x86-android-5.0
9d1756fa7ff2f423887aa22694bd737eb634ef23
eb1029956682072bb7404192a80214189f0dc73b
refs/heads/master
2020-05-27T01:09:51.830208
2015-10-07T22:47:36
2015-10-07T22:47:36
41,942,802
15
20
null
2020-03-09T00:21:03
2015-09-05T00:11:19
null
UTF-8
Java
false
false
1,073
java
/* * Copyright (C) 2014 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.theme.app.modifiers; import android.theme.app.LayoutModifier; import android.view.View; import android.widget.DatePicker; /** * {@link LayoutModifier} that sets a precise date on a {@link DatePicker}. */ public class DatePickerModifier extends AbstractLayoutModifier { @Override public View modifyView(View view) { DatePicker tp = (DatePicker) view; tp.updateDate(2011, 4, 20); return view; } }
[ "mirek190@gmail.com" ]
mirek190@gmail.com
15a820bd0160b7c5e585b8eaa58ec5cb6f07a877
ba80ae11060d036e88de9bb09c2989aa13554345
/src/common/net/minecraft/src/CommandServerPublishLocal.java
2d2b65daebd74a82c8957c3866d628ef15292256
[]
no_license
rosshadden/minequest
073fb513e0184dce47044f34a2c184a3d9486519
56b84c1a0d5ba519f838f8c66f26e80bc87f79bb
refs/heads/master
2020-06-05T02:52:31.755622
2012-09-04T19:56:54
2012-09-04T19:56:54
5,543,385
0
1
null
null
null
null
UTF-8
Java
false
false
694
java
package net.minecraft.src; import net.minecraft.server.MinecraftServer; public class CommandServerPublishLocal extends CommandBase { public String getCommandName() { return "publish"; } public void processCommand(ICommandSender par1ICommandSender, String[] par2ArrayOfStr) { String var3 = MinecraftServer.getServer().shareToLAN(EnumGameType.SURVIVAL, false); if (var3 != null) { notifyAdmins(par1ICommandSender, "commands.publish.started", new Object[] {var3}); } else { notifyAdmins(par1ICommandSender, "commands.publish.failed", new Object[0]); } } }
[ "rosshadden@gmail.com" ]
rosshadden@gmail.com
d0e472c65c95eb511fa82faae0dea452f01686c8
236b2da5d748ef26a90d66316b1ad80f3319d01e
/trunk/modules/strategy/src/test/sample_data/inputs/DataFlow.java
00dc6df2be340b6ea9ab0f1a6dff3fb5a0470438
[ "Apache-2.0" ]
permissive
nagyist/marketcetera
a5bd70a0369ce06feab89cd8c62c63d9406b42fd
4f3cc0d4755ee3730518709412e7d6ec6c1e89bd
refs/heads/master
2023-08-03T10:57:43.504365
2023-07-25T08:37:53
2023-07-25T08:37:53
19,530,179
0
2
Apache-2.0
2023-07-25T08:37:54
2014-05-07T10:22:59
Java
UTF-8
Java
false
false
5,909
java
package org.marketcetera.strategy; import java.util.ArrayList; import java.util.List; import org.marketcetera.event.AskEvent; import org.marketcetera.event.BidEvent; import org.marketcetera.event.DividendEvent; import org.marketcetera.event.MarketstatEvent; import org.marketcetera.event.TradeEvent; import org.marketcetera.module.DataFlowID; import org.marketcetera.module.DataRequest; import org.marketcetera.module.ModuleURN; import org.marketcetera.strategy.java.Strategy; import org.marketcetera.trade.ExecutionReport; import org.marketcetera.trade.OrderCancelReject; /* $License$ */ /** * Tests a strategy's ability to create custom data flows. * * @author <a href="mailto:colin@marketcetera.com">Colin DuPlantis</a> * @version $Id: DataFlow.java 16154 2012-07-14 16:34:05Z colin $ * @since 2.0.0 */ public class DataFlow extends Strategy { /* (non-Javadoc) * @see org.marketcetera.strategy.java.Strategy#onStart() */ @Override public void onStart() { dataFlowID = doDataFlow(); if(dataFlowID != null) { setProperty("dataFlowID", dataFlowID.getValue()); } } /* (non-Javadoc) * @see org.marketcetera.strategy.java.Strategy#onStop() */ @Override public void onStop() { boolean shouldSkipCancel = Boolean.parseBoolean(getParameter("shouldSkipCancel")); if(dataFlowID != null && !shouldSkipCancel) { cancelDataFlow(dataFlowID); setProperty("dataFlowStopped", "true"); } boolean shouldMakeNewRequest = Boolean.parseBoolean(getParameter("shouldMakeNewRequest")); if(shouldMakeNewRequest) { setProperty("newDataFlowAttempt", "false"); DataFlowID newDataFlowID = doDataFlow(); setProperty("newDataFlowAttempt", "true"); if(newDataFlowID == null) { setProperty("newDataFlowID", "null"); } else { setProperty("newDataFlowID", newDataFlowID.getValue()); } } } /* (non-Javadoc) * @see org.marketcetera.strategy.java.Strategy#onOther(java.lang.Object) */ @Override public void onOther(Object inEvent) { send(inEvent); } /* (non-Javadoc) * @see org.marketcetera.strategy.java.Strategy#onAsk(org.marketcetera.event.AskEvent) */ @Override public void onAsk(AskEvent inAsk) { send(inAsk); } /* (non-Javadoc) * @see org.marketcetera.strategy.java.Strategy#onBid(org.marketcetera.event.BidEvent) */ @Override public void onBid(BidEvent inBid) { send(inBid); } /* (non-Javadoc) * @see org.marketcetera.strategy.java.Strategy#onCallback(java.lang.Object) */ @Override public void onCallback(Object inData) { boolean shouldCancelDataFlow = Boolean.parseBoolean(getParameter("shouldCancelDataFlow")); if(shouldCancelDataFlow) { if(inData instanceof DataFlowID) { DataFlowID localDataFlowID = (DataFlowID)inData; cancelDataFlow(localDataFlowID); setProperty("localDataFlowStopped", "true"); } } } /* (non-Javadoc) * @see org.marketcetera.strategy.java.Strategy#onCancelReject(org.marketcetera.trade.OrderCancelReject) */ @Override public void onCancelReject(OrderCancelReject inCancel) { send(inCancel); } /* (non-Javadoc) * @see org.marketcetera.strategy.java.Strategy#onExecutionReport(org.marketcetera.trade.ExecutionReport) */ @Override public void onExecutionReport(ExecutionReport inExecutionReport) { send(inExecutionReport); } /* (non-Javadoc) * @see org.marketcetera.strategy.java.Strategy#onMarketstat(org.marketcetera.event.MarketstatEvent) */ @Override public void onMarketstat(MarketstatEvent inStatistics) { send(inStatistics); } /* (non-Javadoc) * @see org.marketcetera.strategy.java.Strategy#onTrade(org.marketcetera.event.TradeEvent) */ @Override public void onTrade(TradeEvent inTrade) { send(inTrade); } /* (non-Javadoc) * @see org.marketcetera.strategy.java.Strategy#onDividend(org.marketcetera.event.DividendEvent) */ @Override public void onDividend(DividendEvent inDividend) { send(inDividend); } /** * Sets up the data flow as dictated by strategy parameters. * * @return a <code>DataFlowID</code> containing the data flow ID or <code>null</code> if the * data flow could not be established */ private DataFlowID doDataFlow() { String baseURNList = getParameter("urns"); boolean routeToSink = Boolean.parseBoolean(getParameter("routeToSink")); List<DataRequest> requests = new ArrayList<DataRequest>(); if(baseURNList != null) { String[] urns = baseURNList.split(","); for(String urn : urns) { requests.add(new DataRequest(new ModuleURN(urn))); } if(getParameter("useStrategyURN") != null) { if(routeToSink) { requests.add(new DataRequest(getURN(), OutputType.ALL)); } else { requests.add(new DataRequest(getURN())); } } } return createDataFlow(routeToSink, baseURNList == null ? null : requests.toArray(new DataRequest[0])); } /** * data flow ID of the data flow created when the strategy starts */ private DataFlowID dataFlowID = null; }
[ "nagyist@mailbox.hu" ]
nagyist@mailbox.hu
6535814e8a29ef1dc54d997153f527043a03a10d
473b76b1043df2f09214f8c335d4359d3a8151e0
/benchmark/bigclonebenchdata_completed/1296795.java
bfa1f349e06d0c59da53086a7e24529df95e7298
[]
no_license
whatafree/JCoffee
08dc47f79f8369af32e755de01c52d9a8479d44c
fa7194635a5bd48259d325e5b0a190780a53c55f
refs/heads/master
2022-11-16T01:58:04.254688
2020-07-13T20:11:17
2020-07-13T20:11:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
831
java
class c1296795 { static InputStream getUrlStream(String url) throws IOException { System.out.print("getting : " + url + " ... "); long start = System.currentTimeMillis(); URLConnection c =(URLConnection)(Object) (new URL(url).openConnection()); InputStream is =(InputStream)(Object) c.getInputStream(); System.out.print((System.currentTimeMillis() - start) + "ms\n"); return is; } } // Code below this line has been added to remove errors class MyHelperClass { } class InputStream { } class IOException extends Exception{ public IOException(String errorMessage) { super(errorMessage); } } class URLConnection { public MyHelperClass getInputStream(){ return null; }} class URL { URL(String o0){} URL(){} public MyHelperClass openConnection(){ return null; }}
[ "piyush16066@iiitd.ac.in" ]
piyush16066@iiitd.ac.in
5440180f6a5b941b47509eed88551be01c2e30e0
41ce5edf2e270e321dddd409ffac11ab7f32de86
/3/com/android/dx/rop/code/FillArrayDataInsn.java
3798afbf2a43ba905d5e3013df7eeb824238d309
[]
no_license
danny-source/SDK_Android_Source_03-14
372bb03020203dba71bc165c8370b91c80bc6eaa
323ad23e16f598d5589485b467bb9fba7403c811
refs/heads/master
2020-05-18T11:19:29.171830
2014-03-29T12:12:44
2014-03-29T12:12:44
18,238,039
2
2
null
null
null
null
UTF-8
Java
false
false
3,448
java
/* * Copyright (C) 2008 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.dx.rop.code; import com.android.dx.rop.cst.Constant; import com.android.dx.rop.type.Type; import com.android.dx.rop.type.TypeList; import com.android.dx.rop.type.StdTypeList; import java.util.ArrayList; /** * Instruction which fills a newly created array with a predefined list of * constant values. */ public final class FillArrayDataInsn extends Insn { /** non-null: initial values to fill the newly created array */ private final ArrayList<Constant> initValues; /** * non-null: type of the array. Will be used to determine the width of * elements in the array-data table. */ private final Constant arrayType; /** * Constructs an instance. * * @param opcode non-null; the opcode * @param position non-null; source position * @param sources non-null; specs for all the sources * @param initValues non-null; list of initial values to fill the array * @param cst non-null; type of the new array */ public FillArrayDataInsn(Rop opcode, SourcePosition position, RegisterSpecList sources, ArrayList<Constant> initValues, Constant cst) { super(opcode, position, null, sources); if (opcode.getBranchingness() != Rop.BRANCH_NONE) { throw new IllegalArgumentException("bogus branchingness"); } this.initValues = initValues; this.arrayType = cst; } /** {@inheritDoc} */ @Override public TypeList getCatches() { return StdTypeList.EMPTY; } /** * Return the list of init values * @return non-null; list of init values */ public ArrayList<Constant> getInitValues() { return initValues; } /** * Return the type of the newly created array * @return non-null; array type */ public Constant getConstant() { return arrayType; } /** {@inheritDoc} */ @Override public void accept(Visitor visitor) { visitor.visitFillArrayDataInsn(this); } /** {@inheritDoc} */ @Override public Insn withAddedCatch(Type type) { throw new UnsupportedOperationException("unsupported"); } /** {@inheritDoc} */ @Override public Insn withRegisterOffset(int delta) { return new FillArrayDataInsn(getOpcode(), getPosition(), getSources().withOffset(delta), initValues, arrayType); } /** {@inheritDoc} */ @Override public Insn withNewRegisters(RegisterSpec result, RegisterSpecList sources) { return new FillArrayDataInsn(getOpcode(), getPosition(), sources, initValues, arrayType); } }
[ "danny@35g.tw" ]
danny@35g.tw
6a922c9b5f30a629e65db3977d3960a61f22e063
656ce78b903ef3426f8f1ecdaee57217f9fbc40e
/src/org/spongycastle/asn1/cryptopro/GOST3410PublicKeyAlgParameters.java
3fdbfb414b4aa0b138b6fc1286e5b48dfa3e0635
[]
no_license
zhuharev/periscope-android-source
51bce2c1b0b356718be207789c0b84acf1e7e201
637ab941ed6352845900b9d465b8e302146b3f8f
refs/heads/master
2021-01-10T01:47:19.177515
2015-12-25T16:51:27
2015-12-25T16:51:27
48,586,306
8
10
null
null
null
null
UTF-8
Java
false
false
2,619
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package org.spongycastle.asn1.cryptopro; import java.util.Vector; import org.spongycastle.asn1.ASN1Encodable; import org.spongycastle.asn1.ASN1EncodableVector; import org.spongycastle.asn1.ASN1Object; import org.spongycastle.asn1.ASN1ObjectIdentifier; import org.spongycastle.asn1.ASN1Primitive; import org.spongycastle.asn1.ASN1Sequence; import org.spongycastle.asn1.DERSequence; public class GOST3410PublicKeyAlgParameters extends ASN1Object { public ASN1ObjectIdentifier Yt; public ASN1ObjectIdentifier Yu; public ASN1ObjectIdentifier Yv; public GOST3410PublicKeyAlgParameters(ASN1ObjectIdentifier asn1objectidentifier, ASN1ObjectIdentifier asn1objectidentifier1) { Yt = asn1objectidentifier; Yu = asn1objectidentifier1; Yv = null; } public GOST3410PublicKeyAlgParameters(ASN1ObjectIdentifier asn1objectidentifier, ASN1ObjectIdentifier asn1objectidentifier1, ASN1ObjectIdentifier asn1objectidentifier2) { Yt = asn1objectidentifier; Yu = asn1objectidentifier1; Yv = asn1objectidentifier2; } public GOST3410PublicKeyAlgParameters(ASN1Sequence asn1sequence) { Yt = (ASN1ObjectIdentifier)asn1sequence._mth144B(0); Yu = (ASN1ObjectIdentifier)asn1sequence._mth144B(1); if (asn1sequence.size() > 2) { Yv = (ASN1ObjectIdentifier)asn1sequence._mth144B(2); } } public static GOST3410PublicKeyAlgParameters _mth02BD(ASN1Encodable asn1encodable) { if (asn1encodable instanceof GOST3410PublicKeyAlgParameters) { return (GOST3410PublicKeyAlgParameters)asn1encodable; } if (asn1encodable != null) { return new GOST3410PublicKeyAlgParameters(ASN1Sequence._mth141F(asn1encodable)); } else { return null; } } public final ASN1Primitive _mth0427() { ASN1EncodableVector asn1encodablevector = new ASN1EncodableVector(); ASN1ObjectIdentifier asn1objectidentifier = Yt; asn1encodablevector.VS.addElement(asn1objectidentifier); asn1objectidentifier = Yu; asn1encodablevector.VS.addElement(asn1objectidentifier); if (Yv != null) { ASN1ObjectIdentifier asn1objectidentifier1 = Yv; asn1encodablevector.VS.addElement(asn1objectidentifier1); } return new DERSequence(asn1encodablevector); } }
[ "hostmaster@zhuharev.ru" ]
hostmaster@zhuharev.ru
4687c1b39d7a85fe1d4a3ee412b077002f5e957b
13ab01e0e3c0797eb59852bc30d7cbdeaa1a8937
/src/main/java/com/ceti/backend/config/WebConfigurer.java
02d909d98cfcedaedc7f1e2fcc6b4d0358d88b00
[]
no_license
shinnoo/backend
23e07e6033f2e461e97f09849060b349e69f51e4
e745771920b176edc47ca3ad98a9e076aaf23597
refs/heads/master
2022-12-02T23:31:51.570526
2020-08-18T02:18:20
2020-08-18T02:18:20
288,333,039
0
0
null
null
null
null
UTF-8
Java
false
false
3,538
java
package com.ceti.backend.config; import io.github.jhipster.config.JHipsterProperties; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.web.servlet.ServletContextInitializer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.env.Environment; import org.springframework.core.env.Profiles; import org.springframework.web.cors.CorsConfiguration; import org.springframework.web.cors.UrlBasedCorsConfigurationSource; import org.springframework.web.filter.CorsFilter; import javax.servlet.DispatcherType; import javax.servlet.ServletContext; import javax.servlet.ServletException; import java.util.EnumSet; /** * Configuration of web application with Servlet 3.0 APIs. */ @Configuration public class WebConfigurer implements ServletContextInitializer { private final Logger log = LoggerFactory.getLogger(WebConfigurer.class); private final Environment env; private final JHipsterProperties jHipsterProperties; public WebConfigurer(Environment env, JHipsterProperties jHipsterProperties) { this.env = env; this.jHipsterProperties = jHipsterProperties; } @Override public void onStartup(ServletContext servletContext) throws ServletException { if (env.getActiveProfiles().length != 0) { log.info("Web application configuration, using profiles: {}", (Object[]) env.getActiveProfiles()); } EnumSet<DispatcherType> disps = EnumSet.of(DispatcherType.REQUEST, DispatcherType.FORWARD, DispatcherType.ASYNC); if (env.acceptsProfiles(Profiles.of(EnvConstants.SPRING_PROFILE_PRODUCTION))) { // initCachingHttpHeadersFilter(servletContext, disps); } log.info("Web application fully configured"); } /** * Customize the Servlet engine: Mime types, the document root, the cache. */ /*@Override public void customize(WebServerFactory server) { // setMimeMappings(server); // When running in an IDE or with ./mvnw spring-boot:run, set location of the static web assets. setLocationForStaticAssets(server); }*/ /** * Initializes the caching HTTP Headers Filter. */ /*private void initCachingHttpHeadersFilter(ServletContext servletContext, EnumSet<DispatcherType> disps) { log.debug("Registering Caching HTTP Headers Filter"); FilterRegistration.Dynamic cachingHttpHeadersFilter = servletContext.addFilter("cachingHttpHeadersFilter", new CachingHttpHeadersFilter(jHipsterProperties)); cachingHttpHeadersFilter.addMappingForUrlPatterns(disps, true, "/i18n/*"); cachingHttpHeadersFilter.addMappingForUrlPatterns(disps, true, "/content/*"); cachingHttpHeadersFilter.addMappingForUrlPatterns(disps, true, "/app/*"); cachingHttpHeadersFilter.setAsyncSupported(true); }*/ @Bean public CorsFilter corsFilter() { UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); CorsConfiguration config = jHipsterProperties.getCors(); if (config.getAllowedOrigins() != null && !config.getAllowedOrigins().isEmpty()) { log.debug("Registering CORS filter"); source.registerCorsConfiguration("/api/**", config); source.registerCorsConfiguration("/v2/api-docs", config); } return new CorsFilter(source); } }
[ "trandung164.ptit@gmail.com" ]
trandung164.ptit@gmail.com
af4481104d2eee4bbe9b36e18b8d7ca01770951f
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
/genny_JavaWithLambdasApi21/applicationModule/src/main/java/applicationModulepackageJava1/Foo794.java
5685ecdfc6402c1caf2ea85f2f479551d1c1c65b
[]
no_license
NikitaKozlov/generated-project-for-desugaring
0bc1443ab3ddc84cd289331c726761585766aea7
81506b3711004185070ca4bb9a93482b70011d36
refs/heads/master
2020-03-20T00:35:06.996525
2018-06-12T09:30:37
2018-06-12T09:30:37
137,049,317
0
0
null
null
null
null
UTF-8
Java
false
false
575
java
package applicationModulepackageJava1; public class Foo794 { public void foo0() { final Runnable anything0 = () -> System.out.println("anything"); new applicationModulepackageJava1.Foo793().foo9(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } public void foo5() { foo4(); } public void foo6() { foo5(); } public void foo7() { foo6(); } public void foo8() { foo7(); } public void foo9() { foo8(); } }
[ "nikita.e.kozlov@gmail.com" ]
nikita.e.kozlov@gmail.com
65c4966900f1d770c019b8a4f1a17719c67c0dc7
2a789c198505d7e0c3d4c9a8c273916ff35be823
/azuredatabasemigrationservice/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/azuredatabasemigrationservice/v2018_03_31_preview/SqlConnectionInfo.java
81747283d0e6a1065f72dead877609104ccf5456
[ "MIT" ]
permissive
miryamGSM/azure-sdk-for-java
a6fb439982a912589dfdb80b0906df5acae62184
61f4dcbcbc11b2fe4162906a3628ff1ed00995ac
refs/heads/master
2020-04-11T04:33:27.623176
2018-12-06T21:40:43
2018-12-06T21:40:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,795
java
/** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. */ package com.microsoft.azure.management.azuredatabasemigrationservice.v2018_03_31_preview; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; /** * Information for connecting to SQL database server. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("SqlConnectionInfo") public class SqlConnectionInfo extends ConnectionInfo { /** * Data source in the format * Protocol:MachineName\SQLServerInstanceName,PortNumber. */ @JsonProperty(value = "dataSource", required = true) private String dataSource; /** * Authentication type to use for connection. Possible values include: * 'None', 'WindowsAuthentication', 'SqlAuthentication', * 'ActiveDirectoryIntegrated', 'ActiveDirectoryPassword'. */ @JsonProperty(value = "authentication") private AuthenticationType authentication; /** * Whether to encrypt the connection. */ @JsonProperty(value = "encryptConnection") private Boolean encryptConnection; /** * Additional connection settings. */ @JsonProperty(value = "additionalSettings") private String additionalSettings; /** * Whether to trust the server certificate. */ @JsonProperty(value = "trustServerCertificate") private Boolean trustServerCertificate; /** * Get data source in the format Protocol:MachineName\SQLServerInstanceName,PortNumber. * * @return the dataSource value */ public String dataSource() { return this.dataSource; } /** * Set data source in the format Protocol:MachineName\SQLServerInstanceName,PortNumber. * * @param dataSource the dataSource value to set * @return the SqlConnectionInfo object itself. */ public SqlConnectionInfo withDataSource(String dataSource) { this.dataSource = dataSource; return this; } /** * Get authentication type to use for connection. Possible values include: 'None', 'WindowsAuthentication', 'SqlAuthentication', 'ActiveDirectoryIntegrated', 'ActiveDirectoryPassword'. * * @return the authentication value */ public AuthenticationType authentication() { return this.authentication; } /** * Set authentication type to use for connection. Possible values include: 'None', 'WindowsAuthentication', 'SqlAuthentication', 'ActiveDirectoryIntegrated', 'ActiveDirectoryPassword'. * * @param authentication the authentication value to set * @return the SqlConnectionInfo object itself. */ public SqlConnectionInfo withAuthentication(AuthenticationType authentication) { this.authentication = authentication; return this; } /** * Get whether to encrypt the connection. * * @return the encryptConnection value */ public Boolean encryptConnection() { return this.encryptConnection; } /** * Set whether to encrypt the connection. * * @param encryptConnection the encryptConnection value to set * @return the SqlConnectionInfo object itself. */ public SqlConnectionInfo withEncryptConnection(Boolean encryptConnection) { this.encryptConnection = encryptConnection; return this; } /** * Get additional connection settings. * * @return the additionalSettings value */ public String additionalSettings() { return this.additionalSettings; } /** * Set additional connection settings. * * @param additionalSettings the additionalSettings value to set * @return the SqlConnectionInfo object itself. */ public SqlConnectionInfo withAdditionalSettings(String additionalSettings) { this.additionalSettings = additionalSettings; return this; } /** * Get whether to trust the server certificate. * * @return the trustServerCertificate value */ public Boolean trustServerCertificate() { return this.trustServerCertificate; } /** * Set whether to trust the server certificate. * * @param trustServerCertificate the trustServerCertificate value to set * @return the SqlConnectionInfo object itself. */ public SqlConnectionInfo withTrustServerCertificate(Boolean trustServerCertificate) { this.trustServerCertificate = trustServerCertificate; return this; } }
[ "jianghaolu@users.noreply.github.com" ]
jianghaolu@users.noreply.github.com
84f238f021838f3da31be53f64f09c9d9b0de76b
7bc365d7f3b8a3f8dc15bdfae1e4cca6669c1760
/src/_07_OpenClosedAndLiskovSubstitution_Exercises/_02_Blobs/core/io/commands/StatusCommand.java
7ec070e2c94658e4aa3c31430dea1a5fda4e7093
[]
no_license
nataliya-stoichevska/JavaFundamentals_JavaOOPAdvanced
72536ea5de7ea950c0fe3e027bf18c3a75f1d40c
6de00af47e666d4d49933d7499073519e15155f5
refs/heads/master
2022-01-28T03:59:06.988945
2018-09-04T08:14:25
2018-09-04T08:14:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
782
java
package _07_OpenClosedAndLiskovSubstitution_Exercises._02_Blobs.core.io.commands; import _07_OpenClosedAndLiskovSubstitution_Exercises._02_Blobs.core.BlobRepository; import _07_OpenClosedAndLiskovSubstitution_Exercises._02_Blobs.core.io.OutputWriter; import _07_OpenClosedAndLiskovSubstitution_Exercises._02_Blobs.interfaces.Blobable; public class StatusCommand extends Command { private OutputWriter outputWriter; private BlobRepository blobRepository; public StatusCommand(String[] data) { super(data); } @Override public void execute(String[] params) { for (Blobable blobable : blobRepository.returnAllBlobs()) { outputWriter.writeMessage(blobable.toString()); } this.blobRepository.passTurn(); } }
[ "stojcevskanatalija8@gmail.com" ]
stojcevskanatalija8@gmail.com
ef8bd54878c1f0e1c3d6d7d87c3e96e36bdb905f
47bee068ddb9dacfff94d08341f604ebe97f9fef
/src/main/java/com/smlsnnshn/Assignments/Assignment06_ForLoops/Question04_SumToTheUpperBound.java
03076ecea221f251d419e8a130ad8c77450e344b
[]
no_license
ismailsinansahin/JavaLessons
55686229d946390a52383f5d80e1053f411286e7
768cb63e22462e7c2eef709102df5d19d9c98568
refs/heads/master
2023-07-18T23:10:31.302133
2021-09-14T20:56:35
2021-09-14T20:56:35
360,487,169
2
0
null
null
null
null
UTF-8
Java
false
false
460
java
package com.smlsnnshn.Assignments.Assignment06_ForLoops; import java.util.Scanner; public class Question04_SumToTheUpperBound { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Please enter the upper bound: "); int upper_bound = input.nextInt(); input.close(); int total=0; int i=0; while (i<=upper_bound) { total+=i; i++; } System.out.println("Total:" + total); } }
[ "ismailsinansahin@gmail.com" ]
ismailsinansahin@gmail.com
b29f63e0d8cda8715410e6906110727df995564c
7e908c2536a5fd8c453ea0f9b267711ccc860e10
/Servlets and JSP/day2/lab2/src/main/java/RequestParameterServlet.java
835320b977b815224978ace1883e0ea18f90a1b0
[]
no_license
Mostafayehya/ITI-Web-Stage
d8e67d07d8925d2da5c746afb989576ecbef0fcb
59435c3fc3686ef2ce4627d493b766674416216d
refs/heads/master
2023-05-03T10:23:22.353752
2021-05-10T11:37:10
2021-05-10T11:37:10
337,519,918
1
0
null
2021-02-15T14:50:30
2021-02-09T19:55:50
null
UTF-8
Java
false
false
820
java
import jakarta.servlet.*; import java.io.*; public class RequestParameterServlet implements Servlet{ ServletConfig servletConfig; public void init(ServletConfig config) throws ServletException{ servletConfig = config; } public void service(ServletRequest request, ServletResponse response) throws ServletException, IOException{ response.setContentType("text/html"); PrintWriter out = response.getWriter(); ServletContext servletContext =servletConfig.getServletContext(); String str = request.getParameter("MyName"); out.println("The user input is: " + str); } public void destroy(){ System.out.println("I am inside the destory method"); } public String getServletInfo(){ return null; } public ServletConfig getServletConfig(){ return null; } }
[ "mostafayehyax23@gmail.com" ]
mostafayehyax23@gmail.com
87ae34095abdbf9444805415e91ec8368f9a2bb2
abb62f7e9e48d1f6cdc745aeaed666abe114d38d
/anser-admin/src/main/java/com/jimy/anser/controller/UmsMemberLevelController.java
1a46f90afd42f4261cbdfeb3b0d5127c88a7e1e1
[ "Apache-2.0" ]
permissive
552301/anser
57ab16bc02ac43a6d4dfa4b693454688f94ed7a9
b7f4281d6769fe7348ff424350cf8aa8eec1ca1e
refs/heads/master
2022-07-11T18:04:59.125424
2019-12-22T15:33:37
2019-12-22T15:33:37
229,587,074
0
0
Apache-2.0
2022-06-21T02:30:05
2019-12-22T15:15:31
Java
UTF-8
Java
false
false
1,332
java
package com.jimy.anser.controller; import com.jimy.anser.common.api.CommonResult; import com.jimy.anser.model.UmsMemberLevel; import com.jimy.anser.service.UmsMemberLevelService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import java.util.List; /** * 会员等级管理Controller * Created by jimy on 2018/4/26. */ @Controller @Api(tags = "UmsMemberLevelController", description = "会员等级管理") @RequestMapping("/memberLevel") public class UmsMemberLevelController { @Autowired private UmsMemberLevelService memberLevelService; @RequestMapping(value = "/list", method = RequestMethod.GET) @ApiOperation("查询所有会员等级") @ResponseBody public CommonResult<List<UmsMemberLevel>> list(@RequestParam("defaultStatus") Integer defaultStatus) { List<UmsMemberLevel> memberLevelList = memberLevelService.list(defaultStatus); return CommonResult.success(memberLevelList); } }
[ "545631327@qq.com" ]
545631327@qq.com
aa401b240849f6c6d940369c15d940aa08236a00
dc0919c9609f03f5b239ec0799cea22ed070f411
/com/google/gson/JsonElement.java
611a03cd3a53bda8d0f1f6d69990451cc7c5da64
[]
no_license
jjensn/milight-decompile
a8f98af475f452c18a74fd1032dce8680f23abc0
47c4b9eea53c279f6fab3e89091e2fef495c6159
refs/heads/master
2021-06-01T17:23:28.555123
2016-10-12T18:07:53
2016-10-12T18:07:53
70,721,205
5
0
null
null
null
null
UTF-8
Java
false
false
3,036
java
package com.google.gson; import java.io.IOException; import java.math.BigDecimal; import java.math.BigInteger; public abstract class JsonElement { private static final Escaper BASIC_ESCAPER = new Escaper(false); public JsonElement() { } public BigDecimal getAsBigDecimal() { throw new UnsupportedOperationException(); } public BigInteger getAsBigInteger() { throw new UnsupportedOperationException(); } public boolean getAsBoolean() { throw new UnsupportedOperationException(); } Boolean getAsBooleanWrapper() { throw new UnsupportedOperationException(); } public byte getAsByte() { throw new UnsupportedOperationException(); } public char getAsCharacter() { throw new UnsupportedOperationException(); } public double getAsDouble() { throw new UnsupportedOperationException(); } public float getAsFloat() { throw new UnsupportedOperationException(); } public int getAsInt() { throw new UnsupportedOperationException(); } public JsonArray getAsJsonArray() { if (isJsonArray()) return (JsonArray)this; throw new IllegalStateException("This is not a JSON Array."); } public JsonNull getAsJsonNull() { if (isJsonNull()) return (JsonNull)this; throw new IllegalStateException("This is not a JSON Null."); } public JsonObject getAsJsonObject() { if (isJsonObject()) return (JsonObject)this; throw new IllegalStateException("This is not a JSON Object."); } public JsonPrimitive getAsJsonPrimitive() { if (isJsonPrimitive()) return (JsonPrimitive)this; throw new IllegalStateException("This is not a JSON Primitive."); } public long getAsLong() { throw new UnsupportedOperationException(); } public Number getAsNumber() { throw new UnsupportedOperationException(); } Object getAsObject() { throw new UnsupportedOperationException(); } public short getAsShort() { throw new UnsupportedOperationException(); } public String getAsString() { throw new UnsupportedOperationException(); } public boolean isJsonArray() { return this instanceof JsonArray; } public boolean isJsonNull() { return this instanceof JsonNull; } public boolean isJsonObject() { return this instanceof JsonObject; } public boolean isJsonPrimitive() { return this instanceof JsonPrimitive; } public String toString() { try { StringBuilder localStringBuilder = new StringBuilder(); toString(localStringBuilder, BASIC_ESCAPER); String str = localStringBuilder.toString(); return str; } catch (IOException localIOException) { throw new RuntimeException(localIOException); } } protected abstract void toString(Appendable paramAppendable, Escaper paramEscaper) throws IOException; } /* Location: * Qualified Name: com.google.gson.JsonElement * Java Class Version: 6 (50.0) * JD-Core Version: 0.6.1-SNAPSHOT */
[ "jjensen@GAM5YG3QC-MAC.local" ]
jjensen@GAM5YG3QC-MAC.local
99794057f47c6646e4acb3a6a045f50a04ca460f
c3d35fc86dc95db426619b2e18687e1255101d95
/MyApplication/Demo_SelectImage/src/main/java/com/notrace/selectimage/MainActivity.java
b8d1b0fb05d02d557ebc82be884c5691903d7d67
[]
no_license
messnoTrace/AndroidDemo
f4d221c93f318e32f6f1ec2c38666d6948d3a4bd
34595f97d63fca6b9869e04666afff73b15aa59d
refs/heads/master
2021-01-10T07:33:27.917421
2016-04-14T03:02:27
2016-04-14T03:02:27
47,597,282
0
0
null
null
null
null
UTF-8
Java
false
false
5,497
java
package com.notrace.selectimage; import android.app.Activity; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.ImageView; import android.widget.Toast; import com.sw926.imagefileselector.ImageCropper; import com.sw926.imagefileselector.ImageFileSelector; import java.io.File; public class MainActivity extends Activity implements View.OnClickListener{ private Button btn_takepic,btn_choose; private ImageView imageView; ImageFileSelector mImageFileSelector; ImageCropper mImageCropper; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); imageView= (ImageView) findViewById(R.id.imageview); btn_choose= (Button) findViewById(R.id.btn_choose); btn_takepic= (Button) findViewById(R.id.btn_takepic); btn_choose.setOnClickListener(this); btn_takepic.setOnClickListener(this); //选择图片 mImageFileSelector = new ImageFileSelector(this); mImageFileSelector.setCallback(new ImageFileSelector.Callback() { @Override public void onSuccess(final String file) { // 选取图片成功 mImageCropper.cropImage(new File(file)); } @Override public void onError() { // 选取图片失败 Toast.makeText(MainActivity.this,"选择失败",Toast.LENGTH_SHORT).show(); } }); // 设置输出文件的尺寸 mImageFileSelector.setOutPutImageSize(800, 600); // 设置保存图片的质量 0到100 mImageFileSelector.setQuality(80); //裁剪图片 mImageCropper = new ImageCropper(this); mImageCropper.setCallback(new ImageCropper.ImageCropperCallback() { @Override public void onCropperCallback(ImageCropper.CropperResult result, File srcFile, File outFile) { if (result == ImageCropper.CropperResult.success) { // 成功 loadImage(outFile.getPath()); } else if (result == ImageCropper.CropperResult.error_illegal_input_file) { // 输入的文件失败 } else if (result == ImageCropper.CropperResult.error_illegal_out_file) { // 输出文件失败 } } }); // 设置输出文件的宽高比 mImageCropper.setOutPutAspect(1, 1); // 设置输出文件的尺寸 mImageCropper.setOutPut(800, 800); // 设置是否缩放到指定的尺寸 mImageCropper.setScale(true); } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); mImageFileSelector.onActivityResult(requestCode, resultCode, data); mImageCropper.onActivityResult(requestCode, resultCode, data); } @Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); mImageFileSelector.onSaveInstanceState(outState); mImageCropper.onSaveInstanceState(outState); } @Override protected void onRestoreInstanceState(Bundle savedInstanceState) { super.onRestoreInstanceState(savedInstanceState); mImageFileSelector.onRestoreInstanceState(savedInstanceState); mImageCropper.onRestoreInstanceState(savedInstanceState); } // Android 6.0的动态权限 @Override public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) { super.onRequestPermissionsResult(requestCode, permissions, grantResults); mImageFileSelector.onRequestPermissionsResult(requestCode, permissions, grantResults); } @Override public void onClick(View v) { switch (v.getId()) { case R.id.btn_takepic: mImageFileSelector.takePhoto(MainActivity.this); break; case R.id.btn_choose: mImageFileSelector.selectImage(MainActivity.this); break; } } private void loadImage(final String file) { new Thread(new Runnable() { @Override public void run() { final Bitmap bitmap = BitmapFactory.decodeFile(file); File imageFile = new File(file); final StringBuilder builder = new StringBuilder(); builder.append("path: "); builder.append(file); builder.append("\n\n"); builder.append("length: "); builder.append((int) (imageFile.length() / 1024d)); builder.append("KB"); builder.append("\n\n"); builder.append("image size: ("); builder.append(bitmap.getWidth()); builder.append(", "); builder.append(bitmap.getHeight()); builder.append(")"); runOnUiThread(new Runnable() { @Override public void run() { imageView.setImageBitmap(bitmap); } }); } }).start(); } }
[ "cy_nforget@126.com" ]
cy_nforget@126.com
f6f9761d395f2001d214b0eba422ecedccb73a70
39632f85e6d997d2e7b337dd919d12e18dfe5f21
/spring_4_1_ex1_springex/src/main/java/com/java/ex/MyInfo.java
7c2c72358446ec69944821543ac777e77a680331
[]
no_license
namjunemy/spring-for-junior-developer
abb509173c2cdb3667584bf6dbf50a9625a77638
c657ecd17ba30c159ad13f704c84cb202bfb569a
refs/heads/master
2021-08-28T07:10:07.467327
2017-12-11T14:39:46
2017-12-11T14:39:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,015
java
package com.java.ex; import java.util.ArrayList; public class MyInfo { private String name; private double height; private double weight; private ArrayList<String> hobbys; private BMICalculator bmiCalculator; public BMICalculator getBmiCalculator() { return bmiCalculator; } public void setBmiCalculator(BMICalculator bmiCalculator) { this.bmiCalculator = bmiCalculator; } public void setName(String name) { this.name = name; } public void setHeight(double height) { this.height = height; } public void setWeight(double weight) { this.weight = weight; } public void setHobbys(ArrayList<String> hobbys) { this.hobbys = hobbys; } public void bmiCalculation() { bmiCalculator.bmiCalculation(weight, height); } public void getInfo() { System.out.println("이름: " + name); System.out.println("키: " + height); System.out.println("몸무게: " + weight); System.out.println("취미: " + hobbys); bmiCalculation(); } }
[ "namjunemy@gmail.com" ]
namjunemy@gmail.com
1539a12ae25532f5fb7af65941e9348adf740984
b7179bb0f98adf47bcb7ab5c840b635ae47201d7
/src/main/java/com/javafast/app/modules/wms/AppWmsProductTypeController.java
dd452b4af1db2835ce02185b9d7d8d998fd9b1b2
[]
no_license
stormmain/javafastProj
8088c51314189fda0f1ad53fd4c6a48a39107c20
8fbf7efd354d83e29fe6d3a596eaa43b9f56732f
refs/heads/master
2022-12-26T15:06:38.929118
2019-09-12T15:56:48
2019-09-12T15:56:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,248
java
package com.javafast.app.modules.wms; import java.math.BigDecimal; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.javafast.common.persistence.Page; import com.javafast.common.utils.DateUtils; import com.javafast.common.utils.StringUtils; import com.javafast.modules.sys.entity.User; import com.javafast.modules.sys.utils.DictUtils; import com.javafast.modules.wms.entity.WmsProduct; import com.javafast.modules.wms.entity.WmsProductType; import com.javafast.modules.wms.service.WmsProductTypeService; /** * 产品 API Controller * @author syh * */ @Controller @RequestMapping(value = "${adminPath}/app/wms/wmsProductType") public class AppWmsProductTypeController { @Autowired private WmsProductTypeService wmsProductTypeService; /** * 分页查询列表 * @param pageNo 当前页码 * @param title * @return */ @SuppressWarnings("finally") @RequestMapping(value = "getList", method = RequestMethod.POST) @ResponseBody public JSONObject getList(String userId, String accountId, String pageNo, HttpServletRequest request, HttpServletResponse response) { JSONObject json =new JSONObject(); json.put("code", "0"); try { //校验输入参数 if(StringUtils.isBlank(pageNo)){ json.put("msg", "缺少参数pageNo"); return json; } if(StringUtils.isBlank(accountId)){ json.put("msg", "缺少参数accountId"); return json; } if(StringUtils.isBlank(userId)){ json.put("msg", "缺少参数userId"); return json; } WmsProductType wmsProductType = new WmsProductType(); wmsProductType.setIsApi(true); wmsProductType.setAccountId(accountId);//企业账号 List<WmsProductType> list = wmsProductTypeService.findList(wmsProductType); JSONArray jsonArray = new JSONArray(); for(int i=0;i<list.size();i++){ WmsProductType obj = list.get(i); JSONObject objJson = new JSONObject(); objJson.put("id", obj.getId()); objJson.put("name", obj.getName()); jsonArray.add(objJson); } json.put("list", jsonArray); json.put("lastPage", true); json.put("count", list.size()); json.put("code", "1"); } catch (Exception e) { json.put("error", ""); e.printStackTrace(); } finally { return json; } } @SuppressWarnings("finally") @RequestMapping(value = "getById", method = RequestMethod.POST) @ResponseBody public JSONObject getById(String id) { JSONObject json =new JSONObject(); json.put("code", "0"); try { //校验输入参数 if(StringUtils.isBlank(id)){ json.put("msg", "缺少参数id"); return json; } WmsProductType entity = wmsProductTypeService.get(id); if(entity != null){ json.put("entity", entity); json.put("code", "1"); } } catch (Exception e) { e.printStackTrace(); } finally { return json; } } /** * 保存 * @param id * @param name * @return */ @SuppressWarnings("finally") @RequestMapping(value = "save", method = RequestMethod.POST) @ResponseBody public JSONObject save(String id, String name, String accountId, String userId) { JSONObject json =new JSONObject(); json.put("code", "0"); try { WmsProductType wmsProductType; //校验输入参数 if(StringUtils.isBlank(name) || name.length()>50){ json.put("msg", "name参数错误"); return json; } if(StringUtils.isNotBlank(id)){ wmsProductType = wmsProductTypeService.get(id); wmsProductType.setUpdateBy(new User(userId)); }else{ //新增 wmsProductType = new WmsProductType(); wmsProductType.setAccountId(accountId); wmsProductType.setCreateBy(new User(userId)); wmsProductType.setUpdateBy(new User(userId)); } //产品基本信息 wmsProductType.setName(name); //保存产品信息 wmsProductTypeService.save(wmsProductType); json.put("id", wmsProductType.getId()); json.put("code", "1"); } catch (Exception e) { e.printStackTrace(); } finally { return json; } } /** * 删除 * @param id * @return */ @SuppressWarnings("finally") @RequestMapping(value = "del", method = RequestMethod.POST) @ResponseBody public JSONObject delById(String id) { JSONObject json =new JSONObject(); json.put("code", "0"); try { //校验输入参数 if(StringUtils.isBlank(id)){ json.put("msg", "缺少参数id"); return json; } wmsProductTypeService.delete(new WmsProductType(id)); json.put("code", "1"); } catch (Exception e) { e.printStackTrace(); } finally { return json; } } }
[ "a@Lenovo-PC" ]
a@Lenovo-PC
45f02caf8a6ba24afe61a776f17e7dd0b36cf8dc
1ee21e6530f6a579705a0eb341322fa3b48f9900
/app/src/main/java/com/example/lp/ddnwebserver/CoreService.java
1151412cf306d4195fb8008e8bd1af436301c07c
[]
no_license
CodeLpea/DdnWebServer
ea38d3f13fe625b68a647d80d3e26ecd0d54bd86
24fabefb449f9c12c0e6d87f979d93a65d1df7e8
refs/heads/master
2020-06-22T20:41:45.591491
2019-12-23T07:14:06
2019-12-23T07:14:06
198,394,690
0
2
null
null
null
null
UTF-8
Java
false
false
3,110
java
/* * Copyright © 2018 Zhenjie Yan. * * 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.example.lp.ddnwebserver; import android.app.Service; import android.content.Intent; import android.os.IBinder; import android.support.annotation.Nullable; import android.util.Log; import com.example.lp.ddnwebserver.util.NetUtils; import com.yanzhenjie.andserver.AndServer; import com.yanzhenjie.andserver.Server; import java.util.concurrent.TimeUnit; /** * Created by Zhenjie Yan on 2018/6/9. */ public class CoreService extends Service { private final static String TAG="CoreService"; private Server mServer; @Override public void onCreate() { Log.i(TAG, "onCreate: "); mServer = AndServer.serverBuilder(this) .inetAddress(NetUtils.getLocalIPAddress()) .port(8080) .timeout(10, TimeUnit.SECONDS) .listener(new Server.ServerListener() { @Override public void onStarted() { Log.i(TAG, "onStarted: "); String hostAddress = mServer.getInetAddress().getHostAddress(); ServerManager.onServerStart(CoreService.this, hostAddress); } @Override public void onStopped() { Log.i(TAG, "onStopped: "); ServerManager.onServerStop(CoreService.this); } @Override public void onException(Exception e) { Log.i(TAG, "onException: "); ServerManager.onServerError(CoreService.this, e.getMessage()); } }) .build(); } @Override public int onStartCommand(Intent intent, int flags, int startId) { startServer(); return START_STICKY; } @Override public void onDestroy() { stopServer(); super.onDestroy(); } /** * Start server. */ private void startServer() { Log.i(TAG, "startServer: "); if (mServer.isRunning()) { Log.i(TAG, "startServer: isRunning"); String hostAddress = mServer.getInetAddress().getHostAddress(); ServerManager.onServerStart(CoreService.this, hostAddress); } else { Log.i(TAG, "startServer: startup"); mServer.startup(); } } /** * Stop server. */ private void stopServer() { mServer.shutdown(); } @Nullable @Override public IBinder onBind(Intent intent) { return null; } }
[ "861596052@qq.com" ]
861596052@qq.com
0b6ba335f32c48f8f294669647b34bafaf54abde
3bcff6abe40f82b1007dfc26cec7729d2c12a78b
/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/listener/adapter/ReplyFailureException.java
22566471fcb64557aa202cd3f4a616e9b832c89e
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
ramakrishna580/spring-amqp
d3bb27282ab62da4236ff221a6924109cf00d151
ddeca26c04f44f01dbe07531aac2703950ab159a
refs/heads/master
2021-01-24T05:16:23.570553
2014-08-17T14:04:24
2014-08-18T08:07:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,025
java
/* * Copyright 2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.amqp.rabbit.listener.adapter; import org.springframework.amqp.AmqpException; /** * Exception to be thrown when the reply of a message failed to be sent. * * @author Stephane Nicoll * @since 2.0 */ @SuppressWarnings("serial") public class ReplyFailureException extends AmqpException { public ReplyFailureException(String msg, Throwable cause) { super(msg, cause); } }
[ "abilan@pivotal.io" ]
abilan@pivotal.io
9478a284d58fc452bee156ab7543c9724bb2096e
5557bbeb98dc88f6b7da7641d67e89004c33259d
/src/main/java/com/sap/oss/phosphor/fosstars/data/SimpleCompositeDataProvider.java
2ce0c64049e778d9a9d70625aaa94d8fd42dc01f
[ "Apache-2.0" ]
permissive
SAP/fosstars-rating-core
5a4e0afd49915ca52c178765257b8864da6ecebc
7b129aeb89b5f493f34d0874c9bbb39bd1d6d80e
refs/heads/master
2023-08-31T22:44:34.267972
2023-08-18T08:21:24
2023-08-18T08:21:24
236,462,734
50
30
Apache-2.0
2023-09-05T06:06:15
2020-01-27T10:08:24
Java
UTF-8
Java
false
false
7,003
java
package com.sap.oss.phosphor.fosstars.data; import static java.util.Collections.singleton; import static java.util.Objects.requireNonNull; import com.sap.oss.phosphor.fosstars.model.Feature; import com.sap.oss.phosphor.fosstars.model.Subject; import com.sap.oss.phosphor.fosstars.model.Value; import com.sap.oss.phosphor.fosstars.model.ValueSet; import com.sap.oss.phosphor.fosstars.model.value.ValueHashSet; import java.io.IOException; import java.util.Set; import java.util.function.Predicate; /** * A composite data provider that contains a non-interactive and an interactive data providers. * First, it looks for a value in a cache. If no value found in the cache, * it calls a non-interactive provider. If the provider could not obtain the value, * it calls the interactive provider. If it could not obtain the value either, * it returns a default value. */ public class SimpleCompositeDataProvider extends AbstractCachingDataProvider { /** * This predicate return true for all subject. */ private static final Predicate<Subject> SUPPORTS_ALL_SUBJECT = subject -> true; /** * A feature that the provider supports. */ private final Feature<?> feature; /** * A predicate the implements the {@link DataProvider#supports(Subject)} method. */ private final Predicate<Subject> support; /** * A non-interactive data provider. */ private final DataProvider nonInteractiveProvider; /** * An interactive data provider. */ private final DataProvider interactiveProvider; /** * A default value. */ private final Value<?> defaultValue; /** * Create a new data provider. * * @param feature A feature that the provider supports. * @param support A predicate the implements the {@link DataProvider#supports(Subject)} method. * @param nonInteractiveProvider A non-interactive data provider. * @param interactiveProvider An interactive data provider. * @param defaultValue A default value. */ public SimpleCompositeDataProvider(Feature<?> feature, Predicate<Subject> support, DataProvider nonInteractiveProvider, DataProvider interactiveProvider, Value<?> defaultValue) { requireNonNull(feature, "On no! Supported feature can't be null!"); requireNonNull(defaultValue, "On no! Default value can't be null!"); if (!defaultValue.feature().equals(feature)) { throw new IllegalArgumentException( "Oh no! The default value doesn't match with the supported feature!"); } if (nonInteractiveProvider != null) { if (!nonInteractiveProvider.supportedFeatures().contains(feature)) { throw new IllegalArgumentException( "Oh no! The non-interactive data provider supports unexpected features!"); } if (nonInteractiveProvider.interactive()) { throw new IllegalArgumentException("Oh no! Non-interactive provider is interactive!"); } } if (interactiveProvider != null) { if (!interactiveProvider.supportedFeatures().contains(feature)) { throw new IllegalArgumentException( "Oh no! The interactive data provider supports unexpected features!"); } if (!interactiveProvider.interactive()) { throw new IllegalArgumentException("Oh no! Interactive provider is not interactive!"); } } this.feature = feature; this.support = support != null ? support : SUPPORTS_ALL_SUBJECT; this.nonInteractiveProvider = nonInteractiveProvider; this.interactiveProvider = interactiveProvider; this.defaultValue = defaultValue; } @Override protected ValueSet fetchValuesFor(Subject subject) throws IOException { ValueSet values = new ValueHashSet(); if (nonInteractiveProvider != null) { nonInteractiveProvider.update(subject, values); if (weAreHappyWith(values)) { return values; } } if (interactiveProvider != null && callback.canTalk()) { interactiveProvider.update(subject, values); if (weAreHappyWith(values)) { return values; } } values.update(defaultValue); return values; } @Override public boolean interactive() { return false; } @Override public Set<Feature<?>> supportedFeatures() { return singleton(feature); } @Override public boolean supports(Subject subject) { return support.test(subject); } @Override public SimpleCompositeDataProvider set(UserCallback callback) { super.set(callback); interactiveProvider.set(callback); return this; } /** * Check if a value set contains a known value for the supported feature. * * @param values The value set. * @return True if the value set contains a known value for the supported feature, * false otherwise. */ private boolean weAreHappyWith(ValueSet values) { return values.of(feature).map(value -> !value.isUnknown()).orElse(false); } /** * Crete a builder for configuring a new data provider. * * @param feature A feature that the provider should support. * @return A builder. */ public static Builder forFeature(Feature<?> feature) { return new Builder(feature); } /** * A builder for configuring a data provider. */ public static class Builder { /** * A feature that the provider should support. */ private final Feature<?> feature; /** * A non-interactive data provider. */ private DataProvider nonInteractiveProvider; /** * An interactive data provider. */ private DataProvider interactiveProvider; /** * Create a new builder. * * @param feature A feature that the provider should support. */ private Builder(Feature<?> feature) { this.feature = requireNonNull(feature, "Oops! Feature is nul!"); } /** * Set an interactive data provider. * * @param provider The provider. * @return This builder. */ public Builder withInteractiveProvider(DataProvider provider) { this.interactiveProvider = requireNonNull(provider, "Hey! If you set a provider, it has to be non-null!"); return this; } /** * Set a non-interactive data provider. * * @param provider The provider. * @return This builder. */ public Builder withNonInteractiveProvider(DataProvider provider) { this.nonInteractiveProvider = requireNonNull(provider, "Hey! If you set a provider, it should not be null!"); return this; } /** * Create a configured data provider with a default value. * * @param value The default value. * @return A configured data provider. */ public SimpleCompositeDataProvider withDefaultValue(Value<?> value) { requireNonNull(value, "Hey! If you set a default value, it should not be null!"); return new SimpleCompositeDataProvider( feature, SUPPORTS_ALL_SUBJECT, nonInteractiveProvider, interactiveProvider, value); } } }
[ "artem.smotrakov@gmail.com" ]
artem.smotrakov@gmail.com
c808f6c8545ea498e205222232123e624c63bc38
d83516af69daf73a56a081f595c704d214c3963e
/nan21.dnet.module.ad/nan21.dnet.module.ad.presenter/src/main/java/net/nan21/dnet/module/ad/workflow/ds/model/ActProcessDefinitionLovDs.java
338ab10028d29a20b8471fa4105db9ea4b5734c5
[]
no_license
nan21/nan21.dnet.modules_oss
fb86d20bf8a3560d30c17e885a80f6bf48a147fe
0251680173bf2fa922850bef833cf85ba954bb60
refs/heads/master
2020-05-07T20:35:06.507957
2013-02-19T12:59:05
2013-02-19T12:59:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,751
java
/* * DNet eBusiness Suite * Copyright: 2010-2013 Nan21 Electronics SRL. All rights reserved. * Use is subject to license terms. */ package net.nan21.dnet.module.ad.workflow.ds.model; import net.nan21.dnet.core.api.annotation.Ds; import net.nan21.dnet.core.api.annotation.DsField; import net.nan21.dnet.core.api.annotation.SortField; import net.nan21.dnet.core.presenter.model.base.AbstractBaseDs; import net.nan21.dnet.module.ad.workflow.domain.entity.ActProcessDefinition; @Ds(entity = ActProcessDefinition.class, sort = {@SortField(field = ActProcessDefinitionLovDs.f_name)}) public class ActProcessDefinitionLovDs extends AbstractBaseDs<ActProcessDefinition> { public static final String f_id = "id"; public static final String f_clientId = "clientId"; public static final String f_name = "name"; public static final String f_fullName = "fullName"; @DsField private String id; @DsField private Long clientId; @DsField private String name; @DsField(fetch = false, jpqlFilter = " e.name like :fullName ") private String fullName; public ActProcessDefinitionLovDs() { super(); } public ActProcessDefinitionLovDs(ActProcessDefinition e) { super(e); } public String getId() { return this.id; } public void setId(Object id) { this.id = (String) id; } public Long getClientId() { return this.clientId; } public void setClientId(Long clientId) { this.clientId = clientId; } public String getName() { return this.name; } public void setName(String name) { this.name = name; } public String getFullName() { return this.fullName; } public void setFullName(String fullName) { this.fullName = fullName; } }
[ "mathe_attila@yahoo.com" ]
mathe_attila@yahoo.com
333ceca1e11f35309a42d7f348d873d00843aff3
53d677a55e4ece8883526738f1c9d00fa6560ff7
/com/tencent/mm/plugin/bbom/q.java
b3a1d8da591f1c63dd9c03f8604cf621e4683a84
[]
no_license
0jinxing/wechat-apk-source
544c2d79bfc10261eb36389c1edfdf553d8f312a
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
refs/heads/master
2020-06-07T20:06:03.580028
2019-06-21T09:17:26
2019-06-21T09:17:26
193,069,132
9
4
null
null
null
null
UTF-8
Java
false
false
530
java
package com.tencent.mm.plugin.bbom; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.mm.g.a.mp; import com.tencent.mm.sdk.b.c; public final class q extends c<mp> { public q() { AppMethodBeat.i(18322); this.xxI = mp.class.getName().hashCode(); AppMethodBeat.o(18322); } } /* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes3-dex2jar.jar * Qualified Name: com.tencent.mm.plugin.bbom.q * JD-Core Version: 0.6.2 */
[ "172601673@qq.com" ]
172601673@qq.com
1f8068dde74b383c081d53ded159501489ac800d
7e38620097d5f999540b5e21fdd1788d012d4783
/order/src/main/java/com/freedy/mall/order/web/PayWebController.java
dd5dc3d9441504ae6fc207acc6b828f328e54b46
[ "Apache-2.0" ]
permissive
Freedy001/gulimall
45411cc517d996cdaf012510a95c25d1ff0c005e
3e2b3881f2f605be7f159d56b9554ccd72aef336
refs/heads/develop
2023-06-21T02:53:57.391468
2021-07-10T16:18:16
2021-07-10T16:18:16
384,739,442
4
0
Apache-2.0
2021-07-10T16:18:17
2021-07-10T16:12:55
null
UTF-8
Java
false
false
992
java
package com.freedy.mall.order.web; import com.alipay.api.AlipayApiException; import com.freedy.mall.order.config.AlipayTemplate; import com.freedy.mall.order.service.OrderService; import com.freedy.mall.order.vo.PayVo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; /** * @author Freedy * @date 2021/3/30 16:14 */ @Controller public class PayWebController { @Autowired AlipayTemplate alipayTemplate; @Autowired OrderService orderService; @ResponseBody @GetMapping(value = "/payOrder",produces = "text/html") public String payOrder(@RequestParam("orderSn") String orderSn) throws AlipayApiException { PayVo payVo = orderService.getOrderPay(orderSn); return alipayTemplate.pay(payVo); } }
[ "985948228@qq.com" ]
985948228@qq.com
f9c389bef124ae10ec54b638e8f699b0e00e62b0
682269670289beb104ef26ef0c5b525ca4eafa0e
/config/src/main/java/dtmlibs/config/datasource/yaml/FileUtil.java
5eda089e08c5533ab6786da73e7f17802d6284e5
[ "MIT" ]
permissive
dumptruckman/dtmlibs
a34f40e0fe22389eeca611a999916d24f34fd9f3
338be3010ce3947be1e6073d446dec44d592c658
refs/heads/master
2021-01-20T11:45:18.759273
2018-01-21T16:22:53
2018-01-21T16:22:53
101,685,357
1
0
null
null
null
null
UTF-8
Java
false
false
3,787
java
/* * This file is part of dtmlibs. * * Copyright (c) 2017 Jeremy Wood * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package dtmlibs.config.datasource.yaml; import org.jetbrains.annotations.NotNull; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.io.Reader; import java.io.StringWriter; import java.io.Writer; class FileUtil { private static final int BUFFER_SIZE = 1024; /** * Pass a file and it will return it's contents as a string. * * @param file File to read. * @return Contents of file. String will be empty in case of any errors. */ public static String getFileContentsAsString(@NotNull final File file) throws IOException { if (!file.exists()) throw new IOException("File " + file + " does not exist"); if (!file.canRead()) throw new IOException("Cannot read file " + file); if (file.isDirectory()) throw new IOException("File " + file + " is directory"); Writer writer = new StringWriter(); InputStream is = null; Reader reader = null; try { is = new FileInputStream(file); reader = new BufferedReader(new InputStreamReader(is, "UTF-8")); int numberOfCharsRead; char[] buffer = new char[BUFFER_SIZE]; while ((numberOfCharsRead = reader.read(buffer)) != -1) { writer.write(buffer, 0, numberOfCharsRead); } } catch (IOException e) { e.printStackTrace(); } finally { if (is != null) { try { is.close(); } catch (IOException ignore) { } } if (reader != null) { try { reader.close(); } catch (IOException ignore) { } } } return writer.toString(); } public static void writeStringToFile(@NotNull String sourceString, @NotNull final File destinationFile) throws IOException { OutputStreamWriter out = null; try { sourceString = sourceString.replaceAll("\n", System.getProperty("line.separator")); out = new OutputStreamWriter(new FileOutputStream(destinationFile), "UTF-8"); out.write(sourceString); out.close(); } finally { if (out != null) { try { out.close(); } catch (IOException ignore) { } } } } }
[ "farachan@gmail.com" ]
farachan@gmail.com
69c888191a4443a4a85c300dca9d495a1e03e939
8e527c5f0073e1b2bec4509ff5fc93c6620b99b4
/jira-dvcs-connector-api/src/main/java/com/atlassian/jira/plugins/dvcs/model/GlobalFilter.java
bbcd0afae09d37a1579cc38d3804e6073e70f1ff
[ "BSD-2-Clause" ]
permissive
markphip/testing
25b1e1f538843df9920b6accd54462fce1d3ec5a
44a39b08af5964aa3e4c33467c8b7362f667f9b1
refs/heads/master
2023-09-01T00:07:58.631267
2015-07-16T20:14:32
2015-07-16T20:14:32
38,898,164
0
0
null
null
null
null
UTF-8
Java
false
false
1,662
java
package com.atlassian.jira.plugins.dvcs.model; import org.apache.commons.lang.builder.ToStringBuilder; /** * */ public class GlobalFilter { private Iterable<String> inProjects; private Iterable<String> notInProjects; private Iterable<String> inUsers; private Iterable<String> notInUsers; private Iterable<String> inIssues; private Iterable<String> notInIssues; public Iterable<String> getInProjects() { return inProjects; } public void setInProjects(Iterable<String> inProjects) { this.inProjects = inProjects; } public Iterable<String> getNotInProjects() { return notInProjects; } public void setNotInProjects(Iterable<String> notInProjects) { this.notInProjects = notInProjects; } public Iterable<String> getInUsers() { return inUsers; } public void setInUsers(Iterable<String> inUsers) { this.inUsers = inUsers; } public Iterable<String> getNotInUsers() { return notInUsers; } public void setNotInUsers(Iterable<String> notInUsers) { this.notInUsers = notInUsers; } public Iterable<String> getInIssues() { return inIssues; } public void setInIssues(Iterable<String> inIssues) { this.inIssues = inIssues; } public Iterable<String> getNotInIssues() { return notInIssues; } public void setNotInIssues(Iterable<String> notInIssues) { this.notInIssues = notInIssues; } @Override public String toString() { return ToStringBuilder.reflectionToString(this); } }
[ "devnull@localhost" ]
devnull@localhost
78bd38662e62beddbe095a48dbf3aeed015f951c
59e6dc1030446132fb451bd711d51afe0c222210
/components/remote-usermgt/org.wso2.carbon.um.ws.service/4.2.0/src/main/java/org/wso2/carbon/um/ws/service/ClaimManagerService.java
cd13c6f4eaabda6da331a5391388cb9c5d2fb61d
[]
no_license
Alsan/turing-chunk07
2f7470b72cc50a567241252e0bd4f27adc987d6e
e9e947718e3844c07361797bd52d3d1391d9fb5e
refs/heads/master
2020-05-26T06:20:24.554039
2014-02-07T12:02:53
2014-02-07T12:02:53
38,284,349
0
1
null
null
null
null
UTF-8
Java
false
false
4,797
java
/* * Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. 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.wso2.carbon.um.ws.service; import org.wso2.carbon.core.AbstractAdmin; import org.wso2.carbon.user.core.UserRealm; import org.wso2.carbon.user.core.UserStoreException; import org.wso2.carbon.user.api.Claim; import org.wso2.carbon.user.core.claim.ClaimManager; import org.wso2.carbon.user.api.ClaimMapping; public class ClaimManagerService extends AbstractAdmin { public void addNewClaimMapping(ClaimMapping mapping) throws UserStoreException { try { getClaimManager().addNewClaimMapping(mapping); } catch (org.wso2.carbon.user.api.UserStoreException e) { throw new UserStoreException(e); } } public void deleteClaimMapping(ClaimMapping mapping) throws UserStoreException { try { getClaimManager().deleteClaimMapping(mapping); } catch (org.wso2.carbon.user.api.UserStoreException e) { throw new UserStoreException(e); } } public ClaimMapping[] getAllClaimMappings(String dialectUri) throws UserStoreException { try { if (dialectUri == null) { return getClaimManager().getAllClaimMappings(); } else { return getClaimManager().getAllClaimMappings(dialectUri); } } catch (org.wso2.carbon.user.api.UserStoreException e) { throw new UserStoreException(e); } } public String[] getAllClaimUris() throws UserStoreException { try { return getClaimManager().getAllClaimUris(); } catch (org.wso2.carbon.user.api.UserStoreException e) { throw new UserStoreException(e); } } public ClaimMapping[] getAllRequiredClaimMappings() throws UserStoreException { try { return getClaimManager().getAllRequiredClaimMappings(); } catch (org.wso2.carbon.user.api.UserStoreException e) { throw new UserStoreException(e); } } public ClaimMapping[] getAllSupportClaimMappingsByDefault() throws UserStoreException { try { return getClaimManager().getAllSupportClaimMappingsByDefault(); } catch (org.wso2.carbon.user.api.UserStoreException e) { throw new UserStoreException(e); } } public String getAttributeName(String claimURI) throws UserStoreException { try { return getClaimManager().getAttributeName(claimURI); } catch (org.wso2.carbon.user.api.UserStoreException e) { throw new UserStoreException(e); } } public String getAttributeName(String domainName, String claimURI) throws UserStoreException { try { return getClaimManager().getAttributeName(domainName, claimURI); } catch (org.wso2.carbon.user.api.UserStoreException e) { throw new UserStoreException(e); } } public Claim getClaim(String claimURI) throws UserStoreException { try { return (Claim) getClaimManager().getClaim(claimURI); } catch (org.wso2.carbon.user.api.UserStoreException e) { throw new UserStoreException(e); } } public ClaimMapping getClaimMapping(String claimURI) throws UserStoreException { try { return getClaimManager().getClaimMapping(claimURI); } catch (org.wso2.carbon.user.api.UserStoreException e) { throw new UserStoreException(e); } } public void updateClaimMapping(ClaimMapping mapping) throws UserStoreException { try { getClaimManager().updateClaimMapping(mapping); } catch (org.wso2.carbon.user.api.UserStoreException e) { throw new UserStoreException(e); } } private ClaimManager getClaimManager() throws UserStoreException { try { UserRealm realm = super.getUserRealm(); if (realm == null) { throw new UserStoreException("UserRealm is null"); } return realm.getClaimManager(); } catch (Exception e) { throw new UserStoreException(e); } } }
[ "malaka@wso2.com" ]
malaka@wso2.com
8c2a9f06d183c66ef1022f8a88f8d5fa3fedc074
403a5d7a662919e9ed6090fe2a919fbdb4099036
/010--spring-boot-sample/src/main/java/com/iiit/train/springbootsample/config/Swagger2Config.java
10e1c97ba08c9772c2e198a2f97bf87bf8802f80
[]
no_license
rengang66/iiit.train.springcloud
ffac01561cc606d2da7baf431e9da76673db3e8d
5113b0f1ff82a85713592a31839cee1c1e661c27
refs/heads/master
2020-05-05T03:18:03.147637
2019-04-26T01:02:52
2019-04-26T01:02:52
179,667,306
1
0
null
null
null
null
UTF-8
Java
false
false
1,771
java
/** * Copyright (c) 2015 * All rights reserved. * * Created on 2016-10-10 */ package com.iiit.train.springbootsample.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import springfox.documentation.builders.ApiInfoBuilder; import springfox.documentation.builders.PathSelectors; import springfox.documentation.builders.RequestHandlerSelectors; import springfox.documentation.service.ApiInfo; import springfox.documentation.service.ApiListingReference; import springfox.documentation.spi.DocumentationType; import springfox.documentation.spring.web.plugins.Docket; import springfox.documentation.swagger2.annotations.EnableSwagger2; import java.util.ArrayList; import java.util.List; /** * Swagger配置信息 * * @author rengang(rengang66@sina.com) * @since 1.0.0 */ @Configuration @EnableSwagger2 public class Swagger2Config { @Bean public Docket createRestApi() { List<ApiListingReference> apiListingReferenceList = new ArrayList<>(); apiListingReferenceList.add(new ApiListingReference("", "", 0)); return new Docket(DocumentationType.SWAGGER_2) .apiInfo(apiInfo()) .select() .apis(RequestHandlerSelectors.basePackage("com.iiit.train.springcloud")) .paths(PathSelectors.any()) .build(); } private ApiInfo apiInfo() { return new ApiInfoBuilder() .title("SpringCloud Demo Projects RESTful APIs") .description("http://api.iiit.train.com/") .termsOfServiceUrl("https://iiit.train.com/") .contact("rengang(rengang66@sina.com)") .version("1.0.0") .build(); } }
[ "rengang66@sina.com" ]
rengang66@sina.com
e56cb07f773e46d52ae5d231b461e7817498f6e4
ec7cdb58fa20e255c23bc855738d842ee573858f
/java/defpackage/hz.java
215d60ed2b83e471fde7e1c336621390918782cd
[]
no_license
BeCandid/JaDX
591e0abee58764b0f58d1883de9324bf43b52c56
9a3fa0e7c14a35bc528d0b019f850b190a054c3f
refs/heads/master
2021-01-13T11:23:00.068480
2016-12-24T10:39:48
2016-12-24T10:39:48
77,222,067
1
0
null
null
null
null
UTF-8
Java
false
false
1,977
java
package defpackage; import android.os.Bundle; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.RecyclerView.ItemAnimator; import android.support.v7.widget.RecyclerView.LayoutManager; import android.support.v7.widget.SimpleItemAnimator; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import java.util.HashMap; import java.util.Map; import rx.schedulers.Schedulers; /* compiled from: MessagesActiveFragment */ public class hz extends hy { private View f; private View g; private RecyclerView h; private hl i; private SwipeRefreshLayout j; public void b(String page) { Map<String, String> params = new HashMap(); params.put("thread_page", page); params.put("include_messages", "1"); ik.a().p(params).b(Schedulers.io()).a(apv.a()).b(new hz$1(this, page)); } public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { this.f = inflater.inflate(2130968681, container, false); this.g = this.f.findViewById(2131624482); this.h = (RecyclerView) this.f.findViewById(2131624481); LayoutManager layoutManager = new LinearLayoutManager(getContext()); this.h.setLayoutManager(layoutManager); this.i = new hl(getActivity()); this.h.setAdapter(this.i); this.h.addOnScrollListener(new hz$2(this, (LinearLayoutManager) layoutManager, this.i)); ItemAnimator animator = this.h.getItemAnimator(); if (animator instanceof SimpleItemAnimator) { ((SimpleItemAnimator) animator).setSupportsChangeAnimations(false); } this.j = (SwipeRefreshLayout) this.f.findViewById(2131624480); this.j.setOnRefreshListener(new hz$3(this)); this.j.post(new hz$4(this)); return this.f; } }
[ "admin@timo.de.vc" ]
admin@timo.de.vc
63ef28f8894824049b6e697284a14edc91bbdedb
8f2657a98e0a1103d90af63fe0dacaccffed28fc
/SimpleJet/app/src/main/java/com/edimaudo/simplejet/Player.java
25ed69c3337167112ce5bf2406b3ebf4fe437b0e
[]
no_license
edimaudo/Android-Projects
0634468b5cee9c9564761d4e4603865aa9bbe1d3
9d0f484db93bb6787f98ceacd91d004a1bbac270
refs/heads/master
2022-10-02T08:09:29.757671
2022-09-02T01:37:59
2022-09-02T01:37:59
64,692,993
9
5
null
null
null
null
UTF-8
Java
false
false
2,971
java
package com.edimaudo.simplejet; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Rect; /** * Created by edima on 2017-05-31. */ public class Player { //Bitmap to get character from image private Bitmap bitmap; //coordinates private int x; private int y; //motion speed of the character private int speed = 0; //boolean variable to track the ship is boosting or not private boolean boosting; //Gravity Value to add gravity effect on the ship private final int GRAVITY = -10; //Controlling Y coordinate so that ship won't go outside the screen private int maxY; private int minY; //Limit the bounds of the ship's speed private final int MIN_SPEED = 1; private final int MAX_SPEED = 20; private Rect detectCollision; //constructor public Player(Context context, int screenX, int screenY) { x = 75; y = 50; speed = 1; //Getting bitmap from drawable resource bitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.player); //calculating maxY maxY = screenY - bitmap.getHeight(); //top edge's y point is 0 so min y will always be zero minY = 0; //setting the boosting value to false initially boosting = false; //initializing rect object detectCollision = new Rect(x, y, bitmap.getWidth(), bitmap.getHeight()); } //setting boosting true public void setBoosting() { boosting = true; } //setting boosting false public void stopBoosting() { boosting = false; } //Method to update coordinate of character public void update(){ //if the ship is boosting if (boosting) { //speeding up the ship speed += 2; } else { //slowing down if not boosting speed -= 5; } //controlling the top speed if (speed > MAX_SPEED) { speed = MAX_SPEED; } //if the speed is less than min speed //controlling it so that it won't stop completely if (speed < MIN_SPEED) { speed = MIN_SPEED; } //moving the ship down y -= speed + GRAVITY; //but controlling it also so that it won't go off the screen if (y < minY) { y = minY; } if (y > maxY) { y = maxY; } //updating x coordinate //x++; //adding top, left, bottom and right to the rect object detectCollision.left = x; detectCollision.top = y; detectCollision.right = x + bitmap.getWidth(); detectCollision.bottom = y + bitmap.getHeight(); } /* * These are getters you can generate it autmaticallyl * right click on editor -> generate -> getters * */ //one more getter for getting the rect object public Rect getDetectCollision() { return detectCollision; } public Bitmap getBitmap() { return bitmap; } public int getX() { return x; } public int getY() { return y; } public int getSpeed() { return speed; } }
[ "edimaudo@gmail.com" ]
edimaudo@gmail.com
6d70219e21318fdde2018f8394cde14824567621
dfa8d3e26e66f0cb6d55199321786080a2867dd2
/transaction-base/core/src/main/java/com/jef/transaction/core/rpc/netty/v1/ProtocolV1Encoder.java
d7ad4464545eb4032a2ad8ace11f79d777ebcb9c
[]
no_license
s1991721/cloud_transaction
e61b2eae4a283bf772b56c646f2d897215eb5dec
015507cd87b5ba95905e7fefeb462be94c4660c4
refs/heads/main
2023-08-04T01:41:02.147299
2021-09-10T08:01:53
2021-09-10T08:01:53
401,238,251
0
0
null
null
null
null
UTF-8
Java
false
false
5,768
java
/* * Copyright 1999-2019 Seata.io Group. * * 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.jef.transaction.core.rpc.netty.v1; import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.MessageToByteEncoder; import com.jef.transaction.common.loader.EnhancedServiceLoader; import com.jef.transaction.core.serializer.Serializer; import com.jef.transaction.core.compressor.Compressor; import com.jef.transaction.core.compressor.CompressorFactory; import com.jef.transaction.core.protocol.ProtocolConstants; import com.jef.transaction.core.protocol.RpcMessage; import com.jef.transaction.core.serializer.SerializerType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.Map; /** * <pre> * 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 * +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+ * | magic |Proto| Full length | Head | Msg |Seria|Compr| RequestId | * | code |colVer| (head+body) | Length |Type |lizer|ess | | * +-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+ * | | * | Head Map [Optional] | * +-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+ * | | * | body | * | | * | ... ... | * +-----------------------------------------------------------------------------------------------+ * </pre> * <p> * <li>Full Length: include all data </li> * <li>Head Length: include head data from magic code to head map. </li> * <li>Body Length: Full Length - Head Length</li> * </p> * https://github.com/seata/seata/issues/893 * * @author Geng Zhang * @see ProtocolV1Decoder * @since 0.7.0 */ public class ProtocolV1Encoder extends MessageToByteEncoder { private static final Logger LOGGER = LoggerFactory.getLogger(ProtocolV1Encoder.class); @Override public void encode(ChannelHandlerContext ctx, Object msg, ByteBuf out) { try { if (msg instanceof RpcMessage) { RpcMessage rpcMessage = (RpcMessage) msg; int fullLength = ProtocolConstants.V1_HEAD_LENGTH; int headLength = ProtocolConstants.V1_HEAD_LENGTH; byte messageType = rpcMessage.getMessageType(); out.writeBytes(ProtocolConstants.MAGIC_CODE_BYTES); out.writeByte(ProtocolConstants.VERSION); // full Length(4B) and head length(2B) will fix in the end. out.writerIndex(out.writerIndex() + 6); out.writeByte(messageType); out.writeByte(rpcMessage.getCodec()); out.writeByte(rpcMessage.getCompressor()); out.writeInt(rpcMessage.getId()); // direct write head with zero-copy Map<String, String> headMap = rpcMessage.getHeadMap(); if (headMap != null && !headMap.isEmpty()) { int headMapBytesLength = HeadMapSerializer.getInstance().encode(headMap, out); headLength += headMapBytesLength; fullLength += headMapBytesLength; } byte[] bodyBytes = null; if (messageType != ProtocolConstants.MSGTYPE_HEARTBEAT_REQUEST && messageType != ProtocolConstants.MSGTYPE_HEARTBEAT_RESPONSE) { // heartbeat has no body Serializer serializer = EnhancedServiceLoader.load(Serializer.class, SerializerType.getByCode(rpcMessage.getCodec()).name()); bodyBytes = serializer.serialize(rpcMessage.getBody()); Compressor compressor = CompressorFactory.getCompressor(rpcMessage.getCompressor()); bodyBytes = compressor.compress(bodyBytes); fullLength += bodyBytes.length; } if (bodyBytes != null) { out.writeBytes(bodyBytes); } // fix fullLength and headLength int writeIndex = out.writerIndex(); // skip magic code(2B) + version(1B) out.writerIndex(writeIndex - fullLength + 3); out.writeInt(fullLength); out.writeShort(headLength); out.writerIndex(writeIndex); } else { throw new UnsupportedOperationException("Not support this class:" + msg.getClass()); } } catch (Throwable e) { LOGGER.error("Encode request error!", e); } } }
[ "278971585@qq.com" ]
278971585@qq.com
92d27cfbfd65a0f3c9eaf44c64d911d914db9079
e553161c3adba5c1b19914adbacd58f34f27788e
/xstream-1.2/xstream/src/java/com/thoughtworks/xstream/converters/collections/BitSetConverter.java
c6cebb08086340d263fc04975e35d3486462da97
[]
no_license
ReedOei/dependent-tests-experiments
57daf82d1feb23165651067b7ac004dd74d1e23d
9fccc06ec13ff69a1ac8fb2a4dd6f93c89ebd29b
refs/heads/master
2020-03-20T02:50:59.514767
2018-08-23T16:46:01
2018-08-23T16:46:01
137,126,354
1
0
null
null
null
null
UTF-8
Java
false
false
1,673
java
package com.thoughtworks.xstream.converters.collections; import com.thoughtworks.xstream.converters.Converter; import com.thoughtworks.xstream.converters.MarshallingContext; import com.thoughtworks.xstream.converters.UnmarshallingContext; import com.thoughtworks.xstream.io.HierarchicalStreamReader; import com.thoughtworks.xstream.io.HierarchicalStreamWriter; import java.util.BitSet; import java.util.StringTokenizer; /** * Converts a java.util.BitSet to XML, as a compact * comma delimited list of ones and zeros. * * @author Joe Walnes */ public class BitSetConverter implements Converter { public boolean canConvert(Class type) { return type.equals(BitSet.class); } public void marshal(Object source, HierarchicalStreamWriter writer, MarshallingContext context) { BitSet bitSet = (BitSet) source; StringBuffer buffer = new StringBuffer(); boolean seenFirst = false; for (int i = 0; i < bitSet.length(); i++) { if (bitSet.get(i)) { if (seenFirst) { buffer.append(','); } else { seenFirst = true; } buffer.append(i); } } writer.setValue(buffer.toString()); } public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) { BitSet result = new BitSet(); StringTokenizer tokenizer = new StringTokenizer(reader.getValue(), ",", false); while (tokenizer.hasMoreTokens()) { int index = Integer.parseInt(tokenizer.nextToken()); result.set(index); } return result; } }
[ "oei.reed@gmail.com" ]
oei.reed@gmail.com
bc06d3136ab37708202624adf07a564918de99e7
aef43f996db20865c4f6b7d93a8b6442c093a5ed
/src/main/java/com/joon/imageshopthymeleaf/service/UserItemService.java
91cc8b6a19ea85ff17f7fc376ef04b4cacbdb4cb
[]
no_license
wnstlr0615/ImageShop-thymeleaf
a771a78f28cfb0597600f136c25e7c94f0132d9a
ad60a8d3344fb8a5961a7ca565c21c1fd5dfc152
refs/heads/main
2023-06-10T18:37:11.241314
2021-07-03T06:45:29
2021-07-03T06:45:29
379,107,702
0
0
null
null
null
null
UTF-8
Java
false
false
393
java
package com.joon.imageshopthymeleaf.service; import com.joon.imageshopthymeleaf.entity.Member; import com.joon.imageshopthymeleaf.entity.UserItem; import java.util.List; public interface UserItemService { void register(Member member, Long itemId); List<UserItem> list(Member member); UserItem findOne(Long userItemId); UserItem download(Long userItemNo, Member member); }
[ "ryan0@kakao.com" ]
ryan0@kakao.com
80c7d40b619f8be24775564289511c9a52058d9f
90800e4e0495075e9a33250ddc71a24a8988682c
/core-inject/src/main/java/io/activej/inject/impl/CompiledBinding.java
d1fa18e48d291a9ddc10e80a6f7c4740a26d5060
[ "Apache-2.0" ]
permissive
akullpp/activej
5421cbfe439399a2136fa0d2f4a22319c2b037cf
069c906110f44046bcd028877cfae36c36f80c4b
refs/heads/master
2022-11-16T17:13:13.140273
2020-07-16T14:51:48
2020-07-16T14:51:48
280,828,147
6
1
Apache-2.0
2020-07-19T08:56:58
2020-07-19T08:56:57
null
UTF-8
Java
false
false
1,510
java
/* * Copyright (C) 2020 ActiveJ 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 * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.activej.inject.impl; import java.util.concurrent.atomic.AtomicReferenceArray; /** * This is defined as an abstract class and not a functional interface so that * any anonymous class usage is compiled as a inner class and not a method with invokedynamic instruction. * This is needed for compiled bindings to be applicable for later specialization. */ @SuppressWarnings("rawtypes") public interface CompiledBinding<R> { @SuppressWarnings("Convert2Lambda") CompiledBinding<?> MISSING_OPTIONAL_BINDING = new CompiledBinding<Object>() { @Override public Object getInstance(AtomicReferenceArray[] scopedInstances, int synchronizedScope) { return null; } }; R getInstance(AtomicReferenceArray[] scopedInstances, int synchronizedScope); @SuppressWarnings("unchecked") static <R> CompiledBinding<R> missingOptionalBinding() { return (CompiledBinding<R>) MISSING_OPTIONAL_BINDING; } }
[ "dmitry@activej.io" ]
dmitry@activej.io
7692a95c77837d0b86092e572e0136bd0018af57
8bdda30bbcea1990fb56c2a083ca2a5693ca9b13
/sources/com/google/android/gms/internal/zzmo.java
5f9f760d7586d657ccc559c262fe5644ce032f36
[]
no_license
yusato0378/aa
b14e247470efaf28efcc847433eff4aeb7790be6
ffc764c33c6f423d8dd6b1837446583d96a67e05
refs/heads/master
2021-01-10T01:10:49.084058
2016-01-09T12:02:01
2016-01-09T12:02:01
49,321,731
1
0
null
null
null
null
UTF-8
Java
false
false
1,483
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) package com.google.android.gms.internal; import com.google.android.gms.common.internal.zzv; import java.util.*; // Referenced classes of package com.google.android.gms.internal: // zzmj public class zzmo { public zzmo() { } public String getId() { StringBuilder stringbuilder = new StringBuilder(); Iterator iterator = zzaGZ.iterator(); boolean flag = true; while(iterator.hasNext()) { zzmj zzmj1 = (zzmj)iterator.next(); if(flag) flag = false; else stringbuilder.append("#"); stringbuilder.append(zzmj1.getContainerId()); } return stringbuilder.toString(); } public zzmo zzb(zzmj zzmj1) throws IllegalArgumentException { zzv.zzr(zzmj1); for(Iterator iterator = zzaGZ.iterator(); iterator.hasNext();) if(((zzmj)iterator.next()).getContainerId().equals(zzmj1.getContainerId())) throw new IllegalArgumentException((new StringBuilder()).append("The container is already being requested. ").append(zzmj1.getContainerId()).toString()); zzaGZ.add(zzmj1); return this; } public List zzyl() { return zzaGZ; } private final List zzaGZ = new ArrayList(); }
[ "yu0378@gmail.com" ]
yu0378@gmail.com
c4505bbff0ab2ced7dfff853f7bd1d3c4f0f8e2b
53be82f4de76e68063528f843d508f92cd434bd8
/src/main/java/com/sen/queue/QueueDemo.java
7756f67ee32a4485c84b2a5d248d34e87cb640eb
[]
no_license
sumforest/algorithm
cd8aa84fd58149d4f0148a74348508229224fbdf
611b87a12a07873f5c7ee05c229791a8233de3b8
refs/heads/master
2020-08-13T22:13:51.584267
2020-01-10T18:38:48
2020-01-10T18:38:48
215,046,384
0
0
null
null
null
null
UTF-8
Java
false
false
1,249
java
package com.sen.queue; /** * @Auther: Sen * @Date: 2019/10/17 14:46 * @Description: */ public class QueueDemo { private int[] elements; public QueueDemo() { elements = new int[0]; } /** * 入队 * @param element */ public void add(int element) { //创建一个新的数组 int[] newArrary = new int[elements.length + 1]; //把原数组的值复制到新数组 for (int i = 0; i < elements.length; i++) { newArrary[i] = elements[i]; } newArrary[newArrary.length - 1] = element; elements = newArrary; } /** * 出队 * @return */ public int poll() { int element = elements[0]; //创建一个新的数组 int[] newArrary = new int[elements.length - 1]; for (int i = 0; i < newArrary.length; i++) { newArrary[i] = elements[i + 1]; } elements = newArrary; return element; } /** * 判断队列是否为空 * @return */ public boolean isEmpty() { return elements.length == 0; } /** * 获取队列的大小 * @return */ public int size() { return elements.length; } }
[ "12345678" ]
12345678
e16fd263b714d70cedf2d8863ca34c4c13bc09a5
3d22e2c39d85894e4a9cfa55c442685e926e8c8a
/src/main/java/com/uxunchina/emall/service/impl/SysUserServiceImpl.java
c03703e75c8f196031677ee6a61a2ada8591fe74
[]
no_license
jx3fans/yyadmin
372e02555cb770b89e14ada495ca02d74371a1fe
7664cc71656ce97a0792a0b90a9b40d69386fa8d
refs/heads/master
2021-05-06T17:28:55.863062
2017-11-24T03:25:05
2017-11-24T03:25:05
111,867,383
1
0
null
null
null
null
UTF-8
Java
false
false
2,595
java
package com.uxunchina.emall.service.impl; import java.util.Date; import java.util.Map; import org.apache.commons.lang3.ArrayUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.baomidou.mybatisplus.plugins.Page; import com.baomidou.mybatisplus.service.impl.ServiceImpl; import com.uxunchina.emall.common.util.ShiroUtil; import com.uxunchina.emall.entity.SysUser; import com.uxunchina.emall.entity.SysUserRole; import com.uxunchina.emall.mapper.SysUserMapper; import com.uxunchina.emall.mapper.SysUserRoleMapper; import com.uxunchina.emall.service.ISysUserService; /** * * SysUser 表数据服务层接口实现类 * */ @Service public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements ISysUserService { @Autowired private SysUserMapper userMapper; @Autowired private SysUserRoleMapper userRoleMapper; @Override public void insertUser(SysUser user, String[] roleIds) { // TODO Auto-generated method stub user.setCreateTime(new Date()); user.setPassword(ShiroUtil.md51024Pwd(user.getPassword(), user.getUserName())); // 保存用户 userMapper.insert(user); // 绑定角色 if (ArrayUtils.isNotEmpty(roleIds)) { for (String rid : roleIds) { SysUserRole sysUserRole = new SysUserRole(); sysUserRole.setUserId(user.getId()); sysUserRole.setRoleId(rid); userRoleMapper.insert(sysUserRole); } } } @Override public void updateUser(SysUser sysUser, String[] roleIds) { // TODO Auto-generated method stub sysUser.setPassword(null); // 更新用户 userMapper.updateById(sysUser); // 删除已有权限 userRoleMapper.delete(new EntityWrapper<SysUserRole>().eq("userId", sysUser.getId())); // 重新绑定角色 if (ArrayUtils.isNotEmpty(roleIds)) { for (String rid : roleIds) { SysUserRole sysUserRole = new SysUserRole(); sysUserRole.setUserId(sysUser.getId()); sysUserRole.setRoleId(rid); userRoleMapper.insert(sysUserRole); } } } @Override public Page<Map<Object, Object>> selectUserPage(Page<Map<Object, Object>> page, String search) { // TODO Auto-generated method stub page.setRecords(baseMapper.selectUserList(page, search)); return page; } @Override public void delete(String id) { // TODO Auto-generated method stub this.deleteById(id); userRoleMapper.delete(new EntityWrapper<SysUserRole>().addFilter("userId = {0}", id)); } }
[ "a@a.com" ]
a@a.com
970aee50b34c2a4ab54c036749cd53d864a6bc84
c548ccabce8c7b55c8ea5e2820fe314ffd8215e2
/src/Splitwise/Customers.java
1044de6259e3ea9e9fa0334bcabc35b578f4e3b5
[]
no_license
harshamachanapally/HIbernate
c6f23d97ecfb26b4284022de8475d34f70dd87d5
8e035dd5cc4f6d28f76ca5f2602b84f7c09a0227
refs/heads/master
2021-01-11T23:40:16.421267
2017-01-11T08:26:06
2017-01-11T08:26:06
78,618,274
0
0
null
null
null
null
UTF-8
Java
false
false
1,763
java
package Splitwise; import java.util.ArrayList; import java.util.Collection; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.JoinTable; import javax.persistence.ManyToMany; import javax.persistence.*; import org.hibernate.annotations.CollectionId; import org.hibernate.annotations.GenericGenerator; import org.hibernate.annotations.Type; @Entity @Table (name = "CustomerDetails") @NamedQuery(name = "Customers.byemail", query = "from Customers c where c = ?") public class Customers { @Id @GeneratedValue private int userId; private String name; private String email; @ManyToMany @JoinTable(name="FriendsList",joinColumns = @JoinColumn(name="Customer_userId"), uniqueConstraints = @UniqueConstraint(columnNames = {"Friend_userId", "Customer_userid"})) @GenericGenerator(name = "sequence-gen", strategy = "sequence") @CollectionId(columns = {@Column(name="Friend_Id")}, generator = "sequence-gen", type = @Type(type= "int")) private Collection<Customers> Friend = new ArrayList<Customers>(); public int getUserId() { return userId; } public void setUserId(int userId) { this.userId = userId; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public Collection<Customers> getFriend() { return Friend; } public void setFriend(Collection<Customers> friend) { Friend = friend; } public void addfriends(Customers customer,Customers friend){ customer.getFriend().add(friend); friend.getFriend().add(customer); } }
[ "hrshchaitanya@gmail.com" ]
hrshchaitanya@gmail.com
df82bb4e6c25f7e1cb634446c6cd07b393477fea
ef2aaf0c359a9487f269d792c53472e4b41689a6
/documentation/design/essn/SubjectRegistry/edu/duke/cabig/c3pr/webservice/iso21090/NPPDTSBirth.java
064fc45ac6985729a59cf9c374cfa30c43daa9bc
[]
no_license
NCIP/c3pr-docs
eec40451ac30fb5fee55bb2d22c10c6ae400845e
5adca8c04fcb47adecbb4c045be98fcced6ceaee
refs/heads/master
2016-09-05T22:56:44.805679
2013-03-08T19:59:03
2013-03-08T19:59:03
7,276,330
1
0
null
null
null
null
UTF-8
Java
false
false
1,742
java
package edu.duke.cabig.c3pr.webservice.iso21090; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for NPPD_TS.Birth complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="NPPD_TS.Birth"> * &lt;complexContent> * &lt;extension base="{uri:iso.org:21090}ANY"> * &lt;sequence> * &lt;element name="item" type="{uri:iso.org:21090}UVP_TS.Birth" maxOccurs="unbounded" minOccurs="0"/> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "NPPD_TS.Birth", propOrder = { "item" }) public class NPPDTSBirth extends ANY { protected List<UVPTSBirth> item; /** * Gets the value of the item property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the item property. * * <p> * For example, to add a new item, do as follows: * <pre> * getItem().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link UVPTSBirth } * * */ public List<UVPTSBirth> getItem() { if (item == null) { item = new ArrayList<UVPTSBirth>(); } return this.item; } }
[ "kruttikagarwal@gmail.com" ]
kruttikagarwal@gmail.com
b5596a244590807145690175be6e47e28d01f0db
0459a7e4333d680a38c70d61997920212d78aff5
/Other Platforms/3DR_Solo/3DRSoloHacks/3DRSoloHacks-master/src/com/google/android/gms/maps/OnStreetViewPanoramaReadyCallback.java
4894dc0f0754ab7f4e1f48902dfce3f78a7c65a7
[]
no_license
rcjetpilot/DJI-Hacking
4c5b4936ca30d7542cbd440e99ef0401f8185ab9
316a8e92fdfbad685fe35216e1293d0a3b3067d8
refs/heads/master
2020-05-17T10:41:52.166389
2018-02-19T20:04:06
2018-02-19T20:04:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
230
java
class { } /* Location: /Users/kfinisterre/Desktop/Solo/3DRSoloHacks/unpacked_apk/classes_dex2jar.jar * Qualified Name: com.google.android.gms.maps.OnStreetViewPanoramaReadyCallback * JD-Core Version: 0.6.2 */
[ "jajunkmail32@gmail.com" ]
jajunkmail32@gmail.com
34f70e4865d379ec89b5b317073c660b389354d4
6d943c9f546854a99ae27784d582955830993cee
/modules/dfp_axis/src/main/java/com/google/api/ads/admanager/axis/v202002/ActivateCdnConfigurations.java
d88120be615bb8bb9c039b9eaa517c5525b7aec8
[ "Apache-2.0" ]
permissive
MinYoungKim1997/googleads-java-lib
02da3d3f1de3edf388a3f2d3669a86fe1087231c
16968056a0c2a9ea1676b378ab7cbfe1395de71b
refs/heads/master
2021-03-25T15:24:24.446692
2020-03-16T06:36:10
2020-03-16T06:36:10
247,628,741
0
0
Apache-2.0
2020-03-16T06:36:35
2020-03-16T06:36:34
null
UTF-8
Java
false
false
3,359
java
// Copyright 2020 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 // // 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. /** * ActivateCdnConfigurations.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter. */ package com.google.api.ads.admanager.axis.v202002; /** * The action used for activating {@link CdnConfiguration} objects. */ public class ActivateCdnConfigurations extends com.google.api.ads.admanager.axis.v202002.CdnConfigurationAction implements java.io.Serializable { public ActivateCdnConfigurations() { } @Override public String toString() { return com.google.common.base.MoreObjects.toStringHelper(this.getClass()) .omitNullValues() .toString(); } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof ActivateCdnConfigurations)) return false; ActivateCdnConfigurations other = (ActivateCdnConfigurations) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = super.equals(obj); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = super.hashCode(); __hashCodeCalc = false; return _hashCode; } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(ActivateCdnConfigurations.class, true); static { typeDesc.setXmlType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v202002", "ActivateCdnConfigurations")); } /** * Return type metadata object */ public static org.apache.axis.description.TypeDesc getTypeDesc() { return typeDesc; } /** * Get Custom Serializer */ public static org.apache.axis.encoding.Serializer getSerializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanSerializer( _javaType, _xmlType, typeDesc); } /** * Get Custom Deserializer */ public static org.apache.axis.encoding.Deserializer getDeserializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanDeserializer( _javaType, _xmlType, typeDesc); } }
[ "christopherseeley@users.noreply.github.com" ]
christopherseeley@users.noreply.github.com
8b291de49e6543394dc35c6b7ffd16756d1c8233
4917b656b28d146d0f65834f3542c4e72905317e
/src/splashScreen/splashScreenController.java
bc32d5382d6e12fc6a4fe98f2ceb3f3ff23b1cf9
[]
no_license
somtooo/HotelManagementSystem
1b91f2028f4cbab3e7eb67364add5527bcfcd1d7
06f4244fdd3c6a3a854fe250c8c950be6b04147f
refs/heads/master
2020-09-17T14:52:59.913356
2020-06-14T21:03:09
2020-06-14T21:03:09
224,097,992
1
0
null
null
null
null
UTF-8
Java
false
false
1,215
java
package splashScreen; import helperFunctions.CreateNewStage; import javafx.animation.FadeTransition; import javafx.fxml.FXML; import javafx.fxml.FXMLLoader; import javafx.fxml.Initializable; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.scene.image.ImageView; import javafx.scene.layout.AnchorPane; import javafx.stage.Stage; import javafx.stage.StageStyle; import javafx.util.Duration; import loginScreen.loginScreenController; import java.io.IOException; import java.net.URL; import java.util.ResourceBundle; import java.util.logging.Level; import java.util.logging.Logger; public class splashScreenController extends CreateNewStage implements Initializable { @FXML private ImageView splashScreenImage; @FXML private AnchorPane anchorPane; @Override public void initialize(URL location, ResourceBundle resources) { FadeTransition fadeTransition = new FadeTransition(Duration.millis(4000), splashScreenImage ); fadeTransition.setFromValue(1.0); fadeTransition.setToValue(0); fadeTransition.play(); fadeTransition.setOnFinished(event -> { newStage("../loginScreen/loginScreen.fxml",anchorPane); }); } }
[ "you@example.com" ]
you@example.com
1fe3ad4086ae610b7612d47da1cc8432db5d1944
62a88d5a2b5aca6596ea0beeec8f080ef055852e
/app/src/main/java/org/ogre/HardwareBuffer.java
e14d4bb45c78abd1276bc484993be6dbcf51724a
[ "MIT" ]
permissive
RobertPoncelet/OGREWallpaper
d3e303a6c14201556c41302fe824edb18a00f766
83f8126c168bdbe7ac04887bfb3fa2d7600ff0be
refs/heads/main
2023-08-04T13:23:02.803165
2021-09-10T22:04:23
2021-09-10T22:04:23
404,903,779
1
0
null
null
null
null
UTF-8
Java
false
false
6,483
java
/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 3.0.8 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ package org.ogre; public class HardwareBuffer { private transient long swigCPtr; protected transient boolean swigCMemOwn; protected HardwareBuffer(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } protected static long getCPtr(HardwareBuffer obj) { return (obj == null) ? 0 : obj.swigCPtr; } protected void finalize() { delete(); } public synchronized void delete() { if (swigCPtr != 0) { if (swigCMemOwn) { swigCMemOwn = false; OgreJNI.delete_HardwareBuffer(swigCPtr); } swigCPtr = 0; } } public SWIGTYPE_p_void lock(long offset, long length, HardwareBuffer.LockOptions options) { long cPtr = OgreJNI.HardwareBuffer_lock__SWIG_0(swigCPtr, this, offset, length, options.swigValue()); return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false); } public SWIGTYPE_p_void lock(HardwareBuffer.LockOptions options) { long cPtr = OgreJNI.HardwareBuffer_lock__SWIG_1(swigCPtr, this, options.swigValue()); return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false); } public void unlock() { OgreJNI.HardwareBuffer_unlock(swigCPtr, this); } public void readData(long offset, long length, SWIGTYPE_p_void pDest) { OgreJNI.HardwareBuffer_readData(swigCPtr, this, offset, length, SWIGTYPE_p_void.getCPtr(pDest)); } public void writeData(long offset, long length, SWIGTYPE_p_void pSource, boolean discardWholeBuffer) { OgreJNI.HardwareBuffer_writeData__SWIG_0(swigCPtr, this, offset, length, SWIGTYPE_p_void.getCPtr(pSource), discardWholeBuffer); } public void writeData(long offset, long length, SWIGTYPE_p_void pSource) { OgreJNI.HardwareBuffer_writeData__SWIG_1(swigCPtr, this, offset, length, SWIGTYPE_p_void.getCPtr(pSource)); } public void copyData(HardwareBuffer srcBuffer, long srcOffset, long dstOffset, long length, boolean discardWholeBuffer) { OgreJNI.HardwareBuffer_copyData__SWIG_0(swigCPtr, this, HardwareBuffer.getCPtr(srcBuffer), srcBuffer, srcOffset, dstOffset, length, discardWholeBuffer); } public void copyData(HardwareBuffer srcBuffer, long srcOffset, long dstOffset, long length) { OgreJNI.HardwareBuffer_copyData__SWIG_1(swigCPtr, this, HardwareBuffer.getCPtr(srcBuffer), srcBuffer, srcOffset, dstOffset, length); } public void copyData(HardwareBuffer srcBuffer) { OgreJNI.HardwareBuffer_copyData__SWIG_2(swigCPtr, this, HardwareBuffer.getCPtr(srcBuffer), srcBuffer); } public void _updateFromShadow() { OgreJNI.HardwareBuffer__updateFromShadow(swigCPtr, this); } public long getSizeInBytes() { return OgreJNI.HardwareBuffer_getSizeInBytes(swigCPtr, this); } public HardwareBuffer.Usage getUsage() { return HardwareBuffer.Usage.swigToEnum(OgreJNI.HardwareBuffer_getUsage(swigCPtr, this)); } public boolean isSystemMemory() { return OgreJNI.HardwareBuffer_isSystemMemory(swigCPtr, this); } public boolean hasShadowBuffer() { return OgreJNI.HardwareBuffer_hasShadowBuffer(swigCPtr, this); } public boolean isLocked() { return OgreJNI.HardwareBuffer_isLocked(swigCPtr, this); } public void suppressHardwareUpdate(boolean suppress) { OgreJNI.HardwareBuffer_suppressHardwareUpdate(swigCPtr, this, suppress); } public enum Usage { HBU_STATIC(OgreJNI.HardwareBuffer_HBU_STATIC_get()), HBU_DYNAMIC(OgreJNI.HardwareBuffer_HBU_DYNAMIC_get()), HBU_WRITE_ONLY(OgreJNI.HardwareBuffer_HBU_WRITE_ONLY_get()), HBU_DISCARDABLE(OgreJNI.HardwareBuffer_HBU_DISCARDABLE_get()), HBU_STATIC_WRITE_ONLY(OgreJNI.HardwareBuffer_HBU_STATIC_WRITE_ONLY_get()), HBU_DYNAMIC_WRITE_ONLY(OgreJNI.HardwareBuffer_HBU_DYNAMIC_WRITE_ONLY_get()), HBU_DYNAMIC_WRITE_ONLY_DISCARDABLE(OgreJNI.HardwareBuffer_HBU_DYNAMIC_WRITE_ONLY_DISCARDABLE_get()); public final int swigValue() { return swigValue; } public static Usage swigToEnum(int swigValue) { Usage[] swigValues = Usage.class.getEnumConstants(); if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue) return swigValues[swigValue]; for (Usage swigEnum : swigValues) if (swigEnum.swigValue == swigValue) return swigEnum; throw new IllegalArgumentException("No enum " + Usage.class + " with value " + swigValue); } @SuppressWarnings("unused") private Usage() { this.swigValue = SwigNext.next++; } @SuppressWarnings("unused") private Usage(int swigValue) { this.swigValue = swigValue; SwigNext.next = swigValue+1; } @SuppressWarnings("unused") private Usage(Usage swigEnum) { this.swigValue = swigEnum.swigValue; SwigNext.next = this.swigValue+1; } private final int swigValue; private static class SwigNext { private static int next = 0; } } public enum LockOptions { HBL_NORMAL, HBL_DISCARD, HBL_READ_ONLY, HBL_NO_OVERWRITE, HBL_WRITE_ONLY; public final int swigValue() { return swigValue; } public static LockOptions swigToEnum(int swigValue) { LockOptions[] swigValues = LockOptions.class.getEnumConstants(); if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue) return swigValues[swigValue]; for (LockOptions swigEnum : swigValues) if (swigEnum.swigValue == swigValue) return swigEnum; throw new IllegalArgumentException("No enum " + LockOptions.class + " with value " + swigValue); } @SuppressWarnings("unused") private LockOptions() { this.swigValue = SwigNext.next++; } @SuppressWarnings("unused") private LockOptions(int swigValue) { this.swigValue = swigValue; SwigNext.next = swigValue+1; } @SuppressWarnings("unused") private LockOptions(LockOptions swigEnum) { this.swigValue = swigEnum.swigValue; SwigNext.next = this.swigValue+1; } private final int swigValue; private static class SwigNext { private static int next = 0; } } }
[ "robert.poncelet@talk21.com" ]
robert.poncelet@talk21.com