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
9e00807712c1e5d560b31af0b5d7d020db91351d
a0b7ea8bb4bd18e0f93c58e7cd07cc12372b97bd
/src/Graph/AlienDictionary.java
23bd981300c4a7b76a9807191aed53143806ca58
[]
no_license
shiyanch/InterviewPrep
e53115f7d00b8f72be50b4df4e8718800fb8cddc
bd8c4af8a8705148cc8dec1fef00191818f7d2b3
refs/heads/master
2021-01-21T21:09:59.751333
2017-05-24T16:50:21
2017-05-24T16:50:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,083
java
package Graph; import java.util.Arrays; /** * Created by shiyanch on 1/4/17. */ public class AlienDictionary { public String alienOrder(String[] words) { int n = 26; int[][] adj = new int[n][n]; int[] visited = new int[n]; Arrays.fill(visited, -1); for (String word : words) { for (char c : word.toCharArray()) { visited[c-'a'] = 0; } } buildGraph(words, adj, visited); StringBuilder sb = new StringBuilder(); for (int i=0; i<n; i++) { if (visited[i] == 0 && !dfs(adj, i, visited, sb)) { return ""; } } return sb.reverse().toString(); } private boolean dfs(int[][] adj, int start, int[] visited, StringBuilder sb) { visited[start] = 1; for (int i=0; i<26; i++) { if (adj[start][i] == 1) { if (visited[i] == 1) { return false; } if (visited[i] == 0 && !dfs(adj, i, visited, sb)) { return false; } } } visited[start] = 2; sb.append((char)(start+'a')); return true; } private void buildGraph(String[] words, int[][] adj, int[] visited) { for (int i=1; i<words.length; i++) { String word1 = words[i-1]; String word2 = words[i]; if (word1.startsWith(word2) && !word1.equals(word2)) { Arrays.fill(visited, 2); return; } int len = Math.min(word1.length(), word2.length()); for (int index=0; index<len; index++) { if (word1.charAt(index) != word2.charAt(index)) { adj[word1.charAt(index)-'a'][word2.charAt(index)-'a'] = 1; break; } } } } public static void main(String[] args) { String[] words = {"za","zb","ca","cb"}; System.out.println(new AlienDictionary().alienOrder(words)); } }
[ "shiyanch@gmail.com" ]
shiyanch@gmail.com
3dd2e9dbf16a3912866ff125581c93bb8b90b14e
15d0df6ba5c3a9b5a1b0798a873a2ad30608a2ce
/Workspace/org.condast.js.bootstrap/src/org/condast/js/bootstrap/Activator.java
cbd796d175590c57968b06303b580141f08dbafc
[ "Apache-2.0" ]
permissive
condast/org.condast.js
5a8ce7ef7b0053e17d15f773f61800119309e444
2796a614abdfc1b4ce84d7b31cb6c4942953b277
refs/heads/master
2022-08-30T12:42:38.513505
2022-06-09T17:22:58
2022-06-09T17:22:58
74,229,866
0
0
null
null
null
null
UTF-8
Java
false
false
755
java
package org.condast.js.bootstrap; import org.osgi.framework.BundleActivator; import org.osgi.framework.BundleContext; public class Activator implements BundleActivator { private static BundleContext context; static BundleContext getContext() { return context; } /* * (non-Javadoc) * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) */ @Override public void start(BundleContext bundleContext) throws Exception { Activator.context = bundleContext; } /* * (non-Javadoc) * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) */ @Override public void stop(BundleContext bundleContext) throws Exception { Activator.context = null; } }
[ "info@condast.com" ]
info@condast.com
c9affe32f5718182c4784d784d9b74532291011a
3a3d51f069841893eabf7f58f81ebf411107efba
/src/main/java/org/akomantoso/schema/v3/release/EolType.java
cc432919021d0c6e5a230cb618cbecef608f7d2a
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
ymartin59/akomantoso-lib
7481f4cf3ead3d8b410f40f6b7b3106318692dfb
3215cb0d8596ea2c74595b59a0f81c6e91183fab
refs/heads/master
2022-03-27T20:27:39.719762
2017-06-29T17:21:41
2017-06-29T17:21:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,850
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2017.05.20 at 03:05:24 PM IST // package org.akomantoso.schema.v3.release; import java.math.BigInteger; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlType; /** * * <pre> * &lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;type xmlns="http://docs.oasis-open.org/legaldocml/ns/akn/3.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;Complex&lt;/type&gt; * </pre> * * <pre> * &lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;name xmlns="http://docs.oasis-open.org/legaldocml/ns/akn/3.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;eolType&lt;/name&gt; * </pre> * * <pre> * &lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;comment xmlns="http://docs.oasis-open.org/legaldocml/ns/akn/3.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt; * the complex type eolType is shared by eol and eop elements as being able to specify a hyphen character and a position within the next word in which the break can happen, and the number if any, associated to the page or line at issue&lt;/comment&gt; * </pre> * * * <p>Java class for eolType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="eolType"> * &lt;complexContent> * &lt;extension base="{http://docs.oasis-open.org/legaldocml/ns/akn/3.0}markeropt"> * &lt;attGroup ref="{http://docs.oasis-open.org/legaldocml/ns/akn/3.0}number"/> * &lt;attribute name="breakAt" type="{http://www.w3.org/2001/XMLSchema}integer" /> * &lt;attribute name="breakWith" type="{http://www.w3.org/2001/XMLSchema}string" /> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "eolType") public class EolType extends Markeropt { @XmlAttribute(name = "breakAt") protected BigInteger breakAt; @XmlAttribute(name = "breakWith") protected String breakWith; @XmlAttribute(name = "number") protected String number; /** * Gets the value of the breakAt property. * * @return * possible object is * {@link BigInteger } * */ public BigInteger getBreakAt() { return breakAt; } /** * Sets the value of the breakAt property. * * @param value * allowed object is * {@link BigInteger } * */ public void setBreakAt(BigInteger value) { this.breakAt = value; } /** * Gets the value of the breakWith property. * * @return * possible object is * {@link String } * */ public String getBreakWith() { return breakWith; } /** * Sets the value of the breakWith property. * * @param value * allowed object is * {@link String } * */ public void setBreakWith(String value) { this.breakWith = value; } /** * Gets the value of the number property. * * @return * possible object is * {@link String } * */ public String getNumber() { return number; } /** * Sets the value of the number property. * * @param value * allowed object is * {@link String } * */ public void setNumber(String value) { this.number = value; } }
[ "ashok@hariharan.org.in" ]
ashok@hariharan.org.in
1a5f15d6f0a0302fb838b5ea997aa2d79629b1c0
8ba7e66ca0c880a5b251e76309382e1bac17c3bd
/code/client/corepower/helloworld-coolsql/src/com/coolsql/pub/parse/StringManagerFactory.java
37f76c47cc92a491e0a15bbe76fadb608dddbf46
[]
no_license
gongweichuan/gongweichuan
b80571d21f8d8d00163fc809ed36aae78887ae40
65c4033f95257cd8f33bfd5723ba643291beb8ca
refs/heads/master
2016-09-05T20:12:18.033880
2013-04-09T15:53:28
2013-04-09T15:53:28
34,544,114
0
0
null
null
null
null
UTF-8
Java
false
false
1,927
java
/** * */ package com.coolsql.pub.parse; import java.util.HashMap; import java.util.Map; /** * This class manages instances of <TT>StringManager</TT> objects. It keeps a * cache of them, one for each package. * @author 刘孝林(kenny liu) * * 2008-1-13 create */ public class StringManagerFactory { /** * Collection of <TT>StringManager</TT> objects keyed by the Java package * name. */ private static final Map<String, StringManager> s_mgrs = new HashMap<String, StringManager>(); /** * Retrieve an instance of <TT>StringManager</TT> for the passed class. * Currently an instance of <TT>Stringmanager</TT> is stored for each * package. * * @param clazz <TT>Class</TT> to retrieve <TT>StringManager</TT> for. * * @return instance of <TT>StringManager</TT>. * * @throws IllegalArgumentException * Thrown if <TT>null</TT> <TT>clazz</TT> passed. */ public static synchronized StringManager getStringManager(Class<?> clazz) { if (clazz == null) { throw new IllegalArgumentException("clazz == null"); } final String key = getKey(clazz); StringManager mgr = s_mgrs.get(key); if (mgr == null) { mgr = new StringManager(key, clazz.getClassLoader()); s_mgrs.put(key, mgr); } return mgr; } /** * Retrieve the key to use to identify the <TT>StringManager</TT> instance * for the passed class. Currently one instance is stored for each package. * * @param clazz <TT>Class</TT> to get key for. * * @return the key to use. * * @throws IllegalArgumentException * Thrown if <TT>null</TT> <TT>clazz</TT> passed. */ private static String getKey(Class<?> clazz) { if (clazz == null) { throw new IllegalArgumentException("clazz == null"); } final String clazzName = clazz.getName(); return clazzName.substring(0, clazzName.lastIndexOf('.')); } }
[ "gongweichuan@gmail.com@934a62da-e7e6-11dd-bce9-bf72c0239d3a" ]
gongweichuan@gmail.com@934a62da-e7e6-11dd-bce9-bf72c0239d3a
f735c128e24bf3d07b1268c24e7bbd05da93d3d9
75e7d1a3ab7e6bf8e9305827aebb787cd6ed94e6
/study/architecture/src/main/java/com/shang/jvm/Test02.java
5b92c2ae8dfa6668863e58f4f862a8c1389691d3
[ "Apache-2.0" ]
permissive
nickshang/study
9f3f8c9b4bfe72a67b54aed24973e9bb941b603a
49afda86aa3a816a21d998a8456106a6d78d7cf5
refs/heads/master
2021-01-22T10:59:36.107512
2018-03-01T14:57:24
2018-03-01T14:57:24
102,343,161
0
0
null
null
null
null
UTF-8
Java
false
false
683
java
package com.shang.jvm; /** * Created by Think on 2017/11/7. */ public class Test02 { public static void main(String[] args) { //第一次配置 //-Xms20m -Xmx20m -Xmn1m -XX:SurvivorRatio=2 -XX:+PrintGCDetails -XX:+UseSerialGC //第二次配置 //-Xms20m -Xmx20m -Xmn7m -XX:SurvivorRatio=2 -XX:+PrintGCDetails -XX:+UseSerialGC //第三次配置 //-XX:NewRatio=老年代/新生代 //-Xms20m -Xmx20m -XX:SurvivorRatio=2 -XX:+PrintGCDetails -XX:+UseSerialGC byte[] b = null; //连续向系统申请10MB空间 for(int i = 0 ; i <10; i ++){ b = new byte[1*1024*1024]; } } }
[ "ssj00@163.com" ]
ssj00@163.com
65620c81e1eb99f7b8ae983752d43d07df9d780e
ce1f43ad1cd2434ba1d65df57267aa84e3cadb50
/visualization/src/de/peerthing/visualization/querymodel/ListWithParent.java
fe70e042af8320c83d0f805bddc169616fc7c046
[ "Apache-2.0" ]
permissive
rju/peerthing
3387d049475d0049f8e3991d9a363ea48572ab7c
7abe8d3be11f5e66c8413b780640c3892503ce16
refs/heads/master
2021-04-26T22:22:27.396478
2018-03-06T21:50:22
2018-03-06T21:50:22
124,080,294
0
0
null
null
null
null
UTF-8
Java
false
false
1,963
java
package de.peerthing.visualization.querymodel; import java.util.ArrayList; import de.peerthing.visualization.querymodel.interfaces.IListWithParent; import de.peerthing.visualization.querymodel.interfaces.IQueryDataModel; /** * Default Implementation of IListWithParent. See * the interface for a description. * * @author Michael Gottschalk * */ public class ListWithParent<E> extends ArrayList<E> implements IListWithParent<E> { private static final long serialVersionUID = 8418606808677952854L; private Object parent; private String name; private IQueryDataModel model; /** * Creates a new ListWithParent with a given parent, * a name and a data model to which the list belongs. * * @param parent The parent object * @param name the name of the list, e.g. to be displayed * in a tree viewer * @param model The model to which this list belongs */ public ListWithParent(Object parent, String name, IQueryDataModel model) { this(parent, name); this.model = model; } /** * Creates a new ListWithParent with a given parent and * a name. The data model to which the list belongs must * be set later with setQueryDataModel(). * * @param parent The parent object * @param name the name of the list, e.g. to be displayed * in a tree viewer */ public ListWithParent(Object parent, String name) { this.parent = parent; this.name = name; } public String getName() { return name; } public Object getParent() { return parent; } /** * Returns the name of the list */ @Override public String toString() { return name; } public void setQueryDataModel(IQueryDataModel dataModel) { this.model = dataModel; } public IQueryDataModel getQueryDataModel() { return model; } }
[ "reiner.jung@email.uni-kiel.de" ]
reiner.jung@email.uni-kiel.de
6320ec4be45a324c73170d18dbb8f78fcf214a90
352163a8f69f64bc87a9e14471c947e51bd6b27d
/bin/ext-template/yb2bacceleratorfacades/src/de/hybris/platform/yb2bacceleratorfacades/variant/populators/VariantOptionDataPricePopulator.java
bb856109488b26d3cb0d9e49ab4c3556d8144475
[]
no_license
GTNDYanagisawa/merchandise
2ad5209480d5dc7d946a442479cfd60649137109
e9773338d63d4f053954d396835ac25ef71039d3
refs/heads/master
2021-01-22T20:45:31.217238
2015-05-20T06:23:45
2015-05-20T06:23:45
35,868,211
3
5
null
null
null
null
UTF-8
Java
false
false
2,604
java
/* * [y] hybris Platform * * Copyright (c) 2000-2014 hybris AG * All rights reserved. * * This software is the confidential and proprietary information of hybris * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with hybris. * * */ package de.hybris.platform.yb2bacceleratorfacades.variant.populators; import de.hybris.platform.commercefacades.product.PriceDataFactory; import de.hybris.platform.commercefacades.product.data.PriceData; import de.hybris.platform.commercefacades.product.data.PriceDataType; import de.hybris.platform.commercefacades.product.data.VariantOptionData; import de.hybris.platform.commerceservices.price.CommercePriceService; import de.hybris.platform.converters.Populator; import de.hybris.platform.jalo.order.price.PriceInformation; import de.hybris.platform.servicelayer.dto.converter.ConversionException; import de.hybris.platform.variants.model.VariantProductModel; import java.math.BigDecimal; import org.springframework.beans.factory.annotation.Required; public class VariantOptionDataPricePopulator<SOURCE extends VariantProductModel, TARGET extends VariantOptionData> implements Populator<SOURCE, TARGET> { private PriceDataFactory priceDataFactory; private CommercePriceService commercePriceService; @Override public void populate(final VariantProductModel variantProductModel, final VariantOptionData variantOptionData) throws ConversionException { final PriceInformation priceInformation = getCommercePriceService().getWebPriceForProduct(variantProductModel); PriceData priceData; if (priceInformation != null && priceInformation.getPriceValue() != null) { priceData = getPriceDataFactory().create(PriceDataType.FROM, new BigDecimal(priceInformation.getPriceValue().getValue()), priceInformation.getPriceValue().getCurrencyIso()); } else { priceData = new PriceData(); priceData.setValue(BigDecimal.ZERO); priceData.setFormattedValue("0"); } variantOptionData.setPriceData(priceData); } protected CommercePriceService getCommercePriceService() { return commercePriceService; } @Required public void setCommercePriceService(final CommercePriceService commercePriceService) { this.commercePriceService = commercePriceService; } protected PriceDataFactory getPriceDataFactory() { return priceDataFactory; } @Required public void setPriceDataFactory(final PriceDataFactory priceDataFactory) { this.priceDataFactory = priceDataFactory; } }
[ "yanagisawa@gotandadenshi.jp" ]
yanagisawa@gotandadenshi.jp
5ddc96ca3d1532acf50274852e015c7120747f1b
9bac6b22d956192ba16d154fca68308c75052cbb
/icmsint-ejb/src/main/java/hk/judiciary/icmsint/model/sysinf/biz/generator/GFPIWitnessSummonsAllocationResultGenerator.java
5469db84a3a416ce4078214c91d8ea570bff4db7
[]
no_license
peterso05168/icmsint
9d4723781a6666cae8b72d42713467614699b66d
79461c4dc34c41b2533587ea3815d6275731a0a8
refs/heads/master
2020-06-25T07:32:54.932397
2017-07-13T10:54:56
2017-07-13T10:54:56
96,960,773
0
0
null
null
null
null
UTF-8
Java
false
false
1,312
java
package hk.judiciary.icmsint.model.sysinf.biz.generator; import java.util.List; import hk.judiciary.fmk.common.security.user.JudiciaryUser; import hk.judiciary.icms.model.dao.entity.SysInfCtrl; import hk.judiciary.icmsint.model.common.SysInfConstant; import hk.judiciary.icmsint.model.sysinf.dao.DAOException; import hk.judiciary.icmsint.model.sysinf.dao.PdDAO; import hk.judiciary.icmsint.model.sysinf.dao.SysInfCtrlDAO; import hk.judiciary.icmsint.model.sysinf.dao.SysInfCtrlTypeDAO; import hk.judiciary.icmsint.model.sysinf.inf.gfpij2d.GFPIMsgJ2D; import hk.judiciary.icmsint.webservice.sysinf.ControlService; public class GFPIWitnessSummonsAllocationResultGenerator extends BaseGFPIMsgGenerator { public GFPIWitnessSummonsAllocationResultGenerator(JudiciaryUser judiciaryUser, String partyCd, SysInfCtrlDAO sysInfCtrlDao, SysInfCtrlTypeDAO sysInfCtrlTypeDao, PdDAO pdDao) { super(judiciaryUser, partyCd, SysInfConstant.SYSINF_MSG_CD_GDSNI_J2D_WITNESS_SUMMONS_ALLOCATION, ControlService.SYSINF_CTRL_TYPE_CD_WITNESS_SUMMONS_ALLOCATION, sysInfCtrlDao, sysInfCtrlTypeDao, pdDao); } @Override public GFPIMsgJ2D generateGFPIMsg() throws SysInfGeneratorException, DAOException { List<SysInfCtrl> sysInfCtrlList = getSysInfCtrlList(); GFPIMsgJ2D gdsni = new GFPIMsgJ2D(); return gdsni; } }
[ "peterso05168@gmail.com" ]
peterso05168@gmail.com
fddf568645a3e83a9b2b9c5111947ad5b557050d
5b2c309c903625b14991568c442eb3a889762c71
/classes/com/tencent/open/Util$Statistic.java
43a9fd26ced71c9a3e0a556569724b0c0a695df1
[]
no_license
iidioter/xueqiu
c71eb4bcc53480770b9abe20c180da693b2d7946
a7d8d7dfbaf9e603f72890cf861ed494099f5a80
refs/heads/master
2020-12-14T23:55:07.246659
2016-10-08T08:56:27
2016-10-08T08:56:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
466
java
package com.tencent.open; public class Util$Statistic { public String a; public long b; public long c; public Util$Statistic(String paramString, int paramInt) { this.a = paramString; this.b = paramInt; if (this.a != null) { this.c = this.a.length(); } } } /* Location: E:\apk\xueqiu2\classes-dex2jar.jar!\com\tencent\open\Util$Statistic.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "1776098770@qq.com" ]
1776098770@qq.com
ecb35ef160705d602b3ef80548291712ffb31b27
274a3f814e12712ad56d463b31e18fcf9d7a6955
/src/main/de/hsmainz/cs/semgis/arqextension/envelope/relation/BBOXBelow.java
836a21fb968e61b6eef68caa577a71019c2d1cb9
[]
no_license
lisha992610/my_jena_geo
a5c80c8345ef7a32dd487ca57400b7947d80d336
fff8e26992a02b5a1c1de731b2e6f9ab09249776
refs/heads/master
2023-04-23T03:11:39.128121
2021-05-12T05:05:29
2021-05-12T05:05:29
366,588,259
0
0
null
null
null
null
UTF-8
Java
false
false
2,897
java
package de.hsmainz.cs.semgis.arqextension.envelope.relation; import org.apache.jena.sparql.expr.ExprEvalException; import org.apache.jena.sparql.expr.NodeValue; import org.apache.jena.sparql.function.FunctionBase2; import org.apache.sis.coverage.grid.GridCoverage; import org.opengis.geometry.MismatchedDimensionException; import org.opengis.referencing.operation.TransformException; import org.opengis.util.FactoryException; import de.hsmainz.cs.semgis.arqextension.util.LiteralUtils; import de.hsmainz.cs.semgis.arqextension.util.Wrapper; import io.github.galbiston.geosparql_jena.implementation.GeometryWrapper; import io.github.galbiston.geosparql_jena.implementation.datatype.raster.CoverageWrapper; /** * Returns TRUE if A's bounding box is strictly below B's. * */ public class BBOXBelow extends FunctionBase2 { @Override public NodeValue exec(NodeValue v1, NodeValue v2) { Wrapper wrapper1=LiteralUtils.rasterOrVector(v1); Wrapper wrapper2=LiteralUtils.rasterOrVector(v2); if(wrapper1 instanceof GeometryWrapper && wrapper2 instanceof GeometryWrapper) { try { GeometryWrapper geom = GeometryWrapper.extract(v1); GeometryWrapper geom2 = GeometryWrapper.extract(v2); GeometryWrapper transGeom2 = geom2.transform(geom.getSRID()); System.out.println("BBOX Below"); if(geom.getEnvelope().getMaxY()<transGeom2.getEnvelope().getMinY()) { return NodeValue.TRUE; } return NodeValue.FALSE; } catch (MismatchedDimensionException | TransformException | FactoryException e) { return NodeValue.makeString(e.getMessage()); } }else if(wrapper1 instanceof CoverageWrapper && wrapper2 instanceof CoverageWrapper) { GridCoverage raster=((CoverageWrapper)wrapper1).getGridGeometry(); GridCoverage raster2=((CoverageWrapper)wrapper2).getGridGeometry(); try { if(raster.getGridGeometry().getEnvelope().getUpperCorner().getCoordinate()[1]< raster2.getGridGeometry().getEnvelope().getLowerCorner().getCoordinate()[1]) { return NodeValue.TRUE; } return NodeValue.FALSE; } catch (MismatchedDimensionException e) { // TODO Auto-generated catch block throw new ExprEvalException(e.getMessage(), e); } }else { if(wrapper1 instanceof CoverageWrapper) { GridCoverage raster=((CoverageWrapper)wrapper1).getGridGeometry(); GeometryWrapper geom2 = GeometryWrapper.extract(v2); if(raster.getGridGeometry().getEnvelope().getUpperCorner().getCoordinate()[1]<geom2.getEnvelope().getMinY()) { return NodeValue.TRUE; } return NodeValue.FALSE; }else { GridCoverage raster=((CoverageWrapper)wrapper2).getGridGeometry(); GeometryWrapper geom2 = GeometryWrapper.extract(v1); if(raster.getGridGeometry().getEnvelope().getUpperCorner().getCoordinate()[1]<geom2.getEnvelope().getMinY()) { return NodeValue.TRUE; } return NodeValue.FALSE; } } } }
[ "shiying.li@sec.ethz.ch" ]
shiying.li@sec.ethz.ch
4bd2574d3fc9148950516180222935950caebb56
3a59bd4f3c7841a60444bb5af6c859dd2fe7b355
/sources/com/google/android/gms/internal/ads/zzdly.java
9b660b743f42aad6d116b7b4e9bc9e7f0393afbd
[]
no_license
sengeiou/KnowAndGo-android-thunkable
65ac6882af9b52aac4f5a4999e095eaae4da3c7f
39e809d0bbbe9a743253bed99b8209679ad449c9
refs/heads/master
2023-01-01T02:20:01.680570
2020-10-22T04:35:27
2020-10-22T04:35:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,093
java
package com.google.android.gms.internal.ads; final /* synthetic */ class zzdly { static final /* synthetic */ int[] zzhbp = new int[zzdlg.values().length]; /* JADX WARNING: Can't wrap try/catch for region: R(8:0|1|2|3|4|5|6|8) */ /* JADX WARNING: Failed to process nested try/catch */ /* JADX WARNING: Missing exception handler attribute for start block: B:3:0x0014 */ /* JADX WARNING: Missing exception handler attribute for start block: B:5:0x001f */ static { /* com.google.android.gms.internal.ads.zzdlg[] r0 = com.google.android.gms.internal.ads.zzdlg.values() int r0 = r0.length int[] r0 = new int[r0] zzhbp = r0 int[] r0 = zzhbp // Catch:{ NoSuchFieldError -> 0x0014 } com.google.android.gms.internal.ads.zzdlg r1 = com.google.android.gms.internal.ads.zzdlg.SHA256 // Catch:{ NoSuchFieldError -> 0x0014 } int r1 = r1.ordinal() // Catch:{ NoSuchFieldError -> 0x0014 } r2 = 1 r0[r1] = r2 // Catch:{ NoSuchFieldError -> 0x0014 } L_0x0014: int[] r0 = zzhbp // Catch:{ NoSuchFieldError -> 0x001f } com.google.android.gms.internal.ads.zzdlg r1 = com.google.android.gms.internal.ads.zzdlg.SHA512 // Catch:{ NoSuchFieldError -> 0x001f } int r1 = r1.ordinal() // Catch:{ NoSuchFieldError -> 0x001f } r2 = 2 r0[r1] = r2 // Catch:{ NoSuchFieldError -> 0x001f } L_0x001f: int[] r0 = zzhbp // Catch:{ NoSuchFieldError -> 0x002a } com.google.android.gms.internal.ads.zzdlg r1 = com.google.android.gms.internal.ads.zzdlg.SHA1 // Catch:{ NoSuchFieldError -> 0x002a } int r1 = r1.ordinal() // Catch:{ NoSuchFieldError -> 0x002a } r2 = 3 r0[r1] = r2 // Catch:{ NoSuchFieldError -> 0x002a } L_0x002a: return */ throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.internal.ads.zzdly.<clinit>():void"); } }
[ "joshuahj.tsao@gmail.com" ]
joshuahj.tsao@gmail.com
2e530e268d01b662e54866b6522872e56cfb539b
058e40ad56cdac40ebb2a99597b274021ea08265
/android/app/src/debug/java/com/square_lab_26872/ReactNativeFlipper.java
8db9472b2686333bc06f384e32d91ac2f66d9673
[]
no_license
crowdbotics-apps/square-lab-26872
c100d243138a62fea44fc41231f60069344e0458
6941e4f4b89209e3031d1c127e4e235ed2d145ea
refs/heads/master
2023-04-29T21:58:06.964100
2021-05-18T14:33:57
2021-05-18T14:33:57
368,562,407
0
0
null
null
null
null
UTF-8
Java
false
false
3,271
java
/** * Copyright (c) Facebook, Inc. and its affiliates. * * <p>This source code is licensed under the MIT license found in the LICENSE file in the root * directory of this source tree. */ package com.square_lab_26872; import android.content.Context; import com.facebook.flipper.android.AndroidFlipperClient; import com.facebook.flipper.android.utils.FlipperUtils; import com.facebook.flipper.core.FlipperClient; import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin; import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin; import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin; import com.facebook.flipper.plugins.inspector.DescriptorMapping; import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin; import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor; import com.facebook.flipper.plugins.network.NetworkFlipperPlugin; import com.facebook.flipper.plugins.react.ReactFlipperPlugin; import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin; import com.facebook.react.ReactInstanceManager; import com.facebook.react.bridge.ReactContext; import com.facebook.react.modules.network.NetworkingModule; import okhttp3.OkHttpClient; public class ReactNativeFlipper { public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { if (FlipperUtils.shouldEnableFlipper(context)) { final FlipperClient client = AndroidFlipperClient.getInstance(context); client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults())); client.addPlugin(new ReactFlipperPlugin()); client.addPlugin(new DatabasesFlipperPlugin(context)); client.addPlugin(new SharedPreferencesFlipperPlugin(context)); client.addPlugin(CrashReporterPlugin.getInstance()); NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin(); NetworkingModule.setCustomClientBuilder( new NetworkingModule.CustomClientBuilder() { @Override public void apply(OkHttpClient.Builder builder) { builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin)); } }); client.addPlugin(networkFlipperPlugin); client.start(); // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized // Hence we run if after all native modules have been initialized ReactContext reactContext = reactInstanceManager.getCurrentReactContext(); if (reactContext == null) { reactInstanceManager.addReactInstanceEventListener( new ReactInstanceManager.ReactInstanceEventListener() { @Override public void onReactContextInitialized(ReactContext reactContext) { reactInstanceManager.removeReactInstanceEventListener(this); reactContext.runOnNativeModulesQueueThread( new Runnable() { @Override public void run() { client.addPlugin(new FrescoFlipperPlugin()); } }); } }); } else { client.addPlugin(new FrescoFlipperPlugin()); } } } }
[ "team@crowdbotics.com" ]
team@crowdbotics.com
b64cc05175dfa9797488635ee7e924e57ed1dc5f
83be00a56f9d4f1b97ad1bb16bce1b253f460639
/p407.java
cf768255f2272272bfdf055c360d4f01764f6744
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
koonom1985/Project-Euler-solutions
b4ad2b0ea7764d746eee9a0424746915b764114e
2dbd5db087f727062c6adc3cb14b4bfffd5f1a0d
refs/heads/master
2020-07-05T09:11:14.444520
2013-09-27T22:30:33
2013-09-27T22:30:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,958
java
/* * Solution to Project Euler problem 407 * By Nayuki Minase * * http://nayuki.eigenstate.org/page/project-euler-solutions * https://github.com/nayuki/Project-Euler-solutions */ import java.util.ArrayList; import java.util.List; public final class p407 implements EulerSolution { public static void main(String[] args) { System.out.println(new p407().run()); } private static final int LIMIT = Library.pow(10, 7); /* * If a^2 = a mod n, then this is also true for any m that divides n. * Let's focus on the moduli that are prime powers, p^k. * * Claim: The only solutions of a^2 = a mod p^k are a = 0, 1 mod p^k. * Proof: * First note that a = 0 mod p^k is always a solution. Now consider the case of 0 < a < p^k. * Let a = b * p^j, where 0 < b < p^j and b is coprime with p (thus j is as large as possible). * Then (b p^j)^2 = b p^j mod p^k, expanding to b^2 p^2j = b p^j mod p^k. * Divide all of the equation (including the modulus) by p^j, giving b^2 p^j = b mod p^(k-j). * b is coprime with p (and therefore p^(k-j)), so b^-1 exists. * Multiply both sides by b^-2 to get b^-1 = p^j mod p^(k-j). * b is coprime with p, so b is not a power of p unless j = 0, i.e. p^j = 1 = b. * So when a != 0, a = 1 is the only solution. * * If we factor n as a product of prime powers, i.e. n = p0^k0 * p1^k1 * ... where * all the p's are distinct (and thus all the k's are as large as possible), then we have * a system of congruences {a = 0,1 mod p0^k0; a = 0,1 mod p1^k1; ...}. * Using the Chinese remainder theorem, we can solve these congruences to obtain the * 2^N distinct solutions (where N is the number of distinct prime factors of n). * The largest solution among these is what we want for the M() function. */ public String run() { int[] smallestPrimeFactor = new int[LIMIT + 1]; for (int i = 2; i < smallestPrimeFactor.length; i++) { if (smallestPrimeFactor[i] == 0) { smallestPrimeFactor[i] = i; if ((long)i * i <= LIMIT) { for (int j = i * i; j <= LIMIT; j += i) { if (smallestPrimeFactor[j] == 0) smallestPrimeFactor[j] = i; } } } } // Maximum size of set of prime factors where the product of the set <= LIMIT. // This is important because the number of solutions for n is 2^N, // where N is the number of distinct prime factors of n. int maxNumPrimeFactors = 0; for (int i = 2, prod = 1; i < smallestPrimeFactor.length; i++) { if (smallestPrimeFactor[i] == i) { // i is prime if (LIMIT / prod < i) break; prod *= i; maxNumPrimeFactors++; } } long sum = 0; // Temporary arrays int[] solns = new int[1 << maxNumPrimeFactors]; int[] newsolns = new int[1 << maxNumPrimeFactors]; for (int i = 1; i <= LIMIT; i++) { // Compute factorization as coprime prime powers. e.g. 360 = {2^3, 3^2, 5^1} List<Integer> factorization = new ArrayList<Integer>(); for (int j = i; j != 1; ) { int p = smallestPrimeFactor[j]; int q = 1; do { j /= p; q *= p; } while (j % p == 0); factorization.add(q); } solns[0] = 0; int solnslen = 1; int modulus = 1; for (int q : factorization) { // Use Chinese remainder theorem; cache parts of it int recip = Library.reciprocalMod(q % modulus, modulus); int newmod = q * modulus; int newsolnslen = 0; for (int j = 0; j < solnslen; j++) { newsolns[newsolnslen++] = ((0 + (int)((long)(solns[j] - 0 + modulus) * recip % modulus) * q) % newmod); newsolns[newsolnslen++] = ((1 + (int)((long)(solns[j] - 1 + modulus) * recip % modulus) * q) % newmod); } solnslen = newsolnslen; modulus = newmod; // Flip buffers int[] temp = solns; solns = newsolns; newsolns = temp; } int max = 0; for (int j = 0; j < solnslen; j++) max = Math.max(solns[j], max); sum += max; } return Long.toString(sum); } }
[ "nayuki@eigenstate.org" ]
nayuki@eigenstate.org
cfd87f320612ffce54655cb2bc2d6467316d8b78
d8e1f5b8ff88a4c7578ae5c8632c306bd565f049
/usertype.core/src/test/java/org/jadira/usertype/moneyandcurrency/moneta/TestPersistentMoneyMajorAmountAndCurrency.java
65779a11f94e029b64c43c68031458b6995234dd
[ "Apache-2.0" ]
permissive
sigmamupi/jadira
eb0205e304a3b57989844e96b2e77dbc390a2a2b
09c9a28a6305852366a2ff0908e8dd0bb9c04407
refs/heads/master
2020-12-02T01:06:50.192392
2019-12-30T12:20:49
2019-12-30T12:20:49
230,838,403
0
0
Apache-2.0
2019-12-30T03:09:35
2019-12-30T03:09:34
null
UTF-8
Java
false
false
2,460
java
/* * Copyright 2010, 2011 Christopher Pheby * * 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.jadira.usertype.moneyandcurrency.moneta; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import java.math.BigDecimal; import org.jadira.usertype.dateandtime.shared.dbunit.AbstractDatabaseTest; import org.jadira.usertype.moneyandcurrency.moneta.testmodel.MoneyMajorAmountAndCurrencyHolder; import org.javamoney.moneta.Money; import org.javamoney.moneta.function.MonetaryQueries; import org.junit.Test; public class TestPersistentMoneyMajorAmountAndCurrency extends AbstractDatabaseTest<MoneyMajorAmountAndCurrencyHolder> { private static final Money[] moneys = new Money[]{ Money.of(BigDecimal.valueOf(100), "USD"), Money.of(new BigDecimal("100.10"), "USD"), Money.of(new BigDecimal("0.99"), "EUR"), Money.of(new BigDecimal("-0.99"), "EUR"), null}; public TestPersistentMoneyMajorAmountAndCurrency() { super(TestMonetaMoneySuite.getFactory()); } @Test public void testPersist() { for (int i = 0; i < moneys.length; i++) { MoneyMajorAmountAndCurrencyHolder item = new MoneyMajorAmountAndCurrencyHolder(); item.setId(i); item.setName("test_" + i); item.setMoney(moneys[i]); persist(item); } for (int i = 0; i < moneys.length; i++) { MoneyMajorAmountAndCurrencyHolder item = find((long) i); assertNotNull(item); assertEquals(i, item.getId()); assertEquals("test_" + i, item.getName()); if (moneys[i] == null) { assertNull(item.getMoney()); } else { assertEquals(MonetaryQueries.extractMajorPart().queryFrom(moneys[i]).toString(), item.getMoney().toString()); } } verifyDatabaseTable(); } }
[ "chris@jadira.co.uk" ]
chris@jadira.co.uk
c820410d2e658308632d9d1e770261305de9421a
8b06f012c6b741c1a9e591946b861969f8ea9533
/src/project/fantalk/command/AbstractMessageHanler.java
c57198c8cc484cf2dfc603c2e0eb74da19c4dd00
[]
no_license
gavin01du/fantalk
4afa0e985713a3f62b01c46bc24833ced9c8cbdc
d1579c2f8817fc67a2b8bbd0c3b672092266beea
refs/heads/master
2020-07-15T03:12:17.148905
2011-06-19T07:01:40
2011-06-19T07:01:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,255
java
package project.fantalk.command; import java.util.Calendar; import java.util.List; import java.util.TimeZone; import project.fantalk.api.Utils; import project.fantalk.api.fanfou.FanfouService; import project.fantalk.api.fanfou.Message; import project.fantalk.model.Datastore; import project.fantalk.model.Member; import project.fantalk.xmpp.XMPPUtils; import com.google.appengine.api.xmpp.JID; public abstract class AbstractMessageHanler extends BaseCommand { public AbstractMessageHanler(String name, String... otherNames) { super(name, otherNames); } public abstract List<project.fantalk.api.fanfou.Message> getMessages( FanfouService fanfou, int count, String lastId, String maxId, int page); public abstract String getMessage(); @Override public void doCommand(project.fantalk.xmpp.Message message, String argument) { int count = 5; if (!Utils.isEmpty(argument)) { count = Utils.toInt(argument); } JID sender = message.sender; String email = message.email; Datastore datastore = Datastore.getInstance(); Member m = (Member) datastore.getAndCacheMember(email); if (!Utils.canDo(m.getLastActive())) { if (!XMPPUtils.isAdmin(email)) { XMPPUtils.sendMessage("操作过于频繁,请10秒后再试!", sender); return; } } if (!Utils.isEmpty(m.getUsername())) { m.setLastActive(Calendar.getInstance( TimeZone.getTimeZone("GMT+08:00")).getTime());// 更新最后一次API活动时间 String lastMessageId = m.getLastMessageId(); FanfouService fs = new FanfouService(m); List<project.fantalk.api.fanfou.Message> messages = getMessages(fs, count, lastMessageId, null, 0); if (messages== null || messages.isEmpty()) {// 如果无未读消息 XMPPUtils.sendMessage(getMessage(), sender); } else { StringBuilder sb = processMessages(m, messages); String sendMessages = sb.toString(); if (Utils.isEmpty(sendMessages)) { XMPPUtils.sendMessage(getMessage(), sender); } else { XMPPUtils.sendMessage(sendMessages, sender); } } } else { XMPPUtils.sendMessage("你还未绑定饭否帐号,无法查看主页消息!", sender); } m.put(); } public abstract StringBuilder processMessages(Member m, List<Message> messages); }
[ "mcxiaoke@gmail.com" ]
mcxiaoke@gmail.com
dd11448fb7268db4c74a6db5966ebc665025cb1c
92225460ebca1bb6a594d77b6559b3629b7a94fa
/src/com/kingdee/eas/fdc/contract/client/OaOpinionUI.java
3e69ae77c260300e13b0498eac5876ece3ce7459
[]
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
GB18030
Java
false
false
2,492
java
/** * output package name */ package com.kingdee.eas.fdc.contract.client; import java.awt.event.*; import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; import org.apache.log4j.Logger; import com.kingdee.bos.ui.face.CoreUIObject; import com.kingdee.bos.ctrl.kdf.table.IRow; import com.kingdee.bos.ctrl.kdf.table.KDTStyleConstants; import com.kingdee.bos.dao.IObjectValue; import com.kingdee.eas.fdc.basedata.client.FDCClientVerifyHelper; import com.kingdee.eas.fdc.basedata.client.FDCMsgBox; import com.kingdee.eas.fdc.contract.ChangeAuditBillInfo; import com.kingdee.eas.fdc.contract.ContractBillInfo; import com.kingdee.eas.fdc.contract.ContractChangeSettleBillInfo; import com.kingdee.eas.fdc.contract.ContractWithoutTextInfo; import com.kingdee.eas.fdc.contract.MarketProjectInfo; import com.kingdee.eas.fdc.contract.PayRequestBillInfo; import com.kingdee.eas.framework.*; import com.kingdee.eas.util.SysUtil; /** * output class name */ public class OaOpinionUI extends AbstractOaOpinionUI { private static final Logger logger = CoreUIObject.getLogger(OaOpinionUI.class); /** * output class constructor */ public OaOpinionUI() throws Exception { super(); } public void onLoad() throws Exception { super.onLoad(); this.toolBar.setVisible(false); this.menuBar.setVisible(false); } protected void btnNo_actionPerformed(ActionEvent e) throws Exception { this.destroyWindow(); } protected void btnYes_actionPerformed(ActionEvent e) throws Exception { if(this.txtOaOpinion==null||this.txtOaOpinion.getText().trim().equals("")){ FDCMsgBox.showWarning(this,"审批意见不能为空!"); SysUtil.abort(); } IObjectValue value=(IObjectValue) this.getUIContext().get("editData"); String opinion=this.txtOaOpinion.getText(); if(value instanceof ContractBillInfo){ ((ContractBillInfo)value).setOaOpinion(opinion); }else if(value instanceof ChangeAuditBillInfo){ ((ChangeAuditBillInfo)value).setOaOpinion(opinion); }else if(value instanceof ContractChangeSettleBillInfo){ ((ContractChangeSettleBillInfo)value).setOaOpinion(opinion); }else if(value instanceof ContractWithoutTextInfo){ ((ContractWithoutTextInfo)value).setOaOpinion(opinion); }else if(value instanceof PayRequestBillInfo){ ((PayRequestBillInfo)value).setOaOpinion(opinion); }else if(value instanceof MarketProjectInfo){ ((MarketProjectInfo)value).setOaOpinion(opinion); } this.destroyWindow(); } }
[ "yfsmile@qq.com" ]
yfsmile@qq.com
fff5fbf0e91dd309956f04b1159063c98835c3cf
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/yauaa/learning/1122/YauaaVersion.java
a1db09bd67d026b354a6129c62fcc183644b4d21
[]
no_license
ASSERT-KTH/synthetic-checkstyle-error-dataset
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
40c057e1669584bfc6fecf789b5b2854660222f3
refs/heads/master
2023-03-18T12:50:55.410343
2019-01-25T09:54:39
2019-01-25T09:54:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,854
java
/* * Yet Another UserAgent Analyzer * Copyright (C) 2013-2018 Niels Basjes * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package nl.basjes.parse.useragent.utils; import nl.basjes.parse.useragent.analyze.InvalidParserConfigurationException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.yaml.snakeyaml.nodes.MappingNode; import org.yaml.snakeyaml.nodes.Node; import org.yaml.snakeyaml.nodes.NodeTuple; import org.yaml.snakeyaml.nodes.SequenceNode; import java.util.List; import static nl.basjes.parse.useragent.Version.BUILD_TIME_STAMP; import static nl.basjes.parse.useragent.Version.COPYRIGHT; import static nl.basjes.parse.useragent.Version.GIT_COMMIT_ID_DESCRIBE_SHORT; import static nl.basjes.parse.useragent.Version.LICENSE; import static nl.basjes.parse.useragent.Version.PROJECT_VERSION; import static nl.basjes.parse.useragent.Version.URL; import static nl.basjes.parse.useragent.utils.YamlUtils.getExactlyOneNodeTuple; import static nl.basjes.parse.useragent.utils.YamlUtils.getKeyAsString; import static nl.basjes.parse.useragent.utils.YamlUtils.getValueAsSequenceNode; import static nl.basjes.parse.useragent.utils.YamlUtils.getValueAsString; import static nl.basjes.parse.useragent.utils.YamlUtils.requireNodeInstanceOf; public final class YauaaVersion { private static final Logger LOG = LoggerFactory.getLogger(YauaaVersion.class); private YauaaVersion() { } public static void logVersion(String... extraLines) { String[] lines = { "For more information: " + URL, COPYRIGHT + " - " + LICENSE }; String version = getVersion(); int width = version.length(); for (String line : lines ) { width = Math.max(width, line.length()); } for (String line : extraLines) { width = Math.max(width, line.length()); } LOG.info(""); LOG.info("/-{}-\\", padding('-', width)); logLine(version, width); LOG.info("+-{}-+", padding('-', width)); for (String line : lines) { logLine(line, width); } if (extraLines.length > 0) { LOG.info("+-{}-+", padding('-', width)); for (String line : extraLines) { logLine(line, width); } } LOG.info("\\-{}-/", padding('-', width)); LOG.info(""); } private static String padding(char letter, int count) { StringBuilder sb = new StringBuilder(128); for (int i = 0; i < count; i++) { sb.append(letter); } return sb.toString(); } private static void logLine(String line, int width) { LOG.info("| {}{} |", line, padding(' ', width - line.length())); } public static String getVersion() { return getVersion(PROJECT_VERSION, GIT_COMMIT_ID_DESCRIBE_SHORT, BUILD_TIME_STAMP); } public static String getVersion(String projectVersion, String gitCommitIdDescribeShort, String buildTimestamp) { return "Yauaa " + projectVersion + " (" + gitCommitIdDescribeShort + " @ " + buildTimestamp + ")"; } public static void assertSameVersion(NodeTuple versionNodeTuple, String filename) { // Check the version information from the Yaml files SequenceNode versionNode = getValueAsSequenceNode(versionNodeTuple, filename); String gitCommitIdDescribeShort = null; String buildTimestamp = null; String projectVersion = null; List<Node> versionList = versionNode.getValue(); for (Node versionEntry : versionList) { requireNodeInstanceOf(MappingNode.class, versionEntry, filename, "The entry MUST be a mapping"); NodeTuple entry = getExactlyOneNodeTuple((MappingNode) versionEntry, filename); String key = getKeyAsString(entry, filename); String value = getValueAsString(entry, filename); switch (key) { case "git_commit_id_describe_short": gitCommitIdDescribeShort = value; break; case "build_timestamp": buildTimestamp = value; break; case "project_version": projectVersion = value; break; case "copyright": case "license": case "url": // Ignore those two when comparing. break; default: throw new InvalidParserConfigurationException( "Yaml config.(" + filename + ":" + versionNode.getStartMark().getLine() + "): " + "Found unexpected config entry: " + key + ", allowed are " + "'git_commit_id_describe_short', 'build_timestamp' and 'project_version'"); } } assertSameVersion(gitCommitIdDescribeShort, buildTimestamp, projectVersion); } public static void assertSameVersion(String gitCommitIdDescribeShort, String buildTimestamp, String projectVersion) { if (GIT_COMMIT_ID_DESCRIBE_SHORT.equals(gitCommitIdDescribeShort) && BUILD_TIME_STAMP.equals(buildTimestamp) && PROJECT_VERSION.equals(projectVersion)) { return; } String libraryVersion = getVersion(PROJECT_VERSION, GIT_COMMIT_ID_DESCRIBE_SHORT, BUILD_TIME_STAMP); String rulesVersion = getVersion(projectVersion, gitCommitIdDescribeShort, buildTimestamp); LOG.error("==============================================="); LOG.error("========== FATAL ERROR ==========="); LOG.error("vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv"); LOG.error(""); LOG.error("Two different Yauaa versions have been loaded:"); LOG.error("Runtime Library: {}", libraryVersion); LOG.error("Rule sets : {}", rulesVersion); LOG.error(""); LOG.error("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"); LOG.error("==============================================="); throw new InvalidParserConfigurationException("Two different Yauaa versions have been loaded: \n" + "Runtime Library: " + libraryVersion + "\n" + "Rule sets : " + rulesVersion + "\n"); } }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
231e9c8c44dfd8e17290b985cb9f84dee55850a4
eb9f655206c43c12b497c667ba56a0d358b6bc3a
/java/java-tests/testData/inspection/switchExpressionMigration/afterSwitchWithReturnNonExhaustiveSealed.java
5d1c070f8e7a275a0edf5905b9d8e1fb4383f235
[ "Apache-2.0" ]
permissive
JetBrains/intellij-community
2ed226e200ecc17c037dcddd4a006de56cd43941
05dbd4575d01a213f3f4d69aa4968473f2536142
refs/heads/master
2023-09-03T17:06:37.560889
2023-09-03T11:51:00
2023-09-03T12:12:27
2,489,216
16,288
6,635
Apache-2.0
2023-09-12T07:41:58
2011-09-30T13:33:05
null
UTF-8
Java
false
false
282
java
// "Replace with 'switch' expression" "true-preview" class X { int test(I i) { return switch (i) { case C1 c1 -> 3; default -> 5; }; } sealed interface I {} final class C1 implements I {} final class C2 implements I {} }
[ "intellij-monorepo-bot-no-reply@jetbrains.com" ]
intellij-monorepo-bot-no-reply@jetbrains.com
575ba700dc42a82a0d0d70b18d9371107e16b7e5
028cbe18b4e5c347f664c592cbc7f56729b74060
/external/modules/derby/10.10.2.0/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/_Suite.java
dd66fa7a37ac1a73a83585128010b9d442f1a6ac
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause", "LicenseRef-scancode-generic-cla", "LicenseRef-scancode-generic-export-compliance" ]
permissive
dmatej/Glassfish-SVN-Patched
8d355ff753b23a9a1bd9d7475fa4b2cfd3b40f9e
269e29ba90db6d9c38271f7acd2affcacf2416f1
refs/heads/master
2021-05-28T12:55:06.267463
2014-11-11T04:21:44
2014-11-11T04:21:44
23,610,469
1
0
null
null
null
null
UTF-8
Java
false
false
7,567
java
/* Derby - Class org.apache.derbyTesting.functionTests.tests.jdbcapi._Suite Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License */ package org.apache.derbyTesting.functionTests.tests.jdbcapi; import org.apache.derbyTesting.junit.BaseTestCase; import org.apache.derbyTesting.junit.JDBC; import junit.framework.Test; import junit.framework.TestSuite; /** * Suite to run all JUnit tests in this package: * org.apache.derbyTesting.functionTests.tests.jdbcapi * */ public class _Suite extends BaseTestCase { /** * Use suite method instead. */ private _Suite(String name) { super(name); } public static Test suite() { TestSuite suite = new TestSuite("jdbcapi"); suite.addTest(BlobSetBytesBoundaryTest.suite()); suite.addTest(ConcurrencyTest.suite()); suite.addTest(DaylightSavingTest.suite()); suite.addTest(HoldabilityTest.suite()); suite.addTest(Derby5158Test.suite()); suite.addTest(LobLengthTest.suite()); suite.addTest(ProcedureTest.suite()); suite.addTest(SURQueryMixTest.suite()); suite.addTest(SURTest.suite()); suite.addTest(UpdatableResultSetTest.suite()); suite.addTest(UpdateXXXTest.suite()); suite.addTest(URCoveringIndexTest.suite()); suite.addTest(ResultSetCloseTest.suite()); suite.addTest(BlobClob4BlobTest.suite()); suite.addTest(CharacterStreamsTest.suite()); suite.addTest(BatchUpdateTest.suite()); suite.addTest(StreamTest.suite()); suite.addTest(DboPowersTest.suite()); suite.addTest(BlobStoredProcedureTest.suite()); suite.addTest(ClobStoredProcedureTest.suite()); suite.addTest(CallableTest.suite()); suite.addTest(ResultSetMiscTest.suite()); suite.addTest(PrepStmtMetaDataTest.suite()); suite.addTest(ScrollResultSetTest.suite()); suite.addTest(LobStreamsTest.suite()); suite.addTest(ResultSetJDBC30Test.suite()); suite.addTest(DatabaseMetaDataTest.suite()); suite.addTest(ClosedObjectTest.suite()); suite.addTest(SetTransactionIsolationTest.suite()); suite.addTest(AuthenticationTest.suite()); if (!JDBC.vmSupportsJSR169()) { // DERBY-5069 Suites.All fails with InvocationTargetException suite.addTest(DriverTest.suite()); } suite.addTest(SURijTest.suite()); suite.addTest(NullSQLTextTest.suite()); suite.addTest(PrepStmtNullTest.suite()); suite.addTest(StatementJdbc30Test.suite()); suite.addTest(StatementJdbc20Test.suite()); suite.addTest(ClobTest.suite()); suite.addTest(BlobUpdatableStreamTest.suite()); suite.addTest(AIjdbcTest.suite()); suite.addTest(LargeDataLocksTest.suite()); suite.addTest(DMDBugsTest.suite()); suite.addTest(DataSourceTest.suite()); suite.addTest(SavepointJdbc30Test.suite()); suite.addTest(RelativeTest.suite()); suite.addTest(metadataMultiConnTest.suite()); suite.addTest(ResultSetStreamTest.suite()); suite.addTest(InternationalConnectSimpleDSTest.suite()); suite.addTest(Derby2017LayerATest.suite()); suite.addTest(LobRsGetterTest.suite()); // Old harness .java tests that run using the HarnessJavaTest // adapter and continue to use a single master file. suite.addTest(JDBCHarnessJavaTest.suite()); if (JDBC.vmSupportsJDBC3()) { // Tests that do not run under JSR169 // DERBY-2403 blocks ParameterMappingTest from running // under JSR169 suite.addTest(ParameterMappingTest.suite()); // Class requires javax.sql.PooledConnection // even to load, even though the suite method // is correctly implemented. suite.addTest(DataSourcePropertiesTest.suite()); // Tests JDBC 3.0 ability to establish a result set of // auto-generated keys. suite.addTest(AutoGenJDBC30Test.suite()); // Test uses DriverManager suite.addTest(DriverMgrAuthenticationTest.suite()); // Tests uses JDBC 3.0 datasources suite.addTest(PoolDSAuthenticationTest.suite()); suite.addTest(PoolXADSCreateShutdownDBTest.suite()); suite.addTest(XADSAuthenticationTest.suite()); suite.addTest(XATransactionTest.suite()); suite.addTest(XATest.suite()); // Test uses JDBC 3.0 datasources, and javax.naming.Reference etc. suite.addTest(DataSourceReferenceTest.suite()); suite.addTest(DataSourceSerializationTest.suite()); // Test uses DriverManager, Pooled and XADataSources, and // an inner class implements ConnectionEventListener. suite.addTest(J2EEDataSourceTest.suite()); // Test requires ClientConnectionPoolDataSource. suite.addTest(ClientConnectionPoolDataSourceTest.suite()); // Test requires ClientConnectionPoolDataSource. suite.addTest(StatementPoolingTest.suite()); //suite to test updatable reader for clob in embedded driver suite.addTest (ClobUpdatableReaderTest.suite()); //truncate test for clob suite.addTest (ClobTruncateTest.suite()); //JSR169 does not support ParameterMetaData suite.addTest(ParameterMetaDataJdbc30Test.suite()); suite.addTest(CacheSessionDataTest.suite()); // LDAPAuthentication and InvalidLDAPSrvAuth cannot run with JSR169 // implementation because of missing support for authentication // functionality. // Also, LDAPAuthentication needs properties passed in or is // pointless (unless we can find a test LDAP Server) String ldapServer=getSystemProperty("derbyTesting.ldapServer"); if (ldapServer == null || ldapServer.length() < 1) suite.addTest(new TestSuite( "LDAPAuthenticationTest and XAJNDITest require " + "derbyTesting.ldap* properties.")); else { suite.addTest(LDAPAuthenticationTest.suite()); suite.addTest(XAJNDITest.suite()); } suite.addTest(InvalidLDAPServerAuthenticationTest.suite()); // XA and ConnectionPool Datasource are not available with // JSR169 so can't run InternationalConnectTest. suite.addTest(InternationalConnectTest.suite()); // Test requires java.sql.DriverManager suite.addTest(AutoloadTest.fullAutoloadSuite()); } return suite; } }
[ "snjezana@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5" ]
snjezana@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5
ec30c127fba22ed747eb8aab99b9cacb772a2e2b
462c6815dadc83b1bd406fba29ab0c905cf4bc05
/src/bee/generated/server/CreatePullPointResponse.java
e9f03c8c19f2bb3fc12472e5590a149f7ace78c0
[]
no_license
francoisperron/learning-soap-onvif
ab89b38d770547c0b9ad17a45865c7b8adea5d09
6a0ed9167ad8c2369993da21a5d115a309f42e16
refs/heads/master
2020-05-14T23:53:35.084374
2019-04-18T02:33:17
2019-04-18T02:33:17
182,002,749
1
0
null
null
null
null
UTF-8
Java
false
false
3,669
java
package bee.generated.server; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAnyAttribute; import javax.xml.bind.annotation.XmlAnyElement; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import javax.xml.namespace.QName; import javax.xml.ws.wsaddressing.W3CEndpointReference; import org.w3c.dom.Element; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="PullPoint" type="{http://www.w3.org/2005/08/addressing}EndpointReferenceType"/> * &lt;any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/> * &lt;/sequence> * &lt;anyAttribute/> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "pullPoint", "any" }) @XmlRootElement(name = "CreatePullPointResponse", namespace = "http://docs.oasis-open.org/wsn/b-2") public class CreatePullPointResponse { @XmlElement(name = "PullPoint", namespace = "http://docs.oasis-open.org/wsn/b-2", required = true) protected W3CEndpointReference pullPoint; @XmlAnyElement(lax = true) protected List<Object> any; @XmlAnyAttribute private Map<QName, String> otherAttributes = new HashMap<QName, String>(); /** * Gets the value of the pullPoint property. * * @return * possible object is * {@link W3CEndpointReference } * */ public W3CEndpointReference getPullPoint() { return pullPoint; } /** * Sets the value of the pullPoint property. * * @param value * allowed object is * {@link W3CEndpointReference } * */ public void setPullPoint(W3CEndpointReference value) { this.pullPoint = value; } /** * Gets the value of the any 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 any property. * * <p> * For example, to add a new item, do as follows: * <pre> * getAny().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link Object } * {@link Element } * * */ public List<Object> getAny() { if (any == null) { any = new ArrayList<Object>(); } return this.any; } /** * Gets a map that contains attributes that aren't bound to any typed property on this class. * * <p> * the map is keyed by the name of the attribute and * the value is the string value of the attribute. * * the map returned by this method is live, and you can add new attribute * by updating the map directly. Because of this design, there's no setter. * * * @return * always non-null */ public Map<QName, String> getOtherAttributes() { return otherAttributes; } }
[ "fperron@gmail.com" ]
fperron@gmail.com
2098fbf348842982f10b56a746c78408c837cebe
bdb5d205d56ef9e0f523be1c3fd683400f7057a5
/app/src/main/java/com/tgf/kcwc/mvp/model/CouponEventModel.java
0cb5dbcf400d6e8cfecd8fc250cab9de0c8e650d
[]
no_license
yangyusong1121/Android-car
f8fbd83b8efeb2f0e171048103f2298d96798f9e
d6215e7a59f61bd7f15720c8e46423045f41c083
refs/heads/master
2020-03-11T17:25:07.154083
2018-04-19T02:18:15
2018-04-19T02:20:19
130,146,301
0
1
null
null
null
null
UTF-8
Java
false
false
566
java
package com.tgf.kcwc.mvp.model; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; /** * Auther: Scott * Date: 2017/2/15 0015 * E-mail:hekescott@qq.com */ @JsonIgnoreProperties(ignoreUnknown = true) public class CouponEventModel { @JsonProperty("id") public int id; @JsonProperty("title") public String title; @JsonProperty("cover") public String cover; @JsonProperty("inventory") public int inventory; @JsonProperty("get_limit") public int limitNums; }
[ "328797668@qq.com" ]
328797668@qq.com
d9c5d638376110908063a95a79284f0ea4db6b0f
879a1a1c39eaa31399e13fedf56384477e877f32
/gradle-core-3.1.0.jar_dir/gradle-core-3.1.0/52bded9389c25f568914b1ebf31a5d18/com/android/build/gradle/internal/tasks/CheckProguardFiles.java
75c48a63784febd64fc330b5b3b5733a86359cb6
[ "Apache-2.0" ]
permissive
ytempest/gradle-source-3.2.1
dcf330e7be877fa6106b532cc8a29a93c41fb8a8
2957cc9a46826f8f72851c7e1c88caffc677df7c
refs/heads/master
2023-03-27T03:57:27.198502
2021-03-09T03:55:50
2021-03-09T03:55:50
345,876,508
0
0
null
null
null
null
UTF-8
Java
false
false
4,172
java
/* */ package com.android.build.gradle.internal.tasks; /* */ /* */ import com.android.build.gradle.ProguardFiles; /* */ import com.android.build.gradle.ProguardFiles.ProguardFile; /* */ import com.android.build.gradle.internal.scope.TaskConfigAction; /* */ import com.android.build.gradle.internal.scope.VariantScope; /* */ import com.android.build.gradle.shrinker.ProguardConfig; /* */ import com.android.build.gradle.shrinker.parser.ProguardFlags; /* */ import com.android.build.gradle.shrinker.parser.UnsupportedFlagsHandler; /* */ import java.io.File; /* */ import java.util.HashMap; /* */ import java.util.List; /* */ import java.util.Map; /* */ import org.gradle.api.DefaultTask; /* */ import org.gradle.api.InvalidUserDataException; /* */ import org.gradle.api.tasks.InputFiles; /* */ import org.gradle.api.tasks.TaskAction; /* */ import org.slf4j.Logger; /* */ import org.slf4j.LoggerFactory; /* */ /* */ public class CheckProguardFiles /* */ extends DefaultTask /* */ { /* 39 */ private static final Logger logger = LoggerFactory.getLogger(CheckProguardFiles.class); /* */ /* */ private List<File> proguardFiles; /* */ /* */ @TaskAction /* */ public void run() /* */ { /* 48 */ ProguardConfig proguardConfig = new ProguardConfig(); /* */ /* 50 */ Map<File, ProguardFiles.ProguardFile> oldFiles = new HashMap(); /* 51 */ oldFiles.put( /* 52 */ ProguardFiles.getDefaultProguardFile(OPTIMIZEfileName, getProject()) /* 53 */ .getAbsoluteFile(), ProguardFiles.ProguardFile.OPTIMIZE); /* */ /* 55 */ oldFiles.put( /* 56 */ ProguardFiles.getDefaultProguardFile(DONT_OPTIMIZEfileName, /* 57 */ getProject()) /* 58 */ .getAbsoluteFile(), ProguardFiles.ProguardFile.DONT_OPTIMIZE); /* */ /* 61 */ for (File file : proguardFiles) { /* 62 */ if (oldFiles.containsKey(file.getAbsoluteFile())) { /* 63 */ String name = getgetAbsoluteFilefileName; /* 64 */ throw new InvalidUserDataException(name + " should not be used together with the new postprocessing DSL. The new DSL includes sensible settings by default, you can override this using `postprocessing { proguardFiles = []}`"); /* */ } /* */ /* */ try /* */ { /* 72 */ proguardConfig.parse(file, UnsupportedFlagsHandler.NO_OP); /* */ } /* */ catch (Exception e) { /* 75 */ logger.info("Failed to parse " + file.getAbsolutePath(), e); } /* 76 */ continue; /* */ /* 79 */ ProguardFlags flags = proguardConfig.getFlags(); /* 80 */ if ((flags.isDontShrink()) || (flags.isDontOptimize()) || (flags.isDontObfuscate())) /* */ { /* 82 */ throw new InvalidUserDataException(file.getAbsolutePath() + ": When postprocessing features are configured in the DSL, corresponding flags (e.g. -dontobfuscate) cannot be used."); /* */ } /* */ } /* */ } /* */ /* */ @InputFiles /* */ public List<File> getProguardFiles() /* */ { /* 91 */ return proguardFiles; /* */ } /* */ /* */ public static class ConfigAction implements TaskConfigAction<CheckProguardFiles> { /* */ private final VariantScope scope; /* */ /* */ public ConfigAction(VariantScope scope) { /* 98 */ this.scope = scope; /* */ } /* */ /* */ public String getName() /* */ { /* 104 */ return scope.getTaskName("check", "ProguardFiles"); /* */ } /* */ /* */ public Class<CheckProguardFiles> getType() /* */ { /* 110 */ return CheckProguardFiles.class; /* */ } /* */ /* */ public void execute(CheckProguardFiles task) /* */ { /* 115 */ proguardFiles = scope.getProguardFiles(); /* */ } /* */ } /* */ } /* Location: * Qualified Name: com.android.build.gradle.internal.tasks.CheckProguardFiles * Java Class Version: 8 (52.0) * JD-Core Version: 0.7.1 */
[ "787491096@qq.com" ]
787491096@qq.com
882ba82c6b9be79d9e1cea972fcbaca46eaf5d2c
e48bbaf1bd1089f256a4832d4e45f45ef87bd585
/p2psys-core/src/main/java/com/rongdu/p2psys/tpp/chinapnr/model/ChinapnrReconciliation.java
ef6ecc44063884ef58366a124aa21da207152075
[]
no_license
rebider/pro_bank
330d5d53913424d8629622f045fc9b26ad893591
37799f63d63e8a2df1f63191a92baf5b01e88a3f
refs/heads/master
2021-06-17T21:15:58.363591
2017-05-25T09:45:38
2017-05-25T09:45:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,126
java
package com.rongdu.p2psys.tpp.chinapnr.model; import java.io.UnsupportedEncodingException; /** * 放还款对账(投标对账) * * @author yinliang * @version 2.0 * @Date 2015年1月17日 */ public class ChinapnrReconciliation extends ChinapnrModel { private String beginDate; private String endDate; private String pageNum; private String pageSize; private String queryTransType; // 交易查询类型,REPAYMENT public ChinapnrReconciliation(String beginDate, String endDate, String pageNum, String pageSize, String queryTransType) { super(); this.setCmdId("Reconciliation"); this.setBeginDate(beginDate); this.setEndDate(endDate); this.setPageNum(pageNum); this.setPageSize(pageSize); this.setQueryTransType(queryTransType); } private String[] paramNames = new String[] { "version", "cmdId", "merCustId", "beginDate", "endDate", "pageNum", "pageSize", "queryTransType", "chkValue" }; public StringBuffer getMerData() throws UnsupportedEncodingException { StringBuffer MerData = super.getMerData(); MerData.append(getBeginDate()).append(getEndDate()) .append(getPageNum()).append(getPageSize()) .append(getQueryTransType()); return MerData; } public String[] getParamNames() { return paramNames; } public void setParamNames(String[] paramNames) { this.paramNames = paramNames; } public String getBeginDate() { return beginDate; } public void setBeginDate(String beginDate) { this.beginDate = beginDate; } public String getEndDate() { return endDate; } public void setEndDate(String endDate) { this.endDate = endDate; } public String getPageNum() { return pageNum; } public void setPageNum(String pageNum) { this.pageNum = pageNum; } public String getPageSize() { return pageSize; } public void setPageSize(String pageSize) { this.pageSize = pageSize; } public String getQueryTransType() { return queryTransType; } public void setQueryTransType(String queryTransType) { this.queryTransType = queryTransType; } }
[ "jinxlovejinx@vip.qq.com" ]
jinxlovejinx@vip.qq.com
7a79e2ceb7ec443c5cce6b25c4980ee97edb4a58
b4c47b649e6e8b5fc48eed12fbfebeead32abc08
/android/util/ContainerHelpers.java
c7ddd32764931c8c3f0e991acb43d10864178613
[]
no_license
neetavarkala/miui_framework_clover
300a2b435330b928ac96714ca9efab507ef01533
2670fd5d0ddb62f5e537f3e89648d86d946bd6bc
refs/heads/master
2022-01-16T09:24:02.202222
2018-09-01T13:39:50
2018-09-01T13:39:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,162
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 android.util; class ContainerHelpers { ContainerHelpers() { } static int binarySearch(int ai[], int i, int j) { boolean flag = false; int l = i - 1; for(i = ((flag) ? 1 : 0); i <= l;) { int k = i + l >>> 1; int i1 = ai[k]; if(i1 < j) i = k + 1; else if(i1 > j) l = k - 1; else return k; } return i; } static int binarySearch(long al[], int i, long l) { boolean flag = false; int k = i - 1; i = ((flag) ? 1 : 0); for(int j = k; i <= j;) { int i1 = i + j >>> 1; long l1 = al[i1]; if(l1 < l) i = i1 + 1; else if(l1 > l) j = i1 - 1; else return i1; } return i; } }
[ "hosigumayuugi@gmail.com" ]
hosigumayuugi@gmail.com
d341da5e1b1222ad9f95d8dbc84e3667842e9ead
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project66/src/main/java/org/gradle/test/performance66_2/Production66_123.java
8a180c218edc626c235b67d0e611235b993eccb8
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
305
java
package org.gradle.test.performance66_2; public class Production66_123 extends org.gradle.test.performance15_2.Production15_123 { private final String property; public Production66_123() { this.property = "foo"; } public String getProperty() { return property; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
9c7d1369af83ce3c86b8836238b05a82eaf446de
f86938ea6307bf6d1d89a07b5b5f9e360673d9b8
/CodeComment_Data/Code_Jam/train/Revenge_of_the_Pancakes/S/readInFile.java
b8c9db51f665efcac82cab6b79ba9c179783a8ea
[]
no_license
yxh-y/code_comment_generation
8367b355195a8828a27aac92b3c738564587d36f
2c7bec36dd0c397eb51ee5bd77c94fa9689575fa
refs/heads/master
2021-09-28T18:52:40.660282
2018-11-19T14:54:56
2018-11-19T14:54:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,126
java
package methodEmbedding.Revenge_of_the_Pancakes.S.LYD78; import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.util.ArrayList; import java.util.List; public class readInFile { public static void main(String[] args) { BufferedReader br = null; try { String sCurrentLine; br = new BufferedReader(new FileReader( "C:\\Users\\Subhransu\\workspace\\Test\\file\\B-small-attempt0.in")); List<String> strings = new ArrayList<String>(); while ((sCurrentLine = br.readLine()) != null) { strings.add(sCurrentLine); } ProblemB problemB = new ProblemB(); List<String> outputs = problemB.execute(strings); FileWriter writer = new FileWriter( "C:\\Users\\Subhransu\\workspace\\Test\\file\\B-small-attempt0.out"); for (String output : outputs) { writer.write(output + System.getProperty("line.separator")); } writer.close(); } catch (IOException e) { e.printStackTrace(); } finally { try { if (br != null) br.close(); } catch (IOException ex) { ex.printStackTrace(); } } } }
[ "liangyuding@sjtu.edu.cn" ]
liangyuding@sjtu.edu.cn
48c845f124c4a24f43c9c0a81b81ac74fe08b0a3
e1ed5f410bba8c05310b6a7dabe65b7ef62a9322
/src/main/java/com/sda/javabyd3/mizi/designPattern/fabricMethod/generators/OfficialReportGenerator.java
3453547d26beeb9a1d71e0288289838aa5481d56
[]
no_license
pmkiedrowicz/javabyd3
252f70e70f0fc71e8ef9019fdd8cea5bd05ca90b
7ff8e93c041f27383b3ad31b43f014c059ef53e3
refs/heads/master
2022-01-01T08:56:08.747392
2019-07-26T19:02:50
2019-07-26T19:02:50
199,065,478
0
0
null
null
null
null
UTF-8
Java
false
false
437
java
package com.sda.javabyd3.mizi.designPattern.fabricMethod.generators; import com.sda.javabyd3.mizi.designPattern.fabricMethod.reports.OfficialReport; import com.sda.javabyd3.mizi.designPattern.fabricMethod.reports.Report; public class OfficialReportGenerator implements ReportGenerator { @Override public Report generateRepor(ReportData data) { // Report generation process return new OfficialReport(); } }
[ "pmkiedrowicz@gmail.com" ]
pmkiedrowicz@gmail.com
d61d83ab1a236719d14f578c60b6d5d50eea72a1
4e8d52f594b89fa356e8278265b5c17f22db1210
/WebServiceArtifacts/cpdb/cpdbns/GetCpdbIdsInFsetResponse.java
08dcefb27435a5772b88cbc4e437408843a0ce33
[]
no_license
ouniali/WSantipatterns
dc2e5b653d943199872ea0e34bcc3be6ed74c82e
d406c67efd0baa95990d5ee6a6a9d48ef93c7d32
refs/heads/master
2021-01-10T05:22:19.631231
2015-05-26T06:27:52
2015-05-26T06:27:52
36,153,404
1
2
null
null
null
null
UTF-8
Java
false
false
1,814
java
package cpdbns; 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.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="cpdbIds" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "cpdbIds" }) @XmlRootElement(name = "getCpdbIdsInFsetResponse") public class GetCpdbIdsInFsetResponse { protected List<String> cpdbIds; /** * Gets the value of the cpdbIds 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 cpdbIds property. * * <p> * For example, to add a new item, do as follows: * <pre> * getCpdbIds().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link String } * * */ public List<String> getCpdbIds() { if (cpdbIds == null) { cpdbIds = new ArrayList<String>(); } return this.cpdbIds; } }
[ "ouni_ali@yahoo.fr" ]
ouni_ali@yahoo.fr
a6c6cabd48db7b7a3a8e1642dc181acd95eb877f
2e17f9bab427647bd7ad5b6a07544d21e16b11e3
/Chapter18/PalindromRecursiveHelper/PalindromRecursiveHelperTester.java
e90b96d52fbbbb74e4e2ebc46c98de07c418c9cc
[ "MIT" ]
permissive
freakygeeks/BigJavaCodeSolution
42918111d8efb7bcb88616b256e44894c6433ed1
ed02f808cf61a1bf0f3af8bd5fb891d10229e3f3
refs/heads/master
2021-07-11T13:15:00.466897
2021-04-02T14:49:48
2021-04-02T14:49:48
52,708,407
3
0
null
2021-04-02T14:41:13
2016-02-28T06:35:46
Java
UTF-8
Java
false
false
482
java
//Chapter 18 - Example 18.1 import java.util.Scanner; public class PalindromRecursiveHelperTester { public static void main (String[] args) { Scanner in = new Scanner(System.in); System.out.print("Please enter a string : "); String s = in.next(); PalindromRecursiveHelper drom = new PalindromRecursiveHelper(s); if (drom.isPalindrom()) { System.out.println(s + " is a palindrom"); } else { System.out.println(s + " is not a palindrom"); } } }
[ "freakygeeks@users.noreply.github.com" ]
freakygeeks@users.noreply.github.com
621737af02c60a4436c8ef74d3a7c6c32bd89031
875d88ee9cf7b40c9712178d1ee48f0080fa0f8a
/geronimo-jcdi_2.0_spec/src/main/java/javax/decorator/Decorator.java
b3d3369c44d2fac55c174f2af1da7d26340cb90c
[ "Apache-2.0", "W3C", "W3C-19980720" ]
permissive
jgallimore/geronimo-specs
b152164488692a7e824c73a9ba53e6fb72c6a7a3
09c09bcfc1050d60dcb4656029e957837f851857
refs/heads/trunk
2022-12-15T14:02:09.338370
2020-09-14T18:21:46
2020-09-14T18:21:46
284,994,475
0
1
Apache-2.0
2020-09-14T18:21:47
2020-08-04T13:51:47
Java
UTF-8
Java
false
false
1,490
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package javax.decorator; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import javax.enterprise.inject.Stereotype; /** * Defines decorator classes. * Classes annotated with &#064;Decorator will get picked up by the CDI container and * 'decorate' the implemented CDI ManagedBeans. * * A Decorator must implement at least one of the Interfaces of it's decorated type. * * * @version $Rev$ $Date$ * */ @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) @Documented @Stereotype public @interface Decorator { }
[ "struberg@apache.org" ]
struberg@apache.org
3e9e564772a5fd62ea447ac71eb963fcb5fe62d3
a280aa9ac69d3834dc00219e9a4ba07996dfb4dd
/regularexpress/home/weilaidb/work/app/hadoop-2.7.3-src/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/RunSharedCacheCleanerTaskRequest.java
b8e71f04d40de69d73128285ca96f292e8c57556
[]
no_license
weilaidb/PythonExample
b2cc6c514816a0e1bfb7c0cbd5045cf87bd28466
798bf1bdfdf7594f528788c4df02f79f0f7827ce
refs/heads/master
2021-01-12T13:56:19.346041
2017-07-22T16:30:33
2017-07-22T16:30:33
68,925,741
4
2
null
null
null
null
UTF-8
Java
false
false
267
java
package org.apache.hadoop.yarn.server.api.protocolrecords; import org.apache.hadoop.classification.InterfaceAudience.Public; import org.apache.hadoop.classification.InterfaceStability.Unstable; @Public @Unstable public abstract class RunSharedCacheCleanerTaskRequest
[ "weilaidb@localhost.localdomain" ]
weilaidb@localhost.localdomain
0ae56f2bd16c80fad6a95b13c4794fe81cd09fae
54c1dcb9a6fb9e257c6ebe7745d5008d29b0d6b6
/app/src/main/java/com/google/android/gms/internal/firebase_ml/zzhc.java
46299b4bb6a5b561ddc50188f1fe10ffff43ef5f
[]
no_license
rcoolboy/guilvN
3817397da465c34fcee82c0ca8c39f7292bcc7e1
c779a8e2e5fd458d62503dc1344aa2185101f0f0
refs/heads/master
2023-05-31T10:04:41.992499
2021-07-07T09:58:05
2021-07-07T09:58:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
258
java
package com.google.android.gms.internal.firebase_ml; import java.nio.charset.Charset; public final class zzhc { public static final Charset ISO_8859_1 = Charset.forName("ISO-8859-1"); public static final Charset UTF_8 = Charset.forName("UTF-8"); }
[ "593746220@qq.com" ]
593746220@qq.com
b645aab1a521e3465b80273cf8ab24fea169e042
5ebf8e5463d207b5cc17e14cc51e5a1df135ccb9
/moe.apple/moe.platform.ios/src/main/java/apple/uikit/NSFileProviderExtension.java
e78831f096cbd11b02f6d5f8678ca232c245c9d1
[ "ICU", "Apache-2.0", "W3C" ]
permissive
multi-os-engine-community/moe-core
1cd1ea1c2caf6c097d2cd6d258f0026dbf679725
a1d54be2cf009dd57953c9ed613da48cdfc01779
refs/heads/master
2021-07-09T15:31:19.785525
2017-08-22T10:34:50
2017-08-22T10:59:02
101,847,137
1
0
null
2017-08-30T06:43:46
2017-08-30T06:43:46
null
UTF-8
Java
false
false
7,243
java
/* Copyright 2014-2016 Intel 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 apple.uikit; import apple.NSObject; import apple.foundation.NSArray; import apple.foundation.NSDictionary; import apple.foundation.NSError; import apple.foundation.NSMethodSignature; import apple.foundation.NSSet; import apple.foundation.NSURL; import org.moe.natj.c.ann.FunctionPtr; import org.moe.natj.general.NatJ; import org.moe.natj.general.Pointer; import org.moe.natj.general.ann.Generated; import org.moe.natj.general.ann.Library; import org.moe.natj.general.ann.Mapped; import org.moe.natj.general.ann.MappedReturn; import org.moe.natj.general.ann.NInt; import org.moe.natj.general.ann.NUInt; import org.moe.natj.general.ann.Owned; import org.moe.natj.general.ann.ReferenceInfo; import org.moe.natj.general.ann.Runtime; import org.moe.natj.general.ptr.Ptr; import org.moe.natj.general.ptr.VoidPtr; import org.moe.natj.objc.Class; import org.moe.natj.objc.ObjCRuntime; import org.moe.natj.objc.SEL; import org.moe.natj.objc.ann.ObjCBlock; import org.moe.natj.objc.ann.ObjCClassBinding; import org.moe.natj.objc.ann.Selector; import org.moe.natj.objc.map.ObjCObjectMapper; @Generated @Library("UIKit") @Runtime(ObjCRuntime.class) @ObjCClassBinding public class NSFileProviderExtension extends NSObject { static { NatJ.register(); } @Generated protected NSFileProviderExtension(Pointer peer) { super(peer); } @Generated @Selector("accessInstanceVariablesDirectly") public static native boolean accessInstanceVariablesDirectly(); @Generated @Owned @Selector("alloc") public static native NSFileProviderExtension alloc(); @Generated @Selector("allocWithZone:") @MappedReturn(ObjCObjectMapper.class) public static native Object allocWithZone(VoidPtr zone); @Generated @Selector("automaticallyNotifiesObserversForKey:") public static native boolean automaticallyNotifiesObserversForKey(String key); @Generated @Selector("cancelPreviousPerformRequestsWithTarget:") public static native void cancelPreviousPerformRequestsWithTarget(@Mapped(ObjCObjectMapper.class) Object aTarget); @Generated @Selector("cancelPreviousPerformRequestsWithTarget:selector:object:") public static native void cancelPreviousPerformRequestsWithTargetSelectorObject( @Mapped(ObjCObjectMapper.class) Object aTarget, SEL aSelector, @Mapped(ObjCObjectMapper.class) Object anArgument); @Generated @Selector("classFallbacksForKeyedArchiver") public static native NSArray<String> classFallbacksForKeyedArchiver(); @Generated @Selector("classForKeyedUnarchiver") public static native Class classForKeyedUnarchiver(); @Generated @Selector("debugDescription") public static native String debugDescription_static(); @Generated @Selector("description") public static native String description_static(); @Generated @Selector("hash") @NUInt public static native long hash_static(); @Generated @Selector("instanceMethodForSelector:") @FunctionPtr(name = "call_instanceMethodForSelector_ret") public static native NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(SEL aSelector); @Generated @Selector("instanceMethodSignatureForSelector:") public static native NSMethodSignature instanceMethodSignatureForSelector(SEL aSelector); @Generated @Selector("instancesRespondToSelector:") public static native boolean instancesRespondToSelector(SEL aSelector); @Generated @Selector("isSubclassOfClass:") public static native boolean isSubclassOfClass(Class aClass); @Generated @Selector("keyPathsForValuesAffectingValueForKey:") public static native NSSet<String> keyPathsForValuesAffectingValueForKey(String key); @Generated @Owned @Selector("new") @MappedReturn(ObjCObjectMapper.class) public static native Object new_objc(); @Generated @Selector("placeholderURLForURL:") public static native NSURL placeholderURLForURL(NSURL url); @Generated @Selector("resolveClassMethod:") public static native boolean resolveClassMethod(SEL sel); @Generated @Selector("resolveInstanceMethod:") public static native boolean resolveInstanceMethod(SEL sel); @Generated @Selector("setVersion:") public static native void setVersion_static(@NInt long aVersion); @Generated @Selector("superclass") public static native Class superclass_static(); @Generated @Selector("version") @NInt public static native long version_static(); @Generated @Selector("writePlaceholderAtURL:withMetadata:error:") public static native boolean writePlaceholderAtURLWithMetadataError(NSURL placeholderURL, NSDictionary<?, ?> metadata, @ReferenceInfo(type = NSError.class) Ptr<NSError> error); @Generated @Selector("URLForItemWithPersistentIdentifier:") public native NSURL URLForItemWithPersistentIdentifier(String identifier); @Generated @Selector("documentStorageURL") public native NSURL documentStorageURL(); @Generated @Selector("init") public native NSFileProviderExtension init(); @Generated @Selector("itemChangedAtURL:") public native void itemChangedAtURL(NSURL url); @Generated @Selector("persistentIdentifierForItemAtURL:") public native String persistentIdentifierForItemAtURL(NSURL url); @Generated @Selector("providePlaceholderAtURL:completionHandler:") public native void providePlaceholderAtURLCompletionHandler(NSURL url, @ObjCBlock(name = "call_providePlaceholderAtURLCompletionHandler") Block_providePlaceholderAtURLCompletionHandler completionHandler); @Generated @Selector("providerIdentifier") public native String providerIdentifier(); @Generated @Selector("startProvidingItemAtURL:completionHandler:") public native void startProvidingItemAtURLCompletionHandler(NSURL url, @ObjCBlock(name = "call_startProvidingItemAtURLCompletionHandler") Block_startProvidingItemAtURLCompletionHandler completionHandler); @Generated @Selector("stopProvidingItemAtURL:") public native void stopProvidingItemAtURL(NSURL url); @Runtime(ObjCRuntime.class) @Generated public interface Block_providePlaceholderAtURLCompletionHandler { @Generated void call_providePlaceholderAtURLCompletionHandler(NSError arg0); } @Runtime(ObjCRuntime.class) @Generated public interface Block_startProvidingItemAtURLCompletionHandler { @Generated void call_startProvidingItemAtURLCompletionHandler(NSError arg0); } }
[ "kristof.liliom@migeran.com" ]
kristof.liliom@migeran.com
261bc93598335fddf69c9e81a4c3a3aad1722920
dc599e9ff38515bc4505450fa6b2a07f2bc83a3c
/algorithms/java/src/DynamicProgramming/DistinctSubsequencesT.java
4ff9ce4ed99d79c75adefdaeee1f50be4be63763
[]
no_license
Jack47/leetcode
dd53da8b884074f23bc04eb14429fe7a6bdf3aca
aed4f6a90b6a69ffcd737b919eb5ba0113a47d40
refs/heads/master
2021-01-10T16:27:41.855762
2018-07-20T08:53:36
2018-07-20T08:53:36
44,210,364
0
0
null
null
null
null
UTF-8
Java
false
false
819
java
package DynamicProgramming; public class DistinctSubsequencesT { // subsequence(s) ==> t public int numDistinct(String s, String t) { int[][] dp = new int[t.length() + 1][s.length() + 1]; for (int i = 0; i <= t.length(); i++) { for (int j = 0; j <= s.length(); j++) { if (i == 0) { dp[i][j] = 1; continue; } if (j == 0) { dp[i][j] = 0; continue; } if (t.charAt(i - 1) == s.charAt(j - 1)) { dp[i][j] = dp[i][j - 1] + dp[i - 1][j - 1] * 1; } else { dp[i][j] = dp[i][j - 1]; } } } return dp[t.length()][s.length()]; } }
[ "scsvip@gmail.com" ]
scsvip@gmail.com
f8669c4208db409de08be8d2d597fcd885957c79
ff7e107a5068b07436342353dbf912d587c3840b
/flow-master0925---处理/flow-master0925/flow/flow-server/src/main/java/com/zres/project/localnet/portal/flowdealinfo/data/dao/CheckFeedbackDao.java
5e1a8cc006ab65dc51f53ebe6438a27919eaeee4
[]
no_license
lichao20000/resflow-master
0f0668c7a6cb03cafaca153b9e9b882b2891b212
78217aa31f17dd5c53189e695a3a0194fced0d0a
refs/heads/master
2023-01-27T19:15:40.752341
2020-12-10T02:07:32
2020-12-10T02:07:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,745
java
package com.zres.project.localnet.portal.flowdealinfo.data.dao; import org.apache.ibatis.annotations.Param; import java.util.List; import java.util.Map; /** * Created by tang.huili on 2019/3/5. */ public interface CheckFeedbackDao { public Map<String,Object> queryInfoByWoId(String woId); public Map<String,Object> queryCheckFeedBackInfoByWoId(String woId); public List<Map<String,Object>> queryCheckFeedBackInfoByWoIdList(@Param("woIdList") List<String> woIdList); void deleteInfoByWoId(String woId); void insertCheckInfo(Map<String, Object> params); Map<String,Object> queryInfoByTacheId(@Param("srvOrdId") String srvOrdId, @Param("tacheId") String tacheId); Map<String,Object> queryInfoByTacheIdTwo(@Param("srvOrdId") String srvOrdId, @Param("tacheId") String tacheId); void updateStateBytacheId(@Param("srvOrdId") String srvordId, @Param("tacheId") String tacheId); Map<String,Object> queryInfoBySrvOrdId(String srvOrdId); Map<String,Object> querySchmeBySrvOrdId(String srvOrdId); Map<String,Object> queryAccessRoom(String srvOrdId); List<Map<String,Object>> qryCheckInfoHis(String srvOrdId); int queryNum(String srvOrdId); String qryAreaName(String areaId); void insertCheckInfoA(Map<String, Object> checkInfoMap); void insertCheckInfoZ(Map<String, Object> checkInfoMap); /** * 查询工建系统反馈的费用信息 * @param srvOrdId * @return */ Map<String,Object> qryEnginInfo(String srvOrdId); void deleteInfoBySrvOrdId(String srvOrdId); Map<String,Object> qryLastNodeInfo(String orderId); List<Map<String,Object>> qryFinishNodeList(String orderId); Map<String,Object> qryLastTotalNode(String orderId); }
[ "2832383563@qq.com" ]
2832383563@qq.com
b396d17aa6f44b52c8153c2b94b210d9794ef260
781d6bff059ad5a68079e5a135b987e818d66b77
/Homework 1/Lesson3.2/src/nekretnina/Stan.java
05f2992966e83cd056fef56ded074e765266327d
[]
no_license
Ana-cpu/JavaZadaci
a48a5622163b098ed1065946c265fac54bb4c106
c3dbd3966ea3d200f2d93a4c5cc0769b3566e715
refs/heads/master
2020-09-25T00:00:15.864213
2020-02-20T12:23:14
2020-02-20T12:23:14
225,874,328
0
0
null
2020-02-20T12:23:16
2019-12-04T13:30:18
Java
UTF-8
Java
false
false
932
java
package nekretnina; public class Stan extends Nekretnina{ Nekretnina Nekretnina; public Stan() { super(); } public Stan(Vlasnik Vlasnik, String address, int zone, int kvadratura) { this.Nekretnina = Nekretnina; } public double izracunajCenu(double kvadratura, int zone) { double cena = 0.0; if (zone == 1) { cena = kvadratura * 3000 * 0.15; } else if (zone == 2) { cena = kvadratura * 2000 * 0.15; } else if (zone == 3) { cena = kvadratura * 1000 * 0.15; } else { cena = kvadratura * 500 * 0.15; } return cena; } public String toString() { return "Adresa je: " + address + ", u zoni: " + zone + ", kvadrature: " + kvadratura + ", cena je: " + izracunajCenu(kvadratura, zone) + ", " + " Ime: " + ime + "\n Prezime: " + prezime + "\n Maticni broj: " + jmbg + "\n Broj licne karte: " + licnaKarta + "\nAddress: " + address + "\nZone: " + zone + "\nkvadratura: " + kvadratura; } }
[ "you@example.com" ]
you@example.com
029c9010eaa41d3000a251512ba39b571545a295
7f287b27f6f0a4accb3ab01da7452f23565396ae
/datamasking/progetto/src/it/unibas/datamasking/Costanti.java
c4798be5e692744be20e5c197006e78b75d72350
[]
no_license
MihaiSoanea/Java-Projects
d941776f7a0bd79527dde805e1a549f609484dd6
56c0d5d2792160c8fa4e4f5c43938fefd48ddd4f
refs/heads/master
2020-09-01T15:06:47.126318
2019-11-01T13:47:48
2019-11-01T13:47:48
218,987,814
0
0
null
null
null
null
UTF-8
Java
false
false
153
java
package it.unibas.datamasking; public class Costanti { public static final String REDIRECT = "?faces-redirect=true&includeViewParams=true"; }
[ "mihaisoanea@yahoo.it" ]
mihaisoanea@yahoo.it
f065d99779465e5b8e812c5202459acb35599258
e047870136e1958ce80dad88fa931304ada49a1b
/eu.cessar.ct.cid.model/src_model/eu/cessar/ct/cid/model/elements/impl/NamedElementImpl.java
86357de0423a61754bb49d1c513164ae4dd0f74e
[]
no_license
ONagaty/SEA-ModellAR
f4994a628459a20b9be7af95d41d5e0ff8a21f77
a0f6bdbb072503ea584d72f872f29a20ea98ade5
refs/heads/main
2023-06-04T07:07:02.900503
2021-06-19T20:54:47
2021-06-19T20:54:47
376,735,297
0
0
null
null
null
null
UTF-8
Java
false
false
3,526
java
/** */ package eu.cessar.ct.cid.model.elements.impl; import eu.cessar.ct.cid.model.CIDEObject; import eu.cessar.ct.cid.model.elements.ElementsPackage; import eu.cessar.ct.cid.model.elements.NamedElement; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Named Element</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link eu.cessar.ct.cid.model.elements.impl.NamedElementImpl#getName <em>Name</em>}</li> * </ul> * </p> * * @generated */ public abstract class NamedElementImpl extends CIDEObject implements NamedElement { /** * The default value of the '{@link #getName() <em>Name</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getName() * @generated * @ordered */ protected static final String NAME_EDEFAULT = null; /** * The cached value of the '{@link #getName() <em>Name</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getName() * @generated * @ordered */ protected String name = NAME_EDEFAULT; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected NamedElementImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return ElementsPackage.Literals.NAMED_ELEMENT; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getName() { return name; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setName(String newName) { String oldName = name; name = newName; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ElementsPackage.NAMED_ELEMENT__NAME, oldName, name)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case ElementsPackage.NAMED_ELEMENT__NAME: return getName(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case ElementsPackage.NAMED_ELEMENT__NAME: setName((String) newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case ElementsPackage.NAMED_ELEMENT__NAME: setName(NAME_EDEFAULT); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case ElementsPackage.NAMED_ELEMENT__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); } return super.eIsSet(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (name: "); result.append(name); result.append(')'); return result.toString(); } } //NamedElementImpl
[ "onagaty@a5sol.com" ]
onagaty@a5sol.com
eaa9efaae889c62c90a767f3ac5c40013fde38f4
da91506e6103d6e12933125f851df136064cfc30
/src/main/java/org/phw/hbaser/util/HTableBatchDeletes.java
f9a0eb28b6aacbb0a67e3ea805042a3b131751f9
[]
no_license
wuce7758/Mr.Hbaser
41709cb28568092699cb2803a06e232c28654110
af5afb7e4b4b2e51d15ff266e08204b9caf1657e
refs/heads/master
2020-06-29T13:29:49.751123
2012-07-11T00:18:57
2012-07-11T00:18:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
977
java
package org.phw.hbaser.util; import java.io.IOException; import java.util.ArrayList; import org.apache.hadoop.hbase.client.Delete; import org.apache.hadoop.hbase.client.HTable; public class HTableBatchDeletes { private ArrayList<Delete> putArr = new ArrayList<Delete>(1000); private HTable hTable; private int rownum = 0; public HTableBatchDeletes(HTable hTable) { this.hTable = hTable; } public void deleteRow(Delete delete) throws IOException { ++rownum; putArr.add(delete); if (putArr.size() == 1000 && hTable != null) { commitPuts(); } } public void deleteEnd() throws IOException { if (putArr.size() > 0 && hTable != null) { commitPuts(); } } private void commitPuts() throws IOException { hTable.delete(putArr); hTable.flushCommits(); putArr.clear(); } public int getRownum() { return rownum; } }
[ "bingoo.huang@gmail.com" ]
bingoo.huang@gmail.com
0ee9474fd7e080dc74a41acda71a8c9bfdbe85c6
f6188396a6056d7b1a0ddcac118f0d9d8a8b4aff
/src/com/practice/FibonacciSeries.java
1d5ee6b48f87bd593641452bfd1274ae22aebd90
[]
no_license
mrashmi791/programs
810d62e5c956f427d7879ac542bc9bbf7f7dc077
7e4c62df17462e42278e785b5ebae868f56439e6
refs/heads/main
2023-02-07T03:22:30.013001
2020-12-26T12:34:44
2020-12-26T12:34:44
324,551,052
0
0
null
null
null
null
UTF-8
Java
false
false
367
java
package com.practice; import java.util.Scanner; public class FibonacciSeries { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int a = 0; int b = 1; for(int i = 1; i <=n; i++) { System.out.print(a+" "); int sum = a+b; a = b; b = sum; } } }
[ "mrashmi791@gmail.com" ]
mrashmi791@gmail.com
4c9a22e7de300d09db93d1f46793160997ef7e1f
cec0c2fa585c3f788fc8becf24365e56bce94368
/net/minecraft/world/entity/ai/behavior/BecomePassiveIfMemoryPresent.java
89260466cff4e096f3fe564b99d851b2f31167a0
[]
no_license
maksym-pasichnyk/Server-1.16.3-Remapped
358f3c4816cbf41e137947329389edf24e9c6910
4d992e2d9d4ada3ecf7cecc039c4aa0083bc461e
refs/heads/master
2022-12-15T08:54:21.236174
2020-09-19T16:13:43
2020-09-19T16:13:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,526
java
/* */ package net.minecraft.world.entity.ai.behavior; /* */ /* */ import com.google.common.collect.ImmutableMap; /* */ import java.util.Map; /* */ import net.minecraft.server.level.ServerLevel; /* */ import net.minecraft.world.entity.LivingEntity; /* */ import net.minecraft.world.entity.ai.memory.MemoryModuleType; /* */ import net.minecraft.world.entity.ai.memory.MemoryStatus; /* */ /* */ public class BecomePassiveIfMemoryPresent /* */ extends Behavior<LivingEntity> { /* */ public BecomePassiveIfMemoryPresent(MemoryModuleType<?> debug1, int debug2) { /* 13 */ super((Map<MemoryModuleType<?>, MemoryStatus>)ImmutableMap.of(MemoryModuleType.ATTACK_TARGET, MemoryStatus.REGISTERED, MemoryModuleType.PACIFIED, MemoryStatus.VALUE_ABSENT, debug1, MemoryStatus.VALUE_PRESENT)); /* */ /* */ /* */ /* */ /* 18 */ this.pacifyDuration = debug2; /* */ } /* */ private final int pacifyDuration; /* */ /* */ protected void start(ServerLevel debug1, LivingEntity debug2, long debug3) { /* 23 */ debug2.getBrain().setMemoryWithExpiry(MemoryModuleType.PACIFIED, Boolean.valueOf(true), this.pacifyDuration); /* 24 */ debug2.getBrain().eraseMemory(MemoryModuleType.ATTACK_TARGET); /* */ } /* */ } /* Location: C:\Users\Josep\Downloads\Decompile Minecraft\deobfuscated.jar!\net\minecraft\world\entity\ai\behavior\BecomePassiveIfMemoryPresent.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */
[ "tanksherman27@gmail.com" ]
tanksherman27@gmail.com
7b82189c659efcec7bf694bd01d9a01efa6f4f73
768ac7d2fbff7b31da820c0d6a7a423c7e2fe8b8
/WEB-INF/java/com/youku/search/index/query/parser/ParserResult.java
dcf2e9aea5d457b4445c8708ad3f8143290614ba
[]
no_license
aiter/-java-soku
9d184fb047474f1e5cb8df898fcbdb16967ee636
864b933d8134386bd5b97c5b0dd37627f7532d8d
refs/heads/master
2021-01-18T17:41:28.396499
2015-08-24T06:09:21
2015-08-24T06:09:21
41,285,373
0
0
null
2015-08-24T06:08:00
2015-08-24T06:08:00
null
UTF-8
Java
false
false
997
java
package com.youku.search.index.query.parser; import java.util.HashMap; import java.util.Iterator; public class ParserResult { private String keyword = null; private HashMap<String,String> result = new HashMap<String,String>(); public void setAttribute(String field,String value){ result.put(field, value); } public String getValue(String field){ return result.get(field); } public boolean contains(String field){ return result.containsKey(field); } public String getKeyword(){ return keyword; } public void setKeyword(String word){ this.keyword = word; } public String toString(){ StringBuilder builder = new StringBuilder(); if (keyword != null) builder.append("keyword = " + keyword); Iterator<String> it = result.keySet().iterator(); while (it.hasNext()){ String key = it.next(); builder.append(key); builder.append("\t"); builder.append(result.get(key)); } return builder.toString(); } }
[ "lyu302@gmail.com" ]
lyu302@gmail.com
88da7fb52bc87251a857593b684f78bdf90edb5a
92dd6bc0a9435c359593a1f9b309bb58d3e3f103
/src/LeetcodeTemplate/_0277FindCelebrity.java
0c0c0944298dc57705e5ade4ba7fb150ce1c2582
[ "MIT" ]
permissive
darshanhs90/Java-Coding
bfb2eb84153a8a8a9429efc2833c47f6680f03f4
da76ccd7851f102712f7d8dfa4659901c5de7a76
refs/heads/master
2023-05-27T03:17:45.055811
2021-06-16T06:18:08
2021-06-16T06:18:08
36,981,580
3
3
null
null
null
null
UTF-8
Java
false
false
254
java
package LeetcodeTemplate; public class _0277FindCelebrity { public static void main(String[] args) { System.out.println(findCelebrity(3)); } static boolean knows(int a, int b) { return true; } public static int findCelebrity(int n) { } }
[ "hsdars@gmail.com" ]
hsdars@gmail.com
98d7a6cb324717a61f9c9e4b29f283b001bdf8bb
166b6f4d0a2a391b7d05f6ddd245f1eb9dbce9f4
/spring/RetailSvc/.svn/pristine/98/98d7a6cb324717a61f9c9e4b29f283b001bdf8bb.svn-base
b64bedadc17eef136a9b6678da705012dc958a3c
[]
no_license
ashismo/repositoryForMyBlog
72690495fb5357e5235776d143e60582881cb99a
f6bc2f6b57382fdc732ac477733aa0e7feb69cbb
refs/heads/master
2023-03-11T17:28:41.943846
2023-02-27T12:59:08
2023-02-27T12:59:08
35,325,045
2
27
null
2022-12-16T04:26:05
2015-05-09T10:47:17
Java
UTF-8
Java
false
false
3,284
package com.org.coop.retail.entities; import static com.mysema.query.types.PathMetadataFactory.*; import com.mysema.query.types.path.*; import com.mysema.query.types.PathMetadata; import javax.annotation.Generated; import com.mysema.query.types.Path; import com.mysema.query.types.path.PathInits; /** * QGlLedgerHrd is a Querydsl query type for GlLedgerHrd */ @Generated("com.mysema.query.codegen.EntitySerializer") public class QGlLedgerHrd extends EntityPathBase<GlLedgerHrd> { private static final long serialVersionUID = 93628224L; private static final PathInits INITS = PathInits.DIRECT2; public static final QGlLedgerHrd glLedgerHrd = new QGlLedgerHrd("glLedgerHrd"); public final DatePath<java.util.Date> actionDate = createDate("actionDate", java.util.Date.class); public final QBranchMaster branchMaster; public final DateTimePath<java.sql.Timestamp> createDate = createDateTime("createDate", java.sql.Timestamp.class); public final StringPath createUser = createString("createUser"); public final StringPath deleteInd = createString("deleteInd"); public final StringPath deleteReason = createString("deleteReason"); public final StringPath fy = createString("fy"); public final ListPath<GlLedgerDtl, QGlLedgerDtl> glLedgerDtls = this.<GlLedgerDtl, QGlLedgerDtl>createList("glLedgerDtls", GlLedgerDtl.class, QGlLedgerDtl.class, PathInits.DIRECT2); public final NumberPath<Integer> glTranId = createNumber("glTranId", Integer.class); public final StringPath passingAuthInd = createString("passingAuthInd"); public final StringPath passingAuthRemark = createString("passingAuthRemark"); public final ListPath<RetailTransaction, QRetailTransaction> retailTransactions = this.<RetailTransaction, QRetailTransaction>createList("retailTransactions", RetailTransaction.class, QRetailTransaction.class, PathInits.DIRECT2); public final StringPath tranNo = createString("tranNo"); public final ListPath<TransactionPayment, QTransactionPayment> transactionPayments = this.<TransactionPayment, QTransactionPayment>createList("transactionPayments", TransactionPayment.class, QTransactionPayment.class, PathInits.DIRECT2); public final StringPath tranType = createString("tranType"); public final DateTimePath<java.sql.Timestamp> updateDate = createDateTime("updateDate", java.sql.Timestamp.class); public final StringPath updateUser = createString("updateUser"); public QGlLedgerHrd(String variable) { this(GlLedgerHrd.class, forVariable(variable), INITS); } public QGlLedgerHrd(Path<? extends GlLedgerHrd> path) { this(path.getType(), path.getMetadata(), path.getMetadata().isRoot() ? INITS : PathInits.DEFAULT); } public QGlLedgerHrd(PathMetadata<?> metadata) { this(metadata, metadata.isRoot() ? INITS : PathInits.DEFAULT); } public QGlLedgerHrd(PathMetadata<?> metadata, PathInits inits) { this(GlLedgerHrd.class, metadata, inits); } public QGlLedgerHrd(Class<? extends GlLedgerHrd> type, PathMetadata<?> metadata, PathInits inits) { super(type, metadata, inits); this.branchMaster = inits.isInitialized("branchMaster") ? new QBranchMaster(forProperty("branchMaster")) : null; } }
[ "ashishkrmondal@gmail.com" ]
ashishkrmondal@gmail.com
60a3df57e6f441fe5f01d4b946e3c9c454ea778d
b39d7e1122ebe92759e86421bbcd0ad009eed1db
/sources/android/app/WaitResult.java
f7f30924bc99e61b5abb331c01bd85af48656a1a
[]
no_license
AndSource/miuiframework
ac7185dedbabd5f619a4f8fc39bfe634d101dcef
cd456214274c046663aefce4d282bea0151f1f89
refs/heads/master
2022-03-31T11:09:50.399520
2020-01-02T09:49:07
2020-01-02T09:49:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,649
java
package android.app; import android.content.ComponentName; import android.os.Parcel; import android.os.Parcelable; import android.os.Parcelable.Creator; import java.io.PrintWriter; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; public class WaitResult implements Parcelable { public static final Creator<WaitResult> CREATOR = new Creator<WaitResult>() { public WaitResult createFromParcel(Parcel source) { return new WaitResult(source, null); } public WaitResult[] newArray(int size) { return new WaitResult[size]; } }; public static final int INVALID_DELAY = -1; public static final int LAUNCH_STATE_COLD = 1; public static final int LAUNCH_STATE_HOT = 3; public static final int LAUNCH_STATE_WARM = 2; public int launchState; public int result; public boolean timeout; public long totalTime; public ComponentName who; @Retention(RetentionPolicy.SOURCE) public @interface LaunchState { } /* synthetic */ WaitResult(Parcel x0, AnonymousClass1 x1) { this(x0); } public int describeContents() { return 0; } public void writeToParcel(Parcel dest, int flags) { dest.writeInt(this.result); dest.writeInt(this.timeout); ComponentName.writeToParcel(this.who, dest); dest.writeLong(this.totalTime); dest.writeInt(this.launchState); } private WaitResult(Parcel source) { this.result = source.readInt(); this.timeout = source.readInt() != 0; this.who = ComponentName.readFromParcel(source); this.totalTime = source.readLong(); this.launchState = source.readInt(); } public void dump(PrintWriter pw, String prefix) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(prefix); stringBuilder.append("WaitResult:"); pw.println(stringBuilder.toString()); stringBuilder = new StringBuilder(); stringBuilder.append(prefix); stringBuilder.append(" result="); stringBuilder.append(this.result); pw.println(stringBuilder.toString()); stringBuilder = new StringBuilder(); stringBuilder.append(prefix); stringBuilder.append(" timeout="); stringBuilder.append(this.timeout); pw.println(stringBuilder.toString()); stringBuilder = new StringBuilder(); stringBuilder.append(prefix); stringBuilder.append(" who="); stringBuilder.append(this.who); pw.println(stringBuilder.toString()); stringBuilder = new StringBuilder(); stringBuilder.append(prefix); stringBuilder.append(" totalTime="); stringBuilder.append(this.totalTime); pw.println(stringBuilder.toString()); stringBuilder = new StringBuilder(); stringBuilder.append(prefix); stringBuilder.append(" launchState="); stringBuilder.append(this.launchState); pw.println(stringBuilder.toString()); } public static String launchStateToString(int type) { if (type == 1) { return "COLD"; } if (type == 2) { return "WARM"; } if (type == 3) { return "HOT"; } StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("UNKNOWN ("); stringBuilder.append(type); stringBuilder.append(")"); return stringBuilder.toString(); } }
[ "shivatejapeddi@gmail.com" ]
shivatejapeddi@gmail.com
7492cc165b7d2cec3152a9cbd567f9a93a3a26b2
a4b9bcf602647bf48a5412ad0f7d274b1bb147a9
/DesignPattern/factory/pizzafm/ChicagoStyleVeggiePizza.java
415c38664da0c0163dd3c1452a7521a8f42834c3
[]
no_license
huangketsudou/javalearning
5680884584771b6c9a9fb1ba5838824cd0ebb550
6a5b751e50007702641d14588cb90c0ea0ca0f4c
refs/heads/master
2022-11-10T14:50:08.716494
2020-06-25T09:12:02
2020-06-25T09:12:02
264,204,472
0
0
null
null
null
null
UTF-8
Java
false
false
517
java
package DesignPattern.factory.pizzafm; public class ChicagoStyleVeggiePizza extends Pizza { public ChicagoStyleVeggiePizza() { name = "Chicago Deep Dish Veggie Pizza"; dough = "Extra Thick Crust Dough"; sauce = "Plum Tomato Sauce"; toppings.add("Shredded Mozzarella Cheese"); toppings.add("Black Olives"); toppings.add("Spinach"); toppings.add("Eggplant"); } void cut() { System.out.println("Cutting the pizza into square slices"); } }
[ "1941161938@qq.com" ]
1941161938@qq.com
ab0d95b5a209fbb73e8b2555989132636bbb7667
190584f707ba708c5797fc90263642106befa35d
/api/src/main/java/org/jenkinsmvn/jenkins/api/model/UpstreamProject.java
3574d81625c999712e451452f7a67bd3ffc7aca2
[ "Apache-2.0" ]
permissive
jenkinsmvn/jenkinsmvn
3a926bb7c0b26a2df78d021b1d653ccc2debc054
7be372ed3cb4e45b23476e0d6bb6e0d230256b65
refs/heads/master
2021-01-21T21:40:06.040317
2013-08-02T02:56:01
2013-08-02T02:56:01
11,729,346
1
1
null
2016-03-09T15:30:10
2013-07-29T02:16:49
Java
UTF-8
Java
false
false
1,325
java
/* * Copyright (c) 2013. Jenkinsmvn. All Rights Reserved. * * See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The Jenkinsmvn 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.jenkinsmvn.jenkins.api.model; import java.net.URL; public class UpstreamProject { private String name; private URL url; private String color; public String getColor() { return color; } public void setColor(String color) { this.color = color; } public String getName() { return name; } public void setName(String name) { this.name = name; } public URL getUrl() { return url; } public void setUrl(URL url) { this.url = url; } }
[ "badong2210@yahoo.com" ]
badong2210@yahoo.com
f84edff4ed12c3a02946c424a6fd8bc0ddeb9b06
71afe661f41cea549619da8f4b8d6c8369d1ae96
/showcase/src/main/java/com/pepperonas/showcase/App.java
7b0b7622a31d2d68326b7bad7e3dae1342f84aa0
[ "Apache-2.0" ]
permissive
pepperonas/AndBasx
8f368e401777141acfc24f86dc3e26201ef983a3
d08f3777bbd3c123ca22138c8af57f467acabe4b
refs/heads/master
2020-05-21T12:44:07.908674
2017-05-31T18:13:10
2017-05-31T18:13:10
54,524,719
0
0
null
null
null
null
UTF-8
Java
false
false
946
java
/* * Copyright (c) 2017 Martin Pfeffer * * 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.pepperonas.showcase; import android.app.Application; import com.pepperonas.andbasx.AndBasx; /** * @author Martin Pfeffer * @see <a href="https://celox.io">https://celox.io</a> */ public class App extends Application { @Override public void onCreate() { super.onCreate(); AndBasx.init(this); } }
[ "martinpaush@gmail.com" ]
martinpaush@gmail.com
b8d7b5df4e6e63dea8aae01d8501540daedc143d
e682fa3667adce9277ecdedb40d4d01a785b3912
/internal/fischer/mangf/A276789.java
9eea0ff1dcea77cdd2eb00157889ed3e63594716
[ "Apache-2.0" ]
permissive
gfis/joeis-lite
859158cb8fc3608febf39ba71ab5e72360b32cb4
7185a0b62d54735dc3d43d8fb5be677734f99101
refs/heads/master
2023-08-31T00:23:51.216295
2023-08-29T21:11:31
2023-08-29T21:11:31
179,938,034
4
1
Apache-2.0
2022-06-25T22:47:19
2019-04-07T08:35:01
Roff
UTF-8
Java
false
false
366
java
package irvine.oeis.a276; // generated by patch_offset.pl at 2023-06-16 18:27 import irvine.oeis.DifferenceSequence; import irvine.oeis.a003.A003145; /** * A276789 First differences of A003145. * @author Georg Fischer */ public class A276789 extends DifferenceSequence { /** Construct the sequence. */ public A276789() { super(1, new A003145()); } }
[ "dr.Georg.Fischer@gmail.com" ]
dr.Georg.Fischer@gmail.com
47c70333da6f4c42cc14568218eb883492d3ac84
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/10/10_3e915f1991b5d2ee372778476c1374d4ededfc1f/BodyImageGetter/10_3e915f1991b5d2ee372778476c1374d4ededfc1f_BodyImageGetter_t.java
e4da2db9278a9573388b6cf7a360f4ec0898caa7
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,575
java
package edu.grinnell.sandb.img; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.net.MalformedURLException; import org.apache.http.HttpResponse; import org.apache.http.client.methods.HttpGet; import org.apache.http.impl.client.DefaultHttpClient; import android.content.Context; import android.os.AsyncTask; import edu.grinnell.sandb.data.Article; public class BodyImageGetter { private static ImageTable mImageTable; private static int numTasks = 0; public BodyImageGetter(Context context) { if (mImageTable == null) mImageTable = new ImageTable(context); } public void buildImageCache(Article article) { new ImageHelper().execute(article); } public class ImageHelper extends AsyncTask<Article, Integer, Integer> { @Override protected void onPreExecute() { if (numTasks++ == 0) { mImageTable.open(); mImageTable.clearTable(); } } @Override protected Integer doInBackground(Article... article) { String body = article[0].getBody(); int articleId = article[0].getId(); readImage(body, articleId); return null; } } protected void onPostExecute(Integer i) { if (--numTasks == 0) mImageTable.close(); } // Read an image from the body as a byte array public void readImage(String body, int articleID) { addImage(body, articleID, "<div"); // addImage(body, articleID, "<a"); addImage(body, articleID, "<img"); } private void addImage(String body, int articleId, String tag) { int tagStart = 0; String url = ""; byte[] image = null; String title = ""; while ((tagStart = body.indexOf(tag, tagStart + 1)) >= 0) { url = getSubstring("src=\"", body, tagStart); //check to make sure image has not yet been added if ((Image) mImageTable.findByUrl(url) != null) return; //image = getImage(url, tagStart); title = getSubstring("title=\"", body, tagStart); mImageTable.createImage(articleId, url, image, title); } } private static byte[] getImage(String imgSource, int start) { // download image as byte array ByteArrayOutputStream buffer = new ByteArrayOutputStream(); int nRead; byte[] data = new byte[16384]; InputStream is; try { is = fetch(imgSource); while ((nRead = is.read(data, 0, data.length)) != -1) { buffer.write(data, 0, nRead); } buffer.flush(); } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } catch (IllegalArgumentException e) { e.printStackTrace(); return null; } return buffer.toByteArray(); } private static InputStream fetch(String urlString) throws IllegalArgumentException, MalformedURLException, IOException { DefaultHttpClient httpClient = new DefaultHttpClient(); HttpGet request = new HttpGet(urlString); HttpResponse response = httpClient.execute(request); return response.getEntity().getContent(); } // return a string starting immediately after the key, and ending at the // first quotation mark private static String getSubstring(String key, String body, int start) { int subStart = 0; int subEnd = 0; String substring = ""; // start at beginning of link subStart = body.indexOf(key, start) + key.length(); if (subStart >= 0) { subEnd = body.indexOf("\"", subStart); } if (subEnd >= subStart) { substring = body.substring(subStart, subEnd); } return substring; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
3f12641cb7340a7981716335a4b256d7864f38d8
430e84d424c73c994254430dee372cdaccbf6bbd
/WeLife/WeLife/src/edu/jlxy/Module/table/File.java
ffab48a6d7baa142a7527952dee2ed6c41e636b8
[]
no_license
huitianbao/WeLife_Complete_Edition
bc9315dcee4d5e9971f6c7e325c2be7b31373d47
29a4cc52471f5ce8064c3e6b477880d6bd48238a
refs/heads/master
2020-03-19T09:01:04.921101
2018-06-10T00:54:19
2018-06-10T00:54:41
136,253,389
0
0
null
null
null
null
UTF-8
Java
false
false
945
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package edu.jlxy.Module.table; import edu.jlxy.Module.entity.FileEntity; import edu.jlxy.Module.entity.SendDynamicEntity; import java.sql.Connection; import java.sql.ResultSet; import java.util.ArrayList; import java.util.List; /** * * @author 16221 */ public interface File { /** * 保存文件信息的方法 */ public void saveFile(FileEntity fileEntity,String photo,SendDynamicEntity sendDynamicEntity); /** * 根据id查询文件 */ public File findById(int id,Connection connection); /** * 查询所有文件 * @param args */ public List<File> findAll(); //public ResultSet getAll(); public ResultSet getAll_resulSet(); public ArrayList<FileEntity> getList(); }
[ "1622162492@qq.com" ]
1622162492@qq.com
810ba583a206c5008da6c57abf7bf9c50c19fe5b
3565a4379a592f128472ddffdd1c6ef26e464f66
/app/src/main/java/com/gabilheri/pawsalert/data/queryManagers/AnimalManager.java
a501d1e815a2c4ae011a1ff2a7837b003b28dab1
[]
no_license
fnk0/PawsAlert
37a0b3aa85a6f2835fcdcb735b7adb0c5243de06
9b9ee41bb8b8943f0697fe1b6f38d30e7d50f7dd
refs/heads/master
2020-04-10T08:31:43.200019
2016-05-09T17:45:52
2016-05-09T17:45:52
50,889,367
1
0
null
null
null
null
UTF-8
Java
false
false
2,269
java
package com.gabilheri.pawsalert.data.queryManagers; import android.support.annotation.NonNull; import com.gabilheri.pawsalert.data.models.Animal; import com.parse.GetCallback; import com.parse.ParseException; import com.parse.ParseQuery; import com.parse.SaveCallback; import timber.log.Timber; /** * Created by <a href="mailto:marcus@gabilheri.com">Marcus Gabilheri</a> * * @author Marcus Gabilheri * @version 1.0 * @since 3/26/16. */ public class AnimalManager implements GetCallback<Animal>, SaveCallback { public interface AnimalCallback { void onAnimalFetched(Animal animal); void onErrorFetchingAnimal(Exception ex); } public interface SaveAnimalCallback { void onAnimalSaved(); void onErrorSavingAnimal(Exception e); } AnimalCallback mAnimalCallback; SaveAnimalCallback mSaveAnimalCallback; private AnimalManager() {} public AnimalManager(@NonNull AnimalCallback animalCallback) { mAnimalCallback = animalCallback; } public AnimalManager(@NonNull SaveAnimalCallback saveAnimalCallback) { mSaveAnimalCallback = saveAnimalCallback; } public AnimalManager(@NonNull AnimalCallback animalCallback, @NonNull SaveAnimalCallback saveAnimalCallback) { mAnimalCallback = animalCallback; mSaveAnimalCallback = saveAnimalCallback; } public void queryAnimal(@NonNull String animalId) { ParseQuery<Animal> query = Animal.getQuery(); query.include("user"); query.getInBackground(animalId, this); } @Override public void done(Animal object, ParseException e) { if (e != null) { Timber.e(e, "Error fetching animal: " + e.getLocalizedMessage()); mAnimalCallback.onErrorFetchingAnimal(e); } mAnimalCallback.onAnimalFetched(object.fromParseObject()); } public void saveAnimal(Animal a) { a.toParseObject(); a.saveInBackground(this); } @Override public void done(ParseException e) { if (e == null) { mSaveAnimalCallback.onAnimalSaved(); } else { Timber.e("Error saving animal: " + e.getLocalizedMessage()); mSaveAnimalCallback.onErrorSavingAnimal(e); } } }
[ "marcusandreog@gmail.com" ]
marcusandreog@gmail.com
93ffd08c46a4556fbc515f3359976edf5a9b46c4
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/no_seeding/52_lagoon-nu.staldal.lagoon.core.PartEntry-1.0-7/nu/staldal/lagoon/core/PartEntry_ESTest.java
5c75b3824491412b4338bc9161bc7e34d8caf2e6
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
646
java
/* * This file was automatically generated by EvoSuite * Mon Oct 28 20:50:46 GMT 2019 */ package nu.staldal.lagoon.core; 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(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true) public class PartEntry_ESTest extends PartEntry_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
0e0057102f948ec8607e6ee917ba759ea2e7c4c6
b335007231060f873bb5df88d774b287a053f52e
/com/google/firebase/iid/zzu.java
24511dbf407d2d66a79a87eb91b654fa9b5c5fbc
[]
no_license
NomiasSR/LoveParty1
e1afb449e0c9bba0504ce040bf3d7987a51c3b1a
15e3c8a052cefdd7e0ad6ef44b7962dd72872b8e
refs/heads/master
2020-03-19T08:09:54.672755
2018-06-05T02:00:44
2018-06-05T02:00:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,615
java
package com.google.firebase.iid; import android.content.Context; import android.content.Intent; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; import android.util.Log; import com.google.android.gms.common.util.zzq; import com.google.firebase.FirebaseApp; import java.util.List; final class zzu { private final Context zzair; private String zzct; private String zznzk; private int zznzl; private int zznzm = 0; public zzu(Context context) { this.zzair = context; } public static java.lang.String zzb(java.security.KeyPair r4) { /* JADX: method processing error */ /* Error: java.lang.NullPointerException at jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75) at jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45) at jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63) at jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58) at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31) at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17) at jadx.core.ProcessClass.process(ProcessClass.java:37) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59) at jadx.core.ProcessClass.process(ProcessClass.java:42) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:306) at jadx.api.JavaClass.decompile(JavaClass.java:62) at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:199) */ /* r4 = r4.getPublic(); r4 = r4.getEncoded(); r0 = "SHA1"; Catch:{ NoSuchAlgorithmException -> 0x0027 } r0 = java.security.MessageDigest.getInstance(r0); Catch:{ NoSuchAlgorithmException -> 0x0027 } r4 = r0.digest(r4); Catch:{ NoSuchAlgorithmException -> 0x0027 } r0 = 0; Catch:{ NoSuchAlgorithmException -> 0x0027 } r1 = r4[r0]; Catch:{ NoSuchAlgorithmException -> 0x0027 } r2 = 112; // 0x70 float:1.57E-43 double:5.53E-322; Catch:{ NoSuchAlgorithmException -> 0x0027 } r3 = 15; Catch:{ NoSuchAlgorithmException -> 0x0027 } r1 = r1 & r3; Catch:{ NoSuchAlgorithmException -> 0x0027 } r2 = r2 + r1; Catch:{ NoSuchAlgorithmException -> 0x0027 } r1 = (byte) r2; Catch:{ NoSuchAlgorithmException -> 0x0027 } r4[r0] = r1; Catch:{ NoSuchAlgorithmException -> 0x0027 } r1 = 8; Catch:{ NoSuchAlgorithmException -> 0x0027 } r2 = 11; Catch:{ NoSuchAlgorithmException -> 0x0027 } r4 = android.util.Base64.encodeToString(r4, r0, r1, r2); Catch:{ NoSuchAlgorithmException -> 0x0027 } return r4; L_0x0027: r4 = "FirebaseInstanceId"; r0 = "Unexpected error, device missing required algorithms"; android.util.Log.w(r4, r0); r4 = 0; return r4; */ throw new UnsupportedOperationException("Method not decompiled: com.google.firebase.iid.zzu.zzb(java.security.KeyPair):java.lang.String"); } private final synchronized void zzcjj() { PackageInfo zzoa = zzoa(this.zzair.getPackageName()); if (zzoa != null) { this.zznzk = Integer.toString(zzoa.versionCode); this.zzct = zzoa.versionName; } } public static String zzf(FirebaseApp firebaseApp) { String gcmSenderId = firebaseApp.getOptions().getGcmSenderId(); if (gcmSenderId != null) { return gcmSenderId; } String applicationId = firebaseApp.getOptions().getApplicationId(); if (!applicationId.startsWith("1:")) { return applicationId; } String[] split = applicationId.split(":"); if (split.length < 2) { return null; } applicationId = split[1]; return applicationId.isEmpty() ? null : applicationId; } private final PackageInfo zzoa(String str) { try { return this.zzair.getPackageManager().getPackageInfo(str, 0); } catch (NameNotFoundException e) { str = String.valueOf(e); StringBuilder stringBuilder = new StringBuilder(23 + String.valueOf(str).length()); stringBuilder.append("Failed to find package "); stringBuilder.append(str); Log.w("FirebaseInstanceId", stringBuilder.toString()); return null; } } public final synchronized int zzcjf() { if (this.zznzm != 0) { return this.zznzm; } PackageManager packageManager = this.zzair.getPackageManager(); if (packageManager.checkPermission("com.google.android.c2dm.permission.SEND", "com.google.android.gms") == -1) { Log.e("FirebaseInstanceId", "Google Play services missing or without correct permission."); return 0; } Intent intent; if (!zzq.isAtLeastO()) { intent = new Intent("com.google.android.c2dm.intent.REGISTER"); intent.setPackage("com.google.android.gms"); List queryIntentServices = packageManager.queryIntentServices(intent, 0); if (queryIntentServices != null && queryIntentServices.size() > 0) { this.zznzm = 1; return this.zznzm; } } intent = new Intent("com.google.iid.TOKEN_REQUEST"); intent.setPackage("com.google.android.gms"); List queryBroadcastReceivers = packageManager.queryBroadcastReceivers(intent, 0); if (queryBroadcastReceivers == null || queryBroadcastReceivers.size() <= 0) { Log.w("FirebaseInstanceId", "Failed to resolve IID implementation package, falling back"); if (zzq.isAtLeastO()) { this.zznzm = 2; } else { this.zznzm = 1; } return this.zznzm; } this.zznzm = 2; return this.zznzm; } public final synchronized String zzcjg() { if (this.zznzk == null) { zzcjj(); } return this.zznzk; } public final synchronized String zzcjh() { if (this.zzct == null) { zzcjj(); } return this.zzct; } public final synchronized int zzcji() { if (this.zznzl == 0) { PackageInfo zzoa = zzoa("com.google.android.gms"); if (zzoa != null) { this.zznzl = zzoa.versionCode; } } return this.zznzl; } }
[ "felipe@techsamurai.com.br" ]
felipe@techsamurai.com.br
bad52b2f8906e645c49029914440e59d0371e215
1e9def625ebc5d34142be781bec2ada4520647cf
/src/main/java/com/aresPosTaggerModelDataProcessor/writer/bigrams/BigramsWriterImpl.java
47baa2a4662394785a497d9bdce0c41e061b1316
[]
no_license
ares2015/AresPosTaggerModelDataProcessor
a83a910946df10ea0916796ddf7b9efba87ff3bb
1a551629b48c3243fbf0245ec4cfdee841ca312b
refs/heads/master
2021-09-19T09:15:38.597981
2018-07-26T07:49:29
2018-07-26T07:49:29
58,848,615
0
0
null
null
null
null
UTF-8
Java
false
false
1,308
java
package com.aresPosTaggerModelDataProcessor.writer.bigrams; import com.aresPosTaggerModelDataProcessor.data.syntax.BigramData; import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; import java.util.List; /** * Created by Oliver on 2/7/2017. */ public class BigramsWriterImpl implements BigramsWriter { @Override public void write(List<BigramData> bigramDataList) { BufferedWriter bw = null; FileWriter fw = null; try { fw = new FileWriter("C:\\Users\\Oliver\\Documents\\NlpTrainingData\\AresPosTaggerModelData\\Bigrams.txt", true); bw = new BufferedWriter(fw); for (BigramData bigramData : bigramDataList) { String trainingDataRow = bigramData.getTag1() + "#" + bigramData.getTag2(); bw.write(trainingDataRow); bw.newLine(); } System.out.println("Writing into bigrams file finished"); } catch (IOException e) { e.printStackTrace(); } finally { try { if (bw != null) bw.close(); if (fw != null) fw.close(); } catch (IOException ex) { ex.printStackTrace(); } } } }
[ "eder@essential-data.sk" ]
eder@essential-data.sk
2cbba8442827e8c1fba55d8aec3016482e365d09
d2eee6e9a3ad0b3fd2899c3d1cf94778615b10cb
/PROMISE/archives/xalan/2.5/org/apache/xpath/axes/IteratorPool.java
3b403e42860be235c1b88f70b3ad47efb83c0b5e
[]
no_license
hvdthong/DEFECT_PREDICTION
78b8e98c0be3db86ffaed432722b0b8c61523ab2
76a61c69be0e2082faa3f19efd76a99f56a32858
refs/heads/master
2021-01-20T05:19:00.927723
2018-07-10T03:38:14
2018-07-10T03:38:14
89,766,606
5
1
null
null
null
null
UTF-8
Java
false
false
1,994
java
package org.apache.xpath.axes; import java.util.Vector; import org.apache.xml.dtm.DTMIterator; import org.apache.xml.utils.WrappedRuntimeException; /** * <meta name="usage" content="internal"/> * Pool of object of a given type to pick from to help memory usage */ public class IteratorPool implements java.io.Serializable { /** Type of objects in this pool. * @serial */ private final DTMIterator m_orig; /** Vector of given objects this points to. * @serial */ private final Vector m_freeStack; /** * Constructor IteratorPool * * @param original The original iterator from which all others will be cloned. */ public IteratorPool(DTMIterator original) { m_orig = original; m_freeStack = new Vector(); } /** * Get an instance of the given object in this pool * * @return An instance of the given object */ public synchronized DTMIterator getInstanceOrThrow() throws CloneNotSupportedException { if (m_freeStack.isEmpty()) { return (DTMIterator)m_orig.clone(); } else { DTMIterator result = (DTMIterator)m_freeStack.lastElement(); m_freeStack.setSize(m_freeStack.size() - 1); return result; } } /** * Get an instance of the given object in this pool * * @return An instance of the given object */ public synchronized DTMIterator getInstance() { if (m_freeStack.isEmpty()) { try { return (DTMIterator)m_orig.clone(); } catch (Exception ex) { throw new WrappedRuntimeException(ex); } } else { DTMIterator result = (DTMIterator)m_freeStack.lastElement(); m_freeStack.setSize(m_freeStack.size() - 1); return result; } } /** * Add an instance of the given object to the pool * * * @param obj Object to add. */ public synchronized void freeInstance(DTMIterator obj) { m_freeStack.addElement(obj); } }
[ "hvdthong@github.com" ]
hvdthong@github.com
fab4b040223eb0e221b00292c62d7a29afaf645f
cf93be05cb55d09672eb2a8f29be510f29682a0a
/android/app/src/main/java/com/m_11_nov_2020_dev_14959/MainApplication.java
4c2da0ba44d292ffee034b6a3109144b5527eb6b
[]
no_license
crowdbotics-apps/m-11-nov-2020-dev-14959
ae360767147dab38379e6eaec9bf2a8d251ead5c
3f5ca1e790bbaaef94049eceb3aa7d45413636df
refs/heads/master
2023-01-12T21:45:11.223735
2020-11-11T14:23:35
2020-11-11T14:23:35
311,935,268
0
0
null
null
null
null
UTF-8
Java
false
false
2,700
java
package com.m_11_nov_2020_dev_14959; import android.app.Application; import android.content.Context; import com.facebook.react.PackageList; import com.facebook.react.ReactInstanceManager; import com.facebook.react.ReactApplication; import com.facebook.react.ReactNativeHost; import com.facebook.react.ReactPackage; import com.facebook.soloader.SoLoader; import java.lang.reflect.InvocationTargetException; import java.util.List; public class MainApplication extends Application implements ReactApplication { private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { @Override public boolean getUseDeveloperSupport() { return BuildConfig.DEBUG; } @Override protected List<ReactPackage> getPackages() { @SuppressWarnings("UnnecessaryLocalVariable") List<ReactPackage> packages = new PackageList(this).getPackages(); // Packages that cannot be autolinked yet can be added manually here, for example: // packages.add(new MyReactNativePackage()); return packages; } @Override protected String getJSMainModuleName() { return "index"; } }; @Override public ReactNativeHost getReactNativeHost() { return mReactNativeHost; } @Override public void onCreate() { super.onCreate(); SoLoader.init(this, /* native exopackage */ false); initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); } /** * Loads Flipper in React Native templates. Call this in the onCreate method with something like * initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); * * @param context * @param reactInstanceManager */ private static void initializeFlipper( Context context, ReactInstanceManager reactInstanceManager) { if (BuildConfig.DEBUG) { try { /* We use reflection here to pick up the class that initializes Flipper, since Flipper library is not available in release mode */ Class<?> aClass = Class.forName("com.rndiffapp.ReactNativeFlipper"); aClass .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class) .invoke(null, context, reactInstanceManager); } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (NoSuchMethodException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (InvocationTargetException e) { e.printStackTrace(); } } } }
[ "team@crowdbotics.com" ]
team@crowdbotics.com
f4261e8d4dfa41b91a92d4dd2d2169ee3e9bd0d5
23eaf717fda54af96f3e224dde71c6eb7a196d8c
/custos-integration-services/custos-integration-services-commons/src/main/java/org/apache/custos/integration/services/commons/interceptors/LoggingInterceptor.java
9a5eb7a59a59a9763522278667b8cc25ee67b24f
[ "Apache-2.0" ]
permissive
etsangsplk/airavata-custos
8a0e52f0da10ec29e13de03d546962e6038e6266
2d341849dd8ea8a7c2efec6cc73b01dfd495352e
refs/heads/master
2023-02-09T22:56:26.576113
2020-10-14T01:15:22
2020-10-14T01:15:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,373
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.custos.integration.services.commons.interceptors; import com.google.protobuf.Descriptors; import com.google.protobuf.GeneratedMessageV3; import io.grpc.Metadata; import org.apache.custos.integration.core.interceptor.IntegrationServiceInterceptor; import org.apache.custos.integration.core.utils.Constants; import org.apache.custos.logging.client.LoggingClient; import org.apache.custos.logging.service.LogEvent; import org.apache.custos.logging.service.LoggingConfigurationRequest; import org.apache.custos.logging.service.Status; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import java.util.Map; /** * API calling event capturing Interceptor */ @Component public class LoggingInterceptor implements IntegrationServiceInterceptor { private static final Logger LOGGER = LoggerFactory.getLogger(LoggingInterceptor.class); private static final String X_FORWARDED_FOR = "x-forwarded-for"; @Autowired private LoggingClient loggingClient; @Override public <ReqT> ReqT intercept(String method, Metadata headers, ReqT msg) { if (msg instanceof GeneratedMessageV3) { Map<Descriptors.FieldDescriptor, Object> fieldDescriptors = ((GeneratedMessageV3) msg).getAllFields(); LogEvent.Builder logEventBuilder = LogEvent.newBuilder(); LoggingConfigurationRequest.Builder loggingConfigurationBuilder = LoggingConfigurationRequest.newBuilder(); boolean tenantMatched = false; boolean clientMatched = false; for (Descriptors.FieldDescriptor descriptor : fieldDescriptors.keySet()) { if (descriptor.getName().equals("tenant_id") || descriptor.getName().equals("tenantId")) { logEventBuilder.setTenantId((long) fieldDescriptors.get(descriptor)); loggingConfigurationBuilder.setTenantId((long) fieldDescriptors.get(descriptor)); tenantMatched = true; } else if (descriptor.getName().equals("client_id") || descriptor.getName().equals("clientId")) { logEventBuilder.setClientId((String) fieldDescriptors.get(descriptor)); loggingConfigurationBuilder.setClientId((String) fieldDescriptors.get(descriptor)); clientMatched = true; } else if (descriptor.getName().equals("username") || descriptor.getName().equals("userId")) { logEventBuilder.setUsername((String) fieldDescriptors.get(descriptor)); } String servicename = headers. get(Metadata.Key.of(Constants.SERVICE_NAME, Metadata.ASCII_STRING_MARSHALLER)); String externaIP = headers. get(Metadata.Key.of(Constants.X_FORWARDED_FOR, Metadata.ASCII_STRING_MARSHALLER)); logEventBuilder.setServiceName(servicename); logEventBuilder.setEventType(method); logEventBuilder.setExternalIp(externaIP); logEventBuilder.setCreatedTime(System.currentTimeMillis()); } if (tenantMatched && clientMatched) { Status status = loggingClient.isLogEnabled(loggingConfigurationBuilder.build()); if (status.getStatus()) { loggingClient.addLogEventAsync(logEventBuilder.build()); } } } return msg; } }
[ "irjanith@gmail.com" ]
irjanith@gmail.com
1c8e5155f73bd5a9596923ae7051d8e36492d10d
609bc361c57760e11855b5574fd018066e687174
/programe_take/programe_take-web/src/main/java/com/tang/web/ConcernController.java
73e9bd3b764380429a66991ba78b054823b0baf0
[]
no_license
tangxiaonian/programe_talk
cc135218f92394d59fe953a70342a579193f2850
1dfc9eab683915fe9ea87cd4aa42037af000623a
refs/heads/master
2020-07-03T07:54:05.496294
2019-07-25T11:23:32
2019-07-25T11:23:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,584
java
package com.tang.web; import com.tang.Service.ConcernService; import com.tang.bean.Collect; import com.tang.bean.Concerns; import com.tang.bean.ResultBean; import com.tang.bean.User; 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.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.ResponseBody; import javax.servlet.http.HttpSession; import java.util.Date; import java.util.List; /** * @author ASUS * @create 2019-02-15 22:22 */ @Controller public class ConcernController { @Autowired private ConcernService concernServiceImpl; // 添加关注 @PostMapping("/concern/add/{buid}") @ResponseBody public ResultBean addConcern(@PathVariable("buid") Integer buid, HttpSession httpSession){ ResultBean resultBean = new ResultBean(); User user = (User) httpSession.getAttribute("user"); if (user != null){ // 自己不能关注自己 if (user.getId() == buid){ resultBean.setFlage(0); resultBean.setMsg("这是自己发表的文章!"); return resultBean; } // 检查此用户是否已经被该用户关注过 Long flage = concernServiceImpl.checkRepeatConcern(user.getId(),buid); if (flage.intValue() != 1){ Concerns concerns = new Concerns(); concerns.setAuid(user.getId()); concerns.setBuid(buid); // 添加一个当前用户的关注记录 resultBean = concernServiceImpl.addConcern(concerns); }else { resultBean.setMsg("该用户你已关注过了!"); resultBean.setFlage(1); } }else { resultBean.setFlage(0); resultBean.setMsg("暂时无权操作,请先登录!"); } return resultBean; } // 取消关注 @GetMapping("/user/concern/del") @ResponseBody public ResultBean delConcerns(Integer id){ return concernServiceImpl.delConcern(id); } // 查询指定用户的关注记录 @GetMapping("/user/concern") @ResponseBody public List<Concerns> selectByUserId(HttpSession httpSession){ User user = (User)httpSession.getAttribute("user"); return concernServiceImpl.selectByUserId(user.getId()); } }
[ "2684270465@qq.com" ]
2684270465@qq.com
199c6389c07ee2e2695e0c7eb06baef2677083f5
0ec9946a46c6dafcb2440d7f6e3e8d897f950313
/Java_source/Exam2/src/chapter6/chapter6_1/Student.java
eef49d23669bc730456b385cbbaedf82ca5cca64
[]
no_license
hamilkarr/Java
14c8286f1ecc5edd41bb2956dfd108d7fa9de9d5
f0c209446d35fe2cf48b0d6244ae0a56ac0bf597
refs/heads/main
2023-09-05T17:08:30.344966
2021-11-24T09:13:03
2021-11-24T09:13:03
398,113,790
0
0
null
null
null
null
UTF-8
Java
false
false
338
java
package chapter6.chapter6_1; public class Student { static int serialNum; // 학번 int studentID; public Student() { // 인스턴스를 생성할 때마다 학번 serialNum 증감 studentID = ++serialNum; } public int getSerialNum() { return serialNum; } public int getStudentID() { return studentID; } }
[ "12uclock@gmail.com" ]
12uclock@gmail.com
7fe7b988eaff86d455601090bae42d61b6579d5d
f0ef082568f43e3dbc820e2a5c9bb27fe74faa34
/com/google/android/gms/internal/zzmk.java
b2738febfdb95f886e695c65b86018773a026f60
[]
no_license
mzkh/Taxify
f929ea67b6ad12a9d69e84cad027b8dd6bdba587
5c6d0854396b46995ddd4d8b2215592c64fbaecb
refs/heads/master
2020-12-03T05:13:40.604450
2017-05-20T05:19:49
2017-05-20T05:19:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,835
java
package com.google.android.gms.internal; import com.google.android.gms.drive.metadata.SearchableOrderedMetadataField; import com.google.android.gms.drive.metadata.SortableMetadataField; import java.util.Date; public class zzmk { public static final zza zzWe; public static final zzb zzWf; public static final zzd zzWg; public static final zzc zzWh; public static final zze zzWi; public static class zza extends com.google.android.gms.drive.metadata.internal.zzd implements SortableMetadataField<Date> { public zza(String str, int i) { super(str, i); } } public static class zzb extends com.google.android.gms.drive.metadata.internal.zzd implements SearchableOrderedMetadataField<Date>, SortableMetadataField<Date> { public zzb(String str, int i) { super(str, i); } } public static class zzc extends com.google.android.gms.drive.metadata.internal.zzd implements SortableMetadataField<Date> { public zzc(String str, int i) { super(str, i); } } public static class zzd extends com.google.android.gms.drive.metadata.internal.zzd implements SearchableOrderedMetadataField<Date>, SortableMetadataField<Date> { public zzd(String str, int i) { super(str, i); } } public static class zze extends com.google.android.gms.drive.metadata.internal.zzd implements SearchableOrderedMetadataField<Date>, SortableMetadataField<Date> { public zze(String str, int i) { super(str, i); } } static { zzWe = new zza("created", 4100000); zzWf = new zzb("lastOpenedTime", 4300000); zzWg = new zzd("modified", 4100000); zzWh = new zzc("modifiedByMe", 4100000); zzWi = new zze("sharedWithMe", 4100000); } }
[ "mozammil.khan@webyog.com" ]
mozammil.khan@webyog.com
9cc9e4807aeb9fe972a6a159fbe7de0892c49556
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Chart/5/org/jfree/chart/plot/XYPlot_getOrientation_681.java
f00e486cdf666c98780858c966a7e8507789d606
[]
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
5,832
java
org jfree chart plot gener plot data form pair plot data link dataset xydataset code plot xyplot code make link item render xyitemrender draw point plot render chart type produc link org jfree chart chart factori chartfactori method creat pre configur chart plot xyplot plot axi plot valueaxisplot zoomabl return orient plot orient code code set orient setorient plot orient plotorient plot orient plotorient orient getorient orient
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
a9773dbcc9df431120bf8d446cc754bf6500a1c2
fe5d04a68c592cebd243719302f78db2e2343bbe
/MobileClient/src/net/sweetmonster/hocuspocus/PackageUtils.java
63135892ccbd517b8856d4b276c093302dbfcbfb
[]
no_license
davidjonas/mediawerf_game
f88c11c998c5e5702d3ae05b064f47e1310fdff9
d039093301afc1bcabacd80227d52698f8a74bab
refs/heads/master
2021-01-17T21:59:31.644387
2013-05-27T21:09:25
2013-05-27T21:09:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,862
java
package net.sweetmonster.hocuspocus; import java.util.jar.*; import java.util.*; import java.io.*; public class PackageUtils { private static boolean debug = true; public static List getClasseNamesInPackage(String jarName, String packageName) { ArrayList classes = new ArrayList(); packageName = packageName.replaceAll("\\.", "/"); if (debug) System.out .println("Jar " + jarName + " looking for " + packageName); try { JarInputStream jarFile = new JarInputStream(new FileInputStream( jarName)); JarEntry jarEntry; while (true) { jarEntry = jarFile.getNextJarEntry(); if (jarEntry == null) { break; } if ((jarEntry.getName().startsWith(packageName)) && (jarEntry.getName().endsWith(".class"))) { if (debug) System.out.println("Found " + jarEntry.getName().replaceAll("/", "\\.")); classes.add(jarEntry.getName().replaceAll("/", "\\.")); } } } catch (Exception e) { e.printStackTrace(); } return classes; } /** * */ public static void main(String[] args) { List list = PackageUtils.getClasseNamesInPackage( "C:/j2sdk1.4.1_02/lib/mail.jar", "com.sun.mail.handlers"); System.out.println(list); /* * output : * * Jar C:/j2sdk1.4.1_02/lib/mail.jar looking for com/sun/mail/handlers * Found com.sun.mail.handlers.text_html.class Found * com.sun.mail.handlers.text_plain.class Found * com.sun.mail.handlers.text_xml.class Found * com.sun.mail.handlers.image_gif.class Found * com.sun.mail.handlers.image_jpeg.class Found * com.sun.mail.handlers.multipart_mixed.class Found * com.sun.mail.handlers.message_rfc822.class * [com.sun.mail.handlers.text_html.class, * com.sun.mail.handlers.text_xml.class, com * .sun.mail.handlers.image_jpeg.class, , * com.sun.mail.handlers.message_rfc822.class] */ } }
[ "victormdb@gmail.com" ]
victormdb@gmail.com
10f08352938024f20598e050a630cc3626b8e7ff
042eb400317af211070771b200d90fc168eba863
/app/src/main/java/com/khalej/ramada/Adapter/RecyclerAdapter_first_order.java
672d12230ce3124bb1427b94422a58ec66063bed
[]
no_license
mohamedfathyd/Ramada
90d062b4c91f806658303e627e95d3a470642368
6d9de29a2c91bf169e7e93c2bdf11b3e8618f70e
refs/heads/master
2022-11-17T06:31:24.303492
2020-07-18T02:52:42
2020-07-18T02:52:42
280,568,918
0
0
null
null
null
null
UTF-8
Java
false
false
3,481
java
package com.khalej.ramada.Adapter; import android.app.Activity; import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.graphics.Typeface; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import com.khalej.ramada.Activity.AddessList; import com.khalej.ramada.R; import com.khalej.ramada.model.Apiclient_home; import com.khalej.ramada.model.Orders; import com.khalej.ramada.model.apiinterface_home; import com.khalej.ramada.model.contact_address; import java.util.HashMap; import java.util.List; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; import okhttp3.ResponseBody; import retrofit2.Call; import retrofit2.Callback; import retrofit2.Response; public class RecyclerAdapter_first_order extends RecyclerView.Adapter<RecyclerAdapter_first_order.MyViewHolder> { Typeface myTypeface; private Context context; List<Orders.Order_data> contactslist; private apiinterface_home apiinterface; RecyclerView recyclerView; ProgressDialog progressDialog; private SharedPreferences sharedpref; private SharedPreferences.Editor edt; public RecyclerAdapter_first_order(Context context, List<Orders.Order_data> contactslist ){ this.contactslist=contactslist; this.context=context; } @NonNull @Override public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { View view= LayoutInflater.from(parent.getContext()).inflate(R.layout.addresslist,parent,false); return new MyViewHolder(view); } @Override public void onBindViewHolder(@NonNull final MyViewHolder holder, final int position) { sharedpref = context.getSharedPreferences("Education", Context.MODE_PRIVATE); edt = sharedpref.edit(); holder.address.setText(contactslist.get(position).getAddress()); holder.address_receiver.setText(contactslist.get(position).getReceive_address()); holder.price.setText(contactslist.get(position).getPrice()+" "+contactslist.get(position).getCurrency()); holder.weight.setText(contactslist.get(position).getWeight()+""); holder.quantity.setText(contactslist.get(position).getQuantity()+""); holder.date.setText(contactslist.get(position).getDay()); holder.time.setText(contactslist.get(position).getTime()); holder.itemView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { } }); } @Override public int getItemCount() { return contactslist.size(); } public static class MyViewHolder extends RecyclerView.ViewHolder { TextView address,address_receiver,time,date,price,weight,quantity; public MyViewHolder(View itemView) { super(itemView); address=itemView.findViewById(R.id.address); address_receiver=itemView.findViewById(R.id.address_receiver); time=itemView.findViewById(R.id.time); date=itemView.findViewById(R.id.date); price=itemView.findViewById(R.id.price); quantity=itemView.findViewById(R.id.quantity); weight=itemView.findViewById(R.id.weight); } } }
[ "m.fathy7793@gmail.com" ]
m.fathy7793@gmail.com
f1f71e5670d31c54a6f2316cfe328be79936c7b9
b280a34244a58fddd7e76bddb13bc25c83215010
/scmv6/center-task1/src/main/java/com/smate/center/task/dao/sns/quartz/KeywordsEnTranZhDao.java
dcb53e21001e71b025060f42078112333519e04e
[]
no_license
hzr958/myProjects
910d7b7473c33ef2754d79e67ced0245e987f522
d2e8f61b7b99a92ffe19209fcda3c2db37315422
refs/heads/master
2022-12-24T16:43:21.527071
2019-08-16T01:46:18
2019-08-16T01:46:18
202,512,072
2
3
null
2022-12-16T05:31:05
2019-08-15T09:21:04
Java
UTF-8
Java
false
false
782
java
package com.smate.center.task.dao.sns.quartz; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Repository; import com.smate.center.task.model.sns.quartz.KeywordsEnTranZh; import com.smate.core.base.utils.data.SnsHibernateDao; @Repository public class KeywordsEnTranZhDao extends SnsHibernateDao<KeywordsEnTranZh, Long> { /** * 查找英文翻译中文的关键词. * * @param enKw * @return */ public KeywordsEnTranZh findEnTranZhKw(String enKw) { if (StringUtils.isBlank(enKw)) { return null; } String hql = "from KeywordsEnTranZh t where enKwTxt=:enKw "; return (KeywordsEnTranZh) super.createQuery(hql).setParameter("enKw", enKw.trim().toLowerCase()).setMaxResults(1) .uniqueResult(); } }
[ "zhiranhe@irissz.com" ]
zhiranhe@irissz.com
8dd22f6b78d84963e4882e31083b9d90d40a7ce0
d528fe4f3aa3a7eca7c5ba4e0aee43421e60857f
/src/common/newp/ArrayUtil.java
59a2221cb85ce42e6f6f54c386f8e54875d8449a
[]
no_license
gxlioper/xajd
81bd19a7c4b9f2d1a41a23295497b6de0dae4169
b7d4237acf7d6ffeca1c4a5a6717594ca55f1673
refs/heads/master
2022-03-06T15:49:34.004924
2019-11-19T07:43:25
2019-11-19T07:43:25
null
0
0
null
null
null
null
GB18030
Java
false
false
4,203
java
package common.newp; import java.util.ArrayList; import java.util.HashMap; import java.util.List; public class ArrayUtil { private static final String BZ = "bz";//备注字段 /** * 判断一个数组是否为null,如果数组为null或数组长度为0,则返回true, * 否则返回false * @param str * */ public static boolean isNull(Object[] array) { return (array == null || (array != null && array.length == 0)); } /** * 数据组反转操作 * @param array 数组源 * @param begin 要反转的开始位置 * @param end 要反转的结束位置 * @throws Exception */ public static void Reverse(String[] array, int begin, int end) throws Exception { if (isNull(array)) { throw new NullPointerException("数组为空");// 没有找到数组为空的异常 } if (begin < 0) { throw new ArrayIndexOutOfBoundsException("begin 不能小于0"); } if (end < begin) { throw new ArrayIndexOutOfBoundsException("begin 不能大于 end "); } if (end >= array.length) { throw new ArrayIndexOutOfBoundsException("end 不能超过数组长度"); } while (begin < end) { String temp = array[begin]; array[begin] = array[end]; array[end] = temp; begin++; end--; } } /** * 将两个数组和为一个数组 * @param array1 * @param array2 */ public String[] unionArray(String[] array1, String[] array2) { if (!isNull(array1)) { if (!isNull(array2)) { String array[] = new String[array1.length + array2.length]; copyArray(array1, array); for (int i = 0; i < array2.length; i++) { array[array1.length + i] = array2[i]; } return array; } else { return array1; } } else { return array2; } } /** * 将一个数组copy到另一数组中 * @param fromArray 源数组 * @param toArray2 目标数组 */ public String[] copyArray(String[] fromArray, String[] toArray2) { if (!isNull(fromArray) && !isNull(toArray2)) { int min = fromArray.length <= toArray2.length ? fromArray.length : toArray2.length; for (int i = 0; i < min; i++) { toArray2[i] = fromArray[i]; } return toArray2; } else { if (isNull(toArray2)) { return fromArray; } else { return toArray2; } } } /** * 如果输出字段列表中有BZ这个字段则将备注换到最后,备注后面的向前移一位 * @param zdList example: []=a b c bz d >> a b c d bz * @return */ public static String[] changeBzAfter(String[] zdList) throws Exception { if (zdList != null) { int j=-1; for (int i=0;i<zdList.length;i++) { if (BZ.equalsIgnoreCase(zdList[i])) { j=i; break; } } if (j > -1) { for (int k=j;k<zdList.length;k++) { if (k<zdList.length-1) { zdList[k] = zdList[k+1]; } } zdList[zdList.length-1] = BZ; } } return zdList; } public static List<HashMap<String, String>> arrayToList(String[] arr1, String[] arr2) { // 将两个数组合并到一个List,两个数组大小一致,通常为中英文对照。参数要求英文在前,中文在后。 ArrayList<HashMap<String, String>> list = new ArrayList<HashMap<String, String>>(); int len = (arr1.length > arr2.length) ? arr2.length : arr1.length; HashMap<String, String> map = null; for (int i = 0; i < len; i++) { map = new HashMap<String, String>(); map.put("en", arr1[i]); map.put("cn", arr2[i]); list.add(map); } return list; } /** * * @描述: 数组去重 * @作者:喻鑫源[工号:1206] * @日期:2017-4-24 下午02:57:37 * @修改记录: 修改者名字-修改日期-修改内容 * @return * String[] 返回类型 * @throws */ public static String[] removeRepeatElementInArray(String[] originals){ List<String> list = new ArrayList<String>(); list.add(originals[0]); for(int i=1;i<originals.length;i++){ //originals[i] if(!list.contains(originals[i])){ list.add(originals[i]); } } return list.toArray(new String[]{}); } }
[ "1398796456@qq.com" ]
1398796456@qq.com
c76f092d4cef4168a4c6f0409cc757e2303391d7
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/19/19_bc9795591eeb7f6de618617ff1e6af4b38394fac/Label/19_bc9795591eeb7f6de618617ff1e6af4b38394fac_Label_s.java
2806914b16b6c873d1b597fe45a6847b88db978c
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,046
java
package com.indivisible.tortidy.database; /** class to represent a torrent's label **/ public class Label { //// data private long id; private String title; private boolean isExistingLabel; //// constructors /* create a new label */ public Label(long id, String labelTitle, boolean exists) { this.id = id; title = labelTitle; isExistingLabel = exists; } //// gets and sets /** get the label's db id **/ public long getId() { return id; } /** set the label's db id **/ public void setId(long id) { this.id = id; } /* returns a label's title */ public String getTitle() { return title; } /* sets a label's title */ public void setTitle(String labelTitle) { title = labelTitle; } /* check if a label already exists */ public Boolean exists() { return isExistingLabel; } /* set if a label exists */ public void setExists(Boolean exists) { isExistingLabel = exists; } //// methods @Override public String toString() { return title; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
b7bef35b297ef33835bcb11c843804003282b975
dfc61e58169f84d0bb9e9f7c516a71441054cb26
/dating-system-rest-web/src/test/java/de/alpharogroup/dating/system/ApplicationJettyRunner.java
6184882f832e73ccfb2babb8b34832dd3cf43358
[]
no_license
lightblueseas/dating-system-data
b67b38b6f223eb87694c1e66ab7266eef9c7a316
6a1c58879e53b64c0ffd9f7bb29391f69f00c867
refs/heads/master
2023-03-15T11:08:57.937997
2016-03-10T16:07:36
2016-03-10T16:07:36
45,294,373
1
1
null
2016-03-10T16:07:36
2015-10-31T08:21:51
Java
UTF-8
Java
false
false
4,438
java
package de.alpharogroup.dating.system; import java.io.File; import java.io.IOException; import java.sql.SQLException; import java.util.Properties; import org.apache.cxf.transport.servlet.CXFServlet; import org.apache.log4j.Logger; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.servlet.ServletContextHandler; import org.springframework.web.context.ContextLoaderListener; import de.alpharogroup.file.delete.DeleteFileExtensions; import de.alpharogroup.file.search.PathFinder; import de.alpharogroup.jdbc.ConnectionsExtensions; import de.alpharogroup.jetty9.runner.Jetty9Runner; import de.alpharogroup.jetty9.runner.config.Jetty9RunConfiguration; import de.alpharogroup.jetty9.runner.config.ServletContextHandlerConfiguration; import de.alpharogroup.jetty9.runner.config.ServletHolderConfiguration; import de.alpharogroup.jetty9.runner.factories.ServletContextHandlerFactory; import de.alpharogroup.log.LoggerExtensions; import de.alpharogroup.resourcebundle.properties.PropertiesExtensions; /** * The Class {@link ApplicationJettyRunner} holds the main method that starts a jetty server with the rest services for the resource-bundle-data. */ public class ApplicationJettyRunner { /** * The main method starts a jetty server with the rest services for the resource-bundle-data. * * @param args the arguments * @throws Exception the exception */ public static void main(final String[] args) throws Exception { final int sessionTimeout = 1800;// set timeout to 30min(60sec * 30min=1800sec)... final String projectname = getProjectName(); final File projectDirectory = PathFinder.getProjectDirectory(); final File webapp = PathFinder.getRelativePath(projectDirectory, projectname, "src", "main", "webapp"); final String filterPath = "/*"; final File logfile = new File(projectDirectory, "application.log"); if(logfile.exists()) { try { DeleteFileExtensions.delete(logfile); } catch (final IOException e) { Logger.getRootLogger().error("logfile could not deleted.", e); } } // Add a file appender to the logger programatically LoggerExtensions.addFileAppender(Logger.getRootLogger(), LoggerExtensions.newFileAppender(logfile.getAbsolutePath())); final ServletContextHandler servletContextHandler = ServletContextHandlerFactory.getNewServletContextHandler( ServletContextHandlerConfiguration.builder() .servletHolderConfiguration( ServletHolderConfiguration.builder() .servletClass(CXFServlet.class) .pathSpec(filterPath) .build()) .contextPath("/") .webapp(webapp) .maxInactiveInterval(sessionTimeout) .filterPath(filterPath) .initParameter("contextConfigLocation", "classpath:application-context.xml") .build()); servletContextHandler.addEventListener(new ContextLoaderListener()); final Jetty9RunConfiguration configuration = Jetty9RunConfiguration.builder() .servletContextHandler(servletContextHandler) .httpPort(8080) .httpsPort(8443) .build(); final Server server = new Server(); Jetty9Runner.runServletContextHandler(server, configuration); } /** * Gets the project name. * * @return the project name * @throws IOException Signals that an I/O exception has occurred. */ protected static String getProjectName() throws IOException { final Properties projectProperties = PropertiesExtensions.loadProperties("project.properties"); final String projectName = projectProperties.getProperty("artifactId"); return projectName; } /** * Checks if a postgresql database exists. * * @return true, if successful * @throws IOException Signals that an I/O exception has occurred. * @throws ClassNotFoundException the class not found exception * @throws SQLException the SQL exception */ protected static boolean existsPostgreSQLDatabase() throws IOException, ClassNotFoundException, SQLException { final Properties databaseProperties = PropertiesExtensions.loadProperties("jdbc.properties"); final String hostname = databaseProperties.getProperty("jdbc.host"); final String databaseName = databaseProperties.getProperty("jdbc.db.name"); final String databaseUser = databaseProperties.getProperty("jdbc.user"); final String databasePassword = databaseProperties.getProperty("jdbc.password"); final boolean dbExists = ConnectionsExtensions.existsPostgreSQLDatabase(hostname, databaseName, databaseUser, databasePassword); return dbExists; } }
[ "asterios.raptis@gmx.net" ]
asterios.raptis@gmx.net
ec8f0ddfa0b79d3b4aa8eb996f210c0c1061e395
95ea92360a655265240a0da03f777a87861992c6
/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/TBooleans.java
ce69426400cb432b0fa4a8ba39af16962a3f08b1
[ "Apache-2.0", "BSD-3-Clause" ]
permissive
hekar/jOOQ
886bd8579d6d1069d477f8d1322a51b6f4acfce0
d5945b9ee37ac92949fa6f5e9cd229046923c2e0
refs/heads/master
2021-01-17T21:58:21.141951
2012-09-03T02:11:51
2012-09-03T02:11:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,400
java
/** * This class is generated by jOOQ */ package org.jooq.test.mysql.generatedclasses.tables; /** * This class is generated by jOOQ. */ public class TBooleans extends org.jooq.impl.UpdatableTableImpl<org.jooq.test.mysql.generatedclasses.tables.records.TBooleansRecord> { private static final long serialVersionUID = -1195915207; /** * The singleton instance of test.t_booleans */ public static final org.jooq.test.mysql.generatedclasses.tables.TBooleans T_BOOLEANS = new org.jooq.test.mysql.generatedclasses.tables.TBooleans(); /** * The class holding records for this type */ @Override public java.lang.Class<org.jooq.test.mysql.generatedclasses.tables.records.TBooleansRecord> getRecordType() { return org.jooq.test.mysql.generatedclasses.tables.records.TBooleansRecord.class; } /** * The table column <code>test.t_booleans.id</code> * <p> * This column is part of the table's PRIMARY KEY */ public static final org.jooq.TableField<org.jooq.test.mysql.generatedclasses.tables.records.TBooleansRecord, java.lang.Integer> ID = createField("id", org.jooq.impl.SQLDataType.INTEGER, T_BOOLEANS); /** * The table column <code>test.t_booleans.one_zero</code> */ public static final org.jooq.TableField<org.jooq.test.mysql.generatedclasses.tables.records.TBooleansRecord, org.jooq.test._.converters.Boolean_10> ONE_ZERO = createField("one_zero", org.jooq.impl.SQLDataType.INTEGER.asConvertedDataType(new org.jooq.test._.converters.Boolean_10_Converter()), T_BOOLEANS); /** * The table column <code>test.t_booleans.true_false_lc</code> */ public static final org.jooq.TableField<org.jooq.test.mysql.generatedclasses.tables.records.TBooleansRecord, org.jooq.test._.converters.Boolean_TF_LC> TRUE_FALSE_LC = createField("true_false_lc", org.jooq.impl.SQLDataType.VARCHAR.asConvertedDataType(new org.jooq.test._.converters.Boolean_TF_LC_Converter()), T_BOOLEANS); /** * The table column <code>test.t_booleans.true_false_uc</code> */ public static final org.jooq.TableField<org.jooq.test.mysql.generatedclasses.tables.records.TBooleansRecord, org.jooq.test._.converters.Boolean_TF_UC> TRUE_FALSE_UC = createField("true_false_uc", org.jooq.impl.SQLDataType.VARCHAR.asConvertedDataType(new org.jooq.test._.converters.Boolean_TF_UC_Converter()), T_BOOLEANS); /** * The table column <code>test.t_booleans.yes_no_lc</code> */ public static final org.jooq.TableField<org.jooq.test.mysql.generatedclasses.tables.records.TBooleansRecord, org.jooq.test._.converters.Boolean_YES_NO_LC> YES_NO_LC = createField("yes_no_lc", org.jooq.impl.SQLDataType.VARCHAR.asConvertedDataType(new org.jooq.test._.converters.Boolean_YES_NO_LC_Converter()), T_BOOLEANS); /** * The table column <code>test.t_booleans.yes_no_uc</code> */ public static final org.jooq.TableField<org.jooq.test.mysql.generatedclasses.tables.records.TBooleansRecord, org.jooq.test._.converters.Boolean_YES_NO_UC> YES_NO_UC = createField("yes_no_uc", org.jooq.impl.SQLDataType.VARCHAR.asConvertedDataType(new org.jooq.test._.converters.Boolean_YES_NO_UC_Converter()), T_BOOLEANS); /** * The table column <code>test.t_booleans.y_n_lc</code> */ public static final org.jooq.TableField<org.jooq.test.mysql.generatedclasses.tables.records.TBooleansRecord, org.jooq.test._.converters.Boolean_YN_LC> Y_N_LC = createField("y_n_lc", org.jooq.impl.SQLDataType.CHAR.asConvertedDataType(new org.jooq.test._.converters.Boolean_YN_LC_Converter()), T_BOOLEANS); /** * The table column <code>test.t_booleans.y_n_uc</code> */ public static final org.jooq.TableField<org.jooq.test.mysql.generatedclasses.tables.records.TBooleansRecord, org.jooq.test._.converters.Boolean_YN_UC> Y_N_UC = createField("y_n_uc", org.jooq.impl.SQLDataType.CHAR.asConvertedDataType(new org.jooq.test._.converters.Boolean_YN_UC_Converter()), T_BOOLEANS); /** * The table column <code>test.t_booleans.vc_boolean</code> */ public static final org.jooq.TableField<org.jooq.test.mysql.generatedclasses.tables.records.TBooleansRecord, java.lang.Boolean> VC_BOOLEAN = createField("vc_boolean", org.jooq.impl.SQLDataType.BOOLEAN, T_BOOLEANS); /** * The table column <code>test.t_booleans.c_boolean</code> */ public static final org.jooq.TableField<org.jooq.test.mysql.generatedclasses.tables.records.TBooleansRecord, java.lang.Boolean> C_BOOLEAN = createField("c_boolean", org.jooq.impl.SQLDataType.BOOLEAN, T_BOOLEANS); /** * The table column <code>test.t_booleans.n_boolean</code> */ public static final org.jooq.TableField<org.jooq.test.mysql.generatedclasses.tables.records.TBooleansRecord, java.lang.Boolean> N_BOOLEAN = createField("n_boolean", org.jooq.impl.SQLDataType.BOOLEAN, T_BOOLEANS); /** * No further instances allowed */ private TBooleans() { super("t_booleans", org.jooq.test.mysql.generatedclasses.Test.TEST); } @Override public org.jooq.UniqueKey<org.jooq.test.mysql.generatedclasses.tables.records.TBooleansRecord> getMainKey() { return org.jooq.test.mysql.generatedclasses.Keys.KEY_T_BOOLEANS_PRIMARY; } @Override @SuppressWarnings("unchecked") public java.util.List<org.jooq.UniqueKey<org.jooq.test.mysql.generatedclasses.tables.records.TBooleansRecord>> getKeys() { return java.util.Arrays.<org.jooq.UniqueKey<org.jooq.test.mysql.generatedclasses.tables.records.TBooleansRecord>>asList(org.jooq.test.mysql.generatedclasses.Keys.KEY_T_BOOLEANS_PRIMARY); } }
[ "lukas.eder@gmail.com" ]
lukas.eder@gmail.com
066fd310cd91273968c8b5bab8966ade22bf6aa4
f33516ffd4ac82b741f936ae2f7ef974b5f7e2f9
/changedPlugins/org.emftext.language.java.resource.java/src-gen/org/emftext/language/java/resource/java/debug/JavaLineBreakpoint.java
1a10f95180260f068706853955126f71ad385cdd
[]
no_license
ichupakhin/sdq
e8328d5fdc30482c2f356da6abdb154e948eba77
32cc990e32b761aa37420f9a6d0eede330af50e2
refs/heads/master
2023-01-06T13:33:20.184959
2020-11-01T13:29:04
2020-11-01T13:29:04
246,244,334
0
0
null
null
null
null
UTF-8
Java
false
false
914
java
/******************************************************************************* * Copyright (c) 2006-2015 * Software Technology Group, Dresden University of Technology * DevBoost GmbH, Dresden, Amtsgericht Dresden, HRB 34001 * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Software Technology Group - TU Dresden, Germany; * DevBoost GmbH - Dresden, Germany * - initial API and implementation ******************************************************************************/ package org.emftext.language.java.resource.java.debug; public class JavaLineBreakpoint { // The generator for this class is currently disabled by option // 'disableDebugSupport' in the .cs file. }
[ "bla@mail.com" ]
bla@mail.com
9b12e216e805be0ba70bd4a1fc540a1815a1b584
1ca86d5d065372093c5f2eae3b1a146dc0ba4725
/spring-cloud/spring-cloud-functions/src/test/java/com/surya/spring/cloudfunction/aws/CloudFunctionApplicationUnitTest.java
c2518438ffc2e6f615002c424e0998d15c42cdc2
[]
no_license
Suryakanta97/DemoExample
1e05d7f13a9bc30f581a69ce811fc4c6c97f2a6e
5c6b831948e612bdc2d9d578a581df964ef89bfb
refs/heads/main
2023-08-10T17:30:32.397265
2021-09-22T16:18:42
2021-09-22T16:18:42
391,087,435
0
1
null
null
null
null
UTF-8
Java
false
false
1,306
java
package com.surya.spring.cloudfunction.aws; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.boot.web.server.LocalServerPort; import static org.assertj.core.api.Java6Assertions.assertThat; @RunWith(SpringRunner.class) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) public class CloudFunctionApplicationUnitTest { @LocalServerPort private int port; @Autowired private TestRestTemplate testRestTemplate; @Test public void givenAString_whenReverseStringCloudFunctionInvoked_thenStringIsReversed() { assertThat(this.testRestTemplate.getForObject("http://localhost:" + port + "/reverseString/HelloWorld", String.class)).isEqualTo("dlroWolleH"); } @Test public void givenAString_whenGreeterCloudFunctionInvoked_thenPrintsGreeting() { assertThat(this.testRestTemplate.getForObject("http://localhost:" + port + "/greeter/suryaUser", String.class)).isEqualTo("Hello suryaUser, and welcome to Spring Cloud Function!!!"); } }
[ "suryakanta97@github.com" ]
suryakanta97@github.com
610342f98d188a8f19772256b7c0b9e7e9677c5d
092c76fcc6c411ee77deef508e725c1b8277a2fe
/hybris/bin/ext-accelerator/b2bacceleratorfacades/src/de/hybris/platform/b2bacceleratorfacades/order/populators/TriggerReversePopulator.java
672c33ca3ab23e9f9b4d6ead5b61c40f3f6958d7
[ "MIT" ]
permissive
BaggaShivanshu2/hybris-bookstore-tutorial
4de5d667bae82851fe4743025d9cf0a4f03c5e65
699ab7fd8514ac56792cb911ee9c1578d58fc0e3
refs/heads/master
2022-11-28T12:15:32.049256
2020-08-05T11:29:14
2020-08-05T11:29:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,500
java
/* * [y] hybris Platform * * Copyright (c) 2000-2016 hybris AG * All rights reserved. * * This software is the confidential and proprietary information of hybris * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with hybris. * * */ package de.hybris.platform.b2bacceleratorfacades.order.populators; import de.hybris.platform.b2bacceleratorfacades.order.data.TriggerData; import de.hybris.platform.converters.Populator; import de.hybris.platform.cronjob.model.TriggerModel; import de.hybris.platform.servicelayer.dto.converter.ConversionException; /** * Populates {@link TriggerData} with {@link TriggerModel}. */ public class TriggerReversePopulator implements Populator<TriggerData, TriggerModel> { @Override public void populate(final TriggerData data, final TriggerModel model) throws ConversionException { model.setDay(data.getDay() == null ? Integer.valueOf(-1) : data.getDay()); model.setDaysOfWeek(data.getDaysOfWeek()); model.setRelative(data.getRelative() == null ? Boolean.FALSE : data.getRelative()); model.setWeekInterval(data.getWeekInterval() == null ? Integer.valueOf(-1) : data.getWeekInterval()); model.setActivationTime(data.getActivationTime()); model.setHour(data.getHour() == null ? Integer.valueOf(-1) : data.getHour()); model.setMinute(data.getMinute() == null ? Integer.valueOf(-1) : data.getMinute()); } }
[ "xelilim@hotmail.com" ]
xelilim@hotmail.com
1ede974b47320309cc3e90f99d4f50dd0540e2c0
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/main/java/org/gradle/test/performancenull_51/Productionnull_5011.java
b749fac675bd3043cd3db0b79abd4ddf9482df11
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
585
java
package org.gradle.test.performancenull_51; public class Productionnull_5011 { private final String property; public Productionnull_5011(String param) { this.property = param; } public String getProperty() { return property; } private String prop0; public String getProp0() { return prop0; } public void setProp0(String value) { prop0 = value; } private String prop1; public String getProp1() { return prop1; } public void setProp1(String value) { prop1 = value; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
7787941c6923b081296dfd6b8f9f63e83c8eb217
287d6d170530a04bff9f80460125993cb8c506b1
/tl/src/main/java/com/github/badoualy/telegram/tl/api/TLMessageMediaContact.java
5b165e4badbf4062a8a026117b06741fd71436f2
[ "LicenseRef-scancode-warranty-disclaimer", "MIT" ]
permissive
thecodrr/kotlogram
c72fb8f81a422d5c3d067ef194faab6e20861d30
dc692348229fed14b738f376f7a3af2c474e5737
refs/heads/master
2020-07-30T00:14:07.740929
2017-01-06T07:19:09
2017-01-06T07:19:09
210,013,661
0
0
MIT
2019-09-21T16:00:26
2019-09-21T16:00:25
null
UTF-8
Java
false
false
3,188
java
package com.github.badoualy.telegram.tl.api; import com.github.badoualy.telegram.tl.TLContext; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import static com.github.badoualy.telegram.tl.StreamUtils.readInt; import static com.github.badoualy.telegram.tl.StreamUtils.readTLString; import static com.github.badoualy.telegram.tl.StreamUtils.writeInt; import static com.github.badoualy.telegram.tl.StreamUtils.writeString; import static com.github.badoualy.telegram.tl.TLObjectUtils.SIZE_CONSTRUCTOR_ID; import static com.github.badoualy.telegram.tl.TLObjectUtils.SIZE_INT32; import static com.github.badoualy.telegram.tl.TLObjectUtils.computeTLStringSerializedSize; /** * @author Yannick Badoual yann.badoual@gmail.com * @see <a href="http://github.com/badoualy/kotlogram">http://github.com/badoualy/kotlogram</a> */ public class TLMessageMediaContact extends TLAbsMessageMedia { public static final int CONSTRUCTOR_ID = 0x5e7d2f39; protected String phoneNumber; protected String firstName; protected String lastName; protected int userId; private final String _constructor = "messageMediaContact#5e7d2f39"; public TLMessageMediaContact() { } public TLMessageMediaContact(String phoneNumber, String firstName, String lastName, int userId) { this.phoneNumber = phoneNumber; this.firstName = firstName; this.lastName = lastName; this.userId = userId; } @Override public void serializeBody(OutputStream stream) throws IOException { writeString(phoneNumber, stream); writeString(firstName, stream); writeString(lastName, stream); writeInt(userId, stream); } @Override @SuppressWarnings({"unchecked", "SimplifiableConditionalExpression"}) public void deserializeBody(InputStream stream, TLContext context) throws IOException { phoneNumber = readTLString(stream); firstName = readTLString(stream); lastName = readTLString(stream); userId = readInt(stream); } @Override public int computeSerializedSize() { int size = SIZE_CONSTRUCTOR_ID; size += computeTLStringSerializedSize(phoneNumber); size += computeTLStringSerializedSize(firstName); size += computeTLStringSerializedSize(lastName); size += SIZE_INT32; return size; } @Override public String toString() { return _constructor; } @Override public int getConstructorId() { return CONSTRUCTOR_ID; } public String getPhoneNumber() { return phoneNumber; } public void setPhoneNumber(String phoneNumber) { this.phoneNumber = phoneNumber; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public int getUserId() { return userId; } public void setUserId(int userId) { this.userId = userId; } }
[ "yann.badoual@gmail.com" ]
yann.badoual@gmail.com
e6e5ab7b950ef14bfe3e76de9ef6b04afb7febdb
7033d33d0ce820499b58da1d1f86f47e311fd0e1
/org/lwjgl/opengl/LinuxPeerInfo.java
ae80084ddf1ee666019379c19005bc299620a133
[ "MIT" ]
permissive
gabrielvicenteYT/melon-client-src
1d3f1f65c5a3bf1b6bc3e1cb32a05bf1dd56ee62
e0bf34546ada3afa32443dab838b8ce12ce6aaf8
refs/heads/master
2023-04-04T05:47:35.053136
2021-04-19T18:34:36
2021-04-19T18:34:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
545
java
package org.lwjgl.opengl; import java.nio.*; abstract class LinuxPeerInfo extends PeerInfo { LinuxPeerInfo() { super(createHandle()); } private static native ByteBuffer createHandle(); public final long getDisplay() { return nGetDisplay(this.getHandle()); } private static native long nGetDisplay(final ByteBuffer p0); public final long getDrawable() { return nGetDrawable(this.getHandle()); } private static native long nGetDrawable(final ByteBuffer p0); }
[ "haroldthesenpai@gmail.com" ]
haroldthesenpai@gmail.com
04506cc9f64867641fe877d4ce8d7d7ed70896f3
c3cf33e7b9fe20ff3124edcfc39f08fa982b2713
/pocs/terraform-cdk-fun/src/main/java/imports/kubernetes/DataKubernetesPodSpecContainerLivenessProbeTcpSocket.java
c3b78eeeab864936c54f50c3642926edb3d832ef
[ "Unlicense" ]
permissive
diegopacheco/java-pocs
d9daa5674921d8b0d6607a30714c705c9cd4c065
2d6cc1de9ff26e4c0358659b7911d2279d4008e1
refs/heads/master
2023-08-30T18:36:34.626502
2023-08-29T07:34:36
2023-08-29T07:34:36
107,281,823
47
57
Unlicense
2022-03-23T07:24:08
2017-10-17T14:42:26
Java
UTF-8
Java
false
false
2,010
java
package imports.kubernetes; @javax.annotation.Generated(value = "jsii-pacmak/1.30.0 (build adae23f)", date = "2021-06-16T06:12:12.513Z") @software.amazon.jsii.Jsii(module = imports.kubernetes.$Module.class, fqn = "kubernetes.DataKubernetesPodSpecContainerLivenessProbeTcpSocket") public class DataKubernetesPodSpecContainerLivenessProbeTcpSocket extends com.hashicorp.cdktf.ComplexComputedList { protected DataKubernetesPodSpecContainerLivenessProbeTcpSocket(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } protected DataKubernetesPodSpecContainerLivenessProbeTcpSocket(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) { super(initializationMode); } /** * @param terraformResource This parameter is required. * @param terraformAttribute This parameter is required. * @param complexComputedListIndex This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public DataKubernetesPodSpecContainerLivenessProbeTcpSocket(final @org.jetbrains.annotations.NotNull com.hashicorp.cdktf.ITerraformResource terraformResource, final @org.jetbrains.annotations.NotNull java.lang.String terraformAttribute, final @org.jetbrains.annotations.NotNull java.lang.String complexComputedListIndex) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(terraformResource, "terraformResource is required"), java.util.Objects.requireNonNull(terraformAttribute, "terraformAttribute is required"), java.util.Objects.requireNonNull(complexComputedListIndex, "complexComputedListIndex is required") }); } public @org.jetbrains.annotations.NotNull java.lang.String getPort() { return software.amazon.jsii.Kernel.get(this, "port", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } }
[ "diego.pacheco.it@gmail.com" ]
diego.pacheco.it@gmail.com
d106800154896e9fd793946bd1a4492a8a0771b2
d77964aa24cfdca837fc13bf424c1d0dce9c70b9
/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/couchbase/CouchbaseDataAutoConfiguration.java
e67697311a83ec85e7791a24db7d8cf1ce1b1e34
[]
no_license
Suryakanta97/Springboot-Project
005b230c7ebcd2278125c7b731a01edf4354da07
50f29dcd6cea0c2bc6501a5d9b2c56edc6932d62
refs/heads/master
2023-01-09T16:38:01.679446
2018-02-04T01:22:03
2018-02-04T01:22:03
119,914,501
0
1
null
2022-12-27T14:52:20
2018-02-02T01:21:45
Java
UTF-8
Java
false
false
2,598
java
/* * Copyright 2012-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.boot.autoconfigure.data.couchbase; import com.couchbase.client.java.Bucket; import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnSingleCandidate; import org.springframework.boot.autoconfigure.couchbase.CouchbaseAutoConfiguration; import org.springframework.boot.autoconfigure.validation.ValidationAutoConfiguration; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.data.couchbase.core.mapping.event.ValidatingCouchbaseEventListener; import org.springframework.data.couchbase.repository.CouchbaseRepository; import javax.validation.Validator; /** * {@link EnableAutoConfiguration Auto-configuration} for Spring Data's Couchbase support. * * @author Eddú Meléndez * @author Stephane Nicoll * @since 1.4.0 */ @Configuration @ConditionalOnClass({Bucket.class, CouchbaseRepository.class}) @AutoConfigureAfter({CouchbaseAutoConfiguration.class, ValidationAutoConfiguration.class}) @EnableConfigurationProperties(CouchbaseDataProperties.class) @Import({CouchbaseConfigurerAdapterConfiguration.class, SpringBootCouchbaseDataConfiguration.class}) public class CouchbaseDataAutoConfiguration { @Configuration @ConditionalOnClass(Validator.class) public static class ValidationConfiguration { @Bean @ConditionalOnSingleCandidate(Validator.class) public ValidatingCouchbaseEventListener validationEventListener( Validator validator) { return new ValidatingCouchbaseEventListener(validator); } } }
[ "suryakanta97@github.com" ]
suryakanta97@github.com
c3753147f2b7d6cc2c35309589e59db8df0127f5
f2dbc9505a830ac2ae8674475ab52d56da5fcd25
/src/main/java/com/tchepannou/kiosk/validator/ValidatorContext.java
4e42c105835330f58824c3e8139ac142d8062962
[]
no_license
htchepannou/content-validator
25cd5266ff03280cb99bf86abc74a333ef75e84c
813d4bc575a1e853249b570e57cd1b1e5faec8cf
refs/heads/master
2021-01-11T03:39:30.447058
2016-10-27T23:50:00
2016-10-27T23:50:00
71,404,608
0
0
null
null
null
null
UTF-8
Java
false
false
249
java
package com.tchepannou.kiosk.validator; import java.util.List; public interface ValidatorContext { List<Rule> getRules(); List<String> getLanguages(); int getContentMinLength(); boolean alreadyPublished(String id, String title); }
[ "htchepannou@expedia.com" ]
htchepannou@expedia.com
5dbbbd70777dc18f1144e473a83325cd33ed88e4
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/MATH-60b-2-12-NSGA_II-WeightedSum:TestLen:CallDiversity/org/apache/commons/math/special/Gamma_ESTest.java
50d1a5ce424cbf9860a32305e792c91451e469e5
[]
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
548
java
/* * This file was automatically generated by EvoSuite * Sat Jan 18 21:55:00 UTC 2020 */ package org.apache.commons.math.special; 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 Gamma_ESTest extends Gamma_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
2da9615522a96e2a4c0b7feda487012e78fcbf15
d4aba85df60dae4547c2235af0b8df945f2f1be1
/lingshi/src/lingshi/getway/filter/TokenCheckFilter.java
b6e0b0b69cf8d9aadee3a820bc882eb69894f43d
[]
no_license
MyAuntIsPost90s/lingshiframework
87e27a9e7d518a38a19cbe6c016929ec41901ed5
acd3ad89cd23c6791f468137cf88726ad7f163ab
refs/heads/master
2021-05-08T10:12:25.764656
2018-06-18T14:52:08
2018-06-18T14:52:08
119,833,482
2
2
null
null
null
null
UTF-8
Java
false
false
4,130
java
package lingshi.getway.filter; import java.io.IOException; import java.util.Arrays; import java.util.List; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.alibaba.fastjson.JSON; import lingshi.convert.Convert; import lingshi.getway.model.MsgCode; import lingshi.getway.model.ResponseData; import lingshi.getway.token.LingShiTokenEnum.TokenStatus; import lingshi.getway.token.service.TokenMgrService; import lingshi.getway.token.service.impl.TokenMgrServiceMd5Impl; import lingshi.model.LingShiConfig; import lingshi.valid.StringValid; public class TokenCheckFilter implements javax.servlet.Filter { private List<String> allowpath; private Boolean iscross; @Override public void destroy() { // TODO Auto-generated method stub } @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest hRequest = (HttpServletRequest) request; HttpServletResponse hResponse = (HttpServletResponse) response; // 当开启跨域时 if (iscross == true) { hResponse.setHeader("Access-Control-Allow-Origin", hRequest.getHeader("Origin")); hResponse.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE"); hResponse.setHeader("Access-Control-Max-Age", "0"); hResponse.setHeader("Access-Control-Allow-Headers", "Origin, No-Cache, X-Requested-With, If-Modified-Since, Pragma, Last-Modified, Cache-Control, Expires, Content-Type, X-E4M-With,AppKey,AccessToken"); hResponse.setHeader("Access-Control-Allow-Credentials", "true"); hResponse.setHeader("XDomainRequestAllowed", "1"); // 过滤试探请求 if (hRequest.getMethod().toUpperCase().equals("OPTIONS")) { chain.doFilter(request, response); return; } } // 跳过校验 if (allowpath != null) { for (String item : allowpath) { if (hRequest.getRequestURL().toString().contains(item)) { chain.doFilter(request, response); return; } } } String appKey = hRequest.getHeader("AppKey"); String token = hRequest.getHeader("AccessToken"); ResponseData responseData = new ResponseData(); if (StringValid.isNullOrEmpty(appKey) || !appKey.equals(LingShiConfig.getInstance().getAppKey())) { responseData.fail("appKey错误,非法请求", null, MsgCode.TOKEN_FAIL); response.setContentType(response.getContentType().replace("text/html", "application/json")); response.getWriter().write(JSON.toJSONString(responseData)); response.getWriter().close(); return; } TokenMgrService tokenMgrService = new TokenMgrServiceMd5Impl(); TokenStatus tokenStatus = tokenMgrService.tokenCheck(token); if (tokenStatus == TokenStatus.FAIL) { responseData.fail("Token错误,非法请求", null, MsgCode.TOKEN_FAIL); response.setContentType(response.getContentType().replace("text/html", "application/json")); response.getWriter().write(JSON.toJSONString(responseData)); response.getWriter().close(); return; } if (tokenStatus == TokenStatus.EXP) { responseData.fail("Token已过期", null, MsgCode.TOKEN_FAIL); response.setContentType(response.getContentType().replace("text/html", "application/json")); response.getWriter().write(JSON.toJSONString(responseData)); response.getWriter().close(); return; } chain.doFilter(request, response); } @Override public void init(FilterConfig filterConfig) throws ServletException { String[] strs = filterConfig.getInitParameter("allowpath").split(","); this.allowpath = Arrays.asList(strs); System.out.println("Load allowpath:" + allowpath.toString()); // 是否开启跨域 String crossStr = filterConfig.getInitParameter("iscross"); iscross = Convert.toBoolean(crossStr); System.out.println("Load iscross:" + iscross); } }
[ "1126670571@qq.com" ]
1126670571@qq.com
c0717429e994ed24d67397c0a6ddd3020f420729
c5de33ac8f22c8a1876ffd4761bded03fd9630c1
/src/ems/org/mc4j/ems/connection/support/metadata/AbstractConnectionTypeDescriptor.java
42dcd3ae443a7c30e9fb39b69b55afa2b6c2be95
[]
no_license
rhq-project/ems
533805c83018d2ba9132782f2328f543e96c69e0
d582b934c60f3c49edbb14b776907252add6d727
refs/heads/master
2020-05-20T10:41:01.757095
2014-07-02T08:24:36
2014-07-02T08:24:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,391
java
/* * Copyright 2002-2004 Greg Hinkle * * 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.mc4j.ems.connection.support.metadata; import java.io.File; import java.io.IOException; import java.net.MalformedURLException; import java.util.Iterator; import java.util.Map; import java.util.Properties; import java.util.jar.Attributes; import java.util.jar.JarFile; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * @author Greg Hinkle (ghinkle@users.sourceforge.net), Sep 30, 2004 * @version $Revision: 629 $($Author: ianpspringer $ / $Date: 2011-10-28 23:44:26 +0200 (Fr, 28 Okt 2011) $) */ public abstract class AbstractConnectionTypeDescriptor implements ConnectionTypeDescriptor { private static Log log = LogFactory.getLog(AbstractConnectionTypeDescriptor.class); public String toString() { return getDisplayName(); } public boolean isUseManagementHome() { return false; } public String getServerVersion(File recognitionFile) { try { String version; JarFile recJarFile = new JarFile(recognitionFile); version = recJarFile.getManifest().getMainAttributes().getValue("Implementation-Version"); if (version == null) { Map attrMap = recJarFile.getManifest().getEntries(); for (Iterator iterator = attrMap.entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); String name = (String) entry.getKey(); Attributes attr = (Attributes) entry.getValue(); version = attr.getValue("Implementation-Version"); } } return version; } catch (MalformedURLException e) { log.warn("Could not determine server version from matched file " + recognitionFile.getAbsolutePath(),e); } catch (IOException e) { log.warn("Could not determine server version from matched file " + recognitionFile.getAbsolutePath(),e); } return null; } public String getExtrasLibrary() { return null; } public Properties getDefaultAdvancedProperties() { return new Properties(); } public boolean isUseChildFirstClassLoader() { return false; } public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof AbstractConnectionTypeDescriptor)) return false; final AbstractConnectionTypeDescriptor other = (AbstractConnectionTypeDescriptor) o; if (getDisplayName() != null ? !getDisplayName().equals(other.getDisplayName()) : other.getDisplayName() != null) return false; return true; } public int hashCode() { return (getDisplayName() != null ? getDisplayName().hashCode() : 0); } }
[ "hwr@pilhuhn.de" ]
hwr@pilhuhn.de
8a9c8ad974b6492654938bba747036e8571977e5
888c751c5509bad104dd996c51c0b55786d1db4a
/JavaMVCFrameworksSpring/05.TheRightWay/src/main/java/com/social/services/BikeServiceImpl.java
3892aa8892f5d0846c0714451219e01f9326a2e3
[]
no_license
vasilgramov/java-web
bdb25dd8e126aa96c3b4f40832a805880e0aa71b
0544f61be6927023753b659ffdb06c1a39c75736
refs/heads/master
2020-06-27T05:01:24.746846
2018-01-03T14:56:01
2018-01-03T14:56:01
97,046,513
0
0
null
null
null
null
UTF-8
Java
false
false
1,909
java
package com.social.services; import com.social.entities.Bike; import com.social.exceptions.BikeNotFoundException; import com.social.models.viewModels.BikeViewModel; import com.social.repositories.BikeRepository; import org.modelmapper.ModelMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageImpl; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.List; @Service public class BikeServiceImpl implements BikeService { private final BikeRepository bikeRepository; private final ModelMapper modelMapper; @Autowired public BikeServiceImpl( BikeRepository bikeRepository, ModelMapper modelMapper) { this.bikeRepository = bikeRepository; this.modelMapper = modelMapper; } @Override public BikeViewModel findById(long id) { Bike one = this.bikeRepository.findOne(id); if (one == null) { throw new BikeNotFoundException(); } return this.modelMapper.map(one, BikeViewModel.class); } @Override public List<BikeViewModel> findAll() { List<Bike> all = this.bikeRepository.findAll(); List<BikeViewModel> result = new ArrayList<>(); for (Bike bike : all) { result.add(this.modelMapper.map(bike, BikeViewModel.class)); } return result; } @Override public Page<BikeViewModel> findAll(Pageable pageable) { Page<Bike> bikes = this.bikeRepository.findAll(pageable); List<BikeViewModel> result = new ArrayList<>(); for (Bike bike : bikes) { result.add(this.modelMapper.map(bike, BikeViewModel.class)); } return new PageImpl<>(result, pageable, bikes.getTotalElements()); } }
[ "gramovv@gmail.com" ]
gramovv@gmail.com
2f694d9ed8388c35e984d9a669e4884588e38d47
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/spoon/learning/1054/SourceFragmentContextList.java
98c76ce76e3c66ab680826e2be828020b8f82f82
[]
no_license
ASSERT-KTH/synthetic-checkstyle-error-dataset
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
40c057e1669584bfc6fecf789b5b2854660222f3
refs/heads/master
2023-03-18T12:50:55.410343
2019-01-25T09:54:39
2019-01-25T09:54:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,764
java
/** * Copyright (C) 2006-2018 INRIA and contributors * Spoon - http://spoon.gforge.inria.fr/ * * This software is governed by the CeCILL-C License under French law and * abiding by the rules of distribution of free software. You can use, modify * and/or redistribute the software under the terms of the CeCILL-C license as * circulated by CEA, CNRS and INRIA at http://www.cecill.info. * * 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 CeCILL-C License for more details. * * The fact that you are presently reading this means that you have had * knowledge of the CeCILL-C license and that you accept its terms. */ package spoon.support.sniper.internal; import java.util.List; import spoon.reflect.declaration.CtElement; import static spoon.support.sniper.internal.ElementSourceFragment.isSpaceFragment; /** * Handles printing of changes of the ordered list of elements. * E.g. list of type members of type * Such lists must be printed in same order like they are in defined in Spoon model. */ public class SourceFragmentContextList extends AbstractSourceFragmentContextCollection { /** * @param mutableTokenWriter {@link MutableTokenWriter}, which is used for printing * @param element the {@link CtElement} whose list attribute is handled * @param fragments the List of fragments, which represents whole list of elements. E.g. body of method or all type members of type * @param changeResolver {@link ChangeResolver}, which can be used to detect changes of list items */ public SourceFragmentContextList(MutableTokenWriter mutableTokenWriter, CtElement element, List<SourceFragment> fragments, ChangeResolver changeResolver) { super(mutableTokenWriter, fragments, changeResolver); } @Override protected int findIndexOfNextChildTokenOfEvent(PrinterEvent event) { if (event instanceof ElementPrinterEvent) { // in case of collection search for exact item of the collection ElementPrinterEvent elementEvent = (ElementPrinterEvent)event; return findIndexOfNextChildTokenOfElement(elementEvent.getElement()); } return super.findIndexOfNextChildTokenOfEvent(event); } @Override protected void printOriginSpacesUntilFragmentIndex(int index) { super.printOriginSpacesUntilFragmentIndex(getLastWhiteSpaceBefore(index), index); } /** * @return index of last child fragment which contains space, which is before `index` */ private int getLastWhiteSpaceBefore(int index) { for (int i = index - 1; i >= 0; i--) { SourceFragment fragment = childFragments.get(i); if (isSpaceFragment(fragment)) { continue; } return i + 1; } return 0; } }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
4fb04583b57ffbc8cf7d61a7539ecceef31f2535
64bf664bcd26edde84306825c2e9cabdb4ad8ef6
/src/main/java/me/neznamy/tab/shared/features/scoreboard/lines/NumberedStableDynamicLine.java
e1d4705ee62346344742193d3ec2b920c7ca4a00
[ "Apache-2.0" ]
permissive
Kore-Development/TAB
2283823650214e0529e3313d27b58991cf134fcc
98c3b3da5940e0d90b792974367e2ce2dd68a84c
refs/heads/master
2023-04-09T11:18:52.951925
2020-12-17T22:26:56
2020-12-17T22:26:56
322,449,084
0
0
Apache-2.0
2023-04-04T02:02:48
2020-12-18T00:46:25
null
UTF-8
Java
false
false
642
java
package me.neznamy.tab.shared.features.scoreboard.lines; import me.neznamy.tab.api.TabPlayer; import me.neznamy.tab.shared.features.scoreboard.Scoreboard; /** * A stable (anti-flickering) line with dynamic text (supports placeholders) with numbers 1-15 * Limitations: * 1.5.x - 1.12.x: up to 32 characters (depending on color/magic codes) */ public class NumberedStableDynamicLine extends StableDynamicLine { public NumberedStableDynamicLine(Scoreboard parent, int lineNumber, String text) { super(parent, lineNumber, text); } @Override public int getScoreFor(TabPlayer p) { return parent.lines.size() + 1 - lineNumber; } }
[ "n.e.z.n.a.m.y@azet.sk" ]
n.e.z.n.a.m.y@azet.sk
43a89f4eb0825794eb966c8e265c20a4e7668d51
63e2ca4f438bc64d2462746bc27584d6df2656da
/webapp/src/aides/nc/ccas/gasel/jwcs/budget/annuel/HATableau.java
7cdabe7e60aae6609b19489c7f21a1abf8920c12
[]
no_license
DSI-Ville-Noumea/gasel
f091cf64d7a4726f4a7121ab8dbdcb680242b168
b330e88acfeff167c3978ef43c1aafa92101f500
refs/heads/master
2020-04-17T00:15:26.231907
2016-07-06T22:32:43
2016-07-06T22:32:43
44,145,158
0
1
null
2016-01-21T03:12:59
2015-10-13T01:51:15
Java
UTF-8
Java
false
false
3,932
java
package nc.ccas.gasel.jwcs.budget.annuel; import static java.lang.String.valueOf; import static nc.ccas.gasel.model.budget.Imputation.ALIMENTATION; import static nc.ccas.gasel.modelUtils.CommonQueries.findById; import static nc.ccas.gasel.modelUtils.CommonQueries.getAll; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import nc.ccas.gasel.BaseComponent; import nc.ccas.gasel.model.budget.NatureAide; import nc.ccas.gasel.model.budget.SecteurAide; import nc.ccas.gasel.pages.budget.annuel.HAPage; import nc.ccas.gasel.utils.QuickHashMap; import org.apache.cayenne.DataRow; import org.apache.cayenne.ObjectContext; import org.apache.tapestry.IRequestCycle; public abstract class HATableau extends BaseComponent { private List<HALigne> _tableau; public abstract Integer getAnnee(); public List<HALigne> getTableau() { if (_tableau == null) { ObjectContext dc = getObjectContext(); // Récupération des secteurs et natures List<SecteurAide> secteurs = getPage().sort( getAll(dc, SecteurAide.class)).by("libelle").results(); List<NatureAide> natures = getPage().sort( getAll(dc, NatureAide.class)).by("libelle").results(); // Requète int annee = getAnnee(); String agregation = ((HAPage) getPage()).agregation(); String query = "SELECT sa.id AS sa_id, na.id AS na_id, mois, " + agregation + "::integer AS valeur\n" + " FROM aide a\n" + " JOIN aide_montants am ON (a.id = am.id)\n" + " JOIN nature_aide na ON (a.nature_id = na.id)\n" + " JOIN secteur_aide sa ON (na.parent_id = sa.id)\n" + " WHERE am.annee = $annee\n" + " AND na.imputation_id <> " + ALIMENTATION + "\n" + " AND (montant_bons_annule IS NULL OR a.montant > montant_bons_annule)\n" + " GROUP BY sa.id, na.id, mois"; List<DataRow> results = getPage().sql.query().rows( query, new QuickHashMap<String, String>().put("annee", valueOf(annee)).map()); // Analyse HALigne total = new HALigne("Total", true); Map<SecteurAide, HALigne> parSecteur = new HashMap<SecteurAide, HALigne>(); Map<NatureAide, HALigne> parNature = new HashMap<NatureAide, HALigne>(); for (DataRow row : results) { SecteurAide secteur = findById(SecteurAide.class, (Integer) row .get("sa_id"), dc); NatureAide nature = findById(NatureAide.class, (Integer) row .get("na_id"), dc); HALigne ligneSecteur = parSecteur.get(secteur); HALigne ligneNature = parNature.get(nature); if (ligneSecteur == null) { ligneSecteur = new HALigne(secteur.getLibelle(), true); ligneSecteur.setParent(total); parSecteur.put(secteur, ligneSecteur); } if (ligneNature == null) { ligneNature = new HALigne(nature.getLibelle()); ligneNature.setParent(ligneSecteur); parNature.put(nature, ligneNature); } Integer mois = numAsInt(row.get("mois")); Integer valeur = numAsInt(row.get("valeur")); if (valeur == null) valeur = 0; ligneNature.add(mois, valeur); ligneSecteur.add(mois, valeur); total.add(mois, valeur); } _tableau = new ArrayList<HALigne>(parSecteur.size() + parNature.size()); for (SecteurAide secteur : secteurs) { HALigne ligneSecteur = parSecteur.get(secteur); if (ligneSecteur == null) continue; for (NatureAide nature : natures) { if (!nature.getParent().equals(secteur)) continue; HALigne ligneNature = parNature.get(nature); if (ligneNature == null) continue; _tableau.add(ligneNature); } _tableau.add(ligneSecteur); } _tableau.add(total); } return _tableau; } private Integer numAsInt(Object object) { if (object == null) { return null; } return ((Number) object).intValue(); } @Override protected void cleanupAfterRender(IRequestCycle cycle) { super.cleanupAfterRender(cycle); _tableau = null; } }
[ "mcluseau@isi.nc" ]
mcluseau@isi.nc
1ed59ac72c9caec41ec8974e2fbc0963f3a736e4
59c213cb32f9cb5afd4eac0d19427a69fa940860
/src/ru/alexander/mp3player/entity/MP3.java
3c898fa7fd00186d14215705a7de57b3720c3696
[]
no_license
ansurakin/Mp3-Player
94a0b9baf0b4404508d5e78fa7751d0d9000a125
f3bc7fe9b65f79042abfe23ac320f5a3d5bec066
refs/heads/master
2021-05-10T11:58:15.432084
2018-01-22T17:19:51
2018-01-22T17:19:51
118,428,064
0
0
null
null
null
null
UTF-8
Java
false
false
842
java
package ru.alexander.mp3player.entity; import java.io.Serializable; import ru.alexander.mp3player.utils.FileUtils; public class MP3 implements Serializable{ private String name; private String path; public MP3(String name, String path) { this.name = name; this.path = path; } @Override // для корректного отображения объекта MP3 при добавлении в плейлист public String toString() { return FileUtils.getFileNameWithoutExtension(name); } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getPath() { return path; } public void setPath(String path) { this.path = path; } }
[ "Alex@Alex-PC" ]
Alex@Alex-PC
9572e94817484c243e834e02b68a6ca45600fc0f
732b4c455a52dacf043abaaa33395285bc17d49c
/src/main/java/com/artland/controller/admin/AdminController.java
ade6fd55d60ab08d36eade339b7da42555121f6f
[ "Apache-2.0" ]
permissive
WaylanPunch/ArtLand
1aa10868ecd6ba1d47465210940d3121eef651ac
ec3fc1e8e035ab4b321afd4d095aa7c23213f985
refs/heads/main
2023-02-06T15:47:33.696959
2020-12-30T17:25:14
2020-12-30T17:25:14
325,594,170
0
0
null
null
null
null
UTF-8
Java
false
false
4,790
java
package com.artland.controller.admin; import com.artland.entity.AdminUser; import com.artland.service.*; import org.springframework.stereotype.Controller; import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; /** * @author WaylanPunch * @email waylanpunch@gmail.com * @link https://github.com/WaylanPunch * @date 2017-10-31 */ @Controller @RequestMapping("/admin") public class AdminController { @Resource private AdminUserService adminUserService; @Resource private BlogService blogService; @Resource private CategoryService categoryService; @Resource private LinkService linkService; @Resource private TagService tagService; @Resource private CommentService commentService; @GetMapping({"/login"}) public String login() { return "admin/login"; } @GetMapping({"", "/", "/index", "/index.html"}) public String index(HttpServletRequest request) { request.setAttribute("path", "index"); request.setAttribute("categoryCount", categoryService.getTotalCategories()); request.setAttribute("blogCount", blogService.getTotalBlogs()); request.setAttribute("linkCount", linkService.getTotalLinks()); request.setAttribute("tagCount", tagService.getTotalTags()); request.setAttribute("commentCount", commentService.getTotalComments()); return "admin/index"; } @PostMapping(value = "/login") public String login(@RequestParam("userName") String userName, @RequestParam("password") String password, @RequestParam("verifyCode") String verifyCode, HttpSession session) { if (StringUtils.isEmpty(verifyCode)) { session.setAttribute("errorMsg", "验证码不能为空"); return "admin/login"; } if (StringUtils.isEmpty(userName) || StringUtils.isEmpty(password)) { session.setAttribute("errorMsg", "用户名或密码不能为空"); return "admin/login"; } String kaptchaCode = session.getAttribute("verifyCode") + ""; if (StringUtils.isEmpty(kaptchaCode) || !verifyCode.equals(kaptchaCode)) { session.setAttribute("errorMsg", "验证码错误"); return "admin/login"; } AdminUser adminUser = adminUserService.login(userName, password); if (adminUser != null) { session.setAttribute("loginUser", adminUser.getNickName()); session.setAttribute("loginUserId", adminUser.getAdminUserId()); //session过期时间设置为7200秒 即两小时 //session.setMaxInactiveInterval(60 * 60 * 2); return "redirect:/admin/index"; } else { session.setAttribute("errorMsg", "登陆失败"); return "admin/login"; } } @GetMapping("/profile") public String profile(HttpServletRequest request) { Integer loginUserId = (int) request.getSession().getAttribute("loginUserId"); AdminUser adminUser = adminUserService.getUserDetailById(loginUserId); if (adminUser == null) { return "admin/login"; } request.setAttribute("path", "profile"); request.setAttribute("loginUserName", adminUser.getLoginUserName()); request.setAttribute("nickName", adminUser.getNickName()); return "admin/profile"; } @PostMapping("/profile/password") @ResponseBody public String passwordUpdate(HttpServletRequest request, @RequestParam("originalPassword") String originalPassword, @RequestParam("newPassword") String newPassword) { if (StringUtils.isEmpty(originalPassword) || StringUtils.isEmpty(newPassword)) { return "参数不能为空"; } Integer loginUserId = (int) request.getSession().getAttribute("loginUserId"); if (adminUserService.updatePassword(loginUserId, originalPassword, newPassword)) { //修改成功后清空session中的数据,前端控制跳转至登录页 request.getSession().removeAttribute("loginUserId"); request.getSession().removeAttribute("loginUser"); request.getSession().removeAttribute("errorMsg"); return "success"; } else { return "修改失败"; } } @PostMapping("/profile/name") @ResponseBody public String nameUpdate(HttpServletRequest request, @RequestParam("loginUserName") String loginUserName, @RequestParam("nickName") String nickName) { if (StringUtils.isEmpty(loginUserName) || StringUtils.isEmpty(nickName)) { return "参数不能为空"; } Integer loginUserId = (int) request.getSession().getAttribute("loginUserId"); if (adminUserService.updateName(loginUserId, loginUserName, nickName)) { return "success"; } else { return "修改失败"; } } @GetMapping("/logout") public String logout(HttpServletRequest request) { request.getSession().removeAttribute("loginUserId"); request.getSession().removeAttribute("loginUser"); request.getSession().removeAttribute("errorMsg"); return "admin/login"; } }
[ "waylanpunch@gmail.com" ]
waylanpunch@gmail.com
b1c881d43260f68c84ef7c5ed58e89c60b482422
e175eb50cc5b29a766344ecc1fb5a3e1c32e16f2
/Android_Dev/Hackaton_Project/platform/media/src/com/telenav/media/ITnMediaListener.java
bd9393547d8fb7d3e49614c21bf5f9ca2eaf8320
[]
no_license
rajpalparyani/RajRepo
28fddd8eef7cc83b2194ba25105628ee7fd887ca
5f3e215bcf39f0a7542b3bb8dfc458854ae25cde
refs/heads/master
2020-04-12T18:25:07.276246
2013-12-09T22:41:51
2013-12-09T22:41:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,580
java
/** * * Copyright 2010 TeleNav, Inc. All rights reserved. * ITnMediaListener.java * */ package com.telenav.media; /** * ITnMediaListener is the interface for receiving asynchronous events generated by players or recorders. Applications * may implement this interface and register their implementations with the setListener method in {@link TnMediaPlayer} * or {@link TnMediaRecorder}. * * @author fqming (fqming@telenav.cn) *@date Jul 26, 2010 */ public interface ITnMediaListener { /** * Called when the media is ready for playback. */ public final static String ON_PREPARE = "on_prepare"; /** * Called to indicate an error. */ public final static String ON_ERROR = "on_error"; /** * Called to indicate an info or a warning. */ public final static String ON_INFO = "on_info"; /** * Called when the end of a media source is reached during playback. */ public final static String ON_COMPLETION = "on_completion"; /** * Called when the player or recorder is closed. */ public final static String ON_CLOSE = "on_close"; /** * This method is called to deliver an event to a registered listener when a Player event is observed. * * @param player The player which generated the event. * @param event The event generated as defined by the enumerated types. * @param eventData The associated event data. */ public void mediaUpdate(TnMediaPlayer player, String event, Object eventData); }
[ "x" ]
x
a3c736eccb2eff3d4340568e6703b5af8bb6836b
68d12c475b11edc3582f4d958862b847cacdf833
/pgpainless-core/src/test/java/org/pgpainless/signature/builder/UniversalSignatureBuilderTest.java
37bc6fd3174e083e4d1fe2fabcd9c6c28484cbb9
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "EPL-1.0", "EPL-2.0", "MIT", "LGPL-2.1-only" ]
permissive
pgpainless/pgpainless
496331e6f8b1b3c03c4cc81eaaa1c077800dbd8d
9ac681d88cd63e016bb0069ecc96ac0d648c210a
refs/heads/main
2023-08-31T04:47:26.079558
2023-08-30T11:18:39
2023-08-30T11:18:39
135,846,104
117
29
Apache-2.0
2023-08-28T16:27:59
2018-06-02T19:24:33
Java
UTF-8
Java
false
false
4,516
java
// SPDX-FileCopyrightText: 2022 Paul Schaub <vanitasvitae@fsfe.org> // // SPDX-License-Identifier: Apache-2.0 package org.pgpainless.signature.builder; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import java.io.IOException; import org.bouncycastle.bcpg.sig.PrimaryUserID; import org.bouncycastle.openpgp.PGPException; import org.bouncycastle.openpgp.PGPSecretKey; import org.bouncycastle.openpgp.PGPSecretKeyRing; import org.bouncycastle.openpgp.PGPSignature; import org.bouncycastle.openpgp.PGPSignatureGenerator; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.pgpainless.PGPainless; import org.pgpainless.algorithm.HashAlgorithm; import org.pgpainless.algorithm.KeyFlag; import org.pgpainless.algorithm.SignatureType; import org.pgpainless.key.protection.SecretKeyRingProtector; import org.pgpainless.signature.subpackets.SignatureSubpackets; public class UniversalSignatureBuilderTest { private static final String KEY = "-----BEGIN PGP PRIVATE KEY BLOCK-----\n" + "Version: PGPainless\n" + "Comment: 9611 510F 313E DBC2 BBBC DC24 3BAD F1F8 3E70 DC34\n" + "Comment: Signora Universa <signora@pgpainless.org>\n" + "\n" + "lFgEY4DKKRYJKwYBBAHaRw8BAQdA65vJxvvLASI/gczDP8ZKH4C+16MLU7F5iP91\n" + "8WWUqM0AAQCRSTHLLQWT9tuNRgkG3xaIiBGkEGD7Ou/R3oga6tc1MA8UtClTaWdu\n" + "b3JhIFVuaXZlcnNhIDxzaWdub3JhQHBncGFpbmxlc3Mub3JnPoiPBBMWCgBBBQJj\n" + "gMopCRA7rfH4PnDcNBYhBJYRUQ8xPtvCu7zcJDut8fg+cNw0Ap4BApsBBRYCAwEA\n" + "BAsJCAcFFQoJCAsCmQEAAOgMAPwIOXWt3EBBusK5Ps3m7p/5HsecZv3IXtscEQBx\n" + "vKlULwD/YuLP1XJSqcE2cQJRNt6OLi9Nt02MKBYkhWrRCYZAcQicXQRjgMopEgor\n" + "BgEEAZdVAQUBAQdAWTstuhvHwmSXaQ4Vh8yxl0DZcvjrWkZI+n9/uFBxEmoDAQgH\n" + "AAD/eRt6kgOMzWsTuM00am4UhSygxmDt7h6JkBTnpyyhK0gPiYh1BBgWCgAdBQJj\n" + "gMopAp4BApsMBRYCAwEABAsJCAcFFQoJCAsACgkQO63x+D5w3DRnZAEA6GlS9Tw8\n" + "9SJlUvh5aciYSlQUplnEdng+Pvzbj74zcXIA/2OkyMN428ddNhkHWWkZCMOxApum\n" + "/zNDSYMwvByQ2KcFnFgEY4DKKRYJKwYBBAHaRw8BAQdAfhPrtVuG3g/zXF51VrPv\n" + "kpQQk9aqjrkBMI0qlztBpu0AAP9Mw7NCsAVwg9CgmSzG2ATIDp3yf/4BGVYDs7qu\n" + "+sbn7xKIiNUEGBYKAH0FAmOAyikCngECmwIFFgIDAQAECwkIBwUVCgkIC18gBBkW\n" + "CgAGBQJjgMopAAoJENmzwZA/hq5ZCqIBAMYeOnASBd+WWta7Teh3g7Bl7sFY42Qy\n" + "0OnaSGk/pLm9AP4yC62Xpb9DhWeiQIOY7k5n4lhNn173IfzDK6KXzBKkBgAKCRA7\n" + "rfH4PnDcNMInAP4oanG9tbuczBNLN3JY4Hg4AaB+w5kfdOJxKwnAw7U0cgEAtasg\n" + "67qSjHvsEvjNKeXzUm+db7NWP3fpIHxAmjWVjwM=\n" + "=Dqbd\n" + "-----END PGP PRIVATE KEY BLOCK-----"; private PGPSecretKeyRing secretKeys; private final SecretKeyRingProtector protector = SecretKeyRingProtector.unprotectedKeys(); @BeforeEach public void parseKey() throws IOException { secretKeys = PGPainless.readKeyRing().secretKeyRing(KEY); } @Test public void createPetNameSignature() throws PGPException { PGPSecretKey signingKey = secretKeys.getSecretKey(); PGPSignature archetype = signingKey.getPublicKey().getSignatures().next(); UniversalSignatureBuilder builder = new UniversalSignatureBuilder( signingKey, protector, archetype); builder.applyCallback(new SignatureSubpackets.Callback() { @Override public void modifyHashedSubpackets(SignatureSubpackets hashedSubpackets) { hashedSubpackets.setExportable(true, false); hashedSubpackets.setPrimaryUserId(new PrimaryUserID(false, false)); } }); PGPSignatureGenerator generator = builder.getSignatureGenerator(); String petName = "mykey"; PGPSignature petNameSig = generator.generateCertification(petName, secretKeys.getPublicKey()); assertEquals(SignatureType.POSITIVE_CERTIFICATION.getCode(), petNameSig.getSignatureType()); assertEquals(4, petNameSig.getVersion()); assertEquals(signingKey.getKeyID(), petNameSig.getKeyID()); assertEquals(HashAlgorithm.SHA512.getAlgorithmId(), petNameSig.getHashAlgorithm()); assertEquals(KeyFlag.toBitmask(KeyFlag.CERTIFY_OTHER), petNameSig.getHashedSubPackets().getKeyFlags()); assertFalse(petNameSig.getHashedSubPackets().isExportable()); assertFalse(petNameSig.getHashedSubPackets().isPrimaryUserID()); } }
[ "vanitasvitae@fsfe.org" ]
vanitasvitae@fsfe.org
015449c20115dad871ade3a726d0312f9946ae55
9a819f7453058e9fbc56953a4968779406746c88
/src/main/java/com/github/czyzby/lml/vis/parser/impl/attribute/tabbed/tab/TabDirtyLmlAttribute.java
db72b3e89c88905cbb7f0c75823ff944864c3a15
[ "Apache-2.0" ]
permissive
Mr00Anderson/gdx-liftoff
4ca544b599060702ccc46194602c4490eff2388f
c3a1a76ed9ec76531d7e9785fc4c4b8cda030e94
refs/heads/master
2022-11-06T06:13:05.351231
2020-05-29T19:57:04
2020-05-29T19:57:04
267,970,273
0
0
Apache-2.0
2020-05-29T22:53:40
2020-05-29T22:53:39
null
UTF-8
Java
false
false
1,291
java
package com.github.czyzby.lml.vis.parser.impl.attribute.tabbed.tab; import com.github.czyzby.lml.parser.LmlParser; import com.github.czyzby.lml.parser.action.ActorConsumer; import com.github.czyzby.lml.parser.tag.LmlAttribute; import com.github.czyzby.lml.parser.tag.LmlTag; import com.github.czyzby.lml.util.LmlUtilities; import com.github.czyzby.lml.vis.ui.VisTabTable; /** See {@link com.kotcrab.vis.ui.widget.tabbedpane.Tab#setDirty(boolean)}. Mapped to "dirty". * * @author MJ */ public class TabDirtyLmlAttribute implements LmlAttribute<VisTabTable> { @Override public Class<VisTabTable> getHandledType() { return VisTabTable.class; } @Override public void process(final LmlParser parser, final LmlTag tag, final VisTabTable actor, final String rawAttributeData) { // Dirty setting has to be managed before other settings (savable in particular), so we're adding this as an // onCreate action: LmlUtilities.getLmlUserObject(actor).addOnCreateAction(new ActorConsumer<Object, Object>() { @Override public Object consume(final Object widget) { actor.getTab().setDirty(parser.parseBoolean(rawAttributeData, actor)); return null; } }); } }
[ "tommy.ettinger@gmail.com" ]
tommy.ettinger@gmail.com
660910bafbbf9a6eadf2ceec0fd44e7693cb12fd
06f7bd5ee2773c2a5599575235e3dc934799b9df
/rundeckapp/src/main/groovy/com/dtolabs/rundeck/server/plugins/services/UIPluginProviderService.java
c96ab17079c802611d13b94db58cfdbe4be5ee7f
[ "Apache-2.0" ]
permissive
rundeck/rundeck
46c6fb57d7bf7b1ff890908eb4cb1ee8078c09b4
7c5000f2929c3f07b9ff7d08981dc7738da3372d
refs/heads/main
2023-09-01T19:48:37.654990
2023-09-01T19:08:15
2023-09-01T19:08:15
886,774
4,827
1,022
Apache-2.0
2023-09-14T21:51:34
2010-09-03T22:11:25
Groovy
UTF-8
Java
false
false
1,987
java
/* * Copyright 2016 SimplifyOps, Inc. (http://simplifyops.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.dtolabs.rundeck.server.plugins.services; import com.dtolabs.rundeck.core.common.Framework; import com.dtolabs.rundeck.core.plugins.*; import com.dtolabs.rundeck.plugins.rundeck.UIPlugin; /** * Created by greg on 8/26/16. */ public class UIPluginProviderService extends FrameworkPluggableProviderService<UIPlugin> implements ScriptPluginProviderLoadable<UIPlugin> { public static final String SERVICE_NAME = "UI"; private ServiceProviderLoader rundeckServerServiceProviderLoader; public UIPluginProviderService(final Framework framework) { super(SERVICE_NAME, framework, UIPlugin.class); } @Override public ServiceProviderLoader getPluginManager() { return rundeckServerServiceProviderLoader; } public ServiceProviderLoader getRundeckServerServiceProviderLoader() { return rundeckServerServiceProviderLoader; } public void setRundeckServerServiceProviderLoader(ServiceProviderLoader rundeckServerServiceProviderLoader) { this.rundeckServerServiceProviderLoader = rundeckServerServiceProviderLoader; } @Override public UIPlugin createScriptProviderInstance(ScriptPluginProvider provider) throws PluginException { ScriptUIPlugin.validateScriptPlugin(provider); return new ScriptUIPlugin(provider, getFramework()); } }
[ "greg.schueler@gmail.com" ]
greg.schueler@gmail.com
6146803082d0aef47338d51abdf1913e62ba71c5
9254e7279570ac8ef687c416a79bb472146e9b35
/ocr-api-20210707/src/main/java/com/aliyun/ocr_api20210707/models/RecognizeMedicalDeviceManageLicenseRequest.java
a951b5412bf8f4b811f50424a0ffdda648d308bc
[ "Apache-2.0" ]
permissive
lquterqtd/alibabacloud-java-sdk
3eaa17276dd28004dae6f87e763e13eb90c30032
3e5dca8c36398469e10cdaaa34c314ae0bb640b4
refs/heads/master
2023-08-12T13:56:26.379027
2021-10-19T07:22:15
2021-10-19T07:22:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
770
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.ocr_api20210707.models; import com.aliyun.tea.*; public class RecognizeMedicalDeviceManageLicenseRequest extends TeaModel { // 图片链接(长度不超 1014,不支持 base64) @NameInMap("Url") public String url; public static RecognizeMedicalDeviceManageLicenseRequest build(java.util.Map<String, ?> map) throws Exception { RecognizeMedicalDeviceManageLicenseRequest self = new RecognizeMedicalDeviceManageLicenseRequest(); return TeaModel.build(map, self); } public RecognizeMedicalDeviceManageLicenseRequest setUrl(String url) { this.url = url; return this; } public String getUrl() { return this.url; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
6ee23188d42bcac2a7f07cac25e88a3cf763b130
794473ff2ba2749db9c0782f5d281b00dd785a95
/braches_20171206/qiubaotong-server/qbt-system-web/src/main/java/com/qbt/web/support/impl/SfNotifyConfigSupportImpl.java
7a8a4773bbe1c1866f40c63002a028d0d9a5887b
[]
no_license
hexilei/qbt
a0fbc9c1870da1bf1ec24bba0f508841ca1b9750
040e5fcc9fbb27d52712cc1678d71693b5c85cce
refs/heads/master
2021-05-05T23:03:20.377229
2018-01-12T03:33:12
2018-01-12T03:33:12
116,363,833
0
1
null
null
null
null
UTF-8
Java
false
false
1,779
java
package com.qbt.web.support.impl; import java.util.ArrayList; import java.util.List; import javax.annotation.Resource; import org.springframework.stereotype.Service; import com.qbt.common.entity.PageEntity; import com.qbt.common.enums.ErrorCodeEnum; import com.qbt.common.exception.BusinessException; import com.qbt.common.util.BeanUtil; import com.qbt.persistent.entity.SfNotifyConfig; import com.qbt.service.SfNotifyConfigService; import com.qbt.web.pojo.sfNotifyConfig.SfNotifyConfigAddReqVo; import com.qbt.web.pojo.sfNotifyConfig.SfNotifyConfigPageReqVo; import com.qbt.web.pojo.sfNotifyConfig.SfNotifyConfigVo; import com.qbt.web.support.SfNotifyConfigSupport; @Service public class SfNotifyConfigSupportImpl implements SfNotifyConfigSupport { @Resource private SfNotifyConfigService notifyService; @Override public List<SfNotifyConfigVo> findByPage(SfNotifyConfigPageReqVo reqVo) { PageEntity<SfNotifyConfig> pageEntity = BeanUtil.pageConvert(reqVo, SfNotifyConfig.class); List<SfNotifyConfig> list = notifyService.findByPage(pageEntity); List<SfNotifyConfigVo> voList = new ArrayList<SfNotifyConfigVo>(); for(SfNotifyConfig act : list){ SfNotifyConfigVo vo = BeanUtil.a2b(act, SfNotifyConfigVo.class); voList.add(vo); } reqVo.setTotalCount(pageEntity.getTotalCount()); return voList; } @Override public int add(SfNotifyConfigAddReqVo vo) { SfNotifyConfig urgent = BeanUtil.a2b(vo, SfNotifyConfig.class); if(notifyService.isDisabledNotify(vo.getOrderNumber())) { throw new BusinessException(ErrorCodeEnum.ERROR_VALID_FAIL, "已存在通知数据"); } int activityId = notifyService.insert(urgent); return activityId; } @Override public int deleteById(Integer id) { return notifyService.deleteById(id); } }
[ "louis.he@missionsky.com" ]
louis.he@missionsky.com
9b1c2d368b8215d3d18fe28324488a075f14a497
c3a83420ab341677929e4be7676467294e52aee3
/everything-like/src/main/java/task/ScannerCallBack.java
4ba4f6f81ecbd4ff2d3a455b7874351550bc82d8
[]
no_license
LYHccc/study_java
525474403d9c0aaadaac84c1bf1ba7d7d77de89e
732e1ada5e3d9d2117ddfefac750f9b1354fbb6f
refs/heads/master
2022-11-25T19:57:18.091460
2020-11-13T14:29:58
2020-11-13T14:29:58
217,519,014
0
0
null
null
null
null
UTF-8
Java
false
false
188
java
package task; import java.io.File; public interface ScannerCallBack { //文件扫描回调,用来保存下一级子文件夹和子文件到数据库 void callBack(File dir); }
[ "1587168434@qq.com" ]
1587168434@qq.com
e6ff0a4e552882fc0adcb57c3524b3ce4e5739f1
4347ea57d9a2f78977c05ade175ed2d70134cde4
/Trainer Works/JavaWorks/src/com/fannie/HelloWorld.java
c49943215cf136f52e9d8cc13d65813006a17c1e
[]
no_license
adithnaveen/SDET5
fb92ed5459f43558a3027c4545957eea2ac4e3f3
4a3d60f1fe5085b111d32663f7542ed4974e1ab3
refs/heads/master
2020-12-30T14:57:29.930662
2018-09-11T09:37:13
2018-09-11T09:37:13
91,100,869
0
0
null
null
null
null
UTF-8
Java
false
false
141
java
package com.fannie; public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World from Java"); } }
[ "adith.naveen@gmail.com" ]
adith.naveen@gmail.com
d303d97abdc11761b1b805f9018332e93dd95327
7cb7c478a85fd6c48dd1480cdab5180b6484cc7b
/app/src/main/java/com/scu/xing/myapplication/BCReceiver3.java
43a81e5c7c21998b0404a4d1cc037ee1560b7d77
[]
no_license
xingyiyang/MyApplication
b24f5694ebb8603ab92f442464725f85bbc8e55e
e719aa8446535790d3808a0ea24a71459a923216
refs/heads/master
2021-01-19T19:01:59.103429
2017-08-23T14:01:32
2017-08-23T14:01:32
101,181,312
0
0
null
null
null
null
UTF-8
Java
false
false
421
java
package com.scu.xing.myapplication; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.util.Log; /** * Created by xing on 2017/8/9. */ public class BCReceiver3 extends BroadcastReceiver{ @Override public void onReceive(Context context, Intent intent) { Log.i("info","收到异步广播消息"); } }
[ "532956941@qq.com" ]
532956941@qq.com
cee5434576e24219c7c3294ec416746b3297224e
5250398e2b3d6e3abcbbd2825330d05b4eb94414
/j360-dubbo-base/src/main/java/me/j360/dubbo/base/model/result/PageDTO.java
47e72bd5e46cfb607842548a7c24295d5b716771
[]
no_license
pengqing123/dubbo-app-all
1616bc0b79f5295afc71844dd20e172e5fb80689
2cda281507bee6a4dc7b0fc7e3479549d5fb5a18
refs/heads/master
2021-08-08T21:37:28.637844
2017-11-01T12:00:09
2017-11-01T12:00:09
110,332,337
1
0
null
null
null
null
UTF-8
Java
false
false
908
java
package me.j360.dubbo.base.model.result; import java.io.Serializable; public class PageDTO<T> implements Serializable { private static final long serialVersionUID = 1L; private int recordCount; private int recordSize; private int pageNo; private int pageSize; private T data; public int getRecordCount() { return recordCount; } public void setRecordCount(int recordCount) { this.recordCount = recordCount; } public int getRecordSize() { return recordSize; } public void setRecordSize(int recordSize) { this.recordSize = recordSize; } public int getPageNo() { return pageNo; } public void setPageNo(int pageNo) { this.pageNo = pageNo; } public int getPageSize() { return pageSize; } public void setPageSize(int pageSize) { this.pageSize = pageSize; } public T getData() { return data; } public void setData(T data) { this.data = data; } }
[ "xumin_wlt@163.com" ]
xumin_wlt@163.com
b6d8e0e035a2a8d31d2e12da833988629371b51b
755a5432e9b53191a8941591f560e7a4fc28b1a0
/java-web-project/src05/main/java/com/eomcs/lms/servlet/MemberUpdateServlet.java
6e896a0813b7dddda6d7ab2f8a6045f0ac72f6ee
[]
no_license
SeungWanWoo/bitcamp-java-2018-12
4cff763ddab52721f24ce8abcebcec998dacc9e3
d14a8a935ef7a4d24eb633fedea892378e59168d
refs/heads/master
2021-08-06T22:11:24.954160
2019-08-06T08:17:07
2019-08-06T08:17:07
163,650,664
0
0
null
2020-04-30T03:39:17
2018-12-31T08:00:39
Java
UTF-8
Java
false
false
1,980
java
package com.eomcs.lms.servlet; import java.io.IOException; import java.util.UUID; import javax.servlet.ServletException; import javax.servlet.annotation.MultipartConfig; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.Part; import org.springframework.context.ApplicationContext; import com.eomcs.lms.domain.Member; import com.eomcs.lms.service.MemberService; @MultipartConfig(maxFileSize = 1024 * 1024 * 5) @SuppressWarnings("serial") @WebServlet("/member/update") public class MemberUpdateServlet extends HttpServlet { @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { MemberService memberService = ((ApplicationContext) this.getServletContext() .getAttribute("iocContainer")).getBean(MemberService.class); response.setContentType("text/html;charset=UTF-8"); Member member = new Member(); member.setNo(Integer.parseInt(request.getParameter("no"))); member.setName(request.getParameter("name")); member.setEmail(request.getParameter("email")); member.setPassword(request.getParameter("password")); member.setTel(request.getParameter("tel")); Part photo = request.getPart("photo"); if (photo.getSize() > 0) { String filename = UUID.randomUUID().toString(); String uploadDir = this.getServletContext().getRealPath("/upload/member"); photo.write(uploadDir + "/" + filename); member.setPhoto(filename); } if (memberService.update(member) == 1) { response.sendRedirect("list"); return; } request.setAttribute("error.title", "회원 변경 오류"); request.setAttribute("error.content", "해당 번호의 수업이 없습니다."); request.getRequestDispatcher("/error.jsp").include(request, response); } }
[ "seungwan.woo94@gmail.com" ]
seungwan.woo94@gmail.com
87c04ebd86864a147e8e4b1520e5218b9ff78fe4
bcbc759d0163c45d45196b8ba2a76f0d52b95bcb
/xxpay-manage/src/main/java/org/xxpay/manage/settlement/ctrl/AgentpayController.java
1c703a0334452edffd754d1d5959118229575fdd
[]
no_license
xiaoxiaoguai233/xxpay-0514
0cec7a9bdeaa7a9cd19509d5859b01f9bf2a62c0
e234dc6a597a7ccd824066c82c8f21a1e870315a
refs/heads/main
2023-04-25T16:22:32.984923
2021-05-09T07:25:05
2021-05-09T07:25:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,475
java
package org.xxpay.manage.settlement.ctrl; import com.alibaba.fastjson.JSONObject; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RestController; import org.xxpay.core.common.constant.Constant; import org.xxpay.core.common.domain.XxPayPageRes; import org.xxpay.core.common.domain.XxPayResponse; import org.xxpay.core.common.util.StrUtil; import org.xxpay.core.common.util.XXPayUtil; import org.xxpay.core.entity.AgentpayPassageAccount; import org.xxpay.core.entity.MchAgentpayRecord; import org.xxpay.manage.common.ctrl.BaseController; import org.xxpay.manage.common.service.RpcCommonService; import javax.servlet.http.HttpServletRequest; import java.util.List; import java.util.Map; /** * @author: dingzhiwei * @date: 17/12/6 * @description: 代付 */ @RestController @RequestMapping(Constant.MGR_CONTROLLER_ROOT_PATH + "/agentpay") public class AgentpayController extends BaseController { @Autowired private RpcCommonService rpcCommonService; /** * 代付列表查询 * @return */ @RequestMapping("/list") @ResponseBody public ResponseEntity<?> list(HttpServletRequest request) { JSONObject param = getJsonParam(request); MchAgentpayRecord mchAgentpayRecord = getObject(param, MchAgentpayRecord.class); if(mchAgentpayRecord == null) mchAgentpayRecord = new MchAgentpayRecord(); int count = rpcCommonService.rpcMchAgentpayService.count(mchAgentpayRecord, getQueryObj(param)); if(count == 0) return ResponseEntity.ok(XxPayPageRes.buildSuccess()); List<MchAgentpayRecord> mchAgentpayRecordList = rpcCommonService.rpcMchAgentpayService.select((getPageIndex(param)-1) * getPageSize(param), getPageSize(param), mchAgentpayRecord, getQueryObj(param)); for(MchAgentpayRecord mchAgentpayRecord1 : mchAgentpayRecordList) { // 取银行卡号前四位和后四位,中间星号代替 String accountNo = StrUtil.str2Star3(mchAgentpayRecord1.getAccountNo(), 4, 4, 4); mchAgentpayRecord1.setAccountNo(accountNo); } return ResponseEntity.ok(XxPayPageRes.buildSuccess(mchAgentpayRecordList, count)); } /** * 代付记录查询 * @return */ @RequestMapping("/get") @ResponseBody public ResponseEntity<?> get(HttpServletRequest request) { JSONObject param = getJsonParam(request); String agentpayOrderId = getStringRequired(param, "agentpayOrderId"); MchAgentpayRecord mchAgentpayRecord = new MchAgentpayRecord(); mchAgentpayRecord.setAgentpayOrderId(agentpayOrderId); mchAgentpayRecord = rpcCommonService.rpcMchAgentpayService.find(mchAgentpayRecord); if(mchAgentpayRecord != null) { // 取银行卡号前四位和后四位,中间星号代替 String accountNo = StrUtil.str2Star3(mchAgentpayRecord.getAccountNo(), 4, 4, 4); mchAgentpayRecord.setAccountNo(accountNo); } return ResponseEntity.ok(XxPayResponse.buildSuccess(mchAgentpayRecord)); } @RequestMapping("/trans_query") @ResponseBody public ResponseEntity<?> queryTrans(HttpServletRequest request) { JSONObject param = getJsonParam(request); String transOrderId = getStringRequired(param, "transOrderId"); JSONObject resObj = rpcCommonService.rpcXxPayTransService.queryTrans(transOrderId); if(XXPayUtil.isSuccess(resObj)) { JSONObject jsonObject = resObj.getJSONObject("channelObj"); return ResponseEntity.ok(XxPayResponse.buildSuccess(jsonObject == null ? "转账接口没有返回channelObj" : jsonObject.toJSONString())); }else { return ResponseEntity.ok(XxPayResponse.buildSuccess("查询通道异常")); } } /** * 查询统计数据 * @return */ @RequestMapping("/count") @ResponseBody public ResponseEntity<?> count(HttpServletRequest request) { JSONObject param = getJsonParam(request); Long mchId = getLong(param, "mchId"); String agentpayOrderId = getString(param, "agentpayOrderId"); String transOrderId = getString(param, "transOrderId"); String accountName = getString(param, "accountName"); Byte status = getByte(param, "status"); Byte agentpayChannel = getByte(param, "agentpayChannel"); // 订单起止时间 String createTimeStartStr = getString(param, "createTimeStart"); String createTimeEndStr = getString(param, "createTimeEnd"); Map allMap = rpcCommonService.rpcMchAgentpayService.count4All(mchId, accountName, agentpayOrderId, transOrderId, status, agentpayChannel, createTimeStartStr, createTimeEndStr); JSONObject obj = new JSONObject(); obj.put("allTotalCount", allMap.get("totalCount")); // 所有订单数 obj.put("allTotalAmount", allMap.get("totalAmount")); // 金额 obj.put("allTotalFee", allMap.get("totalFee")); // 费用 obj.put("allTotalSubAmount", allMap.get("totalSubAmount")); // 扣减金额 return ResponseEntity.ok(XxPayResponse.buildSuccess(obj)); } }
[ "1255343742@qq.com" ]
1255343742@qq.com
080c594697554f26f9db5b5664ecd0af29acc634
a6b6e362eac85c55e93ee1e0e967a2fcaa76394a
/hku-domain/src/main/java/com/accentrix/hku/domain/app/SpecialScheme.java
e2347e3a8d378d4b83d438cd37361c07600c9817
[]
no_license
peterso05168/hku
4a609d332ccb7d8a99ce96afc85332f96dc1ddba
2447e29d968a1fff7a0f8a788e5cbbb39877979a
refs/heads/master
2020-03-21T17:11:28.961542
2018-06-27T02:24:54
2018-06-27T02:24:54
118,405,513
0
0
null
null
null
null
UTF-8
Java
false
false
3,325
java
package com.accentrix.hku.domain.app; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Table; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; import org.hibernate.annotations.GenericGenerator; import org.jsondoc.core.annotation.ApiObject; import org.jsondoc.core.annotation.ApiObjectField; /** * @author Jaye.Lin * @date 创建时间:2018年1月30日 下午4:33:08 * @version 1.0 */ @XmlRootElement @XmlAccessorType(XmlAccessType.PROPERTY) @Entity @Table(name = "app_special_scheme") @ApiObject(name = "SpecialScheme") public class SpecialScheme implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(generator = "system-uuid") @GenericGenerator(name = "system-uuid", strategy = "uuid") @Column(name = "special_scheme_id", length = 32) @ApiObjectField(description = "The primary key") private String id; @Column(name = "special_scheme_cd") @ApiObjectField(description = "specialSchemeCd") private String specialSchemeCd; @Column(name = "application_id") @ApiObjectField(description = "applicationId") private String applicationId; @Column(name = "spt_app_scheme") @ApiObjectField(description = "sptAppScheme") private String sptAppScheme; @Column(name = "spt_sports") @ApiObjectField(description = "sptSports") private String sptSports; @Column(name = "spt_level") @ApiObjectField(description = "sptLevel") private String sptLevel; @Column(name = "spt_level_others") @ApiObjectField(description = "sptLevelOthers") private String sptLevelOthers; @Column(name = "spt_hyperlink") @ApiObjectField(description = "sptHyperlink") private String sptHyperlink; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getSpecialSchemeCd() { return specialSchemeCd; } public void setSpecialSchemeCd(String specialSchemeCd) { this.specialSchemeCd = specialSchemeCd; } public String getApplicationId() { return applicationId; } public void setApplicationId(String applicationId) { this.applicationId = applicationId; } public String getSptAppScheme() { return sptAppScheme; } public void setSptAppScheme(String sptAppScheme) { this.sptAppScheme = sptAppScheme; } public String getSptSports() { return sptSports; } public void setSptSports(String sptSports) { this.sptSports = sptSports; } public String getSptLevel() { return sptLevel; } public void setSptLevel(String sptLevel) { this.sptLevel = sptLevel; } public String getSptLevelOthers() { return sptLevelOthers; } public void setSptLevelOthers(String sptLevelOthers) { this.sptLevelOthers = sptLevelOthers; } public String getSptHyperlink() { return sptHyperlink; } public void setSptHyperlink(String sptHyperlink) { this.sptHyperlink = sptHyperlink; } }
[ "peterso05168@gmail.com" ]
peterso05168@gmail.com